Skip to content

Commit

Permalink
0.3.0 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
olemp committed Apr 16, 2019
1 parent 3ceb269 commit 94fb727
Show file tree
Hide file tree
Showing 237 changed files with 3,275 additions and 1,680 deletions.
31 changes: 18 additions & 13 deletions Install/Install.ps1
Expand Up @@ -13,8 +13,10 @@ Param(
[switch]$SkipAppPackages,
[Parameter(Mandatory = $false, HelpMessage = "Skip site creation")]
[switch]$SkipSiteCreation,
[Parameter(Mandatory = $false, HelpMessage = "Skip site creation")]
[string]$SiteDesignName = "Prosjektområde"
[Parameter(Mandatory = $false, HelpMessage = "Site design name")]
[string]$SiteDesignName = "Prosjektområde",
[Parameter(Mandatory = $false, HelpMessage = "Security group to give View access to site design")]
[string]$SiteDesignSecurityGroupId
)

$sw = [Diagnostics.Stopwatch]::StartNew()
Expand Down Expand Up @@ -46,7 +48,6 @@ $TenantAppCatalogUrl = $null

Set-PnPTraceLog -On -Level Debug -LogFile InstallLog.txt


Try {
$AdminSiteConnection = Connect-SharePoint -Url $AdminSiteUrl -ErrorAction Stop
}
Expand All @@ -55,6 +56,7 @@ Catch {
exit 0
}


