UNPKG

@taiga-ui/kit

Version:
618 lines (611 loc) 36.7 kB
import { __extends, __decorate, __param } from 'tslib'; import { Optional, Self, Inject, ChangeDetectorRef, Input, ViewChild, Component, ChangeDetectionStrategy, forwardRef, NgModule } from '@angular/core'; import { NgControl, ReactiveFormsModule } from '@angular/forms'; import { setNativeFocused, tuiDefaultProp, tuiPure, TUI_FOCUSABLE_ITEM_ACCESSOR, AbstractTuiControl } from '@taiga-ui/cdk'; import { TUI_DIGIT_REGEXP, TUI_ICONS_PATH, TuiPrimitiveTextfieldComponent, TuiSvgModule, TuiGroupModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiHostedDropdownModule, TuiDataListModule } from '@taiga-ui/core'; import { TUI_ARROW, TuiArrowModule } from '@taiga-ui/kit/components/arrow'; import { TuiInputPhoneComponent, TuiInputPhoneModule } from '@taiga-ui/kit/components/input-phone'; import { FIXED_DROPDOWN_CONTROLLER_PROVIDER } from '@taiga-ui/kit/providers'; import { CommonModule } from '@angular/common'; import { PolymorpheusModule } from '@tinkoff/ng-polymorpheus'; var TuiCountryIsoCode; (function (TuiCountryIsoCode) { TuiCountryIsoCode["AD"] = "AD"; TuiCountryIsoCode["AE"] = "AE"; TuiCountryIsoCode["AF"] = "AF"; TuiCountryIsoCode["AG"] = "AG"; TuiCountryIsoCode["AI"] = "AI"; TuiCountryIsoCode["AL"] = "AL"; TuiCountryIsoCode["AM"] = "AM"; TuiCountryIsoCode["AN"] = "AN"; TuiCountryIsoCode["AO"] = "AO"; TuiCountryIsoCode["AR"] = "AR"; TuiCountryIsoCode["AT"] = "AT"; TuiCountryIsoCode["AU"] = "AU"; TuiCountryIsoCode["AW"] = "AW"; TuiCountryIsoCode["AZ"] = "AZ"; TuiCountryIsoCode["BA"] = "BA"; TuiCountryIsoCode["BB"] = "BB"; TuiCountryIsoCode["BD"] = "BD"; TuiCountryIsoCode["BE"] = "BE"; TuiCountryIsoCode["BF"] = "BF"; TuiCountryIsoCode["BG"] = "BG"; TuiCountryIsoCode["BH"] = "BH"; TuiCountryIsoCode["BI"] = "BI"; TuiCountryIsoCode["BJ"] = "BJ"; TuiCountryIsoCode["BM"] = "BM"; TuiCountryIsoCode["BN"] = "BN"; TuiCountryIsoCode["BO"] = "BO"; TuiCountryIsoCode["BR"] = "BR"; TuiCountryIsoCode["BS"] = "BS"; TuiCountryIsoCode["BT"] = "BT"; TuiCountryIsoCode["BW"] = "BW"; TuiCountryIsoCode["BY"] = "BY"; TuiCountryIsoCode["BZ"] = "BZ"; TuiCountryIsoCode["CD"] = "CD"; TuiCountryIsoCode["CF"] = "CF"; TuiCountryIsoCode["CG"] = "CG"; TuiCountryIsoCode["CH"] = "CH"; TuiCountryIsoCode["CI"] = "CI"; TuiCountryIsoCode["CL"] = "CL"; TuiCountryIsoCode["CM"] = "CM"; TuiCountryIsoCode["CN"] = "CN"; TuiCountryIsoCode["CO"] = "CO"; TuiCountryIsoCode["CR"] = "CR"; TuiCountryIsoCode["CU"] = "CU"; TuiCountryIsoCode["CV"] = "CV"; TuiCountryIsoCode["CY"] = "CY"; TuiCountryIsoCode["CZ"] = "CZ"; TuiCountryIsoCode["DE"] = "DE"; TuiCountryIsoCode["DJ"] = "DJ"; TuiCountryIsoCode["DK"] = "DK"; TuiCountryIsoCode["DM"] = "DM"; TuiCountryIsoCode["DO"] = "DO"; TuiCountryIsoCode["DZ"] = "DZ"; TuiCountryIsoCode["EC"] = "EC"; TuiCountryIsoCode["EE"] = "EE"; TuiCountryIsoCode["EG"] = "EG"; TuiCountryIsoCode["ER"] = "ER"; TuiCountryIsoCode["ES"] = "ES"; TuiCountryIsoCode["ET"] = "ET"; TuiCountryIsoCode["FI"] = "FI"; TuiCountryIsoCode["FJ"] = "FJ"; TuiCountryIsoCode["FK"] = "FK"; TuiCountryIsoCode["FM"] = "FM"; TuiCountryIsoCode["FR"] = "FR"; TuiCountryIsoCode["GA"] = "GA"; TuiCountryIsoCode["GD"] = "GD"; TuiCountryIsoCode["GE"] = "GE"; TuiCountryIsoCode["GH"] = "GH"; TuiCountryIsoCode["GI"] = "GI"; TuiCountryIsoCode["GL"] = "GL"; TuiCountryIsoCode["GM"] = "GM"; TuiCountryIsoCode["GN"] = "GN"; TuiCountryIsoCode["GQ"] = "GQ"; TuiCountryIsoCode["GR"] = "GR"; TuiCountryIsoCode["GT"] = "GT"; TuiCountryIsoCode["GW"] = "GW"; TuiCountryIsoCode["GY"] = "GY"; TuiCountryIsoCode["HK"] = "HK"; TuiCountryIsoCode["HN"] = "HN"; TuiCountryIsoCode["HR"] = "HR"; TuiCountryIsoCode["HT"] = "HT"; TuiCountryIsoCode["HU"] = "HU"; TuiCountryIsoCode["ID"] = "ID"; TuiCountryIsoCode["IE"] = "IE"; TuiCountryIsoCode["IL"] = "IL"; TuiCountryIsoCode["IN"] = "IN"; TuiCountryIsoCode["IQ"] = "IQ"; TuiCountryIsoCode["IR"] = "IR"; TuiCountryIsoCode["IS"] = "IS"; TuiCountryIsoCode["IT"] = "IT"; TuiCountryIsoCode["JM"] = "JM"; TuiCountryIsoCode["JO"] = "JO"; TuiCountryIsoCode["JP"] = "JP"; TuiCountryIsoCode["KE"] = "KE"; TuiCountryIsoCode["KG"] = "KG"; TuiCountryIsoCode["KH"] = "KH"; TuiCountryIsoCode["KM"] = "KM"; TuiCountryIsoCode["KN"] = "KN"; TuiCountryIsoCode["KP"] = "KP"; TuiCountryIsoCode["KR"] = "KR"; TuiCountryIsoCode["KW"] = "KW"; TuiCountryIsoCode["KY"] = "KY"; TuiCountryIsoCode["KZ"] = "KZ"; TuiCountryIsoCode["LA"] = "LA"; TuiCountryIsoCode["LB"] = "LB"; TuiCountryIsoCode["LC"] = "LC"; TuiCountryIsoCode["LI"] = "LI"; TuiCountryIsoCode["LK"] = "LK"; TuiCountryIsoCode["LR"] = "LR"; TuiCountryIsoCode["LS"] = "LS"; TuiCountryIsoCode["LT"] = "LT"; TuiCountryIsoCode["LU"] = "LU"; TuiCountryIsoCode["LV"] = "LV"; TuiCountryIsoCode["LY"] = "LY"; TuiCountryIsoCode["MA"] = "MA"; TuiCountryIsoCode["MC"] = "MC"; TuiCountryIsoCode["MD"] = "MD"; TuiCountryIsoCode["ME"] = "ME"; TuiCountryIsoCode["MG"] = "MG"; TuiCountryIsoCode["MK"] = "MK"; TuiCountryIsoCode["ML"] = "ML"; TuiCountryIsoCode["MM"] = "MM"; TuiCountryIsoCode["MN"] = "MN"; TuiCountryIsoCode["MO"] = "MO"; TuiCountryIsoCode["MR"] = "MR"; TuiCountryIsoCode["MS"] = "MS"; TuiCountryIsoCode["MT"] = "MT"; TuiCountryIsoCode["MU"] = "MU"; TuiCountryIsoCode["MV"] = "MV"; TuiCountryIsoCode["MW"] = "MW"; TuiCountryIsoCode["MX"] = "MX"; TuiCountryIsoCode["MY"] = "MY"; TuiCountryIsoCode["MZ"] = "MZ"; TuiCountryIsoCode["NA"] = "NA"; TuiCountryIsoCode["NE"] = "NE"; TuiCountryIsoCode["NG"] = "NG"; TuiCountryIsoCode["NI"] = "NI"; TuiCountryIsoCode["NL"] = "NL"; TuiCountryIsoCode["NO"] = "NO"; TuiCountryIsoCode["NP"] = "NP"; TuiCountryIsoCode["NZ"] = "NZ"; TuiCountryIsoCode["OM"] = "OM"; TuiCountryIsoCode["PA"] = "PA"; TuiCountryIsoCode["PE"] = "PE"; TuiCountryIsoCode["PF"] = "PF"; TuiCountryIsoCode["PG"] = "PG"; TuiCountryIsoCode["PH"] = "PH"; TuiCountryIsoCode["PK"] = "PK"; TuiCountryIsoCode["PL"] = "PL"; TuiCountryIsoCode["PT"] = "PT"; TuiCountryIsoCode["PW"] = "PW"; TuiCountryIsoCode["PY"] = "PY"; TuiCountryIsoCode["QA"] = "QA"; TuiCountryIsoCode["RO"] = "RO"; TuiCountryIsoCode["RS"] = "RS"; TuiCountryIsoCode["RU"] = "RU"; TuiCountryIsoCode["RW"] = "RW"; TuiCountryIsoCode["SA"] = "SA"; TuiCountryIsoCode["SB"] = "SB"; TuiCountryIsoCode["SC"] = "SC"; TuiCountryIsoCode["SD"] = "SD"; TuiCountryIsoCode["SE"] = "SE"; TuiCountryIsoCode["SG"] = "SG"; TuiCountryIsoCode["SH"] = "SH"; TuiCountryIsoCode["SI"] = "SI"; TuiCountryIsoCode["SK"] = "SK"; TuiCountryIsoCode["SL"] = "SL"; TuiCountryIsoCode["SM"] = "SM"; TuiCountryIsoCode["SN"] = "SN"; TuiCountryIsoCode["SO"] = "SO"; TuiCountryIsoCode["SR"] = "SR"; TuiCountryIsoCode["ST"] = "ST"; TuiCountryIsoCode["SV"] = "SV"; TuiCountryIsoCode["SY"] = "SY"; TuiCountryIsoCode["SZ"] = "SZ"; TuiCountryIsoCode["TC"] = "TC"; TuiCountryIsoCode["TD"] = "TD"; TuiCountryIsoCode["TG"] = "TG"; TuiCountryIsoCode["TH"] = "TH"; TuiCountryIsoCode["TJ"] = "TJ"; TuiCountryIsoCode["TL"] = "TL"; TuiCountryIsoCode["TM"] = "TM"; TuiCountryIsoCode["TN"] = "TN"; TuiCountryIsoCode["TO"] = "TO"; TuiCountryIsoCode["TR"] = "TR"; TuiCountryIsoCode["TT"] = "TT"; TuiCountryIsoCode["TW"] = "TW"; TuiCountryIsoCode["TZ"] = "TZ"; TuiCountryIsoCode["UA"] = "UA"; TuiCountryIsoCode["UG"] = "UG"; TuiCountryIsoCode["UK"] = "UK"; TuiCountryIsoCode["UY"] = "UY"; TuiCountryIsoCode["UZ"] = "UZ"; TuiCountryIsoCode["VC"] = "VC"; TuiCountryIsoCode["VE"] = "VE"; TuiCountryIsoCode["VG"] = "VG"; TuiCountryIsoCode["VN"] = "VN"; TuiCountryIsoCode["VU"] = "VU"; TuiCountryIsoCode["WS"] = "WS"; TuiCountryIsoCode["YE"] = "YE"; TuiCountryIsoCode["ZA"] = "ZA"; TuiCountryIsoCode["ZM"] = "ZM"; TuiCountryIsoCode["ZW"] = "ZW"; TuiCountryIsoCode["US"] = "US"; TuiCountryIsoCode["CA"] = "CA"; })(TuiCountryIsoCode || (TuiCountryIsoCode = {})); var _a; // TODO: i18n var COUNTRIES = (_a = {}, _a[TuiCountryIsoCode.AD] = { mask: '+376###-###', name: 'Андорра' }, _a[TuiCountryIsoCode.AE] = { mask: '+971-#-###-####', name: 'Объединенные Арабские Эмираты', }, _a[TuiCountryIsoCode.AF] = { mask: '+93##-###-####', name: 'Афганистан' }, _a[TuiCountryIsoCode.AG] = { mask: '+1(268) ###-####', name: 'Антигуа и Барбуда' }, _a[TuiCountryIsoCode.AI] = { mask: '+1(264) ###-####', name: 'Ангилья' }, _a[TuiCountryIsoCode.AL] = { mask: '+355(###) ###-###', name: 'Албания' }, _a[TuiCountryIsoCode.AM] = { mask: '+374##-###-###', name: 'Армения' }, _a[TuiCountryIsoCode.AN] = { mask: '+599-###-####', name: 'Нидерландские Антильские острова', }, _a[TuiCountryIsoCode.AO] = { mask: '+244(###) ###-###', name: 'Ангола' }, _a[TuiCountryIsoCode.AR] = { mask: '+54(###) ###-####', name: 'Аргентина' }, _a[TuiCountryIsoCode.AT] = { mask: '+43(###) ###-####', name: 'Австрия' }, _a[TuiCountryIsoCode.AU] = { mask: '+61#-####-####', name: 'Австралия' }, _a[TuiCountryIsoCode.AW] = { mask: '+297###-####', name: 'Аруба' }, _a[TuiCountryIsoCode.AZ] = { mask: '+994##-###-##-##', name: 'Азербайджан' }, _a[TuiCountryIsoCode.BA] = { mask: '+387##-#####', name: 'Босния и Герцеговина' }, _a[TuiCountryIsoCode.BB] = { mask: '+1(246) ###-####', name: 'Барбадос' }, _a[TuiCountryIsoCode.BD] = { mask: '+880##-###-###', name: 'Бангладеш' }, _a[TuiCountryIsoCode.BE] = { mask: '+32(###) ###-###', name: 'Бельгия' }, _a[TuiCountryIsoCode.BF] = { mask: '+226##-##-####', name: 'Буркина Фасо' }, _a[TuiCountryIsoCode.BG] = { mask: '+359(###) ###-###', name: 'Болгария' }, _a[TuiCountryIsoCode.BH] = { mask: '+973####-####', name: 'Бахрейн' }, _a[TuiCountryIsoCode.BI] = { mask: '+257##-##-####', name: 'Бурунди' }, _a[TuiCountryIsoCode.BJ] = { mask: '+229##-##-####', name: 'Бенин' }, _a[TuiCountryIsoCode.BM] = { mask: '+1(441) ###-####', name: 'Бермудские острова' }, _a[TuiCountryIsoCode.BN] = { mask: '+673###-####', name: 'Бруней-Даруссалам' }, _a[TuiCountryIsoCode.BO] = { mask: '+591#-###-####', name: 'Боливия' }, _a[TuiCountryIsoCode.BR] = { mask: '+55(##) ####-####', name: 'Бразилия' }, _a[TuiCountryIsoCode.BS] = { mask: '+1(242) ###-####', name: 'Багамские Острова' }, _a[TuiCountryIsoCode.BT] = { mask: '+975#-###-###', name: 'Бутан' }, _a[TuiCountryIsoCode.BW] = { mask: '+267##-###-###', name: 'Ботсвана' }, _a[TuiCountryIsoCode.BY] = { mask: '+375(##) ###-##-##', name: 'Беларусь (Белоруссия)' }, _a[TuiCountryIsoCode.BZ] = { mask: '+501###-####', name: 'Белиз' }, _a[TuiCountryIsoCode.CA] = { mask: '+1(###) ###-####', name: 'Канада' }, _a[TuiCountryIsoCode.CD] = { mask: '+243(###) ###-###', name: 'Дем. Респ. Конго (Киншаса)', }, _a[TuiCountryIsoCode.CF] = { mask: '+236-##-##-####', name: 'Центральноафриканская Республика', }, _a[TuiCountryIsoCode.CG] = { mask: '+242##-###-####', name: 'Конго (Браззавиль)' }, _a[TuiCountryIsoCode.CH] = { mask: '+41##-###-####', name: 'Швейцария' }, _a[TuiCountryIsoCode.CI] = { mask: '+225##-###-###', name: 'Кот-д’Ивуар' }, _a[TuiCountryIsoCode.CL] = { mask: '+56#-####-####', name: 'Чили' }, _a[TuiCountryIsoCode.CM] = { mask: '+237####-####', name: 'Камерун' }, _a[TuiCountryIsoCode.CN] = { mask: '+86(###) ####-####', name: 'Китайская Н.Р.' }, _a[TuiCountryIsoCode.CO] = { mask: '+57(###) ###-####', name: 'Колумбия' }, _a[TuiCountryIsoCode.CR] = { mask: '+506####-####', name: 'Коста-Рика' }, _a[TuiCountryIsoCode.CU] = { mask: '+53#-###-####', name: 'Куба' }, _a[TuiCountryIsoCode.CV] = { mask: '+238(###) ##-##', name: 'Кабо-Верде' }, _a[TuiCountryIsoCode.CY] = { mask: '+357##-###-###', name: 'Кипр' }, _a[TuiCountryIsoCode.CZ] = { mask: '+420(###) ###-###', name: 'Чехия' }, _a[TuiCountryIsoCode.DE] = { mask: '+49(###) ###-###-##', name: 'Германия' }, _a[TuiCountryIsoCode.DJ] = { mask: '+253##-##-##-##', name: 'Джибути' }, _a[TuiCountryIsoCode.DK] = { mask: '+45##-##-##-##', name: 'Дания' }, _a[TuiCountryIsoCode.DM] = { mask: '+1(767) ###-####', name: 'Доминика' }, _a[TuiCountryIsoCode.DO] = { mask: '+1(###) ###-####', name: 'Доминиканская Республика' }, _a[TuiCountryIsoCode.DZ] = { mask: '+213##-###-####', name: 'Алжир' }, _a[TuiCountryIsoCode.EC] = { mask: '+593##-###-####', name: 'Эквадор ' }, _a[TuiCountryIsoCode.EE] = { mask: '+372####-####', name: 'Эстония ' }, _a[TuiCountryIsoCode.EG] = { mask: '+20(###) ###-####', name: 'Египет' }, _a[TuiCountryIsoCode.ER] = { mask: '+291#-###-###', name: 'Эритрея' }, _a[TuiCountryIsoCode.ES] = { mask: '+34(###) ###-###', name: 'Испания' }, _a[TuiCountryIsoCode.ET] = { mask: '+251##-###-####', name: 'Эфиопия' }, _a[TuiCountryIsoCode.FI] = { mask: '+358(###) ###-##-##', name: 'Финляндия' }, _a[TuiCountryIsoCode.FJ] = { mask: '+679##-#####', name: 'Фиджи' }, _a[TuiCountryIsoCode.FK] = { mask: '+500#####', name: 'Фолклендские острова' }, _a[TuiCountryIsoCode.FM] = { mask: '+691###-####', name: 'Ф.Ш. Микронезии' }, _a[TuiCountryIsoCode.FR] = { mask: '+33(###) ###-###', name: 'Франция' }, _a[TuiCountryIsoCode.GA] = { mask: '+241#-##-##-##', name: 'Габон' }, _a[TuiCountryIsoCode.GD] = { mask: '+1(473) ###-####', name: 'Гренада' }, _a[TuiCountryIsoCode.GE] = { mask: '+995(###) ###-###', name: 'Грузия' }, _a[TuiCountryIsoCode.GH] = { mask: '+233(###) ###-###', name: 'Гана' }, _a[TuiCountryIsoCode.GI] = { mask: '+350###-#####', name: 'Гибралтар' }, _a[TuiCountryIsoCode.GL] = { mask: '+299##-##-##', name: 'Гренландия' }, _a[TuiCountryIsoCode.GM] = { mask: '+220(###) ##-##', name: 'Гамбия' }, _a[TuiCountryIsoCode.GN] = { mask: '+224##-###-###', name: 'Гвинея' }, _a[TuiCountryIsoCode.GQ] = { mask: '+240##-###-####', name: 'Экваториальная Гвинея' }, _a[TuiCountryIsoCode.GR] = { mask: '+30(###) ###-####', name: 'Греция' }, _a[TuiCountryIsoCode.GT] = { mask: '+502#-###-####', name: 'Гватемала' }, _a[TuiCountryIsoCode.GW] = { mask: '+245#-######', name: 'Гвинея-Бисау' }, _a[TuiCountryIsoCode.GY] = { mask: '+592###-####', name: 'Гайана' }, _a[TuiCountryIsoCode.HK] = { mask: '+852####-####', name: 'Гонконг' }, _a[TuiCountryIsoCode.HN] = { mask: '+504####-####', name: 'Гондурас' }, _a[TuiCountryIsoCode.HR] = { mask: '+385##-###-###', name: 'Хорватия' }, _a[TuiCountryIsoCode.HT] = { mask: '+509##-##-####', name: 'Гаити' }, _a[TuiCountryIsoCode.HU] = { mask: '+36(###) ###-###', name: 'Венгрия' }, _a[TuiCountryIsoCode.ID] = { mask: '+62(###) ###-##-###', name: 'Индонезия ' }, _a[TuiCountryIsoCode.IE] = { mask: '+353(###) ###-###', name: 'Ирландия' }, _a[TuiCountryIsoCode.IL] = { mask: '+972##-###-####', name: 'Израиль' }, _a[TuiCountryIsoCode.IN] = { mask: '+91(####) ###-###', name: 'Индия' }, _a[TuiCountryIsoCode.IQ] = { mask: '+964(###) ###-####', name: 'Ирак' }, _a[TuiCountryIsoCode.IR] = { mask: '+98(###) ###-####', name: 'Иран' }, _a[TuiCountryIsoCode.IS] = { mask: '+354###-####', name: 'Исландия' }, _a[TuiCountryIsoCode.IT] = { mask: '+39(###) ####-###', name: 'Италия' }, _a[TuiCountryIsoCode.JM] = { mask: '+1(876) ###-####', name: 'Ямайка' }, _a[TuiCountryIsoCode.JO] = { mask: '+962#-####-####', name: 'Иордания' }, _a[TuiCountryIsoCode.JP] = { mask: '+81-##-####-####', name: 'Япония ' }, _a[TuiCountryIsoCode.KE] = { mask: '+254###-######', name: 'Кения' }, _a[TuiCountryIsoCode.KG] = { mask: '+996(###) ###-###', name: 'Киргизия' }, _a[TuiCountryIsoCode.KH] = { mask: '+855##-###-###', name: 'Камбоджа' }, _a[TuiCountryIsoCode.KM] = { mask: '+269##-#####', name: 'Коморы' }, _a[TuiCountryIsoCode.KN] = { mask: '+1(869) ###-####', name: 'Сент-Китс и Невис' }, _a[TuiCountryIsoCode.KP] = { mask: '+850####-#############', name: 'Корейская НДР' }, _a[TuiCountryIsoCode.KR] = { mask: '+82##-###-####', name: 'Респ. Корея' }, _a[TuiCountryIsoCode.KW] = { mask: '+965####-####', name: 'Кувейт' }, _a[TuiCountryIsoCode.KY] = { mask: '+1(345) ###-####', name: 'Каймановы острова' }, _a[TuiCountryIsoCode.KZ] = { mask: '+7(###) ###-##-##', name: 'Казахстан' }, _a[TuiCountryIsoCode.LA] = { mask: '+856##-##-###-###', name: 'Лаос' }, _a[TuiCountryIsoCode.LB] = { mask: '+961##-###-###', name: 'Ливан ' }, _a[TuiCountryIsoCode.LC] = { mask: '+1(758) ###-####', name: 'Сент-Люсия' }, _a[TuiCountryIsoCode.LI] = { mask: '+423(###) ###-####', name: 'Лихтенштейн' }, _a[TuiCountryIsoCode.LK] = { mask: '+94##-###-####', name: 'Шри-Ланка' }, _a[TuiCountryIsoCode.LR] = { mask: '+231##-###-###', name: 'Либерия' }, _a[TuiCountryIsoCode.LS] = { mask: '+266#-###-####', name: 'Лесото' }, _a[TuiCountryIsoCode.LT] = { mask: '+370(###) ##-###', name: 'Литва' }, _a[TuiCountryIsoCode.LU] = { mask: '+352(###) ###-###', name: 'Люксембург' }, _a[TuiCountryIsoCode.LV] = { mask: '+371##-###-###', name: 'Латвия' }, _a[TuiCountryIsoCode.LY] = { mask: '+218##-###-####', name: 'Ливия' }, _a[TuiCountryIsoCode.MA] = { mask: '+212##-####-###', name: 'Марокко' }, _a[TuiCountryIsoCode.MC] = { mask: '+377###-###-###', name: 'Монако' }, _a[TuiCountryIsoCode.MD] = { mask: '+373####-####', name: 'Молдова' }, _a[TuiCountryIsoCode.ME] = { mask: '+382##-###-###', name: 'Черногория' }, _a[TuiCountryIsoCode.MG] = { mask: '+261##-##-#####', name: 'Мадагаскар' }, _a[TuiCountryIsoCode.MK] = { mask: '+389##-###-###', name: 'Респ. Македония' }, _a[TuiCountryIsoCode.ML] = { mask: '+223##-##-####', name: 'Мали' }, _a[TuiCountryIsoCode.MM] = { mask: '+95##-###-###', name: 'Бирма (Мьянма)' }, _a[TuiCountryIsoCode.MN] = { mask: '+976##-##-####', name: 'Монголия' }, _a[TuiCountryIsoCode.MO] = { mask: '+853####-####', name: 'Макао' }, _a[TuiCountryIsoCode.MR] = { mask: '+222##-##-####', name: 'Мавритания' }, _a[TuiCountryIsoCode.MS] = { mask: '+1(664) ###-####', name: 'Монтсеррат' }, _a[TuiCountryIsoCode.MT] = { mask: '+356####-####', name: 'Мальта' }, _a[TuiCountryIsoCode.MU] = { mask: '+230###-####', name: 'Маврикий' }, _a[TuiCountryIsoCode.MV] = { mask: '+960###-####', name: 'Мальдивские острова' }, _a[TuiCountryIsoCode.MW] = { mask: '+265#-####-####', name: 'Малави' }, _a[TuiCountryIsoCode.MX] = { mask: '+52(###) ###-####', name: 'Мексика' }, _a[TuiCountryIsoCode.MY] = { mask: '+60(###) ###-###', name: 'Малайзия' }, _a[TuiCountryIsoCode.MZ] = { mask: '+258##-###-###', name: 'Мозамбик' }, _a[TuiCountryIsoCode.NA] = { mask: '+264##-###-####', name: 'Намибия' }, _a[TuiCountryIsoCode.NE] = { mask: '+227##-##-####', name: 'Нигер' }, _a[TuiCountryIsoCode.NG] = { mask: '+234(###) ###-####', name: 'Нигерия' }, _a[TuiCountryIsoCode.NI] = { mask: '+505####-####', name: 'Никарагуа' }, _a[TuiCountryIsoCode.NL] = { mask: '+31##-###-####', name: 'Нидерланды' }, _a[TuiCountryIsoCode.NO] = { mask: '+47(###) ##-###', name: 'Норвегия' }, _a[TuiCountryIsoCode.NP] = { mask: '+977##-###-###', name: 'Непал' }, _a[TuiCountryIsoCode.NZ] = { mask: '+64(###) ###-####', name: 'Новая Зеландия' }, _a[TuiCountryIsoCode.OM] = { mask: '+968##-###-###', name: 'Оман' }, _a[TuiCountryIsoCode.PA] = { mask: '+507###-####', name: 'Панама' }, _a[TuiCountryIsoCode.PE] = { mask: '+51(###) ###-###', name: 'Перу' }, _a[TuiCountryIsoCode.PF] = { mask: '+689##-##-##', name: 'Французская Полинезия (Таити)', }, _a[TuiCountryIsoCode.PG] = { mask: '+675(###) ##-###', name: 'Папуа-Новая Гвинея' }, _a[TuiCountryIsoCode.PH] = { mask: '+63(###) ###-####', name: 'Филиппины' }, _a[TuiCountryIsoCode.PK] = { mask: '+92(###) ###-####', name: 'Пакистан' }, _a[TuiCountryIsoCode.PL] = { mask: '+48(###) ###-###', name: 'Польша' }, _a[TuiCountryIsoCode.PT] = { mask: '+351##-###-####', name: 'Португалия' }, _a[TuiCountryIsoCode.PW] = { mask: '+680###-####', name: 'Палау' }, _a[TuiCountryIsoCode.PY] = { mask: '+595(###) ###-###', name: 'Парагвай' }, _a[TuiCountryIsoCode.QA] = { mask: '+974####-####', name: 'Катар' }, _a[TuiCountryIsoCode.RO] = { mask: '+40##-###-####', name: 'Румыния' }, _a[TuiCountryIsoCode.RS] = { mask: '+381##-###-####', name: 'Сербия' }, _a[TuiCountryIsoCode.RU] = { mask: '+7(###) ###-##-##', name: 'Россия' }, _a[TuiCountryIsoCode.RW] = { mask: '+250(###) ###-###', name: 'Руанда' }, _a[TuiCountryIsoCode.SA] = { mask: '+966#-####-####', name: 'Саудовская Аравия ' }, _a[TuiCountryIsoCode.SB] = { mask: '+677###-####', name: 'Соломоновы Острова ' }, _a[TuiCountryIsoCode.SC] = { mask: '+248#-###-###', name: 'Сейшелы' }, _a[TuiCountryIsoCode.SD] = { mask: '+249##-###-####', name: 'Судан' }, _a[TuiCountryIsoCode.SE] = { mask: '+46##-###-####', name: 'Швеция' }, _a[TuiCountryIsoCode.SG] = { mask: '+65####-####', name: 'Сингапур' }, _a[TuiCountryIsoCode.SH] = { mask: '+290####', name: 'Остров Святой Елены' }, _a[TuiCountryIsoCode.SI] = { mask: '+386##-###-###', name: 'Словения' }, _a[TuiCountryIsoCode.SK] = { mask: '+421(###) ###-###', name: 'Словакия' }, _a[TuiCountryIsoCode.SL] = { mask: '+232##-######', name: 'Сьерра-Леоне' }, _a[TuiCountryIsoCode.SM] = { mask: '+378####-######', name: 'Сан-Марино' }, _a[TuiCountryIsoCode.SN] = { mask: '+221##-###-####', name: 'Сенегал' }, _a[TuiCountryIsoCode.SO] = { mask: '+252##-###-###', name: 'Сомали' }, _a[TuiCountryIsoCode.SR] = { mask: '+597###-####', name: 'Суринам ' }, _a[TuiCountryIsoCode.ST] = { mask: '+239##-#####', name: 'Сан-Томе и Принсипи' }, _a[TuiCountryIsoCode.SV] = { mask: '+503##-##-####', name: 'Сальвадор' }, _a[TuiCountryIsoCode.SY] = { mask: '+963##-####-###', name: 'Сирийская арабская республика', }, _a[TuiCountryIsoCode.SZ] = { mask: '+268##-##-####', name: 'Свазиленд' }, _a[TuiCountryIsoCode.TC] = { mask: '+1(649) ###-####', name: 'Тёркс и Кайкос' }, _a[TuiCountryIsoCode.TD] = { mask: '+235##-##-##-##', name: 'Чад' }, _a[TuiCountryIsoCode.TG] = { mask: '+228##-###-###', name: 'Того' }, _a[TuiCountryIsoCode.TH] = { mask: '+66##-###-####', name: 'Таиланд ' }, _a[TuiCountryIsoCode.TJ] = { mask: '+992##-###-####', name: 'Таджикистан' }, _a[TuiCountryIsoCode.TL] = { mask: '+670###-#####', name: 'Восточный Тимор' }, _a[TuiCountryIsoCode.TM] = { mask: '+993#-###-####', name: 'Туркменистан' }, _a[TuiCountryIsoCode.TN] = { mask: '+216##-###-###', name: 'Тунис' }, _a[TuiCountryIsoCode.TO] = { mask: '+676#####', name: 'Тонга' }, _a[TuiCountryIsoCode.TR] = { mask: '+90(###) ###-####', name: 'Турция' }, _a[TuiCountryIsoCode.TT] = { mask: '+1(868) ###-####', name: 'Тринидад и Тобаго' }, _a[TuiCountryIsoCode.TW] = { mask: '+886#-####-####', name: 'Тайвань' }, _a[TuiCountryIsoCode.TZ] = { mask: '+255##-###-####', name: 'Танзания' }, _a[TuiCountryIsoCode.UA] = { mask: '+380(##) ###-##-##', name: 'Украина' }, _a[TuiCountryIsoCode.UG] = { mask: '+256(###) ###-###', name: 'Уганда' }, _a[TuiCountryIsoCode.UK] = { mask: '+44##-####-####', name: 'Великобритания' }, _a[TuiCountryIsoCode.US] = { mask: '+1(###) ###-####', name: 'США' }, _a[TuiCountryIsoCode.UY] = { mask: '+598#-###-##-##', name: 'Уругвай' }, _a[TuiCountryIsoCode.UZ] = { mask: '+998##-###-####', name: 'Узбекистан' }, _a[TuiCountryIsoCode.VC] = { mask: '+1(784) ###-####', name: 'Сент-Винсент и Гренадины' }, _a[TuiCountryIsoCode.VE] = { mask: '+58(###) ###-####', name: 'Венесуэла' }, _a[TuiCountryIsoCode.VG] = { mask: '+1(284)###-####', name: 'Британские Виргинские острова', }, _a[TuiCountryIsoCode.VN] = { mask: '+84(###) ####-###', name: 'Вьетнам' }, _a[TuiCountryIsoCode.VU] = { mask: '+678##-#####', name: 'Вануату ' }, _a[TuiCountryIsoCode.WS] = { mask: '+685##-####', name: 'Самоа' }, _a[TuiCountryIsoCode.YE] = { mask: '+967###-###-###', name: 'Йемен ' }, _a[TuiCountryIsoCode.ZA] = { mask: '+27##-###-####', name: 'Южно-Африканская Респ.' }, _a[TuiCountryIsoCode.ZM] = { mask: '+260##-###-####', name: 'Замбия' }, _a[TuiCountryIsoCode.ZW] = { mask: '+263#-######', name: 'Зимбабве' }, _a); // @dynamic var TuiInputPhoneInternationalComponent = /** @class */ (function (_super) { __extends(TuiInputPhoneInternationalComponent, _super); function TuiInputPhoneInternationalComponent(control, changeDetectorRef, iconsPath) { var _this = _super.call(this, control, changeDetectorRef) || this; _this.countryIsoCode = TuiCountryIsoCode.RU; _this.countries = []; _this.open = false; _this.arrow = TUI_ARROW; _this.staticPath = null; _this.staticPath = iconsPath('tuiIcon').replace('tuiIcon.svg#tuiIcon', ''); return _this; } TuiInputPhoneInternationalComponent_1 = TuiInputPhoneInternationalComponent; Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "nativeFocusableElement", { get: function () { return this.inputPhoneComponent && !this.computedDisabled ? this.inputPhoneComponent.nativeFocusableElement : null; }, enumerable: true, configurable: true }); Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "focused", { get: function () { return ((!!this.primitiveTextfield && this.primitiveTextfield.focused) || (!!this.inputPhoneComponent && this.inputPhoneComponent.focused)); }, enumerable: true, configurable: true }); Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "inputPhoneCountryCode", { get: function () { return this.isoToCountryCode(this.countryIsoCode); }, enumerable: true, configurable: true }); Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "phoneMaskAfterCountryCode", { get: function () { var countryCode = this.isoToCountryCode(this.countryIsoCode); return this.calculateMaskAfterCountryCode(COUNTRIES[this.countryIsoCode].mask, countryCode); }, enumerable: true, configurable: true }); Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "countryFlagPath", { get: function () { return this.getFlagPath(this.countryIsoCode); }, enumerable: true, configurable: true }); TuiInputPhoneInternationalComponent.prototype.getFlagPath = function (code) { return "" + this.staticPath + code + ".png"; }; TuiInputPhoneInternationalComponent.prototype.getCountryName = function (isoCode) { return COUNTRIES[isoCode].name; }; TuiInputPhoneInternationalComponent.prototype.onItemClick = function (isoCode) { this.open = false; this.countryIsoCode = isoCode; // recalculates mask inside inputPhone to prevent isoCode conflict this.changeDetectorRef.detectChanges(); if (this.nativeFocusableElement) { setNativeFocused(this.nativeFocusableElement); } }; TuiInputPhoneInternationalComponent.prototype.setDisabledState = function () { _super.prototype.setDisabledState.call(this); this.close(); }; TuiInputPhoneInternationalComponent.prototype.isoToCountryCode = function (isoCode) { return ('+' + COUNTRIES[isoCode].mask .split('') .filter(function (symbol) { return TUI_DIGIT_REGEXP.test(symbol); }) .join('')); }; TuiInputPhoneInternationalComponent.prototype.getFallbackValue = function () { return ''; }; TuiInputPhoneInternationalComponent.prototype.close = function () { this.open = false; }; TuiInputPhoneInternationalComponent.prototype.calculateMaskAfterCountryCode = function (mask, countryCode) { return mask.replace(countryCode, ''); }; var TuiInputPhoneInternationalComponent_1; TuiInputPhoneInternationalComponent.ctorParameters = function () { return [ { type: NgControl, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NgControl,] }] }, { type: ChangeDetectorRef, decorators: [{ type: Inject, args: [ChangeDetectorRef,] }] }, { type: undefined, decorators: [{ type: Inject, args: [TUI_ICONS_PATH,] }] } ]; }; __decorate([ Input(), tuiDefaultProp() ], TuiInputPhoneInternationalComponent.prototype, "countryIsoCode", void 0); __decorate([ Input() ], TuiInputPhoneInternationalComponent.prototype, "countries", void 0); __decorate([ ViewChild(TuiInputPhoneComponent) ], TuiInputPhoneInternationalComponent.prototype, "inputPhoneComponent", void 0); __decorate([ ViewChild(TuiPrimitiveTextfieldComponent) ], TuiInputPhoneInternationalComponent.prototype, "primitiveTextfield", void 0); __decorate([ tuiPure ], TuiInputPhoneInternationalComponent.prototype, "isoToCountryCode", null); __decorate([ tuiPure ], TuiInputPhoneInternationalComponent.prototype, "calculateMaskAfterCountryCode", null); TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1 = __decorate([ Component({ selector: 'tui-input-phone-international', template: "<tui-hosted-dropdown\n class=\"hosted-dropdown\"\n [content]=\"dropdown\"\n [canOpen]=\"!readOnly\"\n [(open)]=\"open\"\n>\n <div tuiGroup>\n <tui-primitive-textfield\n tuiHostedDropdownHost\n class=\"country-select tui-group__auto-width-item\"\n [tuiTextfieldCustomContent]=\"countryValueContent\"\n [tuiTextfieldLabelOutside]=\"true\"\n [disabled]=\"disabled\"\n [focusable]=\"focusable\"\n [editable]=\"false\"\n [iconContent]=\"arrow\"\n [pseudoFocused]=\"open || null\"\n [readOnly]=\"readOnly\"\n [tuiHintContent]=\"null\"\n ></tui-primitive-textfield>\n <tui-input-phone\n class=\"input-phone tui-group__auto-width-item\"\n tuiTextfieldAutocomplete=\"off\"\n [tuiTextfieldLabelOutside]=\"true\"\n [formControl]=\"control\"\n [focusable]=\"focusable\"\n [countryCode]=\"inputPhoneCountryCode\"\n [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n [readOnly]=\"readOnly\"\n [pseudoInvalid]=\"pseudoInvalid\"\n [pseudoFocused]=\"pseudoFocused\"\n [pseudoHovered]=\"pseudoHovered\"\n >\n {{inputPhoneCountryCode}}\n </tui-input-phone>\n </div>\n</tui-hosted-dropdown>\n\n<ng-template #dropdown>\n <tui-data-list>\n <button\n *ngFor=\"let item of countries\"\n tuiOption\n (click)=\"onItemClick(item)\"\n >\n <img class=\"country-item-flag\" alt=\"\" [src]=\"getFlagPath(item)\" />\n <span class=\"country-item-name\">{{getCountryName(item)}}</span>\n <span class=\"country-item-code\">{{isoToCountryCode(item)}}</span>\n </button>\n </tui-data-list>\n</ng-template>\n\n<ng-template #countryValueContent>\n <img\n class=\"flag\"\n [alt]=\"getCountryName(countryIsoCode)\"\n [src]=\"countryFlagPath\"\n />\n</ng-template>\n", changeDetection: ChangeDetectionStrategy.OnPush, providers: [ { provide: TUI_FOCUSABLE_ITEM_ACCESSOR, useExisting: forwardRef(function () { return TuiInputPhoneInternationalComponent_1; }), }, FIXED_DROPDOWN_CONTROLLER_PROVIDER, ], styles: [":host{display:block}:host._disabled{pointer-events:none}.hosted-dropdown{display:block}.country-select{width:90px}.arrow-icon{transition-duration:.3s;transition-timing-function:ease-in-out;display:flex;width:24px;height:24px;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.arrow-icon:hover{color:var(--tui-text-02)}:host._disabled .arrow-icon,:host._readonly .arrow-icon{pointer-events:none}:host[data-mode=onDark] .arrow-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .arrow-icon:hover{color:var(--tui-text-01-night)}.arrow-icon_open{transform:rotate(180deg)}.input-phone{flex:1}.flag{width:28px;height:20px;margin-left:-8px}.country-item-flag{width:28px;height:20px}.country-item-name{margin-left:12px;margin-right:auto}.country-item-code{color:var(--tui-text-02);margin-right:4px}"] }), __param(0, Optional()), __param(0, Self()), __param(0, Inject(NgControl)), __param(1, Inject(ChangeDetectorRef)), __param(2, Inject(TUI_ICONS_PATH)) ], TuiInputPhoneInternationalComponent); return TuiInputPhoneInternationalComponent; }(AbstractTuiControl)); var TuiInputPhoneInternationalModule = /** @class */ (function () { function TuiInputPhoneInternationalModule() { } TuiInputPhoneInternationalModule = __decorate([ NgModule({ imports: [ CommonModule, ReactiveFormsModule, PolymorpheusModule, TuiSvgModule, TuiInputPhoneModule, TuiGroupModule, TuiPrimitiveTextfieldModule, TuiTextfieldControllerModule, TuiHintControllerModule, TuiHostedDropdownModule, TuiDataListModule, TuiArrowModule, ], declarations: [TuiInputPhoneInternationalComponent], exports: [TuiInputPhoneInternationalComponent], }) ], TuiInputPhoneInternationalModule); return TuiInputPhoneInternationalModule; }()); /** * Generated bundle index. Do not edit. */ export { COUNTRIES, TuiCountryIsoCode, TuiInputPhoneInternationalComponent, TuiInputPhoneInternationalModule }; //# sourceMappingURL=taiga-ui-kit-components-input-phone-international.js.map