@taiga-ui/kit 2.98.0 → 2.99.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.
Files changed (156) hide show
  1. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +25 -516
  2. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js +1 -1
  4. package/bundles/taiga-ui-kit-components-input-phone-international.umd.min.js.map +1 -1
  5. package/bundles/taiga-ui-kit-constants.umd.js +275 -4
  6. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-constants.umd.min.js +1 -1
  8. package/bundles/taiga-ui-kit-constants.umd.min.js.map +1 -1
  9. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js +339 -0
  10. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.js.map +1 -0
  11. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.min.js +2 -0
  12. package/bundles/taiga-ui-kit-pipes-iso-to-country-code.umd.min.js.map +1 -0
  13. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js +361 -0
  14. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.js.map +1 -0
  15. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.min.js +2 -0
  16. package/bundles/taiga-ui-kit-pipes-to-country-code.umd.min.js.map +1 -0
  17. package/bundles/taiga-ui-kit-pipes.umd.js +20 -4
  18. package/bundles/taiga-ui-kit-pipes.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-pipes.umd.min.js +1 -1
  20. package/bundles/taiga-ui-kit-tokens.umd.js +9 -4
  21. package/bundles/taiga-ui-kit-tokens.umd.js.map +1 -1
  22. package/bundles/taiga-ui-kit-tokens.umd.min.js +1 -1
  23. package/bundles/taiga-ui-kit-tokens.umd.min.js.map +1 -1
  24. package/bundles/taiga-ui-kit-utils-phone.umd.js +27 -0
  25. package/bundles/taiga-ui-kit-utils-phone.umd.js.map +1 -0
  26. package/bundles/taiga-ui-kit-utils-phone.umd.min.js +2 -0
  27. package/bundles/taiga-ui-kit-utils-phone.umd.min.js.map +1 -0
  28. package/bundles/taiga-ui-kit-utils.umd.js +12 -4
  29. package/bundles/taiga-ui-kit-utils.umd.js.map +1 -1
  30. package/bundles/taiga-ui-kit-utils.umd.min.js +1 -1
  31. package/components/input-phone-international/index.d.ts +0 -4
  32. package/components/input-phone-international/input-phone-international.component.d.ts +7 -3
  33. package/components/input-phone-international/taiga-ui-kit-components-input-phone-international.metadata.json +1 -1
  34. package/{components/input-phone-international/const → constants}/countries.d.ts +1 -2
  35. package/constants/index.d.ts +2 -0
  36. package/constants/mask-after-code-regexp.d.ts +1 -0
  37. package/constants/taiga-ui-kit-constants.metadata.json +1 -1
  38. package/esm2015/components/input-phone-international/index.js +1 -4
  39. package/esm2015/components/input-phone-international/input-phone-international.component.js +24 -30
  40. package/esm2015/constants/countries.js +264 -0
  41. package/esm2015/constants/index.js +3 -1
  42. package/esm2015/constants/mask-after-code-regexp.js +2 -0
  43. package/esm2015/interfaces/country.js +1 -0
  44. package/esm2015/interfaces/index.js +1 -1
  45. package/esm2015/pipes/index.js +3 -1
  46. package/esm2015/pipes/iso-to-country-code/index.js +3 -0
  47. package/esm2015/pipes/iso-to-country-code/iso-to-country-code.module.js +13 -0
  48. package/esm2015/pipes/iso-to-country-code/iso-to-country-code.pipe.js +24 -0
  49. package/esm2015/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.js +5 -0
  50. package/esm2015/pipes/to-country-code/index.js +3 -0
  51. package/esm2015/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.js +5 -0
  52. package/esm2015/pipes/to-country-code/to-country-code.module.js +13 -0
  53. package/esm2015/pipes/to-country-code/to-country-code.pipe.js +47 -0
  54. package/esm2015/tokens/countries-masks.js +6 -0
  55. package/esm2015/tokens/index.js +2 -1
  56. package/esm2015/utils/index.js +2 -1
  57. package/esm2015/utils/phone/get-max-allowed-phone-length.js +4 -0
  58. package/esm2015/utils/phone/index.js +4 -0
  59. package/esm2015/utils/phone/iso-to-country-code.js +5 -0
  60. package/esm2015/utils/phone/not-kz-region.js +5 -0
  61. package/esm2015/utils/phone/taiga-ui-kit-utils-phone.js +5 -0
  62. package/esm5/components/input-phone-international/index.js +1 -4
  63. package/esm5/components/input-phone-international/input-phone-international.component.js +24 -31
  64. package/esm5/constants/countries.js +267 -0
  65. package/esm5/constants/index.js +3 -1
  66. package/esm5/constants/mask-after-code-regexp.js +2 -0
  67. package/esm5/interfaces/country.js +1 -0
  68. package/esm5/interfaces/index.js +1 -1
  69. package/esm5/pipes/index.js +3 -1
  70. package/esm5/pipes/iso-to-country-code/index.js +3 -0
  71. package/esm5/pipes/iso-to-country-code/iso-to-country-code.module.js +16 -0
  72. package/esm5/pipes/iso-to-country-code/iso-to-country-code.pipe.js +25 -0
  73. package/esm5/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.js +5 -0
  74. package/esm5/pipes/to-country-code/index.js +3 -0
  75. package/esm5/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.js +5 -0
  76. package/esm5/pipes/to-country-code/to-country-code.module.js +16 -0
  77. package/esm5/pipes/to-country-code/to-country-code.pipe.js +49 -0
  78. package/esm5/tokens/countries-masks.js +6 -0
  79. package/esm5/tokens/index.js +2 -1
  80. package/esm5/utils/index.js +2 -1
  81. package/esm5/utils/phone/get-max-allowed-phone-length.js +4 -0
  82. package/esm5/utils/phone/index.js +4 -0
  83. package/esm5/utils/phone/iso-to-country-code.js +5 -0
  84. package/esm5/utils/phone/not-kz-region.js +5 -0
  85. package/esm5/utils/phone/taiga-ui-kit-utils-phone.js +5 -0
  86. package/fesm2015/taiga-ui-kit-components-input-phone-international.js +26 -507
  87. package/fesm2015/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  88. package/fesm2015/taiga-ui-kit-constants.js +267 -1
  89. package/fesm2015/taiga-ui-kit-constants.js.map +1 -1
  90. package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js +39 -0
  91. package/fesm2015/taiga-ui-kit-pipes-iso-to-country-code.js.map +1 -0
  92. package/fesm2015/taiga-ui-kit-pipes-to-country-code.js +62 -0
  93. package/fesm2015/taiga-ui-kit-pipes-to-country-code.js.map +1 -0
  94. package/fesm2015/taiga-ui-kit-pipes.js +2 -0
  95. package/fesm2015/taiga-ui-kit-pipes.js.map +1 -1
  96. package/fesm2015/taiga-ui-kit-tokens.js +6 -1
  97. package/fesm2015/taiga-ui-kit-tokens.js.map +1 -1
  98. package/fesm2015/taiga-ui-kit-utils-phone.js +21 -0
  99. package/fesm2015/taiga-ui-kit-utils-phone.js.map +1 -0
  100. package/fesm2015/taiga-ui-kit-utils.js +1 -0
  101. package/fesm2015/taiga-ui-kit-utils.js.map +1 -1
  102. package/fesm5/taiga-ui-kit-components-input-phone-international.js +27 -511
  103. package/fesm5/taiga-ui-kit-components-input-phone-international.js.map +1 -1
  104. package/fesm5/taiga-ui-kit-constants.js +270 -2
  105. package/fesm5/taiga-ui-kit-constants.js.map +1 -1
  106. package/fesm5/taiga-ui-kit-pipes-iso-to-country-code.js +43 -0
  107. package/fesm5/taiga-ui-kit-pipes-iso-to-country-code.js.map +1 -0
  108. package/fesm5/taiga-ui-kit-pipes-to-country-code.js +67 -0
  109. package/fesm5/taiga-ui-kit-pipes-to-country-code.js.map +1 -0
  110. package/fesm5/taiga-ui-kit-pipes.js +2 -0
  111. package/fesm5/taiga-ui-kit-pipes.js.map +1 -1
  112. package/fesm5/taiga-ui-kit-tokens.js +6 -1
  113. package/fesm5/taiga-ui-kit-tokens.js.map +1 -1
  114. package/fesm5/taiga-ui-kit-utils-phone.js +21 -0
  115. package/fesm5/taiga-ui-kit-utils-phone.js.map +1 -0
  116. package/fesm5/taiga-ui-kit-utils.js +1 -0
  117. package/fesm5/taiga-ui-kit-utils.js.map +1 -1
  118. package/interfaces/index.d.ts +1 -0
  119. package/interfaces/taiga-ui-kit-interfaces.metadata.json +1 -1
  120. package/package.json +4 -4
  121. package/pipes/index.d.ts +2 -0
  122. package/pipes/iso-to-country-code/index.d.ts +2 -0
  123. package/pipes/iso-to-country-code/iso-to-country-code.module.d.ts +2 -0
  124. package/pipes/iso-to-country-code/iso-to-country-code.pipe.d.ts +7 -0
  125. package/pipes/iso-to-country-code/package.json +13 -0
  126. package/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.d.ts +4 -0
  127. package/pipes/iso-to-country-code/taiga-ui-kit-pipes-iso-to-country-code.metadata.json +1 -0
  128. package/pipes/taiga-ui-kit-pipes.metadata.json +1 -1
  129. package/pipes/to-country-code/index.d.ts +2 -0
  130. package/pipes/to-country-code/package.json +13 -0
  131. package/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.d.ts +4 -0
  132. package/pipes/to-country-code/taiga-ui-kit-pipes-to-country-code.metadata.json +1 -0
  133. package/pipes/to-country-code/to-country-code.module.d.ts +2 -0
  134. package/pipes/to-country-code/to-country-code.pipe.d.ts +7 -0
  135. package/tokens/index.d.ts +1 -0
  136. package/tokens/taiga-ui-kit-tokens.metadata.json +1 -1
  137. package/utils/index.d.ts +1 -0
  138. package/utils/phone/get-max-allowed-phone-length.d.ts +2 -0
  139. package/utils/phone/index.d.ts +3 -0
  140. package/utils/phone/iso-to-country-code.d.ts +2 -0
  141. package/utils/phone/not-kz-region.d.ts +1 -0
  142. package/utils/phone/package.json +13 -0
  143. package/utils/phone/taiga-ui-kit-utils-phone.d.ts +4 -0
  144. package/utils/phone/taiga-ui-kit-utils-phone.metadata.json +1 -0
  145. package/utils/taiga-ui-kit-utils.metadata.json +1 -1
  146. package/components/input-phone-international/country-iso-code.d.ts +0 -207
  147. package/esm2015/components/input-phone-international/const/countries.js +0 -265
  148. package/esm2015/components/input-phone-international/country-iso-code.js +0 -209
  149. package/esm2015/components/input-phone-international/interfaces/country.js +0 -1
  150. package/esm2015/components/input-phone-international/tokens/countries-masks.js +0 -6
  151. package/esm5/components/input-phone-international/const/countries.js +0 -268
  152. package/esm5/components/input-phone-international/country-iso-code.js +0 -209
  153. package/esm5/components/input-phone-international/interfaces/country.js +0 -1
  154. package/esm5/components/input-phone-international/tokens/countries-masks.js +0 -6
  155. /package/{components/input-phone-international/interfaces → interfaces}/country.d.ts +0 -0
  156. /package/{components/input-phone-international/tokens → tokens}/countries-masks.d.ts +0 -0
