mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 03:33:54 +00:00
[CL-707] Migrate CL codebase to signals (#15340)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<a
|
||||
bitTabListItem
|
||||
[routerLink]="disabled ? null : route"
|
||||
[routerLink]="disabled ? null : route()"
|
||||
routerLinkActive
|
||||
[routerLinkActiveOptions]="routerLinkMatchOptions"
|
||||
#rla="routerLinkActive"
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { FocusableOption } from "@angular/cdk/a11y";
|
||||
import { AfterViewInit, Component, HostListener, Input, OnDestroy, ViewChild } from "@angular/core";
|
||||
import {
|
||||
AfterViewInit,
|
||||
Component,
|
||||
HostListener,
|
||||
Input,
|
||||
OnDestroy,
|
||||
ViewChild,
|
||||
input,
|
||||
} from "@angular/core";
|
||||
import { IsActiveMatchOptions, RouterLinkActive, RouterModule } from "@angular/router";
|
||||
import { Subject, takeUntil } from "rxjs";
|
||||
|
||||
@@ -27,7 +35,10 @@ export class TabLinkComponent implements FocusableOption, AfterViewInit, OnDestr
|
||||
fragment: "ignored",
|
||||
};
|
||||
|
||||
@Input() route: string | any[];
|
||||
readonly route = input<string | any[]>();
|
||||
// TODO: Skipped for signal migration because:
|
||||
// This input overrides a field from a superclass, while the superclass field
|
||||
// is not migrated.
|
||||
@Input() disabled = false;
|
||||
|
||||
@HostListener("keydown", ["$event"]) onKeyDown(event: KeyboardEvent) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<bit-tab-header>
|
||||
<nav bitTabListContainer [attr.aria-label]="label" (keydown)="keyManager.onKeydown($event)">
|
||||
<nav bitTabListContainer [attr.aria-label]="label()" (keydown)="keyManager.onKeydown($event)">
|
||||
<ng-content></ng-content>
|
||||
</nav>
|
||||
</bit-tab-header>
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
Component,
|
||||
ContentChildren,
|
||||
forwardRef,
|
||||
Input,
|
||||
QueryList,
|
||||
input,
|
||||
} from "@angular/core";
|
||||
|
||||
import { TabHeaderComponent } from "../shared/tab-header.component";
|
||||
@@ -25,7 +25,7 @@ import { TabLinkComponent } from "./tab-link.component";
|
||||
})
|
||||
export class TabNavBarComponent implements AfterContentInit {
|
||||
@ContentChildren(forwardRef(() => TabLinkComponent)) tabLabels: QueryList<TabLinkComponent>;
|
||||
@Input() label = "";
|
||||
readonly label = input("");
|
||||
|
||||
/**
|
||||
* Focus key manager for keeping tab controls accessible.
|
||||
|
||||
Reference in New Issue
Block a user