@gr4vy/secure-fields-react 2.3.2 → 2.3.4
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,16 @@
|
|
|
1
|
+
# v2.3.4 (Tue Apr 21 2026)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- fix: refactor and fix with redacted events and timestamps [#1184](https://github.com/gr4vy/secure-fields/pull/1184) ([@luca-gr4vy](https://github.com/luca-gr4vy) [@GiordanoArman](https://github.com/GiordanoArman))
|
|
6
|
+
|
|
7
|
+
#### Authors: 2
|
|
8
|
+
|
|
9
|
+
- GiordanoArman ([@GiordanoArman](https://github.com/GiordanoArman))
|
|
10
|
+
- Luca Allievi ([@luca-gr4vy](https://github.com/luca-gr4vy))
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
1
14
|
# v2.3.2 (Tue Apr 14 2026)
|
|
2
15
|
|
|
3
16
|
#### 🐛 Bug Fix
|
|
@@ -27,7 +27,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
27
27
|
var react_1 = require("react");
|
|
28
28
|
var use_secure_input_1 = require("../../hooks/use-secure-input");
|
|
29
29
|
exports.Field = (0, react_1.forwardRef)(function (props, handleRef) {
|
|
30
|
-
var maskInput = props.maskInput, rest = __rest(props, ["maskInput"]);
|
|
30
|
+
var maskInput = props.maskInput, onRedacted = props.onRedacted, onUnredacted = props.onUnredacted, rest = __rest(props, ["maskInput", "onRedacted", "onUnredacted"]);
|
|
31
31
|
var ref = (0, react_1.useRef)(null);
|
|
32
32
|
var field = (0, use_secure_input_1.useSecureInput)(__assign(__assign({}, props), { ref: ref }));
|
|
33
33
|
(0, react_1.useImperativeHandle)(handleRef, function () { return ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":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+33,7 @@ var addFieldFns = {
|
|
|
33
33
|
var useSecureInput = function (options) {
|
|
34
34
|
var secureFields = (0, use_secure_fields_1.useSecureFields)().secureFields;
|
|
35
35
|
var _a = (0, react_1.useState)(), field = _a[0], setField = _a[1];
|
|
36
|
-
var ref = options.ref, type = options.type, onBlur = options.onBlur, onFocus = options.onFocus, onInput = options.onInput, rest = __rest(options, ["ref", "type", "onBlur", "onFocus", "onInput"]);
|
|
36
|
+
var ref = options.ref, type = options.type, onBlur = options.onBlur, onFocus = options.onFocus, onInput = options.onInput, onRedacted = options.onRedacted, onUnredacted = options.onUnredacted, rest = __rest(options, ["ref", "type", "onBlur", "onFocus", "onInput", "onRedacted", "onUnredacted"]);
|
|
37
37
|
var addField = function (type) {
|
|
38
38
|
if (!secureFields || !(options === null || options === void 0 ? void 0 : options.ref) || field) {
|
|
39
39
|
return;
|
|
@@ -56,10 +56,14 @@ var useSecureInput = function (options) {
|
|
|
56
56
|
onBlur && field.addEventListener('blur', onBlur);
|
|
57
57
|
onFocus && field.addEventListener('focus', onFocus);
|
|
58
58
|
onInput && field.addEventListener('input', onInput);
|
|
59
|
+
onRedacted && field.addEventListener('redacted', onRedacted);
|
|
60
|
+
onUnredacted && field.addEventListener('unredacted', onUnredacted);
|
|
59
61
|
return function () {
|
|
60
62
|
onBlur && field.removeEventListener('blur', onBlur);
|
|
61
63
|
onFocus && field.removeEventListener('focus', onFocus);
|
|
62
64
|
onInput && field.removeEventListener('input', onInput);
|
|
65
|
+
onRedacted && field.removeEventListener('redacted', onRedacted);
|
|
66
|
+
onUnredacted && field.removeEventListener('unredacted', onUnredacted);
|
|
63
67
|
};
|
|
64
68
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
69
|
}, [secureFields, field]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-secure-input.js","sourceRoot":"","sources":["../../src/hooks/use-secure-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,+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MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;YACnD,OAAO,IAAI,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YACtD,OAAO,IAAI,KAAK,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YACtD,UAAU,IAAI,KAAK,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAA;YAC/D,YAAY,IAAI,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAA;QACvE,CAAC,CAAA;QACD,uDAAuD;IACzD,CAAC,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,CAAA;IAEzB,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAvDY,QAAA,cAAc,kBAuD1B"}
|
package/lib/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gr4vy/secure-fields-react",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
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,7 +41,7 @@
|
|
|
41
41
|
"react-dom": ">=17.0.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@gr4vy/secure-fields": "^2.3.
|
|
44
|
+
"@gr4vy/secure-fields": "^2.3.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@testing-library/react": "^12.1.5",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"access": "public",
|
|
56
56
|
"registry": "https://registry.npmjs.org"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "428e1b2460c3306e09875c5614de27a7a0c3dc72"
|
|
59
59
|
}
|