upgrade to spfx 1.16.1
This commit is contained in:
parent
2fc17a2e23
commit
643bf996f9
|
@ -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 }
|
||||||
|
};
|
|
@ -11,6 +11,7 @@ dist
|
||||||
lib
|
lib
|
||||||
solution
|
solution
|
||||||
temp
|
temp
|
||||||
|
release
|
||||||
*.sppkg
|
*.sppkg
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
# Coverage directory used by tools like istanbul
|
||||||
|
@ -30,3 +31,5 @@ obj
|
||||||
|
|
||||||
# Styles Generated Code
|
# Styles Generated Code
|
||||||
*.scss.ts
|
*.scss.ts
|
||||||
|
|
||||||
|
.heft
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
!dist
|
||||||
|
config
|
||||||
|
|
||||||
|
gulpfile.js
|
||||||
|
|
||||||
|
release
|
||||||
|
src
|
||||||
|
temp
|
||||||
|
|
||||||
|
tsconfig.json
|
||||||
|
tslint.json
|
||||||
|
|
||||||
|
*.log
|
||||||
|
|
||||||
|
.yo-rc.json
|
||||||
|
.vscode
|
|
@ -1,12 +1,17 @@
|
||||||
{
|
{
|
||||||
"@microsoft/generator-sharepoint": {
|
"@microsoft/generator-sharepoint": {
|
||||||
"version": "1.11.0",
|
"version": "1.16.1",
|
||||||
"libraryName": "react-graph-telephonedirectory",
|
"libraryName": "react-graph-telephonedirectory",
|
||||||
"libraryId": "e1a26cc8-a086-454f-9f16-9aeb0a276bcc",
|
"libraryId": "e1a26cc8-a086-454f-9f16-9aeb0a276bcc",
|
||||||
"environment": "spo",
|
"environment": "spo",
|
||||||
"packageManager": "npm",
|
"packageManager": "npm",
|
||||||
"isCreatingSolution": true,
|
"isCreatingSolution": true,
|
||||||
"isDomainIsolated": false,
|
"isDomainIsolated": false,
|
||||||
"componentType": "webpart"
|
"componentType": "webpart",
|
||||||
|
"nodeVersion": "14.18.2",
|
||||||
|
"sdkVersions": {
|
||||||
|
"@microsoft/microsoft-graph-client": "3.0.2",
|
||||||
|
"@microsoft/teams-js": "2.4.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,8 +14,8 @@ The web part will fetch data from directory using Graph API and display in detai
|
||||||
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|
||||||
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
|
||||||
|
|
||||||
![SPFx 1.11](https://img.shields.io/badge/SPFx-1.11.0-green.svg)
|
![SPFx 1.16.1](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
|
||||||
![Node.js v10](https://img.shields.io/badge/Node.js-v10-green.svg)
|
![Node.js v16 | v14 | v12](https://img.shields.io/badge/Node.js-v16%20%7C%20v14%20%7C%20v12-green.svg)
|
||||||
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-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 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")
|
![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")
|
||||||
|
@ -52,6 +52,7 @@ Version|Date|Comments
|
||||||
1.0|July 14,2020 | Initial Release
|
1.0|July 14,2020 | Initial Release
|
||||||
1.1|November 7,2020 | Upgraded to SPFx 1.11
|
1.1|November 7,2020 | Upgraded to SPFx 1.11
|
||||||
1.2|August 7, 2021|Adding the Title from the Property Pane into the Web Part
|
1.2|August 7, 2021|Adding the Title from the Property Pane into the Web Part
|
||||||
|
1.3|March 10,2023 | Upgraded to SPFx 1.16.1
|
||||||
|
|
||||||
|
|
||||||
## Minimal Path to Awesome
|
## Minimal Path to Awesome
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/copy-assets.schema.json",
|
|
||||||
"deployCdnPath": "temp/deploy"
|
|
||||||
}
|
|
|
@ -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": "react-graph-telephonedirectory",
|
"container": "react-graph-telephonedirectory",
|
||||||
"accessKey": "<!-- ACCESS KEY -->"
|
"accessKey": "<!-- ACCESS KEY -->"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"solution": {
|
"solution": {
|
||||||
"name": "react-graph-telephonedirectory-client-side-solution",
|
"name": "react-graph-telephonedirectory-client-side-solution",
|
||||||
"id": "e1a26cc8-a086-454f-9f16-9aeb0a276bcc",
|
"id": "e1a26cc8-a086-454f-9f16-9aeb0a276bcc",
|
||||||
"version": "1.1.0.0",
|
"version": "1.3.0.0",
|
||||||
"includeClientSideAssets": true,
|
"includeClientSideAssets": true,
|
||||||
"isDomainIsolated": true,
|
"isDomainIsolated": true,
|
||||||
"developer": {
|
"developer": {
|
||||||
|
@ -22,6 +22,28 @@
|
||||||
"resource": "Microsoft Graph",
|
"resource": "Microsoft Graph",
|
||||||
"scope": "User.Read"
|
"scope": "User.Read"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"shortDescription": {
|
||||||
|
"default": "react-graph-telephonedirectory description"
|
||||||
|
},
|
||||||
|
"longDescription": {
|
||||||
|
"default": "react-graph-telephonedirectory description"
|
||||||
|
},
|
||||||
|
"screenshotPaths": [],
|
||||||
|
"videoUrl": "",
|
||||||
|
"categories": []
|
||||||
|
},
|
||||||
|
"features": [
|
||||||
|
{
|
||||||
|
"title": "react-graph-telephonedirectory TelephonedirectoryWebPart Feature",
|
||||||
|
"description": "The feature that activates TelephonedirectoryWebPart from the react-graph-telephonedirectory solution.",
|
||||||
|
"id": "586d82f7-79c3-4fc6-be7b-290fa1e4f1f6",
|
||||||
|
"version": "1.3.0.0",
|
||||||
|
"componentIds": [
|
||||||
|
"586d82f7-79c3-4fc6-be7b-290fa1e4f1f6"
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"paths": {
|
"paths": {
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
|
||||||
|
}
|
|
@ -1,10 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json",
|
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
|
||||||
"port": 4321,
|
"port": 4321,
|
||||||
"https": true,
|
"https": true,
|
||||||
"initialPage": "https://localhost:5432/workbench",
|
"initialPage": "https://enter-your-SharePoint-site/_layouts/workbench.aspx"
|
||||||
"api": {
|
|
||||||
"port": 5432,
|
|
||||||
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,4 +4,12 @@ const gulp = require('gulp');
|
||||||
const build = require('@microsoft/sp-build-web');
|
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(gulp);
|
build.initialize(gulp);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "react-graph-telephonedirectory",
|
"name": "react-graph-telephonedirectory",
|
||||||
"version": "1.1.0",
|
"version": "1.3.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=16.13.0 <17.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "gulp bundle",
|
"build": "gulp bundle",
|
||||||
|
@ -12,15 +12,13 @@
|
||||||
"test": "gulp test"
|
"test": "gulp test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@fluentui/react": "^8.61.0",
|
||||||
"@microsoft/sp-core-library": "^1.11.0",
|
"@microsoft/sp-core-library": "^1.11.0",
|
||||||
"@microsoft/sp-lodash-subset": "^1.11.0",
|
"@microsoft/sp-lodash-subset": "^1.11.0",
|
||||||
"@microsoft/sp-office-ui-fabric-core": "^1.11.0",
|
"@microsoft/sp-office-ui-fabric-core": "^1.11.0",
|
||||||
"@microsoft/sp-webpart-base": "^1.11.0",
|
"@microsoft/sp-webpart-base": "^1.11.0",
|
||||||
"@pnp/spfx-controls-react": "^2.1.0",
|
"@pnp/spfx-controls-react": "^2.1.0",
|
||||||
"@types/es6-promise": "0.0.33",
|
"@types/es6-promise": "0.0.33",
|
||||||
"@types/react": "16.8.8",
|
|
||||||
"@types/react-dom": "16.8.3",
|
|
||||||
"@types/webpack-env": "1.13.1",
|
|
||||||
"office-ui-fabric-react": "6.189.2",
|
"office-ui-fabric-react": "6.189.2",
|
||||||
"react": "16.8.5",
|
"react": "16.8.5",
|
||||||
"react-dom": "16.8.5"
|
"react-dom": "16.8.5"
|
||||||
|
@ -29,14 +27,24 @@
|
||||||
"@types/react": "16.8.8"
|
"@types/react": "16.8.8"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@microsoft/eslint-config-spfx": "1.16.1",
|
||||||
|
"@microsoft/eslint-plugin-spfx": "1.16.1",
|
||||||
"@microsoft/rush-stack-compiler-2.9": "^0.14.31",
|
"@microsoft/rush-stack-compiler-2.9": "^0.14.31",
|
||||||
"@microsoft/sp-build-web": "^1.11.0",
|
"@microsoft/rush-stack-compiler-4.5": "0.2.2",
|
||||||
"@microsoft/sp-module-interfaces": "^1.11.0",
|
"@microsoft/sp-build-web": "1.16.1",
|
||||||
|
"@microsoft/sp-module-interfaces": "1.16.1",
|
||||||
"@microsoft/sp-tslint-rules": "^1.11.0",
|
"@microsoft/sp-tslint-rules": "^1.11.0",
|
||||||
"@microsoft/sp-webpart-workbench": "^1.11.0",
|
"@microsoft/sp-webpart-workbench": "^1.11.0",
|
||||||
|
"@rushstack/eslint-config": "2.5.1",
|
||||||
"@types/chai": "3.4.34",
|
"@types/chai": "3.4.34",
|
||||||
"@types/mocha": "2.2.38",
|
"@types/mocha": "2.2.38",
|
||||||
"ajv": "~5.2.2",
|
"@types/react": "17.0.45",
|
||||||
"gulp": "~3.9.1"
|
"@types/react-dom": "17.0.17",
|
||||||
|
"@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",
|
||||||
|
"typescript": "4.5.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class MSGraphService implements IMSGraphService{
|
||||||
.version("v1.0")
|
.version("v1.0")
|
||||||
.filter(`(startswith(surname,'${escape(searchFor)}'))`).get();
|
.filter(`(startswith(surname,'${escape(searchFor)}'))`).get();
|
||||||
if(res.value.length !== 0){
|
if(res.value.length !== 0){
|
||||||
res.value.map((_userProperty,_index)=>{
|
res.value.map((_userProperty:any,_index:any)=>{
|
||||||
if(_userProperty.mail !== null){
|
if(_userProperty.mail !== null){
|
||||||
userProperties.push({
|
userProperties.push({
|
||||||
businessPhone:_userProperty.businessPhones[0],
|
businessPhone:_userProperty.businessPhones[0],
|
||||||
|
@ -66,7 +66,7 @@ export class MSGraphService implements IMSGraphService{
|
||||||
.version("v1.0")
|
.version("v1.0")
|
||||||
.filter(`(startswith(givenName,'${escape(searchFor)}'))`).get();
|
.filter(`(startswith(givenName,'${escape(searchFor)}'))`).get();
|
||||||
if(res.value.length !== 0){
|
if(res.value.length !== 0){
|
||||||
res.value.map((_userProperty,_index)=>{
|
res.value.map((_userProperty:any,_index:any)=>{
|
||||||
if(_userProperty.mail !== null){
|
if(_userProperty.mail !== null){
|
||||||
userProperties.push({
|
userProperties.push({
|
||||||
businessPhone:_userProperty.businessPhones[0],
|
businessPhone:_userProperty.businessPhones[0],
|
||||||
|
@ -94,7 +94,7 @@ export class MSGraphService implements IMSGraphService{
|
||||||
.version("v1.0")
|
.version("v1.0")
|
||||||
.filter(`(startswith(displayName,'${escape(searchFor)}'))`).get();
|
.filter(`(startswith(displayName,'${escape(searchFor)}'))`).get();
|
||||||
if(res.value.length !== 0){
|
if(res.value.length !== 0){
|
||||||
res.value.map((_userProperty,_index)=>{
|
res.value.map((_userProperty:any,_index:any)=>{
|
||||||
userProperties.push({
|
userProperties.push({
|
||||||
businessPhone:_userProperty.businessPhones[0],
|
businessPhone:_userProperty.businessPhones[0],
|
||||||
displayName:_userProperty.displayName,
|
displayName:_userProperty.displayName,
|
||||||
|
|
|
@ -46,7 +46,7 @@ export default class TelephonedirectoryWebPart extends BaseClientSideWebPart<ITe
|
||||||
ReactDom.unmountComponentAtNode(this.domElement);
|
ReactDom.unmountComponentAtNode(this.domElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected get dataVersion(): Version {
|
protected get _dataVersion(): Version {
|
||||||
return Version.parse('1.0');
|
return Version.parse('1.0');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
@import '~office-ui-fabric-react/dist/sass/References.scss';
|
@import '~@fluentui/react/dist/sass/References.scss';
|
||||||
|
|
||||||
.telephonedirectory {
|
.telephonedirectory {
|
||||||
.container {
|
.container {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "./node_modules/@microsoft/rush-stack-compiler-2.9/includes/tsconfig-web.json",
|
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.5/includes/tsconfig-web.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
@ -14,26 +14,23 @@
|
||||||
"inlineSources": false,
|
"inlineSources": false,
|
||||||
"strictNullChecks": false,
|
"strictNullChecks": false,
|
||||||
"noUnusedLocals": false,
|
"noUnusedLocals": false,
|
||||||
|
"noImplicitAny": true,
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
"./node_modules/@types",
|
"./node_modules/@types",
|
||||||
"./node_modules/@microsoft"
|
"./node_modules/@microsoft"
|
||||||
],
|
],
|
||||||
"types": [
|
"types": [
|
||||||
"es6-promise",
|
|
||||||
"webpack-env"
|
"webpack-env"
|
||||||
],
|
],
|
||||||
"lib": [
|
"lib": [
|
||||||
"es5",
|
"es5",
|
||||||
"dom",
|
"dom",
|
||||||
"es2015.collection"
|
"es2015.collection",
|
||||||
|
"es2015.promise"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.ts",
|
"src/**/*.ts",
|
||||||
"declarations.d.ts"
|
"declarations.d.ts"
|
||||||
],
|
|
||||||
"exclude": [
|
|
||||||
"node_modules",
|
|
||||||
"lib"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "@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
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue