@genesislcap/foundation-header 14.344.2 → 14.345.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.
@@ -655,6 +655,26 @@
655
655
  }
656
656
  ],
657
657
  "description": "Handles the click event for a navigation button"
658
+ },
659
+ {
660
+ "kind": "method",
661
+ "name": "hasActiveChild",
662
+ "privacy": "public",
663
+ "return": {
664
+ "type": {
665
+ "text": ""
666
+ }
667
+ },
668
+ "parameters": [
669
+ {
670
+ "name": "navItem",
671
+ "type": {
672
+ "text": "FoundationRouteNavItem"
673
+ },
674
+ "description": "The navigation item to check"
675
+ }
676
+ ],
677
+ "description": "Check if any child nav item matches the current route"
658
678
  }
659
679
  ],
660
680
  "events": [
@@ -1322,6 +1342,30 @@
1322
1342
  "name": "Navigation",
1323
1343
  "module": "src/main/main.ts"
1324
1344
  }
1345
+ },
1346
+ {
1347
+ "kind": "method",
1348
+ "name": "hasActiveChild",
1349
+ "privacy": "public",
1350
+ "return": {
1351
+ "type": {
1352
+ "text": ""
1353
+ }
1354
+ },
1355
+ "parameters": [
1356
+ {
1357
+ "name": "navItem",
1358
+ "type": {
1359
+ "text": "FoundationRouteNavItem"
1360
+ },
1361
+ "description": "The navigation item to check"
1362
+ }
1363
+ ],
1364
+ "description": "Check if any child nav item matches the current route",
1365
+ "inheritedFrom": {
1366
+ "name": "Navigation",
1367
+ "module": "src/main/main.ts"
1368
+ }
1325
1369
  }
1326
1370
  ],
1327
1371
  "superclass": {
@@ -2249,6 +2293,30 @@
2249
2293
  "name": "Navigation",
2250
2294
  "module": "src/main/main.ts"
2251
2295
  }
2296
+ },
2297
+ {
2298
+ "kind": "method",
2299
+ "name": "hasActiveChild",
2300
+ "privacy": "public",
2301
+ "return": {
2302
+ "type": {
2303
+ "text": ""
2304
+ }
2305
+ },
2306
+ "parameters": [
2307
+ {
2308
+ "name": "navItem",
2309
+ "type": {
2310
+ "text": "FoundationRouteNavItem"
2311
+ },
2312
+ "description": "The navigation item to check"
2313
+ }
2314
+ ],
2315
+ "description": "Check if any child nav item matches the current route",
2316
+ "inheritedFrom": {
2317
+ "name": "Navigation",
2318
+ "module": "src/main/main.ts"
2319
+ }
2252
2320
  }
2253
2321
  ],
2254
2322
  "events": [
@@ -2785,6 +2853,30 @@
2785
2853
  "name": "Navigation",
2786
2854
  "module": "src/main/main.ts"
2787
2855
  }
2856
+ },
2857
+ {
2858
+ "kind": "method",
2859
+ "name": "hasActiveChild",
2860
+ "privacy": "public",
2861
+ "return": {
2862
+ "type": {
2863
+ "text": ""
2864
+ }
2865
+ },
2866
+ "parameters": [
2867
+ {
2868
+ "name": "navItem",
2869
+ "type": {
2870
+ "text": "FoundationRouteNavItem"
2871
+ },
2872
+ "description": "The navigation item to check"
2873
+ }
2874
+ ],
2875
+ "description": "Check if any child nav item matches the current route",
2876
+ "inheritedFrom": {
2877
+ "name": "Navigation",
2878
+ "module": "src/main/main.ts"
2879
+ }
2788
2880
  }
2789
2881
  ],
