intl-tel-input 25.3.2 → 25.4.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,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.3.2
2
+ * International Telephone Input v25.4.0
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -2526,12 +2526,16 @@ var factoryOutput = (() => {
2526
2526
  const { i18n } = this.options;
2527
2527
  const count = this.countryList.childElementCount;
2528
2528
  let searchText;
2529
- if (count === 0) {
2530
- searchText = i18n.zeroSearchResults;
2531
- } else if (count === 1) {
2532
- searchText = i18n.oneSearchResult;
2529
+ if ("searchResultsText" in i18n) {
2530
+ searchText = i18n.searchResultsText(count);
2533
2531
  } else {
2534
- searchText = i18n.multipleSearchResults.replace("${count}", count.toString());
2532
+ if (count === 0) {
2533
+ searchText = i18n.zeroSearchResults;
2534
+ } else if (count === 1) {
2535
+ searchText = i18n.oneSearchResult;
2536
+ } else {
2537
+ searchText = i18n.multipleSearchResults.replace("${count}", count.toString());
2538
+ }
2535
2539
  }
2536
2540
  this.searchResultsA11yText.textContent = searchText;
2537
2541
  }
@@ -2965,6 +2969,7 @@ var factoryOutput = (() => {
2965
2969
  //********************
2966
2970
  //* Remove plugin.
2967
2971
  destroy() {
2972
+ this.telInput.iti = void 0;
2968
2973
  const { allowDropdown, separateDialCode } = this.options;
2969
2974
  if (allowDropdown) {
2970
2975
  this._closeDropdown();
@@ -3150,6 +3155,7 @@ var factoryOutput = (() => {
3150
3155
  iti._init();
3151
3156
  input.setAttribute("data-intl-tel-input-id", iti.id.toString());
3152
3157
  intlTelInput.instances[iti.id] = iti;
3158
+ input.iti = iti;
3153
3159
  return iti;
3154
3160
  },
3155
3161
  {
@@ -3168,7 +3174,7 @@ var factoryOutput = (() => {
3168
3174
  attachUtils,
3169
3175
  startedLoadingUtilsScript: false,
3170
3176
  startedLoadingAutoCountry: false,
3171
- version: "25.3.2"
3177
+ version: "25.4.0"
3172
3178
  }
3173
3179
  );
3174
3180
  var intl_tel_input_default = intlTelInput;
@@ -5442,10 +5448,13 @@ var factoryOutput = (() => {
5442
5448
  ,
5443
5449
  ,
5444
5450
  [10]
5445
- ], "GB", 44, "00", "0", " x", , "0", , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], [, "(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], [, "(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], [, "(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], [, "(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], [, "(\\d{2})(\\d{4})(\\d{4})", "$1 $2 $3", [
5446
- "[25]|7(?:0|6[02-9])",
5447
- "[25]|7(?:0|6(?:[03-9]|2[356]))"
5448
- ], "0$1"], [, "(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], , [, , "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", , , , "7640123456", , , [10]], 1, , [, , , , , , , , , [-1]], [, , "(?:3[0347]|55)\\d{8}", , , , "5512345678", , , [10]], , , [, , , , , , , , , [-1]]],
5451
+ ], "GB", 44, "00", "0", " x", , "0|180020", , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["800", "8001", "80011", "800111", "8001111"], "0$1"], [, "(\\d{3})(\\d{2})(\\d{2})", "$1 $2 $3", ["845", "8454", "84546", "845464"], "0$1"], [, "(\\d{3})(\\d{6})", "$1 $2", ["800"], "0$1"], [, "(\\d{5})(\\d{4,5})", "$1 $2", ["1(?:38|5[23]|69|76|94)", "1(?:(?:38|69)7|5(?:24|39)|768|946)", "1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)"], "0$1"], [, "(\\d{4})(\\d{5,6})", "$1 $2", ["1(?:[2-69][02-9]|[78])"], "0$1"], [
5452
+ ,
5453
+ "(\\d{2})(\\d{4})(\\d{4})",
5454
+ "$1 $2 $3",
5455
+ ["[25]|7(?:0|6[02-9])", "[25]|7(?:0|6(?:[03-9]|2[356]))"],
5456
+ "0$1"
5457
+ ], [, "(\\d{4})(\\d{6})", "$1 $2", ["7"], "0$1"], [, "(\\d{3})(\\d{3})(\\d{4})", "$1 $2 $3", ["[1389]"], "0$1"]], , [, , "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", , , , "7640123456", , , [10]], 1, , [, , , , , , , , , [-1]], [, , "(?:3[0347]|55)\\d{8}", , , , "5512345678", , , [10]], , , [, , , , , , , , , [-1]]],
5449
5458
  GD: [, [, , "(?:473|[58]\\d\\d|900)\\d{7}", , , , , , , [10], [7]], [
5450
5459
  ,
5451
5460
  ,
@@ -5518,7 +5527,7 @@ var factoryOutput = (() => {
5518
5527
  "0",
5519
5528
  ,
5520
5529
  ,
5521
- "([25-9]\\d{5})$|0",
5530
+ "([25-9]\\d{5})$|0|180020",
5522
5531
  "1481$1",
5523
5532
  ,
5524
5533
  ,
@@ -5566,42 +5575,51 @@ var factoryOutput = (() => {
5566
5575
  ,
5567
5576
  "221234"
5568
5577
  ], [, , "80\\d{4}", , , , "801234"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "3[89]\\d{4}", , , , "381234"], "GL", 299, "00", , , , , , , , [[, "(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3", ["19|[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5569
- GM: [, [, , "[2-9]\\d{6}", , , , , , , [7]], [, , "(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}", , , , "5661234"], [, , "556\\d{4}|(?:[23679]\\d|4[015]|5[0-489])\\d{5}", , , , "3012345"], [
5578
+ GM: [, [, , "[2-9]\\d{6}", , , , , , , [7]], [, , "(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8[0-589]\\d\\d)\\d{3}", , , , "5661234"], [
5570
5579
  ,
5571
5580
  ,
5581
+ "556\\d{4}|(?:[23679]\\d|4[015]|5[0-489]|8[67])\\d{5}",
5572
5582
  ,
5573
5583
  ,
5574
5584
  ,
5585
+ "3012345"
5586
+ ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "GM", 220, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5587
+ GN: [, [, , "722\\d{6}|(?:3|6\\d)\\d{7}", , , , , , , [8, 9]], [, , "3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}", , , , "30241234", , , [8]], [, , "6[0-356]\\d{7}", , , , "601123456", , , [9]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [
5575
5588
  ,
5576
5589
  ,
5590
+ "722\\d{6}",
5577
5591
  ,
5578
5592
  ,
5579
- [-1]
5580
- ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "GM", 220, "00", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5581
- GN: [
5582
5593
  ,
5583
- [, , "722\\d{6}|(?:3|6\\d)\\d{7}", , , , , , , [8, 9]],
5584
- [, , "3(?:0(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])|1\\d\\d)\\d{4}", , , , "30241234", , , [8]],
5585
- [, , "6[0-356]\\d{7}", , , , "601123456", , , [9]],
5586
- [, , , , , , , , , [-1]],
5594
+ "722123456",
5595
+ ,
5596
+ ,
5597
+ [9]
5598
+ ], "GN", 224, "00", , , , , , , , [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5599
+ GP: [
5600
+ ,
5601
+ [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]],
5602
+ [, , "590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}", , , , "590201234"],
5603
+ [, , "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}", , , , "690001234"],
5604
+ [, , "80[0-5]\\d{6}", , , , "800012345"],
5587
5605
  [, , , , , , , , , [-1]],
5588
5606
  [, , , , , , , , , [-1]],
5589
5607
  [, , , , , , , , , [-1]],
5590
- [, , "722\\d{6}", , , , "722123456", , , [9]],
5591
- "GN",
5592
- 224,
5608
+ [, , "9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}", , , , "976012345"],
5609
+ "GP",
5610
+ 590,
5593
5611
  "00",
5612
+ "0",
5594
5613
  ,
5595
5614
  ,
5615
+ "0",
5596
5616
  ,
5597
5617
  ,
5598
5618
  ,
5599
- ,
5600
- ,
5601
- [[, "(\\d{2})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["3"]], [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[67]"]]],
5619
+ [[, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]"], "0$1"], [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]],
5602
5620
  ,
5603
5621
  [, , , , , , , , , [-1]],
5604
- ,
5622
+ 1,
5605
5623
  ,
5606
5624
  [, , , , , , , , , [-1]],
5607
5625
  [, , , , , , , , , [-1]],
@@ -5609,15 +5627,6 @@ var factoryOutput = (() => {
5609
5627
  ,
5610
5628
  [, , , , , , , , , [-1]]
5611
5629
  ],
5612
- GP: [, [, , "(?:590\\d|7090)\\d{5}|(?:69|80|9\\d)\\d{7}", , , , , , , [9]], [, , "590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\d)\\d{4}", , , , "590201234"], [, , "(?:69(?:0\\d\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\d)|6(?:1[016-9]|5[0-4]|[67]\\d))|7090[0-4])\\d{4}", , , , "690001234"], [
5613
- ,
5614
- ,
5615
- "80[0-5]\\d{6}",
5616
- ,
5617
- ,
5618
- ,
5619
- "800012345"
5620
- ], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "9(?:(?:39[5-7]|76[018])\\d|475[0-6])\\d{4}", , , , "976012345"], "GP", 590, "00", "0", , , "0", , , , [[, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["[5-79]"], "0$1"], [, "(\\d{3})(\\d{2})(\\d{2})(\\d{2})", "$1 $2 $3 $4", ["8"], "0$1"]], , [, , , , , , , , , [-1]], 1, , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5621
5630
  GQ: [
5622
5631
  ,
5623
5632
  [, , "222\\d{6}|(?:3\\d|55|[89]0)\\d{7}", , , , , , , [9]],
@@ -5705,7 +5714,7 @@ var factoryOutput = (() => {
5705
5714
  ,
5706
5715
  ,
5707
5716
  "2201234"
5708
- ], [, , "(?:510|6\\d\\d|7(?:[0-5]\\d|6[019]|70))\\d{4}", , , , "6091234"], [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], [, , "9008\\d{3}", , , , "9008123"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "515\\d{4}", , , , "5151234"], "GY", 592, "001", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5717
+ ], [, , "(?:51[01]|6\\d\\d|7(?:[0-5]\\d|6[019]|70))\\d{4}", , , , "6091234"], [, , "(?:289|8(?:00|6[28]|88|99))\\d{4}", , , , "2891234"], [, , "9008\\d{3}", , , , "9008123"], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "515\\d{4}", , , , "5151234"], "GY", 592, "001", , , , , , , , [[, "(\\d{3})(\\d{4})", "$1 $2", ["[2-9]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]],
5709
5718
  HK: [, [, , "8[0-46-9]\\d{6,7}|9\\d{4,7}|(?:[2-7]|9\\d{3})\\d{7}", , , , , , , [5, 6, 7, 8, 9, 11]], [
5710
5719
  ,
5711
5720
  ,
@@ -5907,7 +5916,7 @@ var factoryOutput = (() => {
5907
5916
  "0",
5908
5917
  ,
5909
5918
  ,
5910
- "([25-8]\\d{5})$|0",
5919
+ "([25-8]\\d{5})$|0|180020",
5911
5920
  "1624$1",
5912
5921
  ,
5913
5922
  ,
@@ -6124,7 +6133,7 @@ var factoryOutput = (() => {
6124
6133
  ,
6125
6134
  ,
6126
6135
  "7797712345"
6127
- ], [, , "80(?:07(?:35|81)|8901)\\d{4}", , , , "8007354567"], [, , "(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}", , , , "9018105678"], [, , , , , , , , , [-1]], [, , "701511\\d{4}", , , , "7015115678"], [, , "56\\d{8}", , , , "5612345678"], "JE", 44, "00", "0", , , "([0-24-8]\\d{5})$|0", "1534$1", , , , , [, , "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", , , , "7640123456"], , , [, , , , , , , , , [-1]], [
6136
+ ], [, , "80(?:07(?:35|81)|8901)\\d{4}", , , , "8007354567"], [, , "(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\d{4}", , , , "9018105678"], [, , , , , , , , , [-1]], [, , "701511\\d{4}", , , , "7015115678"], [, , "56\\d{8}", , , , "5612345678"], "JE", 44, "00", "0", , , "([0-24-8]\\d{5})$|0|180020", "1534$1", , , , , [, , "76(?:464|652)\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\d{6}", , , , "7640123456"], , , [, , , , , , , , , [-1]], [
6128
6137
  ,
6129
6138
  ,
6130
6139
  "(?:3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\d{4})\\d{4}",
@@ -9428,7 +9437,9 @@ var factoryOutput = (() => {
9428
9437
  return a.s.toString();
9429
9438
  }
9430
9439
  ;
9431
- const yb = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
9440
+ const yb = (a) => {
9441
+ a.includes("FIXED_LINE_OR_MOBILE") ? (a.includes("MOBILE") || a.push("MOBILE"), a.includes("FIXED_LINE") || a.push("FIXED_LINE")) : (a.includes("MOBILE") || a.includes("FIXED_LINE")) && a.push("FIXED_LINE_OR_MOBILE");
9442
+ }, zb = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
9432
9443
  m("intlTelInputUtilsTemp", {});
9433
9444
  m("intlTelInputUtilsTemp.formatNumberAsYouType", (a, b) => {
9434
9445
  try {
@@ -9500,7 +9511,8 @@ var factoryOutput = (() => {
9500
9511
  try {
9501
9512
  const d = K.g(), e = Y(d, a, b), f = cb(d, e);
9502
9513
  if (c) {
9503
- const g = c.map((h) => yb[h]);
9514
+ yb(c);
9515
+ const g = c.map((h) => zb[h]);
9504
9516
  return f && g.includes($a(d, e));
9505
9517
  }
9506
9518
  return f;
@@ -9512,8 +9524,8 @@ var factoryOutput = (() => {
9512
9524
  try {
9513
9525
  const d = K.g(), e = Y(d, a, b);
9514
9526
  if (c) {
9515
- c.includes("FIXED_LINE_OR_MOBILE") && (c.includes("MOBILE") || c.push("MOBILE"), c.includes("FIXED_LINE") || c.push("FIXED_LINE"));
9516
- for (let f of c) if (0 === X(d, e, yb[f])) return true;
9527
+ yb(c);
9528
+ for (let f of c) if (0 === X(d, e, zb[f])) return true;
9517
9529
  return false;
9518
9530
  }
9519
9531
  return 0 === X(d, e, -1);
@@ -9529,11 +9541,12 @@ var factoryOutput = (() => {
9529
9541
  }
9530
9542
  });
9531
9543
  m("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 });
9532
- m("intlTelInputUtilsTemp.numberType", yb);
9544
+ m("intlTelInputUtilsTemp.numberType", zb);
9533
9545
  m("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
9534
9546
  })();
9535
- var utils = window.intlTelInputUtilsTemp;
9536
- delete window.intlTelInputUtilsTemp;
9547
+ var globalContext = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : void 0;
9548
+ var utils = globalContext.intlTelInputUtilsTemp;
9549
+ delete globalContext.intlTelInputUtilsTemp;
9537
9550
  var utils_default = utils;
9538
9551
 
9539
9552
  // src/js/intl-tel-input/intlTelInputWithUtils.ts