vue-tel-input 6.0.0-beta.1 → 6.0.0-beta.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/dist/css/component.css +5 -0
- package/dist/vue-tel-input.common.js +35 -14
- package/dist/vue-tel-input.common.js.map +1 -1
- package/dist/vue-tel-input.css +1 -1
- package/dist/vue-tel-input.umd.js +35 -14
- package/dist/vue-tel-input.umd.js.map +1 -1
- package/dist/vue-tel-input.umd.min.js +1 -1
- package/dist/vue-tel-input.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/css/component.css
CHANGED
|
@@ -346,6 +346,12 @@ var allProps = [{
|
|
|
346
346
|
type: Object,
|
|
347
347
|
description: 'Options for dropdown, see below',
|
|
348
348
|
inDemo: false
|
|
349
|
+
}, {
|
|
350
|
+
name: 'dropdownOptions.disabled',
|
|
351
|
+
default: false,
|
|
352
|
+
type: Boolean,
|
|
353
|
+
description: 'Disable dropdown',
|
|
354
|
+
inDemo: false
|
|
349
355
|
}, {
|
|
350
356
|
name: 'dropdownOptions.showDialCodeInList',
|
|
351
357
|
default: true,
|
|
@@ -401,6 +407,12 @@ var allProps = [{
|
|
|
401
407
|
// inDemo: false,
|
|
402
408
|
// },
|
|
403
409
|
{
|
|
410
|
+
name: 'inputOptions.aria-describedby',
|
|
411
|
+
default: '',
|
|
412
|
+
type: String,
|
|
413
|
+
description: 'Native input <code>aria-describedby</code> attribute',
|
|
414
|
+
inDemo: false
|
|
415
|
+
}, {
|
|
404
416
|
name: 'inputOptions.id',
|
|
405
417
|
default: '',
|
|
406
418
|
type: String,
|
|
@@ -418,6 +430,12 @@ var allProps = [{
|
|
|
418
430
|
type: String,
|
|
419
431
|
description: 'Native input <code>name</code> attribute',
|
|
420
432
|
inDemo: false
|
|
433
|
+
}, {
|
|
434
|
+
name: 'inputOptions.showDialCode',
|
|
435
|
+
default: false,
|
|
436
|
+
type: Boolean,
|
|
437
|
+
description: 'Show dial code in input',
|
|
438
|
+
inDemo: false
|
|
421
439
|
}, {
|
|
422
440
|
name: 'inputOptions.placeholder',
|
|
423
441
|
default: 'Enter a phone number',
|
|
@@ -5142,7 +5160,7 @@ var es_function_name = __webpack_require__("b0c0");
|
|
|
5142
5160
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
5143
5161
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
5144
5162
|
|
|
5145
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/vue-tel-input.vue?vue&type=template&id=
|
|
5163
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./src/components/vue-tel-input.vue?vue&type=template&id=6b666c26
|
|
5146
5164
|
|
|
5147
5165
|
|
|
5148
5166
|
var _hoisted_1 = {
|
|
@@ -5167,7 +5185,8 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5167
5185
|
}]
|
|
5168
5186
|
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])("div", {
|
|
5169
5187
|
class: ['vti__dropdown', {
|
|
5170
|
-
open: $data.open
|
|
5188
|
+
open: $data.open,
|
|
5189
|
+
disabled: $props.dropdownOptions.disabled
|
|
5171
5190
|
}],
|
|
5172
5191
|
tabindex: $props.dropdownOptions.tabindex,
|
|
5173
5192
|
onKeydown: [_cache[2] || (_cache[2] = function () {
|
|
@@ -5221,6 +5240,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5221
5240
|
required: $props.inputOptions.required,
|
|
5222
5241
|
tabindex: $props.inputOptions.tabindex,
|
|
5223
5242
|
value: $props.modelValue,
|
|
5243
|
+
"aria-describedby": $props.inputOptions['aria-describedby'],
|
|
5224
5244
|
onBlur: _cache[6] || (_cache[6] = function () {
|
|
5225
5245
|
return $options.onBlur && $options.onBlur.apply($options, arguments);
|
|
5226
5246
|
}),
|
|
@@ -5235,9 +5255,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5235
5255
|
}, ["enter"])), _cache[10] || (_cache[10] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withKeys"])(function () {
|
|
5236
5256
|
return $options.onSpace && $options.onSpace.apply($options, arguments);
|
|
5237
5257
|
}, ["space"]))]
|
|
5238
|
-
}, null, 42, ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelDynamic"], $data.phone]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "icon-right")], 2);
|
|
5258
|
+
}, null, 42, ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value", "aria-describedby"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vModelDynamic"], $data.phone]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "icon-right")], 2);
|
|
5239
5259
|
}
|
|
5240
|
-
// CONCATENATED MODULE: ./src/components/vue-tel-input.vue?vue&type=template&id=
|
|
5260
|
+
// CONCATENATED MODULE: ./src/components/vue-tel-input.vue?vue&type=template&id=6b666c26
|
|
5241
5261
|
|
|
5242
5262
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
|
|
5243
5263
|
var objectWithoutProperties = __webpack_require__("15fd");
|
|
@@ -8584,7 +8604,7 @@ function getDefault(key) {
|
|
|
8584
8604
|
}
|
|
8585
8605
|
},
|
|
8586
8606
|
'phoneObject.countryCode': function phoneObjectCountryCode(value) {
|
|
8587
|
-
this.activeCountryCode = value;
|
|
8607
|
+
this.activeCountryCode = value || '';
|
|
8588
8608
|
},
|
|
8589
8609
|
'phoneObject.valid': function phoneObjectValid() {
|
|
8590
8610
|
this.$emit('validate', this.phoneObject);
|
|
@@ -8599,7 +8619,7 @@ function getDefault(key) {
|
|
|
8599
8619
|
this.emitInput(value);
|
|
8600
8620
|
this.$nextTick(function () {
|
|
8601
8621
|
// In case `v-model` is not set, we need to update the `phone` to be new formatted value
|
|
8602
|
-
if (value && !_this2.
|
|
8622
|
+
if (value && !_this2.modelValue) {
|
|
8603
8623
|
_this2.phone = value;
|
|
8604
8624
|
}
|
|
8605
8625
|
});
|
|
@@ -8636,8 +8656,8 @@ function getDefault(key) {
|
|
|
8636
8656
|
mounted: function mounted() {
|
|
8637
8657
|
var _this4 = this;
|
|
8638
8658
|
|
|
8639
|
-
if (this.
|
|
8640
|
-
this.phone = this.
|
|
8659
|
+
if (this.modelValue) {
|
|
8660
|
+
this.phone = this.modelValue.trim();
|
|
8641
8661
|
}
|
|
8642
8662
|
|
|
8643
8663
|
this.cleanInvalidCharacters();
|
|
@@ -8675,8 +8695,8 @@ function getDefault(key) {
|
|
|
8675
8695
|
var _this5$phone;
|
|
8676
8696
|
|
|
8677
8697
|
/**
|
|
8678
|
-
|
|
8679
|
-
|
|
8698
|
+
* 1. If the phone included prefix (i.e. +12), try to get the country and set it
|
|
8699
|
+
*/
|
|
8680
8700
|
if (((_this5$phone = _this5.phone) === null || _this5$phone === void 0 ? void 0 : _this5$phone[0]) === '+') {
|
|
8681
8701
|
resolve();
|
|
8682
8702
|
return;
|
|
@@ -8726,8 +8746,8 @@ function getDefault(key) {
|
|
|
8726
8746
|
});
|
|
8727
8747
|
} else {
|
|
8728
8748
|
/**
|
|
8729
|
-
|
|
8730
|
-
|
|
8749
|
+
* 4. Use the first country from preferred list (if available) or all countries list
|
|
8750
|
+
*/
|
|
8731
8751
|
_this5.choose(fallbackCountry);
|
|
8732
8752
|
|
|
8733
8753
|
resolve();
|
|
@@ -8792,11 +8812,12 @@ function getDefault(key) {
|
|
|
8792
8812
|
if ((_this$inputOptions = this.inputOptions) !== null && _this$inputOptions !== void 0 && _this$inputOptions.showDialCode && parsedCountry) {
|
|
8793
8813
|
// Reset phone if the showDialCode is set
|
|
8794
8814
|
this.phone = "+".concat(parsedCountry.dialCode);
|
|
8815
|
+
this.activeCountryCode = parsedCountry.iso2 || '';
|
|
8795
8816
|
return;
|
|
8796
8817
|
} // update value, even if international mode is NOT used
|
|
8797
8818
|
|
|
8798
8819
|
|
|
8799
|
-
this.activeCountryCode = parsedCountry.iso2;
|
|
8820
|
+
this.activeCountryCode = parsedCountry.iso2 || '';
|
|
8800
8821
|
this.emitInput(this.phone);
|
|
8801
8822
|
},
|
|
8802
8823
|
cleanInvalidCharacters: function cleanInvalidCharacters() {
|
|
@@ -8863,7 +8884,7 @@ function getDefault(key) {
|
|
|
8863
8884
|
this.$refs.input.focus();
|
|
8864
8885
|
},
|
|
8865
8886
|
toggleDropdown: function toggleDropdown() {
|
|
8866
|
-
if (this.disabled) {
|
|
8887
|
+
if (this.disabled || this.dropdownOptions.disabled) {
|
|
8867
8888
|
return;
|
|
8868
8889
|
}
|
|
8869
8890
|
|