@graphcommerce/magento-product-grouped 9.0.4-canary.9 → 9.1.0-canary.15

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,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.15
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2493](https://github.com/graphcommerce-org/graphcommerce/pull/2493) [`1d87dc1`](https://github.com/graphcommerce-org/graphcommerce/commit/1d87dc1ac00010df721547d6e62cb49f5bd450eb) - Use narrower types for grouped products ([@paales](https://github.com/paales))
8
+
9
+ ## 9.0.4-canary.14
10
+
11
+ ## 9.0.4-canary.13
12
+
13
+ ## 9.0.4-canary.12
14
+
15
+ ## 9.0.4-canary.11
16
+
17
+ ## 9.0.4-canary.10
18
+
3
19
  ## 9.0.4-canary.9
4
20
 
5
21
  ## 9.0.4-canary.8
@@ -1,10 +1,14 @@
1
1
  fragment GroupedProduct on GroupedProduct {
2
+ __typename
2
3
  items {
3
4
  position
4
5
  qty
5
6
  product {
6
7
  uid
7
8
  __typename
9
+ url_rewrites {
10
+ url
11
+ }
8
12
  ...ProductListItem
9
13
  }
10
14
  }
@@ -1,14 +1,18 @@
1
1
  import { NumberFieldElement } from '@graphcommerce/ecommerce-ui'
2
2
  import { Image } from '@graphcommerce/image'
3
- import type { ProductPageItemFragment } from '@graphcommerce/magento-product/Api/ProductPageItem.gql'
4
3
  import type { AddToCartItemSelector } from '@graphcommerce/magento-product/components'
5
4
  import { useFormAddProductsToCart } from '@graphcommerce/magento-product/components'
6
5
  import { Money } from '@graphcommerce/magento-store'
7
6
  import type { ActionCardProps } from '@graphcommerce/next-ui'
8
7
  import { ActionCard, actionCardImageSizes, responsiveVal } from '@graphcommerce/next-ui'
9
8
  import { Box, Link } from '@mui/material'
9
+ import type { GroupedProductFragment } from '../GroupedProduct.gql'
10
10
 
11
- export type GroupedProductActionCardProps = ProductPageItemFragment &
11
+ type GroupedProductItem = NonNullable<
12
+ NonNullable<GroupedProductFragment['items']>[number]
13
+ >['product']
14
+
15
+ export type GroupedProductActionCardProps = GroupedProductItem &
12
16
  Omit<ActionCardProps, 'value' | 'image' | 'price' | 'title' | 'action'> &
13
17
  AddToCartItemSelector
14
18
 
@@ -1,10 +1,10 @@
1
1
  import { ActionCardLayout, filterNonNullableKeys } from '@graphcommerce/next-ui'
2
2
  import { useMemo } from 'react'
3
- import type { ProductPageGroupedQueryFragment } from '../ProductPageGroupedQueryFragment.gql'
3
+ import type { GroupedProductFragment } from '../GroupedProduct.gql'
4
4
  import { GroupedProductActionCard } from './GroupedProductActionCard'
5
5
 
6
6
  export type GroupedProductsProps = {
7
- product: NonNullable<NonNullable<ProductPageGroupedQueryFragment['typeProducts']>['items']>[0]
7
+ product: GroupedProductFragment
8
8
  }
9
9
 
10
10
  export function GroupedProducts(props: GroupedProductsProps) {
package/index.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './GroupedProductPage.gql'
2
1
  export * from './ProductListItemGrouped'
3
2
  export * from './GroupedProducts/GroupedProducts'
4
3
  export * from './GroupedProducts/GroupedProductActionCard'
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-product-grouped",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.4-canary.9",
5
+ "version": "9.1.0-canary.15",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,18 +12,18 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/ecommerce-ui": "^9.0.4-canary.9",
16
- "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.9",
17
- "@graphcommerce/graphql": "^9.0.4-canary.9",
18
- "@graphcommerce/image": "^9.0.4-canary.9",
19
- "@graphcommerce/magento-cart": "^9.0.4-canary.9",
20
- "@graphcommerce/magento-product": "^9.0.4-canary.9",
21
- "@graphcommerce/magento-product-simple": "^9.0.4-canary.9",
22
- "@graphcommerce/magento-product-virtual": "^9.0.4-canary.9",
23
- "@graphcommerce/magento-store": "^9.0.4-canary.9",
24
- "@graphcommerce/next-ui": "^9.0.4-canary.9",
25
- "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.9",
26
- "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.9",
15
+ "@graphcommerce/ecommerce-ui": "^9.1.0-canary.15",
16
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.15",
17
+ "@graphcommerce/graphql": "^9.1.0-canary.15",
18
+ "@graphcommerce/image": "^9.1.0-canary.15",
19
+ "@graphcommerce/magento-cart": "^9.1.0-canary.15",
20
+ "@graphcommerce/magento-product": "^9.1.0-canary.15",
21
+ "@graphcommerce/magento-product-simple": "^9.1.0-canary.15",
22
+ "@graphcommerce/magento-product-virtual": "^9.1.0-canary.15",
23
+ "@graphcommerce/magento-store": "^9.1.0-canary.15",
24
+ "@graphcommerce/next-ui": "^9.1.0-canary.15",
25
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.15",
26
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.15",
27
27
  "@lingui/core": "^4.2.1",
28
28
  "@lingui/macro": "^4.2.1",
29
29
  "@lingui/react": "^4.2.1",
@@ -1,3 +0,0 @@
1
- query GroupedProductPage($urlKey: String) {
2
- ...ProductPageGroupedQueryFragment
3
- }
@@ -1,9 +0,0 @@
1
- fragment ProductPageGroupedQueryFragment on Query {
2
- typeProducts: products(filter: { url_key: { eq: $urlKey } }) {
3
- items {
4
- __typename
5
- uid
6
- ...GroupedProduct
7
- }
8
- }
9
- }