Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 4d68d55

Browse files
Merge pull request #1960 from erwinvanhunen/dev
Added support for client side pages on SP2019
2 parents 78b6f3e + cc001f0 commit 4d68d55

20 files changed

+121
-30
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
1616
## [3.7.1903.0]
1717

1818
### Added
19+
- Added support for client side pages on SP2019
20+
- Added support for ALM cmdlets (Add-PnPApp, Get-PnPApp etc.) on SP2019
1921
- Added Add-PnPAlert cmdlet to create alerts (SPO and SP2019 only)
2022
- Added Get-PnPAlert to list alerts (SPO and SP2019 only)
2123
- Added Remove-PnPAlert to remove alerts (SPO and SP2019 only)
@@ -35,6 +37,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
3537
- Nick Schonning [nschonni]
3638
- Koen Zomers [KoenZomers]
3739
- Marvin Dickhaus [Weishaupt]
40+
- Lars Fernhomberg [lafe]
3841

3942
## [3.6.1902.2]
4043

Commands/Base/PipeBinds/ClientSideComponentPipeBind.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using Microsoft.SharePoint.Client;
33
using OfficeDevPnP.Core.Pages;
44
using SharePointPnP.PowerShell.Commands.ClientSidePages;

Commands/Base/PipeBinds/ClientSidePagePipeBind.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using Microsoft.SharePoint.Client;
33
using OfficeDevPnP.Core.Pages;
44
using SharePointPnP.PowerShell.Commands.ClientSidePages;

Commands/Base/PipeBinds/ClientSideWebPartPipeBind.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using OfficeDevPnP.Core.Pages;
33
using System;
44
using System.Collections.Generic;

Commands/Base/PipeBinds/PagePipeBind.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using Microsoft.SharePoint.Client;
33
using OfficeDevPnP.Core.Utilities;
44
using SharePointPnP.PowerShell.Commands.ClientSidePages;

