@graphcommerce/magento-category 4.1.24 → 4.2.1

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,43 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`a88f166f0`](https://github.com/graphcommerce-org/graphcommerce/commit/a88f166f0115c58254fe47171da51a5850658a32)]:
8
+ - @graphcommerce/next-ui@4.15.1
9
+ - @graphcommerce/framer-scroller@2.1.26
10
+ - @graphcommerce/magento-product@4.4.19
11
+ - @graphcommerce/magento-store@4.2.21
12
+
13
+ ## 4.2.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#1566](https://github.com/graphcommerce-org/graphcommerce/pull/1566) [`e167992df`](https://github.com/graphcommerce-org/graphcommerce/commit/e167992dfdc6964a392af719667f8a188626ab1b) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Introduced `@graphcommerce/next-ui/navigation` component.
18
+
19
+ - Navigation is always present in the DOM
20
+ - Configurable in LayoutNavigation.tsx
21
+ - Show categories directly, or nest them in a 'products' button
22
+ - Choose prefered mouseEvent: click or hover
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [[`e167992df`](https://github.com/graphcommerce-org/graphcommerce/commit/e167992dfdc6964a392af719667f8a188626ab1b), [`9c2504b4e`](https://github.com/graphcommerce-org/graphcommerce/commit/9c2504b4ed75f41d3003c4d3339814010e85e37e)]:
27
+ - @graphcommerce/next-ui@4.15.0
28
+ - @graphcommerce/framer-scroller@2.1.25
29
+ - @graphcommerce/magento-product@4.4.18
30
+ - @graphcommerce/magento-store@4.2.20
31
+
32
+ ## 4.1.25
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [[`01f1588c9`](https://github.com/graphcommerce-org/graphcommerce/commit/01f1588c9200bb39dd61146e260bfa2b32060612)]:
37
+ - @graphcommerce/graphql@3.4.3
38
+ - @graphcommerce/magento-product@4.4.17
39
+ - @graphcommerce/magento-store@4.2.19
40
+
3
41
  ## 4.1.24
4
42
 
5
43
  ### Patch Changes
@@ -1,13 +1,14 @@
1
1
  import { NavigationNode, NavigationNodeButton, NavigationNodeHref } from '@graphcommerce/next-ui'
2
+ import { i18n } from '@lingui/core'
2
3
  import { MenuQueryFragment } from '../queries/MenuQueryFragment.gql'
3
4
 
4
5
  function nonNullable<T>(value: T): value is NonNullable<T> {
5
6
  return value !== null && value !== undefined
6
7
  }
7
8
 
8
- type Item = NonNullable<NonNullable<MenuQueryFragment['menu']>['items']>[0]
9
+ export type Item = NonNullable<NonNullable<MenuQueryFragment['menu']>['items']>[0]
9
10
 
10
- function categoryToNav(props: Item | null | undefined): NavigationNode | undefined {
11
+ export function categoryToNav(props: Item | null | undefined): NavigationNode | undefined {
11
12
  if (!props) return undefined
12
13
  const { uid, children, include_in_menu, name, url_path } = props
13
14
 
@@ -19,7 +20,7 @@ function categoryToNav(props: Item | null | undefined): NavigationNode | undefin
19
20
  name,
20
21
  id: uid,
21
22
  childItems: [
22
- { name: `All ${name}`, href: `/${url_path}` },
23
+ { name: i18n._(/* i18n */ 'All {name}', { name }), href: `/${url_path}`, id: `${uid}-all` },
23
24
  ...children.map(categoryToNav).filter(nonNullable),
24
25
  ],
25
26
  } as NavigationNodeButton
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": "4.1.24",
5
+ "version": "4.2.1",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -19,12 +19,12 @@
19
19
  "type-fest": "^2.12.2"
20
20
  },
21
21
  "dependencies": {
22
- "@graphcommerce/framer-scroller": "2.1.24",
23
- "@graphcommerce/graphql": "3.4.2",
22
+ "@graphcommerce/framer-scroller": "2.1.26",
23
+ "@graphcommerce/graphql": "3.4.3",
24
24
  "@graphcommerce/image": "3.1.7",
25
- "@graphcommerce/magento-product": "4.4.16",
26
- "@graphcommerce/magento-store": "4.2.18",
27
- "@graphcommerce/next-ui": "4.14.0"
25
+ "@graphcommerce/magento-product": "4.4.19",
26
+ "@graphcommerce/magento-store": "4.2.21",
27
+ "@graphcommerce/next-ui": "4.15.1"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@lingui/react": "^3.13.2",