intl-tel-input 18.3.3 → 18.3.5
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/README.md +2 -2
- package/build/css/intlTelInput.css +10 -5
- package/build/css/intlTelInput.min.css +1 -1
- package/build/js/data.js +2 -2
- package/build/js/data.min.js +2 -2
- package/build/js/intlTelInput-jquery.js +5 -5
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +5 -5
- package/build/js/intlTelInput.min.js +3 -3
- package/build/js/utils.js +1 -1
- package/composer.json +1 -1
- package/package.json +1 -1
- package/src/css/intlTelInput.scss +11 -5
- package/src/js/data.js +177 -177
- package/src/js/intlTelInput.js +8 -6
- package/src/js/utils.js +2 -0
package/src/js/intlTelInput.js
CHANGED
|
@@ -54,12 +54,14 @@ const defaults = {
|
|
|
54
54
|
showFlags: true,
|
|
55
55
|
// use full screen popup instead of dropdown for country list
|
|
56
56
|
useFullscreenPopup:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
typeof navigator !== "undefined" && typeof window !== "undefined"
|
|
58
|
+
? // we cannot just test screen size as some smartphones/website meta tags will report desktop
|
|
59
|
+
// resolutions
|
|
60
|
+
// Note: to target Android Mobiles (and not Tablets), we must find 'Android' and 'Mobile'
|
|
61
|
+
/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
62
|
+
navigator.userAgent
|
|
63
|
+
) || window.innerWidth <= 500
|
|
64
|
+
: false,
|
|
63
65
|
// specify the path to the libphonenumber script to enable validation/formatting
|
|
64
66
|
utilsScript: ""
|
|
65
67
|
};
|
package/src/js/utils.js
CHANGED
|
@@ -77,6 +77,8 @@ const getValidationError = (number, countryCode) => {
|
|
|
77
77
|
.INVALID_COUNTRY_CODE;
|
|
78
78
|
}
|
|
79
79
|
if (
|
|
80
|
+
// hack to solve issue where parseAndKeepRawInput throws weird error for zero or 1-digit (national) numbers e.g. "3" or "+13" s
|
|
81
|
+
number.length <= 3 ||
|
|
80
82
|
e.message === i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD ||
|
|
81
83
|
e.message === i18n.phonenumbers.Error.TOO_SHORT_NSN
|
|
82
84
|
) {
|