@jetshop/template-trend 5.12.3 → 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.
@@ -0,0 +1,11 @@
1
+ {
2
+ "configurations": [
3
+ {
4
+ "type": "node-terminal",
5
+ "name": "Run Script: start",
6
+ "request": "launch",
7
+ "command": "yarn run start",
8
+ "cwd": "${workspaceFolder}"
9
+ }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetshop/template-trend",
3
- "version": "5.12.3",
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.3",
48
+ "@jetshop/core": "^5.12.4",
49
49
  "@jetshop/flight-shortcodes": "^2.0.10",
50
- "@jetshop/intl": "^5.12.3",
51
- "@jetshop/react-scripts": "^5.12.3",
52
- "@jetshop/ui": "^5.12.3",
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",
@@ -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
  >
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  export function Success({ children, className }) {
5
5
  return (
6
6
  <div className={cx(success, className)}>
7
- <div>{children}</div>
7
+ <div data-testid="success-message">{children}</div>
8
8
  </div>
9
9
  );
10
10
  }
@@ -54,6 +54,7 @@ function ChangePassword() {
54
54
  <PrimaryButton
55
55
  type="submit"
56
56
  disabled={isSubmitting || !isValid}
57
+ data-testid="save-password-button"
57
58
  >
58
59
  {t('Save')}
59
60
  </PrimaryButton>
@@ -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);
@@ -75,6 +75,7 @@ const config = {
75
75
  Category: [LoadableStandardCategoryPage, LoadableWindowedCategoryPage],
76
76
  Page: [ContentPage]
77
77
  }
78
- }
78
+ },
79
+ usePrimaryRouteForProducts: false
79
80
  };
80
81
  export default config;