Skip to content

Commit c28304d

Browse files
authored
Merge pull request #441 from SPShire/master
Upgrade LinksAndHandlebarsTemplates Web Parts
2 parents e3c5b50 + a0f55a1 commit c28304d

File tree

102 files changed

+28005
-21039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+28005
-21039
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@microsoft/generator-sharepoint": {
3+
"isCreatingSolution": false,
4+
"environment": "spo",
5+
"version": "1.10.0",
6+
"libraryName": "hub-web-parts",
7+
"libraryId": "520c2090-be2a-4538-b2b0-fd3eeca0cea0",
8+
"packageManager": "npm",
9+
"isDomainIsolated": false,
10+
"componentType": "webpart"
11+
}
12+
}
Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
---
2-
page_type: sample
3-
products:
4-
- office-sp
5-
languages:
6-
- javascript
7-
- typescript
8-
extensions:
9-
contentType: samples
10-
technologies:
11-
- SharePoint Framework
12-
createdDate: 10/1/2017 12:00:00 AM
13-
---
1+
---
2+
page_type: sample
3+
products:
4+
- office-sp
5+
languages:
6+
- javascript
7+
- typescript
8+
extensions:
9+
contentType: samples
10+
technologies:
11+
- SharePoint Framework
12+
createdDate: 10/1/2017 12:00:00 AM
13+
---
1414
# Hub and Link Web Parts
1515

1616
## Summary
@@ -35,6 +35,8 @@ Grouped Layout:
3535

3636
### Featured Content
3737

38+
> This web part is being deprecated in liu of using the `Out of the Box` Quick Links web part.
39+
3840
Tile links that enable users to show links with images stored within the web part or in a SharePoint list
3941

4042
Default Layout:
@@ -51,50 +53,50 @@ Stacked Layout:
5153

5254
### Box Button
5355

56+
> This web part is being deprecated in liu of using the `Out of the Box` Quick Links web part.
57+
5458
Button links that can be stored within the web part or in a SharePoint list
5559

5660
![Box Button](./assets/box_button.png "Box Button")
5761

5862
### Hub Template
5963

60-
A handlebars template web part that enables highly customized UI code to be applied to SharePoint list items.
64+
A handlebars template web part that enables highly customized UI code to be applied to SharePoint list items.
6165

6266
> The Hub Template web part allow users to add JavaScript into the page. Carefully consider the implications of this capability, and restrict creation and updating of this part to specific site collections and audiences. The Hub Template is the only web part in the group that allows script injection
6367
6468
![Hub Template](./assets/hub_template.png "Hub Template")
6569

