vue-tel-input 5.9.0 → 5.11.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.
@@ -1,116 +1,7 @@
1
1
  /******/ (() => { // webpackBootstrap
2
- /******/ var __webpack_modules__ = ({
3
-
4
- /***/ 679:
5
- /***/ (function(module, exports) {
6
-
7
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
8
- // MIT license
9
- // source: https://github.com/amiller-gh/currentScript-polyfill
10
-
11
- // added support for Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1620505
12
-
13
- (function (root, factory) {
14
- if (true) {
15
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
16
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
17
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
18
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
19
- } else {}
20
- }(typeof self !== 'undefined' ? self : this, function () {
21
- function getCurrentScript () {
22
- var descriptor = Object.getOwnPropertyDescriptor(document, 'currentScript')
23
- // for chrome
24
- if (!descriptor && 'currentScript' in document && document.currentScript) {
25
- return document.currentScript
26
- }
27
-
28
- // for other browsers with native support for currentScript
29
- if (descriptor && descriptor.get !== getCurrentScript && document.currentScript) {
30
- return document.currentScript
31
- }
32
-
33
- // IE 8-10 support script readyState
34
- // IE 11+ & Firefox support stack trace
35
- try {
36
- throw new Error();
37
- }
38
- catch (err) {
39
- // Find the second match for the "at" string to get file src url from stack.
40
- var ieStackRegExp = /.*at [^(]*\((.*):(.+):(.+)\)$/ig,
41
- ffStackRegExp = /@([^@]*):(\d+):(\d+)\s*$/ig,
42
- stackDetails = ieStackRegExp.exec(err.stack) || ffStackRegExp.exec(err.stack),
43
- scriptLocation = (stackDetails && stackDetails[1]) || false,
44
- line = (stackDetails && stackDetails[2]) || false,
45
- currentLocation = document.location.href.replace(document.location.hash, ''),
46
- pageSource,
47
- inlineScriptSourceRegExp,
48
- inlineScriptSource,
49
- scripts = document.getElementsByTagName('script'); // Live NodeList collection
50
-
51
- if (scriptLocation === currentLocation) {
52
- pageSource = document.documentElement.outerHTML;
53
- inlineScriptSourceRegExp = new RegExp('(?:[^\\n]+?\\n){0,' + (line - 2) + '}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*', 'i');
54
- inlineScriptSource = pageSource.replace(inlineScriptSourceRegExp, '$1').trim();
55
- }
56
-
57
- for (var i = 0; i < scripts.length; i++) {
58
- // If ready state is interactive, return the script tag
59
- if (scripts[i].readyState === 'interactive') {
60
- return scripts[i];
61
- }
62
-
63
- // If src matches, return the script tag
64
- if (scripts[i].src === scriptLocation) {
65
- return scripts[i];
66
- }
67
-
68
- // If inline source matches, return the script tag
69
- if (
70
- scriptLocation === currentLocation &&
71
- scripts[i].innerHTML &&
72
- scripts[i].innerHTML.trim() === inlineScriptSource
73
- ) {
74
- return scripts[i];
75
- }
76
- }
77
-
78
- // If no match, return null
79
- return null;
80
- }
81
- };
82
-
83
- return getCurrentScript
84
- }));
85
-
86
-
87
- /***/ })
88
-
89
- /******/ });
90
- /************************************************************************/
91
- /******/ // The module cache
92
- /******/ var __webpack_module_cache__ = {};
93
- /******/
94
- /******/ // The require function
95
- /******/ function __webpack_require__(moduleId) {
96
- /******/ // Check if module is in cache
97
- /******/ var cachedModule = __webpack_module_cache__[moduleId];
98
- /******/ if (cachedModule !== undefined) {
99
- /******/ return cachedModule.exports;
100
- /******/ }
101
- /******/ // Create a new module (and put it into the cache)
102
- /******/ var module = __webpack_module_cache__[moduleId] = {
103
- /******/ // no module.id needed
104
- /******/ // no module.loaded needed
105
- /******/ exports: {}
106
- /******/ };
107
- /******/
108
- /******/ // Execute the module function
109
- /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
110
- /******/
111
- /******/ // Return the exports of the module
112
- /******/ return module.exports;
113
- /******/ }
2
+ /******/ "use strict";
3
+ /******/ // The require scope
4
+ /******/ var __webpack_require__ = {};
114
5
  /******/
115
6
  /************************************************************************/
116
7
  /******/ /* webpack/runtime/define property getters */
@@ -160,9 +51,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
160
51
  /******/
161
52
  /************************************************************************/
162
53
  var __webpack_exports__ = {};
163
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
164
- (() => {
165
- "use strict";
166
54
  // ESM COMPAT FLAG
167
55
  __webpack_require__.r(__webpack_exports__);
168
56
 
@@ -179,15 +67,7 @@ __webpack_require__.d(__webpack_exports__, {
179
67
 
180
68
  if (typeof window !== 'undefined') {
181
69
  var currentScript = window.document.currentScript
182
- if (true) {
183
- var getCurrentScript = __webpack_require__(679)
184
- currentScript = getCurrentScript()
185
-
186
- // for backward compatibility, because previously we directly included the polyfill
187
- if (!('currentScript' in document)) {
188
- Object.defineProperty(document, 'currentScript', { get: getCurrentScript })
189
- }
190
- }
70
+ if (false) { var getCurrentScript; }
191
71
 
192
72
  var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
193
73
  if (src) {
@@ -385,7 +265,7 @@ const allProps = [{
385
265
  default: false,
386
266
  type: Boolean,
387
267
  description: 'Show dial code in input',
388
- inDemo: false
268
+ inDemo: true
389
269
  }, {
390
270
  name: 'inputOptions.placeholder',
391
271
  default: 'Enter a phone number',
@@ -487,8 +367,8 @@ const defaultOptions = [...allProps].reduce((prv, crr) => {
487
367
  options: { ...defaultOptions
488
368
  }
489
369
  });
490
- ;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"0279cef7-vue-loader-template"}!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/vue-tel-input.vue?vue&type=template&id=d662fd8a&
491
- var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['vue-tel-input', _vm.styleClasses, { disabled: _vm.disabled }]},[_c('div',{directives:[{name:"click-outside",rawName:"v-click-outside",value:(_vm.clickedOutside),expression:"clickedOutside"}],class:['vti__dropdown', { open: _vm.open, disabled: _vm.dropdownOptions.disabled }],attrs:{"aria-label":"Country Code Selector","aria-haspopup":"listbox","aria-expanded":_vm.open,"role":"button","tabindex":_vm.dropdownOptions.tabindex},on:{"keydown":[_vm.keyboardNav,function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.toggleDropdown.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }return _vm.reset.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){ return null; }return _vm.reset.apply(null, arguments)}],"click":_vm.toggleDropdown}},[_c('span',{staticClass:"vti__selection"},[(_vm.dropdownOptions.showFlags)?_c('span',{class:['vti__flag', _vm.activeCountryCode.toLowerCase()]}):_vm._e(),(_vm.dropdownOptions.showDialCodeInSelection)?_c('span',{staticClass:"vti__country-code"},[_vm._v(" +"+_vm._s(_vm.activeCountry && _vm.activeCountry.dialCode)+" ")]):_vm._e(),_vm._t("arrow-icon",function(){return [_c('span',{staticClass:"vti__dropdown-arrow"},[_vm._v(_vm._s(_vm.open ? "▲" : "▼"))])]},{"open":_vm.open})],2),(_vm.open)?_c('ul',{ref:"list",staticClass:"vti__dropdown-list",class:_vm.dropdownOpenDirection,style:({ width: _vm.dropdownOptions.width }),attrs:{"role":"listbox"}},[(_vm.dropdownOptions.showSearchBox)?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.searchQuery),expression:"searchQuery"}],staticClass:"vti__input vti__search_box",attrs:{"aria-label":"Search by country name or country code","placeholder":_vm.sortedCountries[0].name,"type":"text"},domProps:{"value":(_vm.searchQuery)},on:{"input":function($event){if($event.target.composing){ return; }_vm.searchQuery=$event.target.value}}}):_vm._e(),_vm._l((_vm.sortedCountries),function(pb,index){return _c('li',{key:pb.iso2 + (pb.preferred ? '-preferred' : ''),class:['vti__dropdown-item', _vm.getItemClass(index, pb.iso2)],attrs:{"role":"option","tabindex":"-1","aria-selected":_vm.activeCountryCode === pb.iso2 && !pb.preferred},on:{"click":function($event){return _vm.choose(pb)},"mousemove":function($event){_vm.selectedIndex = index}}},[(_vm.dropdownOptions.showFlags)?_c('span',{class:['vti__flag', pb.iso2.toLowerCase()]}):_vm._e(),_c('strong',[_vm._v(_vm._s(pb.name))]),(_vm.dropdownOptions.showDialCodeInList)?_c('span',[_vm._v(" +"+_vm._s(pb.dialCode)+" ")]):_vm._e()])})],2):_vm._e()]),((_vm.inputOptions.type)==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.phone)?_vm._i(_vm.phone,null)>-1:(_vm.phone)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":_vm.onInput,"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}],"change":function($event){var $$a=_vm.phone,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.phone=$$a.concat([$$v]))}else{$$i>-1&&(_vm.phone=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.phone=$$c}}}}):((_vm.inputOptions.type)==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":"radio"},domProps:{"checked":_vm._q(_vm.phone,null)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":_vm.onInput,"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}],"change":function($event){_vm.phone=null}}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":_vm.inputOptions.type},domProps:{"value":(_vm.phone)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":[function($event){if($event.target.composing){ return; }_vm.phone=$event.target.value},_vm.onInput],"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}]}}),_vm._t("icon-right")],2)}
370
+ ;// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"7824190b-vue-loader-template"}!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/vue-tel-input.vue?vue&type=template&id=68d31ada&
371
+ var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:['vue-tel-input', _vm.styleClasses, { disabled: _vm.disabled }]},[_c('div',{directives:[{name:"click-outside",rawName:"v-click-outside",value:(_vm.clickedOutside),expression:"clickedOutside"}],class:['vti__dropdown', { open: _vm.open, disabled: _vm.dropdownOptions.disabled }],attrs:{"aria-label":"Country Code Selector","aria-haspopup":"listbox","aria-expanded":_vm.open,"role":"button","tabindex":_vm.dropdownOptions.tabindex},on:{"keydown":[_vm.keyboardNav,function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.toggleDropdown.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"esc",27,$event.key,["Esc","Escape"])){ return null; }return _vm.reset.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"tab",9,$event.key,"Tab")){ return null; }return _vm.reset.apply(null, arguments)}],"click":_vm.toggleDropdown}},[_c('span',{staticClass:"vti__selection"},[(_vm.dropdownOptions.showFlags)?_c('span',{class:['vti__flag', _vm.activeCountryCode.toLowerCase()]}):_vm._e(),(_vm.dropdownOptions.showDialCodeInSelection)?_c('span',{staticClass:"vti__country-code"},[_vm._v(" +"+_vm._s(_vm.activeCountry && _vm.activeCountry.dialCode)+" ")]):_vm._e(),_vm._t("arrow-icon",function(){return [_c('span',{staticClass:"vti__dropdown-arrow"},[_vm._v(_vm._s(_vm.open ? "▲" : "▼"))])]},{"open":_vm.open})],2),(_vm.open)?_c('ul',{ref:"list",staticClass:"vti__dropdown-list",class:_vm.dropdownOpenDirection,style:({ width: _vm.dropdownOptions.width }),attrs:{"role":"listbox"}},[(_vm.dropdownOptions.showSearchBox)?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.searchQuery),expression:"searchQuery"}],staticClass:"vti__input vti__search_box",attrs:{"aria-label":"Search by country name or country code","placeholder":_vm.sortedCountries.length ? _vm.sortedCountries[0].name : '',"type":"text"},domProps:{"value":(_vm.searchQuery)},on:{"click":function($event){$event.stopPropagation();},"input":function($event){if($event.target.composing){ return; }_vm.searchQuery=$event.target.value}}}):_vm._e(),_vm._l((_vm.sortedCountries),function(pb,index){return _c('li',{key:pb.iso2 + (pb.preferred ? '-preferred' : ''),class:['vti__dropdown-item', _vm.getItemClass(index, pb.iso2)],attrs:{"role":"option","tabindex":"-1","aria-selected":_vm.activeCountryCode === pb.iso2 && !pb.preferred},on:{"click":function($event){return _vm.choose(pb)},"mousemove":function($event){_vm.selectedIndex = index}}},[_c('div',{staticClass:"vti__flag-wrapper"},[(_vm.dropdownOptions.showFlags)?_c('span',{class:['vti__flag', pb.iso2.toLowerCase()]}):_vm._e()]),_c('strong',[_vm._v(_vm._s(pb.name))]),(_vm.dropdownOptions.showDialCodeInList)?_c('span',[_vm._v(" +"+_vm._s(pb.dialCode)+" ")]):_vm._e()])})],2):_vm._e()]),((_vm.inputOptions.type)==='checkbox')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":"checkbox"},domProps:{"checked":Array.isArray(_vm.phone)?_vm._i(_vm.phone,null)>-1:(_vm.phone)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":_vm.onInput,"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}],"change":function($event){var $$a=_vm.phone,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.phone=$$a.concat([$$v]))}else{$$i>-1&&(_vm.phone=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{_vm.phone=$$c}}}}):((_vm.inputOptions.type)==='radio')?_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":"radio"},domProps:{"checked":_vm._q(_vm.phone,null)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":_vm.onInput,"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}],"change":function($event){_vm.phone=null}}}):_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.phone),expression:"phone"}],ref:"input",class:['vti__input', _vm.inputOptions.styleClasses],attrs:{"autocomplete":_vm.inputOptions.autocomplete,"autofocus":_vm.inputOptions.autofocus,"disabled":_vm.disabled,"id":_vm.inputOptions.id,"maxlength":_vm.inputOptions.maxlength,"name":_vm.inputOptions.name,"placeholder":_vm.parsedPlaceholder,"readonly":_vm.inputOptions.readonly,"required":_vm.inputOptions.required,"tabindex":_vm.inputOptions.tabindex,"aria-describedby":_vm.inputOptions['aria-describedby'],"type":_vm.inputOptions.type},domProps:{"value":(_vm.phone)},on:{"blur":_vm.onBlur,"focus":_vm.onFocus,"input":[function($event){if($event.target.composing){ return; }_vm.phone=$event.target.value},_vm.onInput],"keyup":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }return _vm.onEnter.apply(null, arguments)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"space",32,$event.key,[" ","Spacebar"])){ return null; }return _vm.onSpace.apply(null, arguments)}]}}),_vm._t("icon-right")],2)}
492
372
  var staticRenderFns = []
