From c8629b92d3514a376029e44209e2ff08c4faccd6 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Fri, 16 May 2025 17:11:18 +0200 Subject: [PATCH] [CL-694] Remove unused imports (#14795) * Remove unused imports * Remove more unused imports --- apps/web/src/app/layouts/web-layout.component.ts | 3 +-- .../app/dirt/access-intelligence/risk-insights.component.ts | 2 -- .../src/angular/two-factor-auth/two-factor-auth.component.ts | 4 +--- libs/components/src/table/table-scroll.component.ts | 2 -- libs/importer/src/components/import.component.ts | 2 -- .../vault-export-ui/src/components/export.component.ts | 1 - .../send-ui/src/send-form/components/send-form.component.ts | 4 ---- .../additional-options-section.component.ts | 2 -- .../autofill-options/autofill-options.component.ts | 2 -- .../card-details-section/card-details-section.component.ts | 2 -- .../src/cipher-form/components/cipher-form.component.ts | 4 ---- .../components/custom-fields/custom-fields.component.ts | 2 -- .../cipher-form/components/identity/identity.component.ts | 2 -- .../item-details/item-details-section.component.ts | 2 -- .../login-details-section/login-details-section.component.ts | 2 -- .../components/sshkey-section/sshkey-section.component.ts | 2 -- .../additional-options/additional-options.component.ts | 2 -- .../cipher-view/attachments/attachments-v2-view.component.ts | 2 -- .../autofill-options/autofill-options-view.component.ts | 2 -- .../cipher-view/card-details/card-details-view.component.ts | 4 ---- .../cipher-view/custom-fields/custom-fields-v2.component.ts | 2 -- .../cipher-view/item-details/item-details-v2.component.ts | 2 -- .../login-credentials/login-credentials-view.component.ts | 2 -- .../src/cipher-view/sshkey-sections/sshkey-view.component.ts | 5 ----- .../view-identity-sections.component.ts | 2 -- 25 files changed, 2 insertions(+), 59 deletions(-) diff --git a/apps/web/src/app/layouts/web-layout.component.ts b/apps/web/src/app/layouts/web-layout.component.ts index 840beaa2179..aa4de4cfee5 100644 --- a/apps/web/src/app/layouts/web-layout.component.ts +++ b/apps/web/src/app/layouts/web-layout.component.ts @@ -4,13 +4,12 @@ import { Component } from "@angular/core"; import { LayoutComponent } from "@bitwarden/components"; import { ProductSwitcherModule } from "./product-switcher/product-switcher.module"; -import { ToggleWidthComponent } from "./toggle-width.component"; @Component({ selector: "app-layout", templateUrl: "web-layout.component.html", standalone: true, - imports: [CommonModule, LayoutComponent, ProductSwitcherModule, ToggleWidthComponent], + imports: [CommonModule, LayoutComponent, ProductSwitcherModule], }) export class WebLayoutComponent { constructor() {} diff --git a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.ts b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.ts index 5aca124a46a..e47e1851099 100644 --- a/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.ts +++ b/bitwarden_license/bit-web/src/app/dirt/access-intelligence/risk-insights.component.ts @@ -32,7 +32,6 @@ import { HeaderModule } from "@bitwarden/web-vault/app/layouts/header/header.mod import { AllApplicationsComponent } from "./all-applications.component"; import { CriticalApplicationsComponent } from "./critical-applications.component"; -import { NotifiedMembersTableComponent } from "./notified-members-table.component"; import { PasswordHealthMembersURIComponent } from "./password-health-members-uri.component"; import { PasswordHealthMembersComponent } from "./password-health-members.component"; import { PasswordHealthComponent } from "./password-health.component"; @@ -59,7 +58,6 @@ export enum RiskInsightsTabType { PasswordHealthComponent, PasswordHealthMembersComponent, PasswordHealthMembersURIComponent, - NotifiedMembersTableComponent, TabsModule, DrawerComponent, DrawerBodyComponent, diff --git a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts index 6db56c8e484..91901fa3544 100644 --- a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts +++ b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts @@ -10,7 +10,7 @@ import { } from "@angular/core"; import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { FormBuilder, ReactiveFormsModule, Validators } from "@angular/forms"; -import { ActivatedRoute, Router, RouterLink } from "@angular/router"; +import { ActivatedRoute, Router } from "@angular/router"; import { lastValueFrom, firstValueFrom } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; @@ -84,10 +84,8 @@ import { ReactiveFormsModule, FormFieldModule, AsyncActionsModule, - RouterLink, CheckboxModule, ButtonModule, - TwoFactorOptionsComponent, // used as dialog TwoFactorAuthAuthenticatorComponent, TwoFactorAuthEmailComponent, TwoFactorAuthDuoComponent, diff --git a/libs/components/src/table/table-scroll.component.ts b/libs/components/src/table/table-scroll.component.ts index e198da1aba0..e83dbbecc60 100644 --- a/libs/components/src/table/table-scroll.component.ts +++ b/libs/components/src/table/table-scroll.component.ts @@ -2,7 +2,6 @@ // @ts-strict-ignore import { CdkVirtualScrollViewport, - CdkVirtualScrollableWindow, CdkFixedSizeVirtualScroll, CdkVirtualForOf, } from "@angular/cdk/scrolling"; @@ -56,7 +55,6 @@ export class BitRowDef { imports: [ CommonModule, CdkVirtualScrollViewport, - CdkVirtualScrollableWindow, CdkFixedSizeVirtualScroll, CdkVirtualForOf, RowDirective, diff --git a/libs/importer/src/components/import.component.ts b/libs/importer/src/components/import.component.ts index 2c6354f5b5a..2fee88852b5 100644 --- a/libs/importer/src/components/import.component.ts +++ b/libs/importer/src/components/import.component.ts @@ -49,7 +49,6 @@ import { ButtonModule, CalloutModule, CardComponent, - ContainerComponent, DialogService, FormFieldModule, IconButtonModule, @@ -119,7 +118,6 @@ const safeProviders: SafeProvider[] = [ ImportLastPassComponent, RadioButtonModule, CardComponent, - ContainerComponent, SectionHeaderComponent, SectionComponent, LinkModule, 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 71599c19ae0..0512b56e20d 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 @@ -80,7 +80,6 @@ import { ExportScopeCalloutComponent } from "./export-scope-callout.component"; CalloutModule, RadioButtonModule, ExportScopeCalloutComponent, - UserVerificationDialogComponent, PasswordStrengthV2Component, GeneratorServicesModule, ], 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 3149307bdd5..13c00a6bb78 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 @@ -25,10 +25,8 @@ import { AsyncActionsModule, BitSubmitDirective, ButtonComponent, - CardComponent, FormFieldModule, ItemModule, - SectionComponent, SelectModule, ToastService, TypographyModule, @@ -52,8 +50,6 @@ import { SendDetailsComponent } from "./send-details/send-details.component"; ], imports: [ AsyncActionsModule, - CardComponent, - SectionComponent, TypographyModule, ItemModule, FormFieldModule, diff --git a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts index 4d72a89e4e1..14f3494652a 100644 --- a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts +++ b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts @@ -13,7 +13,6 @@ import { CheckboxModule, FormFieldModule, LinkModule, - SectionComponent, SectionHeaderComponent, TypographyModule, } from "@bitwarden/components"; @@ -28,7 +27,6 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component" standalone: true, imports: [ CommonModule, - SectionComponent, SectionHeaderComponent, TypographyModule, JslibModule, diff --git a/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts b/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts index ac670a39335..ccbc792648e 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts @@ -22,7 +22,6 @@ import { FormFieldModule, IconButtonModule, LinkModule, - SectionComponent, SectionHeaderComponent, SelectModule, TypographyModule, @@ -43,7 +42,6 @@ interface UriField { standalone: true, imports: [ DragDropModule, - SectionComponent, SectionHeaderComponent, TypographyModule, JslibModule, diff --git a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts index cb00c7d24f5..8086d2bf0c4 100644 --- a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts @@ -16,7 +16,6 @@ import { CardComponent, FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, SelectModule, TypographyModule, @@ -30,7 +29,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; standalone: true, imports: [ CardComponent, - SectionComponent, TypographyModule, FormFieldModule, ReactiveFormsModule, diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.ts b/libs/vault/src/cipher-form/components/cipher-form.component.ts index eebfca65f36..08dc71c9886 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.ts @@ -26,10 +26,8 @@ import { AsyncActionsModule, BitSubmitDirective, ButtonComponent, - CardComponent, FormFieldModule, ItemModule, - SectionComponent, SelectModule, ToastService, TypographyModule, @@ -63,8 +61,6 @@ import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.componen ], imports: [ AsyncActionsModule, - CardComponent, - SectionComponent, TypographyModule, ItemModule, FormFieldModule, diff --git a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts index 49e9e109b74..5d43f52788a 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts +++ b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts @@ -37,7 +37,6 @@ import { FormFieldModule, IconButtonModule, LinkModule, - SectionComponent, SectionHeaderComponent, SelectModule, TypographyModule, @@ -79,7 +78,6 @@ export type CustomField = { FormsModule, FormFieldModule, ReactiveFormsModule, - SectionComponent, SectionHeaderComponent, TypographyModule, CardComponent, diff --git a/libs/vault/src/cipher-form/components/identity/identity.component.ts b/libs/vault/src/cipher-form/components/identity/identity.component.ts index f0c73002e97..3cc8e73697f 100644 --- a/libs/vault/src/cipher-form/components/identity/identity.component.ts +++ b/libs/vault/src/cipher-form/components/identity/identity.component.ts @@ -14,7 +14,6 @@ import { CardComponent, FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, SelectModule, TypographyModule, @@ -31,7 +30,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; ButtonModule, JslibModule, ReactiveFormsModule, - SectionComponent, SectionHeaderComponent, CardComponent, FormFieldModule, diff --git a/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts b/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts index dcbc4e8c92f..82615368b91 100644 --- a/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts @@ -19,7 +19,6 @@ import { CardComponent, FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, SelectItemView, SelectModule, @@ -38,7 +37,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; standalone: true, imports: [ CardComponent, - SectionComponent, TypographyModule, FormFieldModule, ReactiveFormsModule, diff --git a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts index 1d6ca760d3b..c6b8433dcfa 100644 --- a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts @@ -20,7 +20,6 @@ import { IconButtonModule, LinkModule, PopoverModule, - SectionComponent, SectionHeaderComponent, ToastService, TypographyModule, @@ -36,7 +35,6 @@ import { AutofillOptionsComponent } from "../autofill-options/autofill-options.c templateUrl: "./login-details-section.component.html", standalone: true, imports: [ - SectionComponent, ReactiveFormsModule, SectionHeaderComponent, TypographyModule, diff --git a/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts b/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts index 500bb886f7a..fcf2ba0d9f7 100644 --- a/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts +++ b/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts @@ -16,7 +16,6 @@ import { CardComponent, FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, SelectModule, TypographyModule, @@ -32,7 +31,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; standalone: true, imports: [ CardComponent, - SectionComponent, TypographyModule, FormFieldModule, ReactiveFormsModule, diff --git a/libs/vault/src/cipher-view/additional-options/additional-options.component.ts b/libs/vault/src/cipher-view/additional-options/additional-options.component.ts index 9f8f034d59b..0f2c99800f8 100644 --- a/libs/vault/src/cipher-view/additional-options/additional-options.component.ts +++ b/libs/vault/src/cipher-view/additional-options/additional-options.component.ts @@ -6,7 +6,6 @@ import { IconButtonModule, CardComponent, InputModule, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, @@ -22,7 +21,6 @@ import { CardComponent, IconButtonModule, InputModule, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, diff --git a/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts b/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts index f2249175f86..04e69fcccd6 100644 --- a/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts +++ b/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts @@ -15,7 +15,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { ItemModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, TypographyModule, } from "@bitwarden/components"; @@ -32,7 +31,6 @@ import { DownloadAttachmentComponent } from "../../components/download-attachmen JslibModule, ItemModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, TypographyModule, DownloadAttachmentComponent, diff --git a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts index 9b12139b00e..bab37324993 100644 --- a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts +++ b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts @@ -14,7 +14,6 @@ import { CardComponent, FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, TypographyModule, } from "@bitwarden/components"; @@ -27,7 +26,6 @@ import { CommonModule, JslibModule, CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, diff --git a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts index 95117adaa78..2d1b2800c79 100644 --- a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts +++ b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts @@ -9,8 +9,6 @@ import { EventType } from "@bitwarden/common/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { - CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, @@ -26,8 +24,6 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only- imports: [ CommonModule, JslibModule, - CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, diff --git a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts index a8f4e1417b4..4d20eceb285 100644 --- a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts +++ b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts @@ -17,7 +17,6 @@ import { IconButtonModule, FormFieldModule, InputModule, - SectionComponent, SectionHeaderComponent, TypographyModule, CheckboxModule, @@ -37,7 +36,6 @@ import { VaultAutosizeReadOnlyTextArea } from "../../directives/readonly-textare IconButtonModule, FormFieldModule, InputModule, - SectionComponent, SectionHeaderComponent, TypographyModule, CheckboxModule, diff --git a/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts b/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts index 10452272895..1335df74bb9 100644 --- a/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts +++ b/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts @@ -11,7 +11,6 @@ import { FolderView } from "@bitwarden/common/vault/models/view/folder.view"; import { CardComponent, FormFieldModule, - SectionComponent, SectionHeaderComponent, TypographyModule, } from "@bitwarden/components"; @@ -26,7 +25,6 @@ import { OrgIconDirective } from "../../components/org-icon.directive"; CommonModule, JslibModule, CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, OrgIconDirective, diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts index d99ac438f27..5f7d0b32201 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts @@ -23,7 +23,6 @@ import { PremiumUpgradePromptService } from "@bitwarden/common/vault/abstraction import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FormFieldModule, - SectionComponent, SectionHeaderComponent, TypographyModule, LinkModule, @@ -47,7 +46,6 @@ type TotpCodeValues = { imports: [ CommonModule, JslibModule, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, diff --git a/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts b/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts index d597f4d9408..7ac0f8a6726 100644 --- a/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts +++ b/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts @@ -7,15 +7,12 @@ import { JslibModule } from "@bitwarden/angular/jslib.module"; import { SshKeyView } from "@bitwarden/common/vault/models/view/ssh-key.view"; import { CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule, IconButtonModule, } from "@bitwarden/components"; -import { OrgIconDirective } from "../../components/org-icon.directive"; - @Component({ selector: "app-sshkey-view", templateUrl: "sshkey-view.component.html", @@ -24,10 +21,8 @@ import { OrgIconDirective } from "../../components/org-icon.directive"; CommonModule, JslibModule, CardComponent, - SectionComponent, SectionHeaderComponent, TypographyModule, - OrgIconDirective, FormFieldModule, IconButtonModule, ], diff --git a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts index 80bf78abe6e..3b710812b36 100644 --- a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts +++ b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts @@ -6,7 +6,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { FormFieldModule, IconButtonModule, - SectionComponent, SectionHeaderComponent, TypographyModule, } from "@bitwarden/components"; @@ -20,7 +19,6 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only- imports: [ NgIf, JslibModule, - SectionComponent, SectionHeaderComponent, TypographyModule, FormFieldModule,