vue-tel-input 8.1.1 → 8.1.3
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 +4 -4
- package/dist/vue-tel-input.js +23 -20
- package/dist/vue-tel-input.umd.cjs +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ International Telephone Input with Vue.
|
|
|
37
37
|
```javascript
|
|
38
38
|
import Vue from 'vue';
|
|
39
39
|
import VueTelInput from 'vue-tel-input';
|
|
40
|
-
import 'vue-tel-input/
|
|
40
|
+
import 'vue-tel-input/vue-tel-input.css';
|
|
41
41
|
|
|
42
42
|
const app = createApp(App);
|
|
43
43
|
app.use(VueTelInput);
|
|
@@ -68,7 +68,7 @@ Install the plugin into Vue:
|
|
|
68
68
|
import { createApp } from 'vue';
|
|
69
69
|
import App from './App.vue';
|
|
70
70
|
import VueTelInput from 'vue-tel-input';
|
|
71
|
-
import 'vue-tel-input/
|
|
71
|
+
import 'vue-tel-input/vue-tel-input.css';
|
|
72
72
|
|
|
73
73
|
const globalOptions = {
|
|
74
74
|
mode: 'auto',
|
|
@@ -91,7 +91,7 @@ Or use the component directly:
|
|
|
91
91
|
<script>
|
|
92
92
|
import { ref } from 'vue';
|
|
93
93
|
import { VueTelInput } from 'vue-tel-input';
|
|
94
|
-
import 'vue-tel-input/
|
|
94
|
+
import 'vue-tel-input/vue-tel-input.css';
|
|
95
95
|
|
|
96
96
|
export default {
|
|
97
97
|
components: {
|
|
@@ -137,7 +137,7 @@ Since the library is about 200kb of JavaScript and 100kb of CSS in order to impr
|
|
|
137
137
|
const VueTelInput = () =>
|
|
138
138
|
Promise.all([
|
|
139
139
|
import(/* webpackChunkName: "chunk-vue-tel-input" */ 'vue-tel-input'),
|
|
140
|
-
import(/* webpackChunkName: "chunk-vue-tel-input" */ 'vue-tel-input/
|
|
140
|
+
import(/* webpackChunkName: "chunk-vue-tel-input" */ 'vue-tel-input/vue-tel-input.css'),
|
|
141
141
|
]).then(([{ VueTelInput }]) => VueTelInput);
|
|
142
142
|
|
|
143
143
|
export default {
|
package/dist/vue-tel-input.js
CHANGED
|
@@ -241,7 +241,7 @@ const He = [
|
|
|
241
241
|
"269"
|
|
242
242
|
],
|
|
243
243
|
[
|
|
244
|
-
"Congo (DRC) (
|
|
244
|
+
"Congo (DRC) (République démocratique du Congo)",
|
|
245
245
|
"cd",
|
|
246
246
|
"243"
|
|
247
247
|
],
|
|
@@ -1503,20 +1503,20 @@ function j(e) {
|
|
|
1503
1503
|
return d && typeof Symbol == "function" && d.constructor === Symbol && d !== Symbol.prototype ? "symbol" : typeof d;
|
|
1504
1504
|
}, j(e);
|
|
1505
1505
|
}
|
|
1506
|
-
function
|
|
1506
|
+
function q(e, d) {
|
|
1507
1507
|
for (var t = 0; t < d.length; t++) {
|
|
1508
1508
|
var n = d[t];
|
|
1509
1509
|
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
function Ze(e, d, t) {
|
|
1513
|
-
return d &&
|
|
1513
|
+
return d && q(e.prototype, d), t && q(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
1514
1514
|
}
|
|
1515
|
-
function
|
|
1515
|
+
function qe(e, d) {
|
|
1516
1516
|
if (!(e instanceof d))
|
|
1517
1517
|
throw new TypeError("Cannot call a class as a function");
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function Je(e, d) {
|
|
1520
1520
|
if (typeof d != "function" && d !== null)
|
|
1521
1521
|
throw new TypeError("Super expression must either be null or a function");
|
|
1522
1522
|
e.prototype = Object.create(d && d.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), Object.defineProperty(e, "prototype", { writable: !1 }), d && w(e, d);
|
|
@@ -1597,15 +1597,15 @@ function I(e) {
|
|
|
1597
1597
|
}, I(e);
|
|
1598
1598
|
}
|
|
1599
1599
|
var m = /* @__PURE__ */ function(e) {
|
|
1600
|
-
|
|
1600
|
+
Je(t, e);
|
|
1601
1601
|
var d = Qe(t);
|
|
1602
1602
|
function t(n) {
|
|
1603
1603
|
var r;
|
|
1604
|
-
return
|
|
1604
|
+
return qe(this, t), r = d.call(this, n), Object.setPrototypeOf(Ne(r), t.prototype), r.name = r.constructor.name, r;
|
|
1605
1605
|
}
|
|
1606
1606
|
return Ze(t);
|
|
1607
1607
|
}(/* @__PURE__ */ U(Error)), K = 2, td = 17, nd = 3, g = "0-90-9٠-٩۰-۹", rd = "-‐-―−ー-", id = "//", $d = "..", ad = " ", od = "()()[]\\[\\]", ud = "~⁓∼~", T = "".concat(rd).concat(id).concat($d).concat(ad).concat(od).concat(ud), W = "++";
|
|
1608
|
-
function
|
|
1608
|
+
function J(e, d) {
|
|
1609
1609
|
e = e.split("-"), d = d.split("-");
|
|
1610
1610
|
for (var t = e[0].split("."), n = d[0].split("."), r = 0; r < 3; r++) {
|
|
1611
1611
|
var i = Number(t[r]), a = Number(n[r]);
|
|
@@ -2071,7 +2071,7 @@ function gd(e, d) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
function Ie(e) {
|
|
2073
2073
|
var d = e.version;
|
|
2074
|
-
typeof d == "number" ? (this.v1 = d === 1, this.v2 = d === 2, this.v3 = d === 3, this.v4 = d === 4) : d ?
|
|
2074
|
+
typeof d == "number" ? (this.v1 = d === 1, this.v2 = d === 2, this.v3 = d === 3, this.v4 = d === 4) : d ? J(d, sd) === -1 ? this.v2 = !0 : J(d, ld) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
|
|
2075
2075
|
}
|
|
2076
2076
|
var bd = ";ext=", O = function(d) {
|
|
2077
2077
|
return "([".concat(g, "]{1,").concat(d, "})");
|
|
@@ -2492,14 +2492,14 @@ function Yd(e, d, t) {
|
|
|
2492
2492
|
return n ? zd(i) : i;
|
|
2493
2493
|
}
|
|
2494
2494
|
var Zd = /^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;
|
|
2495
|
-
function
|
|
2495
|
+
function qd(e, d, t) {
|
|
2496
2496
|
var n = new l(t);
|
|
2497
2497
|
if (n.selectNumberingPlan(e, d), n.defaultIDDPrefix())
|
|
2498
2498
|
return n.defaultIDDPrefix();
|
|
2499
2499
|
if (Zd.test(n.IDDPrefix()))
|
|
2500
2500
|
return n.IDDPrefix();
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function Jd(e, d) {
|
|
2503
2503
|
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
2504
2504
|
if (t)
|
|
2505
2505
|
return (t = t.call(e)).next.bind(t);
|
|
@@ -2600,7 +2600,7 @@ function x(e, d, t, n, r) {
|
|
|
2600
2600
|
}) : e;
|
|
2601
2601
|
}
|
|
2602
2602
|
function tt(e, d) {
|
|
2603
|
-
for (var t =
|
|
2603
|
+
for (var t = Jd(e), n; !(n = t()).done; ) {
|
|
2604
2604
|
var r = n.value;
|
|
2605
2605
|
if (r.leadingDigitsPatterns().length > 0) {
|
|
2606
2606
|
var i = r.leadingDigitsPatterns()[r.leadingDigitsPatterns().length - 1];
|
|
@@ -2620,7 +2620,7 @@ function nt(e, d, t, n, r) {
|
|
|
2620
2620
|
var a = x(e, d, "NATIONAL", r);
|
|
2621
2621
|
return t === "1" ? t + " " + a : a;
|
|
2622
2622
|
}
|
|
2623
|
-
var $ =
|
|
2623
|
+
var $ = qd(n, void 0, r.metadata);
|
|
2624
2624
|
if ($)
|
|
2625
2625
|
return "".concat($, " ").concat(t, " ").concat(x(e, null, "INTERNATIONAL", r));
|
|
2626
2626
|
}
|
|
@@ -3310,10 +3310,13 @@ const Kt = {
|
|
|
3310
3310
|
) : this.allCountries;
|
|
3311
3311
|
},
|
|
3312
3312
|
sortedCountries() {
|
|
3313
|
-
const d = [...this.getCountries(this.preferredCountries).map((
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
)
|
|
3313
|
+
const d = [...this.getCountries(this.preferredCountries).map((r) => ({ ...r, preferred: !0 })), ...this.filteredCountries];
|
|
3314
|
+
if (!this.dropdownOptions.showSearchBox)
|
|
3315
|
+
return d;
|
|
3316
|
+
const n = this.searchQuery.replace(/[~`!@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g, "");
|
|
3317
|
+
return d.filter(
|
|
3318
|
+
(r) => new RegExp(n, "i").test(r.name) || new RegExp(n, "i").test(r.iso2) || new RegExp(n, "i").test(r.dialCode)
|
|
3319
|
+
);
|
|
3317
3320
|
},
|
|
3318
3321
|
phoneObject() {
|
|
3319
3322
|
var i, a, $;
|
|
@@ -3524,7 +3527,7 @@ const Kt = {
|
|
|
3524
3527
|
}, Wt = ["aria-expanded", "tabindex"], zt = { class: "vti__selection" }, Xt = {
|
|
3525
3528
|
key: 1,
|
|
3526
3529
|
class: "vti__country-code"
|
|
3527
|
-
}, Yt = { class: "vti__dropdown-arrow" }, Zt = ["placeholder"],
|
|
3530
|
+
}, Yt = { class: "vti__dropdown-arrow" }, Zt = ["placeholder"], qt = ["onClick", "onMousemove", "aria-selected"], Jt = { key: 1 }, Qt = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex", "value", "aria-describedby"];
|
|
3528
3531
|
function e1(e, d, t, n, r, i) {
|
|
3529
3532
|
const a = Le("click-outside");
|
|
3530
3533
|
return h(), p("div", {
|
|
@@ -3587,8 +3590,8 @@ function e1(e, d, t, n, r, i) {
|
|
|
3587
3590
|
class: b(["vti__flag", $.iso2.toLowerCase()])
|
|
3588
3591
|
}, null, 2)) : C("", !0),
|
|
3589
3592
|
E("strong", null, S($.name), 1),
|
|
3590
|
-
t.dropdownOptions.showDialCodeInList ? (h(), p("span",
|
|
3591
|
-
], 42,
|
|
3593
|
+
t.dropdownOptions.showDialCodeInList ? (h(), p("span", Jt, " +" + S($.dialCode), 1)) : C("", !0)
|
|
3594
|
+
], 42, qt))), 128))
|
|
3592
3595
|
], 2)) : C("", !0)
|
|
3593
3596
|
], 42, Wt)), [
|
|
3594
3597
|
[a, i.clickedOutside]
|