-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added ImageCard-HTML-React-FAQs
- Loading branch information
Showing
36 changed files
with
30,892 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Dependency directories | ||
node_modules | ||
|
||
# Build generated files | ||
dist | ||
lib | ||
release | ||
solution | ||
temp | ||
*.sppkg | ||
.heft | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# OSX | ||
.DS_Store | ||
|
||
# Visual Studio files | ||
.ntvs_analysis.dat | ||
.vs | ||
bin | ||
obj | ||
|
||
# Resx Generated Code | ||
*.resx.ts | ||
|
||
# Styles Generated Code | ||
*.scss.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Hosted workbench", | ||
"type": "msedge", | ||
"request": "launch", | ||
"url": "https://{tenantDomain}/_layouts/workbench.aspx", | ||
"webRoot": "${workspaceRoot}", | ||
"sourceMaps": true, | ||
"sourceMapPathOverrides": { | ||
"webpack:///.././src/*": "${webRoot}/src/*", | ||
"webpack:///../../../src/*": "${webRoot}/src/*", | ||
"webpack:///../../../../src/*": "${webRoot}/src/*", | ||
"webpack:///../../../../../src/*": "${webRoot}/src/*" | ||
}, | ||
"runtimeArgs": [ | ||
"--remote-debugging-port=9222", | ||
"-incognito" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
// Configure glob patterns for excluding files and folders in the file explorer. | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.DS_Store": true, | ||
"**/bower_components": true, | ||
"**/coverage": true, | ||
"**/jest-output": true, | ||
"**/lib-amd": true, | ||
"src/**/*.scss.ts": true | ||
}, | ||
"typescript.tsdk": ".\\node_modules\\typescript\\lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"@microsoft/generator-sharepoint": { | ||
"plusBeta": true, | ||
"isCreatingSolution": true, | ||
"nodeVersion": "18.20.4", | ||
"sdksVersions": { | ||
"@microsoft/microsoft-graph-client": "3.0.2", | ||
"@microsoft/teams-js": "2.24.0" | ||
}, | ||
"version": "1.20.0-beta.0", | ||
"libraryName": "image-card-faqs", | ||
"libraryId": "ca1dda22-8cd0-441a-ad39-0bebdc995dd5", | ||
"environment": "spo", | ||
"packageManager": "npm", | ||
"solutionName": "image-card-faqs", | ||
"solutionShortDescription": "image-card-faqs description", | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"componentType": "adaptiveCardExtension", | ||
"aceTemplateType": "Generic" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# ImageCard HTML React FAQs | ||
|
||
## Summary | ||
|
||
This Adaptive Card extension (ACE) sample shows how to use HTML and React in an ACEs which was introduced in SPFx 1.20.0. | ||
This ACE allows you to display a list of FAQs. The FAQs are stored in the properties of ACE and are displayed as an accordion in the QuickView. | ||
|
||
## Highlights | ||
- Use of HTML and React in ACEs | ||
- Use of React components in ACEs | ||
- Use of CSS in JS for styling the React components | ||
- Dynamic update of colours based on the theme changes | ||
- Use of markdown format for the FAQs | ||
|
||
## Demo | ||
### Large card view | ||
![ImageCard-HTML-React-FAQs](./assets/demo.gif) | ||
|
||
### Medium card view | ||
![ImageCard-HTML-React-FAQs](./assets/medium.png) | ||
|
||
## Used SharePoint Framework Version | ||
|
||
![version](https://img.shields.io/badge/version-1.20.0--rc.1-yellow.svg) | ||
|
||
## Applies to | ||
|
||
- [SharePoint Framework](https://aka.ms/spfx) | ||
- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
|
||
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram) | ||
## Solution | ||
|
||
| Solution | Author(s) | | ||
| ----------- | ------------------------------------------------------- | | ||
| ImageCard-HTML-React-FAQs | [Anoop T](https://linktr.ee/anoopt) | ||
|
||
## Version history | ||
|
||
| Version | Date | Comments | | ||
| ------- | ---------------- | --------------- | | ||
| 1.0 | September 13, 2024 | Initial release | | ||
|
||
## Disclaimer | ||
|
||
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** | ||
|
||
--- | ||
|
||
## Minimal Path to Awesome | ||
|
||
- Clone this repository | ||
- Ensure that you are at the solution folder | ||
- in the command-line run: | ||
- **npm install** | ||
- **gulp serve** | ||
- Add the "Fequently Asked Quesiotns" ACE to the dashboard page | ||
- Edit the properties of the ACE as needed | ||
|
||
## References | ||
|
||
- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
- [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview) | ||
- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis) | ||
- [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview) | ||
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development | ||
- [SPFx CSS in JS](https://spblog.net/post/2020/04/22/styling-sharepoint-framework-components-with-css-in-js-approach) |
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[{ | ||
"name": "pnp-sp-fx-aces-imagecard-html-react-faqs", | ||
"source": "pnp", | ||
"title": "Frequently Asked Questions", | ||
"shortDescription": "Displays a list of frequently asked questions.", | ||
"url": "https://github.com/pnp/sp-dev-fx-aces/tree/main/samples/ImageCard-HTML-React-FAQs", | ||
"longDescription": [ | ||
"This sample demonstrates how to create an Adaptive Card Extension that displays a list of frequently asked questions. The sample uses React to render the FAQs in the QuickView." | ||
], | ||
"creationDateTime": "2024-09-13", | ||
"updateDateTime": "2024-09-13", | ||
"products": [ | ||
"SharePoint", | ||
"Viva" | ||
], | ||
"metadata": [{ | ||
"key": "CLIENT-SIDE-DEV", | ||
"value": "React" | ||
}, | ||
{ | ||
"key": "SPFX-VERSION", | ||
"value": "1.20.0-rc1" | ||
} | ||
], | ||
"thumbnails": [{ | ||
"type": "image", | ||
"order": 100, | ||
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ImageCard-HTML-React-FAQs/assets/demo.gif", | ||
"alt": "Preview" | ||
}], | ||
"authors": [{ | ||
"gitHubAccount": "anoopt", | ||
"pictureUrl": "https://github.com/anoopt.png", | ||
"name": "Anoop Tatti" | ||
}], | ||
"references": [{ | ||
"name": "Viva Connections Extensibility guidance", | ||
"description": "Adaptive Card Extensions are client-side components that run in the context of a SharePoint page.", | ||
"url": "https://aka.ms/viva/connections/extensibility" | ||
}, | ||
{ | ||
"name": "Adaptive Card Documentation", | ||
"description": "Detailed documentation on Adaptive Cards including the Adaptive Card designer.", | ||
"url": "https://adaptivecards.io/" | ||
}, { | ||
"name": "Adaptive Card Extension Design Guidance", | ||
"description": "Design guidance for laying out Adaptive Card Extensions.", | ||
"url": "https://docs.microsoft.com/en-us/sharepoint/dev/spfx/viva/design/design-intro" | ||
} | ||
] | ||
}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", | ||
"version": "2.0", | ||
"bundles": { | ||
"frequently-asked-questions-adaptive-card-extension": { | ||
"components": [ | ||
{ | ||
"entrypoint": "./lib/adaptiveCardExtensions/frequentlyAskedQuestions/FrequentlyAskedQuestionsAdaptiveCardExtension.js", | ||
"manifest": "./src/adaptiveCardExtensions/frequentlyAskedQuestions/FrequentlyAskedQuestionsAdaptiveCardExtension.manifest.json" | ||
} | ||
] | ||
} | ||
}, | ||
"externals": {}, | ||
"localizedResources": { | ||
"FrequentlyAskedQuestionsAdaptiveCardExtensionStrings": "lib/adaptiveCardExtensions/frequentlyAskedQuestions/loc/{locale}.js", | ||
"PropertyControlStrings": "node_modules/@pnp/spfx-property-controls/lib/loc/{locale}.js" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
samples/ImageCard-HTML-React-FAQs/config/deploy-azure-storage.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/deploy-azure-storage.schema.json", | ||
"workingDir": "./release/assets/", | ||
"account": "<!-- STORAGE ACCOUNT NAME -->", | ||
"container": "image-card-faqs", | ||
"accessKey": "<!-- ACCESS KEY -->" | ||
} |
40 changes: 40 additions & 0 deletions
40
samples/ImageCard-HTML-React-FAQs/config/package-solution.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", | ||
"solution": { | ||
"name": "image-card-faqs-client-side-solution", | ||
"id": "ca1dda22-8cd0-441a-ad39-0bebdc995dd5", | ||
"version": "1.0.0.0", | ||
"includeClientSideAssets": true, | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"developer": { | ||
"name": "", | ||
"websiteUrl": "", | ||
"privacyUrl": "", | ||
"termsOfUseUrl": "", | ||
"mpnId": "Undefined-1.20.0-beta.0" | ||
}, | ||
"metadata": { | ||
"shortDescription": { | ||
"default": "image-card-faqs description" | ||
}, | ||
"longDescription": { | ||
"default": "image-card-faqs description" | ||
}, | ||
"screenshotPaths": [], | ||
"videoUrl": "", | ||
"categories": [] | ||
}, | ||
"features": [ | ||
{ | ||
"title": "image-card-faqs Feature", | ||
"description": "The feature that activates elements of the image-card-faqs solution.", | ||
"id": "51d10fc8-ba95-4035-86ae-d1218a439384", | ||
"version": "1.0.0.0" | ||
} | ||
] | ||
}, | ||
"paths": { | ||
"zippedPackage": "solution/image-card-faqs.sppkg" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json", | ||
"port": 4321, | ||
"https": true, | ||
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx" | ||
} |
4 changes: 4 additions & 0 deletions
4
samples/ImageCard-HTML-React-FAQs/config/write-manifests.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/write-manifests.schema.json", | ||
"cdnBasePath": "<!-- PATH TO CDN -->" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
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(require('gulp')); |
Oops, something went wrong.