Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Implement changes proposed in review
dominik-zeglen2133989ebdee
diff --git a/.eslintrc.json b/.eslintrc.jsonindex ecdf40f802..36a6f380cf 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -5,12 +5,12 @@},"extends": ["standard", "plugin:react/recommended"],"globals": {- "gettext": true,- "pgettext": true,- "ngettext": true,"Materialize": true,"describe": true,- "it": true+ "gettext": true,+ "it": true,+ "ngettext": true,+ "pgettext": true},"plugins": ["react"],"parser": "babel-eslint",diff --git a/saleor/static/dashboard-next/attributes/components/AttributeValueList/AttributeValueList.tsx b/saleor/static/dashboard-next/attributes/components/AttributeValueList/AttributeValueList.tsxindex 58221f5fb5..1aacd0c052 100644--- a/saleor/static/dashboard-next/attributes/components/AttributeValueList/AttributeValueList.tsx+++ b/saleor/static/dashboard-next/attributes/components/AttributeValueList/AttributeValueList.tsx@@ -29,7 +29,6 @@ interface AttributeValueListProps {const decorate = withStyles(theme => ({deleteIcon: {paddingLeft: 0,- paddingRight: "0 !important",width: theme.spacing.unit * 7},edit: {diff --git a/saleor/static/dashboard-next/auth/AuthProvider.tsx b/saleor/static/dashboard-next/auth/AuthProvider.tsxindex 54e8020b87..1320f9cd80 100644--- a/saleor/static/dashboard-next/auth/AuthProvider.tsx+++ b/saleor/static/dashboard-next/auth/AuthProvider.tsx@@ -21,9 +21,7 @@ const AuthProviderOperations: React.StatelessComponent<any> = ({<TokenVerifyProvider onError={onError}>{tokenVerify => (<AuthProvider tokenAuth={tokenAuth} tokenVerify={tokenVerify}>- {({ isAuthenticated }) => {- return children({ isAuthenticated });- }}+ {children}</AuthProvider>)}</TokenVerifyProvider>diff --git a/saleor/static/dashboard-next/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx b/saleor/static/dashboard-next/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsxindex b202ae0d5e..594d177c7d 100644--- a/saleor/static/dashboard-next/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx+++ b/saleor/static/dashboard-next/categories/components/CategoryDeleteDialog/CategoryDeleteDialog.tsx@@ -25,7 +25,7 @@ const decorate = withStyles(export interface CategoryDeleteDialogProps {open: boolean;name: string;- productCount?: number;+ productCount: number;onClose?();onConfirm?();}@@ -46,7 +46,7 @@ const CategoryDeleteDialog = decorate<CategoryDeleteDialogProps>(props => {)}}/>- {productCount && productCount > 0 ? (+ {productCount > 0 && (<DialogContentText>{i18n.t("There are {{count}} product(s) in this category that will also be removed.",@@ -55,8 +55,6 @@ const CategoryDeleteDialog = decorate<CategoryDeleteDialogProps>(props => {})}</DialogContentText>- ) : (- undefined)}</DialogContent><DialogActions>diff --git a/saleor/static/dashboard-next/categories/components/CategoryDetailsPage/CategoryDetailsPage.tsx b/saleor/static/dashboard-next/categories/components/CategoryDetailsPage/CategoryDetailsPage.tsxindex 0469920788..556b1d2a87 100644--- a/saleor/static/dashboard-next/categories/components/CategoryDetailsPage/CategoryDetailsPage.tsx+++ b/saleor/static/dashboard-next/categories/components/CategoryDetailsPage/CategoryDetailsPage.tsx@@ -48,12 +48,10 @@ interface CategoryDetailsPageProps {}const decorate = withStyles(theme => ({- root: {- "& > *": {- marginBottom: theme.spacing.unit * 2,- [theme.breakpoints.down("md")]: {- marginBottom: theme.spacing.unit- }+ cardContainer: {+ marginTop: theme.spacing.unit * 2,+ [theme.breakpoints.down("md")]: {+ marginTop: theme.spacing.unit}}}));@@ -102,7 +100,7 @@ const CategoryDetailsPage = decorate<CategoryDetailsPageProps>(</Button>)}</PageHeader>- <div className={classes.root}>+ <div>{!isRoot && (<CategoryPropertiesdescription={category ? category.description : undefined}@@ -110,24 +108,28 @@ const CategoryDetailsPage = decorate<CategoryDetailsPageProps>(onDelete={toggleDialog}/>)}- <CategoryList- categories={subcategories}- displayTitle={!isRoot}- onAdd={onAddCategory}- onRowClick={onCategoryClick}- />- {!isRoot && (- <CategoryProducts- products={products}- hasNextPage={pageInfo ? pageInfo.hasNextPage : false}- hasPreviousPage={- pageInfo ? pageInfo.hasPreviousPage : false- }- onAddProduct={onAddProduct}- onNextPage={onNextPage}- onPreviousPage={onPreviousPage}- onRowClick={onProductClick}+ <div className={isRoot ? undefined : classes.cardContainer}>+ <CategoryList+ categories={subcategories}+ displayTitle={!isRoot}+ onAdd={onAddCategory}+ onRowClick={onCategoryClick}/>+ </div>+ {!isRoot && (+ <div className={classes.cardContainer}>+ <CategoryProducts+ products={products}+ hasNextPage={pageInfo ? pageInfo.hasNextPage : false}+ hasPreviousPage={+ pageInfo ? pageInfo.hasPreviousPage : false+ }+ onAddProduct={onAddProduct}+ onNextPage={onNextPage}+ onPreviousPage={onPreviousPage}+ onRowClick={onProductClick}+ />+ </div>)}</div></Container>diff --git a/saleor/static/dashboard-next/categories/components/CategoryProperties/CategoryProperties.tsx b/saleor/static/dashboard-next/categories/components/CategoryProperties/CategoryProperties.tsxindex 946b0d9e6c..67e5c3013d 100644--- a/saleor/static/dashboard-next/categories/components/CategoryProperties/CategoryProperties.tsx+++ b/saleor/static/dashboard-next/categories/components/CategoryProperties/CategoryProperties.tsx@@ -36,9 +36,11 @@ const CategoryProperties: React.StatelessComponent<CategoryPropertiesProps> = ({<CardContent>{description === undefined ? (<Skeleton />+ ) : description ? (+ <Typography>{description}</Typography>) : (- <Typography color={description === "" ? "textSecondary" : "default"}>- {description === "" ? i18n.t("No description") : description}+ <Typography color={"textSecondary"}>+ {i18n.t("No description")}</Typography>)}</CardContent>diff --git a/saleor/static/dashboard-next/categories/index.tsx b/saleor/static/dashboard-next/categories/index.tsxindex d40326a39d..91257d79de 100644--- a/saleor/static/dashboard-next/categories/index.tsx+++ b/saleor/static/dashboard-next/categories/index.tsx@@ -47,7 +47,10 @@ const Component = ({ match }) => ();export const categoryAddUrl = (parentId?: string) => {- return `/categories/${parentId ? `${parentId}/add` : "add"}/`;+ if (parentId) {+ return `/categories/${parentId}/add/`;+ }+ return `/categories/add/`;};export const categoryEditUrl = (id: string) => {return `/categories/${id}/edit/`;diff --git a/saleor/static/dashboard-next/categories/views/CategoryCreate.tsx b/saleor/static/dashboard-next/categories/views/CategoryCreate.tsxindex 86262e7303..e5790921b2 100644--- a/saleor/static/dashboard-next/categories/views/CategoryCreate.tsx+++ b/saleor/static/dashboard-next/categories/views/CategoryCreate.tsx@@ -1,7 +1,9 @@import * as React from "react";-import { Redirect } from "react-router-dom";-import { NavigatorLink } from "../../components/Navigator";+import Messages from "../../components/messages";+import Navigator, { NavigatorLink } from "../../components/Navigator";+import { CategoryCreateMutation } from "../../gql-types";+import i18n from "../../i18n";import CategoryEditPage from "../components/CategoryEditPage";import { categoryShowUrl } from "../index";import {@@ -16,39 +18,50 @@ interface CategoryCreateFormProps {export const CategoryCreateForm: React.StatelessComponent<CategoryCreateFormProps> = ({ parentId }) => (- <TypedCategoryCreateMutation mutation={categoryCreateMutation}>- {(mutate, { called, data: createResult, loading: createInProgress }) => {- if (- called &&- !createInProgress &&- createResult &&- createResult.categoryCreate.errors.length === 0- ) {- return (- <Redirect- to={categoryShowUrl(createResult.categoryCreate.category.id)}- push={false}- />- );- }- const errors =- called && !createInProgress && createResult- ? createResult.categoryCreate.errors- : [];- return (- <NavigatorLink to={categoryShowUrl(parentId)}>- {handleCancel => (- <CategoryEditPage- category={{ description: "", name: "" }}- errors={errors}- disabled={createInProgress}- variant="add"- onBack={handleCancel}- onSubmit={data => mutate({ variables: { ...data, parent: parentId } })}- />- )}- </NavigatorLink>- );- }}- </TypedCategoryCreateMutation>+ <Messages>+ {pushMessage => (+ <Navigator>+ {navigate => {+ const handleSuccess = (data: CategoryCreateMutation) => {+ if (data.categoryCreate.errors.length === 0) {+ pushMessage({ text: i18n.t("Category created") });+ navigate(categoryShowUrl(data.categoryCreate.category.id));+ }+ };+ return (+ <TypedCategoryCreateMutation+ mutation={categoryCreateMutation}+ onCompleted={handleSuccess}+ >+ {(+ mutate,+ { called, data: createResult, loading: createInProgress }+ ) => {+ const errors =+ called && !createInProgress && createResult+ ? createResult.categoryCreate.errors+ : [];+ return (+ <NavigatorLink to={categoryShowUrl(parentId)}>+ {handleCancel => (+ <CategoryEditPage+ category={{ description: "", name: "" }}+ errors={errors}+ disabled={createInProgress}+ variant="add"+ onBack={handleCancel}+ onSubmit={data =>+ mutate({ variables: { ...data, parent: parentId } })+ }+ />+ )}+ </NavigatorLink>+ );+ }}+ </TypedCategoryCreateMutation>+ );+ }}+ </Navigator>+ )}+ </Messages>);diff --git a/saleor/static/dashboard-next/categories/views/CategoryDetails.tsx b/saleor/static/dashboard-next/categories/views/CategoryDetails.tsxindex 635d590cbd..3041b43e1c 100644--- a/saleor/static/dashboard-next/categories/views/CategoryDetails.tsx+++ b/saleor/static/dashboard-next/categories/views/CategoryDetails.tsx@@ -61,7 +61,7 @@ const CategoryDeleteProvider: React.StatelessComponent<}if (typeof children === "function") {- return children(() => deleteCategory());+ return children(deleteCategory);}if (React.Children.count(children) > 0) {return React.Children.only(children);@@ -187,12 +187,11 @@ const CategoryDetails: React.StatelessComponent<CategoryDetailsProps> = ({onAddCategory={() => navigate(categoryAddUrl(id))}onAddProduct={() => navigate(productAddUrl)}onBack={() => window.history.back()}- onCategoryClick={(id: string) => () =>+ onCategoryClick={id => () =>navigate(categoryShowUrl(id))}onDelete={deleteCategory}onEdit={() => navigate(categoryEditUrl(id))}- onProductClick={(id: string) => () =>- navigate(productUrl(id))}+ onProductClick={id => () => navigate(productUrl(id))}pageInfo={pageInfo}onNextPage={loadNextPage}onPreviousPage={loadPreviousPage}@@ -229,9 +228,8 @@ const CategoryDetails: React.StatelessComponent<CategoryDetailsProps> = ({onAddCategory={() => navigate(categoryAddUrl())}onAddProduct={() => navigate(productAddUrl)}onBack={() => window.history.back()}- onCategoryClick={(id: string) => () =>- navigate(categoryShowUrl(id))}- onProductClick={(id: string) => () => navigate(productUrl(id))}+ onCategoryClick={id => () => navigate(categoryShowUrl(id))}+ onProductClick={id => () => navigate(productUrl(id))}/>)}</Navigator>diff --git a/saleor/static/dashboard-next/categories/views/CategoryUpdate.tsx b/saleor/static/dashboard-next/categories/views/CategoryUpdate.tsxindex defcebcbd4..0cb42b9a72 100644--- a/saleor/static/dashboard-next/categories/views/CategoryUpdate.tsx+++ b/saleor/static/dashboard-next/categories/views/CategoryUpdate.tsx@@ -2,7 +2,10 @@ import * as React from "react";import { Redirect } from "react-router-dom";import ErrorMessageCard from "../../components/ErrorMessageCard";-import { NavigatorLink } from "../../components/Navigator";+import Messages from "../../components/messages";+import Navigator, { NavigatorLink } from "../../components/Navigator";+import { CategoryUpdateMutation } from "../../gql-types";+import i18n from "../../i18n";import CategoryEditPage from "../components/CategoryEditPage";import { categoryShowUrl } from "../index";import {@@ -18,55 +21,62 @@ interface CategoryUpdateFormProps {export const CategoryUpdateForm: React.StatelessComponent<CategoryUpdateFormProps> = ({ id }) => (- <TypedCategoryDetailsQuery query={categoryDetailsQuery} variables={{ id }}>- {({ data, loading, error }) => {- if (error) {- return <ErrorMessageCard message={error.message} />;- }-- return (- <TypedCategoryUpdateMutation mutation={categoryUpdateMutation}>- {(- mutate,- { called, data: updateResult, loading: updateInProgress }- ) => {- if (- called &&- !updateInProgress &&- updateResult &&- updateResult.categoryUpdate.errors.length === 0- ) {+ <Messages>+ {pushMessage => (+ <Navigator>+ {navigate => (+ <TypedCategoryDetailsQuery+ query={categoryDetailsQuery}+ variables={{ id }}+ >+ {({ data, loading, error }) => {+ if (error) {+ return <ErrorMessageCard message={error.message} />;+ }+ const handleUpdateSuccess = (data: CategoryUpdateMutation) => {+ if (data.categoryUpdate.errors.length === 0) {+ pushMessage({ text: i18n.t("Category updated") });+ navigate(categoryShowUrl(data.categoryUpdate.category.id));+ }+ };return (- <Redirect- to={categoryShowUrl(updateResult.categoryUpdate.category.id)}- />+ <TypedCategoryUpdateMutation+ mutation={categoryUpdateMutation}+ onCompleted={handleUpdateSuccess}+ >+ {(+ updateCategory,+ { called, data: updateResult, loading: updateInProgress }+ ) => {+ const errors =+ called && !updateInProgress && updateResult+ ? updateResult.categoryUpdate.errors+ : [];+ return (+ <NavigatorLink to={categoryShowUrl(id)}>+ {handleCancel => (+ <CategoryEditPage+ category={data ? data.category : undefined}+ errors={errors}+ disabled={updateInProgress || loading}+ variant="edit"+ onBack={handleCancel}+ onSubmit={data =>+ updateCategory({+ variables: { ...data, id }+ })+ }+ />+ )}+ </NavigatorLink>+ );+ }}+ </TypedCategoryUpdateMutation>);- }- const errors =- called && !updateInProgress && updateResult- ? updateResult.categoryUpdate.errors- : [];- return (- <NavigatorLink to={categoryShowUrl(id)}>- {handleCancel => (- <CategoryEditPage- category={data ? data.category : undefined}- errors={errors}- disabled={updateInProgress || loading}- variant="edit"- onBack={handleCancel}- onSubmit={data =>- mutate({- variables: { ...data, id }- })- }- />- )}- </NavigatorLink>- );- }}- </TypedCategoryUpdateMutation>- );- }}- </TypedCategoryDetailsQuery>+ }}+ </TypedCategoryDetailsQuery>+ )}+ </Navigator>+ )}+ </Messages>);diff --git a/saleor/static/dashboard-next/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx b/saleor/static/dashboard-next/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsxindex f3bd9d00bc..162b317800 100644--- a/saleor/static/dashboard-next/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx+++ b/saleor/static/dashboard-next/collections/components/CollectionDetailsPage/CollectionDetailsPage.tsx@@ -177,39 +177,35 @@ const CollectionDetailsPage = decorate<CollectionDetailsPageProps>(</Container>)}</Form>- {collection && (- <>- <ActionDialog- onClose={toggleRemoveDialog}- onConfirm={onDelete}- open={openedRemoveDialog}- title={i18n.t("Remove collection")}- variant="delete"- >- <DialogContentText- dangerouslySetInnerHTML={{- __html: i18n.t(- "Are you sure you want to remove <strong>{{ name }}</strong>?",- { name: collection.name }- )- }}- />- </ActionDialog>- <ActionDialog- onClose={toggleImageRemoveDialog}- onConfirm={onImageRemove}- open={openedImageRemoveDialog}- title={i18n.t("Remove image")}- variant="delete"- >- <DialogContentText>- {i18n.t(- "Are you sure you want to remove collection's image?"- )}- </DialogContentText>- </ActionDialog>- </>- )}+ <ActionDialog+ onClose={toggleRemoveDialog}+ onConfirm={onDelete}+ open={openedRemoveDialog}+ title={i18n.t("Remove collection")}+ variant="delete"+ >+ <DialogContentText+ dangerouslySetInnerHTML={{+ __html: i18n.t(+ "Are you sure you want to remove <strong>{{ name }}</strong>?",+ { name: collection ? collection.name : undefined }+ )+ }}+ />+ </ActionDialog>+ <ActionDialog+ onClose={toggleImageRemoveDialog}+ onConfirm={onImageRemove}+ open={openedImageRemoveDialog}+ title={i18n.t("Remove image")}+ variant="delete"+ >+ <DialogContentText>+ {i18n.t(+ "Are you sure you want to remove collection's image?"+ )}+ </DialogContentText>+ </ActionDialog></>)}</Toggle>diff --git a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsxindex 9d6650c02a..5c5d120984 100644--- a/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx+++ b/saleor/static/dashboard-next/collections/components/CollectionProducts/CollectionProducts.tsx@@ -29,8 +29,8 @@ interface CollectionProductsProps {available: boolean;};}>;- onNextPage?();- onPreviousPage?();+ onNextPage();+ onPreviousPage();onProductAdd?();onProductClick?(id: string): () => void;onProductRemove?(id: string): () => void;diff --git a/saleor/static/dashboard-next/collections/components/CollectionProperties/CollectionProperties.tsx b/saleor/static/dashboard-next/collections/components/CollectionProperties/CollectionProperties.tsxindex 1b673b2242..e0b50148b6 100644--- a/saleor/static/dashboard-next/collections/components/CollectionProperties/CollectionProperties.tsx+++ b/saleor/static/dashboard-next/collections/components/CollectionProperties/CollectionProperties.tsx@@ -44,7 +44,9 @@ const CollectionProperties = decorate<CollectionPropertiesProps>(<TextFielddisabled={disabled}fullWidth- helperText={i18n.t("Slug is being used to create collection URL")}+ helperText={i18n.t(+ "Slugs are used to create nice URLs for collection pages"+ )}label={i18n.t("Slug")}name="slug"onChange={onChange}diff --git a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsxindex d56645f6ca..da97701584 100644--- a/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx+++ b/saleor/static/dashboard-next/components/AddressFormatter/AddressFormatter.tsx@@ -10,35 +10,34 @@ interface AddressFormatterProps {const AddressFormatter: React.StatelessComponent<AddressFormatterProps> = ({address-}) => (- <>- {!address ? (- <Skeleton />- ) : (- <address>- <Typography component="span">- {address.firstName} {address.lastName}- </Typography>- {address.companyName && (- <Typography component="span">{address.companyName}</Typography>- )}- <Typography component="span">- {address.streetAddress_1}- <br />- {address.streetAddress_2}- </Typography>- <Typography component="span">- {" "}- {address.postalCode} {address.city}- {address.cityArea ? ", " + address.cityArea : ""}- </Typography>- <Typography component="span">- {address.countryArea- ? address.countryArea + ", " + address.country- : address.country}- </Typography>- </address>- )}- </>-);+}) => {+ if (!address) {+ return <Skeleton />;+ }+ return (+ <address>+ <Typography component="span">+ {address.firstName} {address.lastName}+ </Typography>+ {address.companyName && (+ <Typography component="span">{address.companyName}</Typography>+ )}+ <Typography component="span">+ {address.streetAddress_1}+ <br />+ {address.streetAddress_2}+ </Typography>+ <Typography component="span">+ {" "}+ {address.postalCode} {address.city}+ {address.cityArea ? ", " + address.cityArea : ""}+ </Typography>+ <Typography component="span">+ {address.countryArea+ ? address.countryArea + ", " + address.country+ : address.country}+ </Typography>+ </address>+ );+};export default AddressFormatter;diff --git a/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx b/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsxdeleted file mode 100644index c9e0de2ea9..0000000000--- a/saleor/static/dashboard-next/components/AppLayout/AppLayout.tsx+++ /dev/null@@ -1,28 +0,0 @@-import { withStyles } from "@material-ui/core/styles";-import * as React from "react";--interface AppLayoutProps {}--const decorate = withStyles(theme => ({- root: {- height: theme.spacing.unit * 7- },- navbarAside: {- backgroundColor: theme.palette.primary.dark- },- navbarMain: {- backgroundColor: theme.palette.primary.main- }-}));-const AppLayout = decorate<AppLayoutProps>(({ classes, children }) => (- <>- <div className={classes.root}>- <div className={classes.navbarAside}>asd</div>- <div className={classes.navbarMain}>asd</div>- </div>- <aside>asd</aside>- <main>{children}</main>- </>-));-AppLayout.displayName = "AppLayout";-export default AppLayout;diff --git a/saleor/static/dashboard-next/components/AppLayout/index.ts b/saleor/static/dashboard-next/components/AppLayout/index.tsdeleted file mode 100644index 990e3e03de..0000000000--- a/saleor/static/dashboard-next/components/AppLayout/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export { default } from "./AppLayout";-export * from "./AppLayout";diff --git a/saleor/static/dashboard-next/components/FileUpload/FileUpload.tsx b/saleor/static/dashboard-next/components/FileUpload/FileUpload.tsxindex b089616aeb..40d2b3c7ae 100644--- a/saleor/static/dashboard-next/components/FileUpload/FileUpload.tsx+++ b/saleor/static/dashboard-next/components/FileUpload/FileUpload.tsx@@ -12,6 +12,9 @@ interface FileUploadProps {}const decorate = withStyles(theme => ({+ fileUploadField: {+ display: "none"+ },root: {display: "flex" as "flex"},@@ -27,7 +30,7 @@ const FileUpload = decorate<FileUploadProps>(name={name}onChange={onChange}ref={ref => (this.upload = ref)}- style={{ display: "none" }}+ className={classes.fileUploadField}type="file"value={value}/>diff --git a/saleor/static/dashboard-next/components/PriceField/PriceField.tsx b/saleor/static/dashboard-next/components/PriceField/PriceField.tsxindex d92ae77653..f041324de0 100644--- a/saleor/static/dashboard-next/components/PriceField/PriceField.tsx+++ b/saleor/static/dashboard-next/components/PriceField/PriceField.tsx@@ -7,15 +7,15 @@ import { withStyles } from "@material-ui/core/styles";import * as React from "react";interface PriceRangeFieldProps {- currencySymbol?: string;+ currencySymbol: string;disabled?: boolean;error?: boolean;hint?: string;label?: string;- name?: string;- value?: {- max?: string | number;- min?: string | number;+ name: string;+ value: {+ max: string | number;+ min: string | number;};onChange(event: any);}diff --git a/saleor/static/dashboard-next/customers/components/CustomerDetails/CustomerDetails.tsx b/saleor/static/dashboard-next/customers/components/CustomerDetails/CustomerDetails.tsxindex d3d452dad8..e0d74f9032 100644--- a/saleor/static/dashboard-next/customers/components/CustomerDetails/CustomerDetails.tsx+++ b/saleor/static/dashboard-next/customers/components/CustomerDetails/CustomerDetails.tsx@@ -46,6 +46,9 @@ const decorate = withStyles(theme => ({},title: {display: "inline-block" as "inline-block"+ },+ userJoinDate: {+ display: "inline"}}));const CustomerDetails = decorate<CustomerDetailsProps>(@@ -92,7 +95,7 @@ const CustomerDetails = decorate<CustomerDetailsProps>(<div className={classes.date}><Typographycomponent="span"- style={{ display: "inline" }}+ className={classes.userJoinDate}variant="caption">{i18n.t("Joined")}diff --git a/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx b/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsxindex 911582cfba..a06d19a616 100644--- a/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx+++ b/saleor/static/dashboard-next/products/components/ProductAttributesForm/ProductAttributesForm.tsx@@ -22,37 +22,34 @@ interface ProductAttributesFormProps {onChange(event: any);}-const decorate = withStyles(theme => ({}));-export const ProductAttributesForm = decorate<ProductAttributesFormProps>(- ({ classes, attributes, data, disabled, onChange }) => (- <Card>- <PageHeader title={i18n.t("Attributes")} />- <CardContent>- {attributes ? (- attributes.map((item, index) => {- return (- <React.Fragment key={index}>- <SingleSelectField- disabled={disabled}- name={item.attribute.slug}- label={item.attribute.name}- onChange={onChange}- value={data[item.attribute.slug]}- choices={item.attribute.values.map(choice => ({- label: choice.name,- value: choice.slug- }))}- key={index}- />- <FormSpacer />- </React.Fragment>- )- })- ) : (- <Skeleton />- )}- </CardContent>- </Card>- )+export const ProductAttributesForm: React.StatelessComponent<+ ProductAttributesFormProps+> = ({ attributes, data, disabled, onChange }) => (+ <Card>+ <PageHeader title={i18n.t("Attributes")} />+ <CardContent>+ {attributes ? (+ attributes.map((item, index) => (+ <React.Fragment key={index}>+ <SingleSelectField+ disabled={disabled}+ name={item.attribute.slug}+ label={item.attribute.name}+ onChange={onChange}+ value={data[item.attribute.slug]}+ choices={item.attribute.values.map(choice => ({+ label: choice.name,+ value: choice.slug+ }))}+ key={index}+ />+ <FormSpacer />+ </React.Fragment>+ ))+ ) : (+ <Skeleton />+ )}+ </CardContent>+ </Card>);export default ProductAttributesForm;diff --git a/saleor/static/dashboard-next/products/components/ProductPrice/ProductPrice.tsx b/saleor/static/dashboard-next/products/components/ProductPrice/ProductPrice.tsxdeleted file mode 100644index e01db08450..0000000000--- a/saleor/static/dashboard-next/products/components/ProductPrice/ProductPrice.tsx+++ /dev/null@@ -1,96 +0,0 @@-import Card from "@material-ui/core/Card";-import CardContent from "@material-ui/core/CardContent";-import { withStyles } from "@material-ui/core/styles";-import Table from "@material-ui/core/Table";-import TableBody from "@material-ui/core/TableBody";-import TableCell from "@material-ui/core/TableCell";-import TableRow from "@material-ui/core/TableRow";-import * as React from "react";--import Money from "../../../components/Money";-import PageHeader from "../../../components/PageHeader";-import i18n from "../../../i18n";-import Skeleton from "../../../components/Skeleton";-import { MoneyType } from "../..";--interface ProductPriceProps {- purchaseCost?: {- start: MoneyType;- stop: MoneyType;- };- margin?: {- start: number;- stop: number;- };-}--const decorate = withStyles(theme => ({- root: {- "& td, & th": {- paddingRight: theme.spacing.unit * 3- }- },- textRight: {- textAlign: "right" as "right"- }-}));--const ProductPrice = decorate<ProductPriceProps>(- ({ classes, margin, purchaseCost }) => (- <Card>- <PageHeader title={i18n.t("Pricing")} />- <Table className={classes.root}>- <TableBody>- <TableRow>- <TableCell>{i18n.t("Purchase cost")}</TableCell>- <TableCell className={classes.textRight}>- {purchaseCost ? (- purchaseCost.start.amount === purchaseCost.stop.amount ? (- <>- <Money- amount={purchaseCost.start.amount}- currency={purchaseCost.start.currency}- typographyProps={{- component: "span",- style: { display: "inline" }- }}- />- {" - "}- <Money- amount={purchaseCost.start.amount}- currency={purchaseCost.start.currency}- typographyProps={{- component: "span",- style: { display: "inline" }- }}- />- </>- ) : (- <Money- amount={purchaseCost.start.amount}- currency={purchaseCost.start.currency}- typographyProps={{- component: "span",- style: { display: "inline" }- }}- />- )- ) : (- <Skeleton />- )}- </TableCell>- </TableRow>- <TableRow hover>- <TableCell>{i18n.t("Margin")}</TableCell>- <TableCell className={classes.textRight}>- {margin ? `${margin.start} % - ${margin.stop}%` : <Skeleton />}- </TableCell>- </TableRow>- </TableBody>- </Table>- </Card>- )-);--ProductPrice.displayName = "ProductPrice";-export default ProductPrice;diff --git a/saleor/static/dashboard-next/products/components/ProductPrice/index.ts b/saleor/static/dashboard-next/products/components/ProductPrice/index.tsdeleted file mode 100644index 7360c03879..0000000000--- a/saleor/static/dashboard-next/products/components/ProductPrice/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export { default } from "./ProductPrice";-export * from "./ProductPrice";diff --git a/saleor/static/dashboard-next/products/views/ProductList.tsx b/saleor/static/dashboard-next/products/views/ProductList.tsxindex 0e2ca39174..671f90b530 100644--- a/saleor/static/dashboard-next/products/views/ProductList.tsx+++ b/saleor/static/dashboard-next/products/views/ProductList.tsx@@ -56,25 +56,23 @@ export const ProductList = decorate<ProductListProps>(({ classes, params }) => (loading);return (- <>- <div>- <ProductListCard- onAdd={() => navigate(productAddUrl)}- disabled={loading}- products={- data &&- data.products !== undefined &&- data.products !== null- ? data.products.edges.map(p => p.node)- : undefined- }- onNextPage={loadNextPage}- onPreviousPage={loadPreviousPage}- pageInfo={pageInfo}- onRowClick={id => () => navigate(productUrl(id))}- />- </div>- </>+ <div>+ <ProductListCard+ onAdd={() => navigate(productAddUrl)}+ disabled={loading}+ products={+ data &&+ data.products !== undefined &&+ data.products !== null+ ? data.products.edges.map(p => p.node)+ : undefined+ }+ onNextPage={loadNextPage}+ onPreviousPage={loadPreviousPage}+ pageInfo={pageInfo}+ onRowClick={id => () => navigate(productUrl(id))}+ />+ </div>);}}</TypedProductListQuery>diff --git a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snapindex da0ea674c4..72938fcc4e 100644--- a/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap+++ b/saleor/static/dashboard-next/storybook/__snapshots__/Stories.test.ts.snap@@ -2433,60 +2433,9 @@ exports[`Storyshots Generics / PriceRangeField disabled 1`] = `aria-required="false"class="MuiInput-input-id MuiInput-disabled-id MuiInput-inputType-id"disabled=""- name="price_min"+ name="priceField_min"type="number"- value=""- />- <span />- </div>- </div>- <span- class="Component-separator-id"- >- -- </span>- <div- class="MuiFormControl-root-id"- >- <div- class="MuiInput-root-id MuiInput-disabled-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"- >- <input- aria-invalid="false"- aria-required="false"- class="MuiInput-input-id MuiInput-disabled-id MuiInput-inputType-id"- disabled=""- name="price_max"- type="number"- value=""- />- <span />- </div>- </div>- </div>-</div>-`;--exports[`Storyshots Generics / PriceRangeField with currency symbol 1`] = `-<div- class="Component-widgetContainer-id"->- <div- class="Component-inputContainer-id"- >- <div- class="MuiFormControl-root-id"- >- <div- class="MuiInput-root-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"- >- <input- aria-invalid="false"- aria-required="false"- class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"- type="number"- value=""+ value="10"/><divclass="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"@@ -2494,7 +2443,7 @@ exports[`Storyshots Generics / PriceRangeField with currency symbol 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -2508,15 +2457,16 @@ exports[`Storyshots Generics / PriceRangeField with currency symbol 1`] = `class="MuiFormControl-root-id"><div- class="MuiInput-root-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"+ class="MuiInput-root-id MuiInput-disabled-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"><inputaria-invalid="false"aria-required="false"- class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ class="MuiInput-input-id MuiInput-disabled-id MuiInput-inputType-id"+ disabled=""+ name="priceField_max"type="number"- value=""+ value="30"/><divclass="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"@@ -2524,7 +2474,7 @@ exports[`Storyshots Generics / PriceRangeField with currency symbol 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -2550,11 +2500,19 @@ exports[`Storyshots Generics / PriceRangeField with hint 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"- value=""+ value="10"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div><pclass="MuiFormHelperText-root-id"@@ -2577,11 +2535,19 @@ exports[`Storyshots Generics / PriceRangeField with hint 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"- value=""+ value="30"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div></div>@@ -2599,9 +2565,9 @@ exports[`Storyshots Generics / PriceRangeField with label 1`] = `class="MuiFormControl-root-id"><label- class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id"- data-shrink="false"- for="price_min"+ class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"+ data-shrink="true"+ for="priceField_min">Lorem ipsum</label>@@ -2612,11 +2578,19 @@ exports[`Storyshots Generics / PriceRangeField with label 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"- value=""+ value="10"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div><span@@ -2634,11 +2608,19 @@ exports[`Storyshots Generics / PriceRangeField with label 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"- value=""+ value="30"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div></div>@@ -2656,9 +2638,9 @@ exports[`Storyshots Generics / PriceRangeField with label and hint 1`] = `class="MuiFormControl-root-id"><label- class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id"- data-shrink="false"- for="price_min"+ class="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"+ data-shrink="true"+ for="priceField_min">Lorem</label>@@ -2669,11 +2651,19 @@ exports[`Storyshots Generics / PriceRangeField with label and hint 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"- value=""+ value="10"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div><pclass="MuiFormHelperText-root-id"@@ -2696,61 +2686,19 @@ exports[`Storyshots Generics / PriceRangeField with label and hint 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"- type="number"- value=""- />- <span />- </div>- </div>- </div>-</div>-`;--exports[`Storyshots Generics / PriceRangeField with no value 1`] = `-<div- class="Component-widgetContainer-id"->- <div- class="Component-inputContainer-id"- >- <div- class="MuiFormControl-root-id"- >- <div- class="MuiInput-root-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"- >- <input- aria-invalid="false"- aria-required="false"- class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"- type="number"- value=""- />- <span />- </div>- </div>- <span- class="Component-separator-id"- >- -- </span>- <div- class="MuiFormControl-root-id"- >- <div- class="MuiInput-root-id MuiInput-fullWidth-id MuiInput-formControl-id MuiInput-underline-id Component-pullDown-id"- >- <input- aria-invalid="false"- aria-required="false"- class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"- value=""+ value="30"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div></div>@@ -2774,11 +2722,19 @@ exports[`Storyshots Generics / PriceRangeField with value 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"value="10"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div><span@@ -2796,11 +2752,19 @@ exports[`Storyshots Generics / PriceRangeField with value 1`] = `aria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"value="30"/>- <span />+ <div+ class="MuiInputAdornment-root-id MuiInputAdornment-positionEnd-id"+ >+ <p+ class="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id"+ >+ USD+ </p>+ </div></div></div></div>@@ -2820,7 +2784,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<labelclass="MuiFormLabel-root-id MuiFormLabel-error-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"data-shrink="true"- for="price_min"+ for="priceField_min">Lorem</label>@@ -2831,7 +2795,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symboaria-invalid="true"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"value="10"/>@@ -2841,7 +2805,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -2866,7 +2830,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symboaria-invalid="true"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"value="30"/>@@ -2876,7 +2840,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -2898,7 +2862,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<labelclass="MuiFormLabel-root-id MuiInputLabel-root-id MuiInputLabel-formControl-id MuiInputLabel-animated-id MuiInputLabel-shrink-id"data-shrink="true"- for="price_min"+ for="priceField_min">Lorem</label>@@ -2909,7 +2873,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symboaria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_min"+ name="priceField_min"type="number"value="10"/>@@ -2919,7 +2883,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -2944,7 +2908,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symboaria-invalid="false"aria-required="false"class="MuiInput-input-id MuiInput-inputType-id"- name="price_max"+ name="priceField_max"type="number"value="30"/>@@ -2954,7 +2918,7 @@ exports[`Storyshots Generics / PriceRangeField with value, label, currency symbo<pclass="MuiTypography-root-id MuiTypography-body1-id MuiTypography-colorTextSecondary-id">- $+ USD</p></div></div>@@ -13098,9 +13062,7 @@ exports[`Storyshots Views / Categories / Category details default 1`] = `class="Component-action-id"/></div>- <div- class="Component-root-id"- >+ <div><divclass="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">@@ -13163,544 +13125,552 @@ Tell lose part purpose do when. Whatever drug contain particularly defense.</div></div><div- class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"+ class="Component-cardContainer-id"><div- class="Component-root-id"- >- <aside- class="MuiTypography-root-id MuiTypography-body2-id Component-title-id"- >- Categories- </aside>- <div- class="Component-toolbar-id"- >- <button- class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"- tabindex="0"- type="button"- >- <span- class="MuiButton-label-id"- >- Add category- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>- </div>- </div>- <div- class="Component-children-id"- />- <hr- class="Component-hr-id"- />- <ul- class="MuiList-root-id MuiList-padding-id"+ class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"><div- class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"- role="button"- tabindex="0"+ class="Component-root-id">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id MuiListItemIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <aside+ class="MuiTypography-root-id MuiTypography-body2-id Component-title-id">- <g>- <path- d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"- />- </g>- </svg>+ Categories+ </aside><div- class="MuiListItemText-root-id"+ class="Component-toolbar-id">- <span- class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ <button+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"+ tabindex="0"+ type="button">- Lorem ipsum dolor- </span>+ <span+ class="MuiButton-label-id"+ >+ Add category+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button></div>- <span- class="MuiTouchRipple-root-id"- /></div><div- class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"- role="button"- tabindex="0"+ class="Component-children-id"+ />+ <hr+ class="Component-hr-id"+ />+ <ul+ class="MuiList-root-id MuiList-padding-id">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id MuiListItemIcon-root-id"- focusable="false"- viewBox="0 0 24 24"- >- <g>- <path- d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"- />- </g>- </svg><div- class="MuiListItemText-root-id"+ class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"+ role="button"+ tabindex="0">+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiListItemIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <g>+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </g>+ </svg>+ <div+ class="MuiListItemText-root-id"+ >+ <span+ class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ >+ Lorem ipsum dolor+ </span>+ </div><span- class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ class="MuiTouchRipple-root-id"+ />+ </div>+ <div+ class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"+ role="button"+ tabindex="0"+ >+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiListItemIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24">- Mauris vehicula tortor vulputate- </span>+ <g>+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </g>+ </svg>+ <div+ class="MuiListItemText-root-id"+ >+ <span+ class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ >+ Mauris vehicula tortor vulputate+ </span>+ </div>+ <span+ class="MuiTouchRipple-root-id"+ /></div>- <span- class="MuiTouchRipple-root-id"- />- </div>- </ul>+ </ul>+ </div></div><div- class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"+ class="Component-cardContainer-id"><div- class="Component-root-id"+ class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">- <aside- class="MuiTypography-root-id MuiTypography-body2-id Component-title-id"- >- Products- </aside><div- class="Component-toolbar-id"+ class="Component-root-id">- <button- class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"- tabindex="0"- type="button"+ <aside+ class="MuiTypography-root-id MuiTypography-body2-id Component-title-id">- <span- class="MuiButton-label-id"+ Products+ </aside>+ <div+ class="Component-toolbar-id"+ >+ <button+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"+ tabindex="0"+ type="button">- Add product- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>+ <span+ class="MuiButton-label-id"+ >+ Add product+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button>+ </div></div>- </div>- <div- class="Component-children-id"- />- <hr- class="Component-hr-id"- />- <table- class="MuiTable-root-id"- >- <thead- class="MuiTableHead-root-id"+ <div+ class="Component-children-id"+ />+ <hr+ class="Component-hr-id"+ />+ <table+ class="MuiTable-root-id">- <tr- class="MuiTableRow-root-id MuiTableRow-head-id"+ <thead+ class="MuiTableHead-root-id">- <th- class="MuiTableCell-root-id MuiTableCell-head-id"- scope="col"- />- <th- class="MuiTableCell-root-id MuiTableCell-head-id Component-textLeft-id"- scope="col"- >- Name- </th>- <th- class="MuiTableCell-root-id MuiTableCell-head-id"- scope="col"+ <tr+ class="MuiTableRow-root-id MuiTableRow-head-id">- Type- </th>- </tr>- </thead>- <tfoot- class="MuiTableFooter-root-id"- >- <tr- class="MuiTableRow-root-id MuiTableRow-footer-id"+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id"+ scope="col"+ />+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id Component-textLeft-id"+ scope="col"+ >+ Name+ </th>+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id"+ scope="col"+ >+ Type+ </th>+ </tr>+ </thead>+ <tfoot+ class="MuiTableFooter-root-id">- <td- class="MuiTableCell-root-id MuiTableCell-footer-id TablePagination-root-id"- colspan="3"+ <tr+ class="MuiTableRow-root-id MuiTableRow-footer-id">- <div- class="MuiToolbar-root-id MuiToolbar-gutters-id TablePagination-toolbar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-footer-id TablePagination-root-id"+ colspan="3"><div- class="TablePagination-spacer-id"- />- <div- class="TablePaginationActions-root-id"+ class="MuiToolbar-root-id MuiToolbar-gutters-id TablePagination-toolbar-id">- <button- class="MuiButtonBase-root-id MuiIconButton-root-id"- tabindex="0"- type="button"+ <div+ class="TablePagination-spacer-id"+ />+ <div+ class="TablePaginationActions-root-id">- <span- class="MuiIconButton-label-id"+ <button+ class="MuiButtonBase-root-id MuiIconButton-root-id"+ tabindex="0"+ type="button">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <span+ class="MuiIconButton-label-id">- <path- d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"- />- </svg>- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>- <button- class="MuiButtonBase-root-id MuiIconButton-root-id"- tabindex="0"- type="button"- >- <span- class="MuiIconButton-label-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button>+ <button+ class="MuiButtonBase-root-id MuiIconButton-root-id"+ tabindex="0"+ type="button">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <span+ class="MuiIconButton-label-id">- <path- d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"- />- </svg>- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button>+ </div></div>- </div>- </td>- </tr>- </tfoot>- <tbody- class="MuiTableBody-root-id"- >- <tr- class="MuiTableRow-root-id"+ </td>+ </tr>+ </tfoot>+ <tbody+ class="MuiTableBody-root-id">- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ <tr+ class="MuiTableRow-root-id">- <div- class="MuiAvatar-root-id Component-avatar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"- >- <span- class="Component-link-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- Tasty Frozen Tuna- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- systemic- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <span+ class="Component-link-id"+ >+ Tasty Frozen Tuna+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ systemic+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <span- class="Component-link-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- Incredible Rubber Computer- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- Villages- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"- >- <span- class="Component-link-id"+ <span+ class="Component-link-id"+ >+ Incredible Rubber Computer+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- Intelligent Frozen Soap- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- efficient- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ Villages+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <div- class="MuiAvatar-root-id Component-avatar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"- >- <span- class="Component-link-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- Rustic Plastic Chips- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- Buckinghamshire- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <span+ class="Component-link-id"+ >+ Intelligent Frozen Soap+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ efficient+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <span- class="Component-link-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- Awesome Fresh Chicken- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- Future- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"- >- <span- class="Component-link-id"+ <span+ class="Component-link-id"+ >+ Rustic Plastic Chips+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- Refined Frozen Chicken- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- dot-com- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ Buckinghamshire+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <div- class="MuiAvatar-root-id Component-avatar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"- >- <span- class="Component-link-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- Practical Concrete Fish- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- Public-key- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <span+ class="Component-link-id"+ >+ Awesome Fresh Chicken+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ Future+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <span- class="Component-link-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- Licensed Steel Ball- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- payment- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "- >- <div- class="MuiAvatar-root-id Component-avatar-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ <span+ class="Component-link-id"+ >+ Refined Frozen Chicken+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id"+ >+ dot-com+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <span- class="Component-link-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- Sleek Wooden Pants- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ >+ <span+ class="Component-link-id"+ >+ Practical Concrete Fish+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id"+ >+ Public-key+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- Music- </td>- </tr>- <tr- class="MuiTableRow-root-id"- >- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ >+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ >+ <span+ class="Component-link-id"+ >+ Licensed Steel Ball+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id"+ >+ payment+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <div- class="MuiAvatar-root-id Component-avatar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- <img- class="MuiAvatar-img-id"- src="placeholder60x60.png"- />- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ >+ <span+ class="Component-link-id"+ >+ Sleek Wooden Pants+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id"+ >+ Music+ </td>+ </tr>+ <tr+ class="MuiTableRow-root-id">- <span- class="Component-link-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- Practical Steel Shirt- </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- International- </td>- </tr>- </tbody>- </table>+ <div+ class="MuiAvatar-root-id Component-avatar-id"+ >+ <img+ class="MuiAvatar-img-id"+ src="placeholder60x60.png"+ />+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-textLeft-id"+ >+ <span+ class="Component-link-id"+ >+ Practical Steel Shirt+ </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id"+ >+ International+ </td>+ </tr>+ </tbody>+ </table>+ </div></div></div></div>@@ -13751,76 +13721,76 @@ exports[`Storyshots Views / Categories / Category details when in root 1`] = `</button></div></div>- <div- class="Component-root-id"- >- <div- class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"- >- <ul- class="MuiList-root-id MuiList-padding-id"+ <div>+ <div>+ <div+ class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">- <div- class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"- role="button"- tabindex="0"+ <ul+ class="MuiList-root-id MuiList-padding-id">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id MuiListItemIcon-root-id"- focusable="false"- viewBox="0 0 24 24"- >- <g>- <path- d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"- />- </g>- </svg><div- class="MuiListItemText-root-id"+ class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"+ role="button"+ tabindex="0">- <span- class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiListItemIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24">- Lorem ipsum dolor- </span>+ <g>+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </g>+ </svg>+ <div+ class="MuiListItemText-root-id"+ >+ <span+ class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ >+ Lorem ipsum dolor+ </span>+ </div>+ <span+ class="MuiTouchRipple-root-id"+ /></div>- <span- class="MuiTouchRipple-root-id"- />- </div>- <div- class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"- role="button"- tabindex="0"- >- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id MuiListItemIcon-root-id"- focusable="false"- viewBox="0 0 24 24"- >- <g>- <path- d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"- />- </g>- </svg><div- class="MuiListItemText-root-id"+ class="MuiButtonBase-root-id MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id MuiListItem-button-id"+ role="button"+ tabindex="0">- <span- class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiListItemIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24">- Mauris vehicula tortor vulputate- </span>+ <g>+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </g>+ </svg>+ <div+ class="MuiListItemText-root-id"+ >+ <span+ class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ >+ Mauris vehicula tortor vulputate+ </span>+ </div>+ <span+ class="MuiTouchRipple-root-id"+ /></div>- <span- class="MuiTouchRipple-root-id"- />- </div>- </ul>+ </ul>+ </div></div></div></div>@@ -13849,9 +13819,7 @@ exports[`Storyshots Views / Categories / Category details when loading 1`] = `class="Component-action-id"/></div>- <div- class="Component-root-id"- >+ <div><divclass="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">@@ -13913,251 +13881,259 @@ exports[`Storyshots Views / Categories / Category details when loading 1`] = `</div></div><div- class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"+ class="Component-cardContainer-id"><div- class="Component-root-id"+ class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">- <aside- class="MuiTypography-root-id MuiTypography-body2-id Component-title-id"- >- Categories- </aside><div- class="Component-toolbar-id"+ class="Component-root-id">- <button- class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"- tabindex="0"- type="button"+ <aside+ class="MuiTypography-root-id MuiTypography-body2-id Component-title-id">- <span- class="MuiButton-label-id"+ Categories+ </aside>+ <div+ class="Component-toolbar-id"+ >+ <button+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"+ tabindex="0"+ type="button">- Add category- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>+ <span+ class="MuiButton-label-id"+ >+ Add category+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button>+ </div></div>- </div>- <div- class="Component-children-id"- />- <hr- class="Component-hr-id"- />- <ul- class="MuiList-root-id MuiList-padding-id"- >- <li- class="MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id"+ <div+ class="Component-children-id"+ />+ <hr+ class="Component-hr-id"+ />+ <ul+ class="MuiList-root-id MuiList-padding-id">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id MuiListItemIcon-root-id"- focusable="false"- viewBox="0 0 24 24"- >- <g>- <path- d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"- />- </g>- </svg>- <div- class="MuiListItemText-root-id"+ <li+ class="MuiListItem-root-id MuiListItem-default-id MuiListItem-gutters-id">- <span- class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id MuiListItemIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <g>+ <path+ d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"+ />+ </g>+ </svg>+ <div+ class="MuiListItemText-root-id"><span- class="Skeleton-skeleton-id"+ class="MuiTypography-root-id MuiTypography-subheading-id MuiListItemText-primary-id">- + <span+ class="Skeleton-skeleton-id"+ >+ + </span></span>- </span>- </div>- </li>- </ul>+ </div>+ </li>+ </ul>+ </div></div><div- class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id"+ class="Component-cardContainer-id"><div- class="Component-root-id"+ class="MuiPaper-root-id MuiPaper-elevation2-id MuiPaper-rounded-id MuiCard-root-id">- <aside- class="MuiTypography-root-id MuiTypography-body2-id Component-title-id"- >- Products- </aside><div- class="Component-toolbar-id"+ class="Component-root-id">- <button- class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"- tabindex="0"- type="button"+ <aside+ class="MuiTypography-root-id MuiTypography-body2-id Component-title-id">- <span- class="MuiButton-label-id"+ Products+ </aside>+ <div+ class="Component-toolbar-id"+ >+ <button+ class="MuiButtonBase-root-id MuiButton-root-id MuiButton-textSecondary-id MuiButton-flat-id MuiButton-flatSecondary-id"+ tabindex="0"+ type="button">- Add product- </span>- <span- class="MuiTouchRipple-root-id"- />- </button>+ <span+ class="MuiButton-label-id"+ >+ Add product+ </span>+ <span+ class="MuiTouchRipple-root-id"+ />+ </button>+ </div></div>- </div>- <div- class="Component-children-id"- />- <hr- class="Component-hr-id"- />- <table- class="MuiTable-root-id"- >- <thead- class="MuiTableHead-root-id"+ <div+ class="Component-children-id"+ />+ <hr+ class="Component-hr-id"+ />+ <table+ class="MuiTable-root-id">- <tr- class="MuiTableRow-root-id MuiTableRow-head-id"+ <thead+ class="MuiTableHead-root-id">- <th- class="MuiTableCell-root-id MuiTableCell-head-id"- scope="col"- />- <th- class="MuiTableCell-root-id MuiTableCell-head-id Component-textLeft-id"- scope="col"- >- Name- </th>- <th- class="MuiTableCell-root-id MuiTableCell-head-id"- scope="col"+ <tr+ class="MuiTableRow-root-id MuiTableRow-head-id">- Type- </th>- </tr>- </thead>- <tfoot- class="MuiTableFooter-root-id"- >- <tr- class="MuiTableRow-root-id MuiTableRow-footer-id"+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id"+ scope="col"+ />+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id Component-textLeft-id"+ scope="col"+ >+ Name+ </th>+ <th+ class="MuiTableCell-root-id MuiTableCell-head-id"+ scope="col"+ >+ Type+ </th>+ </tr>+ </thead>+ <tfoot+ class="MuiTableFooter-root-id">- <td- class="MuiTableCell-root-id MuiTableCell-footer-id TablePagination-root-id"- colspan="3"+ <tr+ class="MuiTableRow-root-id MuiTableRow-footer-id">- <div- class="MuiToolbar-root-id MuiToolbar-gutters-id TablePagination-toolbar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-footer-id TablePagination-root-id"+ colspan="3"><div- class="TablePagination-spacer-id"- />- <div- class="TablePaginationActions-root-id"+ class="MuiToolbar-root-id MuiToolbar-gutters-id TablePagination-toolbar-id">- <button- class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiIconButton-root-id MuiIconButton-disabled-id"- disabled=""- tabindex="-1"- type="button"+ <div+ class="TablePagination-spacer-id"+ />+ <div+ class="TablePaginationActions-root-id">- <span- class="MuiIconButton-label-id"+ <button+ class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiIconButton-root-id MuiIconButton-disabled-id"+ disabled=""+ tabindex="-1"+ type="button">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <span+ class="MuiIconButton-label-id">- <path- d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"- />- </svg>- </span>- </button>- <button- class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiIconButton-root-id MuiIconButton-disabled-id"- disabled=""- tabindex="-1"- type="button"- >- <span- class="MuiIconButton-label-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"+ />+ </svg>+ </span>+ </button>+ <button+ class="MuiButtonBase-root-id MuiButtonBase-disabled-id MuiIconButton-root-id MuiIconButton-disabled-id"+ disabled=""+ tabindex="-1"+ type="button">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <span+ class="MuiIconButton-label-id">- <path- d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"- />- </svg>- </span>- </button>+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <path+ d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"+ />+ </svg>+ </span>+ </button>+ </div></div>- </div>- </td>- </tr>- </tfoot>- <tbody- class="MuiTableBody-root-id"- >- <tr- class="MuiTableRow-root-id"+ </td>+ </tr>+ </tfoot>+ <tbody+ class="MuiTableBody-root-id">- <td- class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id "+ <tr+ class="MuiTableRow-root-id">- <div- class="MuiAvatar-root-id MuiAvatar-colorDefault-id Component-avatar-id"+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id Component-root-id ">- <svg- aria-hidden="true"- class="MuiSvgIcon-root-id"- focusable="false"- viewBox="0 0 24 24"+ <div+ class="MuiAvatar-root-id MuiAvatar-colorDefault-id Component-avatar-id">- <g>- <path- d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"- />- </g>- </svg>- </div>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- <span- class="Skeleton-skeleton-id"+ <svg+ aria-hidden="true"+ class="MuiSvgIcon-root-id"+ focusable="false"+ viewBox="0 0 24 24"+ >+ <g>+ <path+ d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"+ />+ </g>+ </svg>+ </div>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- - </span>- </td>- <td- class="MuiTableCell-root-id MuiTableCell-body-id"- >- <span- class="Skeleton-skeleton-id"+ <span+ class="Skeleton-skeleton-id"+ >+ + </span>+ </td>+ <td+ class="MuiTableCell-root-id MuiTableCell-body-id">- - </span>- </td>- </tr>- </tbody>- </table>+ <span+ class="Skeleton-skeleton-id"+ >+ + </span>+ </td>+ </tr>+ </tbody>+ </table>+ </div></div></div></div>@@ -14673,8 +14649,8 @@ exports[`Storyshots Views / Collections / Collection details default 1`] = `class="Component-root-id"><input+ class="Component-fileUploadField-id"name="backgroundImage"- style="display:none"type="file"value=""/>@@ -15012,7 +14988,7 @@ exports[`Storyshots Views / Collections / Collection details default 1`] = `<pclass="MuiFormHelperText-root-id">- Slug is being used to create collection URL+ Slugs are used to create nice URLs for collection pages</p></div></div>@@ -15166,9 +15142,9 @@ exports[`Storyshots Views / Collections / Collection details when loading 1`] =class="Component-root-id"><input+ class="Component-fileUploadField-id"disabled=""name="backgroundImage"- style="display:none"type="file"value=""/>@@ -15507,7 +15483,7 @@ exports[`Storyshots Views / Collections / Collection details when loading 1`] =<pclass="MuiFormHelperText-root-id">- Slug is being used to create collection URL+ Slugs are used to create nice URLs for collection pages</p></div></div>@@ -16263,8 +16239,7 @@ exports[`Storyshots Views / Customers / Customer details default 1`] = `class="Component-date-id"><span- class="MuiTypography-root-id MuiTypography-caption-id"- style="display:inline"+ class="MuiTypography-root-id MuiTypography-caption-id Component-userJoinDate-id">Joined</span>@@ -33786,7 +33761,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- PYG595+ PYG 595</td></tr><tr@@ -33829,7 +33804,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- GMD432.08+ GMD 432.08</td></tr><tr@@ -33872,7 +33847,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- WST73.74+ WST 73.74</td></tr><tr@@ -33915,7 +33890,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- MWK27.68+ MWK 27.68</td></tr><tr@@ -33958,7 +33933,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- WST440.79+ WST 440.79</td></tr><tr@@ -34001,7 +33976,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- HRK398.96+ HRK 398.96</td></tr><tr@@ -34044,7 +34019,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- HUF959.31+ HUF 959.31</td></tr><tr@@ -34087,7 +34062,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- PKR593+ PKR 593</td></tr><tr@@ -34130,7 +34105,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- SHP62.01+ SHP 62.01</td></tr><tr@@ -34173,7 +34148,7 @@ exports[`Storyshots Views / Products / Product list default 1`] = `<tdclass="MuiTableCell-root-id MuiTableCell-body-id">- UZS197+ UZS 197</td></tr></tbody>@@ -36871,7 +36846,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- RON10.00+ RON 10.00</p></td></tr>@@ -37124,7 +37099,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- PGK20.00+ PGK 20.00</p></td></tr>@@ -37181,7 +37156,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- KGS80.00+ KGS 80.00</p></td></tr>@@ -37479,7 +37454,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- DJF30+ DJF 30</p></td></tr>@@ -37536,7 +37511,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- GNF70+ GNF 70</p></td></tr>@@ -37646,7 +37621,7 @@ exports[`Storyshots Views / Vouchers / Voucher list default 1`] = `<pclass="MuiTypography-root-id MuiTypography-body1-id Component-tableCellFont-id">- RWF30+ RWF 30</p></td></tr>diff --git a/saleor/static/dashboard-next/storybook/stories/categories/CategoryDeleteDialog.tsx b/saleor/static/dashboard-next/storybook/stories/categories/CategoryDeleteDialog.tsxindex 3249304f89..19fd175968 100644--- a/saleor/static/dashboard-next/storybook/stories/categories/CategoryDeleteDialog.tsx+++ b/saleor/static/dashboard-next/storybook/stories/categories/CategoryDeleteDialog.tsx@@ -15,6 +15,7 @@ storiesOf("Categories / CategoryDeleteDialog", module)open={true}onClose={() => {}}onConfirm={() => {}}+ productCount={0}/>)).add("with products", () => (diff --git a/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsxindex a7335fe9c1..1dca11dacf 100644--- a/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx+++ b/saleor/static/dashboard-next/storybook/stories/components/PriceField.tsx@@ -9,40 +9,70 @@ const value = {};storiesOf("Generics / PriceRangeField", module)- .add("with no value", () => <PriceRangeField onChange={() => {}} />).add("with value", () => (- <PriceRangeField value={value} onChange={() => {}} />+ <PriceRangeField+ currencySymbol="USD"+ name="priceField"+ onChange={() => {}}+ value={value}+ />)).add("with label", () => (- <PriceRangeField label="Lorem ipsum" onChange={() => {}} />+ <PriceRangeField+ currencySymbol="USD"+ label="Lorem ipsum"+ name="priceField"+ onChange={() => {}}+ value={value}+ />)).add("with hint", () => (- <PriceRangeField hint="Lorem ipsum" onChange={() => {}} />+ <PriceRangeField+ currencySymbol="USD"+ hint="Lorem ipsum"+ name="priceField"+ onChange={() => {}}+ value={value}+ />))- .add("with currency symbol", () => (- <PriceRangeField currencySymbol="$" onChange={() => {}} />+ .add("disabled", () => (+ <PriceRangeField+ currencySymbol="USD"+ disabled+ name="priceField"+ onChange={() => {}}+ value={value}+ />))- .add("disabled", () => <PriceRangeField disabled onChange={() => {}} />).add("with label and hint", () => (- <PriceRangeField label="Lorem" hint="Ipsum" onChange={() => {}} />+ <PriceRangeField+ currencySymbol="USD"+ hint="Ipsum"+ label="Lorem"+ name="priceField"+ onChange={() => {}}+ value={value}+ />)).add("with value, label, currency symbol and hint", () => (<PriceRangeField- value={value}- label="Lorem"+ currencySymbol="USD"hint="Ipsum"+ label="Lorem"+ name="priceField"onChange={() => {}}- currencySymbol="$"+ value={value}/>)).add("with value, label, currency symbol and error", () => (<PriceRangeField- value={value}- label="Lorem"- hint="Ipsum"+ currencySymbol="USD"error={true}+ hint="Ipsum"+ label="Lorem"+ name="priceField"onChange={() => {}}- currencySymbol="$"+ value={value}/>));diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherDate/VoucherDate.tsx b/saleor/static/dashboard-next/vouchers/components/VoucherDate/VoucherDate.tsxdeleted file mode 100644index 4fe937b363..0000000000--- a/saleor/static/dashboard-next/vouchers/components/VoucherDate/VoucherDate.tsx+++ /dev/null@@ -1,60 +0,0 @@-import Card from "@material-ui/core/Card";-import CardContent from "@material-ui/core/CardContent";-import { withStyles } from "@material-ui/core/styles";-import TextField from "@material-ui/core/TextField";-import * as React from "react";--import { FormSpacer } from "../../../components/FormSpacer";-import i18n from "../../../i18n";--interface VoucherDateProps {- disabled?: boolean;- data: {- startDate: string;- endDate: string | null;- usageLimit: number | null;- };- onChange?(event: React.ChangeEvent<any>);-}--const decorate = withStyles(theme => ({ root: {} }));-const VoucherDate = decorate<VoucherDateProps>(- ({ classes, data, disabled, onChange }) => (- <Card>- <CardContent>- <TextField- InputLabelProps={{ shrink: true }}- disabled={disabled}- fullWidth- label={i18n.t("Active since")}- name="startDate"- onChange={onChange}- type="date"- value={data.startDate}- />- <FormSpacer />- <TextField- InputLabelProps={{ shrink: true }}- disabled={disabled}- fullWidth- label={i18n.t("Active until")}- name="endDate"- onChange={onChange}- type="date"- value={data.endDate}- />- <FormSpacer />- <TextField- disabled={disabled}- fullWidth- label={i18n.t("Usage limit")}- name="usageLimit"- onChange={onChange}- value={data.usageLimit}- />- </CardContent>- </Card>- )-);-VoucherDate.displayName = "VoucherDate";-export default VoucherDate;diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherDate/index.ts b/saleor/static/dashboard-next/vouchers/components/VoucherDate/index.tsdeleted file mode 100644index 1756689280..0000000000--- a/saleor/static/dashboard-next/vouchers/components/VoucherDate/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export { default } from "./VoucherDate";-export * from "./VoucherDate";diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherDetailsPage/VoucherDetailsPage.tsx b/saleor/static/dashboard-next/vouchers/components/VoucherDetailsPage/VoucherDetailsPage.tsxindex 582146d230..e2c4ba5901 100644--- a/saleor/static/dashboard-next/vouchers/components/VoucherDetailsPage/VoucherDetailsPage.tsx+++ b/saleor/static/dashboard-next/vouchers/components/VoucherDetailsPage/VoucherDetailsPage.tsx@@ -13,9 +13,9 @@ import SaveButtonBar, {} from "../../../components/SaveButtonBar";import Toggle from "../../../components/Toggle";import i18n from "../../../i18n";-import VoucherDate from "../VoucherDate/VoucherDate";import VoucherDetails from "../VoucherDetails/VoucherDetails";import VoucherProperties from "../VoucherProperties/VoucherProperties";+import VoucherUsability from "../VoucherUsability";interface VoucherDetailsPageProps {disabled?: boolean;@@ -177,7 +177,7 @@ const VoucherDetailsPage = decorate<VoucherDetailsPageProps>(/></div><div>- <VoucherDate+ <VoucherUsabilitydisabled={disabled}onChange={change}data={data}diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherUsability/VoucherUsability.tsx b/saleor/static/dashboard-next/vouchers/components/VoucherUsability/VoucherUsability.tsxnew file mode 100644index 0000000000..8ebc462f2c--- /dev/null+++ b/saleor/static/dashboard-next/vouchers/components/VoucherUsability/VoucherUsability.tsx@@ -0,0 +1,61 @@+import Card from "@material-ui/core/Card";+import CardContent from "@material-ui/core/CardContent";+import { withStyles } from "@material-ui/core/styles";+import TextField from "@material-ui/core/TextField";+import * as React from "react";++import { FormSpacer } from "../../../components/FormSpacer";+import i18n from "../../../i18n";++interface VoucherDateProps {+ disabled?: boolean;+ data: {+ startDate: string;+ endDate: string | null;+ usageLimit: number | null;+ };+ onChange?(event: React.ChangeEvent<any>);+}++const VoucherUsability: React.StatelessComponent<VoucherDateProps> = ({+ data,+ disabled,+ onChange+}) => (+ <Card>+ <CardContent>+ <TextField+ InputLabelProps={{ shrink: true }}+ disabled={disabled}+ fullWidth+ label={i18n.t("Active since")}+ name="startDate"+ onChange={onChange}+ type="date"+ value={data.startDate}+ />+ <FormSpacer />+ <TextField+ InputLabelProps={{ shrink: true }}+ disabled={disabled}+ fullWidth+ label={i18n.t("Active until")}+ name="endDate"+ onChange={onChange}+ type="date"+ value={data.endDate}+ />+ <FormSpacer />+ <TextField+ disabled={disabled}+ fullWidth+ label={i18n.t("Usage limit")}+ name="usageLimit"+ onChange={onChange}+ value={data.usageLimit}+ />+ </CardContent>+ </Card>+);+VoucherUsability.displayName = "VoucherUsability";+export default VoucherUsability;diff --git a/saleor/static/dashboard-next/vouchers/components/VoucherUsability/index.ts b/saleor/static/dashboard-next/vouchers/components/VoucherUsability/index.tsnew file mode 100644index 0000000000..e8bd9d276d--- /dev/null+++ b/saleor/static/dashboard-next/vouchers/components/VoucherUsability/index.ts@@ -0,0 +1,2 @@+export { default } from "./VoucherUsability";+export * from "./VoucherUsability";