Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spfx upgrade/react-tree-orgchartUpgrade to 1.20 #5288

Merged
merged 9 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 37 additions & 38 deletions samples/react-tree-orgchart/.devcontainer/devcontainer.json
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"
}
6 changes: 4 additions & 2 deletions samples/react-tree-orgchart/.devcontainer/spfx-startup.sh
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
319 changes: 319 additions & 0 deletions samples/react-tree-orgchart/.eslintrc.js

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions samples/react-tree-orgchart/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

!dist
config

gulpfile.js

release
src
temp

tsconfig.json
tslint.json

*.log

.yo-rc.json
.vscode
1 change: 1 addition & 0 deletions samples/react-tree-orgchart/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.20.3
8 changes: 5 additions & 3 deletions samples/react-tree-orgchart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can configure in the web part properties:
* show Organization Chart by picking up user


![Organization Chart Web Part](./assets/react-tree-orgchart.gif)
![Organization Chart Web Part](./assets/react-tree-orgchart-2.gif)

![Organization Chart Web Part](./assets/Screenshot1.png)
![Organization Chart Web Part](./assets/Screenshot2.png)
Expand All @@ -23,8 +23,8 @@ You can configure in the web part properties:
| 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 LTS 10 | LTS 8](https://img.shields.io/badge/Node.js-LTS%2010%20%7C%20LTS%208-green.svg)
![SPFx 1.20](https://img.shields.io/badge/SPFx-1.10.0-green.svg)
![Node.js LTS 18](https://img.shields.io/badge/Node.js-LTS%2018-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 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 Down Expand Up @@ -63,11 +63,13 @@ currentUserTeam|boolean|no|only in Interface to handle previouse installations

* [João Mendes](https://github.com/joaojmendes)
* [Peter Paul Kirschner](https://github.com/petkir)
* [Thomas Daly](https://github.com/tom-daly)

## Version history

Version|Date|Comments
-------|----|--------
2.0.0|October 06, 2024|Update to SPFx 1.20, removed react-sortable-tree(no updates any more) and replaced with custom control
1.1.2|October 28, 2021|Fixes the Issue with different TimeZones.
1.1.1|October 5, 2021|Added missing Graph permissions in manifest
1.1.0|Feb 28, 2021|Added <ul><li>Show Other Team</li><li>Live Contact Card</li><li>Filter user by userPrincipalName</li><li>Graph API</li><li>PNPJS updates</li></ul>
Expand Down
Binary file modified samples/react-tree-orgchart/assets/Screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified samples/react-tree-orgchart/assets/Screenshot2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified samples/react-tree-orgchart/assets/Screenshot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
6 changes: 3 additions & 3 deletions samples/react-tree-orgchart/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"The Tree Organization Web Part shows the Organization Chart of the or the team, the web part reads information from current user to build the Organization Chart."
],
"creationDateTime": "2021-02-28",
"updateDateTime": "2021-10-28",
"updateDateTime": "2024-10-06",
"products": [
"SharePoint"
],
Expand All @@ -20,7 +20,7 @@
},
{
"key": "SPFX-VERSION",
"value": "1.10.0"
"value": "1.20.0"
},
{
"key": "PNPCONTROLS",
Expand All @@ -37,7 +37,7 @@
{
"type": "image",
"order": 101,
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-tree-orgchart/assets/react-tree-orgchart.gif?raw=true",
"url": "https://github.com/pnp/sp-dev-fx-webparts/blob/main/samples/react-tree-orgchart/assets/react-tree-orgchart-2.gif?raw=true",
"alt": "Tree Organization Web Part"
},
{
Expand Down
4 changes: 0 additions & 4 deletions samples/react-tree-orgchart/config/copy-assets.json

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-tree-orgchart",
"accessKey": "<!-- ACCESS KEY -->"
Expand Down
31 changes: 30 additions & 1 deletion samples/react-tree-orgchart/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,39 @@
"solution": {
"name": "react-tree-orgchart-client-side-solution",
"id": "d76a0c4f-d669-42eb-9533-68d5cec5e9d3",
"version": "1.1.0.0",
"version": "2.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"developer": {
"name": "",
"privacyUrl": "",
"termsOfUseUrl": "",
"websiteUrl": "",
"mpnId": "Undefined-1.15.0"
},
"metadata": {
"shortDescription": {
"default": "react-tree-orgchart description"
},
"longDescription": {
"default": "react-tree-orgchart description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "react-tree-orgchart TreeOrgChartWebPart Feature",
"description": "The feature that activates TreeOrgChartWebPart from the react-tree-orgchart solution.",
"id": "4f45c562-805c-42da-81cc-8e84bf7834b0",
"version": "2.0.0.0",
"componentIds": [
"4f45c562-805c-42da-81cc-8e84bf7834b0"
]
}
],
"webApiPermissionRequests": [
{
"resource": "Microsoft Graph",
Expand Down
3 changes: 3 additions & 0 deletions samples/react-tree-orgchart/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"
}
9 changes: 3 additions & 6 deletions samples/react-tree-orgchart/config/serve.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
{
"$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",

}
13 changes: 11 additions & 2 deletions samples/react-tree-orgchart/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
'use strict';

const gulp = require('gulp');
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.initialize(gulp);
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'));
Loading
Loading