@jetshop/template-trend 5.12.1 → 5.12.4
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/ui/Modal/ModalProvider.linaria.css +1 -0
- package/package.json +5 -5
- package/schema.graphql +14 -0
- package/src/components/CategoryPage/Filters/SortOrders.js +3 -7
- package/src/components/CategoryPage/ProductGrid.js +2 -0
- package/src/components/Forms/Success.js +1 -1
- package/src/components/MyPages/ChangePasswordPage.js +1 -0
- package/src/components/ProductPage/ProductPage.js +6 -2
- package/src/shop.config.js +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.preventBodyScrollStyle_p1chftlb{overflow:hidden;}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetshop/template-trend",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.4",
|
|
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.12.
|
|
48
|
+
"@jetshop/core": "^5.12.4",
|
|
49
49
|
"@jetshop/flight-shortcodes": "^2.0.10",
|
|
50
|
-
"@jetshop/intl": "^5.12.
|
|
51
|
-
"@jetshop/react-scripts": "^5.12.
|
|
52
|
-
"@jetshop/ui": "^5.12.
|
|
50
|
+
"@jetshop/intl": "^5.12.4",
|
|
51
|
+
"@jetshop/react-scripts": "^5.12.4",
|
|
52
|
+
"@jetshop/ui": "^5.12.4",
|
|
53
53
|
"@react-google-maps/api": "~1.7.0",
|
|
54
54
|
"prop-types": "^15.6.2",
|
|
55
55
|
"react": "^16.9.0",
|
package/schema.graphql
CHANGED
|
@@ -181,6 +181,7 @@ type Category implements Document {
|
|
|
181
181
|
mainHeader: String
|
|
182
182
|
content: String
|
|
183
183
|
externalId: String
|
|
184
|
+
externalDiscountId: String
|
|
184
185
|
images: [CategoryImage]
|
|
185
186
|
|
|
186
187
|
"""
|
|
@@ -715,6 +716,7 @@ type DeleteCustomerProductListResult {
|
|
|
715
716
|
}
|
|
716
717
|
|
|
717
718
|
type Discount {
|
|
719
|
+
externalId: ID
|
|
718
720
|
name: String
|
|
719
721
|
value: Price
|
|
720
722
|
description: String
|
|
@@ -888,6 +890,11 @@ type MultiListFilterList {
|
|
|
888
890
|
items: [ListFilterItem]!
|
|
889
891
|
}
|
|
890
892
|
|
|
893
|
+
type MultipleContent {
|
|
894
|
+
notFoundIds: [ID]!
|
|
895
|
+
content: [Content]!
|
|
896
|
+
}
|
|
897
|
+
|
|
891
898
|
type Mutation {
|
|
892
899
|
subscribeToStockNotifications(email: String!, articleNumber: String!): Boolean
|
|
893
900
|
|
|
@@ -1137,6 +1144,7 @@ type Order {
|
|
|
1137
1144
|
orderDate: DateTime
|
|
1138
1145
|
currency: Currency
|
|
1139
1146
|
attachments: [OrderAttachment]
|
|
1147
|
+
orderPurchaseLocation: String
|
|
1140
1148
|
}
|
|
1141
1149
|
|
|
1142
1150
|
type OrderAddress {
|
|
@@ -1561,6 +1569,7 @@ type Product implements Document {
|
|
|
1561
1569
|
"""
|
|
1562
1570
|
configurations: [ProductConfiguration]
|
|
1563
1571
|
hasConfigurations: Boolean!
|
|
1572
|
+
hasFamilyMembers: Boolean!
|
|
1564
1573
|
|
|
1565
1574
|
"""
|
|
1566
1575
|
Calculates the price of the product based on the configuration choices that's
|
|
@@ -1852,6 +1861,11 @@ type Query {
|
|
|
1852
1861
|
"""Get information on person by Key(personal id number or phone number)"""
|
|
1853
1862
|
personLookup(key: String!): PersonLookup
|
|
1854
1863
|
|
|
1864
|
+
"""
|
|
1865
|
+
Returns Content found by list of its IDs. Also not found Content IDs are listed.
|
|
1866
|
+
"""
|
|
1867
|
+
content(ids: [String]!): MultipleContent
|
|
1868
|
+
|
|
1855
1869
|
"""get channel by id, null gets default channel"""
|
|
1856
1870
|
channel(id: String): Channel
|
|
1857
1871
|
|
|
@@ -24,12 +24,8 @@ export const SortOrders = ({ sortOrders }) => {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
function SortOrderDropdown({ sortOrders }) {
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
changeSortOrder,
|
|
30
|
-
sortOrder,
|
|
31
|
-
direction
|
|
32
|
-
} = useSortOrder({ sortOrders });
|
|
27
|
+
const { mappedSortOrder, changeSortOrder, sortOrder, direction } =
|
|
28
|
+
useSortOrder({ sortOrders });
|
|
33
29
|
|
|
34
30
|
const activeItem = mappedSortOrder.find(
|
|
35
31
|
item => item.direction === direction && item.value === sortOrder
|
|
@@ -48,7 +44,7 @@ function SortOrderDropdown({ sortOrders }) {
|
|
|
48
44
|
onSelect={() =>
|
|
49
45
|
changeSortOrder(sortItem.value, sortItem.direction)
|
|
50
46
|
}
|
|
51
|
-
key={sortItem.value}
|
|
47
|
+
key={`${sortItem.value}-${sortItem.direction}`}
|
|
52
48
|
>
|
|
53
49
|
{sortItem.text}
|
|
54
50
|
{activeItem === sortItem && <StyledCheck />}
|
|
@@ -61,6 +61,7 @@ export function ProductGrid({
|
|
|
61
61
|
category = '',
|
|
62
62
|
loading,
|
|
63
63
|
className,
|
|
64
|
+
categoryPath,
|
|
64
65
|
...rest
|
|
65
66
|
}) {
|
|
66
67
|
const track = useTracker();
|
|
@@ -86,6 +87,7 @@ export function ProductGrid({
|
|
|
86
87
|
product={product}
|
|
87
88
|
style={{ opacity: loading ? 0.5 : 1 }}
|
|
88
89
|
list={listName}
|
|
90
|
+
categoryPath={categoryPath}
|
|
89
91
|
loadImageEagerly={isAboveFold(index)}
|
|
90
92
|
{...rest}
|
|
91
93
|
>
|
|
@@ -120,7 +120,7 @@ const ProductContainer = styled('div')`
|
|
|
120
120
|
}
|
|
121
121
|
`;
|
|
122
122
|
|
|
123
|
-
const Product = ({ result: { data, loading }, product }) => {
|
|
123
|
+
const Product = ({ result: { data, loading }, product, partialProduct }) => {
|
|
124
124
|
const initialVariant = useVariantFromUrl();
|
|
125
125
|
const t = useIntl();
|
|
126
126
|
|
|
@@ -132,13 +132,17 @@ const Product = ({ result: { data, loading }, product }) => {
|
|
|
132
132
|
const { selectedVariant: selectedVariation, getMissingOptions } =
|
|
133
133
|
variantHandler;
|
|
134
134
|
|
|
135
|
+
if (!product) {
|
|
136
|
+
product = partialProduct;
|
|
137
|
+
}
|
|
135
138
|
// Return early if there is no product
|
|
136
|
-
if (!product)
|
|
139
|
+
if (!product) {
|
|
137
140
|
return (
|
|
138
141
|
<ProductContainer>
|
|
139
142
|
<ProductPageLoadingState />
|
|
140
143
|
</ProductContainer>
|
|
141
144
|
);
|
|
145
|
+
}
|
|
142
146
|
|
|
143
147
|
const images = product.images ?? [];
|
|
144
148
|
const parents = getParentOrCanonicalRoute(data?.route?.parents, product);
|