Commands/ClientSidePages/AddClientSidePage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using Microsoft.SharePoint.Client;
33
using OfficeDevPnP.Core.Pages;
44
using SharePointPnP.PowerShell.CmdletHelpAttributes;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Add, "PnPClientSidePage")]
1111
[CmdletHelp("Adds a Client-Side Page",
12-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
12+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1313
[CmdletExample(
1414
Code = @"PS:> Add-PnPClientSidePage -Name ""NewPage""",
1515
Remarks = "Creates a new Client-Side page named 'NewPage'",

Commands/ClientSidePages/AddClientSidePageSection.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using OfficeDevPnP.Core.Pages;
33
using SharePointPnP.PowerShell.CmdletHelpAttributes;
44
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Add, "PnPClientSidePageSection")]
1111
[CmdletHelp("Adds a new section to a Client-Side page",
12-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
12+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1313
[CmdletExample(
1414
Code = @"PS:> Add-PnPClientSidePageSection -Page ""MyPage"" -SectionTemplate OneColumn",
1515
Remarks = "Adds a new one-column section to the Client-Side page 'MyPage'",

Commands/ClientSidePages/AddClientSideText.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using OfficeDevPnP.Core.Pages;
33
using SharePointPnP.PowerShell.CmdletHelpAttributes;
44
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
@@ -10,7 +10,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
1010
[Cmdlet(VerbsCommon.Add, "PnPClientSideText")]
1111
[CmdletHelp("Adds a text element to a client-side page.",
1212
"Adds a new text element to a section on a client-side page.",
13-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
13+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1414
[CmdletExample(
1515
Code = @"PS:> Add-PnPClientSideText -Page ""MyPage"" -Text ""Hello World!""",
1616
Remarks = "Adds the text 'Hello World!' to the Client-Side Page 'MyPage'",

Commands/ClientSidePages/ClientSidePageUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22

33
namespace SharePointPnP.PowerShell.Commands.ClientSidePages
44
{

Commands/ClientSidePages/GetAvailableClientSideComponents.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using SharePointPnP.PowerShell.CmdletHelpAttributes;
33
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
44
using System.Linq;
@@ -8,7 +8,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
88
{
99
[Cmdlet(VerbsCommon.Get, "PnPAvailableClientSideComponents")]
1010
[CmdletHelp("Gets the available client side components on a particular page",
11-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
11+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1212
[CmdletExample(
1313
Code = @"PS:> Get-PnPAvailableClientSideComponents -Page ""MyPage.aspx""",
1414
Remarks = "Gets the list of available client side components on the page 'MyPage.aspx'",

Commands/ClientSidePages/GetClientSideComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using OfficeDevPnP.Core.Pages;
33
using SharePointPnP.PowerShell.CmdletHelpAttributes;
44
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
@@ -12,7 +12,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
1212
[Cmdlet(VerbsCommon.Get, "PnPClientSideComponent")]
1313
[CmdletHelp("Retrieve one or more Client-Side components from a page",
1414
Category = CmdletHelpCategory.WebParts,
15-
SupportedPlatform = CmdletSupportedPlatform.Online)]
15+
SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1616
[CmdletExample(
1717
Code = @"PS:> Get-PnPClientSideComponent -Page Home",
1818
Remarks = @"Returns all controls defined on the given page.", SortOrder = 1)]

Commands/ClientSidePages/GetClientSidePage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using SharePointPnP.PowerShell.CmdletHelpAttributes;
33
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
44
using System;
@@ -8,7 +8,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
88
{
99
[Cmdlet(VerbsCommon.Get, "PnPClientSidePage")]
1010
[CmdletHelp("Gets a Client-Side Page",
11-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
11+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1212
[CmdletExample(
1313
Code = @"PS:> Get-PnPClientSidePage -Identity ""MyPage.aspx""",
1414
Remarks = "Gets the Modern Page (Client-Side) named 'MyPage.aspx' in the current SharePoint site",

Commands/ClientSidePages/MoveClientSideComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using SharePointPnP.PowerShell.CmdletHelpAttributes;
33
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
44
using System;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Move, "PnPClientSideComponent")]
1111
[CmdletHelp("Moves a Client-Side Component to a different section/column",
12-
SupportedPlatform = CmdletSupportedPlatform.Online,
12+
SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019,
1313
DetailedDescription = "Moves a Client-Side Component to a different location on the page. Notice that the sections and or columns need to be present before moving the component.",
1414
Category = CmdletHelpCategory.ClientSidePages)]
1515
[CmdletExample(

Commands/ClientSidePages/RemoveClientSideComponent.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using SharePointPnP.PowerShell.CmdletHelpAttributes;
33
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
44
using System;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Remove, "PnPClientSideComponent")]
1111
[CmdletHelp("Removes a Client-Side component from a page",
12-
SupportedPlatform = CmdletSupportedPlatform.Online,
12+
SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019,
1313
Category = CmdletHelpCategory.WebParts)]
1414
[CmdletExample(
1515
Code = @"PS:> Remove-PnPClientSideComponent -Page Home -InstanceId a2875399-d6ff-43a0-96da-be6ae5875f82",

Commands/ClientSidePages/RemoveClientSidePage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using SharePointPnP.PowerShell.CmdletHelpAttributes;
33
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
44
using SharePointPnP.PowerShell.Commands.Properties;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Remove, "PnPClientSidePage")]
1111
[CmdletHelp("Removes a Client-Side Page",
12-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
12+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1313
[CmdletExample(
1414
Code = @"PS:> Remove-PnPClientSidePage -Identity ""MyPage""",
1515
Remarks = "Removes the Client-Side page named 'MyPage.aspx'",

Commands/ClientSidePages/SetClientSidePage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using OfficeDevPnP.Core.Pages;
33
using SharePointPnP.PowerShell.CmdletHelpAttributes;
44
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
@@ -9,7 +9,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
99
{
1010
[Cmdlet(VerbsCommon.Set, "PnPClientSidePage")]
1111
[CmdletHelp("Sets parameters of a Client-Side Page",
12-
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online)]
12+
Category = CmdletHelpCategory.ClientSidePages, SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019)]
1313
[CmdletExample(
1414
Code = @"PS:> Set-PnPClientSidePage -Identity ""MyPage"" -LayoutType Home -Title ""My Page""",
1515
Remarks = "Updates the properties of the Client-Side page named 'MyPage'",

Commands/ClientSidePages/SetClientSideText.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
@@ -11,7 +11,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
1111
{
1212
[Cmdlet(VerbsCommon.Set, "PnPClientSideText")]
1313
[CmdletHelp("Set Client-Side Text Component properties",
14-
SupportedPlatform = CmdletSupportedPlatform.Online,
14+
SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019,
1515
DetailedDescription = "Sets the rendered text in existing client side text component",
1616
Category = CmdletHelpCategory.WebParts)]
1717
[CmdletExample(

Commands/ClientSidePages/SetClientSideWebPart.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;
@@ -10,7 +10,7 @@ namespace SharePointPnP.PowerShell.Commands.ClientSidePages
1010
{
1111
[Cmdlet(VerbsCommon.Set, "PnPClientSideWebPart")]
1212
[CmdletHelp("Set Client-Side Web Part properties",
13-
SupportedPlatform = CmdletSupportedPlatform.Online,
13+
SupportedPlatform = CmdletSupportedPlatform.Online | CmdletSupportedPlatform.SP2019,
1414
DetailedDescription = "Sets specific client side web part properties. Notice that the title parameter will only set the -internal- title of web part. The title which is shown in the UI will, if possible, have to be set using the PropertiesJson parameter. Use Get-PnPClientSideComponent to retrieve the instance id and properties of a web part.",
1515
Category = CmdletHelpCategory.WebParts)]
1616
[CmdletExample(

Commands/Enums/ClientSidePagePromoteType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if !ONPREMISES
1+
#if !SP2013 && !SP2016
22
using System;
33
using System.Collections.Generic;
44
using System.Linq;

Commands/ModuleFiles/SharePointPnP.PowerShell.2019.Commands.Format.ps1xml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,94 @@
12391239
</TableRowEntries>
12401240
</TableControl>
12411241
</View>
1242+
<View>
1243+
<Name>ClientSideComponent</Name>
1244+
<ViewSelectedBy>
1245+
<TypeName>OfficeDevPnP.Core.Pages.ClientSideComponent</TypeName>
1246+
</ViewSelectedBy>
1247+
<TableControl>
1248+
<TableHeaders>
1249+
<TableColumnHeader>
1250+
<Label>Id</Label>
1251+
<Alignment>left</Alignment>
1252+
</TableColumnHeader>
1253+
<TableColumnHeader>
1254+
<Label>Name</Label>
1255+
<Alignment>left</Alignment>
1256+
</TableColumnHeader>
1257+
<TableColumnHeader>
1258+
<Label>Alias</Label>
1259+
<Alignment>left</Alignment>
1260+
</TableColumnHeader>
1261+
</TableHeaders>
1262+
<TableRowEntries>
1263+
<TableRowEntry>
1264+
<TableColumnItems>
1265+
<TableColumnItem>
1266+
<PropertyName>Id</PropertyName>
1267+
</TableColumnItem>
1268+
<TableColumnItem>
1269+
<PropertyName>Name</PropertyName>
1270+
</TableColumnItem>
1271+
<TableColumnItem>
1272+
<ScriptBlock>(ConvertFrom-Json $_.Manifest).alias</ScriptBlock>
1273+
</TableColumnItem>
1274+
</TableColumnItems>
1275+
</TableRowEntry>
1276+
</TableRowEntries>
1277+
</TableControl>
1278+
</View>
1279+
<View>
1280+
<Name>AppMetadata</Name>
1281+
<ViewSelectedBy>
1282+
<TypeName>OfficeDevPnP.Core.ALM.AppMetadata</TypeName>
1283+
</ViewSelectedBy>
1284+
<TableControl>
1285+
<TableHeaders>
1286+
<TableColumnHeader>
1287+
<Label>Id</Label>
1288+
<Alignment>left</Alignment>
1289+
</TableColumnHeader>
1290+
<TableColumnHeader>
1291+
<Label>Title</Label>
1292+
<Alignment>left</Alignment>
1293+
</TableColumnHeader>
1294+
<TableColumnHeader>
1295+
<Label>Deployed</Label>
1296+
<Alignment>left</Alignment>
1297+
</TableColumnHeader>
1298+
<TableColumnHeader>
1299+
<Label>AppCatalogVersion</Label>
1300+
<Alignment>left</Alignment>
1301+
</TableColumnHeader>
1302+
<TableColumnHeader>
1303+
<Label>InstalledVersion</Label>
1304+
<Alignment>left</Alignment>
1305+
</TableColumnHeader>
1306+
</TableHeaders>
1307+
<TableRowEntries>
1308+
<TableRowEntry>
1309+
<TableColumnItems>
1310+
<TableColumnItem>
1311+
<PropertyName>Id</PropertyName>
1312+
</TableColumnItem>
1313+
<TableColumnItem>
1314+
<PropertyName>Title</PropertyName>
1315+
</TableColumnItem>
1316+
<TableColumnItem>
1317+
<PropertyName>Deployed</PropertyName>
1318+
</TableColumnItem>
1319+
<TableColumnItem>
1320+
<PropertyName>AppCatalogVersion</PropertyName>
1321+
</TableColumnItem>
1322+
<TableColumnItem>
1323+
<PropertyName>InstalledVersion</PropertyName>
1324+
</TableColumnItem>
1325+
</TableColumnItems>
1326+
</TableRowEntry>
1327+
</TableRowEntries>
1328+
</TableControl>
1329+
</View>
12421330
<View>
12431331
<Name>NavigationNode</Name>
12441332
<ViewSelectedBy>

0 commit comments

Comments
 (0)