From bacb7cd7a0cc4ffb3aa4db66167846f9958c776f Mon Sep 17 00:00:00 2001 From: cd-bitwarden <106776772+cd-bitwarden@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:03:41 -0400 Subject: [PATCH] removing the Share component (#11373) --- .../src/app/shared/loose-components.module.ts | 3 - .../individual-vault/share.component.html | 101 ------------------ .../vault/individual-vault/share.component.ts | 49 --------- 3 files changed, 153 deletions(-) delete mode 100644 apps/web/src/app/vault/individual-vault/share.component.html delete mode 100644 apps/web/src/app/vault/individual-vault/share.component.ts diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts index 8e49c95e11..29b4f2308c 100644 --- a/apps/web/src/app/shared/loose-components.module.ts +++ b/apps/web/src/app/shared/loose-components.module.ts @@ -80,7 +80,6 @@ import { CollectionsComponent } from "../vault/individual-vault/collections.comp import { FolderAddEditComponent } from "../vault/individual-vault/folder-add-edit.component"; import { OrganizationBadgeModule } from "../vault/individual-vault/organization-badge/organization-badge.module"; import { PipesModule } from "../vault/individual-vault/pipes/pipes.module"; -import { ShareComponent } from "../vault/individual-vault/share.component"; import { AddEditComponent as OrgAddEditComponent } from "../vault/org-vault/add-edit.component"; import { AttachmentsComponent as OrgAttachmentsComponent } from "../vault/org-vault/attachments.component"; import { CollectionsComponent as OrgCollectionsComponent } from "../vault/org-vault/collections.component"; @@ -164,7 +163,6 @@ import { SharedModule } from "./shared.module"; SelectableAvatarComponent, SendAddEditComponent, SetPasswordComponent, - ShareComponent, SponsoredFamiliesComponent, SponsoringOrgRowComponent, SsoComponent, @@ -236,7 +234,6 @@ import { SharedModule } from "./shared.module"; SelectableAvatarComponent, SendAddEditComponent, SetPasswordComponent, - ShareComponent, SponsoredFamiliesComponent, SponsoringOrgRowComponent, SsoComponent, diff --git a/apps/web/src/app/vault/individual-vault/share.component.html b/apps/web/src/app/vault/individual-vault/share.component.html deleted file mode 100644 index 77fe2f0ef8..0000000000 --- a/apps/web/src/app/vault/individual-vault/share.component.html +++ /dev/null @@ -1,101 +0,0 @@ - diff --git a/apps/web/src/app/vault/individual-vault/share.component.ts b/apps/web/src/app/vault/individual-vault/share.component.ts deleted file mode 100644 index e6f55f8846..0000000000 --- a/apps/web/src/app/vault/individual-vault/share.component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Component, OnDestroy } from "@angular/core"; - -import { CollectionService, CollectionView } from "@bitwarden/admin-console/common"; -import { ShareComponent as BaseShareComponent } from "@bitwarden/angular/components/share.component"; -import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; -import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; - -@Component({ - selector: "app-vault-share", - templateUrl: "share.component.html", -}) -export class ShareComponent extends BaseShareComponent implements OnDestroy { - constructor( - collectionService: CollectionService, - platformUtilsService: PlatformUtilsService, - i18nService: I18nService, - cipherService: CipherService, - organizationService: OrganizationService, - logService: LogService, - accountService: AccountService, - ) { - super( - collectionService, - platformUtilsService, - i18nService, - cipherService, - logService, - organizationService, - accountService, - ); - } - - ngOnDestroy() { - this.selectAll(false); - } - - check(c: CollectionView, select?: boolean) { - (c as any).checked = select == null ? !(c as any).checked : select; - } - - selectAll(select: boolean) { - const collections = select ? this.collections : this.writeableCollections; - collections.forEach((c) => this.check(c, select)); - } -}