@graphcommerce/magento-customer 6.2.0-canary.14 → 6.2.0-canary.16
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
|
+
## 6.2.0-canary.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1930](https://github.com/graphcommerce-org/graphcommerce/pull/1930) [`c8d023e9e`](https://github.com/graphcommerce-org/graphcommerce/commit/c8d023e9e874131cd9f8fe192b1fca5fe1a26ee3) - Fix the close menu on search and add the option to secondary menu items ([@StefanAngenent](https://github.com/StefanAngenent))
|
|
8
|
+
|
|
9
|
+
## 6.2.0-canary.15
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#1926](https://github.com/graphcommerce-org/graphcommerce/pull/1926) [`ab8877fdb`](https://github.com/graphcommerce-org/graphcommerce/commit/ab8877fdb6147960ce656d28306d719e92f6de68) - Made the follow order link in the order card & order details a working <Link /> if provided from magento backend. ([@JoshuaS98](https://github.com/JoshuaS98))
|
|
14
|
+
|
|
3
15
|
## 6.2.0-canary.14
|
|
4
16
|
|
|
5
17
|
## 6.2.0-canary.13
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MenuFabSecondaryItem, iconPerson, IconSvg } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Badge, NoSsr, SxProps, Theme } from '@mui/material'
|
|
3
|
-
import React from 'react'
|
|
3
|
+
import React, { MouseEventHandler } from 'react'
|
|
4
4
|
import { useCustomerSession, UseCustomerSessionReturn } from '../../hooks/useCustomerSession'
|
|
5
5
|
|
|
6
6
|
type CustomerMenuFabItemProps = {
|
|
@@ -10,13 +10,15 @@ type CustomerMenuFabItemProps = {
|
|
|
10
10
|
guestHref: string
|
|
11
11
|
sx?: SxProps<Theme>
|
|
12
12
|
session?: UseCustomerSessionReturn
|
|
13
|
+
onClick?: MouseEventHandler<HTMLElement>
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
function CustomerMenuFabItemContent(props: CustomerMenuFabItemProps) {
|
|
16
|
-
const { session, icon, children, guestHref, authHref, sx = [] } = props
|
|
17
|
+
const { session, icon, children, onClick, guestHref, authHref, sx = [] } = props
|
|
17
18
|
|
|
18
19
|
return (
|
|
19
20
|
<MenuFabSecondaryItem
|
|
21
|
+
onClick={onClick}
|
|
20
22
|
sx={sx}
|
|
21
23
|
icon={
|
|
22
24
|
<Badge
|
|
@@ -26,7 +26,6 @@ const parts = [
|
|
|
26
26
|
'totalsRow',
|
|
27
27
|
'totalsDivider',
|
|
28
28
|
'totalsVat',
|
|
29
|
-
'iconContainer',
|
|
30
29
|
'invoice',
|
|
31
30
|
] as const
|
|
32
31
|
const { classes } = extendableComponent(componentName, parts)
|
|
@@ -85,18 +84,11 @@ const TotalsVat = styled(TotalsRow, { target: classes.totalsVat })(({ theme }) =
|
|
|
85
84
|
padding: `${theme.spacings.xxs} 0`,
|
|
86
85
|
}),
|
|
87
86
|
)
|
|
88
|
-
const IconContainer = styled(TotalsRow, { target: classes.iconContainer })(({ theme }) =>
|
|
89
|
-
theme.unstable_sx({
|
|
90
|
-
marginLeft: '-6px',
|
|
91
|
-
'& > div': {
|
|
92
|
-
padding: '4px 0',
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
|
-
)
|
|
96
87
|
|
|
97
88
|
const Invoice = styled(TotalsRow, { target: classes.invoice })(({ theme }) =>
|
|
98
89
|
theme.unstable_sx({
|
|
99
90
|
display: 'flex',
|
|
91
|
+
justifyContent: 'flex-start',
|
|
100
92
|
alignItems: 'center',
|
|
101
93
|
color: 'primary.main',
|
|
102
94
|
}),
|
|
@@ -248,9 +240,7 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
248
240
|
<>
|
|
249
241
|
<div>{shipments?.[0]?.tracking && shipments?.[0]?.tracking?.[0]?.title}</div>
|
|
250
242
|
{shipments?.[0]?.tracking?.[0] && (
|
|
251
|
-
<
|
|
252
|
-
<TrackingLink {...shipments?.[0].tracking?.[0]} />
|
|
253
|
-
</IconContainer>
|
|
243
|
+
<TrackingLink {...shipments?.[0].tracking?.[0]} sx={{ padding: '4px 0' }} />
|
|
254
244
|
)}
|
|
255
245
|
</>
|
|
256
246
|
)}
|
|
@@ -275,12 +265,10 @@ export function OrderDetails(props: OrderDetailsProps) {
|
|
|
275
265
|
<div>{payment_methods[0].name}</div>
|
|
276
266
|
|
|
277
267
|
{invoices && invoices?.length > 0 && (
|
|
278
|
-
<
|
|
279
|
-
<
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
</Invoice>
|
|
283
|
-
</IconContainer>
|
|
268
|
+
<Invoice>
|
|
269
|
+
<IconSvg src={iconInvoice} size='small' />
|
|
270
|
+
{invoices?.[0]?.number}
|
|
271
|
+
</Invoice>
|
|
284
272
|
)}
|
|
285
273
|
</>
|
|
286
274
|
)}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconSvg, iconLocation } from '@graphcommerce/next-ui'
|
|
2
2
|
import { Trans } from '@lingui/react'
|
|
3
|
-
import { Box, SxProps, Theme } from '@mui/material'
|
|
4
|
-
import React from 'react'
|
|
3
|
+
import { Box, Link, SxProps, Theme, Typography } from '@mui/material'
|
|
5
4
|
import { TrackingLinkFragment } from './TrackingLink.gql'
|
|
6
5
|
|
|
7
6
|
export type TrackingLinkProps = TrackingLinkFragment & { sx?: SxProps<Theme> }
|
|
@@ -9,6 +8,8 @@ export type TrackingLinkProps = TrackingLinkFragment & { sx?: SxProps<Theme> }
|
|
|
9
8
|
export function TrackingLink(props: TrackingLinkProps) {
|
|
10
9
|
const { number, sx = [] } = props
|
|
11
10
|
|
|
11
|
+
const validUrl = number?.startsWith('http://') || number?.startsWith('https://')
|
|
12
|
+
|
|
12
13
|
return (
|
|
13
14
|
<Box
|
|
14
15
|
className='TrackingLink-root'
|
|
@@ -21,12 +22,20 @@ export function TrackingLink(props: TrackingLinkProps) {
|
|
|
21
22
|
...(Array.isArray(sx) ? sx : [sx]),
|
|
22
23
|
]}
|
|
23
24
|
>
|
|
24
|
-
{number && (
|
|
25
|
-
|
|
25
|
+
{number && validUrl && (
|
|
26
|
+
<Link
|
|
27
|
+
onClick={(e) => e.stopPropagation()}
|
|
28
|
+
href={number}
|
|
29
|
+
target='_blank'
|
|
30
|
+
underline='hover'
|
|
31
|
+
sx={{ display: 'inline-flex', alignItems: 'center' }}
|
|
32
|
+
>
|
|
26
33
|
<IconSvg src={iconLocation} size='small' />
|
|
27
34
|
<Trans id='Follow order' />
|
|
28
|
-
|
|
35
|
+
</Link>
|
|
29
36
|
)}
|
|
37
|
+
|
|
38
|
+
{number && !validUrl && <Typography>{number}</Typography>}
|
|
30
39
|
</Box>
|
|
31
40
|
)
|
|
32
41
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/magento-customer",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "6.2.0-canary.
|
|
5
|
+
"version": "6.2.0-canary.16",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.
|
|
16
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
17
|
-
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "6.2.0-canary.16",
|
|
16
|
+
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.16",
|
|
17
|
+
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.16"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@graphcommerce/ecommerce-ui": "6.2.0-canary.
|
|
21
|
-
"@graphcommerce/framer-utils": "6.2.0-canary.
|
|
22
|
-
"@graphcommerce/graphql": "6.2.0-canary.
|
|
23
|
-
"@graphcommerce/graphql-mesh": "6.2.0-canary.
|
|
24
|
-
"@graphcommerce/image": "6.2.0-canary.
|
|
25
|
-
"@graphcommerce/magento-graphql": "6.2.0-canary.
|
|
26
|
-
"@graphcommerce/magento-store": "6.2.0-canary.
|
|
27
|
-
"@graphcommerce/next-ui": "6.2.0-canary.
|
|
28
|
-
"@graphcommerce/react-hook-form": "6.2.0-canary.
|
|
20
|
+
"@graphcommerce/ecommerce-ui": "6.2.0-canary.16",
|
|
21
|
+
"@graphcommerce/framer-utils": "6.2.0-canary.16",
|
|
22
|
+
"@graphcommerce/graphql": "6.2.0-canary.16",
|
|
23
|
+
"@graphcommerce/graphql-mesh": "6.2.0-canary.16",
|
|
24
|
+
"@graphcommerce/image": "6.2.0-canary.16",
|
|
25
|
+
"@graphcommerce/magento-graphql": "6.2.0-canary.16",
|
|
26
|
+
"@graphcommerce/magento-store": "6.2.0-canary.16",
|
|
27
|
+
"@graphcommerce/next-ui": "6.2.0-canary.16",
|
|
28
|
+
"@graphcommerce/react-hook-form": "6.2.0-canary.16"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"@lingui/react": "^3.13.2",
|