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 2fc83a5d03b..8cd052aa016 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 @@ -8,9 +8,7 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions"; import { SendType } from "@bitwarden/common/tools/send/enums/send-type"; import { BadgeModule, ButtonModule, DialogService, MenuModule } from "@bitwarden/components"; -import { DefaultSendFormConfigService } from "@bitwarden/send-ui"; - -import { SendAddEditComponent } from "../send-add-edit.component"; +import { DefaultSendFormConfigService, SendAddEditDialogComponent } from "@bitwarden/send-ui"; @Component({ selector: "tools-new-send-dropdown", @@ -60,6 +58,6 @@ export class NewSendDropdownComponent { const formConfig = await this.addEditFormConfigService.buildConfig("add", undefined, type); - await SendAddEditComponent.open(this.dialogService, { formConfig }); + await SendAddEditDialogComponent.open(this.dialogService, { formConfig }); } } diff --git a/apps/web/src/app/tools/send/send.component.ts b/apps/web/src/app/tools/send/send.component.ts index 1d4e6305bdc..ed6cb9a2b3c 100644 --- a/apps/web/src/app/tools/send/send.component.ts +++ b/apps/web/src/app/tools/send/send.component.ts @@ -23,13 +23,18 @@ import { TableDataSource, ToastService, } from "@bitwarden/components"; -import { DefaultSendFormConfigService, NoSendsIcon, SendFormConfig } from "@bitwarden/send-ui"; +import { + DefaultSendFormConfigService, + NoSendsIcon, + SendFormConfig, + SendAddEditDialogComponent, + SendItemDialogResult, +} from "@bitwarden/send-ui"; import { HeaderModule } from "../../layouts/header/header.module"; import { SharedModule } from "../../shared"; import { NewSendDropdownComponent } from "./new-send/new-send-dropdown.component"; -import { SendAddEditComponent, SendItemDialogResult } from "./send-add-edit.component"; const BroadcasterSubscriptionId = "SendComponent"; @@ -140,7 +145,7 @@ export class SendComponent extends BaseSendComponent implements OnInit, OnDestro return; } - this.sendItemDialogRef = SendAddEditComponent.open(this.dialogService, { + this.sendItemDialogRef = SendAddEditDialogComponent.open(this.dialogService, { formConfig, }); diff --git a/apps/web/src/app/tools/send/send-add-edit.component.html b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.html similarity index 100% rename from apps/web/src/app/tools/send/send-add-edit.component.html rename to libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.html diff --git a/apps/web/src/app/tools/send/send-add-edit.component.ts b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts similarity index 94% rename from apps/web/src/app/tools/send/send-add-edit.component.ts rename to libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts index 490683a4b4d..fd15c87920f 100644 --- a/apps/web/src/app/tools/send/send-add-edit.component.ts +++ b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts @@ -19,7 +19,8 @@ import { ToastService, DialogModule, } from "@bitwarden/components"; -import { SendFormConfig, SendFormMode, SendFormModule } from "@bitwarden/send-ui"; + +import { SendFormConfig, SendFormMode, SendFormModule } from "../send-form"; export interface SendItemDialogParams { /** @@ -49,8 +50,7 @@ export enum SendItemDialogResult { * Component for adding or editing a send item. */ @Component({ - selector: "tools-send-add-edit", - templateUrl: "send-add-edit.component.html", + templateUrl: "send-add-edit-dialog.component.html", standalone: true, imports: [ CommonModule, @@ -64,7 +64,7 @@ export enum SendItemDialogResult { DialogModule, ], }) -export class SendAddEditComponent { +export class SendAddEditDialogComponent { /** * The header text for the component. */ @@ -169,8 +169,11 @@ export class SendAddEditComponent { * @returns The dialog result. */ static open(dialogService: DialogService, params: SendItemDialogParams) { - return dialogService.open(SendAddEditComponent, { - data: params, - }); + return dialogService.open( + SendAddEditDialogComponent, + { + data: params, + }, + ); } } diff --git a/libs/tools/send/send-ui/src/index.ts b/libs/tools/send/send-ui/src/index.ts index d208709c36d..db4416a13f0 100644 --- a/libs/tools/send/send-ui/src/index.ts +++ b/libs/tools/send/send-ui/src/index.ts @@ -1,6 +1,7 @@ export * from "./icons"; export * from "./send-form"; export { NewSendDropdownComponent } from "./new-send-dropdown/new-send-dropdown.component"; +export * from "./add-edit/send-add-edit-dialog.component"; export { SendListItemsContainerComponent } from "./send-list-items-container/send-list-items-container.component"; export { SendItemsService } from "./services/send-items.service"; export { SendSearchComponent } from "./send-search/send-search.component";