-
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.
Merge branch 'GenericCard-Graph-UserManager'
- Loading branch information
Showing
77 changed files
with
67,962 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
v18.17.1 |
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,24 @@ | ||
{ | ||
"@microsoft/generator-sharepoint": { | ||
"whichFolder": "subdir", | ||
"solutionName": "UserManager", | ||
"componentType": "adaptiveCardExtension", | ||
"aceTemplateType": "Generic", | ||
"componentName": "UserManager", | ||
"plusBeta": false, | ||
"isCreatingSolution": true, | ||
"nodeVersion": "18.17.1", | ||
"sdksVersions": { | ||
"@microsoft/microsoft-graph-client": "3.0.2", | ||
"@microsoft/teams-js": "2.12.0" | ||
}, | ||
"version": "1.18.2", | ||
"libraryName": "user-manager", | ||
"libraryId": "cde3458c-4caa-4395-80bd-625b1a41e624", | ||
"environment": "spo", | ||
"packageManager": "npm", | ||
"solutionShortDescription": "UserManager description", | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false | ||
} | ||
} |
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,64 @@ | ||
# User Manager ACE | ||
|
||
## Summary | ||
|
||
This Adaptive Card Extension (ACE) shows the manager of the currently logged in user. | ||
|
||
![alt text](assets/Card.png) | ||
![alt text](assets/CardWithoutPicture.png) | ||
![alt text](assets/ErrorCard.png) | ||
|
||
## Used SharePoint Framework Version | ||
|
||
![version](https://img.shields.io/badge/version-1.18.2-green.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) | | ||
| ----------- | ------------------------------------------------------- | | ||
| UserManager | [guidozam](https://github.com/guidozam) | | ||
|
||
## Version history | ||
|
||
| Version | Date | Comments | | ||
| ------- | ---------------- | --------------- | | ||
| 1.0 | March 09, 2024 | Initial commit | | ||
|
||
## 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** | ||
|
||
## Features | ||
|
||
This Adaptive Card Extension (ACE) shows the manager of the currently logged in user. It uses the Microsoft Graph to get the manager of the user and then displays it. | ||
The displayed informations, where available, are: | ||
- display name | ||
- job title | ||
- business phone number | ||
- office location | ||
|
||
If the manager does not have a picture the card will display a default picture. | ||
|
||
If there is a problem getting the manager's information the card will display an error. | ||
|
||
## References | ||
|
||
- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis) |
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,76 @@ | ||
[ | ||
{ | ||
"name": "user-manager", | ||
"source": "pnp", | ||
"title": "User Manager ACE", | ||
"shortDescription": "This Adaptive Card Extension (ACE) shows the manager of the currently logged in user.", | ||
"url": "https://github.com/pnp/sp-dev-fx-aces/tree/main/samples/GenericCard-Graph-UserManager", | ||
"longDescription": [ | ||
"This Adaptive Card Extension (ACE) shows the manager of the currently logged in user. It uses the Microsoft Graph to get the manager of the user and then displays it." | ||
], | ||
"creationDateTime": "2024-03-09", | ||
"updateDateTime": "2024-03-09", | ||
"products": ["SharePoint", "Viva"], | ||
"metadata": [ | ||
{ | ||
"key": "CLIENT-SIDE-DEV", | ||
"value": "React" | ||
}, | ||
{ | ||
"key": "SPFX-VERSION", | ||
"value": "1.18.2" | ||
} | ||
], | ||
"thumbnails": [ | ||
{ | ||
"type": "image", | ||
"order": 100, | ||
"url": "https://raw.github.com/pnp/sp-dev-fx-aces/main/samples/GenericCard-Graph-UserManager/assets/Card.png", | ||
"alt": "Image of the card with all the manager informations" | ||
}, | ||
{ | ||
"type": "image", | ||
"order": 200, | ||
"url": "https://raw.github.com/pnp/sp-dev-fx-aces/main/samples/GenericCard-Graph-UserManager/assets/CardWithoutPicture.png", | ||
"alt": "Image of the card with some informations and no picture" | ||
}, | ||
{ | ||
"type": "image", | ||
"order": 300, | ||
"url": "https://raw.github.com/pnp/sp-dev-fx-aces/main/samples/GenericCard-Graph-UserManager/assets/ErrorCard.png", | ||
"alt": "Image of the card when an error occurs" | ||
} | ||
], | ||
"authors": [ | ||
{ | ||
"gitHubAccount": "GuidoZam", | ||
"company": "PiaSys.com", | ||
"pictureUrl": "https://github.com/guidozam.png", | ||
"name": "Guido Zambarda", | ||
"twitter": "iamguidozam" | ||
} | ||
], | ||
"references": [ | ||
{ | ||
"name": "Getting started with SharePoint Framework", | ||
"description": "Learn how to start developing SharePoint Framework solutions.", | ||
"url": "https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant" | ||
}, | ||
{ | ||
"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": "Designing Viva Connections custom cards for your dashboard", | ||
"description": "Official guidelines about how to design the Card Views of a SharePoint Framework Adaptive Card Extension (ACE).", | ||
"url": "https://learn.microsoft.com/en-us/sharepoint/dev/spfx/viva/design/designing-card" | ||
}, | ||
{ | ||
"name": "Microsoft 365 Patterns and Practices", | ||
"description": "Guidance, tooling, samples and open-source controls for your Microsoft 365 development.", | ||
"url": "https://aka.ms/m365pnp" | ||
} | ||
] | ||
} | ||
] |
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,18 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/config.2.0.schema.json", | ||
"version": "2.0", | ||
"bundles": { | ||
"user-manager-adaptive-card-extension": { | ||
"components": [ | ||
{ | ||
"entrypoint": "./lib/adaptiveCardExtensions/userManager/UserManagerAdaptiveCardExtension.js", | ||
"manifest": "./src/adaptiveCardExtensions/userManager/UserManagerAdaptiveCardExtension.manifest.json" | ||
} | ||
] | ||
} | ||
}, | ||
"externals": {}, | ||
"localizedResources": { | ||
"UserManagerAdaptiveCardExtensionStrings": "lib/adaptiveCardExtensions/userManager/loc/{locale}.js" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
samples/GenericCard-Graph-UserManager/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": "user-manager", | ||
"accessKey": "<!-- ACCESS KEY -->" | ||
} |
40 changes: 40 additions & 0 deletions
40
samples/GenericCard-Graph-UserManager/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": "user-manager-client-side-solution", | ||
"id": "cde3458c-4caa-4395-80bd-625b1a41e624", | ||
"version": "1.0.0.0", | ||
"includeClientSideAssets": true, | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"developer": { | ||
"name": "", | ||
"websiteUrl": "", | ||
"privacyUrl": "", | ||
"termsOfUseUrl": "", | ||
"mpnId": "Undefined-1.18.2" | ||
}, | ||
"metadata": { | ||
"shortDescription": { | ||
"default": "UserManager description" | ||
}, | ||
"longDescription": { | ||
"default": "UserManager description" | ||
}, | ||
"screenshotPaths": [], | ||
"videoUrl": "", | ||
"categories": [] | ||
}, | ||
"features": [ | ||
{ | ||
"title": "user-manager Feature", | ||
"description": "The feature that activates elements of the user-manager solution.", | ||
"id": "7962e482-e693-4ba3-8c58-0f643eb3643f", | ||
"version": "1.0.0.0" | ||
} | ||
] | ||
}, | ||
"paths": { | ||
"zippedPackage": "solution/user-manager.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/GenericCard-Graph-UserManager/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.