493
373
 
494
374
 
@@ -3469,7 +3349,10 @@ function getParents(node, memo) {
3469
3349
  }
3470
3350
 
3471
3351
  });
3472
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-39[0].rules[0].use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/vue-tel-input.vue?vue&type=script&lang=js&
3352
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-39[0].rules[0].use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].rules[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/vue-tel-input.vue?vue&type=script&lang=js&
3353
+ //
3354
+ //
3355
+ //
3473
3356
  //
3474
3357
  //
3475
3358
  //
@@ -3728,6 +3611,10 @@ function getDefault(key) {
3728
3611
  },
3729
3612
 
3730
3613
  phoneObject() {
3614
+ if (!this.finishMounted) {
3615
+ return {};
3616
+ }
3617
+
3731
3618
  let result;
3732
3619
 
3733
3620
  if (this.phone?.[0] === '+') {
@@ -3736,6 +3623,12 @@ function getDefault(key) {
3736
3623
  result = exports_parsePhoneNumberFromString_parsePhoneNumberFromString(this.phone, this.activeCountryCode) || {};
3737
3624
  }
3738
3625
 
3626
+ if (this.inputOptions.showDialCode && this.phone?.[0] !== '+') {
3627
+ Object.assign(result, {
3628
+ country: '--'
3629
+ });
3630
+ }
3631
+
3739
3632
  const {
3740
3633
  metadata,
3741
3634
  ...phoneObject
@@ -3751,7 +3644,7 @@ function getDefault(key) {
3751
3644
  if (!this.findCountry(result.country)) {
3752
3645
  valid = false;
3753
3646
  Object.assign(result, {
3754
- country: null
3647
+ country: '--'
3755
3648
  });
3756
3649
  }
3757
3650
  }
@@ -3768,7 +3661,7 @@ function getDefault(key) {
3768
3661
  },
3769
3662
  watch: {
3770
3663
  activeCountry(value, oldValue) {
3771
- if (!value && oldValue?.iso2) {
3664
+ if (!value && oldValue?.iso2 && !this.inputOptions.showDialCode) {
3772
3665
  this.activeCountryCode = oldValue.iso2;
3773
3666
  return;
3774
3667
  }
@@ -3779,6 +3672,10 @@ function getDefault(key) {
3779
3672
  },
3780
3673
 
3781
3674
  'phoneObject.countryCode': function (value) {
3675
+ if (!value) {
3676
+ return;
3677
+ }
3678
+
3782
3679
  this.activeCountryCode = value || '';
3783
3680
  },
3784
3681
  'phoneObject.valid': function () {
@@ -4145,7 +4042,7 @@ function getDefault(key) {
4145
4042
  });
4146
4043
  ;// CONCATENATED MODULE: ./src/components/vue-tel-input.vue?vue&type=script&lang=js&
4147
4044
  /* harmony default export */ const components_vue_tel_inputvue_type_script_lang_js_ = (vue_tel_inputvue_type_script_lang_js_);
4148
- ;// CONCATENATED MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
4045
+ ;// CONCATENATED MODULE: ./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
4149
4046
  /* globals __VUE_SSR_CONTEXT__ */
4150
4047
 
4151
4048
  // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
@@ -4319,8 +4216,6 @@ if (GlobalVue) {
4319
4216
  /* harmony default export */ const entry_lib = (src_0);
4320
4217
 
4321
4218
 
4322
- })();
4323
-
4324
4219
  module.exports = __webpack_exports__;
4325
4220
  /******/ })()
4326
4221
  ;