From 85e71bc297d0c61867c44ee4f6a843271d511a8c Mon Sep 17 00:00:00 2001 From: Cesar Gonzalez Date: Fri, 3 May 2024 11:13:32 -0500 Subject: [PATCH] [PM-5189] Reworking project structure to ensure we can better differentiate the inline menu feature from other features --- .../src/autofill/content/autofill-init.spec.ts | 2 +- apps/browser/src/autofill/content/autofill-init.ts | 2 +- .../autofill/content/bootstrap-autofill-overlay.ts | 2 +- .../abstractions/autofill-overlay-button.ts | 0 .../autofill-overlay-iframe.service.ts | 0 .../autofill-overlay-inline-menu-elements.ts | 2 +- .../abstractions/autofill-overlay-list.ts | 2 +- .../autofill-overlay-menu-container.ts | 2 +- .../abstractions/autofill-overlay-page-element.ts | 0 .../autofill-overlay-inline-menu-elements.ts | 6 +++--- .../autofill-overlay-iframe.service.spec.ts.snap | 0 .../autofill-overlay-button-iframe.spec.ts | 0 .../autofill-overlay-button-iframe.ts | 2 +- .../autofill-overlay-iframe-element.spec.ts | 2 +- .../autofill-overlay-iframe-element.ts | 0 .../autofill-overlay-iframe.service.spec.ts | 6 +++--- .../autofill-overlay-iframe.service.ts | 2 +- .../autofill-overlay-list-iframe.spec.ts | 0 .../iframe-content/autofill-overlay-list-iframe.ts | 2 +- .../autofill-overlay-button.spec.ts.snap | 0 .../pages/button/autofill-overlay-button.spec.ts | 4 ++-- .../pages/button/autofill-overlay-button.ts | 4 ++-- .../button/bootstrap-autofill-overlay-button.ts | 2 +- .../{ => inline-menu}/pages/button/button.html | 0 .../{ => inline-menu}/pages/button/button.scss | 2 +- .../autofill-overlay-list.spec.ts.snap | 0 .../pages/list/autofill-overlay-list.spec.ts | 4 ++-- .../pages/list/autofill-overlay-list.ts | 6 +++--- .../pages/list/bootstrap-autofill-overlay-list.ts | 2 +- .../overlay/{ => inline-menu}/pages/list/list.html | 0 .../overlay/{ => inline-menu}/pages/list/list.scss | 8 ++++---- .../pages/menu/autofill-overlay-menu-container.ts | 2 +- .../bootstrap-autofill-overlay-menu-container.ts | 0 .../overlay/{ => inline-menu}/pages/menu/menu.html | 0 .../pages/shared/autofill-overlay-page-element.ts | 2 +- .../services/dom-element-visibility.service.ts | 2 +- apps/browser/src/autofill/spec/autofill-mocks.ts | 4 ++-- apps/browser/webpack.config.js | 14 ++++++++------ 38 files changed, 45 insertions(+), 43 deletions(-) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-button.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-iframe.service.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-inline-menu-elements.ts (87%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-list.ts (91%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-menu-container.ts (89%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/abstractions/autofill-overlay-page-element.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/content/autofill-overlay-inline-menu-elements.ts (98%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/__snapshots__/autofill-overlay-iframe.service.spec.ts.snap (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-button-iframe.spec.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-button-iframe.ts (86%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-iframe-element.spec.ts (94%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-iframe-element.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-iframe.service.spec.ts (98%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-iframe.service.ts (99%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-list-iframe.spec.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/iframe-content/autofill-overlay-list-iframe.ts (89%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/__snapshots__/autofill-overlay-button.spec.ts.snap (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/autofill-overlay-button.spec.ts (97%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/autofill-overlay-button.ts (97%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/bootstrap-autofill-overlay-button.ts (71%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/button.html (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/button/button.scss (91%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/__snapshots__/autofill-overlay-list.spec.ts.snap (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/autofill-overlay-list.spec.ts (99%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/autofill-overlay-list.ts (99%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/bootstrap-autofill-overlay-list.ts (70%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/list.html (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/list/list.scss (95%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/menu/autofill-overlay-menu-container.ts (98%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/menu/bootstrap-autofill-overlay-menu-container.ts (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/menu/menu.html (100%) rename apps/browser/src/autofill/overlay/{ => inline-menu}/pages/shared/autofill-overlay-page-element.ts (98%) diff --git a/apps/browser/src/autofill/content/autofill-init.spec.ts b/apps/browser/src/autofill/content/autofill-init.spec.ts index c9ef1d6a10c..3cdb8fffae3 100644 --- a/apps/browser/src/autofill/content/autofill-init.spec.ts +++ b/apps/browser/src/autofill/content/autofill-init.spec.ts @@ -2,7 +2,7 @@ import { mock, MockProxy } from "jest-mock-extended"; import AutofillPageDetails from "../models/autofill-page-details"; import AutofillScript from "../models/autofill-script"; -import { AutofillOverlayInlineMenuElements } from "../overlay/content/autofill-overlay-inline-menu-elements"; +import { AutofillOverlayInlineMenuElements } from "../overlay/inline-menu/content/autofill-overlay-inline-menu-elements"; import AutofillOverlayContentService from "../services/autofill-overlay-content.service"; import { flushPromises, sendMockExtensionMessage } from "../spec/testing-utils"; diff --git a/apps/browser/src/autofill/content/autofill-init.ts b/apps/browser/src/autofill/content/autofill-init.ts index 048173a6cb2..aaed588d7b9 100644 --- a/apps/browser/src/autofill/content/autofill-init.ts +++ b/apps/browser/src/autofill/content/autofill-init.ts @@ -1,7 +1,7 @@ import { EVENTS } from "@bitwarden/common/autofill/constants"; import AutofillPageDetails from "../models/autofill-page-details"; -import { AutofillOverlayInlineMenuElements } from "../overlay/abstractions/autofill-overlay-inline-menu-elements"; +import { AutofillOverlayInlineMenuElements } from "../overlay/inline-menu/abstractions/autofill-overlay-inline-menu-elements"; import { AutofillOverlayContentService } from "../services/abstractions/autofill-overlay-content.service"; import CollectAutofillContentService from "../services/collect-autofill-content.service"; import DomElementVisibilityService from "../services/dom-element-visibility.service"; diff --git a/apps/browser/src/autofill/content/bootstrap-autofill-overlay.ts b/apps/browser/src/autofill/content/bootstrap-autofill-overlay.ts index 32eca6c610a..b2df8ce2e53 100644 --- a/apps/browser/src/autofill/content/bootstrap-autofill-overlay.ts +++ b/apps/browser/src/autofill/content/bootstrap-autofill-overlay.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayInlineMenuElements } from "../overlay/content/autofill-overlay-inline-menu-elements"; +import { AutofillOverlayInlineMenuElements } from "../overlay/inline-menu/content/autofill-overlay-inline-menu-elements"; import AutofillOverlayContentService from "../services/autofill-overlay-content.service"; import { setupAutofillInitDisconnectAction } from "../utils"; diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-button.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-button.ts similarity index 100% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-button.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-button.ts diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-iframe.service.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-iframe.service.ts similarity index 100% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-iframe.service.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-iframe.service.ts diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-inline-menu-elements.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-inline-menu-elements.ts similarity index 87% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-inline-menu-elements.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-inline-menu-elements.ts index 60ae1becf01..9be09d11e58 100644 --- a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-inline-menu-elements.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-inline-menu-elements.ts @@ -1,4 +1,4 @@ -import { AutofillExtensionMessageParam } from "../../content/abstractions/autofill-init"; +import { AutofillExtensionMessageParam } from "../../../content/abstractions/autofill-init"; export type InlineMenuExtensionMessageHandlers = { [key: string]: CallableFunction; diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-list.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-list.ts similarity index 91% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-list.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-list.ts index 137deb19f5f..0d01e702b1a 100644 --- a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-list.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-list.ts @@ -1,6 +1,6 @@ import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { OverlayCipherData } from "../../background/abstractions/overlay.background"; +import { OverlayCipherData } from "../../../background/abstractions/overlay.background"; type OverlayListMessage = { command: string }; diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-menu-container.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-menu-container.ts similarity index 89% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-menu-container.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-menu-container.ts index 8872f73a9d5..986ccc7a6f0 100644 --- a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-menu-container.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-menu-container.ts @@ -1,6 +1,6 @@ import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { OverlayCipherData } from "../../background/abstractions/overlay.background"; +import { OverlayCipherData } from "../../../background/abstractions/overlay.background"; type AutofillOverlayMenuContainerMessage = { command: string; diff --git a/apps/browser/src/autofill/overlay/abstractions/autofill-overlay-page-element.ts b/apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-page-element.ts similarity index 100% rename from apps/browser/src/autofill/overlay/abstractions/autofill-overlay-page-element.ts rename to apps/browser/src/autofill/overlay/inline-menu/abstractions/autofill-overlay-page-element.ts diff --git a/apps/browser/src/autofill/overlay/content/autofill-overlay-inline-menu-elements.ts b/apps/browser/src/autofill/overlay/inline-menu/content/autofill-overlay-inline-menu-elements.ts similarity index 98% rename from apps/browser/src/autofill/overlay/content/autofill-overlay-inline-menu-elements.ts rename to apps/browser/src/autofill/overlay/inline-menu/content/autofill-overlay-inline-menu-elements.ts index 8a7599d1c20..721c3778727 100644 --- a/apps/browser/src/autofill/overlay/content/autofill-overlay-inline-menu-elements.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/content/autofill-overlay-inline-menu-elements.ts @@ -1,10 +1,10 @@ -import { AutofillExtensionMessage } from "../../content/abstractions/autofill-init"; -import { AutofillOverlayElement } from "../../enums/autofill-overlay.enum"; +import { AutofillExtensionMessage } from "../../../content/abstractions/autofill-init"; +import { AutofillOverlayElement } from "../../../enums/autofill-overlay.enum"; import { sendExtensionMessage, generateRandomCustomElementName, setElementStyles, -} from "../../utils"; +} from "../../../utils"; import { InlineMenuExtensionMessageHandlers, AutofillOverlayInlineMenuElements as InlineMenuElementsInterface, diff --git a/apps/browser/src/autofill/overlay/iframe-content/__snapshots__/autofill-overlay-iframe.service.spec.ts.snap b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/__snapshots__/autofill-overlay-iframe.service.spec.ts.snap similarity index 100% rename from apps/browser/src/autofill/overlay/iframe-content/__snapshots__/autofill-overlay-iframe.service.spec.ts.snap rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/__snapshots__/autofill-overlay-iframe.service.spec.ts.snap diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-button-iframe.spec.ts similarity index 100% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-button-iframe.spec.ts diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-button-iframe.ts similarity index 86% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-button-iframe.ts index 3fd28e7a02b..2c8d6e2c8e6 100644 --- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-button-iframe.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayPort } from "../../enums/autofill-overlay.enum"; +import { AutofillOverlayPort } from "../../../enums/autofill-overlay.enum"; import AutofillOverlayIframeElement from "./autofill-overlay-iframe-element"; diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe-element.spec.ts similarity index 94% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe-element.spec.ts index 3aaf6e36b84..174b1f22f99 100644 --- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.spec.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe-element.spec.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayPort } from "../../enums/autofill-overlay.enum"; +import { AutofillOverlayPort } from "../../../enums/autofill-overlay.enum"; import AutofillOverlayIframeElement from "./autofill-overlay-iframe-element"; import AutofillOverlayIframeService from "./autofill-overlay-iframe.service"; diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe-element.ts similarity index 100% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe-element.ts diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.spec.ts similarity index 98% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.spec.ts index 9381833dcd2..a213e448133 100644 --- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.spec.ts @@ -3,13 +3,13 @@ import { mock } from "jest-mock-extended"; import { EVENTS } from "@bitwarden/common/autofill/constants"; import { ThemeType } from "@bitwarden/common/platform/enums"; -import { AutofillOverlayPort } from "../../enums/autofill-overlay.enum"; -import { createPortSpyMock } from "../../spec/autofill-mocks"; +import { AutofillOverlayPort } from "../../../enums/autofill-overlay.enum"; +import { createPortSpyMock } from "../../../spec/autofill-mocks"; import { flushPromises, sendPortMessage, triggerPortOnDisconnectEvent, -} from "../../spec/testing-utils"; +} from "../../../spec/testing-utils"; import AutofillOverlayIframeService from "./autofill-overlay-iframe.service"; diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.ts similarity index 99% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.ts index 3965969ae03..2cbd1fe7f35 100644 --- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-iframe.service.ts @@ -1,7 +1,7 @@ import { EVENTS } from "@bitwarden/common/autofill/constants"; import { ThemeType } from "@bitwarden/common/platform/enums"; -import { sendExtensionMessage, setElementStyles } from "../../utils"; +import { sendExtensionMessage, setElementStyles } from "../../../utils"; import { BackgroundPortMessageHandlers, AutofillOverlayIframeService as AutofillOverlayIframeServiceInterface, diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-list-iframe.spec.ts similarity index 100% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-list-iframe.spec.ts diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-list-iframe.ts similarity index 89% rename from apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts rename to apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-list-iframe.ts index d73cc9e18ec..2ffb7f6d523 100644 --- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/iframe-content/autofill-overlay-list-iframe.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayPort } from "../../enums/autofill-overlay.enum"; +import { AutofillOverlayPort } from "../../../enums/autofill-overlay.enum"; import AutofillOverlayIframeElement from "./autofill-overlay-iframe-element"; diff --git a/apps/browser/src/autofill/overlay/pages/button/__snapshots__/autofill-overlay-button.spec.ts.snap b/apps/browser/src/autofill/overlay/inline-menu/pages/button/__snapshots__/autofill-overlay-button.spec.ts.snap similarity index 100% rename from apps/browser/src/autofill/overlay/pages/button/__snapshots__/autofill-overlay-button.spec.ts.snap rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/__snapshots__/autofill-overlay-button.spec.ts.snap diff --git a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.spec.ts similarity index 97% rename from apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.spec.ts index becda8a336e..b5dbadd612e 100644 --- a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.spec.ts @@ -1,7 +1,7 @@ import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { createInitAutofillOverlayButtonMessageMock } from "../../../spec/autofill-mocks"; -import { flushPromises, postWindowMessage } from "../../../spec/testing-utils"; +import { createInitAutofillOverlayButtonMessageMock } from "../../../../spec/autofill-mocks"; +import { flushPromises, postWindowMessage } from "../../../../spec/testing-utils"; import AutofillOverlayButton from "./autofill-overlay-button"; diff --git a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.ts similarity index 97% rename from apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.ts index 68cedb8a6de..1445e02a035 100644 --- a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/button/autofill-overlay-button.ts @@ -3,8 +3,8 @@ import "lit/polyfill-support.js"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { EVENTS } from "@bitwarden/common/autofill/constants"; -import { buildSvgDomElement } from "../../../utils"; -import { logoIcon, logoLockedIcon } from "../../../utils/svg-icons"; +import { buildSvgDomElement } from "../../../../utils"; +import { logoIcon, logoLockedIcon } from "../../../../utils/svg-icons"; import { InitAutofillOverlayButtonMessage, OverlayButtonMessage, diff --git a/apps/browser/src/autofill/overlay/pages/button/bootstrap-autofill-overlay-button.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/button/bootstrap-autofill-overlay-button.ts similarity index 71% rename from apps/browser/src/autofill/overlay/pages/button/bootstrap-autofill-overlay-button.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/bootstrap-autofill-overlay-button.ts index 507073892c8..d47f7d72ee3 100644 --- a/apps/browser/src/autofill/overlay/pages/button/bootstrap-autofill-overlay-button.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/button/bootstrap-autofill-overlay-button.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayElement } from "../../../enums/autofill-overlay.enum"; +import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"; import AutofillOverlayButton from "./autofill-overlay-button"; diff --git a/apps/browser/src/autofill/overlay/pages/button/button.html b/apps/browser/src/autofill/overlay/inline-menu/pages/button/button.html similarity index 100% rename from apps/browser/src/autofill/overlay/pages/button/button.html rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/button.html diff --git a/apps/browser/src/autofill/overlay/pages/button/button.scss b/apps/browser/src/autofill/overlay/inline-menu/pages/button/button.scss similarity index 91% rename from apps/browser/src/autofill/overlay/pages/button/button.scss rename to apps/browser/src/autofill/overlay/inline-menu/pages/button/button.scss index 79a48583a99..507442c07dc 100644 --- a/apps/browser/src/autofill/overlay/pages/button/button.scss +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/button/button.scss @@ -1,4 +1,4 @@ -@import "../../../shared/styles/variables"; +@import "../../../../shared/styles/variables"; * { box-sizing: border-box; diff --git a/apps/browser/src/autofill/overlay/pages/list/__snapshots__/autofill-overlay-list.spec.ts.snap b/apps/browser/src/autofill/overlay/inline-menu/pages/list/__snapshots__/autofill-overlay-list.spec.ts.snap similarity index 100% rename from apps/browser/src/autofill/overlay/pages/list/__snapshots__/autofill-overlay-list.spec.ts.snap rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/__snapshots__/autofill-overlay-list.spec.ts.snap diff --git a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.spec.ts similarity index 99% rename from apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.spec.ts index 331e4e85a25..82f7d7c6419 100644 --- a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.spec.ts @@ -2,8 +2,8 @@ import { mock } from "jest-mock-extended"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { createInitAutofillOverlayListMessageMock } from "../../../spec/autofill-mocks"; -import { flushPromises, postWindowMessage } from "../../../spec/testing-utils"; +import { createInitAutofillOverlayListMessageMock } from "../../../../spec/autofill-mocks"; +import { flushPromises, postWindowMessage } from "../../../../spec/testing-utils"; import AutofillOverlayList from "./autofill-overlay-list"; diff --git a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.ts similarity index 99% rename from apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.ts index 3a44ccecf58..4835d54d1b1 100644 --- a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/autofill-overlay-list.ts @@ -3,9 +3,9 @@ import "lit/polyfill-support.js"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; import { EVENTS } from "@bitwarden/common/autofill/constants"; -import { OverlayCipherData } from "../../../background/abstractions/overlay.background"; -import { buildSvgDomElement } from "../../../utils"; -import { globeIcon, lockIcon, plusIcon, viewCipherIcon } from "../../../utils/svg-icons"; +import { OverlayCipherData } from "../../../../background/abstractions/overlay.background"; +import { buildSvgDomElement } from "../../../../utils"; +import { globeIcon, lockIcon, plusIcon, viewCipherIcon } from "../../../../utils/svg-icons"; import { InitAutofillOverlayListMessage, OverlayListWindowMessageHandlers, diff --git a/apps/browser/src/autofill/overlay/pages/list/bootstrap-autofill-overlay-list.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/list/bootstrap-autofill-overlay-list.ts similarity index 70% rename from apps/browser/src/autofill/overlay/pages/list/bootstrap-autofill-overlay-list.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/bootstrap-autofill-overlay-list.ts index f02e4d57627..eacce2b6ede 100644 --- a/apps/browser/src/autofill/overlay/pages/list/bootstrap-autofill-overlay-list.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/bootstrap-autofill-overlay-list.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayElement } from "../../../enums/autofill-overlay.enum"; +import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"; import AutofillOverlayList from "./autofill-overlay-list"; diff --git a/apps/browser/src/autofill/overlay/pages/list/list.html b/apps/browser/src/autofill/overlay/inline-menu/pages/list/list.html similarity index 100% rename from apps/browser/src/autofill/overlay/pages/list/list.html rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/list.html diff --git a/apps/browser/src/autofill/overlay/pages/list/list.scss b/apps/browser/src/autofill/overlay/inline-menu/pages/list/list.scss similarity index 95% rename from apps/browser/src/autofill/overlay/pages/list/list.scss rename to apps/browser/src/autofill/overlay/inline-menu/pages/list/list.scss index 1713350718b..4d70bcb9d67 100644 --- a/apps/browser/src/autofill/overlay/pages/list/list.scss +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/list/list.scss @@ -1,7 +1,7 @@ -@import "../../../../../../../libs/angular/src/scss/webfonts.css"; -@import "../../../../../../../libs/angular/src/scss/bwicons/styles/style"; -@import "../../../shared/styles/variables"; -@import "../../../../../../../libs/angular/src/scss/icons"; +@import "../../../../../../../../libs/angular/src/scss/webfonts.css"; +@import "../../../../../../../../libs/angular/src/scss/bwicons/styles/style"; +@import "../../../../shared/styles/variables"; +@import "../../../../../../../../libs/angular/src/scss/icons"; * { box-sizing: border-box; diff --git a/apps/browser/src/autofill/overlay/pages/menu/autofill-overlay-menu-container.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/menu/autofill-overlay-menu-container.ts similarity index 98% rename from apps/browser/src/autofill/overlay/pages/menu/autofill-overlay-menu-container.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/menu/autofill-overlay-menu-container.ts index 41ec1744441..9593571ec6c 100644 --- a/apps/browser/src/autofill/overlay/pages/menu/autofill-overlay-menu-container.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/menu/autofill-overlay-menu-container.ts @@ -1,6 +1,6 @@ import { EVENTS } from "@bitwarden/common/autofill/constants"; -import { setElementStyles } from "../../../utils"; +import { setElementStyles } from "../../../../utils"; import { InitOverlayElementMessage, AutofillOverlayMenuContainerWindowMessageHandlers, diff --git a/apps/browser/src/autofill/overlay/pages/menu/bootstrap-autofill-overlay-menu-container.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/menu/bootstrap-autofill-overlay-menu-container.ts similarity index 100% rename from apps/browser/src/autofill/overlay/pages/menu/bootstrap-autofill-overlay-menu-container.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/menu/bootstrap-autofill-overlay-menu-container.ts diff --git a/apps/browser/src/autofill/overlay/pages/menu/menu.html b/apps/browser/src/autofill/overlay/inline-menu/pages/menu/menu.html similarity index 100% rename from apps/browser/src/autofill/overlay/pages/menu/menu.html rename to apps/browser/src/autofill/overlay/inline-menu/pages/menu/menu.html diff --git a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts b/apps/browser/src/autofill/overlay/inline-menu/pages/shared/autofill-overlay-page-element.ts similarity index 98% rename from apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts rename to apps/browser/src/autofill/overlay/inline-menu/pages/shared/autofill-overlay-page-element.ts index 9011ffa241d..c9c19e41c4a 100644 --- a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts +++ b/apps/browser/src/autofill/overlay/inline-menu/pages/shared/autofill-overlay-page-element.ts @@ -1,6 +1,6 @@ import { EVENTS } from "@bitwarden/common/autofill/constants"; -import { RedirectFocusDirection } from "../../../enums/autofill-overlay.enum"; +import { RedirectFocusDirection } from "../../../../enums/autofill-overlay.enum"; import { AutofillOverlayPageElementWindowMessage, AutofillOverlayPageElementWindowMessageHandlers, diff --git a/apps/browser/src/autofill/services/dom-element-visibility.service.ts b/apps/browser/src/autofill/services/dom-element-visibility.service.ts index b1990b39d9e..8ffa74e1c20 100644 --- a/apps/browser/src/autofill/services/dom-element-visibility.service.ts +++ b/apps/browser/src/autofill/services/dom-element-visibility.service.ts @@ -1,4 +1,4 @@ -import { AutofillOverlayInlineMenuElements } from "../overlay/abstractions/autofill-overlay-inline-menu-elements"; +import { AutofillOverlayInlineMenuElements } from "../overlay/inline-menu/abstractions/autofill-overlay-inline-menu-elements"; import { FillableFormFieldElement, FormFieldElement } from "../types"; import { DomElementVisibilityService as domElementVisibilityServiceInterface } from "./abstractions/dom-element-visibility.service"; diff --git a/apps/browser/src/autofill/spec/autofill-mocks.ts b/apps/browser/src/autofill/spec/autofill-mocks.ts index fdcf6bad812..32924f15be7 100644 --- a/apps/browser/src/autofill/spec/autofill-mocks.ts +++ b/apps/browser/src/autofill/spec/autofill-mocks.ts @@ -12,8 +12,8 @@ import AutofillField from "../models/autofill-field"; import AutofillForm from "../models/autofill-form"; import AutofillPageDetails from "../models/autofill-page-details"; import AutofillScript, { FillScript } from "../models/autofill-script"; -import { InitAutofillOverlayButtonMessage } from "../overlay/abstractions/autofill-overlay-button"; -import { InitAutofillOverlayListMessage } from "../overlay/abstractions/autofill-overlay-list"; +import { InitAutofillOverlayButtonMessage } from "../overlay/inline-menu/abstractions/autofill-overlay-button"; +import { InitAutofillOverlayListMessage } from "../overlay/inline-menu/abstractions/autofill-overlay-list"; import { GenerateFillScriptOptions, PageDetail } from "../services/abstractions/autofill.service"; function createAutofillFormMock(customFields = {}): AutofillForm { diff --git a/apps/browser/webpack.config.js b/apps/browser/webpack.config.js index 8cc5d278b91..298c295facc 100644 --- a/apps/browser/webpack.config.js +++ b/apps/browser/webpack.config.js @@ -107,17 +107,17 @@ const plugins = [ chunks: ["notification/bar"], }), new HtmlWebpackPlugin({ - template: "./src/autofill/overlay/pages/button/button.html", + template: "./src/autofill/overlay/inline-menu/pages/button/button.html", filename: "overlay/button.html", chunks: ["overlay/button"], }), new HtmlWebpackPlugin({ - template: "./src/autofill/overlay/pages/list/list.html", + template: "./src/autofill/overlay/inline-menu/pages/list/list.html", filename: "overlay/list.html", chunks: ["overlay/list"], }), new HtmlWebpackPlugin({ - template: "./src/autofill/overlay/pages/menu/menu.html", + template: "./src/autofill/overlay/inline-menu/pages/menu/menu.html", filename: "overlay/menu.html", chunks: ["overlay/menu"], }), @@ -174,10 +174,12 @@ const mainConfig = { "content/fido2/content-script": "./src/vault/fido2/content/content-script.ts", "content/fido2/page-script": "./src/vault/fido2/content/page-script.ts", "notification/bar": "./src/autofill/notification/bar.ts", - "overlay/button": "./src/autofill/overlay/pages/button/bootstrap-autofill-overlay-button.ts", - "overlay/list": "./src/autofill/overlay/pages/list/bootstrap-autofill-overlay-list.ts", + "overlay/button": + "./src/autofill/overlay/inline-menu/pages/button/bootstrap-autofill-overlay-button.ts", + "overlay/list": + "./src/autofill/overlay/inline-menu/pages/list/bootstrap-autofill-overlay-list.ts", "overlay/menu": - "./src/autofill/overlay/pages/menu/bootstrap-autofill-overlay-menu-container.ts", + "./src/autofill/overlay/inline-menu/pages/menu/bootstrap-autofill-overlay-menu-container.ts", "encrypt-worker": "../../libs/common/src/platform/services/cryptography/encrypt.worker.ts", "content/lp-fileless-importer": "./src/tools/content/lp-fileless-importer.ts", "content/send-on-installed-message": "./src/vault/content/send-on-installed-message.ts",