@jetshop/template-trend 5.11.1 → 5.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.linaria-cache/packages/template-trend/src/components/StartPage/CategoryList.linaria.css +6 -6
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageCampaign.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/StartPage/Content/StartPageHero.linaria.css +1 -1
- package/.linaria-cache/packages/template-trend/src/components/ui/Button.linaria.css +3 -2
- package/.vscode/launch.json +11 -0
- package/package.json +5 -5
- package/src/components/Cart/queries/cartFragment.gql +1 -5
- package/src/components/CategoryPage/CategoryHeader.js +3 -3
- package/src/components/CategoryPage/ProductCard.js +1 -1
- package/src/components/CategoryPage/ProductGrid.js +3 -2
- package/src/components/CategoryPage/ProductGridWindow.js +3 -2
- package/src/components/CategoryPage/StandardCategoryPage.js +2 -0
- package/src/components/CategoryPage/WindowedCategoryPage.js +7 -0
- package/src/components/Layout/Header/AutocompleteQuery.gql +1 -6
- package/src/components/ProductPage/Images/ImageContainer.js +12 -1
- package/src/components/ProductPage/ProductInfo.js +1 -1
- package/src/components/ProductPage/ProductPage.js +3 -5
- package/src/components/ProductPage/ProductPageFragment.gql +1 -0
- package/src/components/ProductPage/StockStatus/WarehouseStock.js +15 -17
- package/src/components/RouteQuery.gql +2 -2
- package/src/components/StartPage/Content/StartPageHero.js +1 -1
- package/src/components/StartPage/StartPageProductGridFragment.gql +1 -0
- package/src/components/ui/Button.js +19 -1
- package/.linaria-cache/packages/ui/ChannelSelector/Region.linaria.css +0 -3
package/.linaria-cache/packages/template-trend/src/components/StartPage/CategoryList.linaria.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
4
|
-
.
|
|
5
|
-
.
|
|
6
|
-
.
|
|
1
|
+
.ScrollWrapper_s140peh{margin:0 -1.5rem;padding:0 1.5rem 3rem;}@media (max-width:49.99rem){.ScrollWrapper_s140peh{-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}}@media (max-width:39.99rem){.ScrollWrapper_s140peh{margin:0 0;padding:0 1rem 3rem;}}
|
|
2
|
+
.CategoriesWrapper_c1o22ktz{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;margin-right:-0.5rem;margin-left:-0.5rem;}.CategoriesWrapper_c1o22ktz:hover > a > div{opacity:0.8;}@media (max-width:49.99rem){.CategoriesWrapper_c1o22ktz > a{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:160px;}}
|
|
3
|
+
.CategoryCard_c11pqhux{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background:#ffffff;box-shadow:4px 8px 32px rgba(0,0,0,0.1);-webkit-transition:all 250ms ease-in-out;transition:all 250ms ease-in-out;width:100%;height:100%;position:relative;}
|
|
4
|
+
.CardPaddingWrapper_c1l548id{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:0 1 auto;-ms-flex:0 1 auto;flex:0 1 auto;-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:stretch;-webkit-justify-content:stretch;-ms-flex-pack:stretch;justify-content:stretch;width:50%;padding-left:0.5rem;padding-right:0.5rem;max-width:16rem;-webkit-text-decoration:none;text-decoration:none;}@media (min-width:50rem){.CardPaddingWrapper_c1l548id{width:33.33333333333333%;}}@media (min-width:64rem){.CardPaddingWrapper_c1l548id{width:20%;}}.CardPaddingWrapper_c1l548id:hover > div,.CardPaddingWrapper_c1l548id:focus > div,.CardPaddingWrapper_c1l548id:active > div{opacity:1 !important;box-shadow:4px 8px 32px rgba(0,0,0,0.1), 4px 8px 40px rgba(0,0,0,0.1);-webkit-transform:translate(0,-2px);-ms-transform:translate(0,-2px);transform:translate(0,-2px);-webkit-transition-duration:100ms;transition-duration:100ms;z-index:2;}
|
|
5
|
+
.CategoryName_cmpnef6{text-align:center;font-weight:bold;font-size:16px;text-transform:uppercase;color:#000;-webkit-text-decoration:none;text-decoration:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:3rem;}@media (min-width:50rem){.CategoryName_cmpnef6{height:5rem;}}
|
|
6
|
+
.CategoriesHeader_cmtbqnf{margin-bottom:1rem;font-size:24px;}@media (max-width:39.99rem){.CategoriesHeader_cmtbqnf{font-size:18px;margin-left:1rem;}}
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.Container_c1mpoa17{padding-top:60px;padding-bottom:60px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}@media (max-width:49.99rem){.Container_c1mpoa17{-webkit-flex-direction:column-reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse;padding-top:40px;padding-bottom:0;}}
|
|
2
2
|
.Title_t143zagb{font-size:40px;font-weight:900;margin-bottom:18px;}@media (max-width:49.99rem){.Title_t143zagb{font-size:24px;}}
|
|
3
3
|
.Description_dw9n0yg{width:400px;max-width:100%;margin-bottom:30px;line-height:1.45em;}@media (max-width:49.99rem){.Description_dw9n0yg{font-size:16px;margin-left:auto;margin-right:auto;}}
|
|
4
|
-
.StyledButton_sdlteok
|
|
4
|
+
.StyledButton_sdlteok{width:176px;height:56px;}@media (max-width:49.99rem){.StyledButton_sdlteok{margin-left:auto;margin-right:auto;}}
|
|
5
5
|
@media (min-width:50rem){.Column_c3tz8u6:first-child{margin-right:1rem;}.Column_c3tz8u6:last-child{margin-left:60px;}}
|
|
6
6
|
.ImageColumn_i1ymieme.Column_c3tz8u6{height:386px;width:50%;}@media (max-width:49.99rem){.ImageColumn_i1ymieme.Column_c3tz8u6{width:100%;padding-bottom:48px;}}
|
|
7
7
|
.TextColumn_tvojnoy.Column_c3tz8u6{width:50%;}@media (max-width:49.99rem){.TextColumn_tvojnoy.Column_c3tz8u6{width:100%;padding-bottom:48px;text-align:center;}}.TextColumn_tvojnoy.Column_c3tz8u6.rightAlign{text-align:end;}.TextColumn_tvojnoy.Column_c3tz8u6.rightAlign > *{float:right;}
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
.Container_cisv5dw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:white;height:100%;text-align:center;}
|
|
3
3
|
.Title_t16em3cz{font-size:64px;font-weight:900;margin-bottom:18px;}@media (max-width:49.99rem){.Title_t16em3cz{font-size:30px;margin-bottom:12px;}}
|
|
4
4
|
.Description_d10uwce4{width:420px;font-size:20px;max-width:100%;margin-bottom:30px;line-height:1.45em;}@media (max-width:49.99rem){.Description_d10uwce4{width:100%;font-size:16px;padding-left:0.75rem;padding-right:0.75rem;}}
|
|
5
|
-
.StyledButton_sxbg28i
|
|
5
|
+
.StyledButton_sxbg28i{width:176px;height:46px;}@media (max-width:39.99rem){.StyledButton_sxbg28i{width:138px;height:32px;font-size:14px;}}
|
|
6
6
|
.heroStyles_htsirq5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
.Button_bsyf8ar{background-color:#146DE1;border-color:#146DE1;color:white;font-size:16px;border-radius:4px;padding:0.5rem 1rem;height:54px;}.Button_bsyf8ar span{margin-right:12px;}.Button_bsyf8ar svg{fill:white;height:1em;width:1em;margin-right:1em;}@media (min-width:50rem){.Button_bsyf8ar{max-width:100%;}}.Button_bsyf8ar:disabled{border:1px solid #dedede;opacity:0.5;}.Button_bsyf8ar.secondary{background-color:white;border:1px solid #333;color:#333;}.Button_bsyf8ar.secondary circle.path{stroke:black;}
|
|
2
|
-
.
|
|
3
|
-
.
|
|
2
|
+
.TrendABase_t168987g{background-color:#146DE1;border-color:#146DE1;color:white;font-size:16px;border-radius:4px;padding:0.5rem 1rem;height:54px;-webkit-text-decoration:none;text-decoration:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:54px;}.TrendABase_t168987g span{margin-right:12px;}.TrendABase_t168987g svg{fill:white;height:1em;width:1em;margin-right:1em;}@media (min-width:50rem){.TrendABase_t168987g{max-width:100%;}}.TrendABase_t168987g:disabled{border:1px solid #dedede;opacity:0.5;}.TrendABase_t168987g.secondary{background-color:white;border:1px solid #333;color:#333;}.TrendABase_t168987g.secondary circle.path{stroke:black;}
|
|
3
|
+
.TrendLinkBase_t15bfm3m{background-color:#146DE1;border-color:#146DE1;color:white;font-size:16px;border-radius:4px;padding:0.5rem 1rem;height:54px;-webkit-text-decoration:none;text-decoration:none;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:54px;}.TrendLinkBase_t15bfm3m span{margin-right:12px;}.TrendLinkBase_t15bfm3m svg{fill:white;height:1em;width:1em;margin-right:1em;}@media (min-width:50rem){.TrendLinkBase_t15bfm3m{max-width:100%;}}.TrendLinkBase_t15bfm3m:disabled{border:1px solid #dedede;opacity:0.5;}.TrendLinkBase_t15bfm3m.secondary{background-color:white;border:1px solid #333;color:#333;}.TrendLinkBase_t15bfm3m.secondary circle.path{stroke:black;}
|
|
4
|
+
.StyledSpinner_s1yqqynf.Spinner_s281cpt{height:25px;}.StyledSpinner_s1yqqynf.Spinner_s281cpt circle.path{stroke:white;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetshop/template-trend",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "react-scripts build",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@jetshop/core": "^5.11.
|
|
48
|
+
"@jetshop/core": "^5.11.2",
|
|
49
49
|
"@jetshop/flight-shortcodes": "^2.0.10",
|
|
50
|
-
"@jetshop/intl": "^5.11.
|
|
51
|
-
"@jetshop/react-scripts": "^5.11.
|
|
52
|
-
"@jetshop/ui": "^5.11.
|
|
50
|
+
"@jetshop/intl": "^5.11.2",
|
|
51
|
+
"@jetshop/react-scripts": "^5.11.2",
|
|
52
|
+
"@jetshop/ui": "^5.11.2",
|
|
53
53
|
"@react-google-maps/api": "~1.7.0",
|
|
54
54
|
"prop-types": "^15.6.2",
|
|
55
55
|
"react": "^16.9.0",
|
|
@@ -82,6 +82,7 @@ fragment Cart on Cart {
|
|
|
82
82
|
primaryRoute {
|
|
83
83
|
id
|
|
84
84
|
path
|
|
85
|
+
breadcrumbs
|
|
85
86
|
}
|
|
86
87
|
customFields {
|
|
87
88
|
key
|
|
@@ -97,11 +98,6 @@ fragment Cart on Cart {
|
|
|
97
98
|
title
|
|
98
99
|
url
|
|
99
100
|
}
|
|
100
|
-
canonicalCategory {
|
|
101
|
-
primaryRoute {
|
|
102
|
-
path
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
101
|
}
|
|
106
102
|
variantOptionNames
|
|
107
103
|
}
|
|
@@ -109,12 +109,11 @@ const CategoryHeader = ({
|
|
|
109
109
|
category,
|
|
110
110
|
parents,
|
|
111
111
|
imageSrc,
|
|
112
|
-
breadcrumbs
|
|
112
|
+
breadcrumbs,
|
|
113
113
|
content
|
|
114
114
|
}) => {
|
|
115
|
-
const { value } = breadcrumbs;
|
|
116
115
|
const breadcrumbProps = {
|
|
117
|
-
|
|
116
|
+
breadcrumbs,
|
|
118
117
|
parents
|
|
119
118
|
};
|
|
120
119
|
const isImageBackground =
|
|
@@ -130,6 +129,7 @@ const CategoryHeader = ({
|
|
|
130
129
|
quality={80}
|
|
131
130
|
className={headerImageStyles}
|
|
132
131
|
critical={true}
|
|
132
|
+
sizes={[1, 1, 1, 1, 1216]}
|
|
133
133
|
>
|
|
134
134
|
<Content
|
|
135
135
|
category={category}
|
|
@@ -58,6 +58,7 @@ export function isAboveFold(index) {
|
|
|
58
58
|
export function ProductGrid({
|
|
59
59
|
products,
|
|
60
60
|
listName,
|
|
61
|
+
category = '',
|
|
61
62
|
loading,
|
|
62
63
|
className,
|
|
63
64
|
...rest
|
|
@@ -68,8 +69,8 @@ export function ProductGrid({
|
|
|
68
69
|
if (!products || products.length === 0) return;
|
|
69
70
|
|
|
70
71
|
// Otherwise track a list view event
|
|
71
|
-
track(trackListEvent({ listName, products }));
|
|
72
|
-
}, [listName, products, track]);
|
|
72
|
+
track(trackListEvent({ listName, products, category }));
|
|
73
|
+
}, [listName, products, track, category]);
|
|
73
74
|
|
|
74
75
|
if (!products) return null;
|
|
75
76
|
|
|
@@ -27,6 +27,7 @@ function ProductGridWindow({
|
|
|
27
27
|
prevOffset,
|
|
28
28
|
itemsPerRow,
|
|
29
29
|
categoryPath,
|
|
30
|
+
category = '',
|
|
30
31
|
...rest
|
|
31
32
|
}) {
|
|
32
33
|
// Track product listing
|
|
@@ -36,8 +37,8 @@ function ProductGridWindow({
|
|
|
36
37
|
if (!products || products.length === 0) return;
|
|
37
38
|
|
|
38
39
|
// Otherwise track a list view event
|
|
39
|
-
track(trackListEvent({ listName, products }));
|
|
40
|
-
}, [listName, products, track]);
|
|
40
|
+
track(trackListEvent({ listName, products, category }));
|
|
41
|
+
}, [listName, products, track, category]);
|
|
41
42
|
|
|
42
43
|
const renderProduct = useMemo(
|
|
43
44
|
() =>
|
|
@@ -44,6 +44,7 @@ const Category = ({ category, result }) => {
|
|
|
44
44
|
<CategoryHeader
|
|
45
45
|
category={category}
|
|
46
46
|
parents={result?.data?.route?.parents}
|
|
47
|
+
breadcrumbs={result?.data?.route?.breadcrumbs}
|
|
47
48
|
/>
|
|
48
49
|
|
|
49
50
|
<Container>
|
|
@@ -63,6 +64,7 @@ const Category = ({ category, result }) => {
|
|
|
63
64
|
products={category.products.result}
|
|
64
65
|
listName={category.name}
|
|
65
66
|
categoryPath={category.isDynamic ? null : result?.data?.route}
|
|
67
|
+
category={result?.data?.route?.breadcrumbs?.join('/') || ''}
|
|
66
68
|
loading={result.loading}
|
|
67
69
|
imageSizes={[1 / 2, 1 / 2, 1 / 3, 1 / 4]}
|
|
68
70
|
/>
|
|
@@ -78,6 +78,11 @@ const WindowedCategory = ({ category, result }) => {
|
|
|
78
78
|
category={category}
|
|
79
79
|
parents={result?.data?.route?.parents}
|
|
80
80
|
{...props}
|
|
81
|
+
breadcrumbs={
|
|
82
|
+
props.breadcrumbs?.value
|
|
83
|
+
? result?.data?.route?.breadcrumbs
|
|
84
|
+
: []
|
|
85
|
+
}
|
|
81
86
|
/>
|
|
82
87
|
</div>
|
|
83
88
|
)
|
|
@@ -89,6 +94,7 @@ const WindowedCategory = ({ category, result }) => {
|
|
|
89
94
|
<CategoryHeader
|
|
90
95
|
category={category}
|
|
91
96
|
parents={result?.data?.route?.parents}
|
|
97
|
+
breadcrumbs={result?.data?.route?.breadcrumbs}
|
|
92
98
|
/>
|
|
93
99
|
)}
|
|
94
100
|
<Container>
|
|
@@ -130,6 +136,7 @@ const WindowedCategory = ({ category, result }) => {
|
|
|
130
136
|
products={products}
|
|
131
137
|
listName={category.name}
|
|
132
138
|
categoryPath={categoryPath}
|
|
139
|
+
category={result?.data?.route?.breadcrumbs?.join('/') || ''}
|
|
133
140
|
loading={result.loading}
|
|
134
141
|
imageSizes={[1 / 2, 1 / 2, 1 / 3, 1 / 4]}
|
|
135
142
|
/>
|
|
@@ -26,9 +26,20 @@ export default function ImageContainer({ images, badges, variant, ...rest }) {
|
|
|
26
26
|
variant
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
+
const selectedVariantImageIndex = variant
|
|
30
|
+
? images.findIndex(image => image.url === variant.images?.[0]?.url)
|
|
31
|
+
: null;
|
|
32
|
+
|
|
29
33
|
return (
|
|
30
34
|
<div {...rest} className={cx(rest.className, wrapper)}>
|
|
31
|
-
<Gallery
|
|
35
|
+
<Gallery
|
|
36
|
+
aspect={'1:1'}
|
|
37
|
+
images={images}
|
|
38
|
+
galleryRef={galleryRef}
|
|
39
|
+
eagerlyLoad={
|
|
40
|
+
selectedVariantImageIndex ? [0, selectedVariantImageIndex] : [0]
|
|
41
|
+
}
|
|
42
|
+
>
|
|
32
43
|
<Badges badges={badges} />
|
|
33
44
|
</Gallery>
|
|
34
45
|
</div>
|
|
@@ -56,7 +56,7 @@ const ProductInfo = ({ product }) => {
|
|
|
56
56
|
/>
|
|
57
57
|
</ProductSection>
|
|
58
58
|
)}
|
|
59
|
-
{product.customFields
|
|
59
|
+
{product.customFields?.length > 0 && (
|
|
60
60
|
<ProductSection>
|
|
61
61
|
<SectionHeading>{t('Specifications')}</SectionHeading>
|
|
62
62
|
<ProductSpecifications fields={product.customFields} />
|
|
@@ -129,10 +129,8 @@ const Product = ({ result: { data, loading }, product }) => {
|
|
|
129
129
|
preselectCheapest: true
|
|
130
130
|
});
|
|
131
131
|
|
|
132
|
-
const {
|
|
133
|
-
|
|
134
|
-
getMissingOptions
|
|
135
|
-
} = variantHandler;
|
|
132
|
+
const { selectedVariant: selectedVariation, getMissingOptions } =
|
|
133
|
+
variantHandler;
|
|
136
134
|
|
|
137
135
|
// Return early if there is no product
|
|
138
136
|
if (!product)
|
|
@@ -150,8 +148,8 @@ const Product = ({ result: { data, loading }, product }) => {
|
|
|
150
148
|
<ProductContainer>
|
|
151
149
|
<MaxWidth>
|
|
152
150
|
<Breadcrumbs
|
|
151
|
+
breadcrumbs={data?.route?.breadcrumbs || []}
|
|
153
152
|
parents={parents}
|
|
154
|
-
breadcrumbText={product.breadcrumbText}
|
|
155
153
|
/>
|
|
156
154
|
</MaxWidth>
|
|
157
155
|
<Container>
|
|
@@ -207,21 +207,19 @@ const WarehouseStock = ({ product, variantHandler }) => {
|
|
|
207
207
|
|
|
208
208
|
const WarehouseStockItem = ({ item, missingOptions, validation }) => {
|
|
209
209
|
return (
|
|
210
|
-
|
|
211
|
-
<
|
|
212
|
-
<
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
</WarehouseStockWrapper>
|
|
224
|
-
</>
|
|
210
|
+
<WarehouseStockWrapper className="warehouse-stock-wrapper">
|
|
211
|
+
<p className="stock-status-header">
|
|
212
|
+
<span className="store-icon">
|
|
213
|
+
<StoreIcon />
|
|
214
|
+
</span>
|
|
215
|
+
<span className="header-title">{t('Find product in store')}</span>
|
|
216
|
+
</p>
|
|
217
|
+
<WarehouseValidation
|
|
218
|
+
validation={validation}
|
|
219
|
+
missingOptions={missingOptions}
|
|
220
|
+
item={item}
|
|
221
|
+
/>
|
|
222
|
+
</WarehouseStockWrapper>
|
|
225
223
|
);
|
|
226
224
|
};
|
|
227
225
|
|
|
@@ -257,7 +255,7 @@ function WarehouseValidation({ validation, missingOptions, item }) {
|
|
|
257
255
|
<WarehouseStockItemContent
|
|
258
256
|
warehouse={warehouse}
|
|
259
257
|
productVariant={productVariant}
|
|
260
|
-
key
|
|
258
|
+
key={warehouse.location?.id}
|
|
261
259
|
/>
|
|
262
260
|
))}
|
|
263
261
|
</ul>
|
|
@@ -295,7 +293,7 @@ const WarehouseStockItemContent = ({ warehouse, productVariant }) => {
|
|
|
295
293
|
}
|
|
296
294
|
|
|
297
295
|
return (
|
|
298
|
-
<li
|
|
296
|
+
<li className="warehouse-list-item">
|
|
299
297
|
<div className="warehouse-name">
|
|
300
298
|
<span>{warehouse.location?.name}</span>
|
|
301
299
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#import "@jetshop/core/data/fragments/
|
|
1
|
+
#import "@jetshop/core/data/fragments/RouteMetaFragment.gql"
|
|
2
2
|
#import "@jetshop/core/data/fragments/HeadFragment.gql"
|
|
3
3
|
#import "./CategoryPage/CategoryPageFragment.gql"
|
|
4
4
|
#import "./ContentPage/ContentPageFragment.gql"
|
|
@@ -12,7 +12,7 @@ query route(
|
|
|
12
12
|
$filters: FilterInput
|
|
13
13
|
) {
|
|
14
14
|
route(path: $path) {
|
|
15
|
-
...
|
|
15
|
+
...RouteMeta
|
|
16
16
|
object {
|
|
17
17
|
...Head
|
|
18
18
|
...CategoryPage
|
|
@@ -5,6 +5,7 @@ import { Link } from 'react-router-dom';
|
|
|
5
5
|
import Spinner from './Spinner';
|
|
6
6
|
import t from '@jetshop/intl';
|
|
7
7
|
import { theme } from '../Theme';
|
|
8
|
+
import { isRelativeUrl } from '@jetshop/core/helpers/isRelativeUrl';
|
|
8
9
|
|
|
9
10
|
export const baseStyles = `
|
|
10
11
|
background-color: ${theme.colors.blue};
|
|
@@ -47,7 +48,7 @@ const Button = styled('button')`
|
|
|
47
48
|
${baseStyles};
|
|
48
49
|
`;
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
const TrendABase = styled('a')`
|
|
51
52
|
${baseStyles};
|
|
52
53
|
text-decoration: none;
|
|
53
54
|
display: flex;
|
|
@@ -56,6 +57,23 @@ export const TrendLink = styled(Link)`
|
|
|
56
57
|
height: 54px;
|
|
57
58
|
`;
|
|
58
59
|
|
|
60
|
+
const TrendLinkBase = styled(Link)`
|
|
61
|
+
${baseStyles};
|
|
62
|
+
text-decoration: none;
|
|
63
|
+
display: flex;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
align-items: center;
|
|
66
|
+
height: 54px;
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
export function TrendLink({ to, ...props }) {
|
|
70
|
+
return typeof to === 'string' && !isRelativeUrl(to) ? (
|
|
71
|
+
<TrendABase href={to} {...props} />
|
|
72
|
+
) : (
|
|
73
|
+
<TrendLinkBase to={to} {...props} />
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
59
77
|
const StyledSpinner = styled(Spinner)`
|
|
60
78
|
height: 25px;
|
|
61
79
|
circle.path {
|