1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 22:03:36 +00:00

Vault - Prefer signal & change detection (#16947)

This commit is contained in:
Oscar Hinton
2025-10-27 16:13:11 +01:00
committed by GitHub
parent fd45689745
commit af6e19335d
134 changed files with 918 additions and 13 deletions

View File

@@ -10,6 +10,8 @@ import { AnchorLinkDirective, CalloutModule, BannerModule } from "@bitwarden/com
import { I18nPipe } from "@bitwarden/ui-common"; import { I18nPipe } from "@bitwarden/ui-common";
import { AtRiskPasswordCalloutData, AtRiskPasswordCalloutService } from "@bitwarden/vault"; import { AtRiskPasswordCalloutData, AtRiskPasswordCalloutService } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-at-risk-password-callout", selector: "vault-at-risk-password-callout",
imports: [ imports: [

View File

@@ -17,6 +17,8 @@ export const AtRiskCarouselDialogResult = {
type AtRiskCarouselDialogResult = UnionOfValues<typeof AtRiskCarouselDialogResult>; type AtRiskCarouselDialogResult = UnionOfValues<typeof AtRiskCarouselDialogResult>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-at-risk-carousel-dialog", selector: "vault-at-risk-carousel-dialog",
templateUrl: "./at-risk-carousel-dialog.component.html", templateUrl: "./at-risk-carousel-dialog.component.html",
@@ -32,6 +34,8 @@ type AtRiskCarouselDialogResult = UnionOfValues<typeof AtRiskCarouselDialogResul
export class AtRiskCarouselDialogComponent { export class AtRiskCarouselDialogComponent {
private dialogRef = inject(DialogRef); private dialogRef = inject(DialogRef);
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
protected dismissBtnEnabled = signal(false); protected dismissBtnEnabled = signal(false);
protected async dismiss() { protected async dismiss() {

View File

@@ -37,28 +37,42 @@ import { AtRiskCarouselDialogResult } from "../at-risk-carousel-dialog/at-risk-c
import { AtRiskPasswordPageService } from "./at-risk-password-page.service"; import { AtRiskPasswordPageService } from "./at-risk-password-page.service";
import { AtRiskPasswordsComponent } from "./at-risk-passwords.component"; import { AtRiskPasswordsComponent } from "./at-risk-passwords.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-header", selector: "popup-header",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupHeaderComponent { class MockPopupHeaderComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string | undefined; @Input() pageTitle: string | undefined;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() backAction: (() => void) | undefined; @Input() backAction: (() => void) | undefined;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-page", selector: "popup-page",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupPageComponent { class MockPopupPageComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() loading: boolean | undefined; @Input() loading: boolean | undefined;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-icon", selector: "app-vault-icon",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockAppIcon { class MockAppIcon {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() cipher: CipherView | undefined; @Input() cipher: CipherView | undefined;
} }

View File

@@ -58,6 +58,8 @@ import {
import { AtRiskPasswordPageService } from "./at-risk-password-page.service"; import { AtRiskPasswordPageService } from "./at-risk-password-page.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [ imports: [
PopupPageComponent, PopupPageComponent,

View File

@@ -131,6 +131,8 @@ class QueryParams {
export type AddEditQueryParams = Partial<Record<keyof QueryParams, string>>; export type AddEditQueryParams = Partial<Record<keyof QueryParams, string>>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-add-edit-v2", selector: "app-add-edit-v2",
templateUrl: "add-edit-v2.component.html", templateUrl: "add-edit-v2.component.html",

View File

@@ -28,6 +28,8 @@ import { PopupFooterComponent } from "../../../../../platform/popup/layout/popup
import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-assign-collections", selector: "app-assign-collections",
templateUrl: "./assign-collections.component.html", templateUrl: "./assign-collections.component.html",

View File

@@ -25,20 +25,30 @@ import { PopupRouterCacheService } from "../../../../../platform/popup/view-cach
import { AttachmentsV2Component } from "./attachments-v2.component"; import { AttachmentsV2Component } from "./attachments-v2.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-header", selector: "popup-header",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupHeaderComponent { class MockPopupHeaderComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string; @Input() pageTitle: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() backAction: () => void; @Input() backAction: () => void;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-footer", selector: "popup-footer",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupFooterComponent { class MockPopupFooterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string; @Input() pageTitle: string;
} }

View File

@@ -17,6 +17,8 @@ import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup
import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component";
import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-attachments-v2", selector: "app-attachments-v2",
templateUrl: "./attachments-v2.component.html", templateUrl: "./attachments-v2.component.html",

View File

@@ -25,6 +25,8 @@ import { CipherFormContainer } from "@bitwarden/vault";
import BrowserPopupUtils from "../../../../../../platform/browser/browser-popup-utils"; import BrowserPopupUtils from "../../../../../../platform/browser/browser-popup-utils";
import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/file-popout-utils.service"; import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/file-popout-utils.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-open-attachments", selector: "app-open-attachments",
templateUrl: "./open-attachments.component.html", templateUrl: "./open-attachments.component.html",
@@ -39,6 +41,8 @@ import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/f
}) })
export class OpenAttachmentsComponent implements OnInit { export class OpenAttachmentsComponent implements OnInit {
/** Cipher `id` */ /** Cipher `id` */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipherId: CipherId; @Input({ required: true }) cipherId: CipherId;
/** True when the attachments window should be opened in a popout */ /** True when the attachments window should be opened in a popout */

View File

@@ -15,6 +15,8 @@ import { VaultPopupItemsService } from "../../../services/vault-popup-items.serv
import { PopupCipherViewLike } from "../../../views/popup-cipher.view"; import { PopupCipherViewLike } from "../../../views/popup-cipher.view";
import { VaultListItemsContainerComponent } from "../vault-list-items-container/vault-list-items-container.component"; import { VaultListItemsContainerComponent } from "../vault-list-items-container/vault-list-items-container.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [ imports: [
CommonModule, CommonModule,
@@ -46,7 +48,7 @@ export class AutofillVaultListItemsComponent {
startWith(true), // Start with true to avoid flashing the fill button on first load startWith(true), // Start with true to avoid flashing the fill button on first load
); );
protected groupByType = toSignal( protected readonly groupByType = toSignal(
this.vaultPopupItemsService.hasFilterApplied$.pipe(map((hasFilter) => !hasFilter)), this.vaultPopupItemsService.hasFilterApplied$.pipe(map((hasFilter) => !hasFilter)),
); );

View File

@@ -15,6 +15,8 @@ import { VaultPopupAutofillService } from "../../../services/vault-popup-autofil
const blockedURISettingsRoute = "/blocked-domains"; const blockedURISettingsRoute = "/blocked-domains";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [ imports: [
BannerModule, BannerModule,

View File

@@ -9,6 +9,8 @@ import { VaultCarouselModule } from "@bitwarden/vault";
import { IntroCarouselService } from "../../../services/intro-carousel.service"; import { IntroCarouselService } from "../../../services/intro-carousel.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-intro-carousel", selector: "app-intro-carousel",
templateUrl: "./intro-carousel.component.html", templateUrl: "./intro-carousel.component.html",

View File

@@ -21,6 +21,8 @@ type CipherItem = {
field: CopyAction; field: CopyAction;
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-item-copy-actions", selector: "app-item-copy-actions",
templateUrl: "item-copy-actions.component.html", templateUrl: "item-copy-actions.component.html",
@@ -35,6 +37,8 @@ type CipherItem = {
}) })
export class ItemCopyActionsComponent { export class ItemCopyActionsComponent {
protected showQuickCopyActions$ = inject(VaultPopupCopyButtonsService).showQuickCopyActions$; protected showQuickCopyActions$ = inject(VaultPopupCopyButtonsService).showQuickCopyActions$;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipher!: CipherViewLike; @Input({ required: true }) cipher!: CipherViewLike;
protected CipherViewLikeUtils = CipherViewLikeUtils; protected CipherViewLikeUtils = CipherViewLikeUtils;

View File

@@ -34,6 +34,8 @@ import { PasswordRepromptService } from "@bitwarden/vault";
import { VaultPopupAutofillService } from "../../../services/vault-popup-autofill.service"; import { VaultPopupAutofillService } from "../../../services/vault-popup-autofill.service";
import { AddEditQueryParams } from "../add-edit/add-edit-v2.component"; import { AddEditQueryParams } from "../add-edit/add-edit-v2.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-item-more-options", selector: "app-item-more-options",
templateUrl: "./item-more-options.component.html", templateUrl: "./item-more-options.component.html",
@@ -42,6 +44,8 @@ import { AddEditQueryParams } from "../add-edit/add-edit-v2.component";
export class ItemMoreOptionsComponent { export class ItemMoreOptionsComponent {
private _cipher$ = new BehaviorSubject<CipherViewLike>(undefined); private _cipher$ = new BehaviorSubject<CipherViewLike>(undefined);
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ @Input({
required: true, required: true,
}) })
@@ -57,6 +61,8 @@ export class ItemMoreOptionsComponent {
* Flag to show view item menu option. Used when something else is * Flag to show view item menu option. Used when something else is
* assigned as the primary action for the item, such as autofill. * assigned as the primary action for the item, such as autofill.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: booleanAttribute }) @Input({ transform: booleanAttribute })
showViewOption: boolean; showViewOption: boolean;
@@ -64,6 +70,8 @@ export class ItemMoreOptionsComponent {
* Flag to hide the autofill menu options. Used for items that are * Flag to hide the autofill menu options. Used for items that are
* already in the autofill list suggestion. * already in the autofill list suggestion.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: booleanAttribute }) @Input({ transform: booleanAttribute })
hideAutofillOptions: boolean; hideAutofillOptions: boolean;

View File

@@ -23,6 +23,8 @@ export interface NewItemInitialValues {
collectionId?: CollectionId; collectionId?: CollectionId;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-new-item-dropdown", selector: "app-new-item-dropdown",
templateUrl: "new-item-dropdown-v2.component.html", templateUrl: "new-item-dropdown-v2.component.html",
@@ -34,6 +36,8 @@ export class NewItemDropdownV2Component implements OnInit {
/** /**
* Optional initial values to pass to the add cipher form * Optional initial values to pass to the add cipher form
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
initialValues: NewItemInitialValues; initialValues: NewItemInitialValues;

View File

@@ -18,14 +18,24 @@ import {
VaultGeneratorDialogComponent, VaultGeneratorDialogComponent,
} from "./vault-generator-dialog.component"; } from "./vault-generator-dialog.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-cipher-form-generator", selector: "vault-cipher-form-generator",
template: "", template: "",
}) })
class MockCipherFormGenerator { class MockCipherFormGenerator {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() type: "password" | "username" = "password"; @Input() type: "password" | "username" = "password";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() algorithmSelected: EventEmitter<AlgorithmInfo> = new EventEmitter(); @Output() algorithmSelected: EventEmitter<AlgorithmInfo> = new EventEmitter();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() uri: string = ""; @Input() uri: string = "";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() valueGenerated = new EventEmitter<string>(); @Output() valueGenerated = new EventEmitter<string>();
} }

View File

@@ -38,6 +38,8 @@ export const GeneratorDialogAction = {
type GeneratorDialogAction = UnionOfValues<typeof GeneratorDialogAction>; type GeneratorDialogAction = UnionOfValues<typeof GeneratorDialogAction>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-generator-dialog", selector: "app-vault-generator-dialog",
templateUrl: "./vault-generator-dialog.component.html", templateUrl: "./vault-generator-dialog.component.html",

View File

@@ -17,6 +17,8 @@ import { VaultPopupListFiltersService } from "../../../../../vault/popup/service
import { VaultListFiltersComponent } from "../vault-list-filters/vault-list-filters.component"; import { VaultListFiltersComponent } from "../vault-list-filters/vault-list-filters.component";
import { VaultV2SearchComponent } from "../vault-search/vault-v2-search.component"; import { VaultV2SearchComponent } from "../vault-search/vault-v2-search.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-header-v2", selector: "app-vault-header-v2",
templateUrl: "vault-header-v2.component.html", templateUrl: "vault-header-v2.component.html",
@@ -31,6 +33,8 @@ import { VaultV2SearchComponent } from "../vault-search/vault-v2-search.componen
], ],
}) })
export class VaultHeaderV2Component { export class VaultHeaderV2Component {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(DisclosureComponent) disclosure: DisclosureComponent; @ViewChild(DisclosureComponent) disclosure: DisclosureComponent;
/** Emits the visibility status of the disclosure component. */ /** Emits the visibility status of the disclosure component. */

View File

@@ -8,6 +8,8 @@ import { ChipSelectComponent } from "@bitwarden/components";
import { VaultPopupListFiltersService } from "../../../services/vault-popup-list-filters.service"; import { VaultPopupListFiltersService } from "../../../services/vault-popup-list-filters.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-list-filters", selector: "app-vault-list-filters",
templateUrl: "./vault-list-filters.component.html", templateUrl: "./vault-list-filters.component.html",

View File

@@ -90,12 +90,18 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
private vaultPopupSectionService = inject(VaultPopupSectionService); private vaultPopupSectionService = inject(VaultPopupSectionService);
protected CipherViewLikeUtils = CipherViewLikeUtils; protected CipherViewLikeUtils = CipherViewLikeUtils;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(CdkVirtualScrollViewport, { static: false }) viewPort!: CdkVirtualScrollViewport; @ViewChild(CdkVirtualScrollViewport, { static: false }) viewPort!: CdkVirtualScrollViewport;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(DisclosureComponent) disclosure!: DisclosureComponent; @ViewChild(DisclosureComponent) disclosure!: DisclosureComponent;
/** /**
* Indicates whether the section should be open or closed if collapsibleKey is provided * Indicates whether the section should be open or closed if collapsibleKey is provided
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
protected sectionOpenState: Signal<boolean> = computed(() => { protected sectionOpenState: Signal<boolean> = computed(() => {
if (!this.collapsibleKey()) { if (!this.collapsibleKey()) {
return true; return true;
@@ -130,17 +136,23 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
*/ */
private viewCipherTimeout?: number; private viewCipherTimeout?: number;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
ciphers = input<PopupCipherViewLike[]>([]); ciphers = input<PopupCipherViewLike[]>([]);
/** /**
* If true, we will group ciphers by type (Login, Card, Identity) * If true, we will group ciphers by type (Login, Card, Identity)
* within subheadings in a single container, converted to a WritableSignal. * within subheadings in a single container, converted to a WritableSignal.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
groupByType = input<boolean | undefined>(false); groupByType = input<boolean | undefined>(false);
/** /**
* Computed signal for a grouped list of ciphers with an optional header * Computed signal for a grouped list of ciphers with an optional header
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
cipherGroups = computed< cipherGroups = computed<
{ {
subHeaderKey?: string; subHeaderKey?: string;
@@ -183,6 +195,8 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
/** /**
* Title for the vault list item section. * Title for the vault list item section.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
title = input<string | undefined>(undefined); title = input<string | undefined>(undefined);
/** /**
@@ -191,33 +205,45 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
* The key must be added to the state definition in `vault-popup-section.service.ts` since the * The key must be added to the state definition in `vault-popup-section.service.ts` since the
* collapsed state is stored locally. * collapsed state is stored locally.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
collapsibleKey = input<keyof PopupSectionOpen | undefined>(undefined); collapsibleKey = input<keyof PopupSectionOpen | undefined>(undefined);
/** /**
* Optional description for the vault list item section. Will be shown below the title even when * Optional description for the vault list item section. Will be shown below the title even when
* no ciphers are available. * no ciphers are available.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
description = input<string | undefined>(undefined); description = input<string | undefined>(undefined);
/** /**
* Option to show a refresh button in the section header. * Option to show a refresh button in the section header.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
showRefresh = input(false, { transform: booleanAttribute }); showRefresh = input(false, { transform: booleanAttribute });
/** /**
* Event emitted when the refresh button is clicked. * Event emitted when the refresh button is clicked.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() @Output()
onRefresh = new EventEmitter<void>(); onRefresh = new EventEmitter<void>();
/** /**
* Flag indicating that the current tab location is blocked * Flag indicating that the current tab location is blocked
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
currentURIIsBlocked = toSignal(this.vaultPopupAutofillService.currentTabIsOnBlocklist$); currentURIIsBlocked = toSignal(this.vaultPopupAutofillService.currentTabIsOnBlocklist$);
/** /**
* Resolved i18n key to use for suggested cipher items * Resolved i18n key to use for suggested cipher items
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
cipherItemTitleKey = computed(() => { cipherItemTitleKey = computed(() => {
return (cipher: CipherViewLike) => { return (cipher: CipherViewLike) => {
const login = CipherViewLikeUtils.getLogin(cipher); const login = CipherViewLikeUtils.getLogin(cipher);
@@ -233,11 +259,15 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
/** /**
* Option to show the autofill button for each item. * Option to show the autofill button for each item.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
showAutofillButton = input(false, { transform: booleanAttribute }); showAutofillButton = input(false, { transform: booleanAttribute });
/** /**
* Flag indicating whether the suggested cipher item autofill button should be shown or not * Flag indicating whether the suggested cipher item autofill button should be shown or not
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
hideAutofillButton = computed( hideAutofillButton = computed(
() => !this.showAutofillButton() || this.currentURIIsBlocked() || this.primaryActionAutofill(), () => !this.showAutofillButton() || this.currentURIIsBlocked() || this.primaryActionAutofill(),
); );
@@ -245,22 +275,30 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
/** /**
* Flag indicating whether the cipher item autofill menu options should be shown or not * Flag indicating whether the cipher item autofill menu options should be shown or not
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
hideAutofillMenuOptions = computed(() => this.currentURIIsBlocked() || this.showAutofillButton()); hideAutofillMenuOptions = computed(() => this.currentURIIsBlocked() || this.showAutofillButton());
/** /**
* Option to perform autofill operation as the primary action for autofill suggestions. * Option to perform autofill operation as the primary action for autofill suggestions.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
primaryActionAutofill = input(false, { transform: booleanAttribute }); primaryActionAutofill = input(false, { transform: booleanAttribute });
/** /**
* Remove the bottom margin from the bit-section in this component * Remove the bottom margin from the bit-section in this component
* (used for containers at the end of the page where bottom margin is not needed) * (used for containers at the end of the page where bottom margin is not needed)
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
disableSectionMargin = input(false, { transform: booleanAttribute }); disableSectionMargin = input(false, { transform: booleanAttribute });
/** /**
* Remove the description margin * Remove the description margin
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
disableDescriptionMargin = input(false, { transform: booleanAttribute }); disableDescriptionMargin = input(false, { transform: booleanAttribute });
/** /**
@@ -275,6 +313,8 @@ export class VaultListItemsContainerComponent implements AfterViewInit {
return collections[0]?.name; return collections[0]?.name;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
protected autofillShortcutTooltip = signal<string | undefined>(undefined); protected autofillShortcutTooltip = signal<string | undefined>(undefined);
constructor( constructor(

View File

@@ -18,6 +18,8 @@ import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup
import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component";
import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-password-history-v2", selector: "vault-password-history-v2",
templateUrl: "vault-password-history-v2.component.html", templateUrl: "vault-password-history-v2.component.html",

View File

@@ -10,6 +10,8 @@ import { SearchModule } from "@bitwarden/components";
import { VaultPopupItemsService } from "../../../services/vault-popup-items.service"; import { VaultPopupItemsService } from "../../../services/vault-popup-items.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [CommonModule, SearchModule, JslibModule, FormsModule], imports: [CommonModule, SearchModule, JslibModule, FormsModule],
selector: "app-vault-v2-search", selector: "app-vault-v2-search",

View File

@@ -64,6 +64,8 @@ const VaultState = {
type VaultState = UnionOfValues<typeof VaultState>; type VaultState = UnionOfValues<typeof VaultState>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault", selector: "app-vault",
templateUrl: "vault-v2.component.html", templateUrl: "vault-v2.component.html",
@@ -89,6 +91,8 @@ type VaultState = UnionOfValues<typeof VaultState>;
], ],
}) })
export class VaultV2Component implements OnInit, AfterViewInit, OnDestroy { export class VaultV2Component implements OnInit, AfterViewInit, OnDestroy {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(CdkVirtualScrollableElement) virtualScrollElement?: CdkVirtualScrollableElement; @ViewChild(CdkVirtualScrollableElement) virtualScrollElement?: CdkVirtualScrollableElement;
NudgeType = NudgeType; NudgeType = NudgeType;

View File

@@ -76,6 +76,8 @@ type LoadAction =
| typeof COPY_VERIFICATION_CODE_ID | typeof COPY_VERIFICATION_CODE_ID
| typeof UPDATE_PASSWORD; | typeof UPDATE_PASSWORD;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-view-v2", selector: "app-view-v2",
templateUrl: "view-v2.component.html", templateUrl: "view-v2.component.html",

View File

@@ -31,7 +31,7 @@ export class VaultPopupSectionService {
private vaultPopupItemsService = inject(VaultPopupItemsService); private vaultPopupItemsService = inject(VaultPopupItemsService);
private stateProvider = inject(StateProvider); private stateProvider = inject(StateProvider);
private hasFilterOrSearchApplied = toSignal( private readonly hasFilterOrSearchApplied = toSignal(
this.vaultPopupItemsService.hasFilterApplied$.pipe(map((hasFilter) => hasFilter)), this.vaultPopupItemsService.hasFilterApplied$.pipe(map((hasFilter) => hasFilter)),
); );
@@ -40,7 +40,7 @@ export class VaultPopupSectionService {
* application-applied overrides. * application-applied overrides.
* `null` means there is no current override * `null` means there is no current override
*/ */
private temporaryStateOverride = signal<Partial<PopupSectionOpen> | null>(null); private readonly temporaryStateOverride = signal<Partial<PopupSectionOpen> | null>(null);
constructor() { constructor() {
effect( effect(
@@ -71,7 +71,7 @@ export class VaultPopupSectionService {
* Stored disk state for the open/close state of the sections, with an initial value provided * Stored disk state for the open/close state of the sections, with an initial value provided
* if the stored disk state does not yet exist. * if the stored disk state does not yet exist.
*/ */
private sectionOpenStoredState = toSignal<PopupSectionOpen | null>( private readonly sectionOpenStoredState = toSignal<PopupSectionOpen | null>(
this.sectionOpenStateProvider.state$.pipe(map((sectionOpen) => sectionOpen ?? INITIAL_OPEN)), this.sectionOpenStateProvider.state$.pipe(map((sectionOpen) => sectionOpen ?? INITIAL_OPEN)),
// Indicates that the state value is loading // Indicates that the state value is loading
{ initialValue: null }, { initialValue: null },
@@ -81,7 +81,7 @@ export class VaultPopupSectionService {
* Indicates the current open/close display state of each section, accounting for temporary * Indicates the current open/close display state of each section, accounting for temporary
* non-persisted overrides. * non-persisted overrides.
*/ */
sectionOpenDisplayState: Signal<Partial<PopupSectionOpen>> = computed(() => ({ readonly sectionOpenDisplayState: Signal<Partial<PopupSectionOpen>> = computed(() => ({
...this.sectionOpenStoredState(), ...this.sectionOpenStoredState(),
...this.temporaryStateOverride(), ...this.temporaryStateOverride(),
})); }));

View File

@@ -22,20 +22,30 @@ import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-butto
import { AppearanceV2Component } from "./appearance-v2.component"; import { AppearanceV2Component } from "./appearance-v2.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-header", selector: "popup-header",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupHeaderComponent { class MockPopupHeaderComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string; @Input() pageTitle: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() backAction: () => void; @Input() backAction: () => void;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-page", selector: "popup-page",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupPageComponent { class MockPopupPageComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() loading: boolean; @Input() loading: boolean;
} }

View File

@@ -33,6 +33,8 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co
import { PopupSizeService } from "../../../platform/popup/layout/popup-size.service"; import { PopupSizeService } from "../../../platform/popup/layout/popup-size.service";
import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-buttons.service"; import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-buttons.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "./appearance-v2.component.html", templateUrl: "./appearance-v2.component.html",
imports: [ imports: [

View File

@@ -33,6 +33,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "archive.component.html", templateUrl: "archive.component.html",
standalone: true, standalone: true,

View File

@@ -13,6 +13,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "download-bitwarden.component.html", templateUrl: "download-bitwarden.component.html",
imports: [ imports: [

View File

@@ -21,20 +21,30 @@ import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-heade
import { FoldersV2Component } from "./folders-v2.component"; import { FoldersV2Component } from "./folders-v2.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-header", selector: "popup-header",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupHeaderComponent { class MockPopupHeaderComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string = ""; @Input() pageTitle: string = "";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() backAction: () => void = () => {}; @Input() backAction: () => void = () => {};
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "popup-footer", selector: "popup-footer",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPopupFooterComponent { class MockPopupFooterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() pageTitle: string = ""; @Input() pageTitle: string = "";
} }

View File

@@ -22,6 +22,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "./folders-v2.component.html", templateUrl: "./folders-v2.component.html",
imports: [ imports: [

View File

@@ -17,6 +17,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "more-from-bitwarden-page-v2.component.html", templateUrl: "more-from-bitwarden-page-v2.component.html",
imports: [ imports: [

View File

@@ -53,9 +53,13 @@ export class TrashListItemsContainerComponent {
/** /**
* The list of trashed items to display. * The list of trashed items to display.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
ciphers: PopupCipherViewLike[] = []; ciphers: PopupCipherViewLike[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
headerText: string; headerText: string;

View File

@@ -19,6 +19,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp
import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component";
import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "vault-settings-v2.component.html", templateUrl: "vault-settings-v2.component.html",
imports: [ imports: [
@@ -37,12 +39,12 @@ export class VaultSettingsV2Component implements OnInit, OnDestroy {
private userId$ = this.accountService.activeAccount$.pipe(getUserId); private userId$ = this.accountService.activeAccount$.pipe(getUserId);
// Check if user is premium user, they will be able to archive items // Check if user is premium user, they will be able to archive items
protected userCanArchive = toSignal( protected readonly userCanArchive = toSignal(
this.userId$.pipe(switchMap((userId) => this.cipherArchiveService.userCanArchive$(userId))), this.userId$.pipe(switchMap((userId) => this.cipherArchiveService.userCanArchive$(userId))),
); );
// Check if user has archived items (does not check if user is premium) // Check if user has archived items (does not check if user is premium)
protected showArchiveFilter = toSignal( protected readonly showArchiveFilter = toSignal(
this.userId$.pipe(switchMap((userId) => this.cipherArchiveService.showArchiveVault$(userId))), this.userId$.pipe(switchMap((userId) => this.cipherArchiveService.showArchiveVault$(userId))),
); );

View File

@@ -10,6 +10,8 @@ import {
CollectionAssignmentResult, CollectionAssignmentResult,
} from "@bitwarden/vault"; } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
standalone: true, standalone: true,
templateUrl: "./assign-collections-desktop.component.html", templateUrl: "./assign-collections-desktop.component.html",

View File

@@ -39,6 +39,8 @@ export const CredentialGeneratorDialogAction = {
type CredentialGeneratorDialogAction = UnionOfValues<typeof CredentialGeneratorDialogAction>; type CredentialGeneratorDialogAction = UnionOfValues<typeof CredentialGeneratorDialogAction>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "credential-generator-dialog", selector: "credential-generator-dialog",
templateUrl: "credential-generator-dialog.component.html", templateUrl: "credential-generator-dialog.component.html",

View File

@@ -25,22 +25,46 @@ import { CipherAuthorizationService } from "@bitwarden/common/vault/services/cip
import { ButtonComponent, ButtonModule, DialogService, ToastService } from "@bitwarden/components"; import { ButtonComponent, ButtonModule, DialogService, ToastService } from "@bitwarden/components";
import { ArchiveCipherUtilitiesService, PasswordRepromptService } from "@bitwarden/vault"; import { ArchiveCipherUtilitiesService, PasswordRepromptService } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-item-footer", selector: "app-vault-item-footer",
templateUrl: "item-footer.component.html", templateUrl: "item-footer.component.html",
imports: [ButtonModule, CommonModule, JslibModule], imports: [ButtonModule, CommonModule, JslibModule],
}) })
export class ItemFooterComponent implements OnInit, OnChanges { export class ItemFooterComponent implements OnInit, OnChanges {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipher: CipherView = new CipherView(); @Input({ required: true }) cipher: CipherView = new CipherView();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collectionId: string | null = null; @Input() collectionId: string | null = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) action: string = "view"; @Input({ required: true }) action: string = "view";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() masterPasswordAlreadyPrompted: boolean = false; @Input() masterPasswordAlreadyPrompted: boolean = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEdit = new EventEmitter<CipherView>(); @Output() onEdit = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onClone = new EventEmitter<CipherView>(); @Output() onClone = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onDelete = new EventEmitter<CipherView>(); @Output() onDelete = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onRestore = new EventEmitter<CipherView>(); @Output() onRestore = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onCancel = new EventEmitter<CipherView>(); @Output() onCancel = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onArchiveToggle = new EventEmitter<CipherView>(); @Output() onArchiveToggle = new EventEmitter<CipherView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("submitBtn", { static: false }) submitBtn: ButtonComponent | null = null; @ViewChild("submitBtn", { static: false }) submitBtn: ButtonComponent | null = null;
activeUserId: UserId | null = null; activeUserId: UserId | null = null;

View File

@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
import { CollectionFilterComponent as BaseCollectionFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/collection-filter.component"; import { CollectionFilterComponent as BaseCollectionFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/collection-filter.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-collection-filter", selector: "app-collection-filter",
templateUrl: "collection-filter.component.html", templateUrl: "collection-filter.component.html",

View File

@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
import { FolderFilterComponent as BaseFolderFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/folder-filter.component"; import { FolderFilterComponent as BaseFolderFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/folder-filter.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-folder-filter", selector: "app-folder-filter",
templateUrl: "folder-filter.component.html", templateUrl: "folder-filter.component.html",

View File

@@ -9,6 +9,8 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
import { ToastService } from "@bitwarden/components"; import { ToastService } from "@bitwarden/components";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-organization-filter", selector: "app-organization-filter",
templateUrl: "organization-filter.component.html", templateUrl: "organization-filter.component.html",

View File

@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
import { StatusFilterComponent as BaseStatusFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/status-filter.component"; import { StatusFilterComponent as BaseStatusFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/status-filter.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-status-filter", selector: "app-status-filter",
templateUrl: "status-filter.component.html", templateUrl: "status-filter.component.html",

View File

@@ -5,6 +5,8 @@ import { TypeFilterComponent as BaseTypeFilterComponent } from "@bitwarden/angul
import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service"; import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service";
import { CIPHER_MENU_ITEMS } from "@bitwarden/common/vault/types/cipher-menu-items"; import { CIPHER_MENU_ITEMS } from "@bitwarden/common/vault/types/cipher-menu-items";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-type-filter", selector: "app-type-filter",
templateUrl: "type-filter.component.html", templateUrl: "type-filter.component.html",

View File

@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
import { VaultFilterComponent as BaseVaultFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/vault-filter.component"; import { VaultFilterComponent as BaseVaultFilterComponent } from "@bitwarden/angular/vault/vault-filter/components/vault-filter.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-filter", selector: "app-vault-filter",
templateUrl: "vault-filter.component.html", templateUrl: "vault-filter.component.html",

View File

@@ -21,6 +21,8 @@ import { MenuModule } from "@bitwarden/components";
import { SearchBarService } from "../../../app/layout/search/search-bar.service"; import { SearchBarService } from "../../../app/layout/search/search-bar.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-items-v2", selector: "app-vault-items-v2",
templateUrl: "vault-items-v2.component.html", templateUrl: "vault-items-v2.component.html",

View File

@@ -94,6 +94,8 @@ import { VaultItemsV2Component } from "./vault-items-v2.component";
const BroadcasterSubscriptionId = "VaultComponent"; const BroadcasterSubscriptionId = "VaultComponent";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault", selector: "app-vault",
templateUrl: "vault-v2.component.html", templateUrl: "vault-v2.component.html",
@@ -138,12 +140,20 @@ const BroadcasterSubscriptionId = "VaultComponent";
export class VaultV2Component<C extends CipherViewLike> export class VaultV2Component<C extends CipherViewLike>
implements OnInit, OnDestroy, CopyClickListener implements OnInit, OnDestroy, CopyClickListener
{ {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(VaultItemsV2Component, { static: true }) @ViewChild(VaultItemsV2Component, { static: true })
vaultItemsComponent: VaultItemsV2Component<C> | null = null; vaultItemsComponent: VaultItemsV2Component<C> | null = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(VaultFilterComponent, { static: true }) @ViewChild(VaultFilterComponent, { static: true })
vaultFilterComponent: VaultFilterComponent | null = null; vaultFilterComponent: VaultFilterComponent | null = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("folderAddEdit", { read: ViewContainerRef, static: true }) @ViewChild("folderAddEdit", { read: ViewContainerRef, static: true })
folderAddEditModalRef: ViewContainerRef | null = null; folderAddEditModalRef: ViewContainerRef | null = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(CipherFormComponent) @ViewChild(CipherFormComponent)
cipherFormComponent: CipherFormComponent | null = null; cipherFormComponent: CipherFormComponent | null = null;

View File

@@ -12,6 +12,8 @@ import {
import { SharedModule } from "../../../shared"; import { SharedModule } from "../../../shared";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [SharedModule, AssignCollectionsComponent, PluralizePipe], imports: [SharedModule, AssignCollectionsComponent, PluralizePipe],
templateUrl: "./assign-collections-web.component.html", templateUrl: "./assign-collections-web.component.html",

View File

@@ -25,6 +25,8 @@ const WebStoreUrls: Partial<Record<DeviceType, string>> = {
"https://microsoftedge.microsoft.com/addons/detail/jbkfoedolllekgbhcbcoahefnbanhhlh", "https://microsoftedge.microsoft.com/addons/detail/jbkfoedolllekgbhcbcoahefnbanhhlh",
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-browser-extension-prompt-install", selector: "vault-browser-extension-prompt-install",
templateUrl: "./browser-extension-prompt-install.component.html", templateUrl: "./browser-extension-prompt-install.component.html",

View File

@@ -14,6 +14,8 @@ import {
} from "../../services/browser-extension-prompt.service"; } from "../../services/browser-extension-prompt.service";
import { ManuallyOpenExtensionComponent } from "../manually-open-extension/manually-open-extension.component"; import { ManuallyOpenExtensionComponent } from "../manually-open-extension/manually-open-extension.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-browser-extension-prompt", selector: "vault-browser-extension-prompt",
templateUrl: "./browser-extension-prompt.component.html", templateUrl: "./browser-extension-prompt.component.html",

View File

@@ -4,6 +4,8 @@ import { BitwardenIcon } from "@bitwarden/assets/svg";
import { IconModule } from "@bitwarden/components"; import { IconModule } from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common"; import { I18nPipe } from "@bitwarden/ui-common";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-manually-open-extension", selector: "vault-manually-open-extension",
templateUrl: "./manually-open-extension.component.html", templateUrl: "./manually-open-extension.component.html",

View File

@@ -16,6 +16,8 @@ export type AddExtensionLaterDialogData = {
onDismiss: () => void; onDismiss: () => void;
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-add-extension-later-dialog", selector: "vault-add-extension-later-dialog",
templateUrl: "./add-extension-later-dialog.component.html", templateUrl: "./add-extension-later-dialog.component.html",

View File

@@ -6,12 +6,16 @@ import { debounceTime, fromEvent } from "rxjs";
import { JslibModule } from "@bitwarden/angular/jslib.module"; import { JslibModule } from "@bitwarden/angular/jslib.module";
import { DarkImageSourceDirective } from "@bitwarden/vault"; import { DarkImageSourceDirective } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-add-extension-videos", selector: "vault-add-extension-videos",
templateUrl: "./add-extension-videos.component.html", templateUrl: "./add-extension-videos.component.html",
imports: [CommonModule, JslibModule, DarkImageSourceDirective], imports: [CommonModule, JslibModule, DarkImageSourceDirective],
}) })
export class AddExtensionVideosComponent { export class AddExtensionVideosComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChildren("video", { read: ElementRef }) protected videoElements!: QueryList< @ViewChildren("video", { read: ElementRef }) protected videoElements!: QueryList<
ElementRef<HTMLVideoElement> ElementRef<HTMLVideoElement>
>; >;

View File

@@ -42,6 +42,8 @@ export const SetupExtensionState = {
type SetupExtensionState = UnionOfValues<typeof SetupExtensionState>; type SetupExtensionState = UnionOfValues<typeof SetupExtensionState>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-setup-extension", selector: "vault-setup-extension",
templateUrl: "./setup-extension.component.html", templateUrl: "./setup-extension.component.html",

View File

@@ -129,6 +129,8 @@ export const VaultItemDialogResult = {
export type VaultItemDialogResult = UnionOfValues<typeof VaultItemDialogResult>; export type VaultItemDialogResult = UnionOfValues<typeof VaultItemDialogResult>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-item-dialog", selector: "app-vault-item-dialog",
templateUrl: "vault-item-dialog.component.html", templateUrl: "vault-item-dialog.component.html",
@@ -159,9 +161,13 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
* Reference to the dialog content element. Used to scroll to the top of the dialog when switching modes. * Reference to the dialog content element. Used to scroll to the top of the dialog when switching modes.
* @protected * @protected
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("dialogContent") @ViewChild("dialogContent")
protected dialogContent: ElementRef<HTMLElement>; protected dialogContent: ElementRef<HTMLElement>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(CipherFormComponent) cipherFormComponent!: CipherFormComponent; @ViewChild(CipherFormComponent) cipherFormComponent!: CipherFormComponent;
/** /**

View File

@@ -28,6 +28,8 @@ import {
import { VaultItemEvent } from "./vault-item-event"; import { VaultItemEvent } from "./vault-item-event";
import { RowHeightClass } from "./vault-items.component"; import { RowHeightClass } from "./vault-items.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "tr[appVaultCipherRow]", selector: "tr[appVaultCipherRow]",
templateUrl: "vault-cipher-row.component.html", templateUrl: "vault-cipher-row.component.html",
@@ -36,42 +38,86 @@ import { RowHeightClass } from "./vault-items.component";
export class VaultCipherRowComponent<C extends CipherViewLike> implements OnInit { export class VaultCipherRowComponent<C extends CipherViewLike> implements OnInit {
protected RowHeightClass = RowHeightClass; protected RowHeightClass = RowHeightClass;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(MenuTriggerForDirective, { static: false }) menuTrigger: MenuTriggerForDirective; @ViewChild(MenuTriggerForDirective, { static: false }) menuTrigger: MenuTriggerForDirective;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() cipher: C; @Input() cipher: C;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showOwner: boolean; @Input() showOwner: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showCollections: boolean; @Input() showCollections: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showGroups: boolean; @Input() showGroups: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showPremiumFeatures: boolean; @Input() showPremiumFeatures: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() useEvents: boolean; @Input() useEvents: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() cloneable: boolean; @Input() cloneable: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizations: Organization[]; @Input() organizations: Organization[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collections: CollectionView[]; @Input() collections: CollectionView[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() viewingOrgVault: boolean; @Input() viewingOrgVault: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canEditCipher: boolean; @Input() canEditCipher: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canAssignCollections: boolean; @Input() canAssignCollections: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canManageCollection: boolean; @Input() canManageCollection: boolean;
/** /**
* uses new permission delete logic from PM-15493 * uses new permission delete logic from PM-15493
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canDeleteCipher: boolean; @Input() canDeleteCipher: boolean;
/** /**
* uses new permission restore logic from PM-15493 * uses new permission restore logic from PM-15493
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canRestoreCipher: boolean; @Input() canRestoreCipher: boolean;
/** /**
* user has archive permissions * user has archive permissions
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() userCanArchive: boolean; @Input() userCanArchive: boolean;
/** /**
* Enforge Org Data Ownership Policy Status * Enforge Org Data Ownership Policy Status
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() enforceOrgDataOwnershipPolicy: boolean; @Input() enforceOrgDataOwnershipPolicy: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEvent = new EventEmitter<VaultItemEvent<C>>(); @Output() onEvent = new EventEmitter<VaultItemEvent<C>>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() checked: boolean; @Input() checked: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() checkedToggled = new EventEmitter<void>(); @Output() checkedToggled = new EventEmitter<void>();
protected CipherType = CipherType; protected CipherType = CipherType;

View File

@@ -23,6 +23,8 @@ import {
import { VaultItemEvent } from "./vault-item-event"; import { VaultItemEvent } from "./vault-item-event";
import { RowHeightClass } from "./vault-items.component"; import { RowHeightClass } from "./vault-items.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "tr[appVaultCollectionRow]", selector: "tr[appVaultCollectionRow]",
templateUrl: "vault-collection-row.component.html", templateUrl: "vault-collection-row.component.html",
@@ -34,23 +36,53 @@ export class VaultCollectionRowComponent<C extends CipherViewLike> {
protected CollectionPermission = CollectionPermission; protected CollectionPermission = CollectionPermission;
protected DefaultCollectionType = CollectionTypes.DefaultUserCollection; protected DefaultCollectionType = CollectionTypes.DefaultUserCollection;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(MenuTriggerForDirective, { static: false }) menuTrigger: MenuTriggerForDirective; @ViewChild(MenuTriggerForDirective, { static: false }) menuTrigger: MenuTriggerForDirective;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collection: CollectionView; @Input() collection: CollectionView;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showOwner: boolean; @Input() showOwner: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showCollections: boolean; @Input() showCollections: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showGroups: boolean; @Input() showGroups: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canEditCollection: boolean; @Input() canEditCollection: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canDeleteCollection: boolean; @Input() canDeleteCollection: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canViewCollectionInfo: boolean; @Input() canViewCollectionInfo: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizations: Organization[]; @Input() organizations: Organization[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() groups: GroupView[]; @Input() groups: GroupView[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showPermissionsColumn: boolean; @Input() showPermissionsColumn: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEvent = new EventEmitter<VaultItemEvent<C>>(); @Output() onEvent = new EventEmitter<VaultItemEvent<C>>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() checked: boolean; @Input() checked: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() checkedToggled = new EventEmitter<void>(); @Output() checkedToggled = new EventEmitter<void>();
constructor(private i18nService: I18nService) {} constructor(private i18nService: I18nService) {}

View File

@@ -36,6 +36,8 @@ const MaxSelectionCount = 500;
type ItemPermission = CollectionPermission | "NoAccess"; type ItemPermission = CollectionPermission | "NoAccess";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-items", selector: "app-vault-items",
templateUrl: "vault-items.component.html", templateUrl: "vault-items.component.html",
@@ -44,32 +46,76 @@ type ItemPermission = CollectionPermission | "NoAccess";
export class VaultItemsComponent<C extends CipherViewLike> { export class VaultItemsComponent<C extends CipherViewLike> {
protected RowHeight = RowHeight; protected RowHeight = RowHeight;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showOwner: boolean; @Input() showOwner: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showCollections: boolean; @Input() showCollections: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showGroups: boolean; @Input() showGroups: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() useEvents: boolean; @Input() useEvents: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showPremiumFeatures: boolean; @Input() showPremiumFeatures: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showBulkMove: boolean; @Input() showBulkMove: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showBulkTrashOptions: boolean; @Input() showBulkTrashOptions: boolean;
// Encompasses functionality only available from the organization vault context // Encompasses functionality only available from the organization vault context
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showAdminActions = false; @Input() showAdminActions = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() allOrganizations: Organization[] = []; @Input() allOrganizations: Organization[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() allCollections: CollectionView[] = []; @Input() allCollections: CollectionView[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() allGroups: GroupView[] = []; @Input() allGroups: GroupView[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showBulkEditCollectionAccess = false; @Input() showBulkEditCollectionAccess = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showBulkAddToCollections = false; @Input() showBulkAddToCollections = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() showPermissionsColumn = false; @Input() showPermissionsColumn = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() viewingOrgVault: boolean; @Input() viewingOrgVault: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() addAccessStatus: number; @Input() addAccessStatus: number;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() addAccessToggle: boolean; @Input() addAccessToggle: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeCollection: CollectionView | undefined; @Input() activeCollection: CollectionView | undefined;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() userCanArchive: boolean; @Input() userCanArchive: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() enforceOrgDataOwnershipPolicy: boolean; @Input() enforceOrgDataOwnershipPolicy: boolean;
private readonly restrictedPolicies = toSignal(this.restrictedItemTypesService.restricted$); private readonly restrictedPolicies = toSignal(this.restrictedItemTypesService.restricted$);
private _ciphers?: C[] = []; private _ciphers?: C[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() get ciphers(): C[] { @Input() get ciphers(): C[] {
return this._ciphers; return this._ciphers;
} }
@@ -79,6 +125,8 @@ export class VaultItemsComponent<C extends CipherViewLike> {
} }
private _collections?: CollectionView[] = []; private _collections?: CollectionView[] = [];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() get collections(): CollectionView[] { @Input() get collections(): CollectionView[] {
return this._collections; return this._collections;
} }
@@ -87,6 +135,8 @@ export class VaultItemsComponent<C extends CipherViewLike> {
this.refreshItems(); this.refreshItems();
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEvent = new EventEmitter<VaultItemEvent<C>>(); @Output() onEvent = new EventEmitter<VaultItemEvent<C>>();
protected editableItems: VaultItem<C>[] = []; protected editableItems: VaultItem<C>[] = [];

View File

@@ -16,14 +16,24 @@ import {
WebVaultGeneratorDialogResult, WebVaultGeneratorDialogResult,
} from "./web-generator-dialog.component"; } from "./web-generator-dialog.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-cipher-form-generator", selector: "vault-cipher-form-generator",
template: "", template: "",
}) })
class MockCipherFormGenerator { class MockCipherFormGenerator {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() type: "password" | "username" = "password"; @Input() type: "password" | "username" = "password";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() algorithmSelected: EventEmitter<AlgorithmInfo> = new EventEmitter(); @Output() algorithmSelected: EventEmitter<AlgorithmInfo> = new EventEmitter();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() uri?: string; @Input() uri?: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() valueGenerated = new EventEmitter<string>(); @Output() valueGenerated = new EventEmitter<string>();
} }

View File

@@ -34,6 +34,8 @@ export const WebVaultGeneratorDialogAction = {
type WebVaultGeneratorDialogAction = UnionOfValues<typeof WebVaultGeneratorDialogAction>; type WebVaultGeneratorDialogAction = UnionOfValues<typeof WebVaultGeneratorDialogAction>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "web-vault-generator-dialog", selector: "web-vault-generator-dialog",
templateUrl: "./web-generator-dialog.component.html", templateUrl: "./web-generator-dialog.component.html",

View File

@@ -62,6 +62,8 @@ export interface AddEditCipherDialogCloseResult {
* Component for viewing a cipher, presented in a dialog. * Component for viewing a cipher, presented in a dialog.
* @deprecated Use the VaultItemDialogComponent instead. * @deprecated Use the VaultItemDialogComponent instead.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-add-edit-v2", selector: "app-vault-add-edit-v2",
templateUrl: "add-edit-v2.component.html", templateUrl: "add-edit-v2.component.html",

View File

@@ -52,6 +52,8 @@ export const openBulkDeleteDialog = (
); );
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "bulk-delete-dialog.component.html", templateUrl: "bulk-delete-dialog.component.html",
standalone: false, standalone: false,

View File

@@ -46,6 +46,8 @@ export const openBulkMoveDialog = (
); );
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "bulk-move-dialog.component.html", templateUrl: "bulk-move-dialog.component.html",
standalone: false, standalone: false,

View File

@@ -10,14 +10,22 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { Utils } from "@bitwarden/common/platform/misc/utils"; import { Utils } from "@bitwarden/common/platform/misc/utils";
import { OrganizationId } from "@bitwarden/sdk-internal"; import { OrganizationId } from "@bitwarden/sdk-internal";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-org-badge", selector: "app-org-badge",
templateUrl: "organization-name-badge.component.html", templateUrl: "organization-name-badge.component.html",
standalone: false, standalone: false,
}) })
export class OrganizationNameBadgeComponent implements OnChanges { export class OrganizationNameBadgeComponent implements OnChanges {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizationId?: OrganizationId | string; @Input() organizationId?: OrganizationId | string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizationName: string; @Input() organizationName: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
// Need a separate variable or we get weird behavior when used as part of cdk virtual scrolling // Need a separate variable or we get weird behavior when used as part of cdk virtual scrolling

View File

@@ -17,6 +17,8 @@ import { SharedModule } from "../../../shared";
import { VaultBannersService, VisibleVaultBanner } from "./services/vault-banners.service"; import { VaultBannersService, VisibleVaultBanner } from "./services/vault-banners.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-banners", selector: "app-vault-banners",
templateUrl: "./vault-banners.component.html", templateUrl: "./vault-banners.component.html",
@@ -32,6 +34,8 @@ export class VaultBannersComponent implements OnInit {
visibleBanners: VisibleVaultBanner[] = []; visibleBanners: VisibleVaultBanner[] = [];
premiumBannerVisible$: Observable<boolean>; premiumBannerVisible$: Observable<boolean>;
VisibleVaultBanner = VisibleVaultBanner; VisibleVaultBanner = VisibleVaultBanner;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizations: Organization[] = []; @Input() organizations: Organization[] = [];
private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id)); private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));

View File

@@ -40,6 +40,8 @@ import { LinkSsoService } from "../../../../auth/core/services";
import { OptionsInput } from "../shared/components/vault-filter-section.component"; import { OptionsInput } from "../shared/components/vault-filter-section.component";
import { OrganizationFilter } from "../shared/models/vault-filter.type"; import { OrganizationFilter } from "../shared/models/vault-filter.type";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-organization-options", selector: "app-organization-options",
templateUrl: "organization-options.component.html", templateUrl: "organization-options.component.html",

View File

@@ -44,6 +44,8 @@ import {
import { OrganizationOptionsComponent } from "./organization-options.component"; import { OrganizationOptionsComponent } from "./organization-options.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault-filter", selector: "app-vault-filter",
templateUrl: "vault-filter.component.html", templateUrl: "vault-filter.component.html",
@@ -51,10 +53,18 @@ import { OrganizationOptionsComponent } from "./organization-options.component";
}) })
export class VaultFilterComponent implements OnInit, OnDestroy { export class VaultFilterComponent implements OnInit, OnDestroy {
filters?: VaultFilterList; filters?: VaultFilterList;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter = new VaultFilter(); @Input() activeFilter: VaultFilter = new VaultFilter();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEditFolder = new EventEmitter<FolderFilter>(); @Output() onEditFolder = new EventEmitter<FolderFilter>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() searchText = ""; @Input() searchText = "";
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() searchTextChanged = new EventEmitter<string>(); @Output() searchTextChanged = new EventEmitter<string>();
isLoaded = false; isLoaded = false;

View File

@@ -13,6 +13,8 @@ import { VaultFilterService } from "../../services/abstractions/vault-filter.ser
import { VaultFilterSection, VaultFilterType } from "../models/vault-filter-section.type"; import { VaultFilterSection, VaultFilterType } from "../models/vault-filter-section.type";
import { VaultFilter } from "../models/vault-filter.model"; import { VaultFilter } from "../models/vault-filter.model";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-filter-section", selector: "app-filter-section",
templateUrl: "vault-filter-section.component.html", templateUrl: "vault-filter-section.component.html",
@@ -22,7 +24,11 @@ export class VaultFilterSectionComponent implements OnInit, OnDestroy {
private destroy$ = new Subject<void>(); private destroy$ = new Subject<void>();
private activeUserId$ = getUserId(this.accountService.activeAccount$); private activeUserId$ = getUserId(this.accountService.activeAccount$);
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() section: VaultFilterSection; @Input() section: VaultFilterSection;
data: TreeNode<VaultFilterType>; data: TreeNode<VaultFilterType>;

View File

@@ -60,33 +60,53 @@ export class VaultHeaderComponent {
* Boolean to determine the loading state of the header. * Boolean to determine the loading state of the header.
* Shows a loading spinner if set to true * Shows a loading spinner if set to true
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() loading: boolean = true; @Input() loading: boolean = true;
/** Current active filter */ /** Current active filter */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() filter: RoutedVaultFilterModel | undefined; @Input() filter: RoutedVaultFilterModel | undefined;
/** All organizations that can be shown */ /** All organizations that can be shown */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizations: Organization[] = []; @Input() organizations: Organization[] = [];
/** Currently selected collection */ /** Currently selected collection */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collection?: TreeNode<CollectionView>; @Input() collection?: TreeNode<CollectionView>;
/** Whether 'Collection' option is shown in the 'New' dropdown */ /** Whether 'Collection' option is shown in the 'New' dropdown */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() canCreateCollections: boolean = false; @Input() canCreateCollections: boolean = false;
/** Emits an event when the new item button is clicked in the header */ /** Emits an event when the new item button is clicked in the header */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddCipher = new EventEmitter<CipherType | undefined>(); @Output() onAddCipher = new EventEmitter<CipherType | undefined>();
/** Emits an event when the new collection button is clicked in the 'New' dropdown menu */ /** Emits an event when the new collection button is clicked in the 'New' dropdown menu */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddCollection = new EventEmitter<null>(); @Output() onAddCollection = new EventEmitter<null>();
/** Emits an event when the new folder button is clicked in the 'New' dropdown menu */ /** Emits an event when the new folder button is clicked in the 'New' dropdown menu */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddFolder = new EventEmitter<null>(); @Output() onAddFolder = new EventEmitter<null>();
/** Emits an event when the edit collection button is clicked in the header */ /** Emits an event when the edit collection button is clicked in the header */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEditCollection = new EventEmitter<{ tab: CollectionDialogTabType }>(); @Output() onEditCollection = new EventEmitter<{ tab: CollectionDialogTabType }>();
/** Emits an event when the delete collection button is clicked in the header */ /** Emits an event when the delete collection button is clicked in the header */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onDeleteCollection = new EventEmitter<void>(); @Output() onDeleteCollection = new EventEmitter<void>();
constructor( constructor(

View File

@@ -32,6 +32,8 @@ import { OnboardingModule } from "../../../shared/components/onboarding/onboardi
import { VaultOnboardingService as VaultOnboardingServiceAbstraction } from "./services/abstraction/vault-onboarding.service"; import { VaultOnboardingService as VaultOnboardingServiceAbstraction } from "./services/abstraction/vault-onboarding.service";
import { VaultOnboardingService, VaultOnboardingTasks } from "./services/vault-onboarding.service"; import { VaultOnboardingService, VaultOnboardingTasks } from "./services/vault-onboarding.service";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
imports: [OnboardingModule, CommonModule, JslibModule, LinkModule], imports: [OnboardingModule, CommonModule, JslibModule, LinkModule],
providers: [ providers: [
@@ -44,8 +46,14 @@ import { VaultOnboardingService, VaultOnboardingTasks } from "./services/vault-o
templateUrl: "vault-onboarding.component.html", templateUrl: "vault-onboarding.component.html",
}) })
export class VaultOnboardingComponent implements OnInit, OnChanges, OnDestroy { export class VaultOnboardingComponent implements OnInit, OnChanges, OnDestroy {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() ciphers: CipherViewLike[]; @Input() ciphers: CipherViewLike[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() orgs: Organization[]; @Input() orgs: Organization[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddCipher = new EventEmitter<CipherType>(); @Output() onAddCipher = new EventEmitter<CipherType>();
extensionUrl: string; extensionUrl: string;

View File

@@ -154,6 +154,8 @@ type EmptyStateItem = {
type EmptyStateMap = Record<EmptyStateType, EmptyStateItem>; type EmptyStateMap = Record<EmptyStateType, EmptyStateItem>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-vault", selector: "app-vault",
templateUrl: "vault.component.html", templateUrl: "vault.component.html",
@@ -173,7 +175,11 @@ type EmptyStateMap = Record<EmptyStateType, EmptyStateItem>;
], ],
}) })
export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestroy { export class VaultComponent<C extends CipherViewLike> implements OnInit, OnDestroy {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("vaultFilter", { static: true }) filterComponent: VaultFilterComponent; @ViewChild("vaultFilter", { static: true }) filterComponent: VaultFilterComponent;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("vaultItems", { static: false }) vaultItemsComponent: VaultItemsComponent<C>; @ViewChild("vaultItems", { static: false }) vaultItemsComponent: VaultItemsComponent<C>;
trashCleanupWarning: string = null; trashCleanupWarning: string = null;

View File

@@ -25,6 +25,8 @@ export interface PurgeVaultDialogData {
organizationId: string; organizationId: string;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "purge-vault.component.html", templateUrl: "purge-vault.component.html",
imports: [SharedModule, UserVerificationModule], imports: [SharedModule, UserVerificationModule],

View File

@@ -16,8 +16,14 @@ import { KeyService } from "@bitwarden/key-management";
@Directive() @Directive()
export class FolderAddEditComponent implements OnInit { export class FolderAddEditComponent implements OnInit {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() folderId: string; @Input() folderId: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onSavedFolder = new EventEmitter<FolderView>(); @Output() onSavedFolder = new EventEmitter<FolderView>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onDeletedFolder = new EventEmitter<FolderView>(); @Output() onDeletedFolder = new EventEmitter<FolderView>();
editMode = false; editMode = false;

View File

@@ -25,14 +25,14 @@ export class IconComponent {
/** /**
* The cipher to display the icon for. * The cipher to display the icon for.
*/ */
cipher = input.required<CipherViewLike>(); readonly cipher = input.required<CipherViewLike>();
/** /**
* coloredIcon will adjust the size of favicons and the colors of the text icon when user is in the item details view. * coloredIcon will adjust the size of favicons and the colors of the text icon when user is in the item details view.
*/ */
coloredIcon = input<boolean>(false); readonly coloredIcon = input<boolean>(false);
imageLoaded = signal(false); readonly imageLoaded = signal(false);
protected data$: Observable<CipherIconDetails>; protected data$: Observable<CipherIconDetails>;

View File

@@ -4,6 +4,8 @@ import { Component, EventEmitter, Input, Output } from "@angular/core";
import { ButtonModule, IconButtonModule, TypographyModule } from "@bitwarden/components"; import { ButtonModule, IconButtonModule, TypographyModule } from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common"; import { I18nPipe } from "@bitwarden/ui-common";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "bit-spotlight", selector: "bit-spotlight",
templateUrl: "spotlight.component.html", templateUrl: "spotlight.component.html",
@@ -11,16 +13,30 @@ import { I18nPipe } from "@bitwarden/ui-common";
}) })
export class SpotlightComponent { export class SpotlightComponent {
// The title of the component // The title of the component
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) title: string | null = null; @Input({ required: true }) title: string | null = null;
// The subtitle of the component // The subtitle of the component
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() subtitle?: string | null = null; @Input() subtitle?: string | null = null;
// The text to display on the button // The text to display on the button
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() buttonText?: string; @Input() buttonText?: string;
// Wheter the component can be dismissed, if true, the component will not show a close button // Wheter the component can be dismissed, if true, the component will not show a close button
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() persistent = false; @Input() persistent = false;
// Optional icon to display on the button // Optional icon to display on the button
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() buttonIcon: string | null = null; @Input() buttonIcon: string | null = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onDismiss = new EventEmitter<void>(); @Output() onDismiss = new EventEmitter<void>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onButtonClick = new EventEmitter(); @Output() onButtonClick = new EventEmitter();
handleButtonClick(event: MouseEvent): void { handleButtonClick(event: MouseEvent): void {

View File

@@ -31,10 +31,20 @@ import {
@Directive() @Directive()
export class VaultItemsComponent<C extends CipherViewLike> implements OnDestroy { export class VaultItemsComponent<C extends CipherViewLike> implements OnDestroy {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeCipherId: string = null; @Input() activeCipherId: string = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onCipherClicked = new EventEmitter<C>(); @Output() onCipherClicked = new EventEmitter<C>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onCipherRightClicked = new EventEmitter<C>(); @Output() onCipherRightClicked = new EventEmitter<C>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddCipher = new EventEmitter<CipherType | undefined>(); @Output() onAddCipher = new EventEmitter<CipherType | undefined>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddCipherOptions = new EventEmitter(); @Output() onAddCipherOptions = new EventEmitter();
loaded = false; loaded = false;

View File

@@ -13,13 +13,25 @@ import { VaultFilter } from "../models/vault-filter.model";
@Directive() @Directive()
export class CollectionFilterComponent { export class CollectionFilterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hide = false; @Input() hide = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collapsedFilterNodes: Set<string>; @Input() collapsedFilterNodes: Set<string>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collectionNodes: DynamicTreeNode<CollectionView>; @Input() collectionNodes: DynamicTreeNode<CollectionView>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> = @Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
new EventEmitter<ITreeNodeObject>(); new EventEmitter<ITreeNodeObject>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>(); @Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
DefaultCollectionType = CollectionTypes.DefaultUserCollection; DefaultCollectionType = CollectionTypes.DefaultUserCollection;

View File

@@ -11,15 +11,31 @@ import { VaultFilter } from "../models/vault-filter.model";
@Directive() @Directive()
export class FolderFilterComponent { export class FolderFilterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hide = false; @Input() hide = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collapsedFilterNodes: Set<string>; @Input() collapsedFilterNodes: Set<string>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() folderNodes: DynamicTreeNode<FolderView>; @Input() folderNodes: DynamicTreeNode<FolderView>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> = @Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
new EventEmitter<ITreeNodeObject>(); new EventEmitter<ITreeNodeObject>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>(); @Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddFolder = new EventEmitter(); @Output() onAddFolder = new EventEmitter();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEditFolder = new EventEmitter<FolderView>(); @Output() onEditFolder = new EventEmitter<FolderView>();
get folders() { get folders() {

View File

@@ -11,15 +11,31 @@ import { VaultFilter } from "../models/vault-filter.model";
@Directive() @Directive()
export class OrganizationFilterComponent { export class OrganizationFilterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hide = false; @Input() hide = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collapsedFilterNodes: Set<string>; @Input() collapsedFilterNodes: Set<string>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizations: Organization[]; @Input() organizations: Organization[];
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeOrganizationDataOwnership: boolean; @Input() activeOrganizationDataOwnership: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeSingleOrganizationPolicy: boolean; @Input() activeSingleOrganizationPolicy: boolean;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> = @Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
new EventEmitter<ITreeNodeObject>(); new EventEmitter<ITreeNodeObject>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>(); @Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
get displayMode(): DisplayMode { get displayMode(): DisplayMode {

View File

@@ -7,10 +7,20 @@ import { VaultFilter } from "../models/vault-filter.model";
@Directive() @Directive()
export class StatusFilterComponent { export class StatusFilterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideFavorites = false; @Input() hideFavorites = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideTrash = false; @Input() hideTrash = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideArchive = false; @Input() hideArchive = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>(); @Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
get show() { get show() {

View File

@@ -10,13 +10,25 @@ import { VaultFilter } from "../models/vault-filter.model";
@Directive() @Directive()
export class TypeFilterComponent { export class TypeFilterComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hide = false; @Input() hide = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collapsedFilterNodes: Set<string>; @Input() collapsedFilterNodes: Set<string>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() selectedCipherType: CipherType = null; @Input() selectedCipherType: CipherType = null;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter; @Input() activeFilter: VaultFilter;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> = @Output() onNodeCollapseStateChange: EventEmitter<ITreeNodeObject> =
new EventEmitter<ITreeNodeObject>(); new EventEmitter<ITreeNodeObject>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>(); @Output() onFilterChange: EventEmitter<VaultFilter> = new EventEmitter<VaultFilter>();
readonly typesNode: TopLevelTreeNode = { readonly typesNode: TopLevelTreeNode = {

View File

@@ -22,15 +22,33 @@ import { VaultFilter } from "../models/vault-filter.model";
// and refactor desktop/browser vault filters // and refactor desktop/browser vault filters
@Directive() @Directive()
export class VaultFilterComponent implements OnInit { export class VaultFilterComponent implements OnInit {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() activeFilter: VaultFilter = new VaultFilter(); @Input() activeFilter: VaultFilter = new VaultFilter();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideFolders = false; @Input() hideFolders = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideCollections = false; @Input() hideCollections = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideFavorites = false; @Input() hideFavorites = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideTrash = false; @Input() hideTrash = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() hideOrganizations = false; @Input() hideOrganizations = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onFilterChange = new EventEmitter<VaultFilter>(); @Output() onFilterChange = new EventEmitter<VaultFilter>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onAddFolder = new EventEmitter<never>(); @Output() onAddFolder = new EventEmitter<never>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onEditFolder = new EventEmitter<FolderView>(); @Output() onEditFolder = new EventEmitter<FolderView>();
private activeUserId: UserId; private activeUserId: UserId;

View File

@@ -13,11 +13,15 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component"
import { AdditionalOptionsSectionComponent } from "./additional-options-section.component"; import { AdditionalOptionsSectionComponent } from "./additional-options-section.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-custom-fields", selector: "vault-custom-fields",
template: "", template: "",
}) })
class MockCustomFieldsComponent { class MockCustomFieldsComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disableSectionMargin: boolean; @Input() disableSectionMargin: boolean;
} }

View File

@@ -21,6 +21,8 @@ import { PasswordRepromptService } from "../../../services/password-reprompt.ser
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
import { CustomFieldsComponent } from "../custom-fields/custom-fields.component"; import { CustomFieldsComponent } from "../custom-fields/custom-fields.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-additional-options-section", selector: "vault-additional-options-section",
templateUrl: "./additional-options-section.component.html", templateUrl: "./additional-options-section.component.html",
@@ -39,6 +41,8 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component"
], ],
}) })
export class AdditionalOptionsSectionComponent implements OnInit { export class AdditionalOptionsSectionComponent implements OnInit {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(CustomFieldsComponent) customFieldsComponent: CustomFieldsComponent; @ViewChild(CustomFieldsComponent) customFieldsComponent: CustomFieldsComponent;
additionalOptionsForm = this.formBuilder.group({ additionalOptionsForm = this.formBuilder.group({
@@ -56,6 +60,8 @@ export class AdditionalOptionsSectionComponent implements OnInit {
/** True when the form is in `partial-edit` mode */ /** True when the form is in `partial-edit` mode */
isPartialEdit = false; isPartialEdit = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disableSectionMargin: boolean; @Input() disableSectionMargin: boolean;
/** True when the form allows new fields to be added */ /** True when the form allows new fields to be added */

View File

@@ -26,13 +26,21 @@ import { FakeAccountService, mockAccountServiceWith } from "../../../../../commo
import { CipherAttachmentsComponent } from "./cipher-attachments.component"; import { CipherAttachmentsComponent } from "./cipher-attachments.component";
import { DeleteAttachmentComponent } from "./delete-attachment/delete-attachment.component"; import { DeleteAttachmentComponent } from "./delete-attachment/delete-attachment.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-download-attachment", selector: "app-download-attachment",
template: "", template: "",
}) })
class MockDownloadAttachmentComponent { class MockDownloadAttachmentComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() attachment: AttachmentView; @Input() attachment: AttachmentView;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() cipher: CipherView; @Input() cipher: CipherView;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() admin: boolean = false; @Input() admin: boolean = false;
} }

View File

@@ -56,6 +56,8 @@ type CipherAttachmentForm = FormGroup<{
file: FormControl<File | null>; file: FormControl<File | null>;
}>; }>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-cipher-attachments", selector: "app-cipher-attachments",
templateUrl: "./cipher-attachments.component.html", templateUrl: "./cipher-attachments.component.html",
@@ -77,27 +79,43 @@ export class CipherAttachmentsComponent implements OnInit, AfterViewInit {
static attachmentFormID = "attachmentForm"; static attachmentFormID = "attachmentForm";
/** Reference to the file HTMLInputElement */ /** Reference to the file HTMLInputElement */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("fileInput", { read: ElementRef }) private fileInput: ElementRef<HTMLInputElement>; @ViewChild("fileInput", { read: ElementRef }) private fileInput: ElementRef<HTMLInputElement>;
/** Reference to the BitSubmitDirective */ /** Reference to the BitSubmitDirective */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(BitSubmitDirective) bitSubmit: BitSubmitDirective; @ViewChild(BitSubmitDirective) bitSubmit: BitSubmitDirective;
/** The `id` of the cipher in context */ /** The `id` of the cipher in context */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipherId: CipherId; @Input({ required: true }) cipherId: CipherId;
/** The organization ID if this cipher belongs to an organization */ /** The organization ID if this cipher belongs to an organization */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() organizationId?: OrganizationId; @Input() organizationId?: OrganizationId;
/** Denotes if the action is occurring from within the admin console */ /** Denotes if the action is occurring from within the admin console */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() admin: boolean = false; @Input() admin: boolean = false;
/** An optional submit button, whose loading/disabled state will be tied to the form state. */ /** An optional submit button, whose loading/disabled state will be tied to the form state. */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() submitBtn?: ButtonComponent; @Input() submitBtn?: ButtonComponent;
/** Emits after a file has been successfully uploaded */ /** Emits after a file has been successfully uploaded */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onUploadSuccess = new EventEmitter<void>(); @Output() onUploadSuccess = new EventEmitter<void>();
/** Emits after a file has been successfully removed */ /** Emits after a file has been successfully removed */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onRemoveSuccess = new EventEmitter<void>(); @Output() onRemoveSuccess = new EventEmitter<void>();
organization: Organization; organization: Organization;

View File

@@ -17,6 +17,8 @@ import {
ToastService, ToastService,
} from "@bitwarden/components"; } from "@bitwarden/components";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "app-delete-attachment", selector: "app-delete-attachment",
templateUrl: "./delete-attachment.component.html", templateUrl: "./delete-attachment.component.html",
@@ -24,15 +26,23 @@ import {
}) })
export class DeleteAttachmentComponent { export class DeleteAttachmentComponent {
/** Id of the cipher associated with the attachment */ /** Id of the cipher associated with the attachment */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipherId!: string; @Input({ required: true }) cipherId!: string;
/** The attachment that is can be deleted */ /** The attachment that is can be deleted */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) attachment!: AttachmentView; @Input({ required: true }) attachment!: AttachmentView;
/** Whether the attachment is being accessed from the admin console */ /** Whether the attachment is being accessed from the admin console */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() admin: boolean = false; @Input() admin: boolean = false;
/** Emits when the attachment is successfully deleted */ /** Emits when the attachment is successfully deleted */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onDeletionSuccess = new EventEmitter<void>(); @Output() onDeletionSuccess = new EventEmitter<void>();
constructor( constructor(

View File

@@ -17,6 +17,8 @@ export type AdvancedUriOptionDialogParams = {
onContinue: () => void; onContinue: () => void;
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
templateUrl: "advanced-uri-option-dialog.component.html", templateUrl: "advanced-uri-option-dialog.component.html",
imports: [ButtonLinkDirective, ButtonModule, DialogModule, JslibModule], imports: [ButtonLinkDirective, ButtonModule, DialogModule, JslibModule],

View File

@@ -36,6 +36,8 @@ interface UriField {
matchDetection: UriMatchStrategySetting; matchDetection: UriMatchStrategySetting;
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-autofill-options", selector: "vault-autofill-options",
templateUrl: "./autofill-options.component.html", templateUrl: "./autofill-options.component.html",
@@ -60,6 +62,8 @@ export class AutofillOptionsComponent implements OnInit {
/** /**
* List of rendered UriOptionComponents. Used for focusing newly added Uri inputs. * List of rendered UriOptionComponents. Used for focusing newly added Uri inputs.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChildren(UriOptionComponent) @ViewChildren(UriOptionComponent)
protected uriOptions: QueryList<UriOptionComponent>; protected uriOptions: QueryList<UriOptionComponent>;

View File

@@ -36,6 +36,8 @@ import {
import { AdvancedUriOptionDialogComponent } from "./advanced-uri-option-dialog.component"; import { AdvancedUriOptionDialogComponent } from "./advanced-uri-option-dialog.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-autofill-uri-option", selector: "vault-autofill-uri-option",
templateUrl: "./uri-option.component.html", templateUrl: "./uri-option.component.html",
@@ -58,9 +60,13 @@ import { AdvancedUriOptionDialogComponent } from "./advanced-uri-option-dialog.c
], ],
}) })
export class UriOptionComponent implements ControlValueAccessor { export class UriOptionComponent implements ControlValueAccessor {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("uriInput") @ViewChild("uriInput")
private inputElement: ElementRef<HTMLInputElement>; private inputElement: ElementRef<HTMLInputElement>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild("matchDetectionSelect") @ViewChild("matchDetectionSelect")
private matchDetectionSelect: SelectComponent<UriMatchStrategySetting>; private matchDetectionSelect: SelectComponent<UriMatchStrategySetting>;
@@ -92,18 +98,24 @@ export class UriOptionComponent implements ControlValueAccessor {
/** /**
* Whether the option can be reordered. If false, the reorder button will be hidden. * Whether the option can be reordered. If false, the reorder button will be hidden.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) @Input({ required: true })
canReorder: boolean; canReorder: boolean;
/** /**
* Whether the URI can be removed from the form. If false, the remove button will be hidden. * Whether the URI can be removed from the form. If false, the remove button will be hidden.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) @Input({ required: true })
canRemove: boolean; canRemove: boolean;
/** /**
* The user's current default match detection strategy. Will be displayed in () after "Default" * The user's current default match detection strategy. Will be displayed in () after "Default"
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) @Input({ required: true })
set defaultMatchDetection(value: UriMatchStrategySetting) { set defaultMatchDetection(value: UriMatchStrategySetting) {
// The default selection has a value of `null` avoid showing "Default (Default)" // The default selection has a value of `null` avoid showing "Default (Default)"
@@ -120,14 +132,20 @@ export class UriOptionComponent implements ControlValueAccessor {
/** /**
* The index of the URI in the form. Used to render the correct label. * The index of the URI in the form. Used to render the correct label.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) index: number; @Input({ required: true }) index: number;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() @Output()
onKeydown = new EventEmitter<KeyboardEvent>(); onKeydown = new EventEmitter<KeyboardEvent>();
/** /**
* Emits when the remove button is clicked and URI should be removed from the form. * Emits when the remove button is clicked and URI should be removed from the form.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() @Output()
remove = new EventEmitter<void>(); remove = new EventEmitter<void>();

View File

@@ -23,6 +23,8 @@ import {
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-card-details-section", selector: "vault-card-details-section",
templateUrl: "./card-details-section.component.html", templateUrl: "./card-details-section.component.html",
@@ -40,9 +42,13 @@ import { CipherFormContainer } from "../../cipher-form-container";
}) })
export class CardDetailsSectionComponent implements OnInit { export class CardDetailsSectionComponent implements OnInit {
/** The original cipher */ /** The original cipher */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() originalCipherView: CipherView; @Input() originalCipherView: CipherView;
/** True when all fields should be disabled */ /** True when all fields should be disabled */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
/** /**

View File

@@ -49,6 +49,8 @@ import { LoginDetailsSectionComponent } from "./login-details-section/login-deta
import { NewItemNudgeComponent } from "./new-item-nudge/new-item-nudge.component"; import { NewItemNudgeComponent } from "./new-item-nudge/new-item-nudge.component";
import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.component"; import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-cipher-form", selector: "vault-cipher-form",
templateUrl: "./cipher-form.component.html", templateUrl: "./cipher-form.component.html",
@@ -79,6 +81,8 @@ import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.componen
], ],
}) })
export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, CipherFormContainer { export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, CipherFormContainer {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChild(BitSubmitDirective) @ViewChild(BitSubmitDirective)
private bitSubmit: BitSubmitDirective; private bitSubmit: BitSubmitDirective;
private destroyRef = inject(DestroyRef); private destroyRef = inject(DestroyRef);
@@ -87,38 +91,52 @@ export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, Ci
/** /**
* The form ID to use for the form. Used to connect it to a submit button. * The form ID to use for the form. Used to connect it to a submit button.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) formId: string; @Input({ required: true }) formId: string;
/** /**
* The configuration for the add/edit form. Used to determine which controls are shown and what values are available. * The configuration for the add/edit form. Used to determine which controls are shown and what values are available.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) config: CipherFormConfig; @Input({ required: true }) config: CipherFormConfig;
/** /**
* Optional submit button that will be disabled or marked as loading when the form is submitting. * Optional submit button that will be disabled or marked as loading when the form is submitting.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
submitBtn?: ButtonComponent; submitBtn?: ButtonComponent;
/** /**
* Optional function to call before submitting the form. If the function returns false, the form will not be submitted. * Optional function to call before submitting the form. If the function returns false, the form will not be submitted.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
beforeSubmit: () => Promise<boolean>; beforeSubmit: () => Promise<boolean>;
/** /**
* Event emitted when the cipher is saved successfully. * Event emitted when the cipher is saved successfully.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() cipherSaved = new EventEmitter<CipherView>(); @Output() cipherSaved = new EventEmitter<CipherView>();
private formReadySubject = new Subject<void>(); private formReadySubject = new Subject<void>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() formReady = this.formReadySubject.asObservable(); @Output() formReady = this.formReadySubject.asObservable();
/** /**
* Emitted when the form is enabled * Emitted when the form is enabled
*/ */
private formStatusChangeSubject = new BehaviorSubject<"enabled" | "disabled" | null>(null); private formStatusChangeSubject = new BehaviorSubject<"enabled" | "disabled" | null>(null);
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() formStatusChange$ = this.formStatusChangeSubject.asObservable(); @Output() formStatusChange$ = this.formStatusChangeSubject.asObservable();
/** /**

View File

@@ -6,19 +6,27 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { GeneratorModule } from "@bitwarden/generator-components"; import { GeneratorModule } from "@bitwarden/generator-components";
import { CipherFormGeneratorComponent } from "@bitwarden/vault"; import { CipherFormGeneratorComponent } from "@bitwarden/vault";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "tools-password-generator", selector: "tools-password-generator",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockPasswordGeneratorComponent { class MockPasswordGeneratorComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onGenerated = new EventEmitter(); @Output() onGenerated = new EventEmitter();
} }
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "tools-username-generator", selector: "tools-username-generator",
template: `<ng-content></ng-content>`, template: `<ng-content></ng-content>`,
}) })
class MockUsernameGeneratorComponent { class MockUsernameGeneratorComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() onGenerated = new EventEmitter(); @Output() onGenerated = new EventEmitter();
} }

View File

@@ -9,30 +9,42 @@ import { AlgorithmInfo, GeneratedCredential } from "@bitwarden/generator-core";
* Renders a password or username generator UI and emits the most recently generated value. * Renders a password or username generator UI and emits the most recently generated value.
* Used by the cipher form to be shown in a dialog/modal when generating cipher passwords/usernames. * Used by the cipher form to be shown in a dialog/modal when generating cipher passwords/usernames.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-cipher-form-generator", selector: "vault-cipher-form-generator",
templateUrl: "./cipher-form-generator.component.html", templateUrl: "./cipher-form-generator.component.html",
imports: [CommonModule, GeneratorModule], imports: [CommonModule, GeneratorModule],
}) })
export class CipherFormGeneratorComponent { export class CipherFormGeneratorComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
uri: string = ""; uri: string = "";
/** /**
* The type of generator form to show. * The type of generator form to show.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) @Input({ required: true })
type: "password" | "username" = "password"; type: "password" | "username" = "password";
/** Removes bottom margin of internal sections */ /** Removes bottom margin of internal sections */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ transform: coerceBooleanProperty }) disableMargin = false; @Input({ transform: coerceBooleanProperty }) disableMargin = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() @Output()
algorithmSelected = new EventEmitter<AlgorithmInfo>(); algorithmSelected = new EventEmitter<AlgorithmInfo>();
/** /**
* Emits an event when a new value is generated. * Emits an event when a new value is generated.
*/ */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() @Output()
valueGenerated = new EventEmitter<string>(); valueGenerated = new EventEmitter<string>();

View File

@@ -28,6 +28,8 @@ export type AddEditCustomFieldDialogData = {
disallowHiddenField?: boolean; disallowHiddenField?: boolean;
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-add-edit-custom-field-dialog", selector: "vault-add-edit-custom-field-dialog",
templateUrl: "./add-edit-custom-field-dialog.component.html", templateUrl: "./add-edit-custom-field-dialog.component.html",

View File

@@ -68,6 +68,8 @@ export type CustomField = {
newField: boolean; newField: boolean;
}; };
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-custom-fields", selector: "vault-custom-fields",
templateUrl: "./custom-fields.component.html", templateUrl: "./custom-fields.component.html",
@@ -88,10 +90,16 @@ export type CustomField = {
], ],
}) })
export class CustomFieldsComponent implements OnInit, AfterViewInit { export class CustomFieldsComponent implements OnInit, AfterViewInit {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref
@Output() numberOfFieldsChange = new EventEmitter<number>(); @Output() numberOfFieldsChange = new EventEmitter<number>();
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@ViewChildren("customFieldRow") customFieldRows: QueryList<ElementRef<HTMLDivElement>>; @ViewChildren("customFieldRow") customFieldRows: QueryList<ElementRef<HTMLDivElement>>;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disableSectionMargin: boolean; @Input() disableSectionMargin: boolean;
customFieldsForm = this.formBuilder.group({ customFieldsForm = this.formBuilder.group({

View File

@@ -21,6 +21,8 @@ import {
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-identity-section", selector: "vault-identity-section",
templateUrl: "./identity.component.html", templateUrl: "./identity.component.html",
@@ -38,7 +40,11 @@ import { CipherFormContainer } from "../../cipher-form-container";
], ],
}) })
export class IdentitySectionComponent implements OnInit { export class IdentitySectionComponent implements OnInit {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() originalCipherView: CipherView; @Input() originalCipherView: CipherView;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
identityTitleOptions = [ identityTitleOptions = [
{ name: "-- " + this.i18nService.t("select") + " --", value: null }, { name: "-- " + this.i18nService.t("select") + " --", value: null },

View File

@@ -37,6 +37,8 @@ import {
} from "../../abstractions/cipher-form-config.service"; } from "../../abstractions/cipher-form-config.service";
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-item-details-section", selector: "vault-item-details-section",
templateUrl: "./item-details-section.component.html", templateUrl: "./item-details-section.component.html",
@@ -84,9 +86,13 @@ export class ItemDetailsSectionComponent implements OnInit {
protected favoriteButtonDisabled = false; protected favoriteButtonDisabled = false;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) @Input({ required: true })
config: CipherFormConfig; config: CipherFormConfig;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() @Input()
originalCipherView: CipherView; originalCipherView: CipherView;

View File

@@ -23,6 +23,8 @@ import { AutofillOptionsComponent } from "../autofill-options/autofill-options.c
import { LoginDetailsSectionComponent } from "./login-details-section.component"; import { LoginDetailsSectionComponent } from "./login-details-section.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-autofill-options", selector: "vault-autofill-options",
template: "", template: "",

View File

@@ -30,6 +30,8 @@ import { TotpCaptureService } from "../../abstractions/totp-capture.service";
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
import { AutofillOptionsComponent } from "../autofill-options/autofill-options.component"; import { AutofillOptionsComponent } from "../autofill-options/autofill-options.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-login-details-section", selector: "vault-login-details-section",
templateUrl: "./login-details-section.component.html", templateUrl: "./login-details-section.component.html",

View File

@@ -11,13 +11,15 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
import { UserId } from "@bitwarden/common/types/guid"; import { UserId } from "@bitwarden/common/types/guid";
import { CipherType } from "@bitwarden/sdk-internal"; import { CipherType } from "@bitwarden/sdk-internal";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-new-item-nudge", selector: "vault-new-item-nudge",
templateUrl: "./new-item-nudge.component.html", templateUrl: "./new-item-nudge.component.html",
imports: [SpotlightComponent, AsyncPipe], imports: [SpotlightComponent, AsyncPipe],
}) })
export class NewItemNudgeComponent { export class NewItemNudgeComponent {
configType = input.required<CipherType | null>(); readonly configType = input.required<CipherType | null>();
activeUserId$ = this.accountService.activeAccount$.pipe(getUserId); activeUserId$ = this.accountService.activeAccount$.pipe(getUserId);
showNewItemSpotlight$ = combineLatest([ showNewItemSpotlight$ = combineLatest([
this.activeUserId$, this.activeUserId$,

View File

@@ -25,6 +25,8 @@ import { generate_ssh_key } from "@bitwarden/sdk-internal";
import { SshImportPromptService } from "../../../services/ssh-import-prompt.service"; import { SshImportPromptService } from "../../../services/ssh-import-prompt.service";
import { CipherFormContainer } from "../../cipher-form-container"; import { CipherFormContainer } from "../../cipher-form-container";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({ @Component({
selector: "vault-sshkey-section", selector: "vault-sshkey-section",
templateUrl: "./sshkey-section.component.html", templateUrl: "./sshkey-section.component.html",
@@ -42,9 +44,13 @@ import { CipherFormContainer } from "../../cipher-form-container";
}) })
export class SshKeySectionComponent implements OnInit { export class SshKeySectionComponent implements OnInit {
/** The original cipher */ /** The original cipher */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() originalCipherView: CipherView; @Input() originalCipherView: CipherView;
/** True when all fields should be disabled */ /** True when all fields should be disabled */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() disabled: boolean; @Input() disabled: boolean;
/** /**

Some files were not shown because too many files have changed in this diff Show More