UNPKG

ngx-intl-tel-input

Version:

[![Build Status](https://github.com/webcat12345/ngx-intl-tel-input/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/webcat12345/ngx-intl-tel-input/actions/workflows/ci.yml) [![GitHub Pages](https://img.shields.io/badge/Demo-blue?logo=

508 lines 82.3 kB
import * as lpn from 'google-libphonenumber'; import { Component, EventEmitter, forwardRef, Input, Output, ViewChild, } from '@angular/core'; import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms'; import { setTheme } from 'ngx-bootstrap/utils'; import { CountryCode } from './data/country-code'; import { SearchCountryField } from './enums/search-country-field.enum'; import { phoneNumberValidator } from './ngx-intl-tel-input.validator'; import { PhoneNumberFormat } from './enums/phone-number-format.enum'; import * as i0 from "@angular/core"; import * as i1 from "./data/country-code"; import * as i2 from "@angular/common"; import * as i3 from "@angular/forms"; import * as i4 from "ngx-bootstrap/dropdown"; import * as i5 from "./directives/native-element-injector.directive"; export class NgxIntlTelInputComponent { constructor(countryCodeData) { this.countryCodeData = countryCodeData; this.value = ''; this.preferredCountries = []; this.enablePlaceholder = true; this.numberFormat = PhoneNumberFormat.International; this.cssClass = 'form-control'; this.onlyCountries = []; this.enableAutoCountrySelect = true; this.searchCountryFlag = false; this.searchCountryField = [SearchCountryField.All]; this.searchCountryPlaceholder = 'Search Country'; this.selectFirstCountry = true; this.phoneValidation = true; this.inputId = 'phone'; this.separateDialCode = false; this.countryChange = new EventEmitter(); this.selectedCountry = { areaCodes: undefined, dialCode: '', htmlId: '', flagClass: '', iso2: '', name: '', placeHolder: '', priority: 0, }; this.phoneNumber = ''; this.allCountries = []; this.preferredCountriesInDropDown = []; // Has to be 'any' to prevent a need to install @types/google-libphonenumber by the package user... this.phoneUtil = lpn.PhoneNumberUtil.getInstance(); this.disabled = false; this.errors = ['Phone number is required.']; this.countrySearchText = ''; this.onTouched = () => { }; this.propagateChange = (_) => { }; // If this is not set, ngx-bootstrap will try to use the bs3 CSS (which is not what we've embedded) and will // Add the wrong classes and such setTheme('bs4'); } ngOnInit() { this.init(); } ngOnChanges(changes) { const selectedISO = changes['selectedCountryISO']; if (this.allCountries && selectedISO && selectedISO.currentValue !== selectedISO.previousValue) { this.updateSelectedCountry(); } if (changes['preferredCountries']) { this.updatePreferredCountries(); } this.checkSeparateDialCodeStyle(); } /* This is a wrapper method to avoid calling this.ngOnInit() in writeValue(). Ref: http://codelyzer.com/rules/no-life-cycle-call/ */ init() { this.fetchCountryData(); if (this.preferredCountries.length) { this.updatePreferredCountries(); } if (this.onlyCountries.length) { this.allCountries = this.allCountries.filter(c => this.onlyCountries.includes(c.iso2)); } if (this.selectFirstCountry) { if (this.preferredCountriesInDropDown.length) { this.setSelectedCountry(this.preferredCountriesInDropDown[0]); } else { this.setSelectedCountry(this.allCountries[0]); } } this.updateSelectedCountry(); this.checkSeparateDialCodeStyle(); } setSelectedCountry(country) { this.selectedCountry = country; this.countryChange.emit(country); } /** * Search country based on country name, iso2, dialCode or all of them. */ searchCountry() { if (!this.countrySearchText) { this.countryList.nativeElement.querySelector('.iti__country-list li').scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest', }); return; } const countrySearchTextLower = this.countrySearchText.toLowerCase(); // @ts-ignore const country = this.allCountries.filter(c => { if (this.searchCountryField.indexOf(SearchCountryField.All) > -1) { // Search in all fields if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) { return c; } if (c.name.toLowerCase().startsWith(countrySearchTextLower)) { return c; } if (c.dialCode.startsWith(this.countrySearchText)) { return c; } } else { // Or search by specific SearchCountryField(s) if (this.searchCountryField.indexOf(SearchCountryField.Iso2) > -1) { if (c.iso2.toLowerCase().startsWith(countrySearchTextLower)) { return c; } } if (this.searchCountryField.indexOf(SearchCountryField.Name) > -1) { if (c.name.toLowerCase().startsWith(countrySearchTextLower)) { return c; } } if (this.searchCountryField.indexOf(SearchCountryField.DialCode) > -1) { if (c.dialCode.startsWith(this.countrySearchText)) { return c; } } } }); if (country.length > 0) { const el = this.countryList.nativeElement.querySelector('#' + country[0].htmlId); if (el) { el.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest', }); } } this.checkSeparateDialCodeStyle(); } onPhoneNumberChange() { let countryCode; // Handle the case where the user sets the value programatically based on a persisted ChangeData obj. if (this.phoneNumber && typeof this.phoneNumber === 'object') { const numberObj = this.phoneNumber; this.phoneNumber = numberObj.number; countryCode = numberObj.countryCode; } this.value = this.phoneNumber; countryCode = countryCode || this.selectedCountry.iso2; // @ts-ignore const number = this.getParsedNumber(this.phoneNumber, countryCode); // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416) if (this.enableAutoCountrySelect) { countryCode = number && number.getCountryCode() ? // @ts-ignore this.getCountryIsoCode(number.getCountryCode(), number) : this.selectedCountry.iso2; if (countryCode && countryCode !== this.selectedCountry.iso2) { const newCountry = this.allCountries .slice() .sort((a, b) => { return a.priority - b.priority; }) .find(c => c.iso2 === countryCode); if (newCountry) { this.selectedCountry = newCountry; } } } countryCode = countryCode ? countryCode : this.selectedCountry.iso2; this.checkSeparateDialCodeStyle(); if (!this.value) { // Reason: avoid https://stackoverflow.com/a/54358133/1617590 // tslint:disable-next-line: no-null-keyword // @ts-ignore this.propagateChange(null); } else { const intlNo = number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL) : ''; // parse phoneNumber if separate dial code is needed if (this.separateDialCode && intlNo) { this.value = this.removeDialCode(intlNo); } this.propagateChange({ number: this.value, internationalNumber: intlNo, nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '', e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '', countryCode: countryCode.toUpperCase(), dialCode: '+' + this.selectedCountry.dialCode, }); } } onCountrySelect(country, el) { this.setSelectedCountry(country); this.checkSeparateDialCodeStyle(); if (this.phoneNumber && this.phoneNumber.length > 0) { this.value = this.phoneNumber; const number = this.getParsedNumber(this.phoneNumber, this.selectedCountry.iso2); const intlNo = number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.INTERNATIONAL) : ''; // parse phoneNumber if separate dial code is needed if (this.separateDialCode && intlNo) { this.value = this.removeDialCode(intlNo); } this.propagateChange({ number: this.value, internationalNumber: intlNo, nationalNumber: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.NATIONAL) : '', e164Number: number ? this.phoneUtil.format(number, lpn.PhoneNumberFormat.E164) : '', countryCode: this.selectedCountry.iso2.toUpperCase(), dialCode: '+' + this.selectedCountry.dialCode, }); } else { // Reason: avoid https://stackoverflow.com/a/54358133/1617590 // tslint:disable-next-line: no-null-keyword // @ts-ignore this.propagateChange(null); } el.focus(); } onInputKeyPress(event) { const allowedChars = /[0-9\+\-\(\)\ ]/; const allowedCtrlChars = /[axcv]/; // Allows copy-pasting const allowedOtherKeys = [ 'ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown', 'Home', 'End', 'Insert', 'Delete', 'Backspace', ]; if (!allowedChars.test(event.key) && !(event.ctrlKey && allowedCtrlChars.test(event.key)) && !allowedOtherKeys.includes(event.key)) { event.preventDefault(); } } registerOnChange(fn) { this.propagateChange = fn; } registerOnTouched(fn) { this.onTouched = fn; } setDisabledState(isDisabled) { this.disabled = isDisabled; } writeValue(obj) { if (obj === undefined) { this.init(); } this.phoneNumber = obj; setTimeout(() => { this.onPhoneNumberChange(); }, 1); } resolvePlaceholder() { let placeholder = ''; if (this.customPlaceholder) { placeholder = this.customPlaceholder; } else if (this.selectedCountry.placeHolder) { placeholder = this.selectedCountry.placeHolder; if (this.separateDialCode) { placeholder = this.removeDialCode(placeholder); } } return placeholder; } /* --------------------------------- Helpers -------------------------------- */ /** * Returns parse PhoneNumber object. * @param phoneNumber string * @param countryCode string */ getParsedNumber(phoneNumber, countryCode) { let number; try { number = this.phoneUtil.parse(phoneNumber, countryCode.toUpperCase()); } catch (e) { } // @ts-ignore return number; } /** * Adjusts input alignment based on the dial code presentation style. */ checkSeparateDialCodeStyle() { if (this.separateDialCode && this.selectedCountry) { const cntryCd = this.selectedCountry.dialCode; this.separateDialCodeClass = 'separate-dial-code iti-sdc-' + (cntryCd.length + 1); } else { this.separateDialCodeClass = ''; } } /** * Cleans dialcode from phone number string. * @param phoneNumber string */ removeDialCode(phoneNumber) { const number = this.getParsedNumber(phoneNumber, this.selectedCountry.iso2); phoneNumber = this.phoneUtil.format(number, lpn.PhoneNumberFormat[this.numberFormat]); if (phoneNumber.startsWith('+') && this.separateDialCode) { phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1); } return phoneNumber; } /** * Sifts through all countries and returns iso code of the primary country * based on the number provided. * @param countryCode country code in number format * @param number PhoneNumber object */ getCountryIsoCode(countryCode, number) { // Will use this to match area code from the first numbers // @ts-ignore const rawNumber = number['values_']['2'].toString(); // List of all countries with countryCode (can be more than one. e.x. US, CA, DO, PR all have +1 countryCode) const countries = this.allCountries.filter(c => c.dialCode === countryCode.toString()); // Main country is the country, which has no areaCodes specified in country-code.ts file. const mainCountry = countries.find(c => c.areaCodes === undefined); // Secondary countries are all countries, which have areaCodes specified in country-code.ts file. const secondaryCountries = countries.filter(c => c.areaCodes !== undefined); let matchedCountry = mainCountry ? mainCountry.iso2 : undefined; /* Iterate over each secondary country and check if nationalNumber starts with any of areaCodes available. If no matches found, fallback to the main country. */ secondaryCountries.forEach(country => { // @ts-ignore country.areaCodes.forEach(areaCode => { if (rawNumber.startsWith(areaCode)) { matchedCountry = country.iso2; } }); }); return matchedCountry; } /** * Gets formatted example phone number from phoneUtil. * @param countryCode string */ getPhoneNumberPlaceHolder(countryCode) { try { return this.phoneUtil.format(this.phoneUtil.getExampleNumber(countryCode), lpn.PhoneNumberFormat[this.numberFormat]); } catch (e) { // @ts-ignore return e; } } /** * Clearing the list to avoid duplicates (https://github.com/webcat12345/ngx-intl-tel-input/issues/248) */ fetchCountryData() { this.allCountries = []; this.countryCodeData.allCountries.forEach(c => { const country = { name: c[0].toString(), iso2: c[1].toString(), dialCode: c[2].toString(), priority: +c[3] || 0, areaCodes: c[4] || undefined, htmlId: `iti-0__item-${c[1].toString()}`, flagClass: `iti__${c[1].toString().toLocaleLowerCase()}`, placeHolder: '', }; if (this.enablePlaceholder) { country.placeHolder = this.getPhoneNumberPlaceHolder(country.iso2.toUpperCase()); } this.allCountries.push(country); }); } /** * Populates preferredCountriesInDropDown with prefferred countries. */ updatePreferredCountries() { if (this.preferredCountries.length) { this.preferredCountriesInDropDown = []; this.preferredCountries.forEach(iso2 => { const preferredCountry = this.allCountries.filter(c => { return c.iso2 === iso2; }); this.preferredCountriesInDropDown.push(preferredCountry[0]); }); } } /** * Updates selectedCountry. */ updateSelectedCountry() { if (this.selectedCountryISO) { // @ts-ignore this.selectedCountry = this.allCountries.find(c => { return c.iso2.toLowerCase() === this.selectedCountryISO.toLowerCase(); }); if (this.selectedCountry) { if (this.phoneNumber) { this.onPhoneNumberChange(); } else { // Reason: avoid https://stackoverflow.com/a/54358133/1617590 // tslint:disable-next-line: no-null-keyword // @ts-ignore this.propagateChange(null); } } } } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxIntlTelInputComponent, deps: [{ token: i1.CountryCode }], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NgxIntlTelInputComponent, selector: "ngx-intl-tel-input", inputs: { value: "value", preferredCountries: "preferredCountries", enablePlaceholder: "enablePlaceholder", customPlaceholder: "customPlaceholder", numberFormat: "numberFormat", cssClass: "cssClass", onlyCountries: "onlyCountries", enableAutoCountrySelect: "enableAutoCountrySelect", searchCountryFlag: "searchCountryFlag", searchCountryField: "searchCountryField", searchCountryPlaceholder: "searchCountryPlaceholder", maxLength: "maxLength", selectFirstCountry: "selectFirstCountry", selectedCountryISO: "selectedCountryISO", phoneValidation: "phoneValidation", inputId: "inputId", separateDialCode: "separateDialCode" }, outputs: { countryChange: "countryChange" }, providers: [ CountryCode, { provide: NG_VALUE_ACCESSOR, // tslint:disable-next-line:no-forward-ref useExisting: forwardRef(() => NgxIntlTelInputComponent), multi: true, }, { provide: NG_VALIDATORS, useValue: phoneNumberValidator, multi: true, }, ], viewQueries: [{ propertyName: "countryList", first: true, predicate: ["countryList"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n class=\"iti__flag-container\"\n dropdown\n [ngClass]=\"{ disabled: disabled }\"\n [isDisabled]=\"disabled\"\n >\n <div class=\"iti__selected-flag dropdown-toggle\" dropdownToggle>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n <div *ngIf=\"separateDialCode\" class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n <div class=\"iti__arrow\"></div>\n </div>\n <div *dropdownMenu class=\"dropdown-menu iti__dropdown-content\">\n <div class=\"search-container\" *ngIf=\"searchCountryFlag && searchCountryField\">\n <input\n id=\"country-search-box\"\n [(ngModel)]=\"countrySearchText\"\n (keyup)=\"searchCountry()\"\n (click)=\"$event.stopPropagation()\"\n [placeholder]=\"searchCountryPlaceholder\"\n autofocus\n />\n </div>\n <ul class=\"iti__country-list\" #countryList>\n <li\n class=\"iti__country iti__preferred\"\n *ngFor=\"let country of preferredCountriesInDropDown\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId + '-preferred'\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n <li class=\"iti__divider\" *ngIf=\"preferredCountriesInDropDown?.length\"></li>\n <li\n class=\"iti__country iti__standard\"\n *ngFor=\"let country of allCountries\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n </ul>\n </div>\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n", styles: [".dropup,.dropright,.dropdown,.dropleft{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width: 576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width: 768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width: 992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width: 1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\"}.dropleft .dropdown-toggle:after{display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=top],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}\n", "li.iti__country:hover{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.BsDropdownMenuDirective, selector: "[bsDropdownMenu],[dropdownMenu]", exportAs: ["bs-dropdown-menu"] }, { kind: "directive", type: i4.BsDropdownToggleDirective, selector: "[bsDropdownToggle],[dropdownToggle]", exportAs: ["bs-dropdown-toggle"] }, { kind: "directive", type: i4.BsDropdownDirective, selector: "[bsDropdown], [dropdown]", inputs: ["placement", "triggers", "container", "dropup", "autoClose", "isAnimated", "insideClick", "isDisabled", "isOpen"], outputs: ["isOpenChange", "onShown", "onHidden"], exportAs: ["bs-dropdown"] }, { kind: "directive", type: i5.NativeElementInjectorDirective, selector: "[ngModel], [formControl], [formControlName]" }] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NgxIntlTelInputComponent, decorators: [{ type: Component, args: [{ selector: 'ngx-intl-tel-input', providers: [ CountryCode, { provide: NG_VALUE_ACCESSOR, // tslint:disable-next-line:no-forward-ref useExisting: forwardRef(() => NgxIntlTelInputComponent), multi: true, }, { provide: NG_VALIDATORS, useValue: phoneNumberValidator, multi: true, }, ], template: "<div class=\"iti iti--allow-dropdown\" [ngClass]=\"separateDialCodeClass\">\n <div\n class=\"iti__flag-container\"\n dropdown\n [ngClass]=\"{ disabled: disabled }\"\n [isDisabled]=\"disabled\"\n >\n <div class=\"iti__selected-flag dropdown-toggle\" dropdownToggle>\n <div class=\"iti__flag\" [ngClass]=\"selectedCountry.flagClass || ''\"></div>\n <div *ngIf=\"separateDialCode\" class=\"selected-dial-code\">+{{ selectedCountry.dialCode }}</div>\n <div class=\"iti__arrow\"></div>\n </div>\n <div *dropdownMenu class=\"dropdown-menu iti__dropdown-content\">\n <div class=\"search-container\" *ngIf=\"searchCountryFlag && searchCountryField\">\n <input\n id=\"country-search-box\"\n [(ngModel)]=\"countrySearchText\"\n (keyup)=\"searchCountry()\"\n (click)=\"$event.stopPropagation()\"\n [placeholder]=\"searchCountryPlaceholder\"\n autofocus\n />\n </div>\n <ul class=\"iti__country-list\" #countryList>\n <li\n class=\"iti__country iti__preferred\"\n *ngFor=\"let country of preferredCountriesInDropDown\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId + '-preferred'\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n <li class=\"iti__divider\" *ngIf=\"preferredCountriesInDropDown?.length\"></li>\n <li\n class=\"iti__country iti__standard\"\n *ngFor=\"let country of allCountries\"\n (click)=\"onCountrySelect(country, focusable)\"\n [id]=\"country.htmlId\"\n >\n <div class=\"iti__flag-box\">\n <div class=\"iti__flag\" [ngClass]=\"country.flagClass\"></div>\n </div>\n <span class=\"iti__country-name\">{{ country.name }}</span>\n <span class=\"iti__dial-code\">+{{ country.dialCode }}</span>\n </li>\n </ul>\n </div>\n </div>\n <input\n type=\"tel\"\n [id]=\"inputId\"\n autocomplete=\"off\"\n class=\"iti__tel-input\"\n [ngClass]=\"cssClass\"\n (blur)=\"onTouched()\"\n (keypress)=\"onInputKeyPress($event)\"\n [(ngModel)]=\"phoneNumber\"\n (ngModelChange)=\"onPhoneNumberChange()\"\n [disabled]=\"disabled\"\n [placeholder]=\"resolvePlaceholder()\"\n [attr.maxLength]=\"maxLength\"\n [attr.validation]=\"phoneValidation\"\n #focusable\n />\n</div>\n", styles: [".dropup,.dropright,.dropdown,.dropleft{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width: 576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width: 768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width: 992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width: 1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:\"\"}.dropleft .dropdown-toggle:after{display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:\"\";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=top],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:hover,.dropdown-item:focus{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}\n", "li.iti__country:hover{background-color:#0000000d}.iti__selected-flag.dropdown-toggle:after{content:none}.iti__flag-container.disabled{cursor:default!important}.iti.iti--allow-dropdown .flag-container.disabled:hover .iti__selected-flag{background:none}.iti__dropdown-content{border:1px solid #ccc;width:fit-content;padding:1px;border-collapse:collapse}.search-container{position:relative}.search-container input{width:100%;border:none;border-bottom:1px solid #ccc;padding-left:10px}.search-icon{position:absolute;z-index:2;width:25px;margin:1px 10px}.iti__country-list{position:relative;border:none}.iti input#country-search-box{padding-left:6px}.iti .selected-dial-code{margin-left:6px}.iti.separate-dial-code .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 .iti__selected-flag,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 .iti__selected-flag{width:93px}.iti.separate-dial-code input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-2 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-3 input,.iti.separate-dial-code.iti--allow-dropdown.iti-sdc-4 input{padding-left:98px}\n"] }] }], ctorParameters: () => [{ type: i1.CountryCode }], propDecorators: { value: [{ type: Input }], preferredCountries: [{ type: Input }], enablePlaceholder: [{ type: Input }], customPlaceholder: [{ type: Input }], numberFormat: [{ type: Input }], cssClass: [{ type: Input }], onlyCountries: [{ type: Input }], enableAutoCountrySelect: [{ type: Input }], searchCountryFlag: [{ type: Input }], searchCountryField: [{ type: Input }], searchCountryPlaceholder: [{ type: Input }], maxLength: [{ type: Input }], selectFirstCountry: [{ type: Input }], selectedCountryISO: [{ type: Input }], phoneValidation: [{ type: Input }], inputId: [{ type: Input }], separateDialCode: [{ type: Input }], countryChange: [{ type: Output }], countryList: [{ type: ViewChild, args: ['countryList'] }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmd4LWludGwtdGVsLWlucHV0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1pbnRsLXRlbC1pbnB1dC9zcmMvbGliL25neC1pbnRsLXRlbC1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtaW50bC10ZWwtaW5wdXQvc3JjL2xpYi9uZ3gtaW50bC10ZWwtaW5wdXQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEdBQUcsTUFBTSx1QkFBdUIsQ0FBQztBQUU3QyxPQUFPLEVBQ0wsU0FBUyxFQUVULFlBQVksRUFDWixVQUFVLEVBQ1YsS0FBSyxFQUdMLE1BQU0sRUFFTixTQUFTLEdBQ1YsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGFBQWEsRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRWxFLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUUvQyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFFbEQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sbUNBQW1DLENBQUM7QUFHdkUsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDdEUsT0FBTyxFQUFF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