From 2b3faca86b5d9f5c2740c8637bb1088ae5d86db0 Mon Sep 17 00:00:00 2001 From: Todd Martin <106564991+trmartin4@users.noreply.github.com> Date: Thu, 7 Dec 2023 14:11:05 -0500 Subject: [PATCH] Move PasswordStrengthComponent to Tools (#7125) * Moved password-strength component to Tools * Move zxcvbn into Tools ownership zxcvbn is the library currently used to calculate the password-strength --------- Co-authored-by: Daniel James Smith --- .github/renovate.json | 5 +++-- .../members/components/reset-password.component.ts | 2 +- .../angular/src/auth/components/change-password.component.ts | 2 +- libs/angular/src/auth/components/register.component.ts | 2 +- libs/angular/src/jslib.module.ts | 2 +- libs/angular/src/tools/export/components/export.component.ts | 2 +- .../password-strength/password-strength.component.html | 0 .../password-strength/password-strength.component.ts | 0 8 files changed, 8 insertions(+), 7 deletions(-) rename libs/angular/src/{shared/components => tools}/password-strength/password-strength.component.html (100%) rename libs/angular/src/{shared/components => tools}/password-strength/password-strength.component.ts (100%) diff --git a/.github/renovate.json b/.github/renovate.json index c343f40e35..ae86a4c5c0 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -79,7 +79,6 @@ "matchPackageNames": [ "@types/duo_web_sdk", "@types/node-ipc", - "@types/zxcvbn", "duo_web_sdk", "node-ipc", "qrious", @@ -215,6 +214,7 @@ "@microsoft/signalr-protocol-msgpack", "@types/jsdom", "@types/papaparse", + "@types/zxcvbn", "electron", "electron-builder", "electron-log", @@ -225,7 +225,8 @@ "jszip", "oidc-client-ts", "papaparse", - "utf-8-validate" + "utf-8-validate", + "zxcvbn" ], "description": "Tools owned dependencies", "commitMessagePrefix": "[deps] Tools:", diff --git a/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts b/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts index efaa1720f1..28456b854e 100644 --- a/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts +++ b/apps/web/src/app/admin-console/organizations/members/components/reset-password.component.ts @@ -10,7 +10,7 @@ import { import { Subject, takeUntil } from "rxjs"; import zxcvbn from "zxcvbn"; -import { PasswordStrengthComponent } from "@bitwarden/angular/shared/components/password-strength/password-strength.component"; +import { PasswordStrengthComponent } from "@bitwarden/angular/tools/password-strength/password-strength.component"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; diff --git a/libs/angular/src/auth/components/change-password.component.ts b/libs/angular/src/auth/components/change-password.component.ts index f03618ff3e..71360537bc 100644 --- a/libs/angular/src/auth/components/change-password.component.ts +++ b/libs/angular/src/auth/components/change-password.component.ts @@ -16,7 +16,7 @@ import { MasterKey, UserKey } from "@bitwarden/common/platform/models/domain/sym import { PasswordGenerationServiceAbstraction } from "@bitwarden/common/tools/generator/password"; import { DialogService } from "@bitwarden/components"; -import { PasswordColorText } from "../../shared/components/password-strength/password-strength.component"; +import { PasswordColorText } from "../../tools/password-strength/password-strength.component"; @Directive() export class ChangePasswordComponent implements OnInit, OnDestroy { diff --git a/libs/angular/src/auth/components/register.component.ts b/libs/angular/src/auth/components/register.component.ts index aa19403e80..f7c0a76509 100644 --- a/libs/angular/src/auth/components/register.component.ts +++ b/libs/angular/src/auth/components/register.component.ts @@ -25,7 +25,7 @@ import { AllValidationErrors, FormValidationErrorsService, } from "../../platform/abstractions/form-validation-errors.service"; -import { PasswordColorText } from "../../shared/components/password-strength/password-strength.component"; +import { PasswordColorText } from "../../tools/password-strength/password-strength.component"; import { InputsFieldMatch } from "../validators/inputs-field-match.validator"; import { CaptchaProtectedComponent } from "./captcha-protected.component"; diff --git a/libs/angular/src/jslib.module.ts b/libs/angular/src/jslib.module.ts index 649dacf24b..b585591aa6 100644 --- a/libs/angular/src/jslib.module.ts +++ b/libs/angular/src/jslib.module.ts @@ -28,8 +28,8 @@ import { UserTypePipe } from "./pipes/user-type.pipe"; import { EllipsisPipe } from "./platform/pipes/ellipsis.pipe"; import { FingerprintPipe } from "./platform/pipes/fingerprint.pipe"; import { I18nPipe } from "./platform/pipes/i18n.pipe"; -import { PasswordStrengthComponent } from "./shared/components/password-strength/password-strength.component"; import { ExportScopeCalloutComponent } from "./tools/export/components/export-scope-callout.component"; +import { PasswordStrengthComponent } from "./tools/password-strength/password-strength.component"; import { IconComponent } from "./vault/components/icon.component"; @NgModule({ diff --git a/libs/angular/src/tools/export/components/export.component.ts b/libs/angular/src/tools/export/components/export.component.ts index 7af3de5d98..78d0f605e1 100644 --- a/libs/angular/src/tools/export/components/export.component.ts +++ b/libs/angular/src/tools/export/components/export.component.ts @@ -16,7 +16,7 @@ import { EncryptedExportType } from "@bitwarden/common/tools/enums/encrypted-exp import { DialogService } from "@bitwarden/components"; import { VaultExportServiceAbstraction } from "@bitwarden/exporter/vault-export"; -import { PasswordStrengthComponent } from "../../../shared/components/password-strength/password-strength.component"; +import { PasswordStrengthComponent } from "../../password-strength/password-strength.component"; @Directive() export class ExportComponent implements OnInit, OnDestroy { diff --git a/libs/angular/src/shared/components/password-strength/password-strength.component.html b/libs/angular/src/tools/password-strength/password-strength.component.html similarity index 100% rename from libs/angular/src/shared/components/password-strength/password-strength.component.html rename to libs/angular/src/tools/password-strength/password-strength.component.html diff --git a/libs/angular/src/shared/components/password-strength/password-strength.component.ts b/libs/angular/src/tools/password-strength/password-strength.component.ts similarity index 100% rename from libs/angular/src/shared/components/password-strength/password-strength.component.ts rename to libs/angular/src/tools/password-strength/password-strength.component.ts