@graphcommerce/magento-wishlist 4.13.3 → 4.14.0-canary.11

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,8 +1,42 @@
1
1
  # @graphcommerce/magento-wishlist
2
2
 
3
- ## 4.13.3
3
+ ## 4.14.0-canary.11
4
4
 
5
- ## 4.13.2
5
+ ## 4.14.0-canary.10
6
+
7
+ ## 4.14.0-canary.9
8
+
9
+ ## 4.14.0-canary.8
10
+
11
+ ## 4.14.0-canary.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1738](https://github.com/graphcommerce-org/graphcommerce/pull/1738) [`52882a63e`](https://github.com/graphcommerce-org/graphcommerce/commit/52882a63e96c0d3ba9641c3714d288fa4f420c82) - Do not forward the Prev prop in plugins ([@paales](https://github.com/paales))
16
+
17
+ ## 4.14.0-canary.6
18
+
19
+ ## 4.14.0-canary.5
20
+
21
+ ## 4.14.0-canary.4
22
+
23
+ ### Minor Changes
24
+
25
+ - [#1733](https://github.com/graphcommerce-org/graphcommerce/pull/1733) [`761bd2832`](https://github.com/graphcommerce-org/graphcommerce/commit/761bd2832f115afc8b95bedbf479266309dd5acc) - ApolloLinks, typePolicies and migration scripts are now handled with plugins on the new library component `<GraphQLProvider/>`. Hygraph's, Magento Cart, Customer, Store, Wishlist and Magento GraphQL are all migrated to be using plugins.
26
+
27
+ If you are using custom `links` / `policies` / `migrations` you can pass them as props to the `<GraphQLProvider/>` or create your own local plugin. ([@paales](https://github.com/paales))
28
+
29
+ ## 4.14.0-canary.3
30
+
31
+ ## 4.14.0-canary.2
32
+
33
+ ### Patch Changes
34
+
35
+ - [#1718](https://github.com/graphcommerce-org/graphcommerce/pull/1718) [`37e86cdc8`](https://github.com/graphcommerce-org/graphcommerce/commit/37e86cdc86ccca3db77d6c59b1e14c8112bb7893) - Remove usage of PropsWithChildren ([@paales](https://github.com/paales))
36
+
37
+ ## 4.13.2-canary.1
38
+
39
+ ## 4.13.2-canary.0
6
40
 
7
41
  ## 4.13.1
8
42
 
@@ -1,6 +1,5 @@
1
1
  import { InputMaybe } from '@graphcommerce/graphql-mesh'
2
2
  import { SxProps, Theme } from '@mui/material'
3
- import { PropsWithChildren } from 'react'
4
3
  import { ProductAddToCart } from './ProductAddToCart'
5
4
  import { WishlistItemBase } from './WishlistItemBase'
6
5
  import { WishlistItemProductFragment } from './WishlistItemProduct.gql'
@@ -9,9 +8,10 @@ type OptionalProductWishlistParent = {
9
8
  wishlistItemId?: string
10
9
  }
11
10
 
12
- export type WishlistItemProps = PropsWithChildren<WishlistItemProductFragment> & {
11
+ export type WishlistItemProps = WishlistItemProductFragment & {
13
12
  sx?: SxProps<Theme>
14
13
  selectedOptions?: InputMaybe<string[]> | undefined
14
+ children?: React.ReactNode
15
15
  } & OptionalProductWishlistParent
16
16
 
17
17
  export function WishlistItem(props: WishlistItemProps) {
@@ -10,7 +10,7 @@ import IconButton from '@mui/material/IconButton'
10
10
  import Menu from '@mui/material/Menu'
11
11
  import MenuItem from '@mui/material/MenuItem'
12
12
  import PageLink from 'next/link'
13
- import { useState, PropsWithChildren } from 'react'
13
+ import { useState } from 'react'
14
14
  import { GetIsInWishlistsDocument } from '../../queries/GetIsInWishlists.gql'
15
15
  import { RemoveProductFromWishlistDocument } from '../../queries/RemoveProductFromWishlist.gql'
16
16
  import { WishlistItemProductFragment } from './WishlistItemProduct.gql'
@@ -21,8 +21,9 @@ type OptionalProductWishlistParent = {
21
21
  wishlistItemId?: string
22
22
  }
23
23
 
24
- export type WishlistItemBaseProps = PropsWithChildren<WishlistItemProductFragment> & {
24
+ export type WishlistItemBaseProps = WishlistItemProductFragment & {
25
25
  sx?: SxProps<Theme>
26
+ children?: React.ReactNode
26
27
  } & OwnerState &
27
28
  OptionalProductWishlistParent
28
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/magento-wishlist",
3
- "version": "4.13.3",
3
+ "version": "4.14.0-canary.11",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
6
  "browserslist": [
@@ -19,15 +19,15 @@
19
19
  "@playwright/test": "^1.21.1"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/graphql": "4.30.2",
23
- "@graphcommerce/graphql-mesh": "4.30.2",
24
- "@graphcommerce/image": "4.30.2",
25
- "@graphcommerce/magento-cart": "4.13.3",
26
- "@graphcommerce/magento-customer": "4.13.3",
27
- "@graphcommerce/magento-product": "4.13.3",
28
- "@graphcommerce/magento-product-configurable": "4.13.3",
29
- "@graphcommerce/magento-store": "4.13.3",
30
- "@graphcommerce/next-ui": "4.30.2"
22
+ "@graphcommerce/graphql": "4.31.0-canary.7",
23
+ "@graphcommerce/graphql-mesh": "4.31.0-canary.7",
24
+ "@graphcommerce/image": "4.31.0-canary.7",
25
+ "@graphcommerce/magento-cart": "4.14.0-canary.11",
26
+ "@graphcommerce/magento-customer": "4.14.0-canary.11",
27
+ "@graphcommerce/magento-product": "4.14.0-canary.11",
28
+ "@graphcommerce/magento-product-configurable": "4.14.0-canary.11",
29
+ "@graphcommerce/magento-store": "4.14.0-canary.11",
30
+ "@graphcommerce/next-ui": "4.31.0-canary.7"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@lingui/react": "^3.13.2",
@@ -0,0 +1,13 @@
1
+ import { GraphQLProviderProps } from '@graphcommerce/graphql'
2
+ import type { PluginProps } from '@graphcommerce/next-config'
3
+ import { wishlistTypePolicies } from '../typePolicies'
4
+
5
+ export const component = 'GraphQLProvider'
6
+ export const exported = '@graphcommerce/graphql'
7
+
8
+ function MagentoWishlistGraphqlProvider(props: PluginProps<GraphQLProviderProps>) {
9
+ const { Prev, policies = [], ...rest } = props
10
+ return <Prev {...rest} policies={[...policies, wishlistTypePolicies]} />
11
+ }
12
+
13
+ export const Plugin = MagentoWishlistGraphqlProvider