@molecule/app-top-nav-layout-angular 1.1.1 → 1.2.0
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.
- package/README.md +61 -11
- package/dist/slot-dom.d.ts +13 -0
- package/dist/slot-dom.d.ts.map +1 -0
- package/dist/slot-dom.js +23 -0
- package/dist/slot-dom.js.map +1 -0
- package/dist/top-nav-layout.component.d.ts +26 -6
- package/dist/top-nav-layout.component.d.ts.map +1 -1
- package/dist/top-nav-layout.component.js +78 -24
- package/dist/top-nav-layout.component.js.map +1 -1
- package/dist/types.d.ts +4 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-22T17:17:43.986Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-top-nav-layout-angular
|
|
@@ -97,7 +97,10 @@ interface TopNavLayoutProps {
|
|
|
97
97
|
navItems: ReadonlyArray<TopNavItem>
|
|
98
98
|
/** User menu, projected as `[slot=userMenu]` content. */
|
|
99
99
|
userMenu?: unknown
|
|
100
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Aria-label for the primary `<nav>`. Overrides the translated /
|
|
102
|
+
* `defaultValue` `'Primary navigation'` (prop > `t()` > default).
|
|
103
|
+
*/
|
|
101
104
|
navAriaLabel?: string
|
|
102
105
|
/** Extra classes on the outer wrapper. */
|
|
103
106
|
className?: string
|
|
@@ -119,8 +122,9 @@ TopNavLayout component.
|
|
|
119
122
|
|
|
120
123
|
Sticky top-nav shell with brand + horizontal nav + user-menu slot. The host
|
|
121
124
|
IS the outer `<div>` (`div[mol-top-nav-layout]`), matching React's root
|
|
122
|
-
exactly. The page body is projected as the element's default content
|
|
123
|
-
|
|
125
|
+
exactly. The page body is projected as the element's default content; without
|
|
126
|
+
one the `<main>` renders `<mol-routed-view />` (the matched child route,
|
|
127
|
+
through whichever routing bond the app wired), and the user menu is
|
|
124
128
|
projected as `[slot=userMenu]` content. Nav labels are hidden below the `md`
|
|
125
129
|
breakpoint (icon-only mobile nav), so always provide `icon` names; they
|
|
126
130
|
render as Material Symbols ligatures and need the Material Symbols font
|
|
@@ -131,7 +135,7 @@ rendered as-is: pass an already-translated string.
|
|
|
131
135
|
@Component({
|
|
132
136
|
selector: 'div[mol-top-nav-layout]',
|
|
133
137
|
standalone: true,
|
|
134
|
-
imports: [Link],
|
|
138
|
+
imports: [Link, RoutedView],
|
|
135
139
|
inputs: ['appName', 'logoTo', 'navItems', 'navAriaLabel', 'className', 'dataMolId'],
|
|
136
140
|
host: {
|
|
137
141
|
'[class]': 'classes()',
|
|
@@ -158,24 +162,44 @@ rendered as-is: pass an already-translated string.
|
|
|
158
162
|
<ng-content select="[slot=userMenu]"></ng-content>
|
|
159
163
|
</div>
|
|
160
164
|
</header>
|
|
161
|
-
<main
|
|
165
|
+
<main>
|
|
166
|
+
<span #pageSlot data-parity-unwrap style="display: contents"><ng-content></ng-content></span>
|
|
167
|
+
@if (routed()) {
|
|
168
|
+
<mol-routed-view />
|
|
169
|
+
}
|
|
170
|
+
</main>`,
|
|
162
171
|
})
|
|
163
|
-
export class TopNavLayout implements OnDestroy {
|
|
172
|
+
export class TopNavLayout implements AfterViewInit, AfterViewChecked, OnDestroy {
|
|
164
173
|
/** Brand text shown in the top-left link (typically the app name). */
|
|
165
174
|
appName = ''
|
|
166
175
|
/** Path the brand link navigates to (defaults to `'/'` at read time). */
|
|
167
176
|
logoTo?: string
|
|
168
177
|
/** Horizontal nav items rendered in the header. */
|
|
169
178
|
navItems: ReadonlyArray<TopNavItem> = []
|
|
170
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Aria-label for the primary `<nav>`. Overrides the translated /
|
|
181
|
+
* `defaultValue` `'Primary navigation'` (prop > `t()` > default).
|
|
182
|
+
*/
|
|
171
183
|
navAriaLabel?: string
|
|
172
184
|
/** Extra classes on the outer wrapper. */
|
|
173
185
|
className?: string
|
|
174
186
|
/** `data-mol-id` for AI-agent selectors. */
|
|
175
187
|
dataMolId?: string
|
|
176
188
|
|
|
189
|
+
/** The page body's projection capture point. */
|
|
190
|
+
@ViewChild('pageSlot') private pageSlot?: ElementRef<HTMLElement>
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Whether the `<main>` renders the routed view: no page body was projected. A signal the
|
|
194
|
+
* template reads, so the routed view is created only then (it throws without one).
|
|
195
|
+
*/
|
|
196
|
+
readonly routed = signal(false)
|
|
197
|
+
|
|
177
198
|
private readonly router = useRouterInstance()
|
|
178
199
|
|
|
200
|
+
/** The i18n handle (locale-reactive), read in an injection context. */
|
|
201
|
+
private readonly i18n = useTranslation()
|
|
202
|
+
|
|
179
203
|
/** The current location, kept current so active items follow navigation. */
|
|
180
204
|
private readonly location = signal(this.router.getLocation())
|
|
181
205
|
|
|
@@ -186,6 +210,22 @@ export class TopNavLayout implements OnDestroy {
|
|
|
186
210
|
this.stop()
|
|
187
211
|
}
|
|
188
212
|
|
|
213
|
+
/** Decides the `<main>` content once the capture point exists. */
|
|
214
|
+
ngAfterViewInit(): void {
|
|
215
|
+
this.syncRouted()
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Follows a page body projected or removed later. */
|
|
219
|
+
ngAfterViewChecked(): void {
|
|
220
|
+
this.syncRouted()
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** React renders `children ?? <RoutedView />`: the routed view only without a page body. */
|
|
224
|
+
private syncRouted(): void {
|
|
225
|
+
const page = this.pageSlot?.nativeElement
|
|
226
|
+
if (page) this.routed.set(!hasNodes(page))
|
|
227
|
+
}
|
|
228
|
+
|
|
189
229
|
/**
|
|
190
230
|
* The current class map.
|
|
191
231
|
* @returns The UIClassMap.
|
|
@@ -267,11 +307,17 @@ export class TopNavLayout implements OnDestroy {
|
|
|
267
307
|
}
|
|
268
308
|
|
|
269
309
|
/**
|
|
270
|
-
* The nav region's aria-label (
|
|
310
|
+
* The nav region's aria-label: prop > `t()` > default. Read in the template,
|
|
311
|
+
* so a locale switch re-renders it, as React's does.
|
|
271
312
|
* @returns The aria-label.
|
|
272
313
|
*/
|
|
273
314
|
navLabel(): string {
|
|
274
|
-
return
|
|
315
|
+
return (
|
|
316
|
+
this.navAriaLabel ??
|
|
317
|
+
this.i18n.t('topNavLayout.aria.primaryNavigation', undefined, {
|
|
318
|
+
defaultValue: 'Primary navigation',
|
|
319
|
+
})
|
|
320
|
+
)
|
|
275
321
|
}
|
|
276
322
|
|
|
277
323
|
/**
|
|
@@ -315,7 +361,7 @@ Peer dependencies:
|
|
|
315
361
|
- `@angular/common` ^22.0.0
|
|
316
362
|
- `@angular/core` ^22.0.0
|
|
317
363
|
- `@angular/platform-browser` ^22.0.0
|
|
318
|
-
- `@molecule/app-angular` ^3.
|
|
364
|
+
- `@molecule/app-angular` ^3.11.0
|
|
319
365
|
- `@molecule/app-ui` ^1.3.11
|
|
320
366
|
- `@molecule/app-ui-angular` ^1.1.0
|
|
321
367
|
|
|
@@ -336,3 +382,7 @@ render as Material Symbols ligatures and need the Material Symbols font
|
|
|
336
382
|
loaded by the host app. Styling comes from the bonded ClassMap, so a
|
|
337
383
|
theme/ClassMap bond is a prerequisite. `label` is rendered as-is: pass an
|
|
338
384
|
already-translated string.
|
|
385
|
+
|
|
386
|
+
## Translations
|
|
387
|
+
|
|
388
|
+
Translation strings are provided by `@molecule/app-locales-top-nav-layout`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM helper for the page-body capture point of {@link TopNavLayout}.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Whether an ng-content wrapper captured any element or text node.
|
|
8
|
+
*
|
|
9
|
+
* @param el - The wrapper element.
|
|
10
|
+
* @returns True when at least one projected node exists.
|
|
11
|
+
*/
|
|
12
|
+
export declare const hasNodes: (el: Element | undefined | null) => boolean;
|
|
13
|
+
//# sourceMappingURL=slot-dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-dom.d.ts","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,GAAI,IAAI,OAAO,GAAG,SAAS,GAAG,IAAI,KAAG,OAOzD,CAAA"}
|
package/dist/slot-dom.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM helper for the page-body capture point of {@link TopNavLayout}.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Whether an ng-content wrapper captured any element or text node.
|
|
8
|
+
*
|
|
9
|
+
* @param el - The wrapper element.
|
|
10
|
+
* @returns True when at least one projected node exists.
|
|
11
|
+
*/
|
|
12
|
+
export const hasNodes = (el) => {
|
|
13
|
+
if (!el)
|
|
14
|
+
return false;
|
|
15
|
+
for (const node of Array.from(el.childNodes)) {
|
|
16
|
+
if (node.nodeType === 1)
|
|
17
|
+
return true;
|
|
18
|
+
if (node.nodeType === 3 && (node.textContent ?? '').trim())
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
return false;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=slot-dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slot-dom.js","sourceRoot":"","sources":["../src/slot-dom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAA8B,EAAW,EAAE;IAClE,IAAI,CAAC,EAAE;QAAE,OAAO,KAAK,CAAA;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QACpC,IAAI,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE;YAAE,OAAO,IAAI,CAAA;IACzE,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { type OnDestroy } from '@angular/core';
|
|
6
|
+
import { type AfterViewChecked, type AfterViewInit, type OnDestroy } from '@angular/core';
|
|
7
7
|
import type { UIClassMap } from '@molecule/app-ui';
|
|
8
8
|
import type { TopNavItem } from './types.js';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
@@ -12,33 +12,52 @@ import * as i0 from "@angular/core";
|
|
|
12
12
|
*
|
|
13
13
|
* Sticky top-nav shell with brand + horizontal nav + user-menu slot. The host
|
|
14
14
|
* IS the outer `<div>` (`div[mol-top-nav-layout]`), matching React's root
|
|
15
|
-
* exactly. The page body is projected as the element's default content
|
|
16
|
-
*
|
|
15
|
+
* exactly. The page body is projected as the element's default content; without
|
|
16
|
+
* one the `<main>` renders `<mol-routed-view />` (the matched child route,
|
|
17
|
+
* through whichever routing bond the app wired), and the user menu is
|
|
17
18
|
* projected as `[slot=userMenu]` content. Nav labels are hidden below the `md`
|
|
18
19
|
* breakpoint (icon-only mobile nav), so always provide `icon` names; they
|
|
19
20
|
* render as Material Symbols ligatures and need the Material Symbols font
|
|
20
21
|
* loaded by the host app. Styling comes from the bonded ClassMap. `label` is
|
|
21
22
|
* rendered as-is: pass an already-translated string.
|
|
22
23
|
*/
|
|
23
|
-
export declare class TopNavLayout implements OnDestroy {
|
|
24
|
+
export declare class TopNavLayout implements AfterViewInit, AfterViewChecked, OnDestroy {
|
|
24
25
|
/** Brand text shown in the top-left link (typically the app name). */
|
|
25
26
|
appName: string;
|
|
26
27
|
/** Path the brand link navigates to (defaults to `'/'` at read time). */
|
|
27
28
|
logoTo?: string;
|
|
28
29
|
/** Horizontal nav items rendered in the header. */
|
|
29
30
|
navItems: ReadonlyArray<TopNavItem>;
|
|
30
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Aria-label for the primary `<nav>`. Overrides the translated /
|
|
33
|
+
* `defaultValue` `'Primary navigation'` (prop > `t()` > default).
|
|
34
|
+
*/
|
|
31
35
|
navAriaLabel?: string;
|
|
32
36
|
/** Extra classes on the outer wrapper. */
|
|
33
37
|
className?: string;
|
|
34
38
|
/** `data-mol-id` for AI-agent selectors. */
|
|
35
39
|
dataMolId?: string;
|
|
40
|
+
/** The page body's projection capture point. */
|
|
41
|
+
private pageSlot?;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the `<main>` renders the routed view: no page body was projected. A signal the
|
|
44
|
+
* template reads, so the routed view is created only then (it throws without one).
|
|
45
|
+
*/
|
|
46
|
+
readonly routed: import("@angular/core").WritableSignal<boolean>;
|
|
36
47
|
private readonly router;
|
|
48
|
+
/** The i18n handle (locale-reactive), read in an injection context. */
|
|
49
|
+
private readonly i18n;
|
|
37
50
|
/** The current location, kept current so active items follow navigation. */
|
|
38
51
|
private readonly location;
|
|
39
52
|
private readonly stop;
|
|
40
53
|
/** Stops listening to the router when the component goes away. */
|
|
41
54
|
ngOnDestroy(): void;
|
|
55
|
+
/** Decides the `<main>` content once the capture point exists. */
|
|
56
|
+
ngAfterViewInit(): void;
|
|
57
|
+
/** Follows a page body projected or removed later. */
|
|
58
|
+
ngAfterViewChecked(): void;
|
|
59
|
+
/** React renders `children ?? <RoutedView />`: the routed view only without a page body. */
|
|
60
|
+
private syncRouted;
|
|
42
61
|
/**
|
|
43
62
|
* The current class map.
|
|
44
63
|
* @returns The UIClassMap.
|
|
@@ -86,7 +105,8 @@ export declare class TopNavLayout implements OnDestroy {
|
|
|
86
105
|
*/
|
|
87
106
|
logoPath(): string;
|
|
88
107
|
/**
|
|
89
|
-
* The nav region's aria-label (
|
|
108
|
+
* The nav region's aria-label: prop > `t()` > default. Read in the template,
|
|
109
|
+
* so a locale switch re-renders it, as React's does.
|
|
90
110
|
* @returns The aria-label.
|
|
91
111
|
*/
|
|
92
112
|
navLabel(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-nav-layout.component.d.ts","sourceRoot":"","sources":["../src/top-nav-layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"top-nav-layout.component.d.ts","sourceRoot":"","sources":["../src/top-nav-layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAGlB,KAAK,SAAS,EAGf,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAIlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;;AAmB5C;;;;;;;;;;;;;GAaG;AACH,qBAqCa,YAAa,YAAW,aAAa,EAAE,gBAAgB,EAAE,SAAS;IAC7E,sEAAsE;IACtE,OAAO,SAAK;IACZ,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAK;IACxC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,gDAAgD;IACzB,OAAO,CAAC,QAAQ,CAAC,CAAyB;IAEjE;;;OAGG;IACH,QAAQ,CAAC,MAAM,kDAAgB;IAE/B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C,uEAAuE;IACvE,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IAExC,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoC;IAE7D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA4E;IAEjG,kEAAkE;IAClE,WAAW,IAAI,IAAI;IAInB,kEAAkE;IAClE,eAAe,IAAI,IAAI;IAIvB,sDAAsD;IACtD,kBAAkB,IAAI,IAAI;IAI1B,4FAA4F;IAC5F,OAAO,CAAC,UAAU;IAKlB;;;OAGG;IACH,EAAE,IAAI,UAAU;IAIhB;;;OAGG;IACH,OAAO,IAAI,MAAM;IAIjB;;;OAGG;IACH,aAAa,IAAI,MAAM;IAIvB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAWpB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;OAGG;IACH,UAAU,IAAI,MAAM;IAIpB;;;OAGG;IACH,WAAW,IAAI,MAAM;IAIrB;;;OAGG;IACH,YAAY,IAAI,MAAM;IAItB;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IAIlB;;;;OAIG;IACH,QAAQ,IAAI,MAAM;IASlB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAInC;;;;;OAKG;IACH,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM;yCAtK1B,YAAY;2CAAZ,YAAY;CAoLxB"}
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import { Component, signal } from '@angular/core';
|
|
7
|
-
import { Link, useRouterInstance } from '@molecule/app-angular';
|
|
6
|
+
import { Component, signal, ViewChild, } from '@angular/core';
|
|
7
|
+
import { Link, RoutedView, useRouterInstance, useTranslation } from '@molecule/app-angular';
|
|
8
8
|
import { getClassMap } from '@molecule/app-ui';
|
|
9
|
+
import { hasNodes } from './slot-dom.js';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
|
-
const _c0 = [
|
|
11
|
-
const _c1 = ["
|
|
11
|
+
const _c0 = ["pageSlot"];
|
|
12
|
+
const _c1 = [[["", "slot", "usermenu"]], "*"];
|
|
13
|
+
const _c2 = ["[slot=userMenu]", "*"];
|
|
12
14
|
const _forTrack0 = ($index, $item) => $item.key;
|
|
13
15
|
function TopNavLayout_For_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
-
i0.ɵɵelementStart(0, "span",
|
|
16
|
+
i0.ɵɵelementStart(0, "span", 5);
|
|
15
17
|
i0.ɵɵtext(1);
|
|
16
18
|
i0.ɵɵelementEnd();
|
|
17
19
|
} if (rf & 2) {
|
|
@@ -22,8 +24,8 @@ function TopNavLayout_For_6_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
|
22
24
|
i0.ɵɵtextInterpolate(item_r1.icon);
|
|
23
25
|
} }
|
|
24
26
|
function TopNavLayout_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
-
i0.ɵɵelementStart(0, "a",
|
|
26
|
-
i0.ɵɵconditionalCreate(1, TopNavLayout_For_6_Conditional_1_Template, 2, 3, "span",
|
|
27
|
+
i0.ɵɵelementStart(0, "a", 1);
|
|
28
|
+
i0.ɵɵconditionalCreate(1, TopNavLayout_For_6_Conditional_1_Template, 2, 3, "span", 4);
|
|
27
29
|
i0.ɵɵelementStart(2, "span");
|
|
28
30
|
i0.ɵɵtext(3);
|
|
29
31
|
i0.ɵɵelementEnd()();
|
|
@@ -40,6 +42,9 @@ function TopNavLayout_For_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
40
42
|
i0.ɵɵadvance();
|
|
41
43
|
i0.ɵɵtextInterpolate(item_r1.label);
|
|
42
44
|
} }
|
|
45
|
+
function TopNavLayout_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵelement(0, "mol-routed-view");
|
|
47
|
+
} }
|
|
43
48
|
/**
|
|
44
49
|
* Whether react-router's `<NavLink>` would mark `to` active at `pathname`: the
|
|
45
50
|
* pathnames are equal, or the location continues beyond `to` on a segment
|
|
@@ -61,8 +66,9 @@ const navItemActive = (pathname, to) => {
|
|
|
61
66
|
*
|
|
62
67
|
* Sticky top-nav shell with brand + horizontal nav + user-menu slot. The host
|
|
63
68
|
* IS the outer `<div>` (`div[mol-top-nav-layout]`), matching React's root
|
|
64
|
-
* exactly. The page body is projected as the element's default content
|
|
65
|
-
*
|
|
69
|
+
* exactly. The page body is projected as the element's default content; without
|
|
70
|
+
* one the `<main>` renders `<mol-routed-view />` (the matched child route,
|
|
71
|
+
* through whichever routing bond the app wired), and the user menu is
|
|
66
72
|
* projected as `[slot=userMenu]` content. Nav labels are hidden below the `md`
|
|
67
73
|
* breakpoint (icon-only mobile nav), so always provide `icon` names; they
|
|
68
74
|
* render as Material Symbols ligatures and need the Material Symbols font
|
|
@@ -76,13 +82,26 @@ export class TopNavLayout {
|
|
|
76
82
|
logoTo;
|
|
77
83
|
/** Horizontal nav items rendered in the header. */
|
|
78
84
|
navItems = [];
|
|
79
|
-
/**
|
|
85
|
+
/**
|
|
86
|
+
* Aria-label for the primary `<nav>`. Overrides the translated /
|
|
87
|
+
* `defaultValue` `'Primary navigation'` (prop > `t()` > default).
|
|
88
|
+
*/
|
|
80
89
|
navAriaLabel;
|
|
81
90
|
/** Extra classes on the outer wrapper. */
|
|
82
91
|
className;
|
|
83
92
|
/** `data-mol-id` for AI-agent selectors. */
|
|
84
93
|
dataMolId;
|
|
94
|
+
/** The page body's projection capture point. */
|
|
95
|
+
pageSlot;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the `<main>` renders the routed view: no page body was projected. A signal the
|
|
98
|
+
* template reads, so the routed view is created only then (it throws without one).
|
|
99
|
+
*/
|
|
100
|
+
routed = signal(false, /* @ts-ignore */
|
|
101
|
+
...(ngDevMode ? [{ debugName: "routed" }] : /* istanbul ignore next */ []));
|
|
85
102
|
router = useRouterInstance();
|
|
103
|
+
/** The i18n handle (locale-reactive), read in an injection context. */
|
|
104
|
+
i18n = useTranslation();
|
|
86
105
|
/** The current location, kept current so active items follow navigation. */
|
|
87
106
|
location = signal(this.router.getLocation(), /* @ts-ignore */
|
|
88
107
|
...(ngDevMode ? [{ debugName: "location" }] : /* istanbul ignore next */ []));
|
|
@@ -91,6 +110,20 @@ export class TopNavLayout {
|
|
|
91
110
|
ngOnDestroy() {
|
|
92
111
|
this.stop();
|
|
93
112
|
}
|
|
113
|
+
/** Decides the `<main>` content once the capture point exists. */
|
|
114
|
+
ngAfterViewInit() {
|
|
115
|
+
this.syncRouted();
|
|
116
|
+
}
|
|
117
|
+
/** Follows a page body projected or removed later. */
|
|
118
|
+
ngAfterViewChecked() {
|
|
119
|
+
this.syncRouted();
|
|
120
|
+
}
|
|
121
|
+
/** React renders `children ?? <RoutedView />`: the routed view only without a page body. */
|
|
122
|
+
syncRouted() {
|
|
123
|
+
const page = this.pageSlot?.nativeElement;
|
|
124
|
+
if (page)
|
|
125
|
+
this.routed.set(!hasNodes(page));
|
|
126
|
+
}
|
|
94
127
|
/**
|
|
95
128
|
* The current class map.
|
|
96
129
|
* @returns The UIClassMap.
|
|
@@ -157,11 +190,15 @@ export class TopNavLayout {
|
|
|
157
190
|
return this.logoTo ?? '/';
|
|
158
191
|
}
|
|
159
192
|
/**
|
|
160
|
-
* The nav region's aria-label (
|
|
193
|
+
* The nav region's aria-label: prop > `t()` > default. Read in the template,
|
|
194
|
+
* so a locale switch re-renders it, as React's does.
|
|
161
195
|
* @returns The aria-label.
|
|
162
196
|
*/
|
|
163
197
|
navLabel() {
|
|
164
|
-
return this.navAriaLabel ??
|
|
198
|
+
return (this.navAriaLabel ??
|
|
199
|
+
this.i18n.t('topNavLayout.aria.primaryNavigation', undefined, {
|
|
200
|
+
defaultValue: 'Primary navigation',
|
|
201
|
+
}));
|
|
165
202
|
}
|
|
166
203
|
/**
|
|
167
204
|
* Whether one nav item's link is active at the current location.
|
|
@@ -184,21 +221,28 @@ export class TopNavLayout {
|
|
|
184
221
|
: cm.cn(cm.textMuted, cm.topNavLayoutNavItemIdle));
|
|
185
222
|
}
|
|
186
223
|
static ɵfac = function TopNavLayout_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TopNavLayout)(); };
|
|
187
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TopNavLayout, selectors: [["div", "mol-top-nav-layout", ""]],
|
|
224
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TopNavLayout, selectors: [["div", "mol-top-nav-layout", ""]], viewQuery: function TopNavLayout_Query(rf, ctx) { if (rf & 1) {
|
|
225
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
226
|
+
} if (rf & 2) {
|
|
227
|
+
let _t;
|
|
228
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.pageSlot = _t.first);
|
|
229
|
+
} }, hostVars: 3, hostBindings: function TopNavLayout_HostBindings(rf, ctx) { if (rf & 2) {
|
|
188
230
|
i0.ɵɵattribute("data-mol-id", ctx.dataMolId ?? null);
|
|
189
231
|
i0.ɵɵclassMap(ctx.classes());
|
|
190
|
-
} }, inputs: { appName: "appName", logoTo: "logoTo", navItems: "navItems", navAriaLabel: "navAriaLabel", className: "className", dataMolId: "dataMolId" }, ngContentSelectors:
|
|
191
|
-
i0.ɵɵprojectionDef(
|
|
192
|
-
i0.ɵɵelementStart(0, "header")(1, "div")(2, "a",
|
|
232
|
+
} }, inputs: { appName: "appName", logoTo: "logoTo", navItems: "navItems", navAriaLabel: "navAriaLabel", className: "className", dataMolId: "dataMolId" }, ngContentSelectors: _c2, decls: 13, vars: 12, consts: [["pageSlot", ""], [3, "molLink"], [3, "molLink", "class"], ["data-parity-unwrap", "", 2, "display", "contents"], ["aria-hidden", "true", 3, "class"], ["aria-hidden", "true"]], template: function TopNavLayout_Template(rf, ctx) { if (rf & 1) {
|
|
233
|
+
i0.ɵɵprojectionDef(_c1);
|
|
234
|
+
i0.ɵɵelementStart(0, "header")(1, "div")(2, "a", 1);
|
|
193
235
|
i0.ɵɵtext(3);
|
|
194
236
|
i0.ɵɵelementEnd();
|
|
195
237
|
i0.ɵɵelementStart(4, "nav");
|
|
196
|
-
i0.ɵɵrepeaterCreate(5, TopNavLayout_For_6_Template, 4, 9, "a",
|
|
238
|
+
i0.ɵɵrepeaterCreate(5, TopNavLayout_For_6_Template, 4, 9, "a", 2, _forTrack0);
|
|
197
239
|
i0.ɵɵelementEnd();
|
|
198
240
|
i0.ɵɵprojection(7);
|
|
199
241
|
i0.ɵɵelementEnd()();
|
|
200
|
-
i0.ɵɵelementStart(8, "main");
|
|
201
|
-
i0.ɵɵprojection(
|
|
242
|
+
i0.ɵɵelementStart(8, "main")(9, "span", 3, 0);
|
|
243
|
+
i0.ɵɵprojection(11, 1);
|
|
244
|
+
i0.ɵɵelementEnd();
|
|
245
|
+
i0.ɵɵconditionalCreate(12, TopNavLayout_Conditional_12_Template, 1, 0, "mol-routed-view");
|
|
202
246
|
i0.ɵɵelementEnd();
|
|
203
247
|
} if (rf & 2) {
|
|
204
248
|
i0.ɵɵclassMap(ctx.headerClasses());
|
|
@@ -214,14 +258,16 @@ export class TopNavLayout {
|
|
|
214
258
|
i0.ɵɵattribute("aria-label", ctx.navLabel());
|
|
215
259
|
i0.ɵɵadvance();
|
|
216
260
|
i0.ɵɵrepeater(ctx.navItems);
|
|
217
|
-
|
|
261
|
+
i0.ɵɵadvance(7);
|
|
262
|
+
i0.ɵɵconditional(ctx.routed() ? 12 : -1);
|
|
263
|
+
} }, dependencies: [Link, RoutedView], encapsulation: 2 });
|
|
218
264
|
}
|
|
219
265
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TopNavLayout, [{
|
|
220
266
|
type: Component,
|
|
221
267
|
args: [{
|
|
222
268
|
selector: 'div[mol-top-nav-layout]',
|
|
223
269
|
standalone: true,
|
|
224
|
-
imports: [Link],
|
|
270
|
+
imports: [Link, RoutedView],
|
|
225
271
|
inputs: ['appName', 'logoTo', 'navItems', 'navAriaLabel', 'className', 'dataMolId'],
|
|
226
272
|
host: {
|
|
227
273
|
'[class]': 'classes()',
|
|
@@ -248,8 +294,16 @@ export class TopNavLayout {
|
|
|
248
294
|
<ng-content select="[slot=userMenu]"></ng-content>
|
|
249
295
|
</div>
|
|
250
296
|
</header>
|
|
251
|
-
<main
|
|
297
|
+
<main>
|
|
298
|
+
<span #pageSlot data-parity-unwrap style="display: contents"><ng-content></ng-content></span>
|
|
299
|
+
@if (routed()) {
|
|
300
|
+
<mol-routed-view />
|
|
301
|
+
}
|
|
302
|
+
</main>`,
|
|
252
303
|
}]
|
|
253
|
-
}], null,
|
|
254
|
-
|
|
304
|
+
}], null, { pageSlot: [{
|
|
305
|
+
type: ViewChild,
|
|
306
|
+
args: ['pageSlot']
|
|
307
|
+
}] }); })();
|
|
308
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TopNavLayout, { className: "TopNavLayout", filePath: "top-nav-layout.component.ts", lineNumber: 92 }); })();
|
|
255
309
|
//# sourceMappingURL=top-nav-layout.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-nav-layout.component.js","sourceRoot":"","sources":["../src/top-nav-layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"top-nav-layout.component.js","sourceRoot":"","sources":["../src/top-nav-layout.component.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,SAAS,EAGT,MAAM,EACN,SAAS,GACV,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE3F,OAAO,EAAE,WAAW,E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tB,+BAAsB;YACC,cAAwB;YAAxB,iCAAwB;YAA/C,wCAAsB;YAA0B,cAAa;YAAb,iCAAa;YAC3D,cAAsB;YAAtB,+BAAsB;;YACzB,cAYC;YAZD,2BAYC;YAOL,eAEC;YAFD,wCAEC;4BA/BK,IAAI,EAAE,UAAU;;iFAkCf,YAAY;cArCxB,SAAS;eAAC;gBACT,QAAQ,EAAE,yBAAyB;gBACnC,UAAU,EAAE,IAAI;gBAChB,OAAO,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC;gBAC3B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,CAAC;gBACnF,IAAI,EAAE;oBACJ,SAAS,EAAE,WAAW;oBACtB,oBAAoB,EAAE,mBAAmB;iBAC1C;gBACD,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;YA0BA;aACX;;kBAmBE,SAAS;mBAAC,UAAU;;kFAlBV,YAAY"}
|
package/dist/types.d.ts
CHANGED
|
@@ -31,7 +31,10 @@ export interface TopNavLayoutProps {
|
|
|
31
31
|
navItems: ReadonlyArray<TopNavItem>;
|
|
32
32
|
/** User menu, projected as `[slot=userMenu]` content. */
|
|
33
33
|
userMenu?: unknown;
|
|
34
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Aria-label for the primary `<nav>`. Overrides the translated /
|
|
36
|
+
* `defaultValue` `'Primary navigation'` (prop > `t()` > default).
|
|
37
|
+
*/
|
|
35
38
|
navAriaLabel?: string;
|
|
36
39
|
/** Extra classes on the outer wrapper. */
|
|
37
40
|
className?: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IACnC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,4DAA4D;AAC5D,MAAM,WAAW,UAAU;IACzB,mCAAmC;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,gFAAgF;IAChF,GAAG,EAAE,MAAM,CAAA;IACX,wEAAwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,4FAA4F;IAC5F,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mDAAmD;IACnD,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IACnC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-top-nav-layout-angular",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Top navigation app shell: brand link + horizontal NavLinks + UserMenu slot, with a router outlet for nested routes",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-top-nav-layout-angular",
|
|
6
6
|
"type": "module",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@angular/common": "^22.0.0",
|
|
47
47
|
"@angular/core": "^22.0.0",
|
|
48
48
|
"@angular/platform-browser": "^22.0.0",
|
|
49
|
-
"@molecule/app-angular": "^3.
|
|
49
|
+
"@molecule/app-angular": "^3.11.0",
|
|
50
50
|
"@molecule/app-ui": "^1.3.11",
|
|
51
51
|
"@molecule/app-ui-angular": "^1.1.0"
|
|
52
52
|
},
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"@angular/compiler-cli": "22.2.3",
|
|
57
57
|
"@angular/core": "22.2.3",
|
|
58
58
|
"@angular/platform-browser": "22.2.3",
|
|
59
|
-
"@molecule/app-angular": "3.
|
|
59
|
+
"@molecule/app-angular": "3.11.0",
|
|
60
60
|
"@molecule/app-framework-conformance": "0.0.0",
|
|
61
61
|
"@molecule/app-i18n": "1.2.2",
|
|
62
62
|
"@molecule/app-icons": "1.0.4",
|
|
63
|
-
"@molecule/app-ui": "1.
|
|
64
|
-
"@molecule/app-ui-angular": "1.
|
|
63
|
+
"@molecule/app-ui": "1.5.0",
|
|
64
|
+
"@molecule/app-ui-angular": "1.4.0",
|
|
65
65
|
"@types/node": "26.6.5",
|
|
66
66
|
"jsdom": "30.1.3",
|
|
67
67
|
"rxjs": "7.8.2",
|