@graphcommerce/googlerecaptcha 9.0.0-canary.59 → 9.0.0-canary.61
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
|
+
## 9.0.0-canary.61
|
|
4
|
+
|
|
5
|
+
## 9.0.0-canary.60
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2331](https://github.com/graphcommerce-org/graphcommerce/pull/2331) [`702bfc9`](https://github.com/graphcommerce-org/graphcommerce/commit/702bfc93566c9745546988e57988431d5d4d8cb0) - Moved plugins to new format ([@paales](https://github.com/paales))
|
|
10
|
+
|
|
3
11
|
## 9.0.0-canary.59
|
|
4
12
|
|
|
5
13
|
## 9.0.0-canary.58
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/googlerecaptcha",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "9.0.0-canary.
|
|
5
|
+
"version": "9.0.0-canary.61",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"@types/grecaptcha": "^3.0.9"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.
|
|
19
|
-
"@graphcommerce/graphql": "^9.0.0-canary.
|
|
20
|
-
"@graphcommerce/next-ui": "^9.0.0-canary.
|
|
21
|
-
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.
|
|
22
|
-
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.
|
|
18
|
+
"@graphcommerce/eslint-config-pwa": "^9.0.0-canary.61",
|
|
19
|
+
"@graphcommerce/graphql": "^9.0.0-canary.61",
|
|
20
|
+
"@graphcommerce/next-ui": "^9.0.0-canary.61",
|
|
21
|
+
"@graphcommerce/prettier-config-pwa": "^9.0.0-canary.61",
|
|
22
|
+
"@graphcommerce/typescript-config-pwa": "^9.0.0-canary.61",
|
|
23
23
|
"@mui/material": "^5.10.16",
|
|
24
24
|
"next": "*",
|
|
25
25
|
"react": "^18.2.0",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ApolloErrorAlertProps } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import type { PluginProps } from '@graphcommerce/next-config'
|
|
2
|
+
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
3
3
|
import { useGoogleRecaptcha } from '../hooks/useGoogleRecaptcha'
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export const config: PluginConfig = {
|
|
6
|
+
type: 'component',
|
|
7
|
+
module: '@graphcommerce/ecommerce-ui',
|
|
8
|
+
ifConfig: 'googleRecaptchaKey',
|
|
9
|
+
}
|
|
8
10
|
|
|
9
|
-
function
|
|
11
|
+
export function ApolloErrorAlert(props: PluginProps<ApolloErrorAlertProps>) {
|
|
10
12
|
const { Prev, ...rest } = props
|
|
11
13
|
useGoogleRecaptcha()
|
|
12
14
|
return <Prev {...rest} />
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
export const Plugin = GrecaptchaApolloErrorAlert
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ApolloErrorFullPageProps } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import type { PluginProps } from '@graphcommerce/next-config'
|
|
2
|
+
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
3
3
|
import { useGoogleRecaptcha } from '../hooks/useGoogleRecaptcha'
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export const config: PluginConfig = {
|
|
6
|
+
type: 'component',
|
|
7
|
+
module: '@graphcommerce/ecommerce-ui',
|
|
8
|
+
ifConfig: 'googleRecaptchaKey',
|
|
9
|
+
}
|
|
8
10
|
|
|
9
|
-
function
|
|
11
|
+
export function ApolloErrorFullPage(props: PluginProps<ApolloErrorFullPageProps>) {
|
|
10
12
|
const { Prev, ...rest } = props
|
|
11
13
|
useGoogleRecaptcha()
|
|
12
14
|
return <Prev {...rest} />
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
export const Plugin = GrecaptchaApolloErrorFullPage
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { ApolloErrorSnackbarProps } from '@graphcommerce/ecommerce-ui'
|
|
2
|
-
import type { PluginProps } from '@graphcommerce/next-config'
|
|
2
|
+
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
3
3
|
import { useGoogleRecaptcha } from '../hooks/useGoogleRecaptcha'
|
|
4
4
|
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
export const config: PluginConfig = {
|
|
6
|
+
type: 'component',
|
|
7
|
+
module: '@graphcommerce/ecommerce-ui',
|
|
8
|
+
ifConfig: 'googleRecaptchaKey',
|
|
9
|
+
}
|
|
8
10
|
|
|
9
|
-
function
|
|
11
|
+
export function ApolloErrorSnackbar(props: PluginProps<ApolloErrorSnackbarProps>) {
|
|
10
12
|
const { Prev, ...rest } = props
|
|
11
13
|
useGoogleRecaptcha()
|
|
12
14
|
return <Prev {...rest} />
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
export const Plugin = GrecaptchaApolloErrorSnackbar
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GraphQLProviderProps } from '@graphcommerce/graphql'
|
|
2
|
-
import type { PluginProps } from '@graphcommerce/next-config'
|
|
2
|
+
import type { PluginConfig, PluginProps } from '@graphcommerce/next-config'
|
|
3
3
|
import { GlobalStyles } from '@mui/material'
|
|
4
4
|
import Script from 'next/script'
|
|
5
5
|
import { useState, useMemo } from 'react'
|
|
@@ -7,11 +7,13 @@ import { recaptchaContext, RecaptchaContext } from '../context/recaptchaContext'
|
|
|
7
7
|
import { useGoogleRecaptchaSiteKey } from '../hooks/useGoogleRecaptchaSiteKey'
|
|
8
8
|
import { recaptchaLink } from '../link/recaptchaLink'
|
|
9
9
|
|
|
10
|
-
export const
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export const config: PluginConfig = {
|
|
11
|
+
type: 'component',
|
|
12
|
+
module: '@graphcommerce/graphql',
|
|
13
|
+
ifConfig: 'googleRecaptchaKey',
|
|
14
|
+
}
|
|
13
15
|
|
|
14
|
-
function
|
|
16
|
+
export function GraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
|
|
15
17
|
const { Prev, links = [], ...prev } = props
|
|
16
18
|
|
|
17
19
|
const [enabled, setEnabled] = useState(false)
|
|
@@ -42,5 +44,3 @@ function GrecaptchaGraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
|
|
|
42
44
|
</recaptchaContext.Provider>
|
|
43
45
|
)
|
|
44
46
|
}
|
|
45
|
-
|
|
46
|
-
export const Plugin = GrecaptchaGraphQLProvider
|