2790
2882
  "superclass": {
@@ -491,6 +491,16 @@ export declare class Navigation extends Navigation_base {
491
491
  * Clean up the inactivity manager
492
492
  */
493
493
  private cleanupInactivityManager;
494
+ /**
495
+ * Initialize framework-agnostic route detection
496
+ * @internal
497
+ */
498
+ private initializeRouteDetection;
499
+ /**
500
+ * Clean up route detection listeners and polling
501
+ * @internal
502
+ */
503
+ private cleanupRouteDetection;
494
504
  /**
495
505
  * Called when the component is disconnected from the DOM
496
506
  */
@@ -739,6 +749,28 @@ export declare class Navigation extends Navigation_base {
739
749
  * @param routeNavItem - The navigation item that was clicked
740
750
  */
741
751
  handleNavButtonClick(routeNavItem: FoundationRouteNavItem): void;
752
+ /**
753
+ * Current pathname for route highlighting
754
+ * @internal
755
+ */
756
+ pathName: string;
757
+ /**
758
+ * Interval ID for polling route changes
759
+ * @internal
760
+ */
761
+ private routeCheckInterval;
762
+ /**
763
+ * Handle route changes by updating the pathName observable
764
+ * @internal
765
+ */
766
+ private handleRouteChange;
767
+ /**
768
+ * Check if any child nav item matches the current route
769
+ * @param navItem - The navigation item to check
770
+ * @returns true if any child matches the current path
771
+ * @public
772
+ */
773
+ hasActiveChild(navItem: FoundationRouteNavItem): boolean;
742
774
  }
743
775
  /**
744
776
  * FoundationHeader.
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/main/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAe,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,EAAsB,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAQ,SAAS,EAA6C,MAAM,uBAAuB,CAAC;AAEnG,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUhD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,wBAAwB,EAAE,IAAI,CAAC;IAC/B,gBAAgB,EAAE,IAAI,CAAC;IACvB,mBAAmB,EAAE,IAAI,CAAC;IAC1B,2BAA2B,EAAE,IAAI,CAAC;IAClC,kBAAkB,EAAE,IAAI,CAAC;IACzB,oBAAoB,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAE,CAAC;CACtE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,kBAAkB,CAAuB;IAEjD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;;;OAKG;IACI,cAAc,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO;CAmBhE;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,gBAAiB,SAAQ,UAAU;IACxC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;CAGnC;AAED;;;;;;GAMG;AACH,qBAKa,UAAW,SAAQ,UAAU;CAAG;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAKa,WAAY,SAAQ,UAAU;IACzC;;;;;;;;OAQG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,cAAc,IAAI,YAAY,CAAC,UAAU,CAAC;CAG3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,iDAmVgD,CAAC"}
1
+ {"version":3,"file":"main.styles.d.ts","sourceRoot":"","sources":["../../../src/main/main.styles.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,iDA2WgD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ViewTemplate } from '@genesislcap/web-core';
2
- import type { Navigation } from './main';
2
+ import { Navigation } from './main';
3
3
  /**
4
4
  * Top level template for Navigation class
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIzC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAIpD,CAAC;AA8KF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,+BAoHvB,CAAC;AAiDF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAM,2BAIzC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAEpD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,+BAAc,CAAC"}
1
+ {"version":3,"file":"main.template.d.ts","sourceRoot":"","sources":["../../../src/main/main.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAc1D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAOpC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAIpD,CAAC;AAsLF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,+BAoHvB,CAAC;AAiDF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,GAAI,WAAM,2BAIzC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,YAAY,CAAC,UAAU,CAEpD,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,+BAAc,CAAC"}
@@ -17,6 +17,7 @@ import { LoadingTemplate, mainTemplate, dynamicTemplate as template } from './ma
17
17
  // Default values for inactivity monitoring
18
18
  const DEFAULT_INACTIVITY_TIMEOUT_MINUTES = 30;
19
19
  const DEFAULT_INACTIVITY_WARNING_MINUTES = 5;
20
+ const DEFAULT_ROUTE_POLL_CHANGE = 500;
20
21
  /**
21
22
  * Navigation micro-frontend includes navigation bar and flyout menu
22
23
  *
@@ -165,6 +166,16 @@ let Navigation = class Navigation extends EventEmitter(GenesisElement) {
165
166
  * If this attribute is not set then the account menu is not shown
166
167
  */
167
168
  this.showAccountMenu = false;
169
+ /**
170
+ * Current pathname for route highlighting
171
+ * @internal
172
+ */
173
+ this.pathName = '';
174
+ /**
175
+ * Interval ID for polling route changes
176
+ * @internal
177
+ */
178
+ this.routeCheckInterval = null;
168
179
  }
169
180
  /**
170
181
  * Called when the component is connected to the DOM
@@ -181,6 +192,7 @@ let Navigation = class Navigation extends EventEmitter(GenesisElement) {
181
192
  yield this.loadRemotes();
182
193
  this.userName = (_a = this.user.userName) !== null && _a !== void 0 ? _a : 'Genesis User';
183
194
  this.initializeInactivityManager();
195
+ this.initializeRouteDetection();
184
196
  });
185
197
  }
186
198
  setLuminance() {
@@ -215,12 +227,42 @@ let Navigation = class Navigation extends EventEmitter(GenesisElement) {
215
227
  this.inactivityManager = null;
216
228
  }
217
229
  }
230
+ /**
231
+ * Initialize framework-agnostic route detection
232
+ * @internal
233
+ */
234
+ initializeRouteDetection() {
235
+ // Initialize pathName with current location
236
+ this.pathName = window.location.pathname;
237
+ // Listen for browser back/forward navigation
238
+ window.addEventListener('popstate', this.handleRouteChange.bind(this));
239
+ // Start polling for route changes every DEFAULT_ROUTE_POLL_CHANGEms
240
+ this.routeCheckInterval = window.setInterval(() => {
241
+ this.handleRouteChange();
242
+ }, DEFAULT_ROUTE_POLL_CHANGE);
243
+ logger.debug('Route detection initialized');
244
+ }
245
+ /**
246
+ * Clean up route detection listeners and polling
247
+ * @internal
248
+ */
249
+ cleanupRouteDetection() {
250
+ // Remove popstate listener
251
+ window.removeEventListener('popstate', this.handleRouteChange.bind(this));
252
+ // Clear polling interval
253
+ if (this.routeCheckInterval !== null) {
254
+ window.clearInterval(this.routeCheckInterval);
255
+ this.routeCheckInterval = null;
256
+ }
257
+ logger.debug('Route detection cleaned up');
258
+ }
218
259
  /**
219
260
  * Called when the component is disconnected from the DOM
220
261
  */
221
262
  disconnectedCallback() {
222
263
  super.disconnectedCallback();
223
264
  this.cleanupInactivityManager();
265
+ this.cleanupRouteDetection();
224
266
  }
225
267
  /**
226
268
  * @internal
@@ -431,6 +473,37 @@ let Navigation = class Navigation extends EventEmitter(GenesisElement) {
431
473
  }
432
474
  this.$emit('nav-button-clicked', { item: routeNavItem, context: this });
433
475
  }
476
+ /**
477
+ * Handle route changes by updating the pathName observable
478
+ * @internal
479
+ */
480
+ handleRouteChange() {
481
+ const newPathname = window.location.pathname;
482
+ if (this.pathName !== newPathname) {
483
+ this.pathName = newPathname;
484
+ }
485
+ }
486
+ /**
487
+ * Check if any child nav item matches the current route
488
+ * @param navItem - The navigation item to check
489
+ * @returns true if any child matches the current path
490
+ * @public
491
+ */
492
+ hasActiveChild(navItem) {
493
+ if (!navItem.navItems || navItem.navItems.length === 0) {
494
+ return false;
495
+ }
496
+ const currentPath = this.pathName;
497
+ // Check if any child route matches current path
498
+ return navItem.navItems.some((child) => {
499
+ if (child.routePath &&
500
+ currentPath.split('/').reverse()[0] === child.routePath.split('/').reverse()[0]) {
501
+ return true;
502
+ }
503
+ // Recursively check nested children
504
+ return this.hasActiveChild(child);
505
+ });
506
+ }
434
507
  };
