@graphcommerce/googlerecaptcha 1.1.8 → 2.0.1

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,57 @@
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.1
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
+ ### Patch Changes
7
6
 
7
+ - [`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)
8
+ Thanks [@paales](https://github.com/paales)! - Added homepage and repository package.json files,
9
+ so that the packages link to back to the website and repository
10
+ - Updated dependencies
11
+ [[`0cbaa878b`](https://github.com/ho-nl/m2-pwa/commit/0cbaa878b8a844d5abbeb1797b625a33130e6514)]:
12
+ - @graphcommerce/graphql@3.0.1
8
13
 
9
- ### Bug Fixes
14
+ ## 2.0.0
10
15
 
11
- * make sure we're not loading gogole properties when keys are not given ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
16
+ ### Major Changes
12
17
 
18
+ - [#1258](https://github.com/ho-nl/m2-pwa/pull/1258)
19
+ [`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)
20
+ Thanks [@paales](https://github.com/paales)! - Upgraded to Material UI 5
13
21
 
22
+ ### Patch Changes
14
23
 
24
+ - Updated dependencies
25
+ [[`ad36382a4`](https://github.com/ho-nl/m2-pwa/commit/ad36382a4d55d83d9e47b7eb6a02671a2a631a05)]:
26
+ - @graphcommerce/graphql@3.0.0
15
27
 
28
+ All notable changes to this project will be documented in this file. See
29
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
16
30
 
17
- ## [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
-
31
+ ## [1.1.8](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.7...@graphcommerce/googlerecaptcha@1.1.8) (2021-12-20)
19
32
 
20
33
  ### Bug Fixes
21
34
 
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
-
35
+ - make sure we're not loading gogole properties when keys are not given
36
+ ([8636715](https://github.com/ho-nl/m2-pwa/commit/8636715d61985e0919208ffb64354c3ebb43ed01))
25
37
 
38
+ ## [1.1.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/googlerecaptcha@1.1.1...@graphcommerce/googlerecaptcha@1.1.2) (2021-11-12)
26
39
 
40
+ ### Bug Fixes
27
41
 
42
+ - remove fragment
43
+ ([3d8a964](https://github.com/ho-nl/m2-pwa/commit/3d8a964f3009f04b3ba09d54272a31b592e7a052))
44
+ - remove hiding recaptcha from themeProvider, add to component
45
+ ([6a49f77](https://github.com/ho-nl/m2-pwa/commit/6a49f77ef9fd22ea66e7acd1322c65ac6426fd3b))
28
46
 
29
47
  # 1.1.0 (2021-11-03)
30
48
 
31
-
32
49
  ### Bug Fixes
33
50
 
34
- * make sure we're not throwing a warning on the production env. ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
35
-
51
+ - make sure we're not throwing a warning on the production env.
52
+ ([7ee4499](https://github.com/ho-nl/m2-pwa/commit/7ee449959509a13e684c19e2ff707e378d6b5c35))
36
53
 
37
54
  ### Features
38
55
 
39
- * google recaptcha v3 integration ([a9fcc16](https://github.com/ho-nl/m2-pwa/commit/a9fcc16f93951e61378c99a2e183e2d754da1d50))
56
+ - google recaptcha v3 integration
57
+ ([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,10 @@
1
1
  {
2
2
  "name": "@graphcommerce/googlerecaptcha",
3
- "version": "1.1.8",
3
+ "homepage": "https://www.graphcommerce.org/",
4
+ "repository": "github:graphcommerce-org/graphcommerce",
5
+ "version": "2.0.1",
4
6
  "sideEffects": false,
5
7
  "prettier": "@graphcommerce/prettier-config-pwa",
6
- "browserslist": [
7
- "extends @graphcommerce/browserslist-config-pwa"
8
- ],
9
8
  "eslintConfig": {
10
9
  "extends": "@graphcommerce/eslint-config-pwa",
11
10
  "parserOptions": {
@@ -13,19 +12,17 @@
13
12
  }
14
13
  },
15
14
  "devDependencies": {
16
- "@graphcommerce/browserslist-config-pwa": "^3.0.3",
17
- "@graphcommerce/eslint-config-pwa": "^3.1.9",
18
- "@graphcommerce/prettier-config-pwa": "^3.0.5",
19
- "@graphcommerce/typescript-config-pwa": "^3.1.2",
20
- "@playwright/test": "^1.17.1",
15
+ "@graphcommerce/eslint-config-pwa": "^4.0.1",
16
+ "@graphcommerce/prettier-config-pwa": "^4.0.1",
17
+ "@graphcommerce/typescript-config-pwa": "^4.0.1",
18
+ "@playwright/test": "^1.18.1",
21
19
  "@types/grecaptcha": "^3.0.3"
22
20
  },
23
21
  "dependencies": {
24
- "@apollo/client": "^3.5.6",
25
- "@material-ui/core": "^4.12.3",
26
- "next": "^12.0.7",
22
+ "@graphcommerce/graphql": "^3.0.1",
23
+ "@mui/material": "^5.4.1",
24
+ "next": "^12.0.10",
27
25
  "react": "^17.0.2",
28
26
  "react-dom": "^17.0.2"
29
- },
30
- "gitHead": "fb1eb0f747fea50f920970faf9020a3303066559"
27
+ }
31
28
  }