@@ -1,493 +1,22 @@
1
- import { TuiCountryIsoCode as TuiCountryIsoCode$1 } from '@taiga-ui/i18n';
2
1
  import { __decorate, __param } from 'tslib';
3
2
  import { InjectionToken, EventEmitter, Optional, Self, Inject, ChangeDetectorRef, ViewChild, Input, Output, HostListener, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core';
4
3
  import { NgControl, FormsModule } from '@angular/forms';
5
4
  import { getClipboardDataText, AbstractTuiControl, CHAR_PLUS, setNativeFocused, tuiDefaultProp, tuiPure, TUI_FOCUSABLE_ITEM_ACCESSOR, TuiMapperPipeModule, TuiActiveZoneModule } from '@taiga-ui/cdk';
6
5
  import { TUI_NON_DIGITS_REGEXP, TUI_MASK_SYMBOLS_REGEXP, TuiFlagPipe, TuiPrimitiveTextfieldComponent, TuiSvgModule, TuiGroupModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiHostedDropdownModule, TuiDataListModule, TuiFlagPipeModule } from '@taiga-ui/core';
6
+ import { TuiCountryIsoCode } from '@taiga-ui/i18n';
7
7
  import { TUI_ARROW, TuiArrowModule } from '@taiga-ui/kit/components/arrow';
8
8
  import { TuiInputPhoneComponent, TuiInputPhoneModule } from '@taiga-ui/kit/components/input-phone';
9
+ import { TuiToCountryCodePipe } from '@taiga-ui/kit/pipes';
9
10
  import { FIXED_DROPDOWN_CONTROLLER_PROVIDER } from '@taiga-ui/kit/providers';
10
- import { TUI_COUNTRIES } from '@taiga-ui/kit/tokens';
11
+ import { TUI_COUNTRIES, TUI_COUNTRIES_MASKS } from '@taiga-ui/kit/tokens';
12
+ import { tuiIsoToCountryCode, tuiGetMaxAllowedPhoneLength } from '@taiga-ui/kit/utils';
11
13
  import { Observable } from 'rxjs';
12
14
  import { CommonModule } from '@angular/common';
13
15
  import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';
14
16
 
15
- /**
16
- * @deprecated Dont use it (will be deleted soon).
17
- * - Use token `TUI_COUNTRIES_MASKS` to get phone mask by country iso code
18
- * - Use token `TUI_COUNTRIES` to get localized country name by its iso code
19
- * @example
20
- * import {TUI_COUNTRIES, TUI_COUNTRIES_MASKS} from '@taiga-ui/kit';
21
- *
22
- * @todo TODO: remove it in 3.0
23
- */
24
- const COUNTRIES = {
25
- [TuiCountryIsoCode$1.AD]: { mask: `+376###-###`, name: `Андорра` },
26
- [TuiCountryIsoCode$1.AE]: {
27
- mask: `+971-##-###-####`,
28
- name: `Объединенные Арабские Эмираты`,
29
- },
30
- [TuiCountryIsoCode$1.AF]: { mask: `+93##-###-####`, name: `Афганистан` },
31
- [TuiCountryIsoCode$1.AG]: { mask: `+1(268) ###-####`, name: `Антигуа и Барбуда` },
32
- [TuiCountryIsoCode$1.AI]: { mask: `+1(264) ###-####`, name: `Ангилья` },
33
- [TuiCountryIsoCode$1.AL]: { mask: `+355(###) ###-###`, name: `Албания` },
34
- [TuiCountryIsoCode$1.AM]: { mask: `+374##-###-###`, name: `Армения` },
35
- [TuiCountryIsoCode$1.AO]: { mask: `+244(###) ###-###`, name: `Ангола` },
36
- [TuiCountryIsoCode$1.AR]: { mask: `+54(###) ###-####`, name: `Аргентина` },
37
- [TuiCountryIsoCode$1.AT]: { mask: `+43(###) ###-####`, name: `Австрия` },
38
- [TuiCountryIsoCode$1.AU]: { mask: `+61#-####-####`, name: `Австралия` },
39
- [TuiCountryIsoCode$1.AW]: { mask: `+297###-####`, name: `Аруба` },
40
- [TuiCountryIsoCode$1.AZ]: { mask: `+994##-###-##-##`, name: `Азербайджан` },
41
- [TuiCountryIsoCode$1.BA]: { mask: `+387 ###-####-#`, name: `Босния и Герцеговина` },
42
- [TuiCountryIsoCode$1.BB]: { mask: `+1(246) ###-####`, name: `Барбадос` },
43
- [TuiCountryIsoCode$1.BD]: { mask: `+880##-###-###`, name: `Бангладеш` },
44
- [TuiCountryIsoCode$1.BE]: { mask: `+32(###) ###-###`, name: `Бельгия` },
45
- [TuiCountryIsoCode$1.BF]: { mask: `+226##-##-####`, name: `Буркина Фасо` },
46
- [TuiCountryIsoCode$1.BG]: { mask: `+359(###) ###-###`, name: `Болгария` },
47
- [TuiCountryIsoCode$1.BH]: { mask: `+973####-####`, name: `Бахрейн` },
48
- [TuiCountryIsoCode$1.BI]: { mask: `+257##-##-####`, name: `Бурунди` },
49
- [TuiCountryIsoCode$1.BJ]: { mask: `+229##-##-####`, name: `Бенин` },
50
- [TuiCountryIsoCode$1.BL]: { mask: `+590 ## ## ## ## ##`, name: `Сен-Бартельми` },
51
- [TuiCountryIsoCode$1.BM]: { mask: `+1(441) ###-####`, name: `Бермудские острова` },
52
- [TuiCountryIsoCode$1.BN]: { mask: `+673###-####`, name: `Бруней-Даруссалам` },
53
- [TuiCountryIsoCode$1.BO]: { mask: `+591#-###-####`, name: `Боливия` },
54
- [TuiCountryIsoCode$1.BQ]: {
55
- mask: `+599-###-####`,
56
- name: `Бонайре, Синт-Эстатиус и Саба`,
57
- },
58
- [TuiCountryIsoCode$1.BR]: { mask: `+55(##) ####-####`, name: `Бразилия` },
59
- [TuiCountryIsoCode$1.BS]: { mask: `+1(242) ###-####`, name: `Багамские Острова` },
60
- [TuiCountryIsoCode$1.BT]: { mask: `+975#-###-###`, name: `Бутан` },
61
- [TuiCountryIsoCode$1.BW]: { mask: `+267##-###-###`, name: `Ботсвана` },
62
- [TuiCountryIsoCode$1.BY]: { mask: `+375(##) ###-##-##`, name: `Беларусь (Белоруссия)` },
63
- [TuiCountryIsoCode$1.BZ]: { mask: `+501###-####`, name: `Белиз` },
64
- [TuiCountryIsoCode$1.CA]: { mask: `+1(###) ###-####`, name: `Канада` },
65
- [TuiCountryIsoCode$1.CD]: {
66
- mask: `+243(###) ###-###`,
67
- name: `Дем. Респ. Конго (Киншаса)`,
68
- },
69
- [TuiCountryIsoCode$1.CF]: {
70
- mask: `+236-##-##-####`,
71
- name: `Центральноафриканская Республика`,
72
- },
73
- [TuiCountryIsoCode$1.CG]: { mask: `+242##-###-####`, name: `Конго (Браззавиль)` },
74
- [TuiCountryIsoCode$1.CH]: { mask: `+41##-###-####`, name: `Швейцария` },
75
- [TuiCountryIsoCode$1.CI]: { mask: `+225##-###-###`, name: `Кот-д’Ивуар` },
76
- [TuiCountryIsoCode$1.CL]: { mask: `+56#-####-####`, name: `Чили` },
77
- [TuiCountryIsoCode$1.CM]: { mask: `+237####-####`, name: `Камерун` },
78
- [TuiCountryIsoCode$1.CN]: { mask: `+86(###) ####-####`, name: `Китайская Н.Р.` },
79
- [TuiCountryIsoCode$1.CO]: { mask: `+57(###) ###-####`, name: `Колумбия` },
80
- [TuiCountryIsoCode$1.CR]: { mask: `+506####-####`, name: `Коста-Рика` },
81
- [TuiCountryIsoCode$1.CU]: { mask: `+53#-###-####`, name: `Куба` },
82
- [TuiCountryIsoCode$1.CV]: { mask: `+238(###) ##-##`, name: `Кабо-Верде` },
83
- [TuiCountryIsoCode$1.CW]: { mask: `+5999-###-####`, name: `Кюрасао` },
84
- [TuiCountryIsoCode$1.CY]: { mask: `+357##-###-###`, name: `Кипр` },
85
- [TuiCountryIsoCode$1.CZ]: { mask: `+420(###) ###-###`, name: `Чехия` },
86
- [TuiCountryIsoCode$1.DE]: { mask: `+49(###) ###-###-##`, name: `Германия` },
87
- [TuiCountryIsoCode$1.DJ]: { mask: `+253##-##-##-##`, name: `Джибути` },
88
- [TuiCountryIsoCode$1.DK]: { mask: `+45##-##-##-##`, name: `Дания` },
89
- [TuiCountryIsoCode$1.DM]: { mask: `+1(767) ###-####`, name: `Доминика` },
90
- [TuiCountryIsoCode$1.DO]: { mask: `+1(###) ###-####`, name: `Доминиканская Республика` },
91
- [TuiCountryIsoCode$1.DZ]: { mask: `+213##-###-####`, name: `Алжир` },
92
- [TuiCountryIsoCode$1.EC]: { mask: `+593##-###-####`, name: `Эквадор ` },
93
- [TuiCountryIsoCode$1.EE]: { mask: `+372####-####`, name: `Эстония ` },
94
- [TuiCountryIsoCode$1.EG]: { mask: `+20(###) ###-####`, name: `Египет` },
95
- [TuiCountryIsoCode$1.ER]: { mask: `+291#-###-###`, name: `Эритрея` },
96
- [TuiCountryIsoCode$1.ES]: { mask: `+34(###) ###-###`, name: `Испания` },
97
- [TuiCountryIsoCode$1.ET]: { mask: `+251##-###-####`, name: `Эфиопия` },
98
- [TuiCountryIsoCode$1.FI]: { mask: `+358(###) ###-##-##`, name: `Финляндия` },
99
- [TuiCountryIsoCode$1.FJ]: { mask: `+679##-#####`, name: `Фиджи` },
100
- [TuiCountryIsoCode$1.FK]: { mask: `+500#####`, name: `Фолклендские острова` },
101
- [TuiCountryIsoCode$1.FM]: { mask: `+691###-####`, name: `Ф.Ш. Микронезии` },
102
- [TuiCountryIsoCode$1.FR]: { mask: `+33 ## ## ## ## ##`, name: `Франция` },
103
- [TuiCountryIsoCode$1.GA]: { mask: `+241#-##-##-##`, name: `Габон` },
104
- [TuiCountryIsoCode$1.GB]: { mask: `+44##-####-####`, name: `Великобритания` },
105
- [TuiCountryIsoCode$1.GD]: { mask: `+1(473) ###-####`, name: `Гренада` },
106
- [TuiCountryIsoCode$1.GE]: { mask: `+995(###) ###-###`, name: `Грузия` },
107
- [TuiCountryIsoCode$1.GF]: { mask: `+594 ## ## ## ## ##`, name: `Гайана` },
108
- [TuiCountryIsoCode$1.GH]: { mask: `+233(###) ###-###`, name: `Гана` },
109
- [TuiCountryIsoCode$1.GI]: { mask: `+350###-#####`, name: `Гибралтар` },
110
- [TuiCountryIsoCode$1.GL]: { mask: `+299##-##-##`, name: `Гренландия` },
111
- [TuiCountryIsoCode$1.GM]: { mask: `+220(###) ##-##`, name: `Гамбия` },
112
- [TuiCountryIsoCode$1.GN]: { mask: `+224##-###-###`, name: `Гвинея` },
113
- [TuiCountryIsoCode$1.GP]: { mask: `+590 ## ## ## ## ##`, name: `Гваделупа` },
114
- [TuiCountryIsoCode$1.GQ]: { mask: `+240##-###-####`, name: `Экваториальная Гвинея` },
115
- [TuiCountryIsoCode$1.GR]: { mask: `+30(###) ###-####`, name: `Греция` },
116
- [TuiCountryIsoCode$1.GT]: { mask: `+502#-###-####`, name: `Гватемала` },
117
- [TuiCountryIsoCode$1.GW]: { mask: `+245#-######`, name: `Гвинея-Бисау` },
118
- [TuiCountryIsoCode$1.GY]: { mask: `+592###-####`, name: `Гайана` },
119
- [TuiCountryIsoCode$1.HK]: { mask: `+852####-####`, name: `Гонконг` },
120
- [TuiCountryIsoCode$1.HN]: { mask: `+504####-####`, name: `Гондурас` },
121
- [TuiCountryIsoCode$1.HR]: { mask: `+385##-###-###`, name: `Хорватия` },
122
- [TuiCountryIsoCode$1.HT]: { mask: `+509##-##-####`, name: `Гаити` },
123
- [TuiCountryIsoCode$1.HU]: { mask: `+36(###) ###-###`, name: `Венгрия` },
124
- [TuiCountryIsoCode$1.ID]: { mask: `+62(###) ###-##-###`, name: `Индонезия ` },
125
- [TuiCountryIsoCode$1.IE]: { mask: `+353(###) ###-###`, name: `Ирландия` },
126
- [TuiCountryIsoCode$1.IL]: { mask: `+972##-###-####`, name: `Израиль` },
127
- [TuiCountryIsoCode$1.IN]: { mask: `+91(####) ###-###`, name: `Индия` },
128
- [TuiCountryIsoCode$1.IQ]: { mask: `+964(###) ###-####`, name: `Ирак` },
129
- [TuiCountryIsoCode$1.IR]: { mask: `+98(###) ###-####`, name: `Иран` },
130
- [TuiCountryIsoCode$1.IS]: { mask: `+354###-####`, name: `Исландия` },
131
- [TuiCountryIsoCode$1.IT]: { mask: `+39(###) ####-###`, name: `Италия` },
132
- [TuiCountryIsoCode$1.JM]: { mask: `+1(876) ###-####`, name: `Ямайка` },
133
- [TuiCountryIsoCode$1.JO]: { mask: `+962#-####-####`, name: `Иордания` },
134
- [TuiCountryIsoCode$1.JP]: { mask: `+81-##-####-####`, name: `Япония ` },
135
- [TuiCountryIsoCode$1.KE]: { mask: `+254###-######`, name: `Кения` },
136
- [TuiCountryIsoCode$1.KG]: { mask: `+996(###) ###-###`, name: `Киргизия` },
137
- [TuiCountryIsoCode$1.KH]: { mask: `+855##-###-###`, name: `Камбоджа` },
138
- [TuiCountryIsoCode$1.KM]: { mask: `+269##-#####`, name: `Коморы` },
139
- [TuiCountryIsoCode$1.KN]: { mask: `+1(869) ###-####`, name: `Сент-Китс и Невис` },
140
- [TuiCountryIsoCode$1.KP]: { mask: `+850####-#############`, name: `Корейская НДР` },
141
- [TuiCountryIsoCode$1.KR]: { mask: `+82##-###-####`, name: `Респ. Корея` },
142
- [TuiCountryIsoCode$1.KW]: { mask: `+965####-####`, name: `Кувейт` },
143
- [TuiCountryIsoCode$1.KY]: { mask: `+1(345) ###-####`, name: `Каймановы острова` },
144
- [TuiCountryIsoCode$1.KZ]: { mask: `+7(###) ###-##-##`, name: `Казахстан` },
145
- [TuiCountryIsoCode$1.LA]: { mask: `+856##-##-###-###`, name: `Лаос` },
146
- [TuiCountryIsoCode$1.LB]: { mask: `+961##-###-###`, name: `Ливан ` },
147
- [TuiCountryIsoCode$1.LC]: { mask: `+1(758) ###-####`, name: `Сент-Люсия` },
148
- [TuiCountryIsoCode$1.LI]: { mask: `+423(###) ###-####`, name: `Лихтенштейн` },
149
- [TuiCountryIsoCode$1.LK]: { mask: `+94##-###-####`, name: `Шри-Ланка` },
150
- [TuiCountryIsoCode$1.LR]: { mask: `+231##-###-###`, name: `Либерия` },
151
- [TuiCountryIsoCode$1.LS]: { mask: `+266#-###-####`, name: `Лесото` },
152
- [TuiCountryIsoCode$1.LT]: { mask: `+370(###) ##-###`, name: `Литва` },
153
- [TuiCountryIsoCode$1.LU]: { mask: `+352(###) ###-###`, name: `Люксембург` },
154
- [TuiCountryIsoCode$1.LV]: { mask: `+371##-###-###`, name: `Латвия` },
155
- [TuiCountryIsoCode$1.LY]: { mask: `+218##-###-####`, name: `Ливия` },
156
- [TuiCountryIsoCode$1.MA]: { mask: `+212##-####-###`, name: `Марокко` },
157
- [TuiCountryIsoCode$1.MC]: { mask: `+377###-###-###`, name: `Монако` },
158
- [TuiCountryIsoCode$1.MD]: { mask: `+373####-####`, name: `Молдова` },
159
- [TuiCountryIsoCode$1.ME]: { mask: `+382##-###-###`, name: `Черногория` },
160
- [TuiCountryIsoCode$1.MF]: { mask: `+590 ## ## ## ## ##`, name: `Сен-Мартен` },
161
- [TuiCountryIsoCode$1.MG]: { mask: `+261##-##-#####`, name: `Мадагаскар` },
162
- [TuiCountryIsoCode$1.MK]: { mask: `+389##-###-###`, name: `Респ. Македония` },
163
- [TuiCountryIsoCode$1.ML]: { mask: `+223##-##-####`, name: `Мали` },
164
- [TuiCountryIsoCode$1.MM]: { mask: `+95##-###-###`, name: `Бирма (Мьянма)` },
165
- [TuiCountryIsoCode$1.MN]: { mask: `+976##-##-####`, name: `Монголия` },
166
- [TuiCountryIsoCode$1.MO]: { mask: `+853####-####`, name: `Макао` },
167
- [TuiCountryIsoCode$1.MQ]: { mask: `+596 ## ## ## ## ##`, name: `Мартиника` },
168
- [TuiCountryIsoCode$1.MR]: { mask: `+222##-##-####`, name: `Мавритания` },
169
- [TuiCountryIsoCode$1.MS]: { mask: `+1(664) ###-####`, name: `Монтсеррат` },
170
- [TuiCountryIsoCode$1.MT]: { mask: `+356####-####`, name: `Мальта` },
171
- [TuiCountryIsoCode$1.MU]: { mask: `+230###-####`, name: `Маврикий` },
172
- [TuiCountryIsoCode$1.MV]: { mask: `+960###-####`, name: `Мальдивские острова` },
173
- [TuiCountryIsoCode$1.MW]: { mask: `+265#-####-####`, name: `Малави` },
174
- [TuiCountryIsoCode$1.MX]: { mask: `+52(###) ###-####`, name: `Мексика` },
175
- [TuiCountryIsoCode$1.MY]: { mask: `+60(###) ###-###`, name: `Малайзия` },
176
- [TuiCountryIsoCode$1.MZ]: { mask: `+258##-###-###`, name: `Мозамбик` },
177
- [TuiCountryIsoCode$1.NA]: { mask: `+264##-###-####`, name: `Намибия` },
178
- [TuiCountryIsoCode$1.NC]: { mask: `+687 ### ###`, name: `Каледония` },
179
- [TuiCountryIsoCode$1.NE]: { mask: `+227##-##-####`, name: `Нигер` },
180
- [TuiCountryIsoCode$1.NG]: { mask: `+234(###) ###-####`, name: `Нигерия` },
181
- [TuiCountryIsoCode$1.NI]: { mask: `+505####-####`, name: `Никарагуа` },
182
- [TuiCountryIsoCode$1.NL]: { mask: `+31##-###-####`, name: `Нидерланды` },
183
- [TuiCountryIsoCode$1.NO]: { mask: `+47(###) ##-###`, name: `Норвегия` },
184
- [TuiCountryIsoCode$1.NP]: { mask: `+977##-###-###`, name: `Непал` },
185
- [TuiCountryIsoCode$1.NZ]: { mask: `+64(###) ###-####`, name: `Новая Зеландия` },
186
- [TuiCountryIsoCode$1.OM]: { mask: `+968##-###-###`, name: `Оман` },
187
- [TuiCountryIsoCode$1.PA]: { mask: `+507###-####`, name: `Панама` },
188
- [TuiCountryIsoCode$1.PE]: { mask: `+51(###) ###-###`, name: `Перу` },
189
- [TuiCountryIsoCode$1.PF]: {
190
- mask: `+689##-##-##`,
191
- name: `Французская Полинезия (Таити)`,
192
- },
193
- [TuiCountryIsoCode$1.PG]: { mask: `+675(###) ##-###`, name: `Папуа-Новая Гвинея` },
194
- [TuiCountryIsoCode$1.PH]: { mask: `+63(###) ###-####`, name: `Филиппины` },
195
- [TuiCountryIsoCode$1.PK]: { mask: `+92(###) ###-####`, name: `Пакистан` },
196
- [TuiCountryIsoCode$1.PL]: { mask: `+48(###) ###-###`, name: `Польша` },
197
- [TuiCountryIsoCode$1.PT]: { mask: `+351##-###-####`, name: `Португалия` },
198
- [TuiCountryIsoCode$1.PW]: { mask: `+680###-####`, name: `Палау` },
199
- [TuiCountryIsoCode$1.PY]: { mask: `+595(###) ###-###`, name: `Парагвай` },
200
- [TuiCountryIsoCode$1.QA]: { mask: `+974####-####`, name: `Катар` },
201
- [TuiCountryIsoCode$1.RE]: { mask: `+262 ## ## ## ## ##`, name: `Реюньон` },
202
- [TuiCountryIsoCode$1.RO]: { mask: `+40##-###-####`, name: `Румыния` },
203
- [TuiCountryIsoCode$1.RS]: { mask: `+381##-###-####`, name: `Сербия` },
204
- [TuiCountryIsoCode$1.RU]: { mask: `+7### ###-##-##`, name: `Россия` },
205
- [TuiCountryIsoCode$1.RW]: { mask: `+250(###) ###-###`, name: `Руанда` },
206
- [TuiCountryIsoCode$1.SA]: { mask: `+966#-####-####`, name: `Саудовская Аравия ` },
207
- [TuiCountryIsoCode$1.SB]: { mask: `+677###-####`, name: `Соломоновы Острова ` },
208
- [TuiCountryIsoCode$1.SC]: { mask: `+248#-###-###`, name: `Сейшелы` },
209
- [TuiCountryIsoCode$1.SD]: { mask: `+249##-###-####`, name: `Судан` },
210
- [TuiCountryIsoCode$1.SE]: { mask: `+46##-###-####`, name: `Швеция` },
211
- [TuiCountryIsoCode$1.SG]: { mask: `+65####-####`, name: `Сингапур` },
212
- [TuiCountryIsoCode$1.SH]: { mask: `+290####`, name: `Остров Святой Елены` },
213
- [TuiCountryIsoCode$1.SI]: { mask: `+386##-###-###`, name: `Словения` },
214
- [TuiCountryIsoCode$1.SK]: { mask: `+421(###) ###-###`, name: `Словакия` },
215
- [TuiCountryIsoCode$1.SL]: { mask: `+232##-######`, name: `Сьерра-Леоне` },
216
- [TuiCountryIsoCode$1.SM]: { mask: `+378####-######`, name: `Сан-Марино` },
217
- [TuiCountryIsoCode$1.SN]: { mask: `+221##-###-####`, name: `Сенегал` },
218
- [TuiCountryIsoCode$1.SO]: { mask: `+252##-###-###`, name: `Сомали` },
219
- [TuiCountryIsoCode$1.SR]: { mask: `+597###-####`, name: `Суринам ` },
220
- [TuiCountryIsoCode$1.ST]: { mask: `+239##-#####`, name: `Сан-Томе и Принсипи` },
221
- [TuiCountryIsoCode$1.SV]: { mask: `+503##-##-####`, name: `Сальвадор` },
222
- [TuiCountryIsoCode$1.SX]: { mask: `+1(721) ###-####`, name: `Синт-Мартен` },
223
- [TuiCountryIsoCode$1.SY]: {
224
- mask: `+963##-####-###`,
225
- name: `Сирийская арабская республика`,
226
- },
227
- [TuiCountryIsoCode$1.SZ]: { mask: `+268##-##-####`, name: `Свазиленд` },
228
- [TuiCountryIsoCode$1.TC]: { mask: `+1(649) ###-####`, name: `Тёркс и Кайкос` },
229
- [TuiCountryIsoCode$1.TD]: { mask: `+235##-##-##-##`, name: `Чад` },
230
- [TuiCountryIsoCode$1.TG]: { mask: `+228##-###-###`, name: `Того` },
231
- [TuiCountryIsoCode$1.TH]: { mask: `+66##-###-####`, name: `Таиланд ` },
232
- [TuiCountryIsoCode$1.TJ]: { mask: `+992##-###-####`, name: `Таджикистан` },
233
- [TuiCountryIsoCode$1.TL]: { mask: `+670###-#####`, name: `Восточный Тимор` },
234
- [TuiCountryIsoCode$1.TM]: { mask: `+993#-###-####`, name: `Туркменистан` },
235
- [TuiCountryIsoCode$1.TN]: { mask: `+216##-###-###`, name: `Тунис` },
236
- [TuiCountryIsoCode$1.TO]: { mask: `+676#####`, name: `Тонга` },
237
- [TuiCountryIsoCode$1.TR]: { mask: `+90(###) ###-####`, name: `Турция` },
238
- [TuiCountryIsoCode$1.TT]: { mask: `+1(868) ###-####`, name: `Тринидад и Тобаго` },
239
- [TuiCountryIsoCode$1.TW]: { mask: `+886#-####-####`, name: `Тайвань` },
240
- [TuiCountryIsoCode$1.TZ]: { mask: `+255##-###-####`, name: `Танзания` },
241
- [TuiCountryIsoCode$1.UA]: { mask: `+380(##) ###-##-##`, name: `Украина` },
242
- [TuiCountryIsoCode$1.UG]: { mask: `+256(###) ###-###`, name: `Уганда` },
243
- [TuiCountryIsoCode$1.US]: { mask: `+1(###) ###-####`, name: `США` },
244
- [TuiCountryIsoCode$1.UY]: { mask: `+598#-###-##-##`, name: `Уругвай` },
245
- [TuiCountryIsoCode$1.UZ]: { mask: `+998##-###-####`, name: `Узбекистан` },
246
- [TuiCountryIsoCode$1.VC]: { mask: `+1(784) ###-####`, name: `Сент-Винсент и Гренадины` },
247
- [TuiCountryIsoCode$1.VE]: { mask: `+58(###) ###-####`, name: `Венесуэла` },
248
- [TuiCountryIsoCode$1.VG]: {
249
- mask: `+1(284)###-####`,
250
- name: `Британские Виргинские острова`,
251
- },
252
- [TuiCountryIsoCode$1.VN]: { mask: `+84(###) ####-###`, name: `Вьетнам` },
253
- [TuiCountryIsoCode$1.VU]: { mask: `+678##-#####`, name: `Вануату ` },
254
- [TuiCountryIsoCode$1.WS]: { mask: `+685##-####`, name: `Самоа` },
255
- [TuiCountryIsoCode$1.XK]: { mask: `+383##-###-###`, name: `Косово` },
256
- [TuiCountryIsoCode$1.YE]: { mask: `+967###-###-###`, name: `Йемен ` },
257
- [TuiCountryIsoCode$1.YT]: { mask: `+262 ## ## ## ## ##`, name: `Майотта` },
258
- [TuiCountryIsoCode$1.ZA]: { mask: `+27##-###-####`, name: `Южно-Африканская Респ.` },
259
- [TuiCountryIsoCode$1.ZM]: { mask: `+260##-###-####`, name: `Замбия` },
260
- [TuiCountryIsoCode$1.ZW]: { mask: `+263#-######`, name: `Зимбабве` },
261
- };
262
- /**
263
- * @deprecated will be deleted soon
264
- * TODO: remove in 3.0 (in ivy compilation)
265
- */
266
- // eslint-disable-next-line @typescript-eslint/naming-convention
267
- function countriesMasksReducer(acc, [countryIsoCode, { mask }]) {
268
- acc[countryIsoCode] = mask;
269
- return acc;
270
- }
271
- /**
272
- * @deprecated will be deleted soon
273
- * Use token `TUI_COUNTRIES_MASKS`
274
- * TODO: remove in 3.0
275
- */
276
- const COUNTRIES_MASKS = Object.entries(COUNTRIES).reduce(countriesMasksReducer, {});
277
- const MASK_AFTER_CODE_REGEXP = /\([#]+\)|[#\- ]/g;
278
-
279
- /** @deprecated use `import {TuiCountryIsoCode} from '@taiga-ui/i18n'` */
280
- var TuiCountryIsoCode;
281
- (function (TuiCountryIsoCode) {
282
- TuiCountryIsoCode["AD"] = "AD";
283
- TuiCountryIsoCode["AE"] = "AE";
284
- TuiCountryIsoCode["AF"] = "AF";
285
- TuiCountryIsoCode["AG"] = "AG";
286
- TuiCountryIsoCode["AI"] = "AI";
287
- TuiCountryIsoCode["AL"] = "AL";
288
- TuiCountryIsoCode["AM"] = "AM";
289
- TuiCountryIsoCode["AN"] = "AN";
290
- TuiCountryIsoCode["AO"] = "AO";
291
- TuiCountryIsoCode["AR"] = "AR";
292
- TuiCountryIsoCode["AT"] = "AT";
293
- TuiCountryIsoCode["AU"] = "AU";
294
- TuiCountryIsoCode["AW"] = "AW";
295
- TuiCountryIsoCode["AZ"] = "AZ";
296
- TuiCountryIsoCode["BA"] = "BA";
297
- TuiCountryIsoCode["BB"] = "BB";
298
- TuiCountryIsoCode["BD"] = "BD";
299
- TuiCountryIsoCode["BE"] = "BE";
300
- TuiCountryIsoCode["BF"] = "BF";
301
- TuiCountryIsoCode["BG"] = "BG";
302
- TuiCountryIsoCode["BH"] = "BH";
303
- TuiCountryIsoCode["BI"] = "BI";
304
- TuiCountryIsoCode["BJ"] = "BJ";
305
- TuiCountryIsoCode["BM"] = "BM";
306
- TuiCountryIsoCode["BN"] = "BN";
307
- TuiCountryIsoCode["BO"] = "BO";
308
- TuiCountryIsoCode["BR"] = "BR";
309
- TuiCountryIsoCode["BS"] = "BS";
310
- TuiCountryIsoCode["BT"] = "BT";
311
- TuiCountryIsoCode["BW"] = "BW";
312
- TuiCountryIsoCode["BY"] = "BY";
313
- TuiCountryIsoCode["BZ"] = "BZ";
314
- TuiCountryIsoCode["CD"] = "CD";
315
- TuiCountryIsoCode["CF"] = "CF";
316
- TuiCountryIsoCode["CG"] = "CG";
317
- TuiCountryIsoCode["CH"] = "CH";
318
- TuiCountryIsoCode["CI"] = "CI";
319
- TuiCountryIsoCode["CL"] = "CL";
320
- TuiCountryIsoCode["CM"] = "CM";
321
- TuiCountryIsoCode["CN"] = "CN";
322
- TuiCountryIsoCode["CO"] = "CO";
323
- TuiCountryIsoCode["CR"] = "CR";
324
- TuiCountryIsoCode["CU"] = "CU";
325
- TuiCountryIsoCode["CV"] = "CV";
326
- TuiCountryIsoCode["CY"] = "CY";
327
- TuiCountryIsoCode["CZ"] = "CZ";
328
- TuiCountryIsoCode["DE"] = "DE";
329
- TuiCountryIsoCode["DJ"] = "DJ";
330
- TuiCountryIsoCode["DK"] = "DK";
331
- TuiCountryIsoCode["DM"] = "DM";
332
- TuiCountryIsoCode["DO"] = "DO";
333
- TuiCountryIsoCode["DZ"] = "DZ";
334
- TuiCountryIsoCode["EC"] = "EC";
335
- TuiCountryIsoCode["EE"] = "EE";
336
- TuiCountryIsoCode["EG"] = "EG";
337
- TuiCountryIsoCode["ER"] = "ER";
338
- TuiCountryIsoCode["ES"] = "ES";
339
- TuiCountryIsoCode["ET"] = "ET";
340
- TuiCountryIsoCode["FI"] = "FI";
341
- TuiCountryIsoCode["FJ"] = "FJ";
342
- TuiCountryIsoCode["FK"] = "FK";
343
- TuiCountryIsoCode["FM"] = "FM";
344
- TuiCountryIsoCode["FR"] = "FR";
345
- TuiCountryIsoCode["GA"] = "GA";
346
- TuiCountryIsoCode["GB"] = "GB";
347
- TuiCountryIsoCode["GD"] = "GD";
348
- TuiCountryIsoCode["GE"] = "GE";
349
- TuiCountryIsoCode["GH"] = "GH";
350
- TuiCountryIsoCode["GI"] = "GI";
351
- TuiCountryIsoCode["GL"] = "GL";
352
- TuiCountryIsoCode["GM"] = "GM";
353
- TuiCountryIsoCode["GN"] = "GN";
354
- TuiCountryIsoCode["GQ"] = "GQ";
355
- TuiCountryIsoCode["GR"] = "GR";
356
- TuiCountryIsoCode["GT"] = "GT";
357
- TuiCountryIsoCode["GW"] = "GW";
358
- TuiCountryIsoCode["GY"] = "GY";
359
- TuiCountryIsoCode["HK"] = "HK";
360
- TuiCountryIsoCode["HN"] = "HN";
361
- TuiCountryIsoCode["HR"] = "HR";
362
- TuiCountryIsoCode["HT"] = "HT";
363
- TuiCountryIsoCode["HU"] = "HU";
364
- TuiCountryIsoCode["ID"] = "ID";
365
- TuiCountryIsoCode["IE"] = "IE";
366
- TuiCountryIsoCode["IL"] = "IL";
367
- TuiCountryIsoCode["IN"] = "IN";
368
- TuiCountryIsoCode["IQ"] = "IQ";
369
- TuiCountryIsoCode["IR"] = "IR";
370
- TuiCountryIsoCode["IS"] = "IS";
371
- TuiCountryIsoCode["IT"] = "IT";
372
- TuiCountryIsoCode["JM"] = "JM";
373
- TuiCountryIsoCode["JO"] = "JO";
374
- TuiCountryIsoCode["JP"] = "JP";
375
- TuiCountryIsoCode["KE"] = "KE";
376
- TuiCountryIsoCode["KG"] = "KG";
377
- TuiCountryIsoCode["KH"] = "KH";
378
- TuiCountryIsoCode["KM"] = "KM";
379
- TuiCountryIsoCode["KN"] = "KN";
380
- TuiCountryIsoCode["KP"] = "KP";
381
- TuiCountryIsoCode["KR"] = "KR";
382
- TuiCountryIsoCode["KW"] = "KW";
383
- TuiCountryIsoCode["KY"] = "KY";
384
- TuiCountryIsoCode["KZ"] = "KZ";
385
- TuiCountryIsoCode["LA"] = "LA";
386
- TuiCountryIsoCode["LB"] = "LB";
387
- TuiCountryIsoCode["LC"] = "LC";
388
- TuiCountryIsoCode["LI"] = "LI";
389
- TuiCountryIsoCode["LK"] = "LK";
390
- TuiCountryIsoCode["LR"] = "LR";
391
- TuiCountryIsoCode["LS"] = "LS";
392
- TuiCountryIsoCode["LT"] = "LT";
393
- TuiCountryIsoCode["LU"] = "LU";
394
- TuiCountryIsoCode["LV"] = "LV";
395
- TuiCountryIsoCode["LY"] = "LY";
396
- TuiCountryIsoCode["MA"] = "MA";
397
- TuiCountryIsoCode["MC"] = "MC";
398
- TuiCountryIsoCode["MD"] = "MD";
399
- TuiCountryIsoCode["ME"] = "ME";
400
- TuiCountryIsoCode["MG"] = "MG";
401
- TuiCountryIsoCode["MK"] = "MK";
402
- TuiCountryIsoCode["ML"] = "ML";
403
- TuiCountryIsoCode["MM"] = "MM";
404
- TuiCountryIsoCode["MN"] = "MN";
405
- TuiCountryIsoCode["MO"] = "MO";
406
- TuiCountryIsoCode["MR"] = "MR";
407
- TuiCountryIsoCode["MS"] = "MS";
408
- TuiCountryIsoCode["MT"] = "MT";
409
- TuiCountryIsoCode["MU"] = "MU";
410
- TuiCountryIsoCode["MV"] = "MV";
411
- TuiCountryIsoCode["MW"] = "MW";
412
- TuiCountryIsoCode["MX"] = "MX";
413
- TuiCountryIsoCode["MY"] = "MY";
414
- TuiCountryIsoCode["MZ"] = "MZ";
415
- TuiCountryIsoCode["NA"] = "NA";
416
- TuiCountryIsoCode["NE"] = "NE";
417
- TuiCountryIsoCode["NG"] = "NG";
418
- TuiCountryIsoCode["NI"] = "NI";
419
- TuiCountryIsoCode["NL"] = "NL";
420
- TuiCountryIsoCode["NO"] = "NO";
421
- TuiCountryIsoCode["NP"] = "NP";
422
- TuiCountryIsoCode["NZ"] = "NZ";
423
- TuiCountryIsoCode["OM"] = "OM";
424
- TuiCountryIsoCode["PA"] = "PA";
425
- TuiCountryIsoCode["PE"] = "PE";
426
- TuiCountryIsoCode["PF"] = "PF";
427
- TuiCountryIsoCode["PG"] = "PG";
428
- TuiCountryIsoCode["PH"] = "PH";
429
- TuiCountryIsoCode["PK"] = "PK";
430
- TuiCountryIsoCode["PL"] = "PL";
431
- TuiCountryIsoCode["PT"] = "PT";
432
- TuiCountryIsoCode["PW"] = "PW";
433
- TuiCountryIsoCode["PY"] = "PY";
434
- TuiCountryIsoCode["QA"] = "QA";
435
- TuiCountryIsoCode["RO"] = "RO";
436
- TuiCountryIsoCode["RS"] = "RS";
437
- TuiCountryIsoCode["RU"] = "RU";
438
- TuiCountryIsoCode["RW"] = "RW";
439
- TuiCountryIsoCode["SA"] = "SA";
440
- TuiCountryIsoCode["SB"] = "SB";
441
- TuiCountryIsoCode["SC"] = "SC";
442
- TuiCountryIsoCode["SD"] = "SD";
443
- TuiCountryIsoCode["SE"] = "SE";
444
- TuiCountryIsoCode["SG"] = "SG";
445
- TuiCountryIsoCode["SH"] = "SH";
446
- TuiCountryIsoCode["SI"] = "SI";
447
- TuiCountryIsoCode["SK"] = "SK";
448
- TuiCountryIsoCode["SL"] = "SL";
449
- TuiCountryIsoCode["SM"] = "SM";
450
- TuiCountryIsoCode["SN"] = "SN";
451
- TuiCountryIsoCode["SO"] = "SO";
452
- TuiCountryIsoCode["SR"] = "SR";
453
- TuiCountryIsoCode["ST"] = "ST";
454
- TuiCountryIsoCode["SV"] = "SV";
455
- TuiCountryIsoCode["SY"] = "SY";
456
- TuiCountryIsoCode["SZ"] = "SZ";
457
- TuiCountryIsoCode["TC"] = "TC";
458
- TuiCountryIsoCode["TD"] = "TD";
459
- TuiCountryIsoCode["TG"] = "TG";
460
- TuiCountryIsoCode["TH"] = "TH";
461
- TuiCountryIsoCode["TJ"] = "TJ";
462
- TuiCountryIsoCode["TL"] = "TL";
463
- TuiCountryIsoCode["TM"] = "TM";
464
- TuiCountryIsoCode["TN"] = "TN";
465
- TuiCountryIsoCode["TO"] = "TO";
466
- TuiCountryIsoCode["TR"] = "TR";
467
- TuiCountryIsoCode["TT"] = "TT";
468
- TuiCountryIsoCode["TW"] = "TW";
469
- TuiCountryIsoCode["TZ"] = "TZ";
470
- TuiCountryIsoCode["UA"] = "UA";
471
- TuiCountryIsoCode["UG"] = "UG";
472
- TuiCountryIsoCode["UY"] = "UY";
473
- TuiCountryIsoCode["UZ"] = "UZ";
474
- TuiCountryIsoCode["VC"] = "VC";
475
- TuiCountryIsoCode["VE"] = "VE";
476
- TuiCountryIsoCode["VG"] = "VG";
477
- TuiCountryIsoCode["VN"] = "VN";
478
- TuiCountryIsoCode["VU"] = "VU";
479
- TuiCountryIsoCode["WS"] = "WS";
480
- TuiCountryIsoCode["YE"] = "YE";
481
- TuiCountryIsoCode["ZA"] = "ZA";
482
- TuiCountryIsoCode["ZM"] = "ZM";
483
- TuiCountryIsoCode["ZW"] = "ZW";
484
- TuiCountryIsoCode["US"] = "US";
485
- TuiCountryIsoCode["CA"] = "CA";
486
- })(TuiCountryIsoCode || (TuiCountryIsoCode = {}));
487
-
488
17
  const TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS = {
489
18
  countries: [],
490
- countryIsoCode: TuiCountryIsoCode$1.RU,
19
+ countryIsoCode: TuiCountryIsoCode.RU,
491
20
  };
492
21
  const TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS = new InjectionToken(`Default parameters for input phone international component`, {
493
22
  factory: () => TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS,
@@ -497,10 +26,6 @@ const tuiInputPhoneInternationalOptionsProvider = (options) => ({
497
26
  useValue: Object.assign(Object.assign({}, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS), options),
498
27
  });
499
28
 
500
- const TUI_COUNTRIES_MASKS = new InjectionToken(`Countries masks`, {
501
- factory: () => COUNTRIES_MASKS,
502
- });
503
-
504
29
  /**
505
30
  * @deprecated: use {@link tuiExtractValueFromEvent} instead
506
31
  */
@@ -517,18 +42,19 @@ const tuiExtractValueFromEvent = extractValueFromEvent;
517
42
  var TuiInputPhoneInternationalComponent_1;
518
43
  // @dynamic
519
44
  let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1 = class TuiInputPhoneInternationalComponent extends AbstractTuiControl {
520
- constructor(control, changeDetectorRef, countriesNames$, countriesMasks, options, flagPipe) {
45
+ constructor(control, changeDetectorRef, countriesNames$, countriesMasks, options, flagPipe, extractCountryCodePipe) {
521
46
  super(control, changeDetectorRef);
522
47
  this.countriesNames$ = countriesNames$;
523
48
  this.countriesMasks = countriesMasks;
524
49
  this.options = options;
525
50
  this.flagPipe = flagPipe;
51
+ this.extractCountryCodePipe = extractCountryCodePipe;
526
52
  this.countries = this.options.countries;
527
53
  this.countryIsoCodeChange = new EventEmitter();
528
54
  this.countryIsoCode = this.options.countryIsoCode;
529
55
  this.open = false;
530
56
  this.arrow = TUI_ARROW;
531
- this.isoToCountryCodeMapper = item => this.isoToCountryCode(item);
57
+ this.isoToCountryCodeMapper = item => tuiIsoToCountryCode(this.countriesMasks, item);
532
58
  }
533
59
  set isoCode(code) {
534
60
  var _a;
@@ -545,10 +71,10 @@ let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1
545
71
  (!!this.inputPhoneComponent && this.inputPhoneComponent.focused));
546
72
  }
547
73
  get inputPhoneCountryCode() {
548
- return this.isoToCountryCode(this.countryIsoCode);
74
+ return tuiIsoToCountryCode(this.countriesMasks, this.countryIsoCode);
549
75
  }
550
76
  get phoneMaskAfterCountryCode() {
551
- const countryCode = this.isoToCountryCode(this.countryIsoCode);
77
+ const countryCode = this.inputPhoneCountryCode;
552
78
  return this.calculateMaskAfterCountryCode(this.countriesMasks[this.countryIsoCode], countryCode);
553
79
  }
554
80
  /**
@@ -559,15 +85,15 @@ let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1
559
85
  return this.getFlagPath(this.countryIsoCode);
560
86
  }
561
87
  onPaste(event) {
562
- let value = extractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, '');
563
- const countryIsoCode = this.extractCountryCode(value);
88
+ let value = tuiExtractValueFromEvent(event).replace(TUI_NON_DIGITS_REGEXP, '');
89
+ const countryIsoCode = this.extractCountryCodePipe.transform(value, this.countries);
564
90
  if (!countryIsoCode) {
565
91
  this.updateValue(`${this.inputPhoneCountryCode}${value}`
566
92
  .replace(TUI_MASK_SYMBOLS_REGEXP, '')
567
- .slice(0, this.getMaxAllowedLength(this.countryIsoCode)));
93
+ .slice(0, tuiGetMaxAllowedPhoneLength(this.countriesMasks, this.countryIsoCode)));
568
94
  return;
569
95
  }
570
- if (countryIsoCode === TuiCountryIsoCode$1.RU) {
96
+ if (countryIsoCode === TuiCountryIsoCode.RU) {
571
97
  value = value.replace(/^8/, '7');
572
98
  }
573
99
  this.updateCountryIsoCode(countryIsoCode);
@@ -585,7 +111,7 @@ let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1
585
111
  this.updateCountryIsoCode(isoCode);
586
112
  // recalculates mask inside inputPhone to prevent isoCode conflict
587
113
  this.changeDetectorRef.detectChanges();
588
- const maxLength = this.getMaxAllowedLength(isoCode);
114
+ const maxLength = tuiGetMaxAllowedPhoneLength(this.countriesMasks, isoCode);
589
115
  if (this.value.length > maxLength) {
590
116
  this.updateValue(this.value.slice(0, maxLength));
591
117
  }
@@ -597,8 +123,12 @@ let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1
597
123
  super.setDisabledState();
598
124
  this.close();
599
125
  }
126
+ /**
127
+ * @deprecated use `{{ countryIsoCode | tuiIsoToCountryCode }}`
128
+ * TODO drop in v4.0
129
+ */
600
130
  isoToCountryCode(isoCode) {
601
- return this.countriesMasks[isoCode].replace(MASK_AFTER_CODE_REGEXP, '');
131
+ return tuiIsoToCountryCode(this.countriesMasks, isoCode);
602
132
  }
603
133
  onModelChange(value) {
604
134
  this.updateValue(value);
@@ -615,24 +145,10 @@ let TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1
615
145
  close() {
616
146
  this.open = false;
617
147
  }
618
- getMaxAllowedLength(isoCode) {
619
- return this.countriesMasks[isoCode].replace(/[()\- ]/g, '').length;
620
- }
621
148
  updateCountryIsoCode(code) {
622
149
  this.countryIsoCode = code;
623
150
  this.countryIsoCodeChange.emit(code);
624
151
  }
625
- extractCountryCode(value) {
626
- return this.countries.find(countryIsoCode => {
627
- const ruCodeTest = countryIsoCode === TuiCountryIsoCode$1.RU &&
628
- /^[7 | 8]/.test(value) &&
629
- /^(?!880[1-9 ])/.test(value) &&
630
- value.length + 1 === this.getMaxAllowedLength(TuiCountryIsoCode$1.RU);
631
- return (ruCodeTest ||
632
- (value.startsWith(this.isoToCountryCode(countryIsoCode).replace(CHAR_PLUS, '')) &&
633
- value.length + 1 === this.getMaxAllowedLength(countryIsoCode)));
634
- });
635
- }
636
152
  };
637
153
  TuiInputPhoneInternationalComponent.ctorParameters = () => [
638
154
  { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] },
@@ -640,7 +156,8 @@ TuiInputPhoneInternationalComponent.ctorParameters = () => [
640
156
  { type: Observable, decorators: [{ type: Inject, args: [TUI_COUNTRIES,] }] },
641
157
  { type: undefined, decorators: [{ type: Inject, args: [TUI_COUNTRIES_MASKS,] }] },
642
158
  { type: undefined, decorators: [{ type: Inject, args: [TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS,] }] },
643
- { type: TuiFlagPipe, decorators: [{ type: Inject, args: [TuiFlagPipe,] }] }
159
+ { type: TuiFlagPipe, decorators: [{ type: Inject, args: [TuiFlagPipe,] }] },
160
+ { type: TuiToCountryCodePipe, decorators: [{ type: Inject, args: [TuiToCountryCodePipe,] }] }
644
161
  ];
645
162
  __decorate([
646
163
  ViewChild(TuiInputPhoneComponent)
@@ -678,6 +195,7 @@ TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1 = __
678
195
  FIXED_DROPDOWN_CONTROLLER_PROVIDER,
679
196
  // TODO: for backward compatibility only. Drop in v4.0
680
197
  TuiFlagPipe,
198
+ TuiToCountryCodePipe,
681
199
  ],
682
200
  styles: [":host{display:block}:host._disabled{pointer-events:none}.t-hosted-dropdown{display:block}.t-country-select{width:5.625rem}.t-country-select:not(._readonly) ::ng-deep input:not(:disabled){cursor:pointer}.t-country-select._readonly ::ng-deep input{cursor:default}.t-arrow-icon{transition-duration:var(--tui-duration,300ms);transition-timing-function:ease-in-out;display:flex;width:1.5rem;height:1.5rem;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.t-arrow-icon:hover{color:var(--tui-text-02)}:host._disabled .t-arrow-icon,:host._readonly .t-arrow-icon{pointer-events:none}:host[data-mode=onDark] .t-arrow-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .t-arrow-icon:hover{color:var(--tui-text-01-night)}.t-arrow-icon_open{transform:rotate(180deg)}.t-input-phone{flex:1}.t-flag{width:1.75rem;height:1.25rem;margin-left:-.5rem}.t-country-item-flag{width:1.75rem;height:1.25rem}.t-country-item-name{margin-left:.75rem;margin-right:auto}.t-country-item-code{color:var(--tui-text-02);margin-right:.25rem}"]
683
201
  }),
@@ -688,7 +206,8 @@ TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1 = __
688
206
  __param(2, Inject(TUI_COUNTRIES)),
689
207
  __param(3, Inject(TUI_COUNTRIES_MASKS)),
690
208
  __param(4, Inject(TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS)),
691
- __param(5, Inject(TuiFlagPipe))
209
+ __param(5, Inject(TuiFlagPipe)),
210
+ __param(6, Inject(TuiToCountryCodePipe))
692
211
  ], TuiInputPhoneInternationalComponent);
693
212
 
694
213
  let TuiInputPhoneInternationalModule = class TuiInputPhoneInternationalModule {
@@ -721,5 +240,5 @@ TuiInputPhoneInternationalModule = __decorate([
721
240
  * Generated bundle index. Do not edit.
722
241
  */
723
242
 
724
- export { COUNTRIES, COUNTRIES_MASKS, MASK_AFTER_CODE_REGEXP, TUI_COUNTRIES_MASKS, TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiCountryIsoCode, TuiInputPhoneInternationalComponent, TuiInputPhoneInternationalModule, countriesMasksReducer, extractValueFromEvent, tuiExtractValueFromEvent, tuiInputPhoneInternationalOptionsProvider };
243
+ export { TUI_INPUT_PHONE_INTERNATIONAL_DEFAULT_OPTIONS, TUI_INPUT_PHONE_INTERNATIONAL_OPTIONS, TuiInputPhoneInternationalComponent, TuiInputPhoneInternationalModule, extractValueFromEvent, tuiExtractValueFromEvent, tuiInputPhoneInternationalOptionsProvider };
725
244
  //# sourceMappingURL=taiga-ui-kit-components-input-phone-international.js.map