@gr4vy/secure-fields-react 1.0.0 → 1.1.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,17 @@
1
+ # v1.1.0 (Fri Jan 20 2023)
2
+
3
+ #### 🏠 Internal
4
+
5
+ - chore: absolute import [#145](https://github.com/gr4vy/secure-fields/pull/145) ([@theturboboy](https://github.com/theturboboy))
6
+ - fix: tests [#94](https://github.com/gr4vy/secure-fields/pull/94) ([@luca-gr4vy](https://github.com/luca-gr4vy))
7
+
8
+ #### Authors: 2
9
+
10
+ - Andrei Haidukevich ([@theturboboy](https://github.com/theturboboy))
11
+ - Luca Allievi ([@luca-gr4vy](https://github.com/luca-gr4vy))
12
+
13
+ ---
14
+
1
15
  # v1.0.0 (Tue Oct 18 2022)
2
16
 
3
17
  #### 🏠 Internal
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { Field as FieldProps } from '../../types';
2
+ import { Field as FieldProps } from "../../types";
3
3
  export declare const CardNumber: (props: Omit<FieldProps, 'type'>) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CardNumber.js","sourceRoot":"","sources":["../../../src/components/CardNumber/CardNumber.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kCAAgC;AAEzB,IAAM,UAAU,GAAG,UAAC,KAA+B;IACxD,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,QAAQ,IAAK,KAAK,EAAI,CAAA;AAC3C,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB"}
1
+ {"version":3,"file":"CardNumber.js","sourceRoot":"","sources":["../../../src/components/CardNumber/CardNumber.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kCAAwC;AAGjC,IAAM,UAAU,GAAG,UAAC,KAA+B;IACxD,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,QAAQ,IAAK,KAAK,EAAI,CAAA;AAC3C,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { Field as FieldProps } from '../../types';
2
+ import { Field as FieldProps } from "../../types";
3
3
  export declare const ExpiryDate: (props: Omit<FieldProps, 'type'>) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpiryDate.js","sourceRoot":"","sources":["../../../src/components/ExpiryDate/ExpiryDate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kCAAgC;AAEzB,IAAM,UAAU,GAAG,UAAC,KAA+B;IACxD,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,YAAY,IAAK,KAAK,EAAI,CAAA;AAC/C,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB"}
1
+ {"version":3,"file":"ExpiryDate.js","sourceRoot":"","sources":["../../../src/components/ExpiryDate/ExpiryDate.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kCAAwC;AAGjC,IAAM,UAAU,GAAG,UAAC,KAA+B;IACxD,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,YAAY,IAAK,KAAK,EAAI,CAAA;AAC/C,CAAC,CAAA;AAFY,QAAA,UAAU,cAEtB"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { Field as FieldProps } from '../../types';
2
+ import { Field as FieldProps } from "../../types";
3
3
  export declare const Field: (props: FieldProps) => JSX.Element;
@@ -14,10 +14,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
14
14
  exports.Field = void 0;
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var react_1 = require("react");
17
- var __1 = require("../..");
17
+ var use_secure_input_1 = require("../../hooks/use-secure-input");
18
18
  var Field = function (props) {
19
19
  var ref = (0, react_1.useRef)();
20
- (0, __1.useSecureInput)(__assign(__assign({}, props), { ref: ref }));
20
+ (0, use_secure_input_1.useSecureInput)(__assign(__assign({}, props), { ref: ref }));
21
21
  return (0, jsx_runtime_1.jsx)("input", { ref: ref });
22
22
  };
23
23
  exports.Field = Field;
@@ -1 +1 @@
1
- {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,2BAAsC;AAG/B,IAAM,KAAK,GAAG,UAAC,KAAiB;IACrC,IAAM,GAAG,GAAG,IAAA,cAAM,GAAE,CAAA;IACpB,IAAA,kBAAc,wBAAM,KAAK,KAAE,GAAG,KAAA,IAAG,CAAA;IACjC,OAAO,kCAAO,GAAG,EAAE,GAAG,GAAI,CAAA;AAC5B,CAAC,CAAA;AAJY,QAAA,KAAK,SAIjB"}
1
+ {"version":3,"file":"Field.js","sourceRoot":"","sources":["../../../src/components/Field/Field.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,iEAAuD;AAGhD,IAAM,KAAK,GAAG,UAAC,KAAiB;IACrC,IAAM,GAAG,GAAG,IAAA,cAAM,GAAE,CAAA;IACpB,IAAA,iCAAc,wBAAM,KAAK,KAAE,GAAG,KAAA,IAAG,CAAA;IACjC,OAAO,kCAAO,GAAG,EAAE,GAAG,GAAI,CAAA;AAC5B,CAAC,CAAA;AAJY,QAAA,KAAK,SAIjB"}
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { Config } from '../../types';
2
+ import { Config } from "../../types";
3
3
  export declare type Props = {
4
4
  children?: ReactNode;
5
5
  } & Config;
@@ -1 +1 @@
1
- {"version":3,"file":"SecureFields.js","sourceRoot":"","sources":["../../../src/components/SecureFields/SecureFields.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAAoE;AAO7D,IAAM,YAAY,GAAG,UAAC,EAA8B;IAA5B,IAAA,QAAQ,cAAA,EAAK,MAAM,cAArB,YAAuB,CAAF;IAChD,OAAO,uBAAC,wCAAoB,eAAK,MAAM,cAAG,QAAQ,IAAwB,CAAA;AAC5E,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB"}
1
+ {"version":3,"file":"SecureFields.js","sourceRoot":"","sources":["../../../src/components/SecureFields/SecureFields.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAA8D;AAOvD,IAAM,YAAY,GAAG,UAAC,EAA8B;IAA5B,IAAA,QAAQ,cAAA,EAAK,MAAM,cAArB,YAAuB,CAAF;IAChD,OAAO,uBAAC,wCAAoB,eAAK,MAAM,cAAG,QAAQ,IAAwB,CAAA;AAC5E,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { Field as FieldProps } from '../../types';
2
+ import { Field as FieldProps } from "../../types";
3
3
  export declare const SecurityCode: (props: Omit<FieldProps, 'type'>) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityCode.js","sourceRoot":"","sources":["../../../src/components/SecurityCode/SecurityCode.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kCAAgC;AAEzB,IAAM,YAAY,GAAG,UAAC,KAA+B;IAC1D,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,cAAc,IAAK,KAAK,EAAI,CAAA;AACjD,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB"}
1
+ {"version":3,"file":"SecurityCode.js","sourceRoot":"","sources":["../../../src/components/SecurityCode/SecurityCode.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kCAAwC;AAGjC,IAAM,YAAY,GAAG,UAAC,KAA+B;IAC1D,OAAO,uBAAC,aAAK,aAAC,IAAI,EAAC,cAAc,IAAK,KAAK,EAAI,CAAA;AACjD,CAAC,CAAA;AAFY,QAAA,YAAY,gBAExB"}
@@ -1,6 +1,6 @@
1
1
  import { SecureFields } from '@gr4vy/secure-fields';
2
2
  import { PropsWithChildren } from 'react';
3
- import { Config } from '../types';
3
+ import { Config } from "../types";
4
4
  export declare const SecureFieldsContext: import("react").Context<{
5
5
  secureFields: SecureFields;
6
6
  debug: boolean;
@@ -1,3 +1,3 @@
1
1
  import { SecureInput } from '@gr4vy/secure-fields';
2
- import { Field } from '../types';
2
+ import { Field } from "../types";
3
3
  export declare const useSecureInput: (options?: Field) => SecureInput;
@@ -1 +1 @@
1
- {"version":3,"file":"use-secure-input.js","sourceRoot":"","sources":["../../src/hooks/use-secure-input.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,+BAA2C;AAE3C,yDAAqD;AAErD,IAAM,WAAW,GAAG;IAClB,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE,oBAAoB;IAChC,YAAY,EAAE,sBAAsB;CACrC,CAAA;AAEM,IAAM,cAAc,GAAG,UAAC,OAAe;IACpC,IAAA,YAAY,GAAK,IAAA,mCAAe,GAAE,aAAtB,CAAsB;IACpC,IAAA,KAAoB,IAAA,gBAAQ,GAAe,EAA1C,KAAK,QAAA,EAAE,QAAQ,QAA2B,CAAA;IACzC,IAAA,GAAG,GAA8C,OAAO,IAArD,EAAE,IAAI,GAAwC,OAAO,KAA/C,EAAE,MAAM,GAAgC,OAAO,OAAvC,EAAE,OAAO,GAAuB,OAAO,QAA9B,EAAE,OAAO,GAAc,OAAO,QAArB,EAAK,IAAI,UAAK,OAAO,EAA1D,+CAAgD,CAAF,CAAY;IAEhE,IAAM,QAAQ,GAAG,UAAC,IAAmB;QACnC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAA,IAAI,KAAK,EAAE;YAC3C,OAAM;SACP;QACD,OAAO,YAAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,eAAO,IAAI,EAAG,CAAA;IAClE,CAAC,CAAA;IAED,IAAA,iBAAS,EAAC;QACR,QAAQ,CAAC,QAAQ,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAC,CAAC,CAAA;QACjC,uD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AA;IAEzB,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAjCY,QAAA,cAAc,kBAiC1B"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { CardNumber } from './components/CardNumber';
2
- export { ExpiryDate } from './components/ExpiryDate';
3
- export { SecureFields } from './components/SecureFields';
4
- export { SecurityCode } from './components/SecurityCode';
5
- export { useSecureFields } from './hooks/use-secure-fields';
6
- export { useSecureInput } from './hooks/use-secure-input';
1
+ export { CardNumber } from "./components/CardNumber";
2
+ export { ExpiryDate } from "./components/ExpiryDate";
3
+ export { SecureFields } from "./components/SecureFields";
4
+ export { SecurityCode } from "./components/SecurityCode";
5
+ export { useSecureFields } from "./hooks/use-secure-fields";
6
+ export { useSecureInput } from "./hooks/use-secure-input";
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,sDAAoD;AAA3C,wGAAA,UAAU,OAAA;AACnB,0DAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,0DAAwD;AAA/C,4GAAA,YAAY,OAAA;AACrB,+DAA2D;AAAlD,oHAAA,eAAe,OAAA;AACxB,6DAAyD;AAAhD,kHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;AAAA,sDAAkD;AAAzC,wGAAA,UAAU,OAAA;AACnB,sDAAkD;AAAzC,wGAAA,UAAU,OAAA;AACnB,0DAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,0DAAsD;AAA7C,4GAAA,YAAY,OAAA;AACrB,+DAAyD;AAAhD,oHAAA,eAAe,OAAA;AACxB,6DAAuD;AAA9C,kHAAA,cAAc,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gr4vy/secure-fields-react",
3
- "version": "1.0.0",
3
+ "version": "1.1.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",
@@ -18,7 +18,8 @@
18
18
  }
19
19
  },
20
20
  "scripts": {
21
- "build": "tsc",
21
+ "prepare": "ts-patch install -s",
22
+ "build": "tsc -p tsconfig.prod.json",
22
23
  "clean": "rm -rf lib *.tgz",
23
24
  "dev": "TOKEN=$(yarn --silent token) webpack serve --config webpack.dev.js",
24
25
  "lint": "eslint src --ext ts,tsx",
@@ -38,15 +39,17 @@
38
39
  "react-dom": ">=17.0.0"
39
40
  },
40
41
  "dependencies": {
41
- "@gr4vy/secure-fields": "^1.0.0"
42
+ "@gr4vy/secure-fields": "^1.1.0"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@testing-library/react-hooks": "^8.0.1",
45
46
  "react": "^17.0.2",
46
- "react-dom": "^17.0.2"
47
+ "react-dom": "^17.0.2",
48
+ "ts-patch": "^2.1.0",
49
+ "typescript-transform-paths": "^3.4.4"
47
50
  },
48
51
  "publishConfig": {
49
52
  "access": "public"
50
53
  },
51
- "gitHead": "382a4f03693139980b4acd32c04008990924e7b6"
54
+ "gitHead": "2bddb6226846b2fced4419ff156e99d4235dd9e3"
52
55
  }