Update Current Navigation to version 1.1.5 with new features and configurable initial expansion

This commit is contained in:
Torsten Brendgen
2026-08-23 21:36:31 +02:00
parent 61a968562d
commit 26edaf6652
11 changed files with 47 additions and 15 deletions
+5
View File
@@ -3,6 +3,7 @@ import {
selectCurrentNavigationRoot
} from '../src/services/CurrentNavigationCore';
import { ICurrentNavigationTerm } from '../src/services/CurrentNavigationTypes';
import { isInitiallyExpanded } from '../src/extensions/currentNavigation/CurrentNavigationRenderer';
let passed: number = 0;
function assert(name: string, condition: boolean): void {
@@ -27,6 +28,10 @@ const terms: ICurrentNavigationTerm[] = [
assert('German boolean is accepted', parseBoolean('ja'));
assert('local property is read', getLocalProperty(terms[0], 'CurrentNavigation.Root') === 'true');
assert('expanded opens every branch', isInitiallyExpanded('expanded', false));
assert('collapsed closes even the active branch', !isInitiallyExpanded('collapsed', true));
assert('activePath keeps the previous active branch behavior', isInitiallyExpanded('activePath', true));
assert('activePath keeps inactive branches closed', !isInitiallyExpanded('activePath', false));
assert('site collection token resolves', resolveTermUrl(term({
LocalCustomProperties: { '_Sys_Nav_SimpleLinkUrl': '~sitecollection/start' }
}), 'https://portal/sites/a') === 'https://portal/sites/a/start');