diff --git a/apps/browser/src/key-management/key-connector/remove-password.component.ts b/apps/browser/src/key-management/key-connector/remove-password.component.ts index 915effc8c33..c4077a1eca9 100644 --- a/apps/browser/src/key-management/key-connector/remove-password.component.ts +++ b/apps/browser/src/key-management/key-connector/remove-password.component.ts @@ -4,6 +4,8 @@ import { Component } from "@angular/core"; import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-remove-password", templateUrl: "remove-password.component.html", diff --git a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts index f597998fa56..33044b79351 100644 --- a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts +++ b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts @@ -7,6 +7,8 @@ import { CalloutModule } from "@bitwarden/components"; import BrowserPopupUtils from "../../../platform/browser/browser-popup-utils"; import { FilePopoutUtilsService } from "../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({ selector: "tools-file-popout-callout", templateUrl: "file-popout-callout.component.html", diff --git a/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts b/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts index 441e5d6e4c6..90a23c82330 100644 --- a/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts +++ b/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts @@ -25,6 +25,8 @@ import { PopupFooterComponent } from "../../../platform/popup/layout/popup-foote import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.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({ selector: "app-credential-generator-history", templateUrl: "credential-generator-history.component.html", @@ -52,6 +54,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O private logService: LogService, ) {} + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() account: Account | null; @@ -60,6 +64,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; diff --git a/apps/browser/src/tools/popup/generator/credential-generator.component.ts b/apps/browser/src/tools/popup/generator/credential-generator.component.ts index b34c829b006..a69a7f52a6f 100644 --- a/apps/browser/src/tools/popup/generator/credential-generator.component.ts +++ b/apps/browser/src/tools/popup/generator/credential-generator.component.ts @@ -10,6 +10,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.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({ selector: "credential-generator", templateUrl: "credential-generator.component.html", diff --git a/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts b/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts index 5911b3b6d89..3481ced35dc 100644 --- a/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts +++ b/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts @@ -60,6 +60,8 @@ export type AddEditQueryParams = Partial>; /** * Component for adding or editing a send item. */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-send-add-edit", templateUrl: "send-add-edit.component.html", diff --git a/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts index 30359e98fa0..e9109ec6c21 100644 --- a/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts @@ -20,6 +20,8 @@ import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-fo import { PopupHeaderComponent } from "../../../../platform/popup/layout/popup-header.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({ selector: "app-send-created", templateUrl: "./send-created.component.html", diff --git a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts index 26b3a2abbc7..56b8bcbb9f5 100644 --- a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts @@ -10,12 +10,16 @@ import { FilePopoutUtilsService } from "../../services/file-popout-utils.service import { SendFilePopoutDialogComponent } from "./send-file-popout-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({ selector: "send-file-popout-dialog-container", templateUrl: "./send-file-popout-dialog-container.component.html", imports: [JslibModule, CommonModule], }) export class SendFilePopoutDialogContainerComponent implements OnInit { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals config = input.required(); constructor( diff --git a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts index 64c95a2e2f7..23fa744995a 100644 --- a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts @@ -6,6 +6,8 @@ import { ButtonModule, DialogModule, DialogService, TypographyModule } from "@bi import BrowserPopupUtils from "../../../../platform/browser/browser-popup-utils"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "send-file-popout-dialog", templateUrl: "./send-file-popout-dialog.component.html", diff --git a/apps/browser/src/tools/popup/send-v2/send-v2.component.ts b/apps/browser/src/tools/popup/send-v2/send-v2.component.ts index a37c038d822..1272a86be17 100644 --- a/apps/browser/src/tools/popup/send-v2/send-v2.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-v2.component.ts @@ -39,6 +39,8 @@ export enum SendState { NoResults, } +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "send-v2.component.html", providers: [ diff --git a/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts index 39bff089668..2fa401f0010 100644 --- a/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts +++ b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts @@ -16,11 +16,15 @@ import { TypographyModule, } 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({ templateUrl: "about-dialog.component.html", imports: [CommonModule, JslibModule, DialogModule, ButtonModule, TypographyModule], }) export class AboutDialogComponent { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild("version") protected version!: ElementRef; protected year = new Date().getFullYear(); diff --git a/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts b/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts index 67212dc5c4a..2ef830d9d94 100644 --- a/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts @@ -29,6 +29,8 @@ const RateUrls = { [DeviceType.SafariExtension]: "https://apps.apple.com/app/bitwarden/id1352778147", }; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "about-page-v2.component.html", imports: [ diff --git a/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts b/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts index 5aebee3b781..584c7cd3f7c 100644 --- a/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts @@ -12,6 +12,8 @@ import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-fo import { PopupHeaderComponent } from "../../../../platform/popup/layout/popup-header.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({ templateUrl: "export-browser-v2.component.html", imports: [ diff --git a/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts b/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts index 6397ddc1850..a88cc3f81dc 100644 --- a/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts @@ -20,6 +20,8 @@ import { PopupFooterComponent } from "../../../../platform/popup/layout/popup-fo import { PopupHeaderComponent } from "../../../../platform/popup/layout/popup-header.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({ templateUrl: "import-browser-v2.component.html", imports: [ diff --git a/apps/browser/src/tools/popup/settings/settings-v2.component.ts b/apps/browser/src/tools/popup/settings/settings-v2.component.ts index 205d4063b59..1c370381f54 100644 --- a/apps/browser/src/tools/popup/settings/settings-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/settings-v2.component.ts @@ -24,6 +24,8 @@ import { PopOutComponent } from "../../../platform/popup/components/pop-out.comp import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.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({ templateUrl: "settings-v2.component.html", imports: [ diff --git a/apps/cli/src/service-container/service-container.ts b/apps/cli/src/service-container/service-container.ts index 14d7a1dac33..275b3418252 100644 --- a/apps/cli/src/service-container/service-container.ts +++ b/apps/cli/src/service-container/service-container.ts @@ -494,6 +494,7 @@ export class ServiceContainer { this.masterPasswordUnlockService = new DefaultMasterPasswordUnlockService( this.masterPasswordService, this.keyService, + this.kdfConfigService, ); this.appIdService = new AppIdService(this.storageService, this.logService); diff --git a/apps/desktop/desktop_native/Cargo.lock b/apps/desktop/desktop_native/Cargo.lock index 0c537d077dd..0aa040bbcf1 100644 --- a/apps/desktop/desktop_native/Cargo.lock +++ b/apps/desktop/desktop_native/Cargo.lock @@ -2586,6 +2586,7 @@ dependencies = [ "ctor 0.5.0", "desktop_core", "libc", + "tracing", ] [[package]] diff --git a/apps/desktop/desktop_native/Cargo.toml b/apps/desktop/desktop_native/Cargo.toml index 3370a940a98..855b0b3aa43 100644 --- a/apps/desktop/desktop_native/Cargo.toml +++ b/apps/desktop/desktop_native/Cargo.toml @@ -79,6 +79,10 @@ zbus_polkit = "=5.0.0" zeroizing-alloc = "=0.1.0" [workspace.lints.clippy] +# Dis-allow println and eprintln, which are typically used in debugging. +# Use `tracing` and `tracing-subscriber` crates for observability needs. +print_stderr = "deny" +print_stdout = "deny" +string_slice = "warn" unused_async = "deny" unwrap_used = "deny" -string_slice = "warn" diff --git a/apps/desktop/desktop_native/autotype/src/windows.rs b/apps/desktop/desktop_native/autotype/src/windows.rs index 1e125ef8e21..01270e7971d 100644 --- a/apps/desktop/desktop_native/autotype/src/windows.rs +++ b/apps/desktop/desktop_native/autotype/src/windows.rs @@ -331,7 +331,6 @@ mod tests { fn get_alphabetic_hot_key_happy() { for c in ('a'..='z').chain('A'..='Z') { let letter = c.to_string(); - println!("{}", letter); let converted = get_alphabetic_hotkey(letter).unwrap(); assert_eq!(converted, c as u16); } diff --git a/apps/desktop/desktop_native/process_isolation/Cargo.toml b/apps/desktop/desktop_native/process_isolation/Cargo.toml index 8e4072f1a90..170832c2fde 100644 --- a/apps/desktop/desktop_native/process_isolation/Cargo.toml +++ b/apps/desktop/desktop_native/process_isolation/Cargo.toml @@ -12,3 +12,4 @@ crate-type = ["cdylib"] ctor = { workspace = true } desktop_core = { path = "../core" } libc = { workspace = true } +tracing = { workspace = true } diff --git a/apps/desktop/desktop_native/process_isolation/src/lib.rs b/apps/desktop/desktop_native/process_isolation/src/lib.rs index 57275817b9f..850ffac841e 100644 --- a/apps/desktop/desktop_native/process_isolation/src/lib.rs +++ b/apps/desktop/desktop_native/process_isolation/src/lib.rs @@ -7,6 +7,7 @@ use desktop_core::process_isolation; use std::{ffi::c_char, sync::LazyLock}; +use tracing::info; static ORIGINAL_UNSETENV: LazyLock i32> = LazyLock::new(|| unsafe { @@ -38,8 +39,8 @@ unsafe extern "C" fn unsetenv(name: *const c_char) -> i32 { #[ctor::ctor] fn preload_init() { let pid = unsafe { libc::getpid() }; + info!(pid, "Enabling memory security for process."); unsafe { - println!("[Process Isolation] Enabling memory security for process {pid}"); process_isolation::isolate_process(); process_isolation::disable_coredumps(); } diff --git a/apps/desktop/src/app/components/fido2placeholder.component.ts b/apps/desktop/src/app/components/fido2placeholder.component.ts index b95dcc6d890..f1f52dae439 100644 --- a/apps/desktop/src/app/components/fido2placeholder.component.ts +++ b/apps/desktop/src/app/components/fido2placeholder.component.ts @@ -9,6 +9,8 @@ import { } from "../../autofill/services/desktop-fido2-user-interface.service"; import { DesktopSettingsService } from "../../platform/services/desktop-settings.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({ standalone: true, imports: [CommonModule], diff --git a/apps/desktop/src/app/tools/export/export-desktop.component.ts b/apps/desktop/src/app/tools/export/export-desktop.component.ts index 03afb154200..0adc8e758c9 100644 --- a/apps/desktop/src/app/tools/export/export-desktop.component.ts +++ b/apps/desktop/src/app/tools/export/export-desktop.component.ts @@ -5,6 +5,8 @@ import { JslibModule } from "@bitwarden/angular/jslib.module"; import { DialogRef, AsyncActionsModule, ButtonModule, DialogModule } from "@bitwarden/components"; import { ExportComponent } from "@bitwarden/vault-export-ui"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "export-desktop.component.html", imports: [ diff --git a/apps/desktop/src/app/tools/generator/credential-generator.component.ts b/apps/desktop/src/app/tools/generator/credential-generator.component.ts index 4124b2439da..42313c48f7f 100644 --- a/apps/desktop/src/app/tools/generator/credential-generator.component.ts +++ b/apps/desktop/src/app/tools/generator/credential-generator.component.ts @@ -13,6 +13,8 @@ import { GeneratorModule, } from "@bitwarden/generator-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({ selector: "credential-generator", templateUrl: "credential-generator.component.html", diff --git a/apps/desktop/src/app/tools/import/import-desktop.component.ts b/apps/desktop/src/app/tools/import/import-desktop.component.ts index fefeb439010..dd34855f416 100644 --- a/apps/desktop/src/app/tools/import/import-desktop.component.ts +++ b/apps/desktop/src/app/tools/import/import-desktop.component.ts @@ -13,6 +13,8 @@ import { safeProvider } from "@bitwarden/ui-common"; import { DesktopImportMetadataService } from "./desktop-import-metadata.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({ templateUrl: "import-desktop.component.html", imports: [ diff --git a/apps/desktop/src/app/tools/send/add-edit.component.ts b/apps/desktop/src/app/tools/send/add-edit.component.ts index bee4f920eda..b817adda848 100644 --- a/apps/desktop/src/app/tools/send/add-edit.component.ts +++ b/apps/desktop/src/app/tools/send/add-edit.component.ts @@ -21,6 +21,8 @@ import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.s import { SendService } from "@bitwarden/common/tools/send/services/send.service.abstraction"; import { CalloutModule, DialogService, 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({ selector: "app-send-add-edit", templateUrl: "add-edit.component.html", diff --git a/apps/desktop/src/app/tools/send/send.component.ts b/apps/desktop/src/app/tools/send/send.component.ts index 0146a5e62ea..3605ca3d2dc 100644 --- a/apps/desktop/src/app/tools/send/send.component.ts +++ b/apps/desktop/src/app/tools/send/send.component.ts @@ -35,12 +35,16 @@ enum Action { const BroadcasterSubscriptionId = "SendComponent"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-send", templateUrl: "send.component.html", imports: [CommonModule, JslibModule, FormsModule, NavComponent, AddEditComponent], }) export class SendComponent extends BaseSendComponent implements OnInit, OnDestroy { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(AddEditComponent) addEditComponent: AddEditComponent; sendId: string; diff --git a/apps/desktop/src/autofill/components/autotype-shortcut.component.ts b/apps/desktop/src/autofill/components/autotype-shortcut.component.ts index 5cf1d90cb79..3c82d8297a1 100644 --- a/apps/desktop/src/autofill/components/autotype-shortcut.component.ts +++ b/apps/desktop/src/autofill/components/autotype-shortcut.component.ts @@ -22,6 +22,8 @@ import { IconButtonModule, } 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({ templateUrl: "autotype-shortcut.component.html", imports: [ diff --git a/apps/desktop/src/key-management/key-connector/remove-password.component.ts b/apps/desktop/src/key-management/key-connector/remove-password.component.ts index 1b07f04ba8a..d9fea9409f8 100644 --- a/apps/desktop/src/key-management/key-connector/remove-password.component.ts +++ b/apps/desktop/src/key-management/key-connector/remove-password.component.ts @@ -2,6 +2,8 @@ import { Component } from "@angular/core"; import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-remove-password", templateUrl: "remove-password.component.html", diff --git a/apps/web/src/app/key-management/change-kdf/change-kdf-confirmation.component.ts b/apps/web/src/app/key-management/change-kdf/change-kdf-confirmation.component.ts index ae782cbbf45..4983f867002 100644 --- a/apps/web/src/app/key-management/change-kdf/change-kdf-confirmation.component.ts +++ b/apps/web/src/app/key-management/change-kdf/change-kdf-confirmation.component.ts @@ -12,6 +12,8 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag import { DIALOG_DATA, ToastService } from "@bitwarden/components"; import { KdfConfig, KdfType } from "@bitwarden/key-management"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-change-kdf-confirmation", templateUrl: "change-kdf-confirmation.component.html", diff --git a/apps/web/src/app/key-management/change-kdf/change-kdf.component.ts b/apps/web/src/app/key-management/change-kdf/change-kdf.component.ts index a059ede77b4..0463c6d4afc 100644 --- a/apps/web/src/app/key-management/change-kdf/change-kdf.component.ts +++ b/apps/web/src/app/key-management/change-kdf/change-kdf.component.ts @@ -18,6 +18,8 @@ import { import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.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({ selector: "app-change-kdf", templateUrl: "change-kdf.component.html", diff --git a/apps/web/src/app/key-management/key-connector/confirm-key-connector-domain.component.ts b/apps/web/src/app/key-management/key-connector/confirm-key-connector-domain.component.ts index 6127bd25a6f..858f3924790 100644 --- a/apps/web/src/app/key-management/key-connector/confirm-key-connector-domain.component.ts +++ b/apps/web/src/app/key-management/key-connector/confirm-key-connector-domain.component.ts @@ -3,6 +3,8 @@ import { Component } from "@angular/core"; import { ConfirmKeyConnectorDomainComponent as BaseConfirmKeyConnectorDomainComponent } from "@bitwarden/key-management-ui"; import { RouterService } from "@bitwarden/web-vault/app/core"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-confirm-key-connector-domain", template: ` `, diff --git a/apps/web/src/app/key-management/key-connector/remove-password.component.ts b/apps/web/src/app/key-management/key-connector/remove-password.component.ts index 1b07f04ba8a..d9fea9409f8 100644 --- a/apps/web/src/app/key-management/key-connector/remove-password.component.ts +++ b/apps/web/src/app/key-management/key-connector/remove-password.component.ts @@ -2,6 +2,8 @@ import { Component } from "@angular/core"; import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-remove-password", templateUrl: "remove-password.component.html", diff --git a/apps/web/src/app/tools/credential-generator/credential-generator.component.ts b/apps/web/src/app/tools/credential-generator/credential-generator.component.ts index 7d62bff0ac1..093afa10bb5 100644 --- a/apps/web/src/app/tools/credential-generator/credential-generator.component.ts +++ b/apps/web/src/app/tools/credential-generator/credential-generator.component.ts @@ -9,6 +9,8 @@ import { import { HeaderModule } from "../../layouts/header/header.module"; 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({ selector: "credential-generator", templateUrl: "credential-generator.component.html", diff --git a/apps/web/src/app/tools/import/import-web.component.ts b/apps/web/src/app/tools/import/import-web.component.ts index 17c586a1b9d..e7e57870bd9 100644 --- a/apps/web/src/app/tools/import/import-web.component.ts +++ b/apps/web/src/app/tools/import/import-web.component.ts @@ -15,6 +15,8 @@ import { safeProvider } from "@bitwarden/ui-common"; import { HeaderModule } from "../../layouts/header/header.module"; 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({ templateUrl: "import-web.component.html", imports: [SharedModule, ImportComponent, HeaderModule], diff --git a/apps/web/src/app/tools/import/org-import.component.ts b/apps/web/src/app/tools/import/org-import.component.ts index 4bc348f8769..b3e007fed25 100644 --- a/apps/web/src/app/tools/import/org-import.component.ts +++ b/apps/web/src/app/tools/import/org-import.component.ts @@ -27,6 +27,8 @@ import { SharedModule } from "../../shared"; import { ImportCollectionAdminService } from "./import-collection-admin.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({ templateUrl: "org-import.component.html", imports: [SharedModule, ImportComponent, HeaderModule], diff --git a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts index bb72ff75a39..80d1d0e1e12 100644 --- a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts +++ b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts @@ -10,6 +10,8 @@ import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { ButtonModule, DialogService, MenuModule } from "@bitwarden/components"; import { DefaultSendFormConfigService, SendAddEditDialogComponent } from "@bitwarden/send-ui"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-new-send-dropdown", templateUrl: "new-send-dropdown.component.html", @@ -21,6 +23,8 @@ import { DefaultSendFormConfigService, SendAddEditDialogComponent } from "@bitwa */ export class NewSendDropdownComponent { /** If true, the plus icon will be hidden */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() hideIcon: boolean = false; /** SendType provided for the markup to pass back the selected type of Send */ diff --git a/apps/web/src/app/tools/send/send-access/access.component.ts b/apps/web/src/app/tools/send/send-access/access.component.ts index df7ab83d36b..273f1c8c979 100644 --- a/apps/web/src/app/tools/send/send-access/access.component.ts +++ b/apps/web/src/app/tools/send/send-access/access.component.ts @@ -25,6 +25,8 @@ import { SendAccessFileComponent } from "./send-access-file.component"; import { SendAccessPasswordComponent } from "./send-access-password.component"; import { SendAccessTextComponent } from "./send-access-text.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({ selector: "app-send-access", templateUrl: "access.component.html", diff --git a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts index d9f35a3d38e..c5baa98ebbb 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts @@ -2,6 +2,8 @@ import { Component } from "@angular/core"; 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({ selector: "app-send-access-explainer", templateUrl: "send-access-explainer.component.html", diff --git a/apps/web/src/app/tools/send/send-access/send-access-file.component.ts b/apps/web/src/app/tools/send/send-access/send-access-file.component.ts index 239861dd244..dc7689f011a 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-file.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-file.component.ts @@ -15,14 +15,22 @@ import { ToastService } from "@bitwarden/components"; 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({ selector: "app-send-access-file", templateUrl: "send-access-file.component.html", imports: [SharedModule], }) export class SendAccessFileComponent { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() send: SendAccessView; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() decKey: SymmetricCryptoKey; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() accessRequest: SendAccessRequest; constructor( private i18nService: I18nService, diff --git a/apps/web/src/app/tools/send/send-access/send-access-password.component.ts b/apps/web/src/app/tools/send/send-access/send-access-password.component.ts index 81e66c8acc4..34b183be10e 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-password.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-password.component.ts @@ -6,6 +6,8 @@ import { Subject, takeUntil } from "rxjs"; 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({ selector: "app-send-access-password", templateUrl: "send-access-password.component.html", @@ -17,7 +19,11 @@ export class SendAccessPasswordComponent implements OnInit, OnDestroy { password: ["", [Validators.required]], }); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() loading: boolean; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() setPasswordEvent = new EventEmitter(); constructor(private formBuilder: FormBuilder) {} diff --git a/apps/web/src/app/tools/send/send-access/send-access-text.component.ts b/apps/web/src/app/tools/send/send-access/send-access-text.component.ts index 2b5405a3f27..794cfbc9678 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-text.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-text.component.ts @@ -10,6 +10,8 @@ import { ToastService } from "@bitwarden/components"; 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({ selector: "app-send-access-text", templateUrl: "send-access-text.component.html", @@ -34,6 +36,8 @@ export class SendAccessTextComponent { return this._send; } + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() set send(value: SendAccessView) { this._send = value; this.showText = this.send.text != null ? !this.send.text.hidden : true; diff --git a/apps/web/src/app/tools/send/send.component.ts b/apps/web/src/app/tools/send/send.component.ts index 20b93a10975..e9ad7aee1f1 100644 --- a/apps/web/src/app/tools/send/send.component.ts +++ b/apps/web/src/app/tools/send/send.component.ts @@ -39,6 +39,8 @@ import { NewSendDropdownComponent } from "./new-send/new-send-dropdown.component const BroadcasterSubscriptionId = "SendComponent"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "app-send", imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule, NewSendDropdownComponent], diff --git a/apps/web/src/app/tools/vault-export/export-web.component.ts b/apps/web/src/app/tools/vault-export/export-web.component.ts index bf29e83b893..1b11a2dd36f 100644 --- a/apps/web/src/app/tools/vault-export/export-web.component.ts +++ b/apps/web/src/app/tools/vault-export/export-web.component.ts @@ -6,6 +6,8 @@ import { ExportComponent } from "@bitwarden/vault-export-ui"; import { HeaderModule } from "../../layouts/header/header.module"; 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({ templateUrl: "export-web.component.html", imports: [SharedModule, ExportComponent, HeaderModule], diff --git a/apps/web/src/app/tools/vault-export/org-vault-export.component.ts b/apps/web/src/app/tools/vault-export/org-vault-export.component.ts index 69dcce52823..19216e9e8e9 100644 --- a/apps/web/src/app/tools/vault-export/org-vault-export.component.ts +++ b/apps/web/src/app/tools/vault-export/org-vault-export.component.ts @@ -7,6 +7,8 @@ import { ExportComponent } from "@bitwarden/vault-export-ui"; import { HeaderModule } from "../../layouts/header/header.module"; 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({ templateUrl: "org-vault-export.component.html", imports: [SharedModule, ExportComponent, HeaderModule], diff --git a/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integration-card/integration-card.component.html b/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integration-card/integration-card.component.html index 4367c6c882e..423b0130385 100644 --- a/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integration-card/integration-card.component.html +++ b/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integration-card/integration-card.component.html @@ -15,6 +15,17 @@ class="tw-block tw-mx-auto tw-h-auto tw-max-w-full tw-max-h-full" /> + + @if (linkURL) { + + + }

@@ -42,16 +53,6 @@ } - @if (linkURL) { - - - } @if (showNewBadge()) { {{ "new" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integrations.component.ts b/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integrations.component.ts index 539da9b31b1..1a684d4094b 100644 --- a/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integrations.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/organization-integrations/integrations.component.ts @@ -269,25 +269,24 @@ export class AdminConsoleIntegrationsComponent implements OnInit, OnDestroy { if (this.isEventBasedIntegrationsEnabled) { const crowdstrikeIntegration: Integration = { name: OrganizationIntegrationServiceType.CrowdStrike, - linkURL: "", + linkURL: "https://bitwarden.com/help/crowdstrike-siem/", image: "../../../../../../../images/integrations/logo-crowdstrike-black.svg", type: IntegrationType.EVENT, description: "crowdstrikeEventIntegrationDesc", canSetupConnection: true, - integrationType: 5, // Assuming 5 corresponds to CrowdStrike in OrganizationIntegrationType + integrationType: OrganizationIntegrationType.Hec, }; this.integrationsList.push(crowdstrikeIntegration); const datadogIntegration: Integration = { name: OrganizationIntegrationServiceType.Datadog, - // TODO: Update link when help article is published - linkURL: "", + linkURL: "https://bitwarden.com/help/datadog-siem/", image: "../../../../../../../images/integrations/logo-datadog-color.svg", type: IntegrationType.EVENT, description: "datadogEventIntegrationDesc", canSetupConnection: true, - integrationType: 6, // Assuming 6 corresponds to Datadog in OrganizationIntegrationType + integrationType: OrganizationIntegrationType.Datadog, }; this.integrationsList.push(datadogIntegration); diff --git a/eslint.config.mjs b/eslint.config.mjs index 270b59cbb4c..d8b2094c37c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -72,6 +72,9 @@ export default tseslint.config( "@angular-eslint/no-output-on-prefix": 0, "@angular-eslint/no-output-rename": 0, "@angular-eslint/no-outputs-metadata-property": 0, + "@angular-eslint/prefer-on-push-component-change-detection": "warn", + "@angular-eslint/prefer-output-emitter-ref": "warn", + "@angular-eslint/prefer-signals": "warn", "@angular-eslint/prefer-standalone": 0, "@angular-eslint/use-lifecycle-interface": "error", "@angular-eslint/use-pipe-transform-interface": 0, diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 2fc45941014..81ca6dc66d5 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -1104,7 +1104,7 @@ const safeProviders: SafeProvider[] = [ safeProvider({ provide: MasterPasswordUnlockService, useClass: DefaultMasterPasswordUnlockService, - deps: [InternalMasterPasswordServiceAbstraction, KeyService], + deps: [InternalMasterPasswordServiceAbstraction, KeyService, KdfConfigService], }), safeProvider({ provide: KeyConnectorServiceAbstraction, diff --git a/libs/angular/src/tools/password-strength/password-strength-v2.component.ts b/libs/angular/src/tools/password-strength/password-strength-v2.component.ts index c8a3b071746..a2571950936 100644 --- a/libs/angular/src/tools/password-strength/password-strength-v2.component.ts +++ b/libs/angular/src/tools/password-strength/password-strength-v2.component.ts @@ -17,6 +17,8 @@ export type PasswordStrengthScore = 0 | 1 | 2 | 3 | 4; type SizeTypes = "small" | "default" | "large"; type BackgroundTypes = "danger" | "primary" | "success" | "warning"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-password-strength", templateUrl: "password-strength-v2.component.html", @@ -27,24 +29,34 @@ export class PasswordStrengthV2Component implements OnChanges { * The size (height) of the password strength component. * Possible values are "default", "small" and "large". */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() size: SizeTypes = "default"; /** * Determines whether to show the password strength score text on the progress bar or not. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() showText = false; /** * Optional email address which can be used as input for the password strength calculation */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() email: string; /** * Optional name which can be used as input for the password strength calculation */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() name: string; /** * Sets the password value and updates the password strength. * * @param value - password provided by the hosting component */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() set password(value: string) { this.updatePasswordStrength(value); } @@ -55,11 +67,15 @@ export class PasswordStrengthV2Component implements OnChanges { * The password strength score represents the strength of a password. * It is emitted as an event when the password strength changes. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() passwordStrengthScore = new EventEmitter(); /** * Emits an event with the password score text and color. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() passwordScoreTextWithColor = new EventEmitter(); passwordScore: PasswordStrengthScore; diff --git a/libs/angular/src/tools/send/add-edit.component.ts b/libs/angular/src/tools/send/add-edit.component.ts index f87b5f9bf86..1680182f9de 100644 --- a/libs/angular/src/tools/send/add-edit.component.ts +++ b/libs/angular/src/tools/send/add-edit.component.ts @@ -56,11 +56,21 @@ interface DatePresetSelectOption { @Directive() export class AddEditComponent implements OnInit, OnDestroy { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() sendId: string; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() type: SendType; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onSavedSend = new EventEmitter(); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onDeletedSend = new EventEmitter(); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onCancelled = new EventEmitter(); deletionDatePresets: DatePresetSelectOption[] = [ diff --git a/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.spec.ts b/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.spec.ts index 75668e8e6bd..9c35a2a2006 100644 --- a/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.spec.ts +++ b/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.spec.ts @@ -3,7 +3,7 @@ import { of } from "rxjs"; import { newGuid } from "@bitwarden/guid"; // eslint-disable-next-line no-restricted-imports -import { Argon2KdfConfig, KeyService } from "@bitwarden/key-management"; +import { Argon2KdfConfig, KdfConfigService, KeyService } from "@bitwarden/key-management"; import { UserId } from "@bitwarden/user-core"; import { HashPurpose } from "../../../platform/enums"; @@ -23,6 +23,7 @@ describe("DefaultMasterPasswordUnlockService", () => { let masterPasswordService: MockProxy; let keyService: MockProxy; + let kdfService: MockProxy; const mockMasterPassword = "testExample"; const mockUserId = newGuid() as UserId; @@ -41,8 +42,9 @@ describe("DefaultMasterPasswordUnlockService", () => { beforeEach(() => { masterPasswordService = mock(); keyService = mock(); + kdfService = mock(); - sut = new DefaultMasterPasswordUnlockService(masterPasswordService, keyService); + sut = new DefaultMasterPasswordUnlockService(masterPasswordService, keyService, kdfService); masterPasswordService.masterPasswordUnlockData$.mockReturnValue( of(mockMasterPasswordUnlockData), @@ -126,6 +128,10 @@ describe("DefaultMasterPasswordUnlockService", () => { ); expect(masterPasswordService.setMasterKeyHash).toHaveBeenCalledWith(mockKeyHash, mockUserId); expect(masterPasswordService.setMasterKey).toHaveBeenCalledWith(mockMasterKey, mockUserId); + expect(kdfService.setKdfConfig).toHaveBeenCalledWith( + mockUserId, + mockMasterPasswordUnlockData.kdf, + ); }); it("throws an error if masterKey construction fails", async () => { diff --git a/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.ts b/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.ts index 87114000abf..079f0505d03 100644 --- a/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.ts +++ b/libs/common/src/key-management/master-password/services/default-master-password-unlock.service.ts @@ -1,7 +1,7 @@ import { firstValueFrom } from "rxjs"; // eslint-disable-next-line no-restricted-imports -import { KeyService } from "@bitwarden/key-management"; +import { KdfConfigService, KeyService } from "@bitwarden/key-management"; import { UserId } from "@bitwarden/user-core"; import { HashPurpose } from "../../../platform/enums"; @@ -14,6 +14,7 @@ export class DefaultMasterPasswordUnlockService implements MasterPasswordUnlockS constructor( private readonly masterPasswordService: InternalMasterPasswordServiceAbstraction, private readonly keyService: KeyService, + private readonly kdfService: KdfConfigService, ) {} async unlockWithMasterPassword(masterPassword: string, userId: UserId): Promise { @@ -71,5 +72,6 @@ export class DefaultMasterPasswordUnlockService implements MasterPasswordUnlockS await this.masterPasswordService.setMasterKeyHash(localKeyHash, userId); await this.masterPasswordService.setMasterKey(masterKey, userId); + await this.kdfService.setKdfConfig(userId, masterPasswordUnlockData.kdf); } } diff --git a/libs/importer/src/components/chrome/import-chrome.component.ts b/libs/importer/src/components/chrome/import-chrome.component.ts index bf2a37203e1..10f924e9c64 100644 --- a/libs/importer/src/components/chrome/import-chrome.component.ts +++ b/libs/importer/src/components/chrome/import-chrome.component.ts @@ -38,6 +38,8 @@ import { ImportType } from "../../models"; type ProfileOption = { id: string; name: 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({ selector: "import-chrome", templateUrl: "import-chrome.component.html", @@ -70,14 +72,20 @@ export class ImportChromeComponent implements OnInit, OnDestroy { profileList: ProfileOption[] = []; - format = input.required(); + readonly format = input.required(); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() onLoadProfilesFromBrowser: (browser: string) => Promise; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() onImportFromBrowser: (browser: string, profile: string) => Promise; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() csvDataLoaded = new EventEmitter(); constructor( diff --git a/libs/importer/src/components/dialog/file-password-prompt.component.ts b/libs/importer/src/components/dialog/file-password-prompt.component.ts index 9ad62b7e8f5..e4eca94e7a8 100644 --- a/libs/importer/src/components/dialog/file-password-prompt.component.ts +++ b/libs/importer/src/components/dialog/file-password-prompt.component.ts @@ -12,6 +12,8 @@ import { IconButtonModule, } 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({ templateUrl: "file-password-prompt.component.html", imports: [ diff --git a/libs/importer/src/components/dialog/import-error-dialog.component.ts b/libs/importer/src/components/dialog/import-error-dialog.component.ts index cb998c2dfe9..af8d8a0966e 100644 --- a/libs/importer/src/components/dialog/import-error-dialog.component.ts +++ b/libs/importer/src/components/dialog/import-error-dialog.component.ts @@ -16,6 +16,8 @@ export interface ErrorListItem { message: 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({ templateUrl: "./import-error-dialog.component.html", imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule], diff --git a/libs/importer/src/components/dialog/import-success-dialog.component.ts b/libs/importer/src/components/dialog/import-success-dialog.component.ts index ff9a5d7b014..34b9728ef44 100644 --- a/libs/importer/src/components/dialog/import-success-dialog.component.ts +++ b/libs/importer/src/components/dialog/import-success-dialog.component.ts @@ -20,6 +20,8 @@ export interface ResultList { count: number; } +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "./import-success-dialog.component.html", imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule], diff --git a/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts b/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts index 8c199ee5577..a60569c5f4c 100644 --- a/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts +++ b/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts @@ -12,6 +12,8 @@ import { IconButtonModule, } 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({ templateUrl: "sshkey-password-prompt.component.html", imports: [ diff --git a/libs/importer/src/components/import.component.ts b/libs/importer/src/components/import.component.ts index fcb79c1c5df..0ff62b00e78 100644 --- a/libs/importer/src/components/import.component.ts +++ b/libs/importer/src/components/import.component.ts @@ -86,6 +86,8 @@ import { import { ImporterProviders } from "./importer-providers"; import { ImportLastPassComponent } from "./lastpass"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-import", templateUrl: "import.component.html", @@ -131,6 +133,8 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit { * Enables the hosting control to pass in an organizationId * If a organizationId is provided, the organization selection is disabled. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() set organizationId(value: OrganizationId | string | undefined) { if (Utils.isNullOrEmpty(value)) { this._organizationId = undefined; @@ -157,9 +161,13 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit { }); } + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() onLoadProfilesFromBrowser: (browser: string) => Promise; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() onImportFromBrowser: (browser: string, profile: string) => Promise; @@ -191,15 +199,23 @@ export class ImportComponent implements OnInit, OnDestroy, AfterViewInit { chromiumLoader: [Loader.file as DataLoader], }); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(BitSubmitDirective) private bitSubmit: BitSubmitDirective; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() formLoading = new EventEmitter(); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() formDisabled = new EventEmitter(); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onSuccessfulImport = new EventEmitter(); diff --git a/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts b/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts index f497a3bf32c..b9cddc95f8e 100644 --- a/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts +++ b/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts @@ -21,6 +21,8 @@ type LastPassMultifactorPromptData = { variant: LastPassMultifactorPromptVariant; }; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "lastpass-multifactor-prompt.component.html", imports: [ diff --git a/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts b/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts index 861f184f94d..995fc2362c9 100644 --- a/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts +++ b/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts @@ -15,6 +15,8 @@ import { TypographyModule, } 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({ templateUrl: "lastpass-password-prompt.component.html", imports: [ diff --git a/libs/importer/src/components/lastpass/import-lastpass.component.ts b/libs/importer/src/components/lastpass/import-lastpass.component.ts index 7fbf7dd8a7a..62fc5325d26 100644 --- a/libs/importer/src/components/lastpass/import-lastpass.component.ts +++ b/libs/importer/src/components/lastpass/import-lastpass.component.ts @@ -25,6 +25,8 @@ import { import { LastPassDirectImportService } from "./lastpass-direct-import.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({ selector: "import-lastpass", templateUrl: "import-lastpass.component.html", @@ -60,6 +62,8 @@ export class ImportLastPassComponent implements OnInit, OnDestroy { }), ); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() csvDataLoaded = new EventEmitter(); constructor( diff --git a/libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts b/libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts index 586c1cc113a..fe96e4620ad 100644 --- a/libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts +++ b/libs/key-management-ui/src/key-connector/confirm-key-connector-domain.component.ts @@ -13,6 +13,8 @@ import { UserId } from "@bitwarden/common/types/guid"; import { BitActionDirective, ButtonModule } from "@bitwarden/components"; 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({ selector: "confirm-key-connector-domain", templateUrl: "confirm-key-connector-domain.component.html", @@ -24,6 +26,8 @@ export class ConfirmKeyConnectorDomainComponent implements OnInit { keyConnectorUrl!: string; userId!: UserId; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() onBeforeNavigation: () => Promise = async () => {}; constructor( diff --git a/libs/key-management-ui/src/key-rotation/key-rotation-trust-info.component.ts b/libs/key-management-ui/src/key-rotation/key-rotation-trust-info.component.ts index a2d3de3b30f..762b1f573df 100644 --- a/libs/key-management-ui/src/key-rotation/key-rotation-trust-info.component.ts +++ b/libs/key-management-ui/src/key-rotation/key-rotation-trust-info.component.ts @@ -17,6 +17,8 @@ type KeyRotationTrustDialogData = { numberOfEmergencyAccessUsers: number; }; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "key-rotation-trust-info", templateUrl: "key-rotation-trust-info.component.html", diff --git a/libs/key-management-ui/src/lock/components/lock.component.ts b/libs/key-management-ui/src/lock/components/lock.component.ts index 1d50737e9ab..7f715d2215d 100644 --- a/libs/key-management-ui/src/lock/components/lock.component.ts +++ b/libs/key-management-ui/src/lock/components/lock.component.ts @@ -87,6 +87,8 @@ type AfterUnlockActions = { /// Fixes safari autoprompt behavior const AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY = 5000; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "bit-lock", templateUrl: "lock.component.html", diff --git a/libs/key-management-ui/src/lock/components/master-password-lock/master-password-lock.component.ts b/libs/key-management-ui/src/lock/components/master-password-lock/master-password-lock.component.ts index c9399cc3ab2..ff1e7f53e5f 100644 --- a/libs/key-management-ui/src/lock/components/master-password-lock/master-password-lock.component.ts +++ b/libs/key-management-ui/src/lock/components/master-password-lock/master-password-lock.component.ts @@ -25,6 +25,8 @@ import { UnlockOptionValue, } from "../../services/lock-component.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({ selector: "bit-master-password-lock", templateUrl: "master-password-lock.component.html", @@ -45,13 +47,13 @@ export class MasterPasswordLockComponent { private readonly logService = inject(LogService); UnlockOption = UnlockOption; - activeUnlockOption = model.required(); + readonly activeUnlockOption = model.required(); - unlockOptions = input.required(); - biometricUnlockBtnText = input.required(); - showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false); - biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false); - showBiometricsSwap = computed(() => { + readonly unlockOptions = input.required(); + readonly biometricUnlockBtnText = input.required(); + readonly showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false); + readonly biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false); + readonly showBiometricsSwap = computed(() => { const status = this.unlockOptions().biometrics.biometricsStatus; return ( status !== BiometricsStatus.PlatformUnsupported && diff --git a/libs/key-management-ui/src/trust/account-recovery-trust.component.ts b/libs/key-management-ui/src/trust/account-recovery-trust.component.ts index 8eec776bbb6..a4cfe4a41c1 100644 --- a/libs/key-management-ui/src/trust/account-recovery-trust.component.ts +++ b/libs/key-management-ui/src/trust/account-recovery-trust.component.ts @@ -25,6 +25,8 @@ type AccountRecoveryTrustDialogData = { /** org public key */ publicKey: Uint8Array; }; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "account-recovery-trust", templateUrl: "account-recovery-trust.component.html", diff --git a/libs/key-management-ui/src/trust/emergency-access-trust.component.ts b/libs/key-management-ui/src/trust/emergency-access-trust.component.ts index 35c6b16c873..da55475af1d 100644 --- a/libs/key-management-ui/src/trust/emergency-access-trust.component.ts +++ b/libs/key-management-ui/src/trust/emergency-access-trust.component.ts @@ -25,6 +25,8 @@ type EmergencyAccessTrustDialogData = { /** user public key */ publicKey: Uint8Array; }; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "emergency-access-trust", templateUrl: "emergency-access-trust.component.html", diff --git a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts index acd7d9129bd..213d15d61a8 100644 --- a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts +++ b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts @@ -13,6 +13,8 @@ import { OrganizationId } from "@bitwarden/common/types/guid"; import { CalloutModule } from "@bitwarden/components"; import { ExportFormat } from "@bitwarden/vault-export-core"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-export-scope-callout", templateUrl: "export-scope-callout.component.html", diff --git a/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts b/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts index 567480ac1bd..19921b35162 100644 --- a/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts +++ b/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts @@ -73,6 +73,8 @@ import { EncryptedExportType } from "../enums/encrypted-export-type.enum"; import { ExportScopeCalloutComponent } from "./export-scope-callout.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({ selector: "tools-export", templateUrl: "export.component.html", @@ -101,6 +103,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { * Enables the hosting control to pass in an organizationId * If a organizationId is provided, the organization selection is disabled. */ + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() set organizationId(value: OrganizationId | string | undefined) { if (Utils.isNullOrEmpty(value)) { this._organizationId$.next(undefined); @@ -158,6 +162,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { * The hosting control also needs a bitSubmitDirective (on the Submit button) which calls this components {@link submit}-method. * This components formState (loading/disabled) is emitted back up to the hosting component so for example the Submit button can be enabled/disabled and show loading state. */ + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(BitSubmitDirective) private bitSubmit: BitSubmitDirective; @@ -165,6 +171,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { * Emits true when the BitSubmitDirective({@link bitSubmit} is executing {@link submit} and false when execution has completed. * Example: Used to show the loading state of the submit button present on the hosting component * */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() formLoading = new EventEmitter(); @@ -172,6 +180,8 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { * Emits true when this form gets disabled and false when enabled. * Example: Used to disable the submit button, which is present on the hosting component * */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() formDisabled = new EventEmitter(); @@ -180,9 +190,13 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { * - Emits an undefined when exporting from an individual vault * - Emits the organizationId when exporting from an organizational vault * */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onSuccessfulExport = new EventEmitter(); + // TODO: Fix this the next time the file is edited. + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(PasswordStrengthV2Component) passwordStrengthComponent: PasswordStrengthV2Component; encryptedExportType = EncryptedExportType; @@ -296,9 +310,9 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { ), ); - /* - Determines how organization exports are described in the callout. - Admins are exempted from organization data ownership policy, + /* + Determines how organization exports are described in the callout. + Admins are exempted from organization data ownership policy, and so this needs to determine if the policy is enabled for the org, not if it applies to the user. */ this.organizationDataOwnershipPolicyEnabledForOrg$ = combineLatest([ @@ -401,9 +415,9 @@ export class ExportComponent implements OnInit, OnDestroy, AfterViewInit { }); } - /* - Initialize component for organization only export - Hides "My Vault" option by returning immediately + /* + Initialize component for organization only export + Hides "My Vault" option by returning immediately */ private initOrganizationOnly(): void { this.organizations$ = this.accountService.activeAccount$.pipe( diff --git a/libs/tools/generator/components/src/catchall-settings.component.ts b/libs/tools/generator/components/src/catchall-settings.component.ts index a836b26f98b..0fb953b86dc 100644 --- a/libs/tools/generator/components/src/catchall-settings.component.ts +++ b/libs/tools/generator/components/src/catchall-settings.component.ts @@ -19,6 +19,8 @@ import { } from "@bitwarden/generator-core"; /** Options group for catchall emails */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-catchall-settings", templateUrl: "catchall-settings.component.html", @@ -38,6 +40,8 @@ export class CatchallSettingsComponent implements OnInit, OnDestroy, OnChanges { * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account!: Account; @@ -48,6 +52,8 @@ export class CatchallSettingsComponent implements OnInit, OnDestroy, OnChanges { * to receive live settings updates including the initial update, * use `CredentialGeneratorService.settings(...)` instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts b/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts index 9ec0e636f9a..31419cefe1d 100644 --- a/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts +++ b/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts @@ -27,6 +27,8 @@ import { GeneratorHistoryService } from "@bitwarden/generator-history"; import { CredentialGeneratorHistoryComponent as CredentialGeneratorHistoryToolsComponent } from "./credential-generator-history.component"; import { EmptyCredentialHistoryComponent } from "./empty-credential-history.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({ templateUrl: "credential-generator-history-dialog.component.html", imports: [ @@ -49,6 +51,8 @@ export class CredentialGeneratorHistoryDialogComponent implements OnChanges, OnI private logService: LogService, ) {} + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() account: Account | null; @@ -59,6 +63,8 @@ export class CredentialGeneratorHistoryDialogComponent implements OnChanges, OnI * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; diff --git a/libs/tools/generator/components/src/credential-generator-history.component.ts b/libs/tools/generator/components/src/credential-generator-history.component.ts index 3965b2be83e..a09a82c74b8 100644 --- a/libs/tools/generator/components/src/credential-generator-history.component.ts +++ b/libs/tools/generator/components/src/credential-generator-history.component.ts @@ -26,6 +26,8 @@ import { GeneratedCredential, GeneratorHistoryService } from "@bitwarden/generat import { GeneratorModule } from "./generator.module"; import { translate } from "./util"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "bit-credential-generator-history", templateUrl: "credential-generator-history.component.html", @@ -50,6 +52,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O private logService: LogService, ) {} + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account; @@ -60,6 +64,8 @@ export class CredentialGeneratorHistoryComponent implements OnChanges, OnInit, O * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; diff --git a/libs/tools/generator/components/src/credential-generator.component.ts b/libs/tools/generator/components/src/credential-generator.component.ts index 78b803392df..f48180d93bd 100644 --- a/libs/tools/generator/components/src/credential-generator.component.ts +++ b/libs/tools/generator/components/src/credential-generator.component.ts @@ -64,6 +64,8 @@ const IDENTIFIER = "identifier"; const FORWARDER = "forwarder"; const NONE_SELECTED = "none"; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-credential-generator", templateUrl: "credential-generator.component.html", @@ -90,6 +92,8 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro /** Binds the component to a specific user's settings. When this input is not provided, * the form binds to the active user */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() account: Account | null = null; @@ -98,6 +102,8 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; @@ -123,10 +129,14 @@ export class CredentialGeneratorComponent implements OnInit, OnChanges, OnDestro /** * The website associated with the credential generation request. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() website: string | null = null; /** Emits credentials created from a generation request. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onGenerated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/empty-credential-history.component.ts b/libs/tools/generator/components/src/empty-credential-history.component.ts index 4b9bc24b33b..593d7ac45f1 100644 --- a/libs/tools/generator/components/src/empty-credential-history.component.ts +++ b/libs/tools/generator/components/src/empty-credential-history.component.ts @@ -4,6 +4,8 @@ import { JslibModule } from "@bitwarden/angular/jslib.module"; import { NoCredentialsIcon } from "@bitwarden/assets/svg"; import { NoItemsModule } 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({ selector: "bit-empty-credential-history", templateUrl: "empty-credential-history.component.html", diff --git a/libs/tools/generator/components/src/forwarder-settings.component.ts b/libs/tools/generator/components/src/forwarder-settings.component.ts index c961cd5bb7a..32fa3effdf6 100644 --- a/libs/tools/generator/components/src/forwarder-settings.component.ts +++ b/libs/tools/generator/components/src/forwarder-settings.component.ts @@ -26,6 +26,8 @@ const Controls = Object.freeze({ }); /** Options group for forwarder integrations */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-forwarder-settings", templateUrl: "forwarder-settings.component.html", @@ -45,11 +47,15 @@ export class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account = null!; protected account$ = new ReplaySubject(1); + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) forwarder: VendorId = null!; @@ -58,6 +64,8 @@ export class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy * to receive live settings updates including the initial update, * use `CredentialGeneratorService.settings$(...)` instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts b/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts index 6807a987a85..f22bf1b12cc 100644 --- a/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts +++ b/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts @@ -10,6 +10,8 @@ import { UserId } from "@bitwarden/common/types/guid"; import { TypographyModule } from "@bitwarden/components"; 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({ selector: "nudge-generator-spotlight", templateUrl: "nudge-generator-spotlight.component.html", diff --git a/libs/tools/generator/components/src/passphrase-settings.component.ts b/libs/tools/generator/components/src/passphrase-settings.component.ts index b3525251392..7e4ae8b5af9 100644 --- a/libs/tools/generator/components/src/passphrase-settings.component.ts +++ b/libs/tools/generator/components/src/passphrase-settings.component.ts @@ -34,6 +34,8 @@ const Controls = Object.freeze({ }); /** Options group for passphrases */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-passphrase-settings", templateUrl: "passphrase-settings.component.html", @@ -57,6 +59,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; @@ -67,6 +71,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account = null!; @@ -79,10 +85,14 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy } /** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() showHeader: boolean = true; /** Removes bottom margin from `bit-section` */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ transform: coerceBooleanProperty }) disableMargin = false; /** Emits settings updates and completes if the settings become unavailable. @@ -90,6 +100,8 @@ export class PassphraseSettingsComponent implements OnInit, OnChanges, OnDestroy * to receive live settings updates including the initial update, * use {@link CredentialGeneratorService.settings} instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/password-generator.component.ts b/libs/tools/generator/components/src/password-generator.component.ts index b293aeb7e2d..2b1d5044651 100644 --- a/libs/tools/generator/components/src/password-generator.component.ts +++ b/libs/tools/generator/components/src/password-generator.component.ts @@ -53,6 +53,8 @@ import { GeneratorHistoryService } from "@bitwarden/generator-history"; import { toAlgorithmInfo, translate } from "./util"; /** Options group for passwords */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-password-generator", templateUrl: "password-generator.component.html", @@ -76,6 +78,8 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy /** Binds the component to a specific user's settings. When this input is not provided, * the form binds to the active user */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() account: Account | null = null; @@ -86,6 +90,8 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; @@ -110,10 +116,14 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy } } + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() profile: GeneratorProfile = Profile.account; /** Removes bottom margin, passed to downstream components */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ transform: coerceBooleanProperty }) disableMargin = false; @@ -154,10 +164,14 @@ export class PasswordGeneratorComponent implements OnInit, OnChanges, OnDestroy } /** Emits credentials created from a generation request. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onGenerated = new EventEmitter(); /** emits algorithm info when the selected algorithm changes */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onAlgorithm = new EventEmitter(); diff --git a/libs/tools/generator/components/src/password-settings.component.ts b/libs/tools/generator/components/src/password-settings.component.ts index 965ada38146..5d5980edf1b 100644 --- a/libs/tools/generator/components/src/password-settings.component.ts +++ b/libs/tools/generator/components/src/password-settings.component.ts @@ -34,6 +34,8 @@ const Controls = Object.freeze({ }); /** Options group for passwords */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-password-settings", templateUrl: "password-settings.component.html", @@ -55,6 +57,8 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy { * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account = null!; @@ -67,14 +71,20 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy { } /** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() showHeader: boolean = true; /** Number of milliseconds to wait before accepting user input. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() waitMs: number = 100; /** Removes bottom margin from `bit-section` */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ transform: coerceBooleanProperty }) disableMargin = false; /** Emits settings updates and completes if the settings become unavailable. @@ -82,6 +92,8 @@ export class PasswordSettingsComponent implements OnInit, OnChanges, OnDestroy { * to receive live settings updates including the initial update, * use `CredentialGeneratorService.settings(...)` instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/subaddress-settings.component.ts b/libs/tools/generator/components/src/subaddress-settings.component.ts index 27ed6d5f9f3..f9cef2341ba 100644 --- a/libs/tools/generator/components/src/subaddress-settings.component.ts +++ b/libs/tools/generator/components/src/subaddress-settings.component.ts @@ -19,6 +19,8 @@ import { } from "@bitwarden/generator-core"; /** Options group for plus-addressed emails */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-subaddress-settings", templateUrl: "subaddress-settings.component.html", @@ -38,6 +40,8 @@ export class SubaddressSettingsComponent implements OnInit, OnChanges, OnDestroy * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account = null!; @@ -54,6 +58,8 @@ export class SubaddressSettingsComponent implements OnInit, OnChanges, OnDestroy * to receive live settings updates including the initial update, * use `CredentialGeneratorService.settings(...)` instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/generator/components/src/username-generator.component.ts b/libs/tools/generator/components/src/username-generator.component.ts index 6227bcd3f7c..dc4b8d26e7e 100644 --- a/libs/tools/generator/components/src/username-generator.component.ts +++ b/libs/tools/generator/components/src/username-generator.component.ts @@ -64,6 +64,8 @@ const FORWARDER = "forwarder"; const NONE_SELECTED = "none"; /** Component that generates usernames and emails */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ selector: "tools-username-generator", templateUrl: "username-generator.component.html", @@ -95,6 +97,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy /** Binds the component to a specific user's settings. When this input is not provided, * the form binds to the active user */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() account: Account | null = null; @@ -105,6 +109,8 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy * * @warning this may reveal sensitive information in plaintext. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() debug: boolean = false; @@ -132,18 +138,26 @@ export class UsernameGeneratorComponent implements OnInit, OnChanges, OnDestroy /** * The website associated with the credential generation request. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() website: string | null = null; /** Emits credentials created from a generation request. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onGenerated = new EventEmitter(); /** emits algorithm info when the selected algorithm changes */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onAlgorithm = new EventEmitter(); /** Removes bottom margin from internal elements */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ transform: coerceBooleanProperty }) disableMargin = false; /** Tracks the selected generation algorithm */ diff --git a/libs/tools/generator/components/src/username-settings.component.ts b/libs/tools/generator/components/src/username-settings.component.ts index 7a12957f906..fae1a3aca04 100644 --- a/libs/tools/generator/components/src/username-settings.component.ts +++ b/libs/tools/generator/components/src/username-settings.component.ts @@ -19,6 +19,8 @@ import { } from "@bitwarden/generator-core"; /** Options group for 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({ selector: "tools-username-settings", templateUrl: "username-settings.component.html", @@ -38,6 +40,8 @@ export class UsernameSettingsComponent implements OnInit, OnChanges, OnDestroy { * @remarks this is initialized to null but since it's a required input it'll * never have that value in practice. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) account: Account = null!; @@ -54,6 +58,8 @@ export class UsernameSettingsComponent implements OnInit, OnChanges, OnDestroy { * to receive live settings updates including the initial update, * use `CredentialGeneratorService.settings(...)` instead. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() readonly onUpdated = new EventEmitter(); diff --git a/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts index 383bf4be7ec..5b4e913f693 100644 --- a/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts +++ b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts @@ -52,6 +52,8 @@ export enum SendItemDialogResult { /** * Component for adding or editing a send item. */ +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ templateUrl: "send-add-edit-dialog.component.html", imports: [ diff --git a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts index b553a343cdd..1ffd9644208 100644 --- a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts +++ b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts @@ -10,13 +10,19 @@ import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abs import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { ButtonModule, ButtonType, MenuModule } 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({ selector: "tools-new-send-dropdown", templateUrl: "new-send-dropdown.component.html", imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, PremiumBadgeComponent], }) export class NewSendDropdownComponent implements OnInit { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() hideIcon: boolean = false; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() buttonType: ButtonType = "primary"; sendType = SendType; diff --git a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts index b2ab149f2f2..2ddb10dc80b 100644 --- a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts @@ -33,6 +33,8 @@ import { CredentialGeneratorService, GenerateRequest, Type } from "@bitwarden/ge import { SendFormConfig } from "../../abstractions/send-form-config.service"; import { SendFormContainer } from "../../send-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({ selector: "tools-send-options", templateUrl: "./send-options.component.html", @@ -52,8 +54,12 @@ import { SendFormContainer } from "../../send-form-container"; ], }) export class SendOptionsComponent implements OnInit { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input({ required: true }) config: SendFormConfig; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() originalSendView: SendView; disableHideEmail = false; diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts index e1fbf5dbc50..2996c18bf63 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts @@ -47,6 +47,8 @@ export interface DatePresetSelectOption { value: DatePreset | 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({ selector: "tools-send-details", templateUrl: "./send-details.component.html", @@ -68,7 +70,11 @@ export interface DatePresetSelectOption { ], }) export class SendDetailsComponent implements OnInit { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() config: SendFormConfig; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() originalSendView?: SendView; FileSendType = SendType.File; diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts index 83b966c2b7e..4e4900039c7 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts @@ -17,6 +17,8 @@ import { import { SendFormConfig } from "../../abstractions/send-form-config.service"; import { SendFormContainer } from "../../send-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({ selector: "tools-send-file-details", templateUrl: "./send-file-details.component.html", @@ -32,8 +34,8 @@ import { SendFormContainer } from "../../send-form-container"; ], }) export class SendFileDetailsComponent implements OnInit { - config = input.required(); - originalSendView = input(); + readonly config = input.required(); + readonly originalSendView = input(); sendFileDetailsForm = this.formBuilder.group({ file: this.formBuilder.control(null, Validators.required), diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts index 202d43d67ef..70a20ab63d8 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts @@ -10,6 +10,8 @@ import { CheckboxModule, FormFieldModule, SectionComponent } from "@bitwarden/co import { SendFormConfig } from "../../abstractions/send-form-config.service"; import { SendFormContainer } from "../../send-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({ selector: "tools-send-text-details", templateUrl: "./send-text-details.component.html", @@ -23,8 +25,8 @@ import { SendFormContainer } from "../../send-form-container"; ], }) export class SendTextDetailsComponent implements OnInit { - config = input.required(); - originalSendView = input(); + readonly config = input.required(); + readonly originalSendView = input(); sendTextDetailsForm = this.formBuilder.group({ text: new FormControl("", Validators.required), diff --git a/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts index b8593c735b7..fcd3b0cb7ea 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts @@ -38,6 +38,8 @@ import { SendForm, SendFormContainer } from "../send-form-container"; import { SendDetailsComponent } from "./send-details/send-details.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({ selector: "tools-send-form", templateUrl: "./send-form.component.html", @@ -59,6 +61,8 @@ import { SendDetailsComponent } from "./send-details/send-details.component"; ], }) export class SendFormComponent implements AfterViewInit, OnInit, OnChanges, SendFormContainer { + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @ViewChild(BitSubmitDirective) private bitSubmit: BitSubmitDirective; private destroyRef = inject(DestroyRef); @@ -68,27 +72,37 @@ export class SendFormComponent implements AfterViewInit, OnInit, OnChanges, Send /** * 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; /** * 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: SendFormConfig; /** * 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() submitBtn?: ButtonComponent; /** * Event emitted when the send is created successfully. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onSendCreated = new EventEmitter(); /** * Event emitted when the send is updated successfully. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-output-emitter-ref @Output() onSendUpdated = new EventEmitter(); /** diff --git a/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts b/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts index b7c60145bbf..8de88282b7c 100644 --- a/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts +++ b/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts @@ -10,6 +10,8 @@ import { ChipSelectComponent } from "@bitwarden/components"; import { SendListFiltersService } from "../services/send-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({ selector: "app-send-list-filters", templateUrl: "./send-list-filters.component.html", diff --git a/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts b/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts index f67880eb73f..d885f279bc6 100644 --- a/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts +++ b/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts @@ -25,6 +25,8 @@ import { TypographyModule, } 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({ imports: [ CommonModule, @@ -46,9 +48,13 @@ export class SendListItemsContainerComponent { /** * The list of sends to display. */ + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() sends: SendView[] = []; + // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals + // eslint-disable-next-line @angular-eslint/prefer-signals @Input() headerText: string; diff --git a/libs/tools/send/send-ui/src/send-search/send-search.component.ts b/libs/tools/send/send-ui/src/send-search/send-search.component.ts index 90b31a206fc..02cb5ef2eda 100644 --- a/libs/tools/send/send-ui/src/send-search/send-search.component.ts +++ b/libs/tools/send/send-ui/src/send-search/send-search.component.ts @@ -11,6 +11,8 @@ import { SendItemsService } from "../services/send-items.service"; const SearchTextDebounceInterval = 200; +// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush +// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection @Component({ imports: [CommonModule, SearchModule, JslibModule, FormsModule], selector: "tools-send-search",