Skip to content

Commit

Permalink
-fix folder structure -add new package json -edit main to correct ts-…
Browse files Browse the repository at this point in the history
…config path
  • Loading branch information
dan-livefront committed Jan 15, 2025
1 parent ab42883 commit d72b97a
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { dirname, join } from "path";
import path from "path";

Check warning on line 2 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L1-L2

Added lines #L1 - L2 were not covered by tests
import type { StorybookConfig } from "@storybook/web-components-webpack5";
import TsconfigPathsPlugin from "tsconfig-paths-webpack-plugin";
import remarkGfm from "remark-gfm";

Check warning on line 5 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L4-L5

Added lines #L4 - L5 were not covered by tests
Expand All @@ -7,7 +8,7 @@ const getAbsolutePath = (value: string): string =>
dirname(require.resolve(join(value, "package.json")));

Check warning on line 8 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L7-L8

Added lines #L7 - L8 were not covered by tests

const config: StorybookConfig = {

Check warning on line 10 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L10

Added line #L10 was not covered by tests
stories: ["../stories/**/*.lit-stories.@(js|jsx|ts|tsx)"],
stories: ["../lit-stories/**/*.lit-stories.@(js|jsx|ts|tsx)"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
Expand Down Expand Up @@ -40,7 +41,11 @@ const config: StorybookConfig = {
}),
webpackFinal: async (config) => {

Check warning on line 42 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L42

Added line #L42 was not covered by tests
if (config.resolve) {
config.resolve.plugins = [new TsconfigPathsPlugin()] as any;
config.resolve.plugins = [

Check warning on line 44 in apps/browser/src/autofill/content/components/.lit-storybook/main.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/.lit-storybook/main.ts#L44

Added line #L44 was not covered by tests
new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, "../../../../../tsconfig.json"),
}),
] as any;
}

if (config.module && config.module.rules) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/buttons/action-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/action-button.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { ActionButton } from "../../../buttons/action-button";
import { ActionButton } from "../../buttons/action-button";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/buttons/action-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/action-button.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
buttonText: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/buttons/badge-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/badge-button.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { BadgeButton } from "../../../buttons/badge-button";
import { BadgeButton } from "../../buttons/badge-button";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/buttons/badge-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/badge-button.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
buttonAction: (e: Event) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/buttons/close-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/close-button.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { CloseButton } from "../../../buttons/close-button";
import { CloseButton } from "../../buttons/close-button";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/buttons/close-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/close-button.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
handleCloseNotification: (e: Event) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/buttons/edit-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/edit-button.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { EditButton } from "../../../buttons/edit-button";
import { EditButton } from "../../buttons/edit-button";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/buttons/edit-button.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/buttons/edit-button.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
buttonAction: (e: Event) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { NotificationTypes } from "../../../../../notification/abstractions/notification-bar";
import { CipherAction } from "../../../cipher/cipher-action";
import { NotificationTypes } from "../../../../notification/abstractions/notification-bar";
import { CipherAction } from "../../cipher/cipher-action";

Check warning on line 6 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts#L5-L6

Added lines #L5 - L6 were not covered by tests

