intl-tel-input 25.1.1 → 25.2.1
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 +18 -22
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/index.js +1 -0
- package/build/js/i18n/tr/interface.js +2 -2
- package/build/js/i18n/uk/countries.js +245 -0
- package/build/js/i18n/uk/index.js +5 -0
- package/build/js/i18n/uk/interface.js +13 -0
- package/build/js/intlTelInput.d.ts +19 -0
- package/build/js/intlTelInput.js +5 -5
- package/build/js/intlTelInput.min.js +2 -2
- package/build/js/intlTelInputWithUtils.js +258 -143
- package/build/js/intlTelInputWithUtils.min.js +2 -2
- package/build/js/utils.js +35 -34
- package/package.json +2 -2
- package/react/README.md +1 -1
- package/react/build/IntlTelInput.cjs +4 -4
- package/react/build/IntlTelInput.d.ts +19 -0
- package/react/build/IntlTelInput.js +4 -4
- package/react/build/IntlTelInputWithUtils.cjs +257 -142
- package/react/build/IntlTelInputWithUtils.js +257 -142
- package/vue/README.md +1 -1
- package/vue/build/IntlTelInput.mjs +6 -6
- package/vue/build/IntlTelInputWithUtils.mjs +438 -323
package/README.md
CHANGED
|
@@ -75,16 +75,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
|
|
|
75
75
|
## Getting Started (Using a CDN)
|
|
76
76
|
1. Add the CSS
|
|
77
77
|
```html
|
|
78
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.
|
|
78
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.2.1/build/css/intlTelInput.css">
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
2. Add the plugin script and initialise it on your input element
|
|
82
82
|
```html
|
|
83
|
-
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.
|
|
83
|
+
<script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.2.1/build/js/intlTelInput.min.js"></script>
|
|
84
84
|
<script>
|
|
85
85
|
const input = document.querySelector("#phone");
|
|
86
86
|
window.intlTelInput(input, {
|
|
87
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.
|
|
87
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.2.1/build/js/utils.js"),
|
|
88
88
|
});
|
|
89
89
|
</script>
|
|
90
90
|
```
|
|
@@ -171,7 +171,7 @@ Additional classes to add to the (injected) wrapper `<div>`.
|
|
|
171
171
|
|
|
172
172
|
**countryOrder**
|
|
173
173
|
Type: `Array` Default: `null`
|
|
174
|
-
Specify the ordering for the country list with an array of iso2 country codes. Any omitted countries will appear after those specified e.g. setting `countryOrder` to `["jp", "kr"]` will result in the list: Japan, South Korea, Afghanistan, Albania, Algeria etc...
|
|
174
|
+
Specify the ordering for the country list with an array of iso2 country codes. Any omitted countries will appear after those specified, in alphabetical order e.g. setting `countryOrder` to `["jp", "kr"]` will result in the list: Japan, South Korea, Afghanistan, Albania, Algeria etc...
|
|
175
175
|
|
|
176
176
|
**countrySearch**
|
|
177
177
|
Type: `Boolean` Default: `true`
|
|
@@ -183,9 +183,7 @@ Change the placeholder generated by autoPlaceholder. Must return a string.
|
|
|
183
183
|
|
|
184
184
|
```js
|
|
185
185
|
intlTelInput(input, {
|
|
186
|
-
customPlaceholder:
|
|
187
|
-
return "e.g. " + selectedCountryPlaceholder;
|
|
188
|
-
},
|
|
186
|
+
customPlaceholder: (selectedCountryPlaceholder, selectedCountryData) => "e.g. " + selectedCountryPlaceholder,
|
|
189
187
|
});
|
|
190
188
|
```
|
|
191
189
|
|
|
@@ -217,11 +215,11 @@ Here is an example using the [ipapi](https://ipapi.co/api/?javascript#location-o
|
|
|
217
215
|
```js
|
|
218
216
|
intlTelInput(input, {
|
|
219
217
|
initialCountry: "auto",
|
|
220
|
-
geoIpLookup:
|
|
218
|
+
geoIpLookup: (success, failure) => {
|
|
221
219
|
fetch("https://ipapi.co/json")
|
|
222
|
-
.then(
|
|
223
|
-
.then(
|
|
224
|
-
.catch(
|
|
220
|
+
.then((res) => res.json())
|
|
221
|
+
.then((data) => success(data.country_code))
|
|
222
|
+
.catch(() => failure());
|
|
225
223
|
}
|
|
226
224
|
});
|
|
227
225
|
```
|
|
@@ -235,12 +233,10 @@ Allows the creation of hidden input fields within a form to store the full inter
|
|
|
235
233
|
|
|
236
234
|
```js
|
|
237
235
|
intlTelInput(input, {
|
|
238
|
-
hiddenInput:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
};
|
|
243
|
-
}
|
|
236
|
+
hiddenInput: (telInputName) => ({
|
|
237
|
+
phone: "phone_full",
|
|
238
|
+
country: "country_code"
|
|
239
|
+
}),
|
|
244
240
|
});
|
|
245
241
|
```
|
|
246
242
|
|
|
@@ -317,7 +313,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
|
|
|
317
313
|
```js
|
|
318
314
|
// (A) import utils module from a CDN
|
|
319
315
|
intlTelInput(htmlInputElement, {
|
|
320
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.
|
|
316
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.2.1/build/js/utils.js"),
|
|
321
317
|
});
|
|
322
318
|
|
|
323
319
|
// (B) import utils module from your own hosted version of utils.js
|
|
@@ -511,7 +507,7 @@ You can listen for the following events triggered on the input element.
|
|
|
511
507
|
**countrychange**
|
|
512
508
|
This is triggered when the selected country is updated e.g. if the user selects a country from the dropdown, or they type a different dial code into the input, or you call `setCountry` etc.
|
|
513
509
|
```js
|
|
514
|
-
input.addEventListener("countrychange",
|
|
510
|
+
input.addEventListener("countrychange", () => {
|
|
515
511
|
// do something with iti.getSelectedCountryData()
|
|
516
512
|
});
|
|
517
513
|
```
|
|
@@ -566,7 +562,7 @@ Example:
|
|
|
566
562
|
## Translations
|
|
567
563
|
We provide [translations](https://github.com/jackocnr/intl-tel-input/tree/master/build/js/i18n) for the 200+ country names, as well as other user interface text (e.g. the placeholder text for the country search input) in over 30 languages. See the `i18n` option for details on how to use them. [See them in action](https://intl-tel-input.com/storybook/?path=/docs/intltelinput--i18n).
|
|
568
564
|
|
|
569
|
-
Supported languages: Arabic, Bengali, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Norwegian, English, Farsi, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Marathi, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Telugu, Thai, Turkish, Urdu, Vietnamese.
|
|
565
|
+
Supported languages: Arabic, Bengali, Bosnian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, Norwegian, English, Farsi, Finnish, French, German, Greek, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Marathi, Polish, Portuguese, Romanian, Russian, Slovak, Spanish, Swedish, Telugu, Thai, Turkish, Ukrainian, Urdu, Vietnamese.
|
|
570
566
|
|
|
571
567
|
If we don't currently support a language you need, it's easy to [contribute this](https://github.com/jackocnr/intl-tel-input/blob/master/.github/CONTRIBUTING.md#adding-a-new-translation) yourself - you only need to provide a handful of UI translation strings, as we automatically pull in the country names from the country-list project.
|
|
572
568
|
|
|
@@ -598,7 +594,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
|
|
|
598
594
|
```js
|
|
599
595
|
// (A) import utils module from a CDN
|
|
600
596
|
intlTelInput(htmlInputElement, {
|
|
601
|
-
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.
|
|
597
|
+
loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.2.1/build/js/utils.js"),
|
|
602
598
|
});
|
|
603
599
|
|
|
604
600
|
// (B) import utils module from your own hosted version of utils.js
|
|
@@ -627,7 +623,7 @@ If you want your input to be full-width, you need to set the container to be the
|
|
|
627
623
|
If you have a scrolling container other than `window` which is causing problems by not closing the dropdown on scroll, simply listen for the scroll event on that element, and trigger a scroll event on `window`, which in turn will close the dropdown e.g.
|
|
628
624
|
|
|
629
625
|
```js
|
|
630
|
-
scrollingElement.addEventListener("scroll",
|
|
626
|
+
scrollingElement.addEventListener("scroll", () => {
|
|
631
627
|
const e = document.createEvent('Event');
|
|
632
628
|
e.initEvent("scroll", true, true);
|
|
633
629
|
window.dispatchEvent(e);
|
package/build/js/data.js
CHANGED
package/build/js/data.min.js
CHANGED
package/build/js/i18n/index.js
CHANGED
|
@@ -31,6 +31,7 @@ export { default as sv, countryTranslations as svCountryTranslations, interfaceT
|
|
|
31
31
|
export { default as te, countryTranslations as teCountryTranslations, interfaceTranslations as teInterfaceTranslations } from "./te";
|
|
32
32
|
export { default as th, countryTranslations as thCountryTranslations, interfaceTranslations as thInterfaceTranslations } from "./th";
|
|
33
33
|
export { default as tr, countryTranslations as trCountryTranslations, interfaceTranslations as trInterfaceTranslations } from "./tr";
|
|
34
|
+
export { default as uk, countryTranslations as ukCountryTranslations, interfaceTranslations as ukInterfaceTranslations } from "./uk";
|
|
34
35
|
export { default as ur, countryTranslations as urCountryTranslations, interfaceTranslations as urInterfaceTranslations } from "./ur";
|
|
35
36
|
export { default as vi, countryTranslations as viCountryTranslations, interfaceTranslations as viInterfaceTranslations } from "./vi";
|
|
36
37
|
export { default as zh, countryTranslations as zhCountryTranslations, interfaceTranslations as zhInterfaceTranslations } from "./zh";
|
|
@@ -2,12 +2,12 @@ const interfaceTranslations = {
|
|
|
2
2
|
selectedCountryAriaLabel: "Seçilen ülke",
|
|
3
3
|
noCountrySelected: "Hiçbir ülke seçilmedi",
|
|
4
4
|
countryListAriaLabel: "Ülke listesi",
|
|
5
|
-
searchPlaceholder: "
|
|
5
|
+
searchPlaceholder: "Ara",
|
|
6
6
|
zeroSearchResults: "Sonuç bulunamadı",
|
|
7
7
|
oneSearchResult: "1 sonuç bulundu",
|
|
8
8
|
multipleSearchResults: "${count} sonuç bulundu",
|
|
9
9
|
// additional countries (not supported by country-list library)
|
|
10
|
-
ac: "
|
|
10
|
+
ac: "Ascension Adası",
|
|
11
11
|
xk: "Kosova"
|
|
12
12
|
};
|
|
13
13
|
export default interfaceTranslations;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
const countryTranslations = {
|
|
2
|
+
ad: "Андорра",
|
|
3
|
+
ae: "Обʼєднані Арабські Емірати",
|
|
4
|
+
af: "Афганістан",
|
|
5
|
+
ag: "Антиґуа і Барбуда",
|
|
6
|
+
ai: "Анґілья",
|
|
7
|
+
al: "Албанія",
|
|
8
|
+
am: "Вірменія",
|
|
9
|
+
ao: "Ангола",
|
|
10
|
+
ar: "Аргентина",
|
|
11
|
+
as: "Американське Самоа",
|
|
12
|
+
at: "Австрія",
|
|
13
|
+
au: "Австралія",
|
|
14
|
+
aw: "Аруба",
|
|
15
|
+
ax: "Аландські Острови",
|
|
16
|
+
az: "Азербайджан",
|
|
17
|
+
ba: "Боснія і Герцеґовина",
|
|
18
|
+
bb: "Барбадос",
|
|
19
|
+
bd: "Бангладеш",
|
|
20
|
+
be: "Бельґія",
|
|
21
|
+
bf: "Буркіна-Фасо",
|
|
22
|
+
bg: "Болгарія",
|
|
23
|
+
bh: "Бахрейн",
|
|
24
|
+
bi: "Бурунді",
|
|
25
|
+
bj: "Бенін",
|
|
26
|
+
bl: "Сен-Бартельмі",
|
|
27
|
+
bm: "Бермудські Острови",
|
|
28
|
+
bn: "Бруней",
|
|
29
|
+
bo: "Болівія",
|
|
30
|
+
bq: "Нідерландські Карибські острови",
|
|
31
|
+
br: "Бразілія",
|
|
32
|
+
bs: "Багамські Острови",
|
|
33
|
+
bt: "Бутан",
|
|
34
|
+
bw: "Ботсвана",
|
|
35
|
+
by: "Білорусь",
|
|
36
|
+
bz: "Беліз",
|
|
37
|
+
ca: "Канада",
|
|
38
|
+
cc: "Кокосові (Кілінґ) Острови",
|
|
39
|
+
cd: "Конго – Кіншаса",
|
|
40
|
+
cf: "Центральноафриканська Республіка",
|
|
41
|
+
cg: "Конго – Браззавіль",
|
|
42
|
+
ch: "Швейцарія",
|
|
43
|
+
ci: "Кот-дʼІвуар",
|
|
44
|
+
ck: "Острови Кука",
|
|
45
|
+
cl: "Чілі",
|
|
46
|
+
cm: "Камерун",
|
|
47
|
+
cn: "Китай",
|
|
48
|
+
co: "Колумбія",
|
|
49
|
+
cr: "Коста-Ріка",
|
|
50
|
+
cu: "Куба",
|
|
51
|
+
cv: "Кабо-Верде",
|
|
52
|
+
cw: "Кюрасао",
|
|
53
|
+
cx: "Острів Різдва",
|
|
54
|
+
cy: "Кіпр",
|
|
55
|
+
cz: "Чехія",
|
|
56
|
+
de: "Німеччина",
|
|
57
|
+
dj: "Джибуті",
|
|
58
|
+
dk: "Данія",
|
|
59
|
+
dm: "Домініка",
|
|
60
|
+
do: "Домініканська Республіка",
|
|
61
|
+
dz: "Алжир",
|
|
62
|
+
ec: "Еквадор",
|
|
63
|
+
ee: "Естонія",
|
|
64
|
+
eg: "Єгипет",
|
|
65
|
+
eh: "Західна Сахара",
|
|
66
|
+
er: "Еритрея",
|
|
67
|
+
es: "Іспанія",
|
|
68
|
+
et: "Ефіопія",
|
|
69
|
+
fi: "Фінляндія",
|
|
70
|
+
fj: "Фіджі",
|
|
71
|
+
fk: "Фолклендські Острови",
|
|
72
|
+
fm: "Мікронезія",
|
|
73
|
+
fo: "Фарерські Острови",
|
|
74
|
+
fr: "Франція",
|
|
75
|
+
ga: "Габон",
|
|
76
|
+
gb: "Велика Британія",
|
|
77
|
+
gd: "Ґренада",
|
|
78
|
+
ge: "Грузія",
|
|
79
|
+
gf: "Французька Ґвіана",
|
|
80
|
+
gg: "Ґернсі",
|
|
81
|
+
gh: "Гана",
|
|
82
|
+
gi: "Ґібралтар",
|
|
83
|
+
gl: "Ґренландія",
|
|
84
|
+
gm: "Гамбія",
|
|
85
|
+
gn: "Гвінея",
|
|
86
|
+
gp: "Ґваделупа",
|
|
87
|
+
gq: "Екваторіальна Гвінея",
|
|
88
|
+
gr: "Греція",
|
|
89
|
+
gt: "Ґватемала",
|
|
90
|
+
gu: "Ґуам",
|
|
91
|
+
gw: "Гвінея-Бісау",
|
|
92
|
+
gy: "Ґайана",
|
|
93
|
+
hk: "Гонконг, О.А.Р. Китаю",
|
|
94
|
+
hn: "Гондурас",
|
|
95
|
+
hr: "Хорватія",
|
|
96
|
+
ht: "Гаїті",
|
|
97
|
+
hu: "Угорщина",
|
|
98
|
+
id: "Індонезія",
|
|
99
|
+
ie: "Ірландія",
|
|
100
|
+
il: "Ізраїль",
|
|
101
|
+
im: "Острів Мен",
|
|
102
|
+
in: "Індія",
|
|
103
|
+
io: "Британська територія в Індійському Океані",
|
|
104
|
+
iq: "Ірак",
|
|
105
|
+
ir: "Іран",
|
|
106
|
+
is: "Ісландія",
|
|
107
|
+
it: "Італія",
|
|
108
|
+
je: "Джерсі",
|
|
109
|
+
jm: "Ямайка",
|
|
110
|
+
jo: "Йорданія",
|
|
111
|
+
jp: "Японія",
|
|
112
|
+
ke: "Кенія",
|
|
113
|
+
kg: "Киргизстан",
|
|
114
|
+
kh: "Камбоджа",
|
|
115
|
+
ki: "Кірібаті",
|
|
116
|
+
km: "Комори",
|
|
117
|
+
kn: "Сент-Кітс і Невіс",
|
|
118
|
+
kp: "Північна Корея",
|
|
119
|
+
kr: "Південна Корея",
|
|
120
|
+
kw: "Кувейт",
|
|
121
|
+
ky: "Кайманові Острови",
|
|
122
|
+
kz: "Казахстан",
|
|
123
|
+
la: "Лаос",
|
|
124
|
+
lb: "Ліван",
|
|
125
|
+
lc: "Сент-Люсія",
|
|
126
|
+
li: "Ліхтенштейн",
|
|
127
|
+
lk: "Шрі-Ланка",
|
|
128
|
+
lr: "Ліберія",
|
|
129
|
+
ls: "Лесото",
|
|
130
|
+
lt: "Литва",
|
|
131
|
+
lu: "Люксембурґ",
|
|
132
|
+
lv: "Латвія",
|
|
133
|
+
ly: "Лівія",
|
|
134
|
+
ma: "Марокко",
|
|
135
|
+
mc: "Монако",
|
|
136
|
+
md: "Молдова",
|
|
137
|
+
me: "Чорногорія",
|
|
138
|
+
mf: "Сен-Мартен",
|
|
139
|
+
mg: "Мадагаскар",
|
|
140
|
+
mh: "Маршаллові Острови",
|
|
141
|
+
mk: "Північна Македонія",
|
|
142
|
+
ml: "Малі",
|
|
143
|
+
mm: "Мʼянма (Бірма)",
|
|
144
|
+
mn: "Монголія",
|
|
145
|
+
mo: "Макао, О.А.Р Китаю",
|
|
146
|
+
mp: "Північні Маріанські Острови",
|
|
147
|
+
mq: "Мартініка",
|
|
148
|
+
mr: "Мавританія",
|
|
149
|
+
ms: "Монтсеррат",
|
|
150
|
+
mt: "Мальта",
|
|
151
|
+
mu: "Маврікій",
|
|
152
|
+
mv: "Мальдіви",
|
|
153
|
+
mw: "Малаві",
|
|
154
|
+
mx: "Мексика",
|
|
155
|
+
my: "Малайзія",
|
|
156
|
+
mz: "Мозамбік",
|
|
157
|
+
na: "Намібія",
|
|
158
|
+
nc: "Нова Каледонія",
|
|
159
|
+
ne: "Нігер",
|
|
160
|
+
nf: "Острів Норфолк",
|
|
161
|
+
ng: "Нігерія",
|
|
162
|
+
ni: "Нікараґуа",
|
|
163
|
+
nl: "Нідерланди",
|
|
164
|
+
no: "Норвеґія",
|
|
165
|
+
np: "Непал",
|
|
166
|
+
nr: "Науру",
|
|
167
|
+
nu: "Ніуе",
|
|
168
|
+
nz: "Нова Зеландія",
|
|
169
|
+
om: "Оман",
|
|
170
|
+
pa: "Панама",
|
|
171
|
+
pe: "Перу",
|
|
172
|
+
pf: "Французька Полінезія",
|
|
173
|
+
pg: "Папуа-Нова Ґвінея",
|
|
174
|
+
ph: "Філіппіни",
|
|
175
|
+
pk: "Пакистан",
|
|
176
|
+
pl: "Польща",
|
|
177
|
+
pm: "Сен-Пʼєр і Мікелон",
|
|
178
|
+
pr: "Пуерто-Ріко",
|
|
179
|
+
ps: "Палестинські території",
|
|
180
|
+
pt: "Портуґалія",
|
|
181
|
+
pw: "Палау",
|
|
182
|
+
py: "Параґвай",
|
|
183
|
+
qa: "Катар",
|
|
184
|
+
re: "Реюньйон",
|
|
185
|
+
ro: "Румунія",
|
|
186
|
+
rs: "Сербія",
|
|
187
|
+
ru: "Росія",
|
|
188
|
+
rw: "Руанда",
|
|
189
|
+
sa: "Саудівська Аравія",
|
|
190
|
+
sb: "Соломонові Острови",
|
|
191
|
+
sc: "Сейшельські Острови",
|
|
192
|
+
sd: "Судан",
|
|
193
|
+
se: "Швеція",
|
|
194
|
+
sg: "Сінгапур",
|
|
195
|
+
sh: "Острів Святої Єлени",
|
|
196
|
+
si: "Словенія",
|
|
197
|
+
sj: "Шпіцберген та Ян-Маєн",
|
|
198
|
+
sk: "Словаччина",
|
|
199
|
+
sl: "Сьєрра-Леоне",
|
|
200
|
+
sm: "Сан-Маріно",
|
|
201
|
+
sn: "Сенегал",
|
|
202
|
+
so: "Сомалі",
|
|
203
|
+
sr: "Сурінам",
|
|
204
|
+
ss: "Південний Судан",
|
|
205
|
+
st: "Сан-Томе і Прінсіпі",
|
|
206
|
+
sv: "Сальвадор",
|
|
207
|
+
sx: "Сінт-Мартен",
|
|
208
|
+
sy: "Сирія",
|
|
209
|
+
sz: "Есватіні",
|
|
210
|
+
tc: "Острови Теркс і Кайкос",
|
|
211
|
+
td: "Чад",
|
|
212
|
+
tg: "Того",
|
|
213
|
+
th: "Таїланд",
|
|
214
|
+
tj: "Таджикистан",
|
|
215
|
+
tk: "Токелау",
|
|
216
|
+
tl: "Тімор-Лешті",
|
|
217
|
+
tm: "Туркменістан",
|
|
218
|
+
tn: "Туніс",
|
|
219
|
+
to: "Тонґа",
|
|
220
|
+
tr: "Туреччина",
|
|
221
|
+
tt: "Трінідад і Тобаґо",
|
|
222
|
+
tv: "Тувалу",
|
|
223
|
+
tw: "Тайвань",
|
|
224
|
+
tz: "Танзанія",
|
|
225
|
+
ua: "Україна",
|
|
226
|
+
ug: "Уганда",
|
|
227
|
+
us: "Сполучені Штати",
|
|
228
|
+
uy: "Уруґвай",
|
|
229
|
+
uz: "Узбекистан",
|
|
230
|
+
va: "Ватикан",
|
|
231
|
+
vc: "Сент-Вінсент і Ґренадіни",
|
|
232
|
+
ve: "Венесуела",
|
|
233
|
+
vg: "Британські Віргінські острови",
|
|
234
|
+
vi: "Віргінські острови, США",
|
|
235
|
+
vn: "Вʼєтнам",
|
|
236
|
+
vu: "Вануату",
|
|
237
|
+
wf: "Уолліс і Футуна",
|
|
238
|
+
ws: "Самоа",
|
|
239
|
+
ye: "Ємен",
|
|
240
|
+
yt: "Майотта",
|
|
241
|
+
za: "Південно-Африканська Республіка",
|
|
242
|
+
zm: "Замбія",
|
|
243
|
+
zw: "Зімбабве"
|
|
244
|
+
};
|
|
245
|
+
export default countryTranslations;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import countryTranslations from "./countries.js";
|
|
2
|
+
import interfaceTranslations from "./interface.js";
|
|
3
|
+
export { countryTranslations, interfaceTranslations };
|
|
4
|
+
const allTranslations = { ...countryTranslations, ...interfaceTranslations };
|
|
5
|
+
export default allTranslations;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const interfaceTranslations = {
|
|
2
|
+
selectedCountryAriaLabel: "Обрана країна",
|
|
3
|
+
noCountrySelected: "Країну не обрано",
|
|
4
|
+
countryListAriaLabel: "Список країн",
|
|
5
|
+
searchPlaceholder: "Шукати",
|
|
6
|
+
zeroSearchResults: "Результатів не знайдено",
|
|
7
|
+
oneSearchResult: "Знайдено 1 результат",
|
|
8
|
+
multipleSearchResults: "Знайдено ${count} результатів",
|
|
9
|
+
// additional countries (not supported by country-list library)
|
|
10
|
+
ac: "Острів Вознесіння",
|
|
11
|
+
xk: "Косово"
|
|
12
|
+
};
|
|
13
|
+
export default interfaceTranslations;
|
|
@@ -1064,6 +1064,24 @@ declare module "intl-tel-input/i18n/tr" {
|
|
|
1064
1064
|
const allTranslations: I18n;
|
|
1065
1065
|
export default allTranslations;
|
|
1066
1066
|
}
|
|
1067
|
+
declare module "intl-tel-input/i18n/uk/countries" {
|
|
1068
|
+
import { I18n } from "intl-tel-input/i18n/types";
|
|
1069
|
+
const countryTranslations: I18n;
|
|
1070
|
+
export default countryTranslations;
|
|
1071
|
+
}
|
|
1072
|
+
declare module "intl-tel-input/i18n/uk/interface" {
|
|
1073
|
+
import { I18n } from "intl-tel-input/i18n/types";
|
|
1074
|
+
const interfaceTranslations: I18n;
|
|
1075
|
+
export default interfaceTranslations;
|
|
1076
|
+
}
|
|
1077
|
+
declare module "intl-tel-input/i18n/uk" {
|
|
1078
|
+
import { I18n } from "intl-tel-input/i18n/types";
|
|
1079
|
+
import countryTranslations from "intl-tel-input/i18n/uk/countries";
|
|
1080
|
+
import interfaceTranslations from "intl-tel-input/i18n/uk/interface";
|
|
1081
|
+
export { countryTranslations, interfaceTranslations };
|
|
1082
|
+
const allTranslations: I18n;
|
|
1083
|
+
export default allTranslations;
|
|
1084
|
+
}
|
|
1067
1085
|
declare module "intl-tel-input/i18n/ur/countries" {
|
|
1068
1086
|
import { I18n } from "intl-tel-input/i18n/types";
|
|
1069
1087
|
const countryTranslations: I18n;
|
|
@@ -1152,6 +1170,7 @@ declare module "intl-tel-input/i18n" {
|
|
|
1152
1170
|
export { default as te, countryTranslations as teCountryTranslations, interfaceTranslations as teInterfaceTranslations } from "intl-tel-input/i18n/te";
|
|
1153
1171
|
export { default as th, countryTranslations as thCountryTranslations, interfaceTranslations as thInterfaceTranslations } from "intl-tel-input/i18n/th";
|
|
1154
1172
|
export { default as tr, countryTranslations as trCountryTranslations, interfaceTranslations as trInterfaceTranslations } from "intl-tel-input/i18n/tr";
|
|
1173
|
+
export { default as uk, countryTranslations as ukCountryTranslations, interfaceTranslations as ukInterfaceTranslations } from "intl-tel-input/i18n/uk";
|
|
1155
1174
|
export { default as ur, countryTranslations as urCountryTranslations, interfaceTranslations as urInterfaceTranslations } from "intl-tel-input/i18n/ur";
|
|
1156
1175
|
export { default as vi, countryTranslations as viCountryTranslations, interfaceTranslations as viInterfaceTranslations } from "intl-tel-input/i18n/vi";
|
|
1157
1176
|
export { default as zh, countryTranslations as zhCountryTranslations, interfaceTranslations as zhInterfaceTranslations } from "intl-tel-input/i18n/zh";
|
package/build/js/intlTelInput.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* International Telephone Input v25.
|
|
2
|
+
* International Telephone Input v25.2.1
|
|
3
3
|
* https://github.com/jackocnr/intl-tel-input.git
|
|
4
4
|
* Licensed under the MIT license
|
|
5
5
|
*/
|
|
@@ -1732,7 +1732,7 @@ var factoryOutput = (() => {
|
|
|
1732
1732
|
const numeric = getNumeric(number);
|
|
1733
1733
|
if (numeric.charAt(0) === "1") {
|
|
1734
1734
|
const areaCode = numeric.substr(1, 3);
|
|
1735
|
-
return regionlessNanpNumbers.
|
|
1735
|
+
return regionlessNanpNumbers.includes(areaCode);
|
|
1736
1736
|
}
|
|
1737
1737
|
return false;
|
|
1738
1738
|
};
|
|
@@ -1877,14 +1877,14 @@ var factoryOutput = (() => {
|
|
|
1877
1877
|
(country) => country.toLowerCase()
|
|
1878
1878
|
);
|
|
1879
1879
|
this.countries = data_default.filter(
|
|
1880
|
-
(country) => lowerCaseOnlyCountries.
|
|
1880
|
+
(country) => lowerCaseOnlyCountries.includes(country.iso2)
|
|
1881
1881
|
);
|
|
1882
1882
|
} else if (excludeCountries.length) {
|
|
1883
1883
|
const lowerCaseExcludeCountries = excludeCountries.map(
|
|
1884
1884
|
(country) => country.toLowerCase()
|
|
1885
1885
|
);
|
|
1886
1886
|
this.countries = data_default.filter(
|
|
1887
|
-
(country) => lowerCaseExcludeCountries.
|
|
1887
|
+
(country) => !lowerCaseExcludeCountries.includes(country.iso2)
|
|
1888
1888
|
);
|
|
1889
1889
|
} else {
|
|
1890
1890
|
this.countries = data_default;
|
|
@@ -3169,7 +3169,7 @@ var factoryOutput = (() => {
|
|
|
3169
3169
|
attachUtils,
|
|
3170
3170
|
startedLoadingUtilsScript: false,
|
|
3171
3171
|
startedLoadingAutoCountry: false,
|
|
3172
|
-
version: "25.
|
|
3172
|
+
version: "25.2.1"
|
|
3173
3173
|
}
|
|
3174
3174
|
);
|
|
3175
3175
|
var intl_tel_input_default = intlTelInput;
|