diff --git a/samples/react-organization-chart/.eslintrc.json b/samples/react-organisation-chart/.eslintrc.json similarity index 100% rename from samples/react-organization-chart/.eslintrc.json rename to samples/react-organisation-chart/.eslintrc.json diff --git a/samples/react-organization-chart/.gitignore b/samples/react-organisation-chart/.gitignore similarity index 100% rename from samples/react-organization-chart/.gitignore rename to samples/react-organisation-chart/.gitignore diff --git a/samples/react-organization-chart/.yo-rc.json b/samples/react-organisation-chart/.yo-rc.json similarity index 100% rename from samples/react-organization-chart/.yo-rc.json rename to samples/react-organisation-chart/.yo-rc.json diff --git a/samples/react-organisation-chart/README.md b/samples/react-organisation-chart/README.md new file mode 100644 index 000000000..fff01b3a7 --- /dev/null +++ b/samples/react-organisation-chart/README.md @@ -0,0 +1,62 @@ +# react-organisation-chart + +## Summary + +This WebPart Show Organisation Chart based on specified user, and user can navigate to show company organisation, this Web Part can be installed on SharePoint Server 2019, + + +![Organisation Chart](./assets/orgchart_02.jpg) + +![Organisation Chart](./assets/orgchart_01.jpg) + +![Organisation Chart](./assets/orgchart.gif) + +## Used SharePoint Framework Version + +![version](https://img.shields.io/badge/version-1.4.1-green.svg) + +## Applies to + +- [SharePoint Framework](https://aka.ms/spfx) + + +## Prerequisites + +> Any special pre-requisites? + +## Solution + +Solution|Author(s) +--------|--------- +react-organisation-chart |João Mendes, Storm Technolog, twwiter @joaojmendes + +## Version history + +Version|Date|Comments +-------|----|-------- +1.0|May, 2021|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** + +> Include any additional steps as needed. + +## Features + +This WebPart show how to use PnPjs, Office-ui-fabric-react to create a Organisation Chart + +This extension illustrates the following concepts: + + + \ No newline at end of file diff --git a/samples/react-organisation-chart/assets/orgchart.gif b/samples/react-organisation-chart/assets/orgchart.gif new file mode 100644 index 000000000..ef6dadaa2 Binary files /dev/null and b/samples/react-organisation-chart/assets/orgchart.gif differ diff --git a/samples/react-organisation-chart/assets/orgchart_01.jpg b/samples/react-organisation-chart/assets/orgchart_01.jpg new file mode 100644 index 000000000..574740e9c Binary files /dev/null and b/samples/react-organisation-chart/assets/orgchart_01.jpg differ diff --git a/samples/react-organisation-chart/assets/orgchart_02.jpg b/samples/react-organisation-chart/assets/orgchart_02.jpg new file mode 100644 index 000000000..6cea772f8 Binary files /dev/null and b/samples/react-organisation-chart/assets/orgchart_02.jpg differ diff --git a/samples/react-organization-chart/config/config.json b/samples/react-organisation-chart/config/config.json similarity index 100% rename from samples/react-organization-chart/config/config.json rename to samples/react-organisation-chart/config/config.json diff --git a/samples/react-organization-chart/config/copy-assets.json b/samples/react-organisation-chart/config/copy-assets.json similarity index 100% rename from samples/react-organization-chart/config/copy-assets.json rename to samples/react-organisation-chart/config/copy-assets.json diff --git a/samples/react-organization-chart/config/deploy-azure-storage.json b/samples/react-organisation-chart/config/deploy-azure-storage.json similarity index 100% rename from samples/react-organization-chart/config/deploy-azure-storage.json rename to samples/react-organisation-chart/config/deploy-azure-storage.json diff --git a/samples/react-organization-chart/config/package-solution.json b/samples/react-organisation-chart/config/package-solution.json similarity index 100% rename from samples/react-organization-chart/config/package-solution.json rename to samples/react-organisation-chart/config/package-solution.json diff --git a/samples/react-organization-chart/config/serve.json b/samples/react-organisation-chart/config/serve.json similarity index 100% rename from samples/react-organization-chart/config/serve.json rename to samples/react-organisation-chart/config/serve.json diff --git a/samples/react-organization-chart/config/write-manifests.json b/samples/react-organisation-chart/config/write-manifests.json similarity index 100% rename from samples/react-organization-chart/config/write-manifests.json rename to samples/react-organisation-chart/config/write-manifests.json diff --git a/samples/react-organization-chart/gulpfile.js b/samples/react-organisation-chart/gulpfile.js similarity index 79% rename from samples/react-organization-chart/gulpfile.js rename to samples/react-organisation-chart/gulpfile.js index b655e8278..14ccb3187 100644 --- a/samples/react-organization-chart/gulpfile.js +++ b/samples/react-organisation-chart/gulpfile.js @@ -11,13 +11,9 @@ build.addSuppression(/Warning - \[sass\] The local CSS class .* is not camelCase const typeScriptConfig = require('@microsoft/gulp-core-build-typescript/lib/TypeScriptConfiguration'); typeScriptConfig.TypeScriptConfiguration.setTypescriptCompiler(require('typescript')); - - - +// disable tslint build.tslint.enabled = false; - - const eslint = require('gulp-eslint'); const eslintSubTask = build.subTask('eslint', function (gulp, buildOptions, done) { @@ -34,25 +30,6 @@ const eslintSubTask = build.subTask('eslint', function (gulp, buildOptions, done }); build.rig.addPreBuildTask(build.task('eslint-task', eslintSubTask)); - -/* build.configureWebpack.setConfig({ - additionalConfiguration: function (config) { - let newConfig = config; - config.plugins.forEach((plugin, i) => { - if (plugin.options && plugin.options.mangle) { - config.plugins.splice(i, 1); - newConfig = merge(config, { - plugins: [ - new TerserPlugin() - ] - }); - } - }); - - return newConfig; - } -}); */ - // force use of projects specified react version build.configureWebpack.mergeConfig({ @@ -60,9 +37,6 @@ build.configureWebpack.mergeConfig({ // force use of projects specified react version generatedConfiguration.externals = generatedConfiguration.externals .filter(name => !(["react", "react-dom"].includes(name))); - /* generatedConfiguration.externals = generatedConfiguration.externals - .filter(name => !(["@fluentui/react"].includes(name))); */ - // force use TerserPlugIn (remove UglifyJs) generatedConfiguration.plugins.forEach((plugin, i) => { if (plugin.options && plugin.options.mangle) { @@ -77,7 +51,6 @@ build.configureWebpack.mergeConfig({ }); return generatedConfiguration; } - }); diff --git a/samples/react-organization-chart/package-lock.json b/samples/react-organisation-chart/package-lock.json similarity index 100% rename from samples/react-organization-chart/package-lock.json rename to samples/react-organisation-chart/package-lock.json diff --git a/samples/react-organization-chart/package.json b/samples/react-organisation-chart/package.json similarity index 100% rename from samples/react-organization-chart/package.json rename to samples/react-organisation-chart/package.json diff --git a/samples/react-organization-chart/src/common/Utils.ts b/samples/react-organisation-chart/src/common/Utils.ts similarity index 100% rename from samples/react-organization-chart/src/common/Utils.ts rename to samples/react-organisation-chart/src/common/Utils.ts diff --git a/samples/react-organization-chart/src/components/HoverCard/CompactCard.tsx b/samples/react-organisation-chart/src/components/HoverCard/CompactCard.tsx similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/CompactCard.tsx rename to samples/react-organisation-chart/src/components/HoverCard/CompactCard.tsx diff --git a/samples/react-organization-chart/src/components/HoverCard/ExpandedCard.tsx b/samples/react-organisation-chart/src/components/HoverCard/ExpandedCard.tsx similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/ExpandedCard.tsx rename to samples/react-organisation-chart/src/components/HoverCard/ExpandedCard.tsx diff --git a/samples/react-organization-chart/src/components/HoverCard/ICompactCardProps.ts b/samples/react-organisation-chart/src/components/HoverCard/ICompactCardProps.ts similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/ICompactCardProps.ts rename to samples/react-organisation-chart/src/components/HoverCard/ICompactCardProps.ts diff --git a/samples/react-organization-chart/src/components/HoverCard/IExpandedCardProps.ts b/samples/react-organisation-chart/src/components/HoverCard/IExpandedCardProps.ts similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/IExpandedCardProps.ts rename to samples/react-organisation-chart/src/components/HoverCard/IExpandedCardProps.ts diff --git a/samples/react-organization-chart/src/components/HoverCard/index.ts b/samples/react-organisation-chart/src/components/HoverCard/index.ts similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/index.ts rename to samples/react-organisation-chart/src/components/HoverCard/index.ts diff --git a/samples/react-organization-chart/src/components/HoverCard/useHoverCardStyles.ts b/samples/react-organisation-chart/src/components/HoverCard/useHoverCardStyles.ts similarity index 100% rename from samples/react-organization-chart/src/components/HoverCard/useHoverCardStyles.ts rename to samples/react-organisation-chart/src/components/HoverCard/useHoverCardStyles.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/EOrgChartTypes.ts b/samples/react-organisation-chart/src/components/OrgChart/EOrgChartTypes.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/EOrgChartTypes.ts rename to samples/react-organisation-chart/src/components/OrgChart/EOrgChartTypes.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/IOrgChartProps.ts b/samples/react-organisation-chart/src/components/OrgChart/IOrgChartProps.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/IOrgChartProps.ts rename to samples/react-organisation-chart/src/components/OrgChart/IOrgChartProps.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/IOrgChartState.ts b/samples/react-organisation-chart/src/components/OrgChart/IOrgChartState.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/IOrgChartState.ts rename to samples/react-organisation-chart/src/components/OrgChart/IOrgChartState.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/OrgChart.module.scss b/samples/react-organisation-chart/src/components/OrgChart/OrgChart.module.scss similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/OrgChart.module.scss rename to samples/react-organisation-chart/src/components/OrgChart/OrgChart.module.scss diff --git a/samples/react-organization-chart/src/components/OrgChart/OrgChart.tsx b/samples/react-organisation-chart/src/components/OrgChart/OrgChart.tsx similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/OrgChart.tsx rename to samples/react-organisation-chart/src/components/OrgChart/OrgChart.tsx diff --git a/samples/react-organization-chart/src/components/OrgChart/OrgChartReducer.ts b/samples/react-organisation-chart/src/components/OrgChart/OrgChartReducer.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/OrgChartReducer.ts rename to samples/react-organisation-chart/src/components/OrgChart/OrgChartReducer.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/index.ts b/samples/react-organisation-chart/src/components/OrgChart/index.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/index.ts rename to samples/react-organisation-chart/src/components/OrgChart/index.ts diff --git a/samples/react-organization-chart/src/components/OrgChart/useOrgChartStyles.ts b/samples/react-organisation-chart/src/components/OrgChart/useOrgChartStyles.ts similarity index 100% rename from samples/react-organization-chart/src/components/OrgChart/useOrgChartStyles.ts rename to samples/react-organisation-chart/src/components/OrgChart/useOrgChartStyles.ts diff --git a/samples/react-organization-chart/src/components/Person/IPersonProps.ts b/samples/react-organisation-chart/src/components/Person/IPersonProps.ts similarity index 100% rename from samples/react-organization-chart/src/components/Person/IPersonProps.ts rename to samples/react-organisation-chart/src/components/Person/IPersonProps.ts diff --git a/samples/react-organization-chart/src/components/Person/Person.tsx b/samples/react-organisation-chart/src/components/Person/Person.tsx similarity index 100% rename from samples/react-organization-chart/src/components/Person/Person.tsx rename to samples/react-organisation-chart/src/components/Person/Person.tsx diff --git a/samples/react-organization-chart/src/components/PersonCard/IPersonCardProps.ts b/samples/react-organisation-chart/src/components/PersonCard/IPersonCardProps.ts similarity index 100% rename from samples/react-organization-chart/src/components/PersonCard/IPersonCardProps.ts rename to samples/react-organisation-chart/src/components/PersonCard/IPersonCardProps.ts diff --git a/samples/react-organization-chart/src/components/PersonCard/PersonCard.tsx b/samples/react-organisation-chart/src/components/PersonCard/PersonCard.tsx similarity index 100% rename from samples/react-organization-chart/src/components/PersonCard/PersonCard.tsx rename to samples/react-organisation-chart/src/components/PersonCard/PersonCard.tsx diff --git a/samples/react-organization-chart/src/components/PersonCard/index.ts b/samples/react-organisation-chart/src/components/PersonCard/index.ts similarity index 100% rename from samples/react-organization-chart/src/components/PersonCard/index.ts rename to samples/react-organisation-chart/src/components/PersonCard/index.ts diff --git a/samples/react-organization-chart/src/components/PersonCard/usePersonaCardStyles.ts b/samples/react-organisation-chart/src/components/PersonCard/usePersonaCardStyles.ts similarity index 100% rename from samples/react-organization-chart/src/components/PersonCard/usePersonaCardStyles.ts rename to samples/react-organisation-chart/src/components/PersonCard/usePersonaCardStyles.ts diff --git a/samples/react-organization-chart/src/hooks/index.ts b/samples/react-organisation-chart/src/hooks/index.ts similarity index 100% rename from samples/react-organization-chart/src/hooks/index.ts rename to samples/react-organisation-chart/src/hooks/index.ts diff --git a/samples/react-organization-chart/src/hooks/useGetUserProperties.ts b/samples/react-organisation-chart/src/hooks/useGetUserProperties.ts similarity index 100% rename from samples/react-organization-chart/src/hooks/useGetUserProperties.ts rename to samples/react-organisation-chart/src/hooks/useGetUserProperties.ts diff --git a/samples/react-organization-chart/src/index.ts b/samples/react-organisation-chart/src/index.ts similarity index 100% rename from samples/react-organization-chart/src/index.ts rename to samples/react-organisation-chart/src/index.ts diff --git a/samples/react-organization-chart/src/models/IPersonProperties.ts b/samples/react-organisation-chart/src/models/IPersonProperties.ts similarity index 100% rename from samples/react-organization-chart/src/models/IPersonProperties.ts rename to samples/react-organisation-chart/src/models/IPersonProperties.ts diff --git a/samples/react-organization-chart/src/models/IUser.ts b/samples/react-organisation-chart/src/models/IUser.ts similarity index 100% rename from samples/react-organization-chart/src/models/IUser.ts rename to samples/react-organisation-chart/src/models/IUser.ts diff --git a/samples/react-organization-chart/src/models/IUserInfo.ts b/samples/react-organisation-chart/src/models/IUserInfo.ts similarity index 100% rename from samples/react-organization-chart/src/models/IUserInfo.ts rename to samples/react-organisation-chart/src/models/IUserInfo.ts diff --git a/samples/react-organization-chart/src/models/index.ts b/samples/react-organisation-chart/src/models/index.ts similarity index 100% rename from samples/react-organization-chart/src/models/index.ts rename to samples/react-organisation-chart/src/models/index.ts diff --git a/samples/react-organization-chart/src/webparts/organizationChart/OrganizationChartWebPart.manifest.json b/samples/react-organisation-chart/src/webparts/organizationChart/OrganizationChartWebPart.manifest.json similarity index 100% rename from samples/react-organization-chart/src/webparts/organizationChart/OrganizationChartWebPart.manifest.json rename to samples/react-organisation-chart/src/webparts/organizationChart/OrganizationChartWebPart.manifest.json diff --git a/samples/react-organization-chart/src/webparts/organizationChart/OrganizationChartWebPart.ts b/samples/react-organisation-chart/src/webparts/organizationChart/OrganizationChartWebPart.ts similarity index 100% rename from samples/react-organization-chart/src/webparts/organizationChart/OrganizationChartWebPart.ts rename to samples/react-organisation-chart/src/webparts/organizationChart/OrganizationChartWebPart.ts diff --git a/samples/react-organization-chart/src/webparts/organizationChart/loc/en-us.js b/samples/react-organisation-chart/src/webparts/organizationChart/loc/en-us.js similarity index 100% rename from samples/react-organization-chart/src/webparts/organizationChart/loc/en-us.js rename to samples/react-organisation-chart/src/webparts/organizationChart/loc/en-us.js diff --git a/samples/react-organization-chart/src/webparts/organizationChart/loc/mystrings.d.ts b/samples/react-organisation-chart/src/webparts/organizationChart/loc/mystrings.d.ts similarity index 100% rename from samples/react-organization-chart/src/webparts/organizationChart/loc/mystrings.d.ts rename to samples/react-organisation-chart/src/webparts/organizationChart/loc/mystrings.d.ts diff --git a/samples/react-organization-chart/tsconfig.json b/samples/react-organisation-chart/tsconfig.json similarity index 100% rename from samples/react-organization-chart/tsconfig.json rename to samples/react-organisation-chart/tsconfig.json diff --git a/samples/react-organization-chart/README.md b/samples/react-organization-chart/README.md deleted file mode 100644 index b2c134a2b..000000000 --- a/samples/react-organization-chart/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# react-organization-chart - -## Summary - -Short summary on functionality and used technologies. - -[picture of the solution in action, if possible] - -## Used SharePoint Framework Version - -![version](https://img.shields.io/badge/version-1.12-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 - -> Any special pre-requisites? - -## Solution - -Solution|Author(s) ---------|--------- -folder name | Author details (name, company, twitter alias with link) - -## Version history - -Version|Date|Comments --------|----|-------- -1.1|March 10, 2021|Update comment -1.0|January 29, 2021|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** - -> Include any additional steps as needed. - -## Features - -Description of the extension that expands upon high-level summary above. - -This extension illustrates the following concepts: - -- topic 1 -- topic 2 -- topic 3 - -> Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance. - -> Share your web part with others through Microsoft 365 Patterns and Practices program to get visibility and exposure. More details on the community, open-source projects and other activities from http://aka.ms/m365pnp. - -## 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 \ No newline at end of file