Skip to content

Commit

Permalink
Merge pull request #183 from anoopt/main
Browse files Browse the repository at this point in the history
Merge PR #182
  • Loading branch information
anoopt committed Sep 13, 2024
2 parents a18467f + 6d0da6b commit abf6527
Show file tree
Hide file tree
Showing 31 changed files with 29,676 additions and 0 deletions.
352 changes: 352 additions & 0 deletions samples/ChartCard-FilesByContentType/.eslintrc.js

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions samples/ChartCard-FilesByContentType/.gitignore
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
16 changes: 16 additions & 0 deletions samples/ChartCard-FilesByContentType/.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
23 changes: 23 additions & 0 deletions samples/ChartCard-FilesByContentType/.vscode/launch.json
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"
]
}
]
}
14 changes: 14 additions & 0 deletions samples/ChartCard-FilesByContentType/.vscode/settings.json
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"
}
22 changes: 22 additions & 0 deletions samples/ChartCard-FilesByContentType/.yo-rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"@microsoft/generator-sharepoint": {
"plusBeta": true,
"isCreatingSolution": true,
"nodeVersion": "18.18.0",
"sdksVersions": {
"@microsoft/microsoft-graph-client": "3.0.2",
"@microsoft/teams-js": "2.24.0"
},
"version": "1.20.0-beta.0",
"libraryName": "chart-card-files-by-content-type",
"libraryId": "1ac895fb-8ac0-44ce-9b5a-61b9dba15ff4",
"environment": "spo",
"packageManager": "npm",
"solutionName": "chart-card-files-by-content-type",
"solutionShortDescription": "chart-card-files-by-content-type description",
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"componentType": "adaptiveCardExtension",
"aceTemplateType": "DataVisualization"
}
}
75 changes: 75 additions & 0 deletions samples/ChartCard-FilesByContentType/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# ChartCard-FilesByContentType

## Summary

This Adaptive Card Extension displays a pie chart showing documents of a selected document library by content type.

Large view:

![LargeView](./assets/Large.png)

Medium view:

![MediumView](./assets/Medium.png)


## Used SharePoint Framework Version

![version](https://img.shields.io/badge/version-1.20.0--beta.0-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)


## Prerequisites

> `Sites.Read.All` permission to be approved after uploading the package
## Solution

| Solution | Author(s) |
| ----------- | ------------------------------------------------------- |
| ChartCard-FilesByContentType | [Aimery Thomas](https://github.com/a1mery), [@aimery_thomas](https://twitter.com/aimery_thomas) |

## Version history

| Version | Date | Comments |
| ------- | ---------------- | --------------- |
| 1.0 | September 08, 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 bundle --ship**
- **gulp package-solution --ship**
- Deploy the package (chart-card-files-by-content-type.sppkg) to the tenant app catalogue.
- The solution needs following Microsoft Graph API permissions. Approve the API access requests in the SharePoint admin center.

| Permissions |
|---------------------------|
| Sites.Read.All |

- Add the ACE **Files By Content Type** to the Dashboard.

## Features

This sample demonstrate how to use the New Data Visualization Card options for Viva Connections released with SPFx 1.20 beta.

## 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
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.
66 changes: 66 additions & 0 deletions samples/ChartCard-FilesByContentType/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[
{
"name": "pnp-sp-fx-aces-chartcard-filesbycontenttype",
"source": "pnp",
"title": "Chart Card Files By Content Type",
"shortDescription": "This Adaptive Card Extension displays a pie chart showing documents of a selected document library by content type.",
"url": "https://github.com/pnp/sp-dev-fx-aces/tree/main/samples/ChartCard-FilesByContentType",
"longDescription": [
"This Adaptive Card Extension displays a pie chart showing documents of a selected document library by content type. The sample uses the Microsoft Graph API to get the document library items and their content types."
],
"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-beta.0"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ChartCard-FilesByContentType/assets/Large.png",
"alt": "Preview"
},
{
"type": "image",
"order": 100,
"url": "https://raw.githubusercontent.com/pnp/sp-dev-fx-aces/main/samples/ChartCard-FilesByContentType/assets/Medium.png",
"alt": "Preview"
}
],
"authors": [
{
"gitHubAccount": "aimery_thomas",
"pictureUrl": "https://github.com/aimery_thomas.png",
"name": "Aimery Thomas"
}
],
"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"
}
]
}
]
18 changes: 18 additions & 0 deletions samples/ChartCard-FilesByContentType/config/config.json
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": {
"files-by-content-type-adaptive-card-extension": {
"components": [
{
"entrypoint": "./lib/adaptiveCardExtensions/filesByContentType/FilesByContentTypeAdaptiveCardExtension.js",
"manifest": "./src/adaptiveCardExtensions/filesByContentType/FilesByContentTypeAdaptiveCardExtension.manifest.json"
}
]
}
},
"externals": {},
"localizedResources": {
"FilesByContentTypeAdaptiveCardExtensionStrings": "lib/adaptiveCardExtensions/filesByContentType/loc/{locale}.js"
}
}
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": "chart-card-files-by-content-type",
"accessKey": "<!-- ACCESS KEY -->"
}
46 changes: 46 additions & 0 deletions samples/ChartCard-FilesByContentType/config/package-solution.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
"solution": {
"name": "chart-card-files-by-content-type-client-side-solution",
"id": "1ac895fb-8ac0-44ce-9b5a-61b9dba15ff4",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"isDomainIsolated": false,
"webApiPermissionRequests": [
{
"resource": "Microsoft Graph",
"scope": "Sites.Read.All"
}
],
"developer": {
"name": "Aimery Thomas",
"websiteUrl": "https://athsharepoint.com/",
"privacyUrl": "",
"termsOfUseUrl": "",
"mpnId": "Undefined-1.18.0"
},
"metadata": {
"shortDescription": {
"default": "chart-card-files-by-content-type description"
},
"longDescription": {
"default": "chart-card-files-by-content-type description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
},
"features": [
{
"title": "chart-card-files-by-content-type Feature",
"description": "The feature that activates elements of the chart-card-files-by-content-type solution.",
"id": "6384c6ed-85b3-4abf-8604-d0aa88d4e25f",
"version": "1.0.0.0"
}
]
},
"paths": {
"zippedPackage": "solution/chart-card-files-by-content-type.sppkg"
}
}
3 changes: 3 additions & 0 deletions samples/ChartCard-FilesByContentType/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"
}
6 changes: 6 additions & 0 deletions samples/ChartCard-FilesByContentType/config/serve.json
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"
}
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 -->"
}
16 changes: 16 additions & 0 deletions samples/ChartCard-FilesByContentType/gulpfile.js
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'));
Loading

0 comments on commit abf6527

Please sign in to comment.