@graphcommerce/googlerecaptcha 1.1.9 → 2.0.0

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,39 +1,46 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
3
+ ## 2.0.0
5
4
 
6
- ## [1.1.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.7...@graphcommerce/googlerecaptcha@1.1.8) (2021-12-20)
5
+ ### Major Changes
7
6
 
7
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
8
+ [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
9
+ Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
8
10
 
9
- ### Bug Fixes
11
+ ### Patch Changes
10
12
 
11
- * make sure we're not loading gogole properties when keys are not given ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
13
+ - Updated dependencies
14
+ [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
15
+ - @graphcommerce/graphql@3.0.0
12
16
 
17
+ All notable changes to this project will be documented in this file. See
18
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
13
19
 
20
+ ## [1.1.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.7...@graphcommerce/googlerecaptcha@1.1.8) (2021-12-20)
14
21
 
22
+ ### Bug Fixes
15
23
 
24
+ - make sure we're not loading gogole properties when keys are not given
25
+ ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
16
26
 
17
27
  ## [1.1.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.1...@graphcommerce/googlerecaptcha@1.1.2) (2021-11-12)
18
28
 
19
-
20
29
  ### Bug Fixes
21
30
 
22
- * remove fragment ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
23
- * remove hiding recaptcha from themeProvider, add to component ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
24
-
25
-
26
-
27
-
31
+ - remove fragment
32
+ ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
33
+ - remove hiding recaptcha from themeProvider, add to component
34
+ ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
28
35
 
29
36
  # 1.1.0 (2021-11-03)
30
37
 
31
-
32
38
  ### Bug Fixes
33
39
 
34
- * make sure we're not throwing a warning on the production env. ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
35
-
40
+ - make sure we're not throwing a warning on the production env.
41
+ ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
36
42
 
37
43
  ### Features
38
44
 
39
- * google recaptcha v3 integration ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
45
+ - google recaptcha v3 integration
46
+ ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
package/README.md CHANGED
@@ -11,4 +11,4 @@ This package makes it easy to add Google Recaptcha v3 to GraphCommerce
11
11
  3. Add `recaptchaLink` to your Apollo Client.
12
12
  [example](../../examples/magento-graphcms/lib/createApolloClient.ts)
13
13
  4. Add `X-Recaptcha` header to your `.meshrc.yml`.
14
- [example](../../examples/magento-graphcms/lib/createApolloClient.ts)
14
+ [example](../../examples/magento-graphcms/.meshrc.yml)
@@ -1,23 +1,8 @@
1
- import { makeStyles } from '@material-ui/core'
2
1
  import Script from 'next/script'
3
2
  import React from 'react'
4
3
 
5
- const useStyles = makeStyles(
6
- {
7
- '@global': {
8
- body: {
9
- '& .grecaptcha-badge': {
10
- visibility: 'hidden', // https://developers.google.com/recaptcha/docs/faq
11
- },
12
- },
13
- },
14
- },
15
- { name: 'IconBlock' },
16
- )
17
-
18
4
  export default function GoogleRecaptchaV3Script() {
19
5
  const siteKey = process.env.NEXT_PUBLIC_GOOGLE_RECAPTCHA_V3_SITE_KEY
20
- useStyles()
21
6
 
22
7
  if (process.env.NODE_ENV !== 'production' && !siteKey)
23
8
  console.warn(
@@ -27,9 +12,12 @@ export default function GoogleRecaptchaV3Script() {
27
12
  if (!siteKey) return null
28
13
 
29
14
  return (
30
- <Script
31
- strategy='lazyOnload'
32
- src={`https://www.google.com/recaptcha/api.js?render=${siteKey}`}
33
- />
15
+ <>
16
+ <Script
17
+ strategy='lazyOnload'
18
+ src={`https://www.google.com/recaptcha/api.js?render=${siteKey}`}
19
+ />
20
+ <style>{`.grecaptcha-badge': { visibility: 'hidden' }`}</style>
21
+ </>
34
22
  )
35
23
  }
@@ -1,5 +1,4 @@
1
- import { GraphQLRequest } from '@apollo/client'
2
- import { setContext } from '@apollo/client/link/context'
1
+ import { GraphQLRequest, setContext } from '@graphcommerce/graphql'
3
2
 
4
3
  const isMutation = (operation: GraphQLRequest) =>
5
4
  operation.query.definitions.some(
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "@graphcommerce/googlerecaptcha",
3
- "version": "1.1.9",
3
+ "version": "2.0.0",
4
4
  "sideEffects": false,
5
5
  "prettier": "@graphcommerce/prettier-config-pwa",
6
- "browserslist": [
7
- "extends @graphcommerce/browserslist-config-pwa"
8
- ],
9
6
  "eslintConfig": {
10
7
  "extends": "@graphcommerce/eslint-config-pwa",
11
8
  "parserOptions": {
@@ -13,19 +10,17 @@
13
10
  }
14
11
  },
15
12
  "devDependencies": {
16
- "@graphcommerce/browserslist-config-pwa": "^3.0.3",
17
- "@graphcommerce/eslint-config-pwa": "^3.1.10",
18
- "@graphcommerce/prettier-config-pwa": "^3.0.5",
19
- "@graphcommerce/typescript-config-pwa": "^3.1.2",
20
- "@playwright/test": "^1.17.1",
13
+ "@graphcommerce/eslint-config-pwa": "^4.0.0",
14
+ "@graphcommerce/prettier-config-pwa": "^4.0.0",
15
+ "@graphcommerce/typescript-config-pwa": "^4.0.0",
16
+ "@playwright/test": "^1.18.1",
21
17
  "@types/grecaptcha": "^3.0.3"
22
18
  },
23
19
  "dependencies": {
24
- "@apollo/client": "^3.5.6",
25
- "@material-ui/core": "^4.12.3",
26
- "next": "^12.0.7",
20
+ "@graphcommerce/graphql": "^3.0.0",
21
+ "@mui/material": "^5.4.1",
22
+ "next": "^12.0.10",
27
23
  "react": "^17.0.2",
28
24
  "react-dom": "^17.0.2"
29
- },
30
- "gitHead": "bc5423d7547f8685db4cd8fc6d8f7a2a51ebed05"
25
+ }
31
26
  }