@graphcommerce/ecommerce-ui 7.1.0-canary.65 → 7.1.0-canary.67
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,9 @@
|
|
|
1
1
|
# @graphcommerce/ecommerce-ui
|
|
2
2
|
|
|
3
|
+
## 7.1.0-canary.67
|
|
4
|
+
|
|
5
|
+
## 7.1.0-canary.66
|
|
6
|
+
|
|
3
7
|
## 7.1.0-canary.65
|
|
4
8
|
|
|
5
9
|
## 7.1.0-canary.64
|
|
@@ -1068,31 +1072,31 @@
|
|
|
1068
1072
|
All occurences of `<Trans>` and `t` need to be replaced:
|
|
1069
1073
|
|
|
1070
1074
|
```tsx
|
|
1071
|
-
import { Trans, t } from
|
|
1075
|
+
import { Trans, t } from "@lingui/macro";
|
|
1072
1076
|
|
|
1073
1077
|
function MyComponent() {
|
|
1074
|
-
const foo =
|
|
1078
|
+
const foo = "bar";
|
|
1075
1079
|
return (
|
|
1076
1080
|
<div aria-label={t`Account ${foo}`}>
|
|
1077
1081
|
<Trans>My Translation {foo}</Trans>
|
|
1078
1082
|
</div>
|
|
1079
|
-
)
|
|
1083
|
+
);
|
|
1080
1084
|
}
|
|
1081
1085
|
```
|
|
1082
1086
|
|
|
1083
1087
|
Needs to be replaced with:
|
|
1084
1088
|
|
|
1085
1089
|
```tsx
|
|
1086
|
-
import { Trans } from
|
|
1087
|
-
import { i18n } from
|
|
1090
|
+
import { Trans } from "@lingui/react";
|
|
1091
|
+
import { i18n } from "@lingui/core";
|
|
1088
1092
|
|
|
1089
1093
|
function MyComponent() {
|
|
1090
|
-
const foo =
|
|
1094
|
+
const foo = "bar";
|
|
1091
1095
|
return (
|
|
1092
1096
|
<div aria-label={i18n._(/* i18n */ `Account {foo}`, { foo })}>
|
|
1093
|
-
<Trans key=
|
|
1097
|
+
<Trans key="My Translation {foo}" values={{ foo }}></Trans>
|
|
1094
1098
|
</div>
|
|
1095
|
-
)
|
|
1099
|
+
);
|
|
1096
1100
|
}
|
|
1097
1101
|
```
|
|
1098
1102
|
|
|
@@ -3,18 +3,21 @@ import React, { startTransition, useEffect, useState } from 'react'
|
|
|
3
3
|
|
|
4
4
|
export type WaitForQueriesProps = {
|
|
5
5
|
waitFor: QueryResult<any, any> | boolean | (QueryResult<any, any> | boolean)[] | undefined
|
|
6
|
+
noSsr?: boolean
|
|
6
7
|
children: React.ReactNode
|
|
7
8
|
fallback?: React.ReactNode
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
/** Shows the fallback during: SSR, Hydration and Query Loading. */
|
|
11
12
|
export const WaitForQueries = (props: WaitForQueriesProps) => {
|
|
12
|
-
const { waitFor, fallback, children } = props
|
|
13
|
+
const { waitFor, fallback, children, noSsr = false } = props
|
|
13
14
|
|
|
14
15
|
// Make sure the first render is always the same as the server.
|
|
15
16
|
// Make sure we we use startTransition to make sure we don't get into trouble with Suspense.
|
|
16
|
-
const [mounted, setMounted] = useState(
|
|
17
|
-
useEffect(() =>
|
|
17
|
+
const [mounted, setMounted] = useState(!noSsr)
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (noSsr) startTransition(() => setMounted(true))
|
|
20
|
+
}, [noSsr])
|
|
18
21
|
|
|
19
22
|
// We are done when all queries either have data or an error.
|
|
20
23
|
const isDone = (Array.isArray(waitFor) ? waitFor : [waitFor]).every((res) => {
|
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": "7.1.0-canary.
|
|
5
|
+
"version": "7.1.0-canary.67",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@graphcommerce/eslint-config-pwa": "^7.1.0-canary.
|
|
16
|
-
"@graphcommerce/graphql": "^7.1.0-canary.
|
|
17
|
-
"@graphcommerce/next-ui": "^7.1.0-canary.
|
|
18
|
-
"@graphcommerce/prettier-config-pwa": "^7.1.0-canary.
|
|
19
|
-
"@graphcommerce/react-hook-form": "^7.1.0-canary.
|
|
20
|
-
"@graphcommerce/typescript-config-pwa": "^7.1.0-canary.
|
|
15
|
+
"@graphcommerce/eslint-config-pwa": "^7.1.0-canary.67",
|
|
16
|
+
"@graphcommerce/graphql": "^7.1.0-canary.67",
|
|
17
|
+
"@graphcommerce/next-ui": "^7.1.0-canary.67",
|
|
18
|
+
"@graphcommerce/prettier-config-pwa": "^7.1.0-canary.67",
|
|
19
|
+
"@graphcommerce/react-hook-form": "^7.1.0-canary.67",
|
|
20
|
+
"@graphcommerce/typescript-config-pwa": "^7.1.0-canary.67",
|
|
21
21
|
"@lingui/core": "^4.2.1",
|
|
22
22
|
"@lingui/macro": "^4.2.1",
|
|
23
23
|
"@lingui/react": "^4.2.1",
|
|
24
24
|
"@mui/material": "^5.10.16",
|
|
25
25
|
"framer-motion": "^10.0.0",
|
|
26
|
-
"next": "
|
|
26
|
+
"next": "*",
|
|
27
27
|
"react": "^18.2.0",
|
|
28
28
|
"react-dom": "^18.2.0"
|
|
29
29
|
}
|