@evervault/react-native 2.2.1 → 2.3.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/build/Card/types.d.ts +1 -1
- package/build/Card/types.d.ts.map +1 -1
- package/build/index.cjs.js +38 -13
- package/build/index.cjs.js.map +1 -1
- package/build/index.esm.js +38 -13
- package/package.json +2 -2
- package/src/Card/types.ts +1 -0
package/build/index.esm.js
CHANGED
|
@@ -6774,7 +6774,7 @@ const h = [
|
|
|
6774
6774
|
isLocal: false,
|
|
6775
6775
|
numberValidationRules: {
|
|
6776
6776
|
luhnCheck: true,
|
|
6777
|
-
ranges: [[300, 305], 36, 38, 39],
|
|
6777
|
+
ranges: [[300, 305], 3095, 36, 38, 39],
|
|
6778
6778
|
lengths: [14, 16, 19]
|
|
6779
6779
|
},
|
|
6780
6780
|
securityCodeValidationRules: {
|
|
@@ -6786,7 +6786,7 @@ const h = [
|
|
|
6786
6786
|
isLocal: false,
|
|
6787
6787
|
numberValidationRules: {
|
|
6788
6788
|
luhnCheck: true,
|
|
6789
|
-
ranges: [6011, [644, 649],
|
|
6789
|
+
ranges: [6011, [644, 649], [65e4, 651999], [653150, 659999], 622],
|
|
6790
6790
|
lengths: [16, 19]
|
|
6791
6791
|
},
|
|
6792
6792
|
securityCodeValidationRules: {
|
|
@@ -6798,7 +6798,16 @@ const h = [
|
|
|
6798
6798
|
isLocal: false,
|
|
6799
6799
|
numberValidationRules: {
|
|
6800
6800
|
luhnCheck: true,
|
|
6801
|
-
ranges: [
|
|
6801
|
+
ranges: [
|
|
6802
|
+
2131,
|
|
6803
|
+
1800,
|
|
6804
|
+
[3088, 3094],
|
|
6805
|
+
[3096, 3102],
|
|
6806
|
+
[3112, 3120],
|
|
6807
|
+
[3158, 3159],
|
|
6808
|
+
[3337, 3349],
|
|
6809
|
+
[3528, 3589]
|
|
6810
|
+
],
|
|
6802
6811
|
lengths: [16, 17, 18, 19]
|
|
6803
6812
|
},
|
|
6804
6813
|
securityCodeValidationRules: {
|
|
@@ -6846,16 +6855,20 @@ const h = [
|
|
|
6846
6855
|
numberValidationRules: {
|
|
6847
6856
|
luhnCheck: true,
|
|
6848
6857
|
ranges: [
|
|
6858
|
+
5018,
|
|
6859
|
+
5020,
|
|
6860
|
+
5038,
|
|
6861
|
+
5893,
|
|
6862
|
+
6101,
|
|
6863
|
+
6304,
|
|
6864
|
+
6759,
|
|
6865
|
+
6761,
|
|
6866
|
+
6762,
|
|
6867
|
+
6763,
|
|
6849
6868
|
493698,
|
|
6850
6869
|
[5e5, 504174],
|
|
6851
6870
|
[504176, 506698],
|
|
6852
6871
|
[506779, 508999],
|
|
6853
|
-
[56, 59],
|
|
6854
|
-
60,
|
|
6855
|
-
61,
|
|
6856
|
-
63,
|
|
6857
|
-
64,
|
|
6858
|
-
67,
|
|
6859
6872
|
69
|
|
6860
6873
|
],
|
|
6861
6874
|
lengths: [12, 13, 14, 15, 16, 17, 18, 19]
|
|
@@ -6961,6 +6974,18 @@ const h = [
|
|
|
6961
6974
|
securityCodeValidationRules: {
|
|
6962
6975
|
lengths: [0]
|
|
6963
6976
|
}
|
|
6977
|
+
},
|
|
6978
|
+
{
|
|
6979
|
+
name: "rupay",
|
|
6980
|
+
isLocal: false,
|
|
6981
|
+
numberValidationRules: {
|
|
6982
|
+
luhnCheck: true,
|
|
6983
|
+
ranges: [60, 81, 82, 508, [652100, 653149], [817200, 819899]],
|
|
6984
|
+
lengths: [16]
|
|
6985
|
+
},
|
|
6986
|
+
securityCodeValidationRules: {
|
|
6987
|
+
lengths: [3]
|
|
6988
|
+
}
|
|
6964
6989
|
}
|
|
6965
6990
|
];
|
|
6966
6991
|
function g(n, e, t) {
|
|
@@ -7027,7 +7052,7 @@ function C(n, e) {
|
|
|
7027
7052
|
isValid: l
|
|
7028
7053
|
};
|
|
7029
7054
|
}
|
|
7030
|
-
function
|
|
7055
|
+
function R(n) {
|
|
7031
7056
|
var r;
|
|
7032
7057
|
const e = /^(0[1-9]|1[[0-2]).*$/, t = n.match(e), s = t ? parseInt(t[1].toString(), 10) : null, l = /^(0[1-9]|1[[0-2])(\d{2})$/, i = n.match(l), a = i ? parseInt(i[2].toString(), 10) : null;
|
|
7033
7058
|
if (s) {
|
|
@@ -7093,7 +7118,7 @@ function areValuesComplete(values) {
|
|
|
7093
7118
|
if ("number" in values && !f(values.number ?? "").isValid) {
|
|
7094
7119
|
return false;
|
|
7095
7120
|
}
|
|
7096
|
-
if ("expiry" in values && !
|
|
7121
|
+
if ("expiry" in values && !R(values.expiry ?? "").isValid) {
|
|
7097
7122
|
return false;
|
|
7098
7123
|
}
|
|
7099
7124
|
if ("cvc" in values &&
|
|
@@ -7114,7 +7139,7 @@ function isAcceptedBrand(acceptedBrands, cardNumberValidationResult) {
|
|
|
7114
7139
|
return isBrandAccepted || isLocalBrandAccepted;
|
|
7115
7140
|
}
|
|
7116
7141
|
function formatExpiry(expiry) {
|
|
7117
|
-
const parsedExpiry =
|
|
7142
|
+
const parsedExpiry = R(expiry);
|
|
7118
7143
|
if (!parsedExpiry.isValid) {
|
|
7119
7144
|
return null;
|
|
7120
7145
|
}
|
|
@@ -7137,7 +7162,7 @@ function getCardFormSchema(acceptedBrands) {
|
|
|
7137
7162
|
expiry: z
|
|
7138
7163
|
.string()
|
|
7139
7164
|
.min(1, "Required")
|
|
7140
|
-
.refine((value) =>
|
|
7165
|
+
.refine((value) => R(value).isValid, {
|
|
7141
7166
|
message: "Invalid expiry",
|
|
7142
7167
|
}),
|
|
7143
7168
|
cvc: z
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evervault/react-native",
|
|
3
3
|
"description": "Evervault SDK for React Native",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.3.0",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./build/index.cjs.js",
|
|
7
7
|
"module": "./build/index.esm.js",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react-hook-form": "^7.54.2",
|
|
74
74
|
"react-native-mask-input": "^1.2.3",
|
|
75
75
|
"zod": "^3.24.2",
|
|
76
|
-
"@evervault/card-validator": "1.
|
|
76
|
+
"@evervault/card-validator": "1.4.0"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
79
|
"prebuild": "pnpm codegen",
|