@graphcommerce/magento-category 4.1.25 → 4.2.2

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