@graphcommerce/next-ui 11.0.0-canary.57 → 11.0.0-canary.59

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.0.0-canary.59
4
+
5
+ ## 11.0.0-canary.58
6
+
7
+ ### Patch Changes
8
+
9
+ - [#2718](https://github.com/graphcommerce-org/graphcommerce/pull/2718) [`d6145eb`](https://github.com/graphcommerce-org/graphcommerce/commit/d6145ebbabc4f3cad3bbc78e5f32794098577223) - Fix the product list pagination scrolling to the products before the next page was loaded. The shopper saw the products of the previous page until the new products arrived. The pagination loads the products first and then scrolls, the same as the filters. ([@bramvanderholst](https://github.com/bramvanderholst))
10
+
3
11
  ## 11.0.0-canary.57
4
12
 
5
13
  ### Major Changes
@@ -4,6 +4,7 @@ import { Box, Pagination, PaginationItem } from '@mui/material'
4
4
  import { iconChevronLeft, iconChevronRight } from '../icons'
5
5
  import { IconSvg } from '../IconSvg'
6
6
  import { extendableComponent } from '../Styles'
7
+ import type { LinkProps } from '../Theme'
7
8
  import { NextLink } from '../Theme'
8
9
 
9
10
  export type PaginationExtendedProps = {
@@ -12,6 +13,7 @@ export type PaginationExtendedProps = {
12
13
  sx?: SxProps<Theme>
13
14
  size?: 'small' | 'medium' | 'large'
14
15
  paginationHref: (params: PaginationRenderItemParams) => string
16
+ onNavigate?: (params: PaginationRenderItemParams) => LinkProps['onNavigate']
15
17
  siblingCount?: number
16
18
  boundaryCount?: number
17
19
  } & Omit<PaginationProps, 'count' | 'url' | 'defaultPage' | 'page'>
@@ -38,6 +40,7 @@ export function PaginationExtended(props: PaginationExtendedProps) {
38
40
  sx = [],
39
41
  size,
40
42
  paginationHref,
43
+ onNavigate,
41
44
  renderItem,
42
45
  siblingCount,
43
46
  boundaryCount,
@@ -84,7 +87,11 @@ export function PaginationExtended(props: PaginationExtendedProps) {
84
87
  renderItem ??
85
88
  ((item) => (
86
89
  <PaginationItem
87
- {...(!item.disabled && { component: NextLink, href: paginationHref(item) })}
90
+ {...(!item.disabled && {
91
+ component: NextLink,
92
+ href: paginationHref(item),
93
+ onNavigate: onNavigate?.(item),
94
+ })}
88
95
  slots={{ previous: Prev, next: Next }}
89
96
  {...item}
90
97
  />
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "11.0.0-canary.57",
5
+ "version": "11.0.0-canary.59",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -43,13 +43,13 @@
43
43
  "@emotion/react": "^11.14.0",
44
44
  "@emotion/server": "^11.11.0",
45
45
  "@emotion/styled": "^11.14.1",
46
- "@graphcommerce/eslint-config-pwa": "^11.0.0-canary.57",
47
- "@graphcommerce/framer-next-pages": "^11.0.0-canary.57",
48
- "@graphcommerce/framer-scroller": "^11.0.0-canary.57",
49
- "@graphcommerce/framer-utils": "^11.0.0-canary.57",
50
- "@graphcommerce/image": "^11.0.0-canary.57",
51
- "@graphcommerce/prettier-config-pwa": "^11.0.0-canary.57",
52
- "@graphcommerce/typescript-config-pwa": "^11.0.0-canary.57",
46
+ "@graphcommerce/eslint-config-pwa": "^11.0.0-canary.59",
47
+ "@graphcommerce/framer-next-pages": "^11.0.0-canary.59",
48
+ "@graphcommerce/framer-scroller": "^11.0.0-canary.59",
49
+ "@graphcommerce/framer-utils": "^11.0.0-canary.59",
50
+ "@graphcommerce/image": "^11.0.0-canary.59",
51
+ "@graphcommerce/prettier-config-pwa": "^11.0.0-canary.59",
52
+ "@graphcommerce/typescript-config-pwa": "^11.0.0-canary.59",
53
53
  "@lingui/core": "^6",
54
54
  "@lingui/react": "^6",
55
55
  "@mui/lab": "7.0.1-beta.25",