@graphcommerce/ecommerce-ui 1.1.12 → 1.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,42 @@
1
1
  # @graphcommerce/ecommerce-ui
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`396b5de5d`](https://github.com/graphcommerce-org/graphcommerce/commit/396b5de5d50c7b8f59bf636807e7a4b50f14e0b2)]:
8
+ - @graphcommerce/graphql@3.4.8
9
+
10
+ ## 1.2.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [[`755d2cf83`](https://github.com/graphcommerce-org/graphcommerce/commit/755d2cf83343a5ad3d61063eff595d821de360aa), [`dc7f2dda4`](https://github.com/graphcommerce-org/graphcommerce/commit/dc7f2dda40ff8572fc11161de6eb62ca13e720dd)]:
15
+ - @graphcommerce/next-ui@4.23.0
16
+
17
+ ## 1.2.0
18
+
19
+ ### Minor Changes
20
+
21
+ - [#1609](https://github.com/graphcommerce-org/graphcommerce/pull/1609) [`0ad5159eb`](https://github.com/graphcommerce-org/graphcommerce/commit/0ad5159ebef54b4ce7fee6f71b4bf710dba9ef8e) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Use WaitForCustomer component
22
+
23
+ - Fixes bugs where loaders where shown on all pages that require user to log in
24
+
25
+ * [#1602](https://github.com/graphcommerce-org/graphcommerce/pull/1602) [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315) Thanks [@ErwinOtten](https://github.com/ErwinOtten)! - Default styles and layout fixes
26
+
27
+ - Scaled icons and fonts down. Size in typography is now more gradual: https://graphcommerce.vercel.app/test/typography
28
+ - Multiple accessibility fixes. Missing button/input labels, and fixed spacing issues resulting in high % appropriately sized tap targets
29
+ - Replaced responsiveVal usage with better performaning breakpointVal where possible
30
+ - All buttons are now Pill by default.
31
+ - Cleaned up checkout styles
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [[`04708dacc`](https://github.com/graphcommerce-org/graphcommerce/commit/04708daccc213c6ea927bc67fa3bd0d5b1fad619), [`bb94e7045`](https://github.com/graphcommerce-org/graphcommerce/commit/bb94e7045460cb671c45d612a0833731d7c20c30), [`b0dc4e2e1`](https://github.com/graphcommerce-org/graphcommerce/commit/b0dc4e2e1982d502d38dd50a0f493396360a7a15), [`4a5286dfe`](https://github.com/graphcommerce-org/graphcommerce/commit/4a5286dfeaa1719e594a0078f274fbab53969c4e), [`d46d5ed0c`](https://github.com/graphcommerce-org/graphcommerce/commit/d46d5ed0cc5794391b7527fc17bbb68ec2212e33), [`5f781a217`](https://github.com/graphcommerce-org/graphcommerce/commit/5f781a217ce63ed56bc1a9983487b04400a8a315), [`01372b918`](https://github.com/graphcommerce-org/graphcommerce/commit/01372b918a291e01cbf5db40edcb40fb1c2af313)]:
36
+ - @graphcommerce/next-ui@4.22.0
37
+ - @graphcommerce/framer-utils@3.2.0
38
+ - @graphcommerce/graphql@3.4.7
39
+
3
40
  ## 1.1.12
4
41
 
5
42
  ### Patch Changes
@@ -1,8 +1,6 @@
1
1
  import { ApolloError } from '@graphcommerce/graphql'
2
- import { AnimatedRow } from '@graphcommerce/next-ui'
3
2
  import { extendableComponent } from '@graphcommerce/next-ui/Styles/extendableComponent'
4
3
  import { AlertProps, Alert, Box, SxProps, Theme } from '@mui/material'
5
- import { AnimatePresence } from 'framer-motion'
6
4
 
7
5
  const { classes, selectors } = extendableComponent('ApolloErrorAlert', ['root', 'alert'] as const)
8
6
 
@@ -16,42 +14,47 @@ export function ApolloErrorAlert(props: ApolloErrorAlertProps) {
16
14
  const { error, graphqlErrorAlertProps, networkErrorAlertProps, sx } = props
17
15
 
18
16
  return (
19
- <AnimatePresence initial={false}>
17
+ <>
20
18
  {error && (
21
- <AnimatedRow layout key='alerts'>
19
+ <Box key='alerts'>
22
20
  <Box sx={sx} className={classes.root}>
23
- <AnimatePresence initial={false}>
24
- {error.graphQLErrors.map((e, index) => (
25
- // eslint-disable-next-line react/no-array-index-key
26
- <AnimatedRow layout key={index}>
27
- <div className={classes.alert}>
28
- <Alert severity='error' {...graphqlErrorAlertProps}>
29
- {e.message}
30
- </Alert>
31
- </div>
32
- </AnimatedRow>
33
- ))}
34
- {error.networkError && (
35
- <AnimatedRow layout key='networkError'>
36
- <Box
21
+ {error.graphQLErrors.map((e, index) => (
22
+ // eslint-disable-next-line react/no-array-index-key
23
+ <Box key={index}>
24
+ <div className={classes.alert}>
25
+ <Alert
26
+ severity='error'
27
+ {...graphqlErrorAlertProps}
37
28
  sx={(theme) => ({
38
- paddingTop: theme.spacings.xxs,
39
- paddingBottom: theme.spacings.xxs,
29
+ borderRadius: theme.shape.borderRadius * 1,
30
+ marginTop: 0.5,
40
31
  })}
41
- className={classes.alert}
42
- key='networkError'
43
32
  >
44
- <Alert severity='error' {...networkErrorAlertProps}>
45
- Network Error: {error.networkError.message}
46
- </Alert>
47
- </Box>
48
- </AnimatedRow>
49
- )}
50
- </AnimatePresence>
33
+ {e.message}
34
+ </Alert>
35
+ </div>
36
+ </Box>
37
+ ))}
38
+ {error.networkError && (
39
+ <Box key='networkError'>
40
+ <Box
41
+ sx={(theme) => ({
42
+ paddingTop: theme.spacings.xxs,
43
+ paddingBottom: theme.spacings.xxs,
44
+ })}
45
+ className={classes.alert}
46
+ key='networkError'
47
+ >
48
+ <Alert severity='error' {...networkErrorAlertProps}>
49
+ Network Error: {error.networkError.message}
50
+ </Alert>
51
+ </Box>
52
+ </Box>
53
+ )}
51
54
  </Box>
52
- </AnimatedRow>
55
+ </Box>
53
56
  )}
54
- </AnimatePresence>
57
+ </>
55
58
  )
56
59
  }
57
60
 
@@ -18,7 +18,7 @@ export const WaitForQueries = (props: WaitForQueriesProps) => {
18
18
 
19
19
  // We are done when all queries either have data or an error.
20
20
  const isDone = (Array.isArray(waitFor) ? waitFor : [waitFor]).every(
21
- (res) => typeof res === 'undefined' || res.data || res.error,
21
+ (res) => (typeof res === 'undefined' || res.data || res.error || !res.loading) && mounted,
22
22
  )
23
23
 
24
24
  return <>{isDone && mounted ? children : fallback}</>
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.1.12",
5
+ "version": "1.2.2",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -12,10 +12,10 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@graphcommerce/framer-utils": "3.1.5",
16
- "@graphcommerce/next-ui": "4.21.0",
15
+ "@graphcommerce/framer-utils": "3.2.0",
16
+ "@graphcommerce/next-ui": "4.23.0",
17
17
  "@graphcommerce/react-hook-form": "3.3.2",
18
- "@graphcommerce/graphql": "3.4.6"
18
+ "@graphcommerce/graphql": "3.4.8"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@graphcommerce/eslint-config-pwa": "^4.1.10",