type Args = {
handleAction?: (e: Event) => void;
notificationType: typeof NotificationTypes.Change | typeof NotificationTypes.Add;
theme: Theme;
};
export default {

Check warning on line 13 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-action.lit-stories.ts#L13

Added line #L13 was not covered by tests
title: "Components/Cipher/Cipher Action",
title: "Components/Ciphers/Cipher Action",
argTypes: {
theme: { control: "select", options: [...Object.values(ThemeTypes)] },
notificationType: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { html } from "lit";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 4 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts#L4

Added line #L4 was not covered by tests

import { CipherIcon } from "../../../cipher/cipher-icon";
import { CipherIcon } from "../../cipher/cipher-icon";

Check warning on line 6 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts#L6

Added line #L6 was not covered by tests

type Args = {
color: string;
Expand All @@ -13,7 +13,7 @@ type Args = {
};

export default {

Check warning on line 15 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-icon.lit-stories.ts#L15

Added line #L15 was not covered by tests
title: "Components/Cipher/Cipher Icon",
title: "Components/Ciphers/Cipher Icon",
argTypes: {
color: { control: "color" },
size: { control: "text" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { html } from "lit";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 4 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts#L4

Added line #L4 was not covered by tests

import { CipherInfoIndicatorIcons } from "../../../cipher/cipher-indicator-icons";
import { CipherInfoIndicatorIcons } from "../../cipher/cipher-indicator-icons";

Check warning on line 6 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts#L6

Added line #L6 was not covered by tests

type Args = {
isBusinessOrg?: boolean;
Expand All @@ -12,7 +12,7 @@ type Args = {
};

export default {

Check warning on line 14 in apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/ciphers/cipher-indicator-icon.lit-stories.ts#L14

Added line #L14 was not covered by tests
title: "Components/Cipher/Cipher Indicator Icon",
title: "Components/Ciphers/Cipher Indicator Icon",
argTypes: {
isBusinessOrg: { control: "boolean" },
isFamilyOrg: { control: "boolean" },
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.e
import { CipherType } from "@bitwarden/common/vault/enums";
import { CipherRepromptType } from "@bitwarden/common/vault/enums/cipher-reprompt-type";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts#L3-L5

Added lines #L3 - L5 were not covered by tests

import { NotificationType } from "../../../../../notification/abstractions/notification-bar";
import { CipherData } from "../../../cipher/types";
import { NotificationBody } from "../../../notification/body";
import { NotificationType } from "../../../../notification/abstractions/notification-bar";
import { CipherData } from "../../cipher/types";
import { NotificationBody } from "../../notification/body";

Check warning on line 9 in apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts#L9

Added line #L9 was not covered by tests

type Args = {
ciphers: CipherData[];
Expand All @@ -15,7 +15,7 @@ type Args = {
};

export default {

Check warning on line 17 in apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/body.lit-stories.ts#L17

Added line #L17 was not covered by tests
title: "Components/Notification/Notification Body",
title: "Components/Notifications/Notification Body",
argTypes: {
ciphers: { control: "object" },
theme: { control: "select", options: [...Object.values(ThemeTypes)] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { NotificationType } from "../../../../../notification/abstractions/notification-bar";
import { NotificationFooter } from "../../../notification/footer";
import { NotificationType } from "../../../../notification/abstractions/notification-bar";
import { NotificationFooter } from "../../notification/footer";

Check warning on line 6 in apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts#L6

Added line #L6 was not covered by tests

type Args = {
notificationType: NotificationType;
theme: Theme;
};

export default {

Check warning on line 13 in apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/footer.lit-stories.ts#L13

Added line #L13 was not covered by tests
title: "Components/Notification/Notification Footer",
title: "Components/Notifications/Notification Footer",
argTypes: {
theme: { control: "select", options: [...Object.values(ThemeTypes)] },
notificationType: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { NotificationHeader } from "../../../notification/header";
import { NotificationHeader } from "../../notification/header";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
message: string;
Expand All @@ -12,7 +12,7 @@ type Args = {
};

export default {

Check warning on line 14 in apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/notification/header.lit-stories.ts#L14

Added line #L14 was not covered by tests
title: "Components/Notification/Notification Header",
title: "Components/Notifications/Notification Header",
argTypes: {
message: { control: "text" },
standalone: { control: "boolean" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/rows/action-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/action-row.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { ActionRow } from "../../../rows/action-row";
import { ActionRow } from "../../rows/action-row";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/rows/action-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/action-row.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
itemText: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Meta, StoryObj } from "@storybook/web-components";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 3 in apps/browser/src/autofill/content/components/lit-stories/rows/button-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/button-row.lit-stories.ts#L3

Added line #L3 was not covered by tests

import { ButtonRow } from "../../../rows/button-row";
import { ButtonRow } from "../../rows/button-row";

Check warning on line 5 in apps/browser/src/autofill/content/components/lit-stories/rows/button-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/button-row.lit-stories.ts#L5

Added line #L5 was not covered by tests

type Args = {
theme: Theme;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { TemplateResult } from "lit";

import { Theme, ThemeTypes } from "@bitwarden/common/platform/enums/theme-type.enum";

Check warning on line 4 in apps/browser/src/autofill/content/components/lit-stories/rows/item-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/item-row.lit-stories.ts#L4

Added line #L4 was not covered by tests

import { ItemRow } from "../../../rows/item-row";
import { ItemRow } from "../../rows/item-row";

Check warning on line 6 in apps/browser/src/autofill/content/components/lit-stories/rows/item-row.lit-stories.ts

View check run for this annotation

Codecov / codecov/patch

apps/browser/src/autofill/content/components/lit-stories/rows/item-row.lit-stories.ts#L6

Added line #L6 was not covered by tests

type Args = {
theme: Theme;
Expand Down
7 changes: 7 additions & 0 deletions apps/browser/src/autofill/content/components/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@bitwarden/browser-components",
"version": "2025.1.1",
"scripts": {
"storybook:lit": "storybook dev -p 6006 -c ./.lit-storybook"
}
}
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"lint:dep-ownership": "tsc --project ./scripts/tsconfig.json && node ./scripts/dist/dep-ownership.js",
"docs:json": "compodoc -p ./tsconfig.json -e json -d . --disableRoutesGraph",
"storybook": "ng run components:storybook",
"storybook:lit": "storybook dev -p 6006 -c apps/browser/src/autofill/content/components/.storybook",
"build-storybook": "ng run components:build-storybook",
"build-storybook:ci": "ng run components:build-storybook --webpack-stats-json",
"postinstall": "patch-package"
Expand Down

0 comments on commit d72b97a

Please sign in to comment.