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');
+1
View File
@@ -7,6 +7,7 @@
"files": [
"../src/services/CurrentNavigationTypes.ts",
"../src/services/CurrentNavigationCore.ts",
"../src/extensions/currentNavigation/CurrentNavigationRenderer.ts",
"CurrentNavigationCore.test.ts"
]
}
+4 -2
View File
@@ -9,8 +9,8 @@ var manifest = json('src/extensions/currentNavigation/CurrentNavigationApplicati
var app = read('src/extensions/currentNavigation/CurrentNavigationApplicationCustomizer.ts');
var renderer = read('src/extensions/currentNavigation/CurrentNavigationRenderer.ts');
var service = read('src/services/CurrentNavigationTaxonomyService.ts');
assert('package version', packageJson.version === '1.1.4');
assert('solution version', solution.version === '1.1.4.0');
assert('package version', packageJson.version === '1.1.5');
assert('solution version', solution.version === '1.1.5.0');
assert('tenant deployment', solution.skipFeatureDeployment === true);
assert('component type', manifest.extensionType === 'ApplicationCustomizer');
assert('safe renderer', renderer.indexOf('innerHTML') < 0 && app.indexOf('innerHTML') < 0);
@@ -26,6 +26,8 @@ assert('custom navigation is appended below SiteNavigation', app.indexOf('this.s
assert('observer cleanup', app.indexOf('observer.disconnect()') >= 0);
assert('treeview semantics', renderer.indexOf("setAttribute('role', root ? 'tree' : 'group')") >= 0 &&
renderer.indexOf("setAttribute('role', 'treeitem')") >= 0);
assert('configurable initial expansion', renderer.indexOf('isInitiallyExpanded(this.initialExpansion') >= 0 &&
renderer.indexOf("initialExpansion === 'expanded'") >= 0 && app.indexOf('this.initialExpansion()') >= 0);
assert('legacy selector compatibility', renderer.indexOf(':scope') < 0);
assert('local properties loaded', service.indexOf('LocalCustomProperties') >= 0);
assert('root property present', read('src/services/CurrentNavigationCore.ts').indexOf('CurrentNavigation.Root') >= 0);