-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
38 changed files
with
31,348 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,35 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
|
||
# Dependency directories | ||
node_modules | ||
|
||
# Build generated files | ||
dist | ||
lib | ||
solution | ||
temp | ||
*.sppkg | ||
|
||
# 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 | ||
|
||
# Folders | ||
release |
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,21 @@ | ||
{ | ||
"@microsoft/generator-sharepoint": { | ||
"plusBeta": false, | ||
"isCreatingSolution": true, | ||
"nodeVersion": "14.16.1", | ||
"sdksVersions": { | ||
"@microsoft/microsoft-graph-client": "3.0.2", | ||
"@microsoft/teams-js": "2.9.1" | ||
}, | ||
"version": "1.17.1", | ||
"libraryName": "react-poll", | ||
"libraryId": "cdbf6459-a379-48cd-9b46-1ae0440090a7", | ||
"environment": "spo", | ||
"packageManager": "npm", | ||
"solutionName": "ReactPoll", | ||
"solutionShortDescription": "ReactPoll description", | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"componentType": "webpart" | ||
} | ||
} |
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,108 @@ | ||
|
||
|
||
# React Poll | ||
|
||
|
||
|
||
## Summary | ||
|
||
This web part allow User to add New Poll Questions and their options. End users can submit his/her response to the poll. After Submission, user can see all responses count with Bar chart. | ||
|
||
|
||
![React-Poll](./assets/react-poll.gif) | ||
|
||
**Following are some of the features of this component.** | ||
|
||
- These 2 lists will be provisioned automatically with necessary columns. | ||
- Poll Questions : User can add New poll question and their options. Also, user can set to keep it active or not. | ||
![Poll Questions](./assets/poll-questions.png) | ||
|
||
- Poll Answers: This list will hold all Answers give by End users with his/her email id. | ||
![Poll Answers](./assets/poll-answers.png) | ||
|
||
- Poll response can be viewed via Bar chart. | ||
- Easy to configure. | ||
|
||
|
||
## Used SharePoint Framework Version | ||
|
||
|
||
|
||
![version](https://img.shields.io/badge/version-1.17.1-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) | ||
|
||
|
||
## Prerequisites | ||
|
||
|
||
|
||
- Office 365 subscription with SharePoint Online | ||
- SharePoint Framework [development environment](https://learn.microsoft.com/sharepoint/dev/spfx/set-up-your-development-environment) set up | ||
|
||
## Contributors | ||
|
||
- [Harsh Bhavsar](https://github.com/Harsh24491) | ||
|
||
|
||
|
||
|
||
## Version history | ||
|
||
|
||
|
||
| Version | Date | Comments | | ||
|
||
| ------- | ---------------- | --------------- | | ||
|
||
| 1.0 | March 02, 2024 | Initial release | | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
## Minimal Path to Awesome | ||
|
||
|
||
- 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-webparts/tree/main/samples/react-poll) then unzip it) | ||
- From your command line, change your current directory to the directory containing this sample (`react-poll`, located under `samples`)* in the command line run: | ||
- `npm install` | ||
- `gulp serve` | ||
|
||
> This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit [https://aka.ms/spfx-devcontainer](https://aka.ms/spfx-devcontainer) for further instructions. | ||
|
||
## Help | ||
|
||
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. | ||
|
||
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment. | ||
|
||
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-pages-hierarchy%22) 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-webparts/discussions?discussions_q=react-pages-hierarchy) 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-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-pages-hierarchy&template=bug-report.yml&sample=react-pages-hierarchy&authors=@bogeorge&title=react-pages-hierarchy%20-%20). | ||
|
||
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-pages-hierarchy&template=question.yml&sample=react-pages-hierarchy&authors=@bogeorge&title=react-pages-hierarchy%20-%20). | ||
|
||
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-pages-hierarchy&template=question.yml&sample=react-pages-hierarchy&authors=@bogeorge&title=react-pages-hierarchy%20-%20). | ||
|
||
## [](https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-pages-hierarchy#disclaimer)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.** |
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": { | ||
"react-poll-web-part": { | ||
"components": [ | ||
{ | ||
"entrypoint": "./lib/webparts/reactPoll/ReactPollWebPart.js", | ||
"manifest": "./src/webparts/reactPoll/ReactPollWebPart.manifest.json" | ||
} | ||
] | ||
} | ||
}, | ||
"externals": {}, | ||
"localizedResources": { | ||
"ReactPollWebPartStrings": "lib/webparts/reactPoll/loc/{locale}.js", | ||
"ControlStrings": "node_modules/@pnp/spfx-controls-react/lib/loc/{locale}.js" | ||
} | ||
} |
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": "react-poll", | ||
"accessKey": "<!-- ACCESS KEY -->" | ||
} |
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,49 @@ | ||
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", | ||
"solution": { | ||
"name": "react-poll-client-side-solution", | ||
"id": "cdbf6459-a379-48cd-9b46-1ae0440090a7", | ||
"version": "1.0.0.0", | ||
"includeClientSideAssets": true, | ||
"skipFeatureDeployment": true, | ||
"isDomainIsolated": false, | ||
"developer": { | ||
"name": "", | ||
"websiteUrl": "", | ||
"privacyUrl": "", | ||
"termsOfUseUrl": "", | ||
"mpnId": "Undefined-1.17.1" | ||
}, | ||
"metadata": { | ||
"shortDescription": { | ||
"default": "ReactPoll description" | ||
}, | ||
"longDescription": { | ||
"default": "ReactPoll description" | ||
}, | ||
"screenshotPaths": [], | ||
"videoUrl": "", | ||
"categories": [] | ||
}, | ||
"features": [ | ||
{ | ||
"title": "react-poll Feature", | ||
"description": "The feature that activates elements of the react-poll solution.", | ||
"id": "f8f96128-e5f1-4f79-8bc1-2480bc29742d", | ||
"version": "1.0.0.0", | ||
"assets": { | ||
"elementManifests": [ | ||
"elements.xml" | ||
], | ||
"elementFiles":[ | ||
"schema.xml", | ||
"PollQuestionsSchema.xml" | ||
] | ||
} | ||
} | ||
] | ||
}, | ||
"paths": { | ||
"zippedPackage": "solution/react-poll.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" | ||
} |
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,6 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/s-KaiNet/spfx-fast-serve/master/schema/config.latest.schema.json", | ||
"cli": { | ||
"isLibraryComponent": 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,24 @@ | ||
/* | ||
* User webpack settings file. You can add your own settings here. | ||
* Changes from this file will be merged into the base webpack configuration file. | ||
* This file will not be overwritten by the subsequent spfx-fast-serve calls. | ||
*/ | ||
|
||
// you can add your project related webpack configuration here, it will be merged using webpack-merge module | ||
// i.e. plugins: [new webpack.Plugin()] | ||
const webpackConfig = { | ||
|
||
} | ||
|
||
// for even more fine-grained control, you can apply custom webpack settings using below function | ||
const transformConfig = function (initialWebpackConfig) { | ||
// transform the initial webpack config here, i.e. | ||
// initialWebpackConfig.plugins.push(new webpack.Plugin()); etc. | ||
|
||
return initialWebpackConfig; | ||
} | ||
|
||
module.exports = { | ||
webpackConfig, | ||
transformConfig | ||
} |
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 @@ | ||
'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.`); | ||
build.addSuppression(/Warning - \[sass\] The local CSS class/gi); | ||
|
||
|
||
var getTasks = build.rig.getTasks; | ||
build.rig.getTasks = function () { | ||
var result = getTasks.call(build.rig); | ||
|
||
result.set('serve', result.get('serve-deprecated')); | ||
|
||
return result; | ||
}; | ||
|
||
/* fast-serve */ | ||
const { addFastServe } = require("spfx-fast-serve-helpers"); | ||
addFastServe(build); | ||
/* end of fast-serve */ | ||
|
||
build.initialize(require('gulp')); | ||
|
Oops, something went wrong.