mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-18023] - fix cipher form story (#13274)
* fix cipher form story * re-add restricted import for now
This commit is contained in:
@@ -1,8 +1,14 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
// FIXME: Update this file to be type safe and remove this and next line
|
||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
import { signal } from "@angular/core";
|
import { importProvidersFrom, signal } from "@angular/core";
|
||||||
import { action } from "@storybook/addon-actions";
|
import { action } from "@storybook/addon-actions";
|
||||||
import { componentWrapperDecorator, Meta, moduleMetadata, StoryObj } from "@storybook/angular";
|
import {
|
||||||
|
applicationConfig,
|
||||||
|
componentWrapperDecorator,
|
||||||
|
Meta,
|
||||||
|
moduleMetadata,
|
||||||
|
StoryObj,
|
||||||
|
} from "@storybook/angular";
|
||||||
import { BehaviorSubject } from "rxjs";
|
import { BehaviorSubject } from "rxjs";
|
||||||
|
|
||||||
import { CollectionView } from "@bitwarden/admin-console/common";
|
import { CollectionView } from "@bitwarden/admin-console/common";
|
||||||
@@ -16,7 +22,6 @@ import { DomainSettingsService } from "@bitwarden/common/autofill/services/domai
|
|||||||
import { ClientType } from "@bitwarden/common/enums";
|
import { ClientType } from "@bitwarden/common/enums";
|
||||||
import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service";
|
import { UriMatchStrategy } from "@bitwarden/common/models/domain/domain-service";
|
||||||
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service";
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
||||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||||
import { CipherType } from "@bitwarden/common/vault/enums";
|
import { CipherType } from "@bitwarden/common/vault/enums";
|
||||||
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
import { Cipher } from "@bitwarden/common/vault/models/domain/cipher";
|
||||||
@@ -29,6 +34,10 @@ import {
|
|||||||
CipherFormGenerationService,
|
CipherFormGenerationService,
|
||||||
PasswordRepromptService,
|
PasswordRepromptService,
|
||||||
} from "@bitwarden/vault";
|
} from "@bitwarden/vault";
|
||||||
|
// FIXME: remove `/apps` import from `/libs`
|
||||||
|
// FIXME: remove `src` and fix import
|
||||||
|
// eslint-disable-next-line import/no-restricted-paths, no-restricted-imports
|
||||||
|
import { PreloadedEnglishI18nModule } from "@bitwarden/web-vault/src/app/core/tests";
|
||||||
|
|
||||||
import { CipherFormService } from "./abstractions/cipher-form.service";
|
import { CipherFormService } from "./abstractions/cipher-form.service";
|
||||||
import { TotpCaptureService } from "./abstractions/totp-capture.service";
|
import { TotpCaptureService } from "./abstractions/totp-capture.service";
|
||||||
@@ -207,12 +216,14 @@ export default {
|
|||||||
getFeatureFlag: () => Promise.resolve(false),
|
getFeatureFlag: () => Promise.resolve(false),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ provide: I18nService, useValue: { t: (...keys: string[]) => keys.join(" ") } },
|
|
||||||
],
|
],
|
||||||
}),
|
}),
|
||||||
componentWrapperDecorator(
|
componentWrapperDecorator(
|
||||||
(story) => `<div class="tw-bg-background-alt tw-text-main tw-border">${story}</div>`,
|
(story) => `<div class="tw-bg-background-alt tw-text-main tw-border">${story}</div>`,
|
||||||
),
|
),
|
||||||
|
applicationConfig({
|
||||||
|
providers: [importProvidersFrom(PreloadedEnglishI18nModule)],
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
args: {
|
args: {
|
||||||
config: defaultConfig,
|
config: defaultConfig,
|
||||||
|
|||||||
Reference in New Issue
Block a user