@graphcommerce/googlerecaptcha 9.0.0-canary.58 → 9.0.0-canary.60

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.60
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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))
8
+
9
+ ## 9.0.0-canary.59
10
+
3
11
  ## 9.0.0-canary.58
4
12
 
5
13
  ## 9.0.0-canary.57
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.58",
5
+ "version": "9.0.0-canary.60",
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.58",
19
- "@graphcommerce/graphql": "^9.0.0-canary.58",
20
- "@graphcommerce/next-ui": "^9.0.0-canary.58",
21
- "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.58",
22
- "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.58",
18
+ "@graphcommerce/eslint-config-pwa": "^9.0.0-canary.60",
19
+ "@graphcommerce/graphql": "^9.0.0-canary.60",
20
+ "@graphcommerce/next-ui": "^9.0.0-canary.60",
21
+ "@graphcommerce/prettier-config-pwa": "^9.0.0-canary.60",
22
+ "@graphcommerce/typescript-config-pwa": "^9.0.0-canary.60",
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 component = 'ApolloErrorAlert'
6
- export const exported = '@graphcommerce/ecommerce-ui'
7
- export const ifConfig = 'googleRecaptchaKey'
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/ecommerce-ui',
8
+ ifConfig: 'googleRecaptchaKey',
9
+ }
8
10
 
9
- function GrecaptchaApolloErrorAlert(props: PluginProps<ApolloErrorAlertProps>) {
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 component = 'ApolloErrorFullPage'
6
- export const exported = '@graphcommerce/ecommerce-ui'
7
- export const ifConfig = 'googleRecaptchaKey'
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/ecommerce-ui',
8
+ ifConfig: 'googleRecaptchaKey',
9
+ }
8
10
 
9
- function GrecaptchaApolloErrorFullPage(props: PluginProps<ApolloErrorFullPageProps>) {
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 component = 'ApolloErrorSnackbar'
6
- export const exported = '@graphcommerce/ecommerce-ui'
7
- export const ifConfig = 'googleRecaptchaKey'
5
+ export const config: PluginConfig = {
6
+ type: 'component',
7
+ module: '@graphcommerce/ecommerce-ui',
8
+ ifConfig: 'googleRecaptchaKey',
9
+ }
8
10
 
9
- function GrecaptchaApolloErrorSnackbar(props: PluginProps<ApolloErrorSnackbarProps>) {
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 component = 'GraphQLProvider'
11
- export const exported = '@graphcommerce/graphql'
12
- export const ifConfig = 'googleRecaptchaKey'
10
+ export const config: PluginConfig = {
11
+ type: 'component',
12
+ module: '@graphcommerce/graphql',
13
+ ifConfig: 'googleRecaptchaKey',
14
+ }
13
15
 
14
- function GrecaptchaGraphQLProvider(props: PluginProps<GraphQLProviderProps>) {
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