@visma-swno/vsn-navigation 1.1.0-beta.1 → 1.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -68,6 +68,7 @@ export declare class VSNNavigation extends LitElement {
|
|
|
68
68
|
private _resolveModules;
|
|
69
69
|
static styles: CSSResult[];
|
|
70
70
|
willUpdate(changed: Map<string, unknown>): void;
|
|
71
|
+
private get _resolvedLang();
|
|
71
72
|
private _getFirstLeafId;
|
|
72
73
|
/** Project tree into the shape the side-bar expects: top-level items lifted from the active module. */
|
|
73
74
|
private get _sideBarMenu();
|
|
@@ -69,6 +69,9 @@ var d = class extends e {
|
|
|
69
69
|
willUpdate(e) {
|
|
70
70
|
e.has("tree") && this.tree && (this.tree.currentItem ? this._currentItem = this.tree.currentItem : this.tree.items.length > 0 && (this._currentItem = this._getFirstLeafId(this.tree.items[0]))), e.has("modules") && this._resolveModules();
|
|
71
71
|
}
|
|
72
|
+
get _resolvedLang() {
|
|
73
|
+
return this.lang === "nb" || this.lang === "nn" ? "no" : this.lang;
|
|
74
|
+
}
|
|
72
75
|
_getFirstLeafId(e) {
|
|
73
76
|
if (c(e)) return e.id;
|
|
74
77
|
if (e.items.length === 0) throw Error(`TreeParent "${e.id}" has no children; cannot resolve first leaf.`);
|
|
@@ -96,6 +99,7 @@ var d = class extends e {
|
|
|
96
99
|
<vsn-top-bar
|
|
97
100
|
.tree=${this.tree}
|
|
98
101
|
.modules=${this._resolvedModules}
|
|
102
|
+
lang=${this._resolvedLang}
|
|
99
103
|
landing-page-url=${this.landingPageUrl ?? ""}
|
|
100
104
|
?show-help=${this.showHelp}
|
|
101
105
|
help-url=${this.helpUrl ?? ""}
|
|
@@ -110,6 +114,7 @@ var d = class extends e {
|
|
|
110
114
|
<vsn-side-bar
|
|
111
115
|
.menu=${this._sideBarMenu}
|
|
112
116
|
.modules=${this._resolvedModules}
|
|
117
|
+
lang=${this._resolvedLang}
|
|
113
118
|
.activeModuleId=${this.modules?.activeModuleId}
|
|
114
119
|
.activeModuleLabel=${this.modules?.activeModuleLabel}
|
|
115
120
|
.modulesLoading=${this._modulesLoading}
|