From 458da1adc0eca479ff35f5a4b1b327b37ad33d53 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:38:33 +0100 Subject: [PATCH] [PM-29565] Delete deprecated callout component (#17895) * Replace usages of app-callout with bit-callout * Delete callout.component --------- Co-authored-by: Daniel James Smith --- .../components/approve-ssh-request.html | 10 ++- .../components/approve-ssh-request.ts | 2 + .../auth/verify-recover-delete.component.html | 2 +- ...ify-recover-delete-provider.component.html | 2 +- .../src/components/callout.component.html | 26 ------- .../src/components/callout.component.ts | 70 ------------------- libs/angular/src/jslib.module.ts | 3 - 7 files changed, 8 insertions(+), 107 deletions(-) delete mode 100644 libs/angular/src/components/callout.component.html delete mode 100644 libs/angular/src/components/callout.component.ts diff --git a/apps/desktop/src/platform/components/approve-ssh-request.html b/apps/desktop/src/platform/components/approve-ssh-request.html index 55092788079..c691891487e 100644 --- a/apps/desktop/src/platform/components/approve-ssh-request.html +++ b/apps/desktop/src/platform/components/approve-ssh-request.html @@ -2,13 +2,11 @@
{{ "sshkeyApprovalTitle" | i18n }}
- + @if (params.isAgentForwarding) { + {{ 'agentForwardingWarningText' | i18n }} - + + } {{params.applicationName}} {{ "sshkeyApprovalMessageInfix" | i18n }} {{params.cipherName}} diff --git a/apps/desktop/src/platform/components/approve-ssh-request.ts b/apps/desktop/src/platform/components/approve-ssh-request.ts index 1741124774d..a2cae3d59e7 100644 --- a/apps/desktop/src/platform/components/approve-ssh-request.ts +++ b/apps/desktop/src/platform/components/approve-ssh-request.ts @@ -12,6 +12,7 @@ import { FormFieldModule, IconButtonModule, DialogService, + CalloutModule, } from "@bitwarden/components"; export interface ApproveSshRequestParams { @@ -35,6 +36,7 @@ export interface ApproveSshRequestParams { ReactiveFormsModule, AsyncActionsModule, FormFieldModule, + CalloutModule, ], }) export class ApproveSshRequestComponent { diff --git a/apps/web/src/app/auth/verify-recover-delete.component.html b/apps/web/src/app/auth/verify-recover-delete.component.html index 02581b21418..27eda24a118 100644 --- a/apps/web/src/app/auth/verify-recover-delete.component.html +++ b/apps/web/src/app/auth/verify-recover-delete.component.html @@ -1,5 +1,5 @@
- {{ "deleteAccountWarning" | i18n }} + {{ "deleteAccountWarning" | i18n }}

{{ email }}

diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/verify-recover-delete-provider.component.html b/bitwarden_license/bit-web/src/app/admin-console/providers/verify-recover-delete-provider.component.html index e1f99122b22..6965dbe8198 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/verify-recover-delete-provider.component.html +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/verify-recover-delete-provider.component.html @@ -1,5 +1,5 @@

{{ "deleteProvider" | i18n }}

-{{ "deleteProviderWarning" | i18n }} +{{ "deleteProviderWarning" | i18n }}

{{ name }}

diff --git a/libs/angular/src/components/callout.component.html b/libs/angular/src/components/callout.component.html deleted file mode 100644 index 7e352fa0ced..00000000000 --- a/libs/angular/src/components/callout.component.html +++ /dev/null @@ -1,26 +0,0 @@ - -
- {{ enforcedPolicyMessage }} -
    -
  • - {{ "policyInEffectMinComplexity" | i18n: getPasswordScoreAlertDisplay() }} -
  • -
  • - {{ "policyInEffectMinLength" | i18n: enforcedPolicyOptions?.minLength.toString() }} -
  • -
  • - {{ "policyInEffectUppercase" | i18n }} -
  • -
  • - {{ "policyInEffectLowercase" | i18n }} -
  • -
  • - {{ "policyInEffectNumbers" | i18n }} -
  • -
  • - {{ "policyInEffectSpecial" | i18n: "!@#$%^&*" }} -
  • -
-
- -
diff --git a/libs/angular/src/components/callout.component.ts b/libs/angular/src/components/callout.component.ts deleted file mode 100644 index 9630b761076..00000000000 --- a/libs/angular/src/components/callout.component.ts +++ /dev/null @@ -1,70 +0,0 @@ -// FIXME: Update this file to be type safe and remove this and next line -// @ts-strict-ignore -import { Component, Input, OnInit } from "@angular/core"; - -import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { CalloutTypes } from "@bitwarden/components"; - -/** - * @deprecated use the CL's `CalloutComponent` instead - */ -// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush -// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection -@Component({ - selector: "app-callout", - templateUrl: "callout.component.html", - standalone: false, -}) -export class DeprecatedCalloutComponent implements OnInit { - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() type: CalloutTypes = "info"; - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() icon: string; - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() title: string; - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() enforcedPolicyOptions: MasterPasswordPolicyOptions; - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() enforcedPolicyMessage: string; - // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals - // eslint-disable-next-line @angular-eslint/prefer-signals - @Input() useAlertRole = false; - - calloutStyle: string; - - constructor(private i18nService: I18nService) {} - - ngOnInit() { - this.calloutStyle = this.type; - - if (this.enforcedPolicyMessage === undefined) { - this.enforcedPolicyMessage = this.i18nService.t("masterPasswordPolicyInEffect"); - } - } - - getPasswordScoreAlertDisplay() { - if (this.enforcedPolicyOptions == null) { - return ""; - } - - let str: string; - switch (this.enforcedPolicyOptions.minComplexity) { - case 4: - str = this.i18nService.t("strong"); - break; - case 3: - str = this.i18nService.t("good"); - break; - default: - str = this.i18nService.t("weak"); - break; - } - return str + " (" + this.enforcedPolicyOptions.minComplexity + ")"; - } -} diff --git a/libs/angular/src/jslib.module.ts b/libs/angular/src/jslib.module.ts index 446530a1111..8d222a4aaf9 100644 --- a/libs/angular/src/jslib.module.ts +++ b/libs/angular/src/jslib.module.ts @@ -26,7 +26,6 @@ import { import { TwoFactorIconComponent } from "./auth/components/two-factor-icon.component"; import { NotPremiumDirective } from "./billing/directives/not-premium.directive"; -import { DeprecatedCalloutComponent } from "./components/callout.component"; import { A11yInvalidDirective } from "./directives/a11y-invalid.directive"; import { ApiActionDirective } from "./directives/api-action.directive"; import { BoxRowDirective } from "./directives/box-row.directive"; @@ -86,7 +85,6 @@ import { IconComponent } from "./vault/components/icon.component"; A11yInvalidDirective, ApiActionDirective, BoxRowDirective, - DeprecatedCalloutComponent, CopyTextDirective, CreditCardNumberPipe, EllipsisPipe, @@ -115,7 +113,6 @@ import { IconComponent } from "./vault/components/icon.component"; AutofocusDirective, ToastModule, BoxRowDirective, - DeprecatedCalloutComponent, CopyTextDirective, CreditCardNumberPipe, EllipsisPipe,