66-
## Used SharePoint Framework Version
67-
![drop](https://img.shields.io/badge/version-1.4.1-green.svg)
70+
## Used SharePoint Framework Version
71+
72+
![drop](https://img.shields.io/badge/version-1.10.0-green.svg)
6873

6974
## Applies to
7075

7176
* [SharePoint Framework](https://dev.office.com/sharepoint)
7277
* [Office 365 tenant](https://dev.office.com/sharepoint/docs/spfx/set-up-your-development-environment)
7378

74-
## Prerequisites
75-
76-
Note that you will need to download and host a CAMLJS javascript library (https://github.com/andrei-markeev/camljs/blob/master/CamlJs/camljs.js).
77-
78-
7979
## Version history
8080

8181
Version | Date | Comments
8282
-------- | ------------------ | --------
8383
1.0 | September 27, 2017 | Initial release
8484
1.1 | April 12, 2018 | Updated to use CDN and to use SPFx v1.4.1
85+
3.0 | August, 2020 | Update to SPFx v1.10.0, Update PnPJS to 2.xUpdate, FontAwesome to 5.x, Fix bug with grouped view doubling groups on non-list backed HubLinks web part, Deprecate BoxButton and FeaturedContent web parts to promote OOB Quick Links web part which replaces functionality, Update logging to move webpart-logging-.config file to Tenant App Property "LinksHandlebarsConfig"
8586

8687
## Disclaimer
88+
8789
**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.**
8890

8991
---
9092

9193
## Minimal Path to Awesome
9294

93-
- Clone this repository
94-
- (Optional) Configure the web part usage logging - /src/utilities/webpartlogger
95-
- (Optional) Configure the approved image tab for the link picker - /src/components/LinkPickerPanel
96-
- in the command line run:
97-
- `npm install`
98-
- `gulp serve`
95+
* Clone this repository
96+
* (Optional) Configure the web part usage logging - /src/utilities/webpartlogger
97+
* (Optional) Configure the approved image tab for the link picker - /src/components/LinkPickerPanel
98+
* in the command line run:
99+
* `npm install`
100+
* `gulp serve`
99101

100102
<img src="https://telemetry.sharepointpnp.com/sp-dev-solutions/solutions/linksandhandlebarstemplate" />

solutions/LinksAndHandlebarsTemplate/config/config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
"box-button-web-part-bundle": {
66
"components": [
77
{
8-
"entrypoint": "./lib/webparts/boxButtonWebPart/BoxButtonWebPartWebPart.js",
9-
"manifest": "./src/webparts/boxButtonWebPart/BoxButtonWebPartWebPart.manifest.json"
8+
"entrypoint": "./lib/webparts/boxButtonWebPart/BoxButtonWebPart.js",
9+
"manifest": "./src/webparts/boxButtonWebPart/BoxButtonWebPart.manifest.json"
1010
}
1111
]
1212
},
1313
"featured-content-web-part-bundle": {
1414
"components": [
1515
{
16-
"entrypoint": "./lib/webparts/featuredContentWebPart/FeaturedContentWebPartWebPart.js",
17-
"manifest": "./src/webparts/featuredContentWebPart/FeaturedContentWebPartWebPart.manifest.json"
16+
"entrypoint": "./lib/webparts/featuredContentWebPart/FeaturedContentWebPart.js",
17+
"manifest": "./src/webparts/featuredContentWebPart/FeaturedContentWebPart.manifest.json"
1818
}
1919
]
2020
},
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
3-
"solution": {
4-
"name": "Hub Web Parts",
5-
"id": "520c2090-be2a-4538-b2b0-fd3eeca0cea0",
6-
"version": "2.3.3.0",
7-
"skipFeatureDeployment": true,
8-
"includeClientSideAssets": true
9-
},
10-
"paths": {
11-
"zippedPackage": "solution/hub-web-parts.sppkg"
12-
}
2+
"$schema": "https://dev.office.com/json-schemas/spfx-build/package-solution.schema.json",
3+
"solution": {
4+
"name": "Hub Web Parts",
5+
"id": "520c2090-be2a-4538-b2b0-fd3eeca0cea0",
6+
"version": "3.0.0.0",
7+
"skipFeatureDeployment": true,
8+
"includeClientSideAssets": true,
9+
"isDomainIsolated": false
10+
},
11+
"paths": {
12+
"zippedPackage": "solution/hub-web-parts.sppkg"
13+
}
1314
}

solutions/LinksAndHandlebarsTemplate/gulpfile.js

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,38 +12,40 @@ const bundleAnalyzer = require('webpack-bundle-analyzer');
1212
* Adds a loader and a node setting for webpacking the handlebars-helpers correctly
1313
* https://github.com/helpers/handlebars-helpers/issues/263
1414
********************************************************************************************/
15-
build.configureWebpack.mergeConfig({
16-
additionalConfiguration: (generatedConfiguration) => {
17-
18-
generatedConfiguration.resolve.alias = { handlebars: 'handlebars/dist/handlebars.min.js' };
19-
20-
generatedConfiguration.module.rules.push(
21-
{
22-
test: /utils\.js$/,
23-
loader: 'unlazy-loader',
24-
include: [
25-
/node_modules/,
26-
]
27-
}
28-
);
29-
30-
generatedConfiguration.node = {
31-
fs: 'empty'
32-
}
33-
34-
const lastDirName = path.basename(__dirname);
35-
const dropPath = path.join(__dirname, 'temp', 'stats');
36-
generatedConfiguration.plugins.push(new bundleAnalyzer.BundleAnalyzerPlugin({
37-
openAnalyzer: false,
38-
analyzerMode: 'static',
39-
reportFilename: path.join(dropPath, `${lastDirName}.stats.html`),
40-
generateStatsFile: true,
41-
statsFilename: path.join(dropPath, `${lastDirName}.stats.json`),
42-
logLevel: 'error'
43-
}));
44-
45-
return generatedConfiguration;
46-
}
47-
});
48-
49-
build.initialize(gulp);
15+
// build.configureWebpack.mergeConfig({
16+
// additionalConfiguration: (generatedConfiguration) => {
17+
18+
// generatedConfiguration.resolve.alias = {
19+
// handlebars: 'handlebars/dist/handlebars.min.js'
20+
// };
21+
22+
// // generatedConfiguration.module.rules.push(
23+
// // {
24+
// // test: /utils\.js$/,
25+
// // loader: 'unlazy-loader',
26+
// // include: [
27+
// // /node_modules/,
28+
// // ]
29+
// // }
30+
// // );
31+
32+
// // generatedConfiguration.node = {
33+
// // fs: 'empty'
34+
// // }
35+
36+
// const lastDirName = path.basename(__dirname);
37+
// const dropPath = path.join(__dirname, 'temp', 'stats');
38+
// generatedConfiguration.plugins.push(new bundleAnalyzer.BundleAnalyzerPlugin({
39+
// openAnalyzer: false,
40+
// analyzerMode: 'static',
41+
// reportFilename: path.join(dropPath, `${lastDirName}.stats.html`),
42+
// generateStatsFile: true,
43+
// statsFilename: path.join(dropPath, `${lastDirName}.stats.json`),
44+
// logLevel: 'error'
45+
// }));
46+
47+
// return generatedConfiguration;
48+
// }
49+
// });
50+
51+
build.initialize(gulp);

0 commit comments

Comments
 (0)