@graphcommerce/magento-category 9.1.0-canary.48 → 9.1.0-canary.50

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,17 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.1.0-canary.50
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2535](https://github.com/graphcommerce-org/graphcommerce/pull/2535) [`bb728e9`](https://github.com/graphcommerce-org/graphcommerce/commit/bb728e960d8beedc35aad0ab7f1f8ce214467bc1) - Fix bug where allName would not be translated when switching stores ([@Giovanni-Schroevers](https://github.com/Giovanni-Schroevers))
8
+
9
+ ## 9.1.0-canary.49
10
+
11
+ ### Patch Changes
12
+
13
+ - [#2533](https://github.com/graphcommerce-org/graphcommerce/pull/2533) [`45c2fbb`](https://github.com/graphcommerce-org/graphcommerce/commit/45c2fbbed55e3ba42f1ecc45e80039977b6ffe7c) - Solve issue where in some cases a second ProductList query was made because the category used an `eq` filter instead of an `in` filter. ([@paales](https://github.com/paales))
14
+
3
15
  ## 9.1.0-canary.48
4
16
 
5
17
  ## 9.1.0-canary.47
@@ -25,7 +25,7 @@ export function CategoryChildren(props: CategoryChildrenProps) {
25
25
  ...params,
26
26
  currentPage: 0,
27
27
  url: category.url_path,
28
- filters: { category_uid: { eq: category.uid } },
28
+ filters: { category_uid: { in: [category.uid] } },
29
29
  }),
30
30
  active: params.url === category.url_path,
31
31
  }),
@@ -94,7 +94,7 @@ export const CategoryHeroNav = React.memo<CategoryHeroNavProps>(
94
94
  color='textPrimary'
95
95
  href={productListLink({
96
96
  url: category.url_path,
97
- filters: { category_uid: { eq: category.uid } },
97
+ filters: { category_uid: { in: [category.uid] } },
98
98
  sort: {},
99
99
  })}
100
100
  key={category.uid}
@@ -1,4 +1,4 @@
1
- import type { ProductListParams } from '@graphcommerce/magento-product'
1
+ import { hasUserFilterActive, type ProductListParams } from '@graphcommerce/magento-product'
2
2
  import { PageMeta } from '@graphcommerce/magento-store'
3
3
  import type { PageMetaProps } from '@graphcommerce/next-ui'
4
4
  import { i18n } from '@lingui/core'
@@ -25,8 +25,7 @@ export function CategoryMeta(props: CategoryMetaProps) {
25
25
 
26
26
  if (params?.url && !canonical) canonical = `/${params.url}`
27
27
 
28
- const anyFilterActive =
29
- Object.keys(params?.filters ?? {}).filter((k) => k !== 'category_uid').length > 0
28
+ const anyFilterActive = hasUserFilterActive(params)
30
29
 
31
30
  const sortActive = params?.sort && Object.keys(params?.sort).length !== 0
32
31
  const limitAcitve = !!params?.pageSize
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/magento-category",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.1.0-canary.48",
5
+ "version": "9.1.0-canary.50",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,14 +12,15 @@
12
12
  }
13
13
  },
14
14
  "peerDependencies": {
15
- "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.48",
16
- "@graphcommerce/framer-scroller": "^9.1.0-canary.48",
17
- "@graphcommerce/graphql": "^9.1.0-canary.48",
18
- "@graphcommerce/image": "^9.1.0-canary.48",
19
- "@graphcommerce/magento-store": "^9.1.0-canary.48",
20
- "@graphcommerce/next-ui": "^9.1.0-canary.48",
21
- "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.48",
22
- "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.48",
15
+ "@graphcommerce/eslint-config-pwa": "^9.1.0-canary.50",
16
+ "@graphcommerce/framer-scroller": "^9.1.0-canary.50",
17
+ "@graphcommerce/graphql": "^9.1.0-canary.50",
18
+ "@graphcommerce/image": "^9.1.0-canary.50",
19
+ "@graphcommerce/magento-product": "^9.1.0-canary.50",
20
+ "@graphcommerce/magento-store": "^9.1.0-canary.50",
21
+ "@graphcommerce/next-ui": "^9.1.0-canary.50",
22
+ "@graphcommerce/prettier-config-pwa": "^9.1.0-canary.50",
23
+ "@graphcommerce/typescript-config-pwa": "^9.1.0-canary.50",
23
24
  "@lingui/core": "^4.2.1",
24
25
  "@lingui/macro": "^4.2.1",
25
26
  "@lingui/react": "^4.2.1",
@@ -4,13 +4,15 @@ import type {
4
4
  NavigationNodeHref,
5
5
  } from '@graphcommerce/next-ui'
6
6
  import { NavigationNodeType, nonNullable } from '@graphcommerce/next-ui'
7
- import { i18n } from '@lingui/core'
7
+ import { Trans } from '@lingui/macro'
8
8
  import type { MenuQueryFragment } from '../queries/MenuQueryFragment.gql'
9
9
  import type { NavigationItemFragment } from '../queries/NavigationItem.gql'
10
10
 
11
11
  type Item = NonNullable<NonNullable<NonNullable<MenuQueryFragment['menu']>['items']>[0]>
12
12
 
13
- export type MagentoNavigationItemProps = NavigationItemFragment
13
+ export type MagentoNavigationItemProps = Omit<NavigationItemFragment, 'name'> & {
14
+ name?: React.ReactNode
15
+ }
14
16
 
15
17
  function categoryToNav(
16
18
  props: Item | null | undefined,
@@ -21,7 +23,7 @@ function categoryToNav(
21
23
 
22
24
  if (!uid || include_in_menu !== 1 || !name) return undefined
23
25
 
24
- const allName = i18n._(/* i18n */ 'All {name}', { name })
26
+ const allName = <Trans>All {name}</Trans>
25
27
  // If we've got children we make a button that navigates to childitems.
26
28
  if (children && children.length > 0) {
27
29
  const button: NavigationNodeButton = {