@graphcommerce/ecommerce-ui 1.0.22 → 1.1.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,32 @@
|
|
|
1
1
|
# @graphcommerce/ecommerce-ui
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`8d8fda262`](https://github.com/graphcommerce-org/graphcommerce/commit/8d8fda2623e561cb43441110c67ffa34b692668a), [`cefa7b365`](https://github.com/graphcommerce-org/graphcommerce/commit/cefa7b3652b55108d2178927e3c5d98a111cf373)]:
|
|
8
|
+
- @graphcommerce/next-ui@4.13.0
|
|
9
|
+
|
|
10
|
+
## 1.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [#1544](https://github.com/graphcommerce-org/graphcommerce/pull/1544) [`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b) Thanks [@mikekeehnen](https://github.com/mikekeehnen)! - Fixed hydration errors on account, cart and wishlist
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`5f927ebdc`](https://github.com/graphcommerce-org/graphcommerce/commit/5f927ebdc6f0331833e02b96e4f169bfe475ac6b), [`c756f42e5`](https://github.com/graphcommerce-org/graphcommerce/commit/c756f42e503761a497e4a5a7a02d02141df231c3)]:
|
|
19
|
+
- @graphcommerce/graphql@3.4.0
|
|
20
|
+
- @graphcommerce/react-hook-form@3.3.0
|
|
21
|
+
- @graphcommerce/next-ui@4.12.0
|
|
22
|
+
|
|
23
|
+
## 1.0.23
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [[`fe4baa42d`](https://github.com/graphcommerce-org/graphcommerce/commit/fe4baa42db0081ed960d62aef688bd36a7ac974f)]:
|
|
28
|
+
- @graphcommerce/next-ui@4.11.2
|
|
29
|
+
|
|
3
30
|
## 1.0.22
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ import { AlertProps } from '@mui/material'
|
|
|
4
4
|
import { ApolloErrorAlert } from './ApolloErrorAlert'
|
|
5
5
|
|
|
6
6
|
export type ApolloErrorFullPageProps = {
|
|
7
|
-
error
|
|
7
|
+
error: ApolloError
|
|
8
8
|
graphqlErrorAlertProps?: Omit<AlertProps, 'severity'>
|
|
9
9
|
networkErrorAlertProps?: Omit<AlertProps, 'severity'>
|
|
10
10
|
} & Omit<FullPageMessageProps, 'title' | 'description'>
|
|
@@ -18,14 +18,24 @@ export function ApolloErrorFullPage(props: ApolloErrorFullPageProps) {
|
|
|
18
18
|
...fullPageMessageProps
|
|
19
19
|
} = props
|
|
20
20
|
|
|
21
|
-
const
|
|
21
|
+
const errorCount = error?.graphQLErrors?.length ?? +(error?.networkError ? 1 : 0)
|
|
22
|
+
|
|
23
|
+
if (errorCount === 0) return null
|
|
24
|
+
|
|
25
|
+
if (errorCount === 1) {
|
|
26
|
+
return (
|
|
27
|
+
<FullPageMessage
|
|
28
|
+
title={error?.graphQLErrors[0].message ?? error?.networkError?.message}
|
|
29
|
+
{...fullPageMessageProps}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</FullPageMessage>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
22
35
|
|
|
23
36
|
return (
|
|
24
|
-
<FullPageMessage
|
|
25
|
-
|
|
26
|
-
{...fullPageMessageProps}
|
|
27
|
-
>
|
|
28
|
-
{singleError ? children : <ApolloErrorAlert error={error} />}
|
|
37
|
+
<FullPageMessage title='Several errors occured' {...fullPageMessageProps}>
|
|
38
|
+
<ApolloErrorAlert error={error} />
|
|
29
39
|
</FullPageMessage>
|
|
30
40
|
)
|
|
31
41
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/ecommerce-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.1.1",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@graphcommerce/next-ui": "4.
|
|
16
|
-
"@graphcommerce/react-hook-form": "3.
|
|
17
|
-
"@graphcommerce/graphql": "3.
|
|
15
|
+
"@graphcommerce/next-ui": "4.13.0",
|
|
16
|
+
"@graphcommerce/react-hook-form": "3.3.0",
|
|
17
|
+
"@graphcommerce/graphql": "3.4.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@graphcommerce/eslint-config-pwa": "^4.1.8",
|