if (-not $SkipSiteCreation.IsPresent) {
Try {
$PortfolioSite = Get-PnPTenantSite -Url $Url -Connection $AdminSiteConnection -ErrorAction SilentlyContinue
Expand All @@ -72,6 +74,10 @@ if (-not $SkipSiteCreation.IsPresent) {
}
}

Write-Host "[INFO] Setting permissions for AssociatedMemberGroup" -ForegroundColor Green
Set-PnPGroupPermissions -Identity (Get-PnPGroup -AssociatedMemberGroup) -RemoveRole Rediger
Set-PnPGroupPermissions -Identity (Get-PnPGroup -AssociatedMemberGroup) -AddRole Lese

Try {
Write-Host "[INFO] Clearing QuickLaunch"
Get-PnPNavigationNode -Location QuickLaunch | ForEach-Object { Remove-PnPNavigationNode -Identity $_.Id -Location QuickLaunch -Force }
Expand Down Expand Up @@ -139,6 +145,13 @@ if (-not $SkipSiteDesign.IsPresent) {
Write-Host "[INFO] Creating new site design [$SiteDesignName]"
$SiteDesign = Add-PnPSiteDesign -Title $SiteDesignName -SiteScriptIds $SiteScriptIds -Description "" -WebTemplate TeamSite -Connection $AdminSiteConnection
}
if ([string]::IsNullOrEmpty($SiteDesignSecurityGroupId)) {
Write-Host "[INFO] You have not specified -SiteDesignSecurityGroupId. Everyone will have View access to site design [$SiteDesignName]" -ForegroundColor Yellow
}
else {
Write-Host "[INFO] Granting group $SiteDesignSecurityGroupId View access to site design [$SiteDesignName]"
Grant-PnPSiteDesignRights -Identity $SiteDesign.Id.Guid -Principals @("c:0t.c|tenant|$SiteDesignSecurityGroupId")
}
}
Catch {
Write-Host "[INFO] Failed to install site design: $($_.Exception.Message)"
Expand All @@ -149,16 +162,11 @@ if (-not $SkipSiteDesign.IsPresent) {
if (-not $SkipAppPackages.IsPresent) {
Try {
$TenantAppCatalogUrl = Get-PnPTenantAppCatalogUrl -Connection $AdminSiteConnection
}
Catch {

}
Try {
$AppCatalogSiteConnection = Connect-SharePoint -Url $TenantAppCatalogUrl -ErrorAction Stop
}
Catch {
Write-Host "[INFO] Failed to connect to [$TenantAppCatalogUrl]: $($_.Exception.Message)"
exit 0
exit 0
}
Try {
Write-Host "[INFO] Installing SharePoint Framework app packages to [$AppCatalogUrl]"
Expand All @@ -167,10 +175,7 @@ if (-not $SkipAppPackages.IsPresent) {
".\Apps\pp-project-extensions.sppkg",
".\Apps\pp-project-web-parts.sppkg"
)
$AppPackages | ForEach-Object {
$AppPackage = Get-ChildItem $_.
Add-PnPApp -Path $AppPackage.FullName -Scope Tenant -Publish -Overwrite -SkipFeatureDeployment -ErrorAction Stop -Connection $AppCatalogSiteConnection
}
$AppPackages | ForEach-Object { Add-PnPApp -Path $_ -Scope Tenant -Publish -Overwrite -SkipFeatureDeployment -ErrorAction Stop -Connection $AppCatalogSiteConnection }
Write-Host "[INFO] SharePoint Framework app packages successfully installed to [$AppCatalogUrl]" -ForegroundColor Green
}
Catch {
Expand Down
10 changes: 10 additions & 0 deletions SharePointFramework/@Shared/lib/helpers/index.d.ts
@@ -0,0 +1,10 @@
import sortAlphabetically from './sortAlphabetically';
import formatDate from './formatDate';
import getBreakpoint from './getBreakpoint';
import getObjectValue from './getObjectValue';
import getUserPhoto from './getUserPhoto';
import tryParseCurrency from './tryParseCurrency';
import tryParseFloat from './tryParseFloat';
import tryParseInt from './tryParseInt';
import tryParsePercentage from './tryParsePercentage';
export { formatDate, getBreakpoint, getObjectValue, getUserPhoto, sortAlphabetically, tryParseCurrency, tryParseFloat, tryParseInt, tryParsePercentage };
11 changes: 11 additions & 0 deletions SharePointFramework/@Shared/lib/helpers/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions SharePointFramework/@Shared/lib/helpers/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,9 @@
/**
* Sort alphabetically
*
* @param {T} a Object a
* @param {T} b Object b
* @param {boolean} ascending Sort ascending
* @param {string} property Property
*/
export default function sortAlphabetically<T>(a: T, b: T, ascending?: boolean, property?: string): number;
21 changes: 21 additions & 0 deletions SharePointFramework/@Shared/lib/helpers/sortAlphabetically.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions SharePointFramework/@Shared/lib/logging/ListLogger.d.ts
@@ -0,0 +1,29 @@
import { ItemAddResult } from '@pnp/sp';
export declare type ListLoggerEntryLevel = 'Info' | 'Warning' | 'Error';
export declare class IListLoggerEntry {
webUrl?: string;
scope?: string;
functionName?: string;
message: string;
level: ListLoggerEntryLevel;
}
export declare class IListLoggerMemberMap {
webUrl?: string;
scope?: string;
functionName?: string;
message?: string;
level?: string;
}
declare const _default: {
_list: any;
_memberMap: IListLoggerMemberMap;
_webUrl: string;
_scope: string;
init(list: any, memberMap: IListLoggerMemberMap, webUrl?: string, scope?: string): void;
log(entry: IListLoggerEntry): Promise<ItemAddResult>;
write(message: string, level?: ListLoggerEntryLevel, functionName?: string): Promise<ItemAddResult>;
getSpItem(entry: IListLoggerEntry): {
[key: string]: string;
};
};
export default _default;
73 changes: 73 additions & 0 deletions SharePointFramework/@Shared/lib/logging/ListLogger.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions SharePointFramework/@Shared/lib/logging/ListLogger.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions SharePointFramework/@Shared/lib/logging/index.d.ts
@@ -0,0 +1,2 @@
import ListLogger from './ListLogger';
export { ListLogger };
3 changes: 3 additions & 0 deletions SharePointFramework/@Shared/lib/logging/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions SharePointFramework/@Shared/lib/logging/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion SharePointFramework/@Shared/lib/models/index.d.ts
@@ -1,3 +1,2 @@
export { DataSource } from './DataSource';
export { ProjectListModel } from './ProjectListModel';
export { ProjectPropertyModel } from './ProjectPropertyModel';
1 change: 0 additions & 1 deletion SharePointFramework/@Shared/lib/models/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion SharePointFramework/@Shared/lib/models/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions SharePointFramework/@Shared/lib/util/injectStyles.d.ts
@@ -0,0 +1,6 @@
/**
* Inject styles
*
* @param {string} css CSS
*/
export default function injectStyles(css: string): void;
18 changes: 18 additions & 0 deletions SharePointFramework/@Shared/lib/util/injectStyles.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions SharePointFramework/@Shared/lib/util/injectStyles.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions SharePointFramework/@Shared/lib/utiltiies/injectStyles.d.ts
@@ -0,0 +1,6 @@
/**
* Inject styles
*
* @param {string} css CSS
*/
export default function injectStyles(css: string): void;
18 changes: 18 additions & 0 deletions SharePointFramework/@Shared/lib/utiltiies/injectStyles.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions SharePointFramework/@Shared/package.json
Expand Up @@ -9,10 +9,12 @@
"author": "",
"license": "ISC",
"dependencies": {
"@pnp/common": "^1.3.0",
"@pnp/logging": "^1.3.0",
"@pnp/odata": "^1.3.0",
"@pnp/sp": "^1.3.0",
"@pnp/common": "^1.3.2",
"@pnp/logging": "^1.3.2",
"@pnp/odata": "^1.3.2",
"@pnp/sp": "^1.3.2",
"@pnp/sp-clientsvc": "^1.3.2",
"@pnp/sp-taxonomy": "^1.3.2",
"es6-promise": "^4.2.6",
"object-get": "^2.1.0"
},
Expand Down

0 comments on commit 94fb727

Please sign in to comment.