diff --git a/apps/web/src/app/billing/members/free-bitwarden-families.component.ts b/apps/web/src/app/billing/members/free-bitwarden-families.component.ts index 474e513da6b..49e3b54afb3 100644 --- a/apps/web/src/app/billing/members/free-bitwarden-families.component.ts +++ b/apps/web/src/app/billing/members/free-bitwarden-families.component.ts @@ -15,8 +15,21 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl import { StateProvider } from "@bitwarden/common/platform/state"; import { OrganizationId, UserId } from "@bitwarden/common/types/guid"; import { OrgKey } from "@bitwarden/common/types/key"; -import { DialogRef, DialogService, ToastService } from "@bitwarden/components"; +import { + ButtonModule, + ContainerComponent, + DialogRef, + DialogService, + IconButtonModule, + MenuModule, + TableModule, + ToastService, + TypographyModule, +} from "@bitwarden/components"; import { KeyService } from "@bitwarden/key-management"; +import { I18nPipe } from "@bitwarden/ui-common"; + +import { HeaderModule } from "../../layouts/header/header.module"; import { AddSponsorshipDialogComponent } from "./add-sponsorship-dialog.component"; @@ -25,7 +38,16 @@ import { AddSponsorshipDialogComponent } from "./add-sponsorship-dialog.componen @Component({ selector: "app-free-bitwarden-families", templateUrl: "free-bitwarden-families.component.html", - standalone: false, + imports: [ + ButtonModule, + ContainerComponent, + HeaderModule, + I18nPipe, + IconButtonModule, + MenuModule, + TableModule, + TypographyModule, + ], }) export class FreeBitwardenFamiliesComponent implements OnInit { readonly loading = signal(true); diff --git a/apps/web/src/app/billing/settings/sponsored-families.component.ts b/apps/web/src/app/billing/settings/sponsored-families.component.ts index 530db0ff397..6e43d51122c 100644 --- a/apps/web/src/app/billing/settings/sponsored-families.component.ts +++ b/apps/web/src/app/billing/settings/sponsored-families.component.ts @@ -1,10 +1,12 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore +import { CommonModule } from "@angular/common"; import { Component, OnDestroy, OnInit } from "@angular/core"; import { FormBuilder, FormControl, FormGroup, + ReactiveFormsModule, Validators, AbstractControl, AsyncValidatorFn, @@ -13,6 +15,7 @@ import { import { Router } from "@angular/router"; import { combineLatest, firstValueFrom, map, Observable, Subject, takeUntil } from "rxjs"; +import { JslibModule } from "@bitwarden/angular/jslib.module"; import { ApiService } from "@bitwarden/common/abstractions/api.service"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; @@ -24,10 +27,23 @@ import { PlanSponsorshipType } from "@bitwarden/common/billing/enums"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { ToastService } from "@bitwarden/components"; +import { + AsyncActionsModule, + ButtonModule, + ContainerComponent, + FormFieldModule, + SelectModule, + TableModule, + ToastService, + TypographyModule, +} from "@bitwarden/components"; +import { I18nPipe } from "@bitwarden/ui-common"; +import { HeaderModule } from "../../layouts/header/header.module"; import { FreeFamiliesPolicyService } from "../services/free-families-policy.service"; +import { SponsoringOrgRowComponent } from "./sponsoring-org-row.component"; + interface RequestSponsorshipForm { selectedSponsorshipOrgId: FormControl; sponsorshipEmail: FormControl; @@ -38,7 +54,22 @@ interface RequestSponsorshipForm { @Component({ selector: "app-sponsored-families", templateUrl: "sponsored-families.component.html", - standalone: false, + imports: [ + JslibModule, + + AsyncActionsModule, + ButtonModule, + CommonModule, + ContainerComponent, + FormFieldModule, + HeaderModule, + I18nPipe, + ReactiveFormsModule, + SelectModule, + SponsoringOrgRowComponent, + TableModule, + TypographyModule, + ], }) export class SponsoredFamiliesComponent implements OnInit, OnDestroy { loading = false; diff --git a/apps/web/src/app/billing/settings/sponsoring-org-row.component.ts b/apps/web/src/app/billing/settings/sponsoring-org-row.component.ts index 6d27130025d..5599c3cd908 100644 --- a/apps/web/src/app/billing/settings/sponsoring-org-row.component.ts +++ b/apps/web/src/app/billing/settings/sponsoring-org-row.component.ts @@ -1,6 +1,6 @@ // FIXME: Update this file to be type safe and remove this and next line // @ts-strict-ignore -import { formatDate } from "@angular/common"; +import { CommonModule, formatDate } from "@angular/common"; import { Component, EventEmitter, Input, Output, OnInit } from "@angular/core"; import { firstValueFrom, map, Observable, switchMap } from "rxjs"; @@ -13,14 +13,21 @@ import { getUserId } from "@bitwarden/common/auth/services/account.service"; import { OrganizationSponsorshipApiServiceAbstraction } from "@bitwarden/common/billing/abstractions/organizations/organization-sponsorship-api.service.abstraction"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; -import { DialogService, ToastService } from "@bitwarden/components"; +import { + DialogService, + IconButtonModule, + MenuModule, + TableModule, + ToastService, +} 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: "[sponsoring-org-row]", templateUrl: "sponsoring-org-row.component.html", - standalone: false, + imports: [CommonModule, I18nPipe, TableModule, IconButtonModule, MenuModule], }) export class SponsoringOrgRowComponent implements OnInit { // FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals diff --git a/apps/web/src/app/oss.module.ts b/apps/web/src/app/oss.module.ts index ce1b45a9e47..de50536d122 100644 --- a/apps/web/src/app/oss.module.ts +++ b/apps/web/src/app/oss.module.ts @@ -4,7 +4,6 @@ import { AuthModule } from "./auth"; import { TrialInitiationModule } from "./billing/trial-initiation/trial-initiation.module"; import { HeaderModule } from "./layouts/header/header.module"; import { SharedModule } from "./shared"; -import { LooseComponentsModule } from "./shared/loose-components.module"; import { AccessComponent } from "./tools/send/send-access/access.component"; import { OrganizationBadgeModule } from "./vault/individual-vault/organization-badge/organization-badge.module"; import { VaultFilterModule } from "./vault/individual-vault/vault-filter/vault-filter.module"; @@ -15,7 +14,6 @@ import "./shared/locales"; @NgModule({ imports: [ SharedModule, - LooseComponentsModule, HeaderModule, TrialInitiationModule, VaultFilterModule, diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts deleted file mode 100644 index ff7a5f02c77..00000000000 --- a/apps/web/src/app/shared/loose-components.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from "@angular/core"; - -import { FreeBitwardenFamiliesComponent } from "../billing/members/free-bitwarden-families.component"; -import { SponsoredFamiliesComponent } from "../billing/settings/sponsored-families.component"; -import { SponsoringOrgRowComponent } from "../billing/settings/sponsoring-org-row.component"; -import { HeaderModule } from "../layouts/header/header.module"; -import { OrganizationBadgeModule } from "../vault/individual-vault/organization-badge/organization-badge.module"; -import { PipesModule } from "../vault/individual-vault/pipes/pipes.module"; - -import { SharedModule } from "./shared.module"; - -// Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left. -// If you are building new functionality, please create or extend a feature module instead. -@NgModule({ - imports: [SharedModule, HeaderModule, OrganizationBadgeModule, PipesModule], - declarations: [ - SponsoredFamiliesComponent, - FreeBitwardenFamiliesComponent, - SponsoringOrgRowComponent, - ], - exports: [SponsoredFamiliesComponent], -}) -export class LooseComponentsModule {}