Aktualisiere Versionsnummer auf 3.2.5 in README.md, package.json, package-lock.json und package-solution.json. Füge initialen Aufklappzustand in CurrentNavigationSettingsProvider hinzu und erweitere Tests entsprechend.
This commit is contained in:
@@ -6,7 +6,7 @@ PortalSettings V3 ist ein providerbasiertes SPFx-WebPart für SharePoint Server
|
|||||||
|
|
||||||
| Eigenschaft | Wert |
|
| Eigenschaft | Wert |
|
||||||
|---|---|
|
|---|---|
|
||||||
| Version | 3.2.4 |
|
| Version | 3.2.5 |
|
||||||
| SharePoint Framework | 1.4.1 |
|
| SharePoint Framework | 1.4.1 |
|
||||||
| Build-Node | 8.17.0 |
|
| Build-Node | 8.17.0 |
|
||||||
| npm | 6.x |
|
| npm | 6.x |
|
||||||
@@ -171,7 +171,7 @@ sharepoint/solution/portal-settings.sppkg
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. `portal-settings.sppkg` im App Catalog durch Version `3.2.4.0` ersetzen.
|
1. `portal-settings.sppkg` im App Catalog durch Version `3.2.5.0` ersetzen.
|
||||||
2. Die App im Root Web der gewünschten Site Collection installieren oder aktualisieren.
|
2. Die App im Root Web der gewünschten Site Collection installieren oder aktualisieren.
|
||||||
3. Die Seite mit dem PnP-PowerShell-Skript erzeugen beziehungsweise reparieren:
|
3. Die Seite mit dem PnP-PowerShell-Skript erzeugen beziehungsweise reparieren:
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Stand: 21.07.2026
|
Stand: 21.07.2026
|
||||||
Branch: `dev-3.0`
|
Branch: `dev-3.0`
|
||||||
Zielversion: 3.2.4
|
Zielversion: 3.2.5
|
||||||
|
|
||||||
## Architektur
|
## Architektur
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"solution": {
|
"solution": {
|
||||||
"name": "portal-settings-client-side-solution",
|
"name": "portal-settings-client-side-solution",
|
||||||
"id": "1c98e32d-bb7b-43b7-9625-074d6e4ea286",
|
"id": "1c98e32d-bb7b-43b7-9625-074d6e4ea286",
|
||||||
"version": "3.2.4.0",
|
"version": "3.2.5.0",
|
||||||
"includeClientSideAssets": true,
|
"includeClientSideAssets": true,
|
||||||
"skipFeatureDeployment": false
|
"skipFeatureDeployment": false
|
||||||
},
|
},
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "portal-settings",
|
"name": "portal-settings",
|
||||||
"version": "3.2.4",
|
"version": "3.2.5",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "portal-settings",
|
"name": "portal-settings",
|
||||||
"version": "3.2.4",
|
"version": "3.2.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export interface ICurrentNavigationSettings {
|
|||||||
cacheVersion: string;
|
cacheVersion: string;
|
||||||
maxDepth: number;
|
maxDepth: number;
|
||||||
showRoot: boolean;
|
showRoot: boolean;
|
||||||
|
initialExpansion: 'activePath' | 'expanded' | 'collapsed';
|
||||||
debug: boolean;
|
debug: boolean;
|
||||||
[key: string]: any; // tslint:disable-line:no-any
|
[key: string]: any; // tslint:disable-line:no-any
|
||||||
}
|
}
|
||||||
@@ -54,6 +55,15 @@ export const CurrentNavigationSettingsProvider: ISettingsProvider<ICurrentNaviga
|
|||||||
type: 'boolean', key: 'showRoot', path: 'showRoot', label: 'Root-Term anzeigen',
|
type: 'boolean', key: 'showRoot', path: 'showRoot', label: 'Root-Term anzeigen',
|
||||||
description: 'Zeigt den zugeordneten Root-Term als erste Ebene an.', columnSpan: 6
|
description: 'Zeigt den zugeordneten Root-Term als erste Ebene an.', columnSpan: 6
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'choice', key: 'initialExpansion', path: 'initialExpansion', label: 'Initialer Aufklappzustand',
|
||||||
|
description: 'Legt fest, welche Zweige beim Laden der Navigation geöffnet sind.', columnSpan: 6,
|
||||||
|
options: [
|
||||||
|
{ key: 'activePath', text: 'Aktuellen Pfad aufklappen' },
|
||||||
|
{ key: 'expanded', text: 'Alles aufklappen' },
|
||||||
|
{ key: 'collapsed', text: 'Alles zuklappen' }
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'notice', appearance: 'info', title: 'Local Custom Properties', columnSpan: 12,
|
type: 'notice', appearance: 'info', title: 'Local Custom Properties', columnSpan: 12,
|
||||||
text: 'CurrentNavigation.Root = true ordnet einen Term über seine URL einer Website zu. CurrentNavigation.Hidden = true blendet einen Zweig aus.'
|
text: 'CurrentNavigation.Root = true ordnet einen Term über seine URL einer Website zu. CurrentNavigation.Hidden = true blendet einen Zweig aus.'
|
||||||
@@ -96,7 +106,7 @@ export const CurrentNavigationSettingsProvider: ISettingsProvider<ICurrentNaviga
|
|||||||
providerKey: 'currentnavigation', contractVersion: 1, minimumPortalSettingsVersion: '3.1.0'
|
providerKey: 'currentnavigation', contractVersion: 1, minimumPortalSettingsVersion: '3.1.0'
|
||||||
},
|
},
|
||||||
termSetId: '', termSetName: '', cacheMinutes: 15, cacheVersion: '1',
|
termSetId: '', termSetName: '', cacheMinutes: 15, cacheVersion: '1',
|
||||||
maxDepth: 3, showRoot: false, debug: false
|
maxDepth: 3, showRoot: false, initialExpansion: 'activePath', debug: false
|
||||||
}),
|
}),
|
||||||
normalize: (value: any): ICurrentNavigationSettings => { // tslint:disable-line:no-any
|
normalize: (value: any): ICurrentNavigationSettings => { // tslint:disable-line:no-any
|
||||||
const source: any = value && typeof value === 'object' ? value : {}; // tslint:disable-line:no-any
|
const source: any = value && typeof value === 'object' ? value : {}; // tslint:disable-line:no-any
|
||||||
@@ -115,6 +125,8 @@ export const CurrentNavigationSettingsProvider: ISettingsProvider<ICurrentNaviga
|
|||||||
? source.cacheVersion.trim() : '1';
|
? source.cacheVersion.trim() : '1';
|
||||||
result.maxDepth = isFinite(depth) ? Math.min(Math.max(Math.floor(depth), 1), 8) : 3;
|
result.maxDepth = isFinite(depth) ? Math.min(Math.max(Math.floor(depth), 1), 8) : 3;
|
||||||
result.showRoot = source.showRoot === true;
|
result.showRoot = source.showRoot === true;
|
||||||
|
result.initialExpansion = source.initialExpansion === 'expanded' || source.initialExpansion === 'collapsed'
|
||||||
|
? source.initialExpansion : 'activePath';
|
||||||
result.debug = source.debug === true;
|
result.debug = source.debug === true;
|
||||||
return result as ICurrentNavigationSettings;
|
return result as ICurrentNavigationSettings;
|
||||||
},
|
},
|
||||||
@@ -130,6 +142,9 @@ export const CurrentNavigationSettingsProvider: ISettingsProvider<ICurrentNaviga
|
|||||||
if (value.maxDepth < 1 || value.maxDepth > 8) {
|
if (value.maxDepth < 1 || value.maxDepth > 8) {
|
||||||
errors.push('Die maximale Tiefe muss zwischen 1 und 8 liegen.');
|
errors.push('Die maximale Tiefe muss zwischen 1 und 8 liegen.');
|
||||||
}
|
}
|
||||||
|
if (['activePath', 'expanded', 'collapsed'].indexOf(value.initialExpansion) < 0) {
|
||||||
|
errors.push('Der initiale Aufklappzustand ist ungültig.');
|
||||||
|
}
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,16 +38,20 @@ assert(!!current.storage.action, 'CurrentNavigation-Aktivierungsdefinition fehlt
|
|||||||
assert(current.storage.action.name === 'CurrentNavigation', 'CurrentNavigation Action-Name ist nicht stabil.');
|
assert(current.storage.action.name === 'CurrentNavigation', 'CurrentNavigation Action-Name ist nicht stabil.');
|
||||||
assert(current.storage.action.sequence === 110, 'CurrentNavigation Action-Sequenz ist nicht stabil.');
|
assert(current.storage.action.sequence === 110, 'CurrentNavigation Action-Sequenz ist nicht stabil.');
|
||||||
const normalizedCurrent: any = current.normalize({ // tslint:disable-line:no-any
|
const normalizedCurrent: any = current.normalize({ // tslint:disable-line:no-any
|
||||||
cacheMinutes: 5000, cacheVersion: '', maxDepth: 99, showRoot: true, future: 'keep'
|
cacheMinutes: 5000, cacheVersion: '', maxDepth: 99, showRoot: true,
|
||||||
|
initialExpansion: 'expanded', future: 'keep'
|
||||||
});
|
});
|
||||||
assert(normalizedCurrent.cacheMinutes === 1440, 'CurrentNavigation Cache-Maximum greift nicht.');
|
assert(normalizedCurrent.cacheMinutes === 1440, 'CurrentNavigation Cache-Maximum greift nicht.');
|
||||||
assert(normalizedCurrent.cacheVersion === '1', 'CurrentNavigation Cache-Fallback fehlt.');
|
assert(normalizedCurrent.cacheVersion === '1', 'CurrentNavigation Cache-Fallback fehlt.');
|
||||||
assert(normalizedCurrent.maxDepth === 8, 'CurrentNavigation Tiefenlimit greift nicht.');
|
assert(normalizedCurrent.maxDepth === 8, 'CurrentNavigation Tiefenlimit greift nicht.');
|
||||||
assert(normalizedCurrent.showRoot === true, 'CurrentNavigation Root-Anzeige geht verloren.');
|
assert(normalizedCurrent.showRoot === true, 'CurrentNavigation Root-Anzeige geht verloren.');
|
||||||
|
assert(normalizedCurrent.initialExpansion === 'expanded', 'CurrentNavigation Aufklappzustand geht verloren.');
|
||||||
assert(normalizedCurrent.future === 'keep', 'Unbekannte CurrentNavigation-Properties gehen verloren.');
|
assert(normalizedCurrent.future === 'keep', 'Unbekannte CurrentNavigation-Properties gehen verloren.');
|
||||||
const invalidCurrent: any = current.createDefault(); // tslint:disable-line:no-any
|
const invalidCurrent: any = current.createDefault(); // tslint:disable-line:no-any
|
||||||
invalidCurrent.termSetName = 'Nur ein Name';
|
invalidCurrent.termSetName = 'Nur ein Name';
|
||||||
assert(current.validate(invalidCurrent).length > 0, 'CurrentNavigation muss eine Termset-ID verlangen.');
|
assert(current.validate(invalidCurrent).length > 0, 'CurrentNavigation muss eine Termset-ID verlangen.');
|
||||||
|
assert(current.normalize({ initialExpansion: 'invalid' }).initialExpansion === 'activePath',
|
||||||
|
'CurrentNavigation benötigt einen kompatiblen Fallback für den Aufklappzustand.');
|
||||||
|
|
||||||
const branding: ISettingsProvider<any> = getSettingsProvider('custombranding'); // tslint:disable-line:no-any
|
const branding: ISettingsProvider<any> = getSettingsProvider('custombranding'); // tslint:disable-line:no-any
|
||||||
assert(!!branding.storage.action, 'CustomBranding-Aktivierungsdefinition fehlt.');
|
assert(!!branding.storage.action, 'CustomBranding-Aktivierungsdefinition fehlt.');
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ var sourceFiles = [
|
|||||||
].map(read).join('\n');
|
].map(read).join('\n');
|
||||||
var dataService = read('src/services/PortalSettingsDataService.ts');
|
var dataService = read('src/services/PortalSettingsDataService.ts');
|
||||||
|
|
||||||
assert(packageJson.version === '3.2.4', 'Package-Version ist nicht 3.2.4.');
|
assert(packageJson.version === '3.2.5', 'Package-Version ist nicht 3.2.5.');
|
||||||
assert(solution.version === '3.2.4.0', 'Solution-Version ist nicht 3.2.4.0.');
|
assert(solution.version === '3.2.5.0', 'Solution-Version ist nicht 3.2.5.0.');
|
||||||
assert(!solution.features, 'Das inkompatible Seiten-Provisioning-Feature darf nicht paketiert werden.');
|
assert(!solution.features, 'Das inkompatible Seiten-Provisioning-Feature darf nicht paketiert werden.');
|
||||||
assert(!!config.bundles['portal-settings-web-part'], 'WebPart-Bundle fehlt.');
|
assert(!!config.bundles['portal-settings-web-part'], 'WebPart-Bundle fehlt.');
|
||||||
assert(copyAssets.deployCdnPath === 'temp/deploy', 'Ship-Assets werden nicht nach temp/deploy geschrieben.');
|
assert(copyAssets.deployCdnPath === 'temp/deploy', 'Ship-Assets werden nicht nach temp/deploy geschrieben.');
|
||||||
|
|||||||
Reference in New Issue
Block a user