Skip to content

Commit

Permalink
Merge pull request #5302 from Sandeep-FED/react-accordion-SPFx1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
hugoabernier authored Oct 20, 2024
2 parents fa6b339 + 1b90c47 commit 511387a
Show file tree
Hide file tree
Showing 23 changed files with 33,044 additions and 21,937 deletions.
75 changes: 37 additions & 38 deletions samples/react-accordion/.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-accordion/.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
5 changes: 5 additions & 0 deletions samples/react-accordion/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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 }
};
3 changes: 3 additions & 0 deletions samples/react-accordion/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ obj
# Resx Generated Code
*.resx.ts

.heft
.release

# Styles Generated Code
*.scss.ts
# .CER Certificates
Expand Down
16 changes: 16 additions & 0 deletions samples/react-accordion/.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-accordion/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.18.2
6 changes: 5 additions & 1 deletion samples/react-accordion/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"@microsoft/generator-sharepoint": {
"version": "1.20.0",
"sdkVersions": {
"@microsoft/teams-js": "2.24.0"
},
"nodeVersion": "18.18.2",
"isCreatingSolution": true,
"isDomainIsolated": false,
"environment": "spo",
"version": "1.10.0",
"libraryName": "react-accordion",
"libraryId": "6d6cf05b-cfe5-4d12-af19-19ec3aedcaf9",
"packageManager": "npm",
Expand Down
22 changes: 4 additions & 18 deletions samples/react-accordion/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
---
page_type: sample
products:
- office-sp
languages:
- javascript
- typescript
extensions:
contentType: samples
technologies:
- SharePoint Framework
platforms:
- React
createdDate: 1/8/2018 12:00:00 AM
---

# Using React Accordion plugin with SPFx

## Summary
Expand All @@ -29,8 +13,8 @@ This is a sample web Part that illustrates the use of React Accessible Accordion
| 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.0](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 "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 All @@ -47,6 +31,7 @@ This is a sample web Part that illustrates the use of React Accessible Accordion

* [Gautam Sheth](https://github.com/gautamdsheth)
* Abhishek Garg
* [Sandeep P S](https://github.com/Sandeep-FED)

## Version history

Expand All @@ -57,6 +42,7 @@ Version|Date|Comments
2.1|June 22, 2020|Added pagination (Abhishek Garg)
2.2|October 1, 2020 | Added new Pagination Configuration (@beau__cameron)
2.3|September 30, 2021 | Added sorting (@fthorild)
3.0|October 13, 2024 | Upgrade to SPFx 1.20.0 & includes bug fixes

## Minimal Path to Awesome

Expand Down
10 changes: 3 additions & 7 deletions samples/react-accordion/assets/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"This is a sample web Part that illustrates the use of React Accessible Accordion plugin for building SharePoint Framework client-side web parts to show SharePoint list data in Accordion format."
],
"creationDateTime": "2020-06-22",
"updateDateTime": "2021-09-30",
"updateDateTime": "2024-10-13",
"products": [
"SharePoint"
],
Expand Down Expand Up @@ -38,17 +38,13 @@
"authors": [
{
"gitHubAccount": "gautamdsheth",
"company": "Valo Intranet",
"pictureUrl": "https://github.com/gautamdsheth.png",
"name": "Gautam Sheth",
"twitter": "gautamdsheth"
"name": "Gautam Sheth"
},
{
"gitHubAccount": "AbhishekGarg",
"company": "Atos",
"pictureUrl": "https://avatars.githubusercontent.com/u/5449154?s=400\u0026v=4",
"name": "Abhishek Garg",
"twitter": "abhig89"
"name": "Abhishek Garg"
}
],
"references": [
Expand Down
4 changes: 0 additions & 4 deletions samples/react-accordion/config/copy-assets.json

This file was deleted.

2 changes: 1 addition & 1 deletion samples/react-accordion/config/deploy-azure-storage.json
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-accordion",
"accessKey": "<!-- ACCESS KEY -->"
Expand Down
26 changes: 24 additions & 2 deletions samples/react-accordion/config/package-solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,31 @@
"solution": {
"name": "react-accordion-client-side-solution",
"id": "6d6cf05b-cfe5-4d12-af19-19ec3aedcaf9",
"version": "2.3.0.0",
"version": "3.0.0.0",
"includeClientSideAssets": true,
"isDomainIsolated": false
"isDomainIsolated": false,
"metadata": {
"shortDescription": {
"default": "react-accordion description"
},
"longDescription": {
"default": "react-accordion description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "react-accordion ReactAccordionWebPart Feature",
"description": "The feature that activates ReactAccordionWebPart from the react-accordion solution.",
"id": "97a28c00-64ee-4ec7-b373-723e39069a96",
"version": "3.0.0.0",
"componentIds": [
"97a28c00-64ee-4ec7-b373-723e39069a96"
]
}
]
},
"paths": {
"zippedPackage": "solution/react-accordion.sppkg"
Expand Down
3 changes: 3 additions & 0 deletions samples/react-accordion/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-accordion/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"
}
9 changes: 9 additions & 0 deletions samples/react-accordion/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ 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.`);

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 511387a

Please sign in to comment.