@osimatic/helpers-js 1.1.61 → 1.1.62

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.
@@ -169,10 +169,13 @@ class TelephoneNumber {
169
169
  }
170
170
 
171
171
  static setIntlTelInput(input, placeholderNumberType) {
172
+ TelephoneNumber.localCountryCode = typeof TelephoneNumber.localCountryCode != 'undefined' ? TelephoneNumber.localCountryCode : null;
173
+ TelephoneNumber.intlTelInputUtilsPath = typeof TelephoneNumber.intlTelInputUtilsPath != 'undefined' ? TelephoneNumber.intlTelInputUtilsPath : null;
174
+
172
175
  return window.intlTelInput(input[0], {
173
- initialCountry: TelephoneNumber.localCountryCode,
176
+ initialCountry: null != TelephoneNumber.localCountryCode ? TelephoneNumber.localCountryCode.toLowerCase() : null, // depuis version 19.x, le code pays doit être en minuscule
174
177
  placeholderNumberType: placeholderNumberType || 'FIXED_LINE_OR_MOBILE',
175
- utilsScript: typeof TelephoneNumber.intlTelInputUtilsPath != 'undefined' ? TelephoneNumber.intlTelInputUtilsPath : null
178
+ utilsScript: TelephoneNumber.intlTelInputUtilsPath
176
179
  });
177
180
  }
178
181
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"