-
Notifications
You must be signed in to change notification settings - Fork 836
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1415 from alecwantstobattle/main
- Loading branch information
Showing
30 changed files
with
32,062 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 @@ | ||
v18.19.0 |
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": false, | ||
"isCreatingSolution": true, | ||
"nodeVersion": "18.19.0", | ||
"sdksVersions": { | ||
"@microsoft/microsoft-graph-client": "3.0.2", | ||
"@microsoft/teams-js": "2.12.0" | ||
}, | ||
"version": "1.18.2", | ||
"libraryName": "share-point-quick-create", | ||
"libraryId": "01f93abc-4538-4f31-b25f-4c0b26d3aba8", | ||
"environment": "spo", | ||
"packageManager": "npm", | ||
"solutionName": "SharePoint Quick Create", | ||
"solutionShortDescription": "SharePoint Quick Create description", | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"componentType": "extension", | ||
"extensionType": "ApplicationCustomizer" | ||
} | ||
} |
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,129 @@ | ||
# Application Customizer Quick Create | ||
|
||
## Summary | ||
|
||
SharePoint Framework Application Customizer that injects a button to the command bar which shows all the lists in the site and have the ability to quickly create an item by showing the NewForm.aspx inside a panel. Inspired by Quick Create functionality by popular CRMs. | ||
|
||
![Quick create demo in a site](assets/QuickCreateDemo.gif) | ||
|
||
|
||
## Compatibility | ||
|
||
![SPFx 1.18.2](https://img.shields.io/badge/SPFx-1.18.2-green.svg) | ||
![Node.js v16 | v118](https://img.shields.io/badge/Node.js-v16%20%7C%20v18-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") | ||
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above") | ||
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg "Does work with hosted workbench") | ||
|
||
## Applies to | ||
|
||
* [SharePoint Framework](https://docs.microsoft.com/sharepoint/dev/spfx/sharepoint-framework-overview) | ||
* [Microsoft 365 tenant](https://docs.microsoft.com/sharepoint/dev/spfx/set-up-your-developer-tenant) | ||
|
||
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/m365devprogram) | ||
## Contributors | ||
<!-- | ||
We use this section to recognize and promote your contributions. Please provide one author per line -- even if you worked together on it. | ||
We'll only use the info you provided here. Make sure to include your full name, not just your GitHub username. | ||
Provide a link to your GitHub profile to help others find more cool things you have done. | ||
If you provide a link to your Twitter profile, we'll promote your contribution on social media. | ||
If you do not update this information, you will not be listed 😞 | ||
--> | ||
|
||
* [Alec Tecson](https://github.com/alecwantstobattle) | ||
|
||
## Version history | ||
|
||
Version|Date|Comments | ||
-------|----|-------- | ||
1.0|September 30, 2024|Initial release | ||
|
||
|
||
|
||
## Minimal Path to Awesome | ||
|
||
<!-- | ||
PRO TIP: | ||
For commands, use the `code syntax` | ||
For button labels, page names, dialog names, etc. as they appear on the screen, use **Bold** | ||
Don't use "click", use "select" or "use" | ||
As tempting as it may be, don't just use images to describe the steps. Let's be as inclusive as possible and think about accessibility. | ||
--> | ||
|
||
* Clone this repository (or [download this solution as a .ZIP file](https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-application-quick-create) then unzip it) | ||
* in the command line run: | ||
* `npm install` | ||
* `gulp serve` | ||
* In a web browser | ||
* Choose **Load Debug Scripts** when prompted | ||
|
||
|
||
## Features | ||
|
||
This extension illustrates the following concepts: | ||
|
||
* React functional components & hooks | ||
* PnPjs usage in the solution | ||
* Fluent UI React CommandButton and Panel components | ||
* Styling components using `module.scss` and `styles.ts` | ||
|
||
## Debug URL for testing | ||
|
||
Here's a debug URL for testing around this sample. | ||
|
||
``` | ||
?debugManifestsFile=https://localhost:4321/temp/manifests.js&loadSPFX=true&customActions={"029cc025-df6a-415b-9a05-988e1710992b":{"location":"ClientSideExtension.ApplicationCustomizer"}} | ||
``` | ||
|
||
|
||
## 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.** | ||
|
||
## Help | ||
|
||
<!-- | ||
You can just search and replace this page with the following values: | ||
Search for: | ||
YOUR-SOLUTION-NAME | ||
Replace with your sample folder name. E.g.: react-my-cool-sample | ||
Search for: | ||
@YOURGITHUBUSERNAME | ||
Replace with your GitHub username, prefixed with an "@". If you have more than one author, use %20 to separate them, making sure to prefix everyone's username individually with an "@". | ||
Example: | ||
@hugoabernier | ||
Or: | ||
@hugoabernier%20@VesaJuvonen%20@PopWarner | ||
--> | ||
|
||
We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues. | ||
|
||
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-extensions/issues?q=label%3AYOUR-SOLUTION-NAME) to see if anybody else is having the same issues. | ||
|
||
You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-extensions/discussions?discussions_q=label%3AYOUR-SOLUTION-NAME) and see what the community is saying. | ||
|
||
If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=YOUR-SOLUTION-NAME&authors=@YOURGITHUBUSERNAME&title=YOUR-SOLUTION-NAME%20-%20). | ||
|
||
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=YOUR-SOLUTION-NAME&authors=@YOURGITHUBUSERNAME&title=YOUR-SOLUTION-NAME%20-%20). | ||
|
||
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-extensions/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=YOUR-SOLUTION-NAME&authors=@YOURGITHUBUSERNAME&title=YOUR-SOLUTION-NAME%20-%20). | ||
|
||
<img src="https://m365-visitor-stats.azurewebsites.net/sp-dev-fx-extensions/samples/YOUR-SOLUTION-NAME" /> |
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,58 @@ | ||
[ | ||
{ | ||
"name": "pnp-sp-dev-spfx-extensions-react-application-quick-create", | ||
"source": "pnp", | ||
"title": "Application Customizer Quick Create", | ||
"shortDescription": "Injects a button to the command bar which shows all the lists in the site and have the ability to quickly create an item by showing the NewForm.aspx inside a panel.", | ||
"url": "https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-application-quick-create", | ||
"longDescription": [ | ||
"SharePoint Framework Application Customizer that injects a button to the command bar which shows all the lists in the site and have the ability to quickly create an item by showing the NewForm.aspx inside a panel. Inspired by Quick Create functionality by popular CRMs." | ||
], | ||
"creationDateTime": "2023-12-25", | ||
"updateDateTime": "2024-09-30", | ||
"products": [ | ||
"SharePoint" | ||
], | ||
"metadata": [ | ||
{ | ||
"key": "CLIENT-SIDE-DEV", | ||
"value": "React" | ||
}, | ||
{ | ||
"key": "SPFX-VERSION", | ||
"value": "1.18.2" | ||
} | ||
], | ||
"tags": [], | ||
"categories": [ | ||
"SPFX-APPLICATION-EXTENSION" | ||
], | ||
"thumbnails": [ | ||
{ | ||
"type": "image", | ||
"order": 100, | ||
"url": "https://github.com/pnp/sp-dev-fx-extensions/raw/main/samples/react-application-quick-create/assets/QuickCreateDemo.gif", | ||
"alt": "Preview" | ||
} | ||
], | ||
"authors": [ | ||
{ | ||
"gitHubAccount": "alecwantstobattle", | ||
"pictureUrl": "https://github.com/alecwantstobattle.png", | ||
"name": "Alec Tecson" | ||
} | ||
], | ||
"references": [ | ||
{ | ||
"name": "Overview of SharePoint Framework Extensions", | ||
"description": "You can use SharePoint Framework (SPFx) Extensions to extend the SharePoint user experience. With SPFx Extensions, you can customize more facets of the SharePoint experience, including notification areas, toolbars, and list data views. SPFx Extensions are available in all Microsoft 365 subscriptions for production usage.", | ||
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/extensions/overview-extensions?WT.mc_id=m365-15741-cxa" | ||
}, | ||
{ | ||
"name": "Use page placeholders from Application Customizer", | ||
"description": "Application Customizers provide access to well-known locations on SharePoint pages that you can modify based on your business and functional requirements. For example, you can create dynamic header and footer experiences that render across all the pages in SharePoint Online.", | ||
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions?WT.mc_id=m365-15741-cxa" | ||
} | ||
] | ||
} | ||
] |
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": { | ||
"quick-create-application-customizer": { | ||
"components": [ | ||
{ | ||
"entrypoint": "./lib/extensions/quickCreate/QuickCreateApplicationCustomizer.js", | ||
"manifest": "./src/extensions/quickCreate/QuickCreateApplicationCustomizer.manifest.json" | ||
} | ||
] | ||
} | ||
}, | ||
"externals": {}, | ||
"localizedResources": { | ||
"QuickCreateApplicationCustomizerStrings": "lib/extensions/quickCreate/loc/{locale}.js" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
samples/react-application-quick-create/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": "share-point-quick-create", | ||
"accessKey": "<!-- ACCESS KEY -->" | ||
} |
46 changes: 46 additions & 0 deletions
46
samples/react-application-quick-create/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,46 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", | ||
"solution": { | ||
"name": "sharepoint-quick-create-client-side-solution", | ||
"id": "01f93abc-4538-4f31-b25f-4c0b26d3aba8", | ||
"version": "1.0.0.0", | ||
"includeClientSideAssets": true, | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"developer": { | ||
"name": "", | ||
"websiteUrl": "", | ||
"privacyUrl": "", | ||
"termsOfUseUrl": "", | ||
"mpnId": "Undefined-1.18.2" | ||
}, | ||
"metadata": { | ||
"shortDescription": { | ||
"default": "SharePoint Framework Application Customizer to quickly create list items." | ||
}, | ||
"longDescription": { | ||
"default": "SharePoint Framework Application Customizer that injects a button to the command bar which shows all the lists in the site and have the ability to quickly create an item by showing the NewForm.aspx inside a panel. Inspired by Quick Create functionality by popular CRMs." | ||
}, | ||
"screenshotPaths": [], | ||
"videoUrl": "", | ||
"categories": [] | ||
}, | ||
"features": [ | ||
{ | ||
"title": "Application Extension - Deployment of custom action", | ||
"description": "Deploys a custom action with ClientSideComponentId association", | ||
"id": "899382b1-958f-4d3b-bf91-66dbb47c5757", | ||
"version": "1.0.0.0", | ||
"assets": { | ||
"elementManifests": [ | ||
"elements.xml", | ||
"ClientSideInstance.xml" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"paths": { | ||
"zippedPackage": "solution/share-point-quick-create.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,25 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json", | ||
"port": 4321, | ||
"https": true, | ||
"serveConfigurations": { | ||
"default": { | ||
"pageUrl": "https://{tenantDomain}/SitePages/myPage.aspx", | ||
"customActions": { | ||
"029cc025-df6a-415b-9a05-988e1710992b": { | ||
"location": "ClientSideExtension.ApplicationCustomizer", | ||
"properties": {} | ||
} | ||
} | ||
}, | ||
"quickCreate": { | ||
"pageUrl": "https://{tenantDomain}/SitePages/myPage.aspx", | ||
"customActions": { | ||
"029cc025-df6a-415b-9a05-988e1710992b": { | ||
"location": "ClientSideExtension.ApplicationCustomizer", | ||
"properties": {} | ||
} | ||
} | ||
} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
samples/react-application-quick-create/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.