UNPKG

intl-tel-input

Version:

A JavaScript plugin for entering and validating international telephone numbers

31 lines (30 loc) 1.27 kB
import { Country } from '../../intl-tel-input/data'; import { AllOptions, SelectedCountryData } from '../types/public-api'; export default class UI { #private; telInput: HTMLInputElement | null; countryContainer: HTMLElement | null; selectedCountry: HTMLElement | null; selectedCountryInner: HTMLElement | null; searchInput: HTMLInputElement | null; searchClearButton: HTMLButtonElement | null; countryList: HTMLElement | null; hiddenInput: HTMLInputElement | null; hiddenInputCountry: HTMLInputElement | null; highlightedItem: HTMLElement | null; readonly hadInitialPlaceholder: boolean; constructor(input: HTMLInputElement, options: AllOptions, id: number); static validateInput(input: unknown): void; generateMarkup(countries: Country[]): void; filterCountriesByQuery(query: string): void; handleSearchChange(): void; handleSearchClear(): void; scrollCountryListToItem(element: HTMLElement): void; highlightListItem(listItem: HTMLElement | null, shouldFocus: boolean): void; handleUpDownKey(key: string): void; destroy(): void; openDropdown(): void; closeDropdown(): void; isDropdownClosed(): boolean; setCountry(selectedCountryData: SelectedCountryData): void; }