Skip to content

Commit a0d65f4

Browse files
committed
Merge branch 'release/1.0.0.0'
2 parents e5dcfe4 + 63187c9 commit a0d65f4

27 files changed

Lines changed: 1374 additions & 242 deletions

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"version": "0.2.0",
77
"configurations": [{
88
"name": "Local workbench",
9-
"type": "chrome",
9+
"type": "edge",
1010
"request": "launch",
1111
"url": "https://localhost:4321/temp/workbench.html",
1212
"webRoot": "${workspaceRoot}",
@@ -23,7 +23,7 @@
2323
},
2424
{
2525
"name": "Hosted workbench",
26-
"type": "chrome",
26+
"type": "edge",
2727
"request": "launch",
2828
"url": "https://enter-your-SharePoint-site/_layouts/workbench.aspx",
2929
"webRoot": "${workspaceRoot}",

README.md

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,87 @@
1-
# image-slider
2-
1+
# Image Slider
2+
![GitHub Release Date](https://img.shields.io/github/release-date/fagansc/spfxImageSlider)
3+
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/fagansc/spfxImageSlider?include_prereleases)
4+
[![Build Status](https://dev.azure.com/scfagan/pipelineBuilds/_apis/build/status/spfx/ImageSlider?repoName=FaganSC%2FspfxImageSlider&branchName=master)](https://dev.azure.com/scfagan/pipelineBuilds/_build/latest?definitionId=19&repoName=FaganSC%2FspfxImageSlider&branchName=master)
5+
![SPFX Version](https://img.shields.io/badge/SPFX%20Version-1.11-green.svg)
6+
![GitHub issues](https://img.shields.io/github/issues/fagansc/spfxImageSlider)
7+
![GitHub all releases](https://img.shields.io/github/downloads/fagansc/spfxImageSlider/total)
38
## Summary
9+
This a SharePoint Online modern web part of an image slider, which cycles images from a Document Libray as a slideshow. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators.
410

5-
Short summary on functionality and used technologies.
6-
7-
[picture of the solution in action, if possible]
8-
9-
## Used SharePoint Framework Version
11+
The supporting Document Library is deployed when the solution is added to the site.
1012

11-
![version](https://img.shields.io/badge/version-1.11-green.svg)
13+
![Screenshot](documentation/screenshot.gif)
1214

1315
## Applies to
1416

1517
- [SharePoint Framework](https://aka.ms/spfx)
1618
- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant)
1719

18-
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram)
19-
20-
## Prerequisites
21-
22-
> Any special pre-requisites?
23-
20+
### 3rd Party Packages
21+
* [PnPjs](https://pnp.github.io/pnpjs/)
22+
* [PnP Controls React](https://pnp.github.io/sp-dev-fx-controls-react/)
23+
* [PnP Property Controls](https://pnp.github.io/sp-dev-fx-property-controls/)
24+
* [Moment.js](https://momentjs.com/)
25+
26+
## Office 365 CDN
27+
The Office 365 CDN is used by default for downloading generic resource assets like the Office 365 client applications from a public origin.
28+
29+
This image slide supports the use of the Office 365 CDN by enabling the document library deployed with the soluiton by the following PowerShell commands.
30+
~~~powershell
31+
Connect-SPOService https://<tenant>-admin.sharepoint.com
32+
Set-SPOTenantCdnEnabled -CdnType Both -Enable $true
33+
Add-SPOTenantCdnOrigin -CdnType Public -OriginUrl */SliderImgs
34+
~~~
35+
![PowerShell Output](/documentation/powershell.png)
36+
Once enabled, just toggle the setting within the Web Part properties to utilize the Office 365 CDN to display your images.
2437
## Solution
2538

2639
Solution|Author(s)
2740
--------|---------
28-
folder name | Author details (name, company, twitter alias with link)
41+
SPFX Image Slider | [Shawn Fagan](https://twitter.com/fagansc)
2942

30-
## Version history
43+
## Version History
3144

3245
Version|Date|Comments
3346
-------|----|--------
34-
1.1|March 10, 2021|Update comment
35-
1.0|January 29, 2021|Initial release
36-
37-
## Disclaimer
38-
39-
**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.**
40-
41-
---
47+
1.0.0.0|January 24, 2021|Initial release
4248

43-
## Minimal Path to Awesome
49+
## Current Features
50+
### Image Size
4451

45-
- Clone this repository
46-
- Ensure that you are at the solution folder
47-
- in the command-line run:
48-
- **npm install**
49-
- **gulp serve**
52+
### Slide Speed
53+
### Display Image Filter
5054

51-
> Include any additional steps as needed.
55+
### Display Slide Caption
5256

53-
## Features
57+
### Display Slide Indicators
5458

55-
Description of the extension that expands upon high-level summary above.
59+
### Render Images using Office 365 Public CDN
5660

57-
This extension illustrates the following concepts:
61+
### Select Default Image
5862

59-
- topic 1
60-
- topic 2
61-
- topic 3
63+
## Future Features
64+
- Multplie Layout Options
65+
- Configurable Caption Settings
66+
- Configurable Indicators Settings
67+
- Use of Office 365 Private CDN
68+
- SharePoint Online Theme integration
69+
- Controlling required Document Library fields based on Image Filter
6270

63-
> Notice that better pictures and documentation will increase the sample usage and the value you are providing for others. Thanks for your submissions advance.
64-
65-
> 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.
71+
## License
72+
Connect-MS365 is licensed under terms of GNU Lesser General Publice License (LGPL) v3.0. For further information see LICENSE file.
6673

74+
## Contribute
75+
Please feel free to comment, feedback and contribute to this. I'm still working on the GitHub setup for handling External Pull Requests.
6776
## References
6877

6978
- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant)
7079
- [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview)
7180
- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis)
7281
- [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview)
7382
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development
83+
84+
---
85+
## Disclaimer
86+
87+
**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.**

azure-pipelines.yml

Lines changed: 50 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@ trigger:
22
branches:
33
include:
44
- develop
5+
- release/*
6+
- master
57
resources:
68
repositories:
79
- repository: azure-pipelines-templates
810
type: github
9-
endpoint: FaganSC-GitHub
11+
endpoint: FaganSC
1012
name: FaganSC/azure-pipelines-templates
1113
ref: master
1214
variables:
1315
node_version: '10.x'
1416
package_manager: 'npm'
15-
name: $(Date:yyyy)$(Date:.MM)$(Date:.dd)$(Rev:.r)
17+
majorminor: '0.2.0'
18+
patch: $[counter(${{ variables.majorminor }}, 0)]
19+
version: $(majorminor).$(patch)
20+
name: ${{ variables.version }}
1621
stages:
1722
- stage: Build
18-
dependsOn: []
1923
jobs:
2024
- template: spfx/build.yml@azure-pipelines-templates
21-
parameters:
22-
working_directory:
23-
package_manager: ${{ variables.package_manager }}
24-
node_version: ${{ variables.node_version }}
2525
- stage: Test
2626
dependsOn:
2727
- Build
@@ -34,26 +34,61 @@ stages:
3434
- stage: GitHubPreRelease
3535
displayName: GitHub PreRelease
3636
dependsOn:
37-
- Build
3837
- Test
3938
jobs:
4039
- template: spfx/release.yml@azure-pipelines-templates
4140
parameters:
4241
release_title: 'Pre-Release $(Build.BuildNumber)'
43-
target_environment: release
44-
variables_group: GitHub_Projects
45-
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
42+
target_environment: PreRelease
43+
gitHubConnection: GitHub
44+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))
4645
isPreRelease: True
4746
- stage: GitHubRelease
4847
displayName: GitHub Release
4948
dependsOn:
50-
- Build
5149
- Test
5250
jobs:
5351
- template: spfx/release.yml@azure-pipelines-templates
5452
parameters:
5553
release_title: 'Release $(Build.BuildNumber)'
56-
target_environment: production
57-
variables_group: GitHub_Projects
54+
target_environment: Production
55+
gitHubConnection: GitHub
56+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
57+
isPreRelease: False
58+
- stage: DeployDevelopment
59+
displayName: Deploy to Development Tenant SharePoint App Catalog
60+
dependsOn:
61+
- Test
62+
jobs:
63+
- template: spfx/deploy.yml@azure-pipelines-templates
64+
parameters:
65+
target_environment: Development
66+
variables_group: DevelopmentTenant
67+
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
68+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))
69+
- stage: DeployPreRelease
70+
displayName: Deploy to Test Tenant SharePoint App Catalog
71+
dependsOn:
72+
- GitHubPreRelease
73+
jobs:
74+
- template: spfx/deploy.yml@azure-pipelines-templates
75+
parameters:
76+
target_environment: PreRelease
77+
isPreRelease: True
78+
hasChangeLog: True
79+
variables_group: DevelopmentTenant
80+
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
81+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release'))
82+
- stage: DeployProduction
83+
displayName: Deploy to Production Tenant SharePoint App Catalog
84+
dependsOn:
85+
- GitHubRelease
86+
jobs:
87+
- template: spfx/deploy.yml@azure-pipelines-templates
88+
parameters:
89+
target_environment: Release
90+
isPreRelease: False
91+
hasChangeLog: True
92+
variables_group: DevelopmentTenant
93+
o365cli_deploy_extra_arguments: '--skipFeatureDeployment'
5894
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
59-
isPreRelease: False

config/config.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414
"externals": {},
1515
"localizedResources": {
16-
"ImageSliderWebPartStrings": "lib/webparts/imageSlider/loc/{locale}.js"
16+
"ImageSliderWebPartStrings": "lib/webparts/imageSlider/loc/{locale}.js",
17+
"PropertyControlStrings": "node_modules/@pnp/spfx-property-controls/lib/loc/{locale}.js"
1718
}
18-
}
19+
}

config/package-solution.json

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
11
{
2-
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3-
"solution": {
4-
"name": "image-slider-client-side-solution",
5-
"id": "ed354528-742c-4ffa-9069-5b456736314d",
6-
"version": "1.0.0.0",
7-
"includeClientSideAssets": true,
8-
"skipFeatureDeployment": true,
9-
"isDomainIsolated": false,
10-
"developer": {
11-
"name": "",
12-
"websiteUrl": "",
13-
"privacyUrl": "",
14-
"termsOfUseUrl": "",
15-
"mpnId": ""
2+
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json",
3+
"solution": {
4+
"name": "SPFx Image Slider Solution",
5+
"id": "ed354528-742c-4ffa-9069-5b456736314d",
6+
"version": "1.0.0.0",
7+
"iconPath": "images/AppIcon.png",
8+
"includeClientSideAssets": true,
9+
"features": [{
10+
"title": "Slider Image Web Part",
11+
"description": "Deployment of Slider Image Web Part and Library",
12+
"id": "61bfff46-b2a0-440a-8f80-efc2a03c21d1",
13+
"version": "1.0.0.0",
14+
"assets": {
15+
"elementManifests": [
16+
"elements.xml"
17+
],
18+
"elementFiles": [
19+
"schema.xml",
20+
"Virginia_Beach_Oceanfront.jpg"
21+
]
22+
}
23+
}],
24+
"skipFeatureDeployment": true,
25+
"isDomainIsolated": false,
26+
"developer": {
27+
"name": "",
28+
"websiteUrl": "",
29+
"privacyUrl": "",
30+
"termsOfUseUrl": "",
31+
"mpnId": ""
32+
}
33+
},
34+
"paths": {
35+
"zippedPackage": "solution/spfx-image-slider.sppkg"
1636
}
17-
},
18-
"paths": {
19-
"zippedPackage": "solution/image-slider.sppkg"
20-
}
21-
}
37+
}

documentation/powershell.png

11.4 KB
Loading

documentation/screenshot.gif

1.72 MB
Loading

0 commit comments

Comments
 (0)