@graphcommerce/magento-wishlist 7.0.0-canary.21 → 7.0.1-canary.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,184 @@
1
1
  # @graphcommerce/magento-wishlist
2
2
 
3
- ## 7.0.0-canary.21
3
+ ## 7.0.1-canary.0
4
+
5
+ ## 7.0.0
6
+
7
+ ### Patch Changes
8
+
9
+ - [#1945](https://github.com/graphcommerce-org/graphcommerce/pull/1945) [`3bfa3b9dd`](https://github.com/graphcommerce-org/graphcommerce/commit/3bfa3b9ddf8724b31b8f6dfc2281c58dc3f44cad) - Fixed wishlist not being shown in menu when hideForGuest is enabled (eventhough the user is logged in) ([@bramvanderholst](https://github.com/bramvanderholst))
10
+
11
+ - [#1945](https://github.com/graphcommerce-org/graphcommerce/pull/1945) [`0a5f12aeb`](https://github.com/graphcommerce-org/graphcommerce/commit/0a5f12aebc8ea960980cb423445d14d253a0da5a) - Prevent horizontal overflow in wishlist on (small) mobile devices ([@bramvanderholst](https://github.com/bramvanderholst))
12
+
13
+ - [#1930](https://github.com/graphcommerce-org/graphcommerce/pull/1930) [`c8d023e9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c8d023e9e874131cd9f8fe192b1fca5fe1a26ee3) - Fix the 'close menu' on search and add the option to secondary menu items ([@StefanAngenent](https://github.com/StefanAngenent))
14
+
15
+ - [#1944](https://github.com/graphcommerce-org/graphcommerce/pull/1944) [`ff138050f`](https://github.com/graphcommerce-org/graphcommerce/commit/ff138050f92aad28f0f27a9f2ecd478dc6acfec1) - Wishlist would be limited to 24 products, but doesn't have pagination ([@paales](https://github.com/paales))
16
+
17
+ ## 6.2.0-canary.98
18
+
19
+ ## 6.2.0-canary.97
20
+
21
+ ## 6.2.0-canary.96
22
+
23
+ ## 6.2.0-canary.95
24
+
25
+ ## 6.2.0-canary.94
26
+
27
+ ## 6.2.0-canary.93
28
+
29
+ ## 6.2.0-canary.92
30
+
31
+ ## 6.2.0-canary.91
32
+
33
+ ## 6.2.0-canary.90
34
+
35
+ ## 6.2.0-canary.89
36
+
37
+ ## 6.2.0-canary.88
38
+
39
+ ## 6.2.0-canary.87
40
+
41
+ ## 6.2.0-canary.86
42
+
43
+ ## 6.2.0-canary.85
44
+
45
+ ## 6.2.0-canary.84
46
+
47
+ ## 6.2.0-canary.83
48
+
49
+ ## 6.2.0-canary.82
50
+
51
+ ## 6.2.0-canary.81
52
+
53
+ ## 6.2.0-canary.80
54
+
55
+ ## 6.2.0-canary.79
56
+
57
+ ## 6.2.0-canary.78
58
+
59
+ ## 6.2.0-canary.77
60
+
61
+ ## 6.2.0-canary.76
62
+
63
+ ## 6.2.0-canary.75
64
+
65
+ ## 6.2.0-canary.74
66
+
67
+ ## 6.2.0-canary.73
68
+
69
+ ## 6.2.0-canary.72
70
+
71
+ ## 6.2.0-canary.71
72
+
73
+ ## 6.2.0-canary.70
74
+
75
+ ## 6.2.0-canary.69
76
+
77
+ ## 6.2.0-canary.68
78
+
79
+ ## 6.2.0-canary.67
80
+
81
+ ## 6.2.0-canary.66
82
+
83
+ ## 6.2.0-canary.65
84
+
85
+ ## 6.2.0-canary.64
86
+
87
+ ## 6.2.0-canary.63
88
+
89
+ ## 6.2.0-canary.62
90
+
91
+ ## 6.2.0-canary.61
92
+
93
+ ## 6.2.0-canary.60
94
+
95
+ ## 6.2.0-canary.59
96
+
97
+ ## 6.2.0-canary.58
98
+
99
+ ## 6.2.0-canary.57
100
+
101
+ ## 6.2.0-canary.56
102
+
103
+ ## 6.2.0-canary.55
104
+
105
+ ## 6.2.0-canary.54
106
+
107
+ ## 6.2.0-canary.53
108
+
109
+ ## 6.2.0-canary.52
110
+
111
+ ## 6.2.0-canary.51
112
+
113
+ ## 6.2.0-canary.50
114
+
115
+ ## 6.2.0-canary.49
116
+
117
+ ## 6.2.0-canary.48
118
+
119
+ ## 6.2.0-canary.47
120
+
121
+ ## 6.2.0-canary.46
122
+
123
+ ## 6.2.0-canary.45
124
+
125
+ ## 6.2.0-canary.44
126
+
127
+ ## 6.2.0-canary.43
128
+
129
+ ## 6.2.0-canary.42
130
+
131
+ ## 6.2.0-canary.41
132
+
133
+ ## 6.2.0-canary.40
134
+
135
+ ## 6.2.0-canary.39
136
+
137
+ ## 6.2.0-canary.38
138
+
139
+ ## 6.2.0-canary.37
140
+
141
+ ## 6.2.0-canary.36
142
+
143
+ ## 6.2.0-canary.35
144
+
145
+ ## 6.2.0-canary.34
146
+
147
+ ## 6.2.0-canary.33
148
+
149
+ ## 6.2.0-canary.32
150
+
151
+ ## 6.2.0-canary.31
152
+
153
+ ## 6.2.0-canary.30
154
+
155
+ ## 6.2.0-canary.29
156
+
157
+ ## 6.2.0-canary.28
158
+
159
+ ## 6.2.0-canary.27
160
+
161
+ ## 6.2.0-canary.26
162
+
163
+ ### Patch Changes
164
+
165
+ - [#1945](https://github.com/graphcommerce-org/graphcommerce/pull/1945) [`3bfa3b9dd`](https://github.com/graphcommerce-org/graphcommerce/commit/3bfa3b9ddf8724b31b8f6dfc2281c58dc3f44cad) - Fixed wishlist not being shown in menu when hideForGuest is enabled (eventhough the user is logged in) ([@bramvanderholst](https://github.com/bramvanderholst))
166
+
167
+ - [#1945](https://github.com/graphcommerce-org/graphcommerce/pull/1945) [`0a5f12aeb`](https://github.com/graphcommerce-org/graphcommerce/commit/0a5f12aebc8ea960980cb423445d14d253a0da5a) - Prevent horizontal overflow in wishlist on (small) mobile devices ([@bramvanderholst](https://github.com/bramvanderholst))
168
+
169
+ ## 6.2.0-canary.25
170
+
171
+ ### Patch Changes
172
+
173
+ - [#1944](https://github.com/graphcommerce-org/graphcommerce/pull/1944) [`ff138050f`](https://github.com/graphcommerce-org/graphcommerce/commit/ff138050f92aad28f0f27a9f2ecd478dc6acfec1) - Wishlist would be limited to 24 products, but doesn't have pagination ([@paales](https://github.com/paales))
174
+
175
+ ## 6.2.0-canary.24
176
+
177
+ ## 6.2.0-canary.23
178
+
179
+ ## 6.2.0-canary.22
180
+
181
+ ## 6.2.0-canary.21
4
182
 
5
183
  ## 6.2.0-canary.20
6
184
 
@@ -24,6 +24,7 @@ import { GuestWishlistDocument } from '../../queries/GuestWishlist.gql'
24
24
  import { RemoveProductFromWishlistDocument } from '../../queries/RemoveProductFromWishlist.gql'
25
25
  import { WishlistSummaryFragment } from '../../queries/WishlistSummaryFragment.gql'
26
26
  import { ProductWishlistChipFragment } from './ProductWishlistChip.gql'
27
+ import { GuestWishlist, GuestWishlistItem } from '@graphcommerce/graphql-mesh'
27
28
 
28
29
  const hideForGuest = import.meta.graphCommerce.wishlistHideForGuests
29
30
  const ignoreProductWishlistStatus = import.meta.graphCommerce.wishlistIgnoreProductWishlistStatus
@@ -165,13 +166,13 @@ export function ProductWishlistChipBase(props: ProductWishlistChipProps) {
165
166
  setDisplayMessageBar(true)
166
167
  }
167
168
  } else if (inWishlist) {
168
- cache.modify({
169
+ cache.modify<GuestWishlist>({
169
170
  id: cache.identify({ __typename: 'GuestWishlist' }),
170
171
  fields: {
171
- items(existingItems: WishListItemType[] = []) {
172
- const items = existingItems.filter((item) => item?.url_key !== url_key)
173
- return items
174
- },
172
+ items: (existingItems, { readField }) =>
173
+ existingItems.filter(
174
+ (item) => readField('url_key', item) !== url_key,
175
+ ) as GuestWishlistItem[],
175
176
  },
176
177
  })
177
178
  } else {
@@ -187,7 +188,7 @@ export function ProductWishlistChipBase(props: ProductWishlistChipProps) {
187
188
  sku,
188
189
  url_key,
189
190
  quantity: 1,
190
- selected_options,
191
+ selected_options: selected_options as (string | null)[],
191
192
  },
192
193
  ],
193
194
  },
@@ -126,7 +126,7 @@ export function WishlistItemBase(props: WishlistItemBaseProps) {
126
126
  "picture itemOptions itemOptions"
127
127
  "picture itemQuantity itemQuantity itemPrice"
128
128
  "itemCartButton itemCartButton itemCartButton itemCartButton"`,
129
- gridTemplateColumns: `${rowImageSize} 1fr minmax(120px, 1fr) 1fr`,
129
+ gridTemplateColumns: `${rowImageSize} 1fr 1fr 1fr`,
130
130
  columnGap: theme.spacings.sm,
131
131
  alignItems: 'baseline',
132
132
  typography: 'body1',
@@ -150,7 +150,7 @@ export function WishlistItemBase(props: WishlistItemBaseProps) {
150
150
  "itemCartButton itemCartButton itemCartButton itemCartButton"`,
151
151
  alignItems: 'center',
152
152
  paddingBottom: theme.spacings.xl,
153
- gridTemplateColumns: `${rowImageSize} 1fr minmax(120px, 1fr) 1fr`,
153
+ gridTemplateColumns: `${rowImageSize} 1fr 1fr 1fr`,
154
154
  [theme.breakpoints.up('sm')]: {
155
155
  paddingBottom: theme.spacings.md,
156
156
  gridTemplate: `
@@ -62,7 +62,7 @@ export function WishlistMenuFabItem(props: WishlistMenuFabItemProps) {
62
62
  activeWishlist = wishlist.length > 0
63
63
  }
64
64
 
65
- if (hideForGuest) return null
65
+ if (hideForGuest && !loggedIn) return null
66
66
  if (!isWishlistEnabled) return null
67
67
  return (
68
68
  <NoSsr fallback={<WishlistMenuFabItemContent {...props} activeWishlist={false} />}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-wishlist",
3
- "version": "7.0.0-canary.21",
3
+ "version": "7.0.1-canary.0",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -13,24 +13,25 @@
13
13
  }
14
14
  },
15
15
  "devDependencies": {
16
- "@graphcommerce/eslint-config-pwa": "7.0.0-canary.21",
17
- "@graphcommerce/prettier-config-pwa": "7.0.0-canary.21",
18
- "@graphcommerce/typescript-config-pwa": "7.0.0-canary.21"
16
+ "@graphcommerce/eslint-config-pwa": "7.0.1-canary.0",
17
+ "@graphcommerce/prettier-config-pwa": "7.0.1-canary.0",
18
+ "@graphcommerce/typescript-config-pwa": "7.0.1-canary.0"
19
19
  },
20
20
  "dependencies": {
21
- "@graphcommerce/graphql": "7.0.0-canary.21",
22
- "@graphcommerce/graphql-mesh": "7.0.0-canary.21",
23
- "@graphcommerce/image": "7.0.0-canary.21",
24
- "@graphcommerce/magento-cart": "7.0.0-canary.21",
25
- "@graphcommerce/magento-customer": "7.0.0-canary.21",
26
- "@graphcommerce/magento-product": "7.0.0-canary.21",
27
- "@graphcommerce/magento-product-configurable": "7.0.0-canary.21",
28
- "@graphcommerce/magento-store": "7.0.0-canary.21",
29
- "@graphcommerce/next-ui": "7.0.0-canary.21"
21
+ "@graphcommerce/graphql": "7.0.1-canary.0",
22
+ "@graphcommerce/graphql-mesh": "7.0.1-canary.0",
23
+ "@graphcommerce/image": "7.0.1-canary.0",
24
+ "@graphcommerce/magento-cart": "7.0.1-canary.0",
25
+ "@graphcommerce/magento-customer": "7.0.1-canary.0",
26
+ "@graphcommerce/magento-product": "7.0.1-canary.0",
27
+ "@graphcommerce/magento-product-configurable": "7.0.1-canary.0",
28
+ "@graphcommerce/magento-store": "7.0.1-canary.0",
29
+ "@graphcommerce/next-ui": "7.0.1-canary.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "@lingui/react": "^3.13.2",
33
- "@lingui/core": "^3.13.2",
32
+ "@lingui/react": "^4.2.1",
33
+ "@lingui/core": "^4.2.1",
34
+ "@lingui/macro": "^4.2.1",
34
35
  "@mui/material": "^5.10.16",
35
36
  "framer-motion": "^10.0.0",
36
37
  "next": "^13.2.0",
@@ -1,5 +1,5 @@
1
1
  query GetGuestWishlistProducts(
2
- $pageSize: Int = 24
2
+ $pageSize: Int = 100
3
3
  $currentPage: Int = 1
4
4
  $filters: ProductAttributeFilterInput = {}
5
5
  $sort: ProductAttributeSortInput = {}
package/typePolicies.ts CHANGED
@@ -5,7 +5,7 @@ export const wishlistTypePolicies: TypedTypePolicies = {
5
5
  keyFields: [],
6
6
  fields: {
7
7
  items: {
8
- merge: (existing: Array<unknown> | undefined, incoming: Array<unknown>, options) => {
8
+ merge: (existing: Array<unknown> | undefined, incoming: Array<unknown>) => {
9
9
  const data = existing === undefined ? [] : existing
10
10
  return [...data, ...incoming]
11
11
  },