intl-tel-input 17.0.10 → 17.0.14
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/.github/CONTRIBUTING.md +3 -2
- package/README.md +5 -1
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/intlTelInput-jquery.js +9 -3
- package/build/js/intlTelInput-jquery.min.js +3 -3
- package/build/js/intlTelInput.js +9 -3
- package/build/js/intlTelInput.min.js +3 -3
- package/build/js/utils.js +450 -446
- package/composer.json +1 -1
- package/examples/gen/country-sync.html +12 -14
- package/examples/gen/default-country-ip.html +11 -13
- package/examples/gen/display-number.html +11 -13
- package/examples/gen/hidden-input.html +11 -13
- package/examples/gen/init-promise.html +11 -13
- package/examples/gen/is-valid-number.html +12 -14
- package/examples/gen/js/countrySync.js +1 -1
- package/examples/gen/js/defaultCountryIp.js +1 -1
- package/examples/gen/js/displayNumber.js +1 -1
- package/examples/gen/js/hiddenInput.js +1 -1
- package/examples/gen/js/initPromise.js +1 -1
- package/examples/gen/js/isValidNumber.js +1 -1
- package/examples/gen/js/modifyCountryData.js +1 -1
- package/examples/gen/js/multipleInstances.js +2 -2
- package/examples/gen/js/nationalMode.js +1 -1
- package/examples/gen/js/onlyCountriesEurope.js +1 -1
- package/examples/gen/modify-country-data.html +11 -13
- package/examples/gen/multiple-instances.html +12 -14
- package/examples/gen/national-mode.html +11 -13
- package/examples/gen/only-countries-europe.html +11 -13
- package/examples/template.html.ejs +6 -8
- package/package.json +1 -1
- package/screenshots/twilio.png +0 -0
- package/src/js/intlTelInput.js +7 -1
- package/src/js/utils.js +2 -0
|
@@ -10,16 +10,14 @@
|
|
|
10
10
|
<link rel="stylesheet" href="../css/<%= stylesheet %>?<%= time %>">
|
|
11
11
|
<% } %>
|
|
12
12
|
|
|
13
|
-
<!--
|
|
13
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
14
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N472J4QKC4"></script>
|
|
14
15
|
<script>
|
|
15
|
-
|
|
16
|
-
(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
ga('create', 'UA-85394876-1', 'auto');
|
|
20
|
-
ga('send', 'pageview');
|
|
16
|
+
window.dataLayer = window.dataLayer || [];
|
|
17
|
+
function gtag(){dataLayer.push(arguments);}
|
|
18
|
+
gtag('js', new Date());
|
|
19
|
+
gtag('config', 'G-N472J4QKC4');
|
|
21
20
|
</script>
|
|
22
|
-
<!-- /GOOGLE ANALYTICS -->
|
|
23
21
|
</head>
|
|
24
22
|
|
|
25
23
|
<body>
|
package/package.json
CHANGED
|
Binary file
|
package/src/js/intlTelInput.js
CHANGED
|
@@ -420,7 +420,13 @@ class Iti {
|
|
|
420
420
|
// 3. picking the first preferred country
|
|
421
421
|
// 4. picking the first country
|
|
422
422
|
_setInitialState() {
|
|
423
|
-
|
|
423
|
+
// fix firefox bug: when first load page (with input with value set to number with intl dial
|
|
424
|
+
// code) and initialising plugin removes the dial code from the input, then refresh page,
|
|
425
|
+
// and we try to init plugin again but this time on number without dial code so get grey flag
|
|
426
|
+
const attributeValue = this.telInput.getAttribute('value');
|
|
427
|
+
const inputValue = this.telInput.value;
|
|
428
|
+
const useAttribute = (attributeValue && attributeValue.charAt(0) === '+' && (!inputValue || inputValue.charAt(0) !== '+'));
|
|
429
|
+
const val = useAttribute ? attributeValue : inputValue;
|
|
424
430
|
const dialCode = this._getDialCode(val);
|
|
425
431
|
const isRegionlessNanp = this._isRegionlessNanp(val);
|
|
426
432
|
const {
|
package/src/js/utils.js
CHANGED