diff --git a/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts b/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts index d7ab6a6f61..e3edb41de7 100644 --- a/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts +++ b/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts @@ -9,9 +9,11 @@ import { Organization } from "@bitwarden/common/admin-console/models/domain/orga import { IntegrationType } from "@bitwarden/common/enums"; import { HeaderModule } from "../../../layouts/header/header.module"; -import { FilterIntegrationsPipe, IntegrationGridComponent, Integration } from "../../../shared/"; import { SharedModule } from "../../../shared/shared.module"; import { SharedOrganizationModule } from "../shared"; +import { IntegrationGridComponent } from "../shared/components/integrations/integration-grid/integration-grid.component"; +import { FilterIntegrationsPipe } from "../shared/components/integrations/integrations.pipe"; +import { Integration } from "../shared/components/integrations/models"; @Component({ selector: "ac-integrations", diff --git a/apps/web/src/app/admin-console/organizations/shared/components/integrations/index.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/index.ts new file mode 100644 index 0000000000..c8fe9d3265 --- /dev/null +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/index.ts @@ -0,0 +1,4 @@ +export * from "./integrations.pipe"; +export * from "./integration-card/integration-card.component"; +export * from "./integration-grid/integration-grid.component"; +export * from "./models"; diff --git a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.html b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.html similarity index 100% rename from apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.html rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.html diff --git a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.spec.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.spec.ts similarity index 100% rename from apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.spec.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.spec.ts diff --git a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts similarity index 97% rename from apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts index 5e47c1e0b3..681b93413e 100644 --- a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts @@ -15,7 +15,7 @@ import { SYSTEM_THEME_OBSERVABLE } from "@bitwarden/angular/services/injection-t import { ThemeType } from "@bitwarden/common/platform/enums"; import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service"; -import { SharedModule } from "../../../shared.module"; +import { SharedModule } from "../../../../../../shared/shared.module"; @Component({ selector: "app-integration-card", diff --git a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.stories.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.stories.ts similarity index 74% rename from apps/web/src/app/shared/components/integrations/integration-card/integration-card.stories.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.stories.ts index 1d1e229740..256bfd3d82 100644 --- a/apps/web/src/app/shared/components/integrations/integration-card/integration-card.stories.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.stories.ts @@ -1,13 +1,12 @@ -import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; +import { importProvidersFrom } from "@angular/core"; +import { Meta, StoryObj, applicationConfig, moduleMetadata } from "@storybook/angular"; import { of } from "rxjs"; import { SYSTEM_THEME_OBSERVABLE } from "@bitwarden/angular/services/injection-tokens"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ThemeTypes } from "@bitwarden/common/platform/enums"; import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service"; -import { I18nMockService } from "@bitwarden/components"; -import { SharedModule } from "../../../shared.module"; +import { PreloadedEnglishI18nModule } from "../../../../../../core/tests"; import { IntegrationCardComponent } from "./integration-card.component"; @@ -17,15 +16,11 @@ export default { title: "Web/Integration Layout/Integration Card", component: IntegrationCardComponent, decorators: [ + applicationConfig({ + providers: [importProvidersFrom(PreloadedEnglishI18nModule)], + }), moduleMetadata({ - imports: [SharedModule], providers: [ - { - provide: I18nService, - useFactory: () => { - return new I18nMockService({}); - }, - }, { provide: ThemeStateService, useClass: MockThemeService, diff --git a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.html b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.html similarity index 100% rename from apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.html rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.html diff --git a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.spec.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.spec.ts similarity index 100% rename from apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.spec.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.spec.ts diff --git a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts similarity index 91% rename from apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts index 1ec3f0d8d4..2e3158f989 100644 --- a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts @@ -4,7 +4,7 @@ import { Component, Input } from "@angular/core"; import { IntegrationType } from "@bitwarden/common/enums"; -import { SharedModule } from "../../../shared.module"; +import { SharedModule } from "../../../../../../shared/shared.module"; import { IntegrationCardComponent } from "../integration-card/integration-card.component"; import { Integration } from "../models"; diff --git a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.stories.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.stories.ts similarity index 75% rename from apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.stories.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.stories.ts index 2ec0bccec3..b6580af288 100644 --- a/apps/web/src/app/shared/components/integrations/integration-grid/integration-grid.stories.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.stories.ts @@ -1,14 +1,13 @@ -import { Meta, StoryObj, moduleMetadata } from "@storybook/angular"; +import { importProvidersFrom } from "@angular/core"; +import { Meta, StoryObj, applicationConfig, moduleMetadata } from "@storybook/angular"; import { of } from "rxjs"; import { SYSTEM_THEME_OBSERVABLE } from "@bitwarden/angular/services/injection-tokens"; import { IntegrationType } from "@bitwarden/common/enums"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { ThemeTypes } from "@bitwarden/common/platform/enums"; import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service"; -import { I18nMockService } from "@bitwarden/components"; -import { SharedModule } from "../../../shared.module"; +import { PreloadedEnglishI18nModule } from "../../../../../../core/tests"; import { IntegrationCardComponent } from "../integration-card/integration-card.component"; import { IntegrationGridComponent } from "../integration-grid/integration-grid.component"; @@ -18,18 +17,12 @@ export default { title: "Web/Integration Layout/Integration Grid", component: IntegrationGridComponent, decorators: [ + applicationConfig({ + providers: [importProvidersFrom(PreloadedEnglishI18nModule)], + }), moduleMetadata({ - imports: [IntegrationCardComponent, SharedModule], + imports: [IntegrationCardComponent], providers: [ - { - provide: I18nService, - useFactory: () => { - return new I18nMockService({ - integrationCardAriaLabel: "Go to integration", - integrationCardTooltip: "Go to integration", - }); - }, - }, { provide: ThemeStateService, useClass: MockThemeService, diff --git a/apps/web/src/app/shared/components/integrations/integrations.pipe.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts similarity index 100% rename from apps/web/src/app/shared/components/integrations/integrations.pipe.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts diff --git a/apps/web/src/app/shared/components/integrations/models.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/models.ts similarity index 100% rename from apps/web/src/app/shared/components/integrations/models.ts rename to apps/web/src/app/admin-console/organizations/shared/components/integrations/models.ts diff --git a/apps/web/src/app/shared/components/index.ts b/apps/web/src/app/shared/components/index.ts deleted file mode 100644 index 5745a7827f..0000000000 --- a/apps/web/src/app/shared/components/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from "./integrations/integration-card/integration-card.component"; -export * from "./integrations/integration-grid/integration-grid.component"; -export * from "./integrations/integrations.pipe"; -export * from "./integrations/models"; diff --git a/apps/web/src/app/shared/index.ts b/apps/web/src/app/shared/index.ts index f57648c0e4..7defcdedfd 100644 --- a/apps/web/src/app/shared/index.ts +++ b/apps/web/src/app/shared/index.ts @@ -1,3 +1,2 @@ export * from "./shared.module"; export * from "./loose-components.module"; -export * from "./components/index"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.spec.ts b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.spec.ts index e4a65f7ddd..5d626da936 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.spec.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.spec.ts @@ -5,10 +5,9 @@ import { mock } from "jest-mock-extended"; import { of } from "rxjs"; import { SharedModule } from "@bitwarden/components/src/shared"; -import { - IntegrationCardComponent, - IntegrationGridComponent, -} from "@bitwarden/web-vault/app/shared"; +import { IntegrationCardComponent } from "@bitwarden/web-vault/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component"; +import { IntegrationGridComponent } from "@bitwarden/web-vault/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component"; +import {} from "@bitwarden/web-vault/app/shared"; import { SYSTEM_THEME_OBSERVABLE } from "../../../../../../libs/angular/src/services/injection-tokens"; import { I18nService } from "../../../../../../libs/common/src/platform/abstractions/i18n.service"; diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.ts index af15c2c8b6..cdae129de4 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.component.ts @@ -1,7 +1,7 @@ import { Component } from "@angular/core"; import { IntegrationType } from "@bitwarden/common/enums"; -import { Integration } from "@bitwarden/web-vault/app/shared"; +import { Integration } from "@bitwarden/web-vault/app/admin-console/organizations/shared/components/integrations/models"; @Component({ selector: "sm-integrations", diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.module.ts b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.module.ts index b79892f5ed..eee426e3b0 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.module.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/integrations/integrations.module.ts @@ -1,9 +1,7 @@ import { NgModule } from "@angular/core"; -import { - IntegrationCardComponent, - IntegrationGridComponent, -} from "@bitwarden/web-vault/app/shared"; +import { IntegrationCardComponent } from "@bitwarden/web-vault/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component"; +import { IntegrationGridComponent } from "@bitwarden/web-vault/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component"; import { SecretsManagerSharedModule } from "../shared/sm-shared.module";