Skip to content

Commit

Permalink
Merge pull request #5290 from a1mery/ModernOrganizationChart-Upgrade-…
Browse files Browse the repository at this point in the history
…to-1.20
  • Loading branch information
hugoabernier authored Oct 12, 2024
2 parents ca22283 + e38e21e commit 1d84b5e
Show file tree
Hide file tree
Showing 24 changed files with 31,132 additions and 16,129 deletions.
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
// 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.10.0",
"image": "docker.io/m365pnp/spfx:1.10.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.
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
4321,
35729,
5432
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"5432": {
"protocol": "https",
"label": "Workbench",
"onAutoForward": "silent"
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}
"name": "SPFx 1.20.0",
"image": "docker.io/m365pnp/spfx:1.20.0",
"customizations": {
"vscode": {
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
]
}
},
"forwardPorts": [
4321,
35729,
5432
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
"5432": {
"protocol": "https",
"label": "Workbench",
"onAutoForward": "silent"
},
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert

# Convert the generated PEM certificate to a CER certificate
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer

cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.cer
cp ~/.gcb-serve-data/gcb-serve.cer ./spfx-dev-cert.pem
# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem

## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
Expand Down
352 changes: 352 additions & 0 deletions samples/react-modern-organization-chart/.eslintrc.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions samples/react-modern-organization-chart/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ obj

# Styles Generated Code
*.scss.ts

.heft

release
16 changes: 16 additions & 0 deletions samples/react-modern-organization-chart/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
!dist
config

gulpfile.js

release
src
temp

tsconfig.json
tslint.json

*.log

.yo-rc.json
.vscode
1 change: 1 addition & 0 deletions samples/react-modern-organization-chart/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.0
9 changes: 7 additions & 2 deletions samples/react-modern-organization-chart/.yo-rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
"environment": "spo",
"framework": "react",
"isCreatingSolution": true,
"version": "1.10.0",
"version": "1.20.0",
"libraryName": "react-organization-chart",
"libraryId": "d28b8c44-5df1-4315-a6eb-a5be13ba4b88",
"packageManager": "npm",
"isDomainIsolated": false,
"componentType": "webpart"
"componentType": "webpart",
"sdkVersions": {
"@microsoft/teams-js": "2.24.0",
"@microsoft/microsoft-graph-client": "3.0.2"
},
"nodeVersion": "18.18.0"
}
}
21 changes: 4 additions & 17 deletions samples/react-modern-organization-chart/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
---
page_type: sample
products:
- office-sp
languages:
- javascript
- typescript
extensions:
contentType: samples
technologies:
- SharePoint Framework
platforms:
- react
createdDate: 8/7/2020 12:00:00 AM
---
# Modern Organization Chart

## Summary
Expand Down Expand Up @@ -42,8 +27,8 @@ Refresh Status Interval in minutes | number| no | default value 5 min
| 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. |

![SPFx 1.10](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js v10 | v8](https://img.shields.io/badge/Node.js-v10%20%7C%20v8-green.svg)
![SPFx 1.20](https://img.shields.io/badge/SPFx-1.20.0-green.svg)
![Node.js v18](https://img.shields.io/badge/Node.js-v18-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)
![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")
Expand All @@ -59,12 +44,14 @@ Refresh Status Interval in minutes | number| no | default value 5 min
## Contributors

* [João Mendes](https://github.com/joaojmendes)
* [Aimery Thomas](https://github.com/a1mery)

## Version history

Version|Date|Comments
-------|----|--------
1.0.0.0|July 08, 2020| Initial Release
1.1.0.0|October 06, 2024| Upgrade to SPFx v1.20


## Prerequisites
Expand Down
4 changes: 2 additions & 2 deletions samples/react-modern-organization-chart/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"This web part show organization chart for current user, shows, managers and direct reports and there available status."
],
"creationDateTime": "2020-07-09",
"updateDateTime": "2020-07-09",
"updateDateTime": "2024-10-06",
"products": [
"SharePoint"
],
Expand All @@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.10.0"
"value": "1.20.0"
},
{
"key": "SPFX-SUPPORTSTHEMEVARIANTS",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json",
"workingDir": "./temp/deploy/",
"workingDir": "./release/assets/",
"account": "<!-- STORAGE ACCOUNT NAME -->",
"container": "react-organization-chart",
"accessKey": "<!-- ACCESS KEY -->"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,46 @@
"solution": {
"name": "react-modern-organization-chart",
"id": "d28b8c44-5df1-4315-a6eb-a5be13ba4b88",
"version": "1.0.0.0",
"version": "1.1.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"webApiPermissionRequests": [{
"resource": "Microsoft Graph",
"scope": "Presence.Read.All"
}]
}],
"developer": {
"name": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"websiteUrl": "",
"mpnId": "Undefined-1.15.0"
},
"metadata": {
"shortDescription": {
"default": "react-organization-chart description"
},
"longDescription": {
"default": "react-organization-chart description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "react-organization-chart OrganizationChartWebPart Feature",
"description": "The feature that activates OrganizationChartWebPart from the react-organization-chart solution.",
"id": "ea67ede9-e4e7-411c-aee1-843dca97a4a8",
"version": "1.0.0.0",
"componentIds": [
"ea67ede9-e4e7-411c-aee1-843dca97a4a8"
]
}
]
},


"paths": {
"zippedPackage": "solution/react-modern-organization-chart.sppkg"
}
Expand Down
3 changes: 3 additions & 0 deletions samples/react-modern-organization-chart/config/sass.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
8 changes: 2 additions & 6 deletions samples/react-modern-organization-chart/config/serve.json
Original file line number Diff line number Diff line change
@@ -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,
"https": true,
"initialPage": "https://localhost:5432/workbench",
"api": {
"port": 5432,
"entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
}
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
7 changes: 7 additions & 0 deletions samples/react-modern-organization-chart/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,12 @@ gulp.task('dev', gulpSequence('clean', 'bundle', 'package-solution'));
* Custom Framework Specific gulp tasks
*/

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);
Loading

0 comments on commit 1d84b5e

Please sign in to comment.