435
508
  __decorate([
436
509
  Container
@@ -513,6 +586,9 @@ __decorate([
513
586
  __decorate([
514
587
  attr({ mode: 'boolean', attribute: 'show-account-menu' })
515
588
  ], Navigation.prototype, "showAccountMenu", void 0);
589
+ __decorate([
590
+ observable
591
+ ], Navigation.prototype, "pathName", void 0);
516
592
  Navigation = __decorate([
517
593
  customElement({
518
594
  name: 'foundation-header',
@@ -181,7 +181,7 @@ export const MainStyles = css `
181
181
  border-color: #333;
182
182
  }
183
183
 
184
- ${flyoutTag}::part(flyout),
184
+ ${flyoutTag}::part(flyout),
185
185
  ${flyoutTag}::part(footer) {
186
186
  padding: 0;
187
187
  }
@@ -347,4 +347,28 @@ export const MainStyles = css `
347
347
  .nav-submenu-wrapper .nav-button-wrapper:last-child {
348
348
  border-bottom: none;
349
349
  }
350
+
351
+ .route-selected,
352
+ .nav-submenu-wrapper .nav-button.sub-selected {
353
+ background-color: var(--highlight-selected-menu, var(--accent-fill-rest));
354
+ }
355
+
356
+ .dropdown-indicator {
357
+ display: inline-flex;
358
+ align-items: center;
359
+ margin-left: calc(var(--design-unit) * 1px);
360
+ transition: transform 0.2s ease;
361
+ }
362
+
363
+ .nav-button-wrapper:hover .dropdown-indicator {
364
+ transform: rotate(180deg);
365
+ }
366
+
367
+ .dropdown-indicator.has-active-child {
368
+ color: var(--highlight-selected-dropdown, var(--accent-fill-rest));
369
+ }
370
+
371
+ .nav-button.has-active-child .dropdown-indicator {
372
+ color: var(--highlight-selected-dropdown, var(--accent-fill-rest));
373
+ }
350
374
  `.withBehaviors(getApp().registerStylesTarget('header'));
@@ -1,7 +1,8 @@
1
1
  import { getApp } from '@genesislcap/foundation-shell/app';
2
- import { html, repeat, when } from '@genesislcap/web-core';
2
+ import { classNames, html, repeat, when } from '@genesislcap/web-core';
3
3
  import { buttonTag, connectionIndicatorTag, environmentIndicatorTag, flyoutTag, getTagHelper, iconTag, optionTag, providerTag, selectTag, } from '../tags';
4
4
  const app = getApp();
5
+ const navigationClassMatcher = (className, buttonPath, urlPath) => classNames([className, urlPath.split('/').reverse()[0] === buttonPath]);
5
6
  /**
6
7
  * Top level template for Navigation class
7
8
  *
@@ -63,10 +64,10 @@ const routeNavItemsTemplate = (navId) => html `
63
64
  ${repeat((x) => x.routeNavItems, html `
64
65
  ${when((x, c) => x.navId === navId &&
65
66
  (!x.permission || (x.permission && c.parent.isUserPermitted(x.permission))), html `
66
- <div class="nav-button-wrapper">
67
+ <div class="nav-button-wrapper">
67
68
  <${buttonTag}
68
69
  appearance="neutral-grey"
69
- class="nav-button"
70
+ class="nav-button ${(x, c) => navigationClassMatcher('route-selected', x.routePath, c.parent.pathName)} ${(x, c) => classNames(['has-active-child', c.parent.hasActiveChild(x)])}"
70
71
  slot="routes"
71
72
  @click=${(x, c) => c.parent.handleNavButtonClick(x)}
72
73
  data-test-id="${(x) => `${x.routePath}-button`}"
@@ -80,6 +81,11 @@ const routeNavItemsTemplate = (navId) => html `
80
81
  ></${iconTag}>
81
82
  `)}
82
83
  ${(x, c) => c.parent.toLocalisedText(x.title)}
84
+ ${when((x) => x.navItems && x.navItems.length > 0, html `
85
+ <span class="dropdown-indicator">
86
+ <${iconTag} name="chevron-down" size="12"></${iconTag}>
87
+ </span>
88
+ `)}
83
89
  </${buttonTag}>
84
90
  ${when((x) => x.navItems, html `
85
91
  ${(x, c) => routeNavSubmenuItemsTemplate(x, c.parent)}
@@ -95,7 +101,7 @@ const routeNavSubmenuItemsTemplate = (item, context) => html `
95
101
  <div class="nav-button-wrapper" part="nav-button-wrapper">
96
102
  <${buttonTag}
97
103
  appearance="neutral-grey"
98
- class="nav-button"
104
+ class="nav-button ${(x, c) => navigationClassMatcher('sub-selected', x.routePath, c.parentContext.parent.pathName)}"
99
105
  @click=${(x) => context.handleNavButtonClick(x)}
100
106
  data-test-id="${(x) => `${x.routePath}-button`}"
101
107
  aria-label=${(x) => x.title}
@@ -851,6 +851,55 @@
851
851
  "isAbstract": false,
852
852
  "name": "handleNavButtonClick"
853
853
  },
854
+ {
855
+ "kind": "Method",
856
+ "canonicalReference": "@genesislcap/foundation-header!Navigation#hasActiveChild:member(1)",
857
+ "docComment": "/**\n * Check if any child nav item matches the current route\n *\n * @param navItem - The navigation item to check\n *\n * @returns true if any child matches the current path\n *\n * @public\n */\n",
858
+ "excerptTokens": [
859
+ {
860
+ "kind": "Content",
861
+ "text": "hasActiveChild(navItem: "
862
+ },
863
+ {
864
+ "kind": "Reference",
865
+ "text": "FoundationRouteNavItem",
866
+ "canonicalReference": "@genesislcap/foundation-ui!FoundationRouteNavItem:type"
867
+ },
868
+ {
869
+ "kind": "Content",
870
+ "text": "): "
871
+ },
872
+ {
873
+ "kind": "Content",
874
+ "text": "boolean"
875
+ },
876
+ {
877
+ "kind": "Content",
878
+ "text": ";"
879
+ }
880
+ ],
881
+ "isStatic": false,
882
+ "returnTypeTokenRange": {
883
+ "startIndex": 3,
884
+ "endIndex": 4
885
+ },
886
+ "releaseTag": "Public",
887
+ "isProtected": false,
888
+ "overloadIndex": 1,
889
+ "parameters": [
890
+ {
891
+ "parameterName": "navItem",
892
+ "parameterTypeTokenRange": {
893
+ "startIndex": 1,
894
+ "endIndex": 2
895
+ },
896
+ "isOptional": false
897
+ }
898
+ ],
899
+ "isOptional": false,
900
+ "isAbstract": false,
901
+ "name": "hasActiveChild"
902
+ },
854
903
  {
855
904
  "kind": "Property",
856
905
  "canonicalReference": "@genesislcap/foundation-header!Navigation#headerConfig:member",
@@ -305,6 +305,16 @@ export declare class Navigation extends Navigation_base {
305
305
  * Clean up the inactivity manager
306
306
  */
307
307
  private cleanupInactivityManager;
308
+ /**
309
+ * Initialize framework-agnostic route detection
310
+ * @internal
311
+ */
312
+ private initializeRouteDetection;
313
+ /**
314
+ * Clean up route detection listeners and polling
315
+ * @internal
316
+ */
317
+ private cleanupRouteDetection;
308
318
  /**
309
319
  * Called when the component is disconnected from the DOM
310
320
  */
@@ -553,6 +563,28 @@ export declare class Navigation extends Navigation_base {
553
563
  * @param routeNavItem - The navigation item that was clicked
554
564
  */
555
565
  handleNavButtonClick(routeNavItem: FoundationRouteNavItem): void;
566
+ /**
567
+ * Current pathname for route highlighting
568
+ * @internal
569
+ */
570
+ pathName: string;
571
+ /**
572
+ * Interval ID for polling route changes
573
+ * @internal
574
+ */
575
+ private routeCheckInterval;
576
+ /**
577
+ * Handle route changes by updating the pathName observable
578
+ * @internal
579
+ */
580
+ private handleRouteChange;
581
+ /**
582
+ * Check if any child nav item matches the current route
583
+ * @param navItem - The navigation item to check
584
+ * @returns true if any child matches the current path
585
+ * @public
586
+ */
587
+ hasActiveChild(navItem: FoundationRouteNavItem): boolean;
556
588
  }
557
589
 
558
590
  declare const Navigation_base: abstract new (...args: any[]) => {
@@ -0,0 +1,56 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-header](./foundation-header.md) &gt; [Navigation](./foundation-header.navigation.md) &gt; [hasActiveChild](./foundation-header.navigation.hasactivechild.md)
4
+
5
+ ## Navigation.hasActiveChild() method
6
+
7
+ Check if any child nav item matches the current route
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ hasActiveChild(navItem: FoundationRouteNavItem): boolean;
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ <table><thead><tr><th>
18
+
19
+ Parameter
20
+
21
+
22
+ </th><th>
23
+
24
+ Type
25
+
26
+
27
+ </th><th>
28
+
29
+ Description
30
+
31
+
32
+ </th></tr></thead>
33
+ <tbody><tr><td>
34
+
35
+ navItem
36
+
37
+
38
+ </td><td>
39
+
40
+ FoundationRouteNavItem
41
+
42
+
43
+ </td><td>
44
+
45
+ The navigation item to check
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+
51
+ **Returns:**
52
+
53
+ boolean
54
+
55
+ true if any child matches the current path
56
+
@@ -597,6 +597,20 @@ Called when the component is disconnected from the DOM
597
597
  Handles the click event for a navigation button
598
598
 
599
599
 
600
+ </td></tr>
601
+ <tr><td>
602
+
603
+ [hasActiveChild(navItem)](./foundation-header.navigation.hasactivechild.md)
604
+
605
+
606
+ </td><td>
607
+
608
+
609
+ </td><td>
610
+
611
+ Check if any child nav item matches the current route
612
+
613
+
600
614
  </td></tr>
601
615
  <tr><td>
602
616
 
@@ -106,6 +106,7 @@ export class Navigation extends Navigation_base {
106
106
  disconnectedCallback(): void;
107
107
  enableInactivityMonitoring: boolean;
108
108
  handleNavButtonClick(routeNavItem: FoundationRouteNavItem): void;
109
+ hasActiveChild(navItem: FoundationRouteNavItem): boolean;
109
110
  // (undocumented)
110
111
  headerConfig: HeaderConfig;
111
112
  hideSideBar: boolean;
@@ -134,6 +135,8 @@ export class Navigation extends Navigation_base {
134
135
  // @internal
135
136
  notificationIconEvent(): void;
136
137
  // @internal
138
+ pathName: string;
139
+ // @internal
137
140
  ready: boolean;
138
141
  // @deprecated
139
142
  routeButtons: Array<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-header",
3
3
  "description": "Genesis Foundation Header",
4
- "version": "14.344.2",
4
+ "version": "14.345.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/foundation-header.d.ts",
@@ -77,28 +77,28 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@genesislcap/foundation-testing": "14.344.2",
81
- "@genesislcap/genx": "14.344.2",
82
- "@genesislcap/rollup-builder": "14.344.2",
83
- "@genesislcap/ts-builder": "14.344.2",
84
- "@genesislcap/uvu-playwright-builder": "14.344.2",
85
- "@genesislcap/vite-builder": "14.344.2",
86
- "@genesislcap/webpack-builder": "14.344.2"
80
+ "@genesislcap/foundation-testing": "14.345.0",
81
+ "@genesislcap/genx": "14.345.0",
82
+ "@genesislcap/rollup-builder": "14.345.0",
83
+ "@genesislcap/ts-builder": "14.345.0",
84
+ "@genesislcap/uvu-playwright-builder": "14.345.0",
85
+ "@genesislcap/vite-builder": "14.345.0",
86
+ "@genesislcap/webpack-builder": "14.345.0"
87
87
  },
88
88
  "dependencies": {
89
- "@genesislcap/foundation-auth": "14.344.2",
90
- "@genesislcap/foundation-comms": "14.344.2",
91
- "@genesislcap/foundation-events": "14.344.2",
92
- "@genesislcap/foundation-i18n": "14.344.2",
93
- "@genesislcap/foundation-logger": "14.344.2",
94
- "@genesislcap/foundation-login": "14.344.2",
95
- "@genesislcap/foundation-shell": "14.344.2",
96
- "@genesislcap/foundation-ui": "14.344.2",
97
- "@genesislcap/foundation-user": "14.344.2",
98
- "@genesislcap/foundation-utils": "14.344.2",
99
- "@genesislcap/foundation-zero": "14.344.2",
100
- "@genesislcap/rapid-design-system": "14.344.2",
101
- "@genesislcap/web-core": "14.344.2"
89
+ "@genesislcap/foundation-auth": "14.345.0",
90
+ "@genesislcap/foundation-comms": "14.345.0",
91
+ "@genesislcap/foundation-events": "14.345.0",
92
+ "@genesislcap/foundation-i18n": "14.345.0",
93
+ "@genesislcap/foundation-logger": "14.345.0",
94
+ "@genesislcap/foundation-login": "14.345.0",
95
+ "@genesislcap/foundation-shell": "14.345.0",
96
+ "@genesislcap/foundation-ui": "14.345.0",
97
+ "@genesislcap/foundation-user": "14.345.0",
98
+ "@genesislcap/foundation-utils": "14.345.0",
99
+ "@genesislcap/foundation-zero": "14.345.0",
100
+ "@genesislcap/rapid-design-system": "14.345.0",
101
+ "@genesislcap/web-core": "14.345.0"
102
102
  },
103
103
  "repository": {
104
104
  "type": "git",
@@ -109,5 +109,5 @@
109
109
  "access": "public"
110
110
  },
111
111
  "customElements": "dist/custom-elements.json",
112
- "gitHead": "c068c4dbbcf5825a18286c682c719263b454727b"
112
+ "gitHead": "695405144f6da348af47ea0038e7cc736938db3c"
113
113
  }