Merge pull request #98 from mirumee/fix/storybook
Update dependencies to suppress storybook build errors
This commit is contained in:
commit
671b895d81
21 changed files with 2741 additions and 8497 deletions
|
@ -5,3 +5,4 @@ All notable, unreleased changes to this project will be documented in this file.
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Add changelog and github issue/PR templates - #97 by @dominik-zeglen
|
- Add changelog and github issue/PR templates - #97 by @dominik-zeglen
|
||||||
|
- Update dependencies to suppress storybook build errors - #98 by @dominik-zeglen
|
||||||
|
|
11005
package-lock.json
generated
11005
package-lock.json
generated
File diff suppressed because it is too large
Load diff
14
package.json
14
package.json
|
@ -20,9 +20,9 @@
|
||||||
"@material-ui/core": "^3.9.3",
|
"@material-ui/core": "^3.9.3",
|
||||||
"@material-ui/icons": "^3.0.2",
|
"@material-ui/icons": "^3.0.2",
|
||||||
"@material-ui/styles": "^3.0.0-alpha.10",
|
"@material-ui/styles": "^3.0.0-alpha.10",
|
||||||
"apollo": "^2.15.0",
|
"apollo": "^2.17.2",
|
||||||
"apollo-cache-inmemory": "^1.6.2",
|
"apollo-cache-inmemory": "^1.6.2",
|
||||||
"apollo-client": "^2.6.3",
|
"apollo-client": "^2.6.4",
|
||||||
"apollo-client-preset": "^1.0.6",
|
"apollo-client-preset": "^1.0.6",
|
||||||
"apollo-link": "^1.2.12",
|
"apollo-link": "^1.2.12",
|
||||||
"apollo-link-batch-http": "^1.2.12",
|
"apollo-link-batch-http": "^1.2.12",
|
||||||
|
@ -49,9 +49,9 @@
|
||||||
"lodash-es": "^4.17.14",
|
"lodash-es": "^4.17.14",
|
||||||
"moment-timezone": "^0.5.26",
|
"moment-timezone": "^0.5.26",
|
||||||
"qs": "^6.7.0",
|
"qs": "^6.7.0",
|
||||||
"react": "^16.8.6",
|
"react": "^16.9.0",
|
||||||
"react-apollo": "^2.5.8",
|
"react-apollo": "^3.0.0",
|
||||||
"react-dom": "^16.8.6",
|
"react-dom": "^16.9.0",
|
||||||
"react-dropzone": "^8.2.0",
|
"react-dropzone": "^8.2.0",
|
||||||
"react-helmet": "^5.2.1",
|
"react-helmet": "^5.2.1",
|
||||||
"react-infinite-scroller": "^1.2.4",
|
"react-infinite-scroller": "^1.2.4",
|
||||||
|
@ -88,8 +88,8 @@
|
||||||
"@types/jest": "^23.3.14",
|
"@types/jest": "^23.3.14",
|
||||||
"@types/lodash-es": "^4.17.3",
|
"@types/lodash-es": "^4.17.3",
|
||||||
"@types/moment-timezone": "^0.5.12",
|
"@types/moment-timezone": "^0.5.12",
|
||||||
"@types/react": "16.8.12",
|
"@types/react": "^16.9.1",
|
||||||
"@types/react-dom": "^16.8.4",
|
"@types/react-dom": "^16.8.5",
|
||||||
"@types/react-dropzone": "^4.2.2",
|
"@types/react-dropzone": "^4.2.2",
|
||||||
"@types/react-helmet": "^5.0.8",
|
"@types/react-helmet": "^5.0.8",
|
||||||
"@types/react-infinite-scroller": "^1.2.1",
|
"@types/react-infinite-scroller": "^1.2.1",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import moment from "moment-timezone";
|
import moment from "moment-timezone";
|
||||||
import { MutationFn, MutationResult } from "react-apollo";
|
import { MutationFunction, MutationResult } from "react-apollo";
|
||||||
import urlJoin from "url-join";
|
import urlJoin from "url-join";
|
||||||
|
|
||||||
import { ConfirmButtonTransitionState } from "./components/ConfirmButton/ConfirmButton";
|
import { ConfirmButtonTransitionState } from "./components/ConfirmButton/ConfirmButton";
|
||||||
|
@ -189,7 +189,7 @@ export function getMutationState(
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getMutationProviderData<TData, TVariables>(
|
export function getMutationProviderData<TData, TVariables>(
|
||||||
mutateFn: MutationFn<TData, TVariables>,
|
mutateFn: MutationFunction<TData, TVariables>,
|
||||||
opts: MutationResult<TData>
|
opts: MutationResult<TData>
|
||||||
): PartialMutationProviderOutput<TData, TVariables> {
|
): PartialMutationProviderOutput<TData, TVariables> {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -1,19 +1,14 @@
|
||||||
import { ApolloError } from "apollo-client";
|
import { ApolloError, MutationUpdaterFn } from "apollo-client";
|
||||||
import { DocumentNode } from "graphql";
|
import { DocumentNode } from "graphql";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {
|
import { Mutation, MutationFunction, MutationResult } from "react-apollo";
|
||||||
Mutation,
|
|
||||||
MutationFn,
|
|
||||||
MutationResult,
|
|
||||||
MutationUpdaterFn
|
|
||||||
} from "react-apollo";
|
|
||||||
|
|
||||||
import useNotifier from "./hooks/useNotifier";
|
import useNotifier from "./hooks/useNotifier";
|
||||||
import i18n from "./i18n";
|
import i18n from "./i18n";
|
||||||
|
|
||||||
export interface TypedMutationInnerProps<TData, TVariables> {
|
export interface TypedMutationInnerProps<TData, TVariables> {
|
||||||
children: (
|
children: (
|
||||||
mutateFn: MutationFn<TData, TVariables>,
|
mutateFn: MutationFunction<TData, TVariables>,
|
||||||
result: MutationResult<TData>
|
result: MutationResult<TData>
|
||||||
) => React.ReactNode;
|
) => React.ReactNode;
|
||||||
onCompleted?: (data: TData) => void;
|
onCompleted?: (data: TData) => void;
|
||||||
|
@ -21,26 +16,17 @@ export interface TypedMutationInnerProps<TData, TVariables> {
|
||||||
variables?: TVariables;
|
variables?: TVariables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For some reason Mutation returns () => Element instead of () => ReactNode
|
||||||
export function TypedMutation<TData, TVariables>(
|
export function TypedMutation<TData, TVariables>(
|
||||||
mutation: DocumentNode,
|
mutation: DocumentNode,
|
||||||
update?: MutationUpdaterFn<TData>
|
update?: MutationUpdaterFn<TData>
|
||||||
) {
|
) {
|
||||||
class StrictTypedMutation extends Mutation<TData, TVariables> {}
|
|
||||||
return (props: TypedMutationInnerProps<TData, TVariables>) => {
|
return (props: TypedMutationInnerProps<TData, TVariables>) => {
|
||||||
const notify = useNotifier();
|
const notify = useNotifier();
|
||||||
// Obviously, this is workaround to the problem described here:
|
const { children, onCompleted, onError, variables } = props;
|
||||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32588
|
|
||||||
const {
|
|
||||||
children,
|
|
||||||
onCompleted,
|
|
||||||
onError,
|
|
||||||
variables
|
|
||||||
} = props as JSX.LibraryManagedAttributes<
|
|
||||||
typeof StrictTypedMutation,
|
|
||||||
typeof props
|
|
||||||
>;
|
|
||||||
return (
|
return (
|
||||||
<StrictTypedMutation
|
<Mutation
|
||||||
mutation={mutation}
|
mutation={mutation}
|
||||||
onCompleted={onCompleted}
|
onCompleted={onCompleted}
|
||||||
onError={err => {
|
onError={err => {
|
||||||
|
@ -55,8 +41,8 @@ export function TypedMutation<TData, TVariables>(
|
||||||
variables={variables}
|
variables={variables}
|
||||||
update={update}
|
update={update}
|
||||||
>
|
>
|
||||||
{children}
|
{(mutateFn, result) => <>{children(mutateFn, result)}</>}
|
||||||
</StrictTypedMutation>
|
</Mutation>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { MutationFn } from "react-apollo";
|
import { MutationFunction } from "react-apollo";
|
||||||
|
|
||||||
import { AttributeTypeEnum, ReorderInput } from "@saleor/types/globalTypes";
|
import { AttributeTypeEnum, ReorderInput } from "@saleor/types/globalTypes";
|
||||||
import { getMutationProviderData } from "../../misc";
|
import { getMutationProviderData } from "../../misc";
|
||||||
|
@ -119,7 +119,7 @@ const ProductTypeOperations: React.StatelessComponent<
|
||||||
reorderAttributeMutation,
|
reorderAttributeMutation,
|
||||||
reorderAttributeMutationResult
|
reorderAttributeMutationResult
|
||||||
) => {
|
) => {
|
||||||
const reorderAttributeMutationFn: MutationFn<
|
const reorderAttributeMutationFn: MutationFunction<
|
||||||
ProductTypeAttributeReorder,
|
ProductTypeAttributeReorder,
|
||||||
ProductTypeAttributeReorderVariables
|
ProductTypeAttributeReorderVariables
|
||||||
> = opts => {
|
> = opts => {
|
||||||
|
|
148
src/queries.tsx
148
src/queries.tsx
|
@ -1,9 +1,9 @@
|
||||||
|
import { ApolloQueryResult } from "apollo-client";
|
||||||
import { DocumentNode } from "graphql";
|
import { DocumentNode } from "graphql";
|
||||||
import gql from "graphql-tag";
|
import gql from "graphql-tag";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Query, QueryResult } from "react-apollo";
|
import { Query, QueryResult } from "react-apollo";
|
||||||
|
|
||||||
import { ApolloQueryResult } from "apollo-client";
|
|
||||||
import AppProgress from "./components/AppProgress";
|
import AppProgress from "./components/AppProgress";
|
||||||
import ErrorPage from "./components/ErrorPage/ErrorPage";
|
import ErrorPage from "./components/ErrorPage/ErrorPage";
|
||||||
import useNavigator from "./hooks/useNavigator";
|
import useNavigator from "./hooks/useNavigator";
|
||||||
|
@ -62,98 +62,82 @@ class QueryProgress extends React.Component<QueryProgressProps, {}> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For some reason Query returns () => Element instead of () => ReactNode
|
||||||
export function TypedQuery<TData, TVariables>(
|
export function TypedQuery<TData, TVariables>(
|
||||||
query: DocumentNode
|
query: DocumentNode
|
||||||
): React.FC<TypedQueryInnerProps<TData, TVariables>> {
|
): React.FC<TypedQueryInnerProps<TData, TVariables>> {
|
||||||
class StrictTypedQuery extends Query<TData, TVariables> {}
|
return ({ children, displayLoader, skip, variables, require }) => {
|
||||||
return props => {
|
|
||||||
const navigate = useNavigator();
|
const navigate = useNavigator();
|
||||||
const pushMessage = useNotifier();
|
const pushMessage = useNotifier();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppProgress>
|
<AppProgress>
|
||||||
{({ setProgressState }) => {
|
{({ setProgressState }) => (
|
||||||
// Obviously, this is workaround to the problem described here:
|
<Query
|
||||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32588
|
fetchPolicy="cache-and-network"
|
||||||
const {
|
query={query}
|
||||||
children,
|
variables={variables}
|
||||||
displayLoader,
|
skip={skip}
|
||||||
skip,
|
context={{ useBatching: true }}
|
||||||
variables,
|
>
|
||||||
require
|
{queryData => {
|
||||||
} = props as JSX.LibraryManagedAttributes<
|
if (queryData.error) {
|
||||||
typeof StrictTypedQuery,
|
const msg = i18n.t("Something went wrong: {{ message }}", {
|
||||||
typeof props
|
message: queryData.error.message
|
||||||
>;
|
|
||||||
return (
|
|
||||||
<StrictTypedQuery
|
|
||||||
fetchPolicy="cache-and-network"
|
|
||||||
query={query}
|
|
||||||
variables={variables}
|
|
||||||
skip={skip}
|
|
||||||
context={{ useBatching: true }}
|
|
||||||
>
|
|
||||||
{queryData => {
|
|
||||||
if (queryData.error) {
|
|
||||||
const msg = i18n.t("Something went wrong: {{ message }}", {
|
|
||||||
message: queryData.error.message
|
|
||||||
});
|
|
||||||
pushMessage({ text: msg });
|
|
||||||
}
|
|
||||||
|
|
||||||
const loadMore = (
|
|
||||||
mergeFunc: (
|
|
||||||
previousResults: TData,
|
|
||||||
fetchMoreResult: TData
|
|
||||||
) => TData,
|
|
||||||
extraVariables: RequireAtLeastOne<TVariables>
|
|
||||||
) =>
|
|
||||||
queryData.fetchMore({
|
|
||||||
query,
|
|
||||||
updateQuery: (previousResults, { fetchMoreResult }) => {
|
|
||||||
if (!fetchMoreResult) {
|
|
||||||
return previousResults;
|
|
||||||
}
|
|
||||||
return mergeFunc(previousResults, fetchMoreResult);
|
|
||||||
},
|
|
||||||
variables: { ...variables, ...extraVariables }
|
|
||||||
});
|
|
||||||
|
|
||||||
let childrenOrNotFound = children({
|
|
||||||
...queryData,
|
|
||||||
loadMore
|
|
||||||
});
|
});
|
||||||
if (
|
pushMessage({ text: msg });
|
||||||
!queryData.loading &&
|
}
|
||||||
require &&
|
|
||||||
queryData.data &&
|
|
||||||
!require.reduce(
|
|
||||||
(acc, key) => acc && queryData.data[key] !== null,
|
|
||||||
true
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
childrenOrNotFound = (
|
|
||||||
<ErrorPage onBack={() => navigate("/")} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (displayLoader) {
|
const loadMore = (
|
||||||
return (
|
mergeFunc: (
|
||||||
<QueryProgress
|
previousResults: TData,
|
||||||
loading={queryData.loading}
|
fetchMoreResult: TData
|
||||||
onCompleted={() => setProgressState(false)}
|
) => TData,
|
||||||
onLoading={() => setProgressState(true)}
|
extraVariables: RequireAtLeastOne<TVariables>
|
||||||
>
|
) =>
|
||||||
{childrenOrNotFound}
|
queryData.fetchMore({
|
||||||
</QueryProgress>
|
query,
|
||||||
);
|
updateQuery: (previousResults, { fetchMoreResult }) => {
|
||||||
}
|
if (!fetchMoreResult) {
|
||||||
|
return previousResults;
|
||||||
|
}
|
||||||
|
return mergeFunc(previousResults, fetchMoreResult);
|
||||||
|
},
|
||||||
|
variables: { ...variables, ...extraVariables }
|
||||||
|
});
|
||||||
|
|
||||||
return childrenOrNotFound;
|
let childrenOrNotFound = children({
|
||||||
}}
|
...queryData,
|
||||||
</StrictTypedQuery>
|
loadMore
|
||||||
);
|
});
|
||||||
}}
|
if (
|
||||||
|
!queryData.loading &&
|
||||||
|
require &&
|
||||||
|
queryData.data &&
|
||||||
|
!require.reduce(
|
||||||
|
(acc, key) => acc && queryData.data[key] !== null,
|
||||||
|
true
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
childrenOrNotFound = <ErrorPage onBack={() => navigate("/")} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (displayLoader) {
|
||||||
|
return (
|
||||||
|
<QueryProgress
|
||||||
|
loading={queryData.loading}
|
||||||
|
onCompleted={() => setProgressState(false)}
|
||||||
|
onLoading={() => setProgressState(true)}
|
||||||
|
>
|
||||||
|
{childrenOrNotFound}
|
||||||
|
</QueryProgress>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return <>{childrenOrNotFound}</>;
|
||||||
|
}}
|
||||||
|
</Query>
|
||||||
|
)}
|
||||||
</AppProgress>
|
</AppProgress>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
configure = require("@storybook/react").configure;
|
const { configure } = require("@storybook/react");
|
||||||
|
|
||||||
function loadStories() {
|
function loadStories() {
|
||||||
// Components
|
// Components
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import { Omit } from "@material-ui/core";
|
import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import placeholderImage from "../@assets/images/placeholder255x255.png";
|
|
||||||
|
|
||||||
import { category as categoryFixture } from "../../../categories/fixtures";
|
import { category as categoryFixture } from "../../../categories/fixtures";
|
||||||
|
|
||||||
|
|
|
@ -2,14 +2,14 @@ import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderCollectionImage from "@assets/images/block1.jpg";
|
||||||
|
import placeholderProductImage from "@assets/images/placeholder60x60.png";
|
||||||
import CollectionDetailsPage, {
|
import CollectionDetailsPage, {
|
||||||
CollectionDetailsPageProps
|
CollectionDetailsPageProps
|
||||||
} from "../../../collections/components/CollectionDetailsPage";
|
} from "../../../collections/components/CollectionDetailsPage";
|
||||||
import { collection as collectionFixture } from "../../../collections/fixtures";
|
import { collection as collectionFixture } from "../../../collections/fixtures";
|
||||||
import { listActionsProps, pageListProps } from "../../../fixtures";
|
import { listActionsProps, pageListProps } from "../../../fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderCollectionImage from "../@assets/images/block1.jpg";
|
|
||||||
import placeholderProductImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const collection = collectionFixture(
|
const collection = collectionFixture(
|
||||||
placeholderCollectionImage,
|
placeholderCollectionImage,
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import AssignProductDialog, {
|
import AssignProductDialog, {
|
||||||
AssignProductDialogProps
|
AssignProductDialogProps
|
||||||
} from "@saleor/components/AssignProductDialog";
|
} from "@saleor/components/AssignProductDialog";
|
||||||
import { products } from "@saleor/products/fixtures";
|
import { products } from "@saleor/products/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const props: AssignProductDialogProps = {
|
const props: AssignProductDialogProps = {
|
||||||
confirmButtonState: "default",
|
confirmButtonState: "default",
|
||||||
|
|
|
@ -2,10 +2,10 @@ import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import HomePage, { HomePageProps } from "../../../home/components/HomePage";
|
import HomePage, { HomePageProps } from "../../../home/components/HomePage";
|
||||||
import { shop as shopFixture } from "../../../home/fixtures";
|
import { shop as shopFixture } from "../../../home/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const shop = shopFixture(placeholderImage);
|
const shop = shopFixture(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import OrderDetailsPage, {
|
import OrderDetailsPage, {
|
||||||
OrderDetailsPageProps
|
OrderDetailsPageProps
|
||||||
} from "../../../orders/components/OrderDetailsPage";
|
} from "../../../orders/components/OrderDetailsPage";
|
||||||
|
@ -12,7 +13,6 @@ import {
|
||||||
PaymentChargeStatusEnum
|
PaymentChargeStatusEnum
|
||||||
} from "../../../types/globalTypes";
|
} from "../../../types/globalTypes";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const order = orderFixture(placeholderImage);
|
const order = orderFixture(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import OrderDraftPage, {
|
import OrderDraftPage, {
|
||||||
OrderDraftPageProps
|
OrderDraftPageProps
|
||||||
} from "../../../orders/components/OrderDraftPage";
|
} from "../../../orders/components/OrderDraftPage";
|
||||||
import { clients, countries, draftOrder } from "../../../orders/fixtures";
|
import { clients, countries, draftOrder } from "../../../orders/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const order = draftOrder(placeholderImage);
|
const order = draftOrder(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,12 @@ import { Omit } from "@material-ui/core";
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import OrderFulfillmentDialog, {
|
import OrderFulfillmentDialog, {
|
||||||
OrderFulfillmentDialogProps
|
OrderFulfillmentDialogProps
|
||||||
} from "../../../orders/components/OrderFulfillmentDialog";
|
} from "../../../orders/components/OrderFulfillmentDialog";
|
||||||
import { order as orderFixture } from "../../../orders/fixtures";
|
import { order as orderFixture } from "../../../orders/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
const order = orderFixture(placeholderImage);
|
const order = orderFixture(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder60x60.png";
|
||||||
import OrderProductAddDialog from "../../../orders/components/OrderProductAddDialog";
|
import OrderProductAddDialog from "../../../orders/components/OrderProductAddDialog";
|
||||||
import { orderLineSearch } from "../../../orders/fixtures";
|
import { orderLineSearch } from "../../../orders/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder60x60.png";
|
|
||||||
|
|
||||||
storiesOf("Orders / OrderProductAddDialog", module)
|
storiesOf("Orders / OrderProductAddDialog", module)
|
||||||
.addDecorator(Decorator)
|
.addDecorator(Decorator)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholder from "@assets/images/placeholder1080x1080.png";
|
||||||
import ProductImagePage from "../../../products/components/ProductImagePage";
|
import ProductImagePage from "../../../products/components/ProductImagePage";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholder from "../@assets/images/placeholder1080x1080.png";
|
|
||||||
|
|
||||||
const image = { id: "", url: placeholder, alt: "Lorem ipsum" };
|
const image = { id: "", url: placeholder, alt: "Lorem ipsum" };
|
||||||
const images = (Array(8) as any)
|
const images = (Array(8) as any)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import { defaultListSettings } from "@saleor/config";
|
import { defaultListSettings } from "@saleor/config";
|
||||||
import { ListViews } from "@saleor/types";
|
import { ListViews } from "@saleor/types";
|
||||||
import { category as categoryFixture } from "../../../categories/fixtures";
|
import { category as categoryFixture } from "../../../categories/fixtures";
|
||||||
|
@ -14,7 +15,6 @@ import ProductListPage, {
|
||||||
ProductListPageProps
|
ProductListPageProps
|
||||||
} from "../../../products/components/ProductListPage";
|
} from "../../../products/components/ProductListPage";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder255x255.png";
|
|
||||||
|
|
||||||
const products = categoryFixture(placeholderImage).products.edges.map(
|
const products = categoryFixture(placeholderImage).products.edges.map(
|
||||||
edge => edge.node
|
edge => edge.node
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import { collections } from "@saleor/collections/fixtures";
|
import { collections } from "@saleor/collections/fixtures";
|
||||||
import { listActionsProps } from "@saleor/fixtures";
|
import { listActionsProps } from "@saleor/fixtures";
|
||||||
import ProductUpdatePage, {
|
import ProductUpdatePage, {
|
||||||
|
@ -8,7 +9,6 @@ import ProductUpdatePage, {
|
||||||
} from "@saleor/products/components/ProductUpdatePage";
|
} from "@saleor/products/components/ProductUpdatePage";
|
||||||
import { product as productFixture } from "@saleor/products/fixtures";
|
import { product as productFixture } from "@saleor/products/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder255x255.png";
|
|
||||||
|
|
||||||
const product = productFixture(placeholderImage);
|
const product = productFixture(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import { formError } from "@saleor/storybook/misc";
|
import { formError } from "@saleor/storybook/misc";
|
||||||
import ProductVariantCreatePage from "../../../products/components/ProductVariantCreatePage";
|
import ProductVariantCreatePage from "../../../products/components/ProductVariantCreatePage";
|
||||||
import { product as productFixture } from "../../../products/fixtures";
|
import { product as productFixture } from "../../../products/fixtures";
|
||||||
import Decorator from "../../Decorator";
|
import Decorator from "../../Decorator";
|
||||||
import placeholderImage from "../@assets/images/placeholder255x255.png";
|
|
||||||
|
|
||||||
const product = productFixture(placeholderImage);
|
const product = productFixture(placeholderImage);
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import { storiesOf } from "@storybook/react";
|
import { storiesOf } from "@storybook/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import placeholderImage from "@assets/images/placeholder255x255.png";
|
||||||
import ProductVariantImageSelectDialog from "../../../products/components/ProductVariantImageSelectDialog";
|
import ProductVariantImageSelectDialog from "../../../products/components/ProductVariantImageSelectDialog";
|
||||||
import {
|
import {
|
||||||
variantImages as variantImagesFixture,
|
variantImages as variantImagesFixture,
|
||||||
variantProductImages as variantProductImagesFixture
|
variantProductImages as variantProductImagesFixture
|
||||||
} from "../../../products/fixtures";
|
} from "../../../products/fixtures";
|
||||||
import placeholderImage from "../@assets/images/placeholder255x255.png";
|
|
||||||
|
|
||||||
const variantImages = variantImagesFixture(placeholderImage);
|
const variantImages = variantImagesFixture(placeholderImage);
|
||||||
const variantProductImages = variantProductImagesFixture(placeholderImage);
|
const variantProductImages = variantProductImagesFixture(placeholderImage);
|
||||||
|
|
Loading…
Reference in a new issue