Initial commit

This commit is contained in:
Torsten Brendgen
2026-04-13 10:26:01 +02:00
commit bc1258ae76
116 changed files with 30409 additions and 0 deletions

29
lib/services/MenuItem.js Normal file
View File

@@ -0,0 +1,29 @@
// tslint:disable:no-any no-string-literal max-line-length
var MenuItem = (function () {
function MenuItem(term, level, siteCollectionUrl) {
this.level = level;
this.id = term.Id;
this.label = term.Name;
this.hoverText = term.LocalCustomProperties['_Sys_Nav_HoverText'];
this.pathDepth = term.PathDepth;
var rawUrl = term.LocalCustomProperties['_Sys_Nav_SimpleLinkUrl'] || term.LocalCustomProperties['_Sys_Nav_TargetUrl'];
if (rawUrl) {
this.url = siteCollectionUrl && rawUrl.indexOf('~sitecollection') === 0
? siteCollectionUrl + rawUrl.substring('~sitecollection'.length)
: rawUrl;
}
this.items = [];
}
MenuItem.prototype.hasChildren = function () {
return this.items && this.items.length > 0;
};
MenuItem.prototype.command = function () {
if (this.url) {
window.location.href = this.url;
}
};
return MenuItem;
}());
export { MenuItem };
//# sourceMappingURL=MenuItem.js.map