|
1 | 1 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core';
|
2 | 2 | import { ActivatedRoute } from '@angular/router';
|
3 | 3 | import { IconType } from '@hypertrace/assets-library';
|
4 |
| -import { NavigationService, TypedSimpleChanges } from '@hypertrace/common'; |
| 4 | +import { |
| 5 | + ExternalNavigationParams, |
| 6 | + ExternalNavigationWindowHandling, |
| 7 | + NavigationParamsType, |
| 8 | + NavigationService, |
| 9 | + TypedSimpleChanges |
| 10 | +} from '@hypertrace/common'; |
5 | 11 | import { Observable } from 'rxjs';
|
6 | 12 | import { map, startWith } from 'rxjs/operators';
|
7 | 13 | import { IconSize } from '../icon/icon-size';
|
@@ -70,7 +76,7 @@ import {
|
70 | 76 |
|
71 | 77 | <hr class="nav-divider" />
|
72 | 78 | <div *ngFor="let footerItem of footerItems" class="footer-item">
|
73 |
| - <ht-link class="link" [paramsOrUrl]="footerItem.url"> |
| 79 | + <ht-link class="link" [paramsOrUrl]="this.getFooterItemNavigationParams | htMemoize: footerItem.url"> |
74 | 80 | <ht-icon *ngIf="this.collapsed" [icon]="footerItem.icon" size="${IconSize.Small}"></ht-icon>
|
75 | 81 | <ht-label *ngIf="!this.collapsed" [label]="footerItem.label"></ht-label>
|
76 | 82 | </ht-link>
|
@@ -112,6 +118,14 @@ export class NavigationListComponent implements OnChanges {
|
112 | 118 | private readonly navListComponentService: NavigationListComponentService
|
113 | 119 | ) {}
|
114 | 120 |
|
| 121 | + public getFooterItemNavigationParams(url: string): ExternalNavigationParams { |
| 122 | + return { |
| 123 | + navType: NavigationParamsType.External, |
| 124 | + url: url, |
| 125 | + windowHandling: ExternalNavigationWindowHandling.NewWindow |
| 126 | + }; |
| 127 | + } |
| 128 | + |
115 | 129 | public ngOnChanges(changes: TypedSimpleChanges<this>): void {
|
116 | 130 | if (changes.navItems) {
|
117 | 131 | this.navItems = this.navListComponentService.resolveFeaturesAndUpdateVisibilityForNavItems(this.navItems);
|
|
0 commit comments