@gr4vy/secure-fields-react 1.22.1 → 1.23.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,3 +1,29 @@
1
+ # v1.23.0 (Thu Jun 12 2025)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - test: enable tests [#904](https://github.com/gr4vy/secure-fields/pull/904) ([@brunodesde1987](https://github.com/brunodesde1987))
6
+
7
+ #### 🐛 Bug Fix
8
+
9
+ - fix: update invalid color to #e52424 across styles [#903](https://github.com/gr4vy/secure-fields/pull/903) ([@brunodesde1987](https://github.com/brunodesde1987))
10
+ - task: fix html element must have a lang attribute [#896](https://github.com/gr4vy/secure-fields/pull/896) ([@luca-gr4vy](https://github.com/luca-gr4vy))
11
+ - task: set up accessibility tooling [#886](https://github.com/gr4vy/secure-fields/pull/886) ([@luca-gr4vy](https://github.com/luca-gr4vy))
12
+ - fix(docs): Link to public docs in readme [#874](https://github.com/gr4vy/secure-fields/pull/874) ([@cbetta](https://github.com/cbetta))
13
+
14
+ #### 🏠 Internal
15
+
16
+ - chore(dev-deps): update dependency typescript-transform-paths to ^3.5.5 [#844](https://github.com/gr4vy/secure-fields/pull/844) ([@renovate[bot]](https://github.com/renovate[bot]))
17
+
18
+ #### Authors: 4
19
+
20
+ - [@renovate[bot]](https://github.com/renovate[bot])
21
+ - Bruno Carvalho ([@brunodesde1987](https://github.com/brunodesde1987))
22
+ - Cristiano Betta ([@cbetta](https://github.com/cbetta))
23
+ - Luca Allievi ([@luca-gr4vy](https://github.com/luca-gr4vy))
24
+
25
+ ---
26
+
1
27
  # v1.22.0 (Wed Jan 08 2025)
2
28
 
3
29
  #### 🏠 Internal
package/README.md CHANGED
@@ -54,10 +54,10 @@ const { SecureFields } = require("@gr4vy/secure-fields-react")
54
54
  | `paymentMethodId` | An optional uuid that can be passed to use Secure Fields with a stored payment method. |
55
55
  | `debug` | Enables / disables the debug mode. |
56
56
  | `font` | Loads a custom font from [Google Fonts](https://fonts.google.com/) to be used inside inputs. You can define the font family as well as styles or weights as a string (e.g. "Lato:400,600"). To use the loaded font, add the correct `fontFamily` property to the styles object when rendering fields. |
57
- | `onReady` | An event handler that listens for Secure Fields to be securely loaded. It listens for the [`READY`](../secure-fields/README.md#events) event and accepts a callback function. |
58
- | `onFormChange` | An event handler that listens for Secure Fields change. It listens for the [`FORM_CHANGE`](../secure-fields/README.md#events) event and accepts a callback function. |
59
- | `onCardVaultSuccess` | An event handler that listens for card data to be securely vaulted. It listens for the [`CARD_VAULT_SUCCESS`](../secure-fields/README.md#events) event and accepts a callback function. |
60
- | `onCardVaultFailure` | An event handler that listens for any failures when storing any card data. It listens for the [`CARD_VAULT_FAILURE`](../secure-fields/README.md#events) event and accepts a callback function. |
57
+ | `onReady` | An event handler that listens for Secure Fields to be securely loaded. It listens for the [`READY`](https://docs.gr4vy.com/guides/payments/secure-fields/events) event and accepts a callback function. |
58
+ | `onFormChange` | An event handler that listens for Secure Fields change. It listens for the [`FORM_CHANGE`](https://docs.gr4vy.com/guides/payments/secure-fields/events) event and accepts a callback function. |
59
+ | `onCardVaultSuccess` | An event handler that listens for card data to be securely vaulted. It listens for the [`CARD_VAULT_SUCCESS`](https://docs.gr4vy.com/guides/payments/secure-fields/events) event and accepts a callback function. |
60
+ | `onCardVaultFailure` | An event handler that listens for any failures when storing any card data. It listens for the [`CARD_VAULT_FAILURE`](https://docs.gr4vy.com/guides/payments/secure-fields/events) event and accepts a callback function. |
61
61
 
62
62
  ### Creating a form
63
63
 
@@ -111,7 +111,7 @@ The available secure fields components are `CardNumber`, `ExpiryDate` and `Secur
111
111
  | Prop Name | Description |
112
112
  | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
113
113
  | `placeholder` | Input placeholder text. |
114
- | `styles` | An object of CSS rules to style the input inside the iframe. See [Styles](../secure-fields/README.md#styles) for more information. |
114
+ | `styles` | An object of CSS rules to style the input inside the iframe. See [Styles](https://docs.gr4vy.com/guides/payments/secure-fields/theming) for more information. |
115
115
  | `onBlur` | Attaches an event handler to the input, listening for the blur event. The data available in the passed callback includes an `id` representing the field type (e.g. `expiryDate`). |
116
116
  | `onFocus` | Attaches an event handler to the input, listening for the focus event. The data available in the passed callback includes an `id` representing the field type (e.g. `expiryDate`). |
117
117
  | `onInput` | Attaches an event handler to the input, listening for the input event. The data available in the passed callback includes an `id` representing the field type (e.g. `expiryDate`) and some useful card validation information, such as the current scheme (e.g. `visa`) and security code label (e.g. `CVV`). |
@@ -203,11 +203,11 @@ The following props can be used on the `SecureFields` component to listen to spe
203
203
 
204
204
  | Prop Name | Description |
205
205
  | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
206
- | `onClickToPayInitialized` | An event handler that listens for Click to Pay to be securely initialized. It listens for the [`CLICK_TO_PAY_INITIALIZED`](../secure-fields/README.md#additional-global-events) event and accepts a callback function with a `clickToPay` instance as argument. |
207
- | `onClickToPayReady` | An event handler that listens for Click to Pay to be ready. It listens for the [`CLICK_TO_PAY_READY`](../secure-fields/README.md#additional-global-events) event and accepts a callback function with an object `{ buyerExists: boolean }`. |
208
- | `onClickToPaySignOut` | An event handler that listens for users signing out of Click to Pay. It listens for the [`CLICK_TO_PAY_SIGN_OUT`](../secure-fields/README.md#additional-global-events) event and accepts a callback function. |
209
- | `onClickToPayError` | An event handler that listens for any errors thrown by Click to Pay. It listens for the [`CLICK_TO_PAY_ERROR`](../secure-fields/README.md#additional-global-events) event and accepts a callback function with the error type (one of \| 'RETRIES_EXCEEDED' \| 'CODE_INVALID' \| 'INVALID_CARD' \| 'SIGN_OUT_FAILED' \| 'ACCT_INACCESSIBLE' \| 'UNKNOWN' \| 'USER_NOT_RECOGNIZED'). |
210
- | `onClickToPayCancel` | An event handler that listens for users closing / cancelling Click to Pay. It listens for the [`CLICK_TO_PAY_CANCEL`](../secure-fields/README.md#additional-global-events) event and accepts a callback function. |
211
- | `onClickToPayCheckoutWithNewCard` | An event handler that listens for users checking out with a new card. It listens for the [`CLICK_TO_PAY_CHECKOUT_WITH_NEW_CARD`](../secure-fields/README.md#additional-global-events) event and accepts a callback function. |
212
- | `onClickToPayUnableToLoadDpa` | An event handler that listens for Click to Pay not being able to load the provided DPA. It listens for the [`CLICK_TO_PAY_UNABLE_TO_LOAD_DPA`](../secure-fields/README.md#additional-global-events) event and accepts a callback function. |
213
- | `onMethodChange` | An event handler that listens for users selecting a different method (either `card` or `click-to-pay`). It listens for the [`METHOD_CHANGE`](../secure-fields/README.md#additional-global-events) event and accepts a callback function with the selected method. |
206
+ | `onClickToPayInitialized` | An event handler that listens for Click to Pay to be securely initialized. It listens for the [`CLICK_TO_PAY_INITIALIZED`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function with a `clickToPay` instance as argument. |
207
+ | `onClickToPayReady` | An event handler that listens for Click to Pay to be ready. It listens for the [`CLICK_TO_PAY_READY`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function with an object `{ buyerExists: boolean }`. |
208
+ | `onClickToPaySignOut` | An event handler that listens for users signing out of Click to Pay. It listens for the [`CLICK_TO_PAY_SIGN_OUT`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function. |
209
+ | `onClickToPayError` | An event handler that listens for any errors thrown by Click to Pay. It listens for the [`CLICK_TO_PAY_ERROR`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function with the error type (one of \| 'RETRIES_EXCEEDED' \| 'CODE_INVALID' \| 'INVALID_CARD' \| 'SIGN_OUT_FAILED' \| 'ACCT_INACCESSIBLE' \| 'UNKNOWN' \| 'USER_NOT_RECOGNIZED'). |
210
+ | `onClickToPayCancel` | An event handler that listens for users closing / cancelling Click to Pay. It listens for the [`CLICK_TO_PAY_CANCEL`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function. |
211
+ | `onClickToPayCheckoutWithNewCard` | An event handler that listens for users checking out with a new card. It listens for the [`CLICK_TO_PAY_CHECKOUT_WITH_NEW_CARD`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function. |
212
+ | `onClickToPayUnableToLoadDpa` | An event handler that listens for Click to Pay not being able to load the provided DPA. It listens for the [`CLICK_TO_PAY_UNABLE_TO_LOAD_DPA`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function. |
213
+ | `onMethodChange` | An event handler that listens for users selecting a different method (either `card` or `click-to-pay`). It listens for the [`METHOD_CHANGE`](https://docs.gr4vy.com/guides/payments/secure-fields/events#global-events) event and accepts a callback function with the selected method. |
package/lib/style.css CHANGED
@@ -6,5 +6,5 @@
6
6
  }
7
7
 
8
8
  .secure-fields__input[data-secure-fields-invalid] {
9
- border-color: #eb4c4b;
9
+ border-color: #e52424;
10
10
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gr4vy/secure-fields-react",
3
- "version": "1.22.1",
3
+ "version": "1.23.0",
4
4
  "description": "Gr4vy-hosted secure fields offering advanced theming, PCI compliance, event handling, and more.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index",
@@ -41,17 +41,18 @@
41
41
  "react-dom": ">=17.0.0"
42
42
  },
43
43
  "dependencies": {
44
- "@gr4vy/secure-fields": "^1.22.1"
44
+ "@gr4vy/secure-fields": "^1.23.0"
45
45
  },
46
46
  "devDependencies": {
47
+ "@testing-library/react": "^12.1.5",
47
48
  "@testing-library/react-hooks": "^8.0.1",
48
49
  "react": "^17.0.2",
49
50
  "react-dom": "^17.0.2",
50
51
  "ts-patch": "^2.1.0",
51
- "typescript-transform-paths": "^3.5.3"
52
+ "typescript-transform-paths": "^3.5.5"
52
53
  },
53
54
  "publishConfig": {
54
55
  "access": "public"
55
56
  },
56
- "gitHead": "3f5790f2b6172d1cc833d9173300fe08a129f6e0"
57
+ "gitHead": "8f78925935318c6e9d20d6146cf3a7369039ac62"
57
58
  }