UNPKG

intl-tel-input

Version:

A JavaScript plugin for entering and validating international telephone numbers

722 lines (721 loc) 38.1 kB
declare module "intl-tel-input/data" { export const rawCountryData: readonly [readonly ["af", "93", 0, any, "0"], readonly ["ax", "358", 1, readonly ["18", "4"], "0"], readonly ["al", "355", 0, any, "0"], readonly ["dz", "213", 0, any, "0"], readonly ["as", "1", 5, readonly ["684"], "1"], readonly ["ad", "376"], readonly ["ao", "244"], readonly ["ai", "1", 6, readonly ["264"], "1"], readonly ["ag", "1", 7, readonly ["268"], "1"], readonly ["ar", "54", 0, any, "0"], readonly ["am", "374", 0, any, "0"], readonly ["aw", "297"], readonly ["ac", "247"], readonly ["au", "61", 0, readonly ["4"], "0"], readonly ["at", "43", 0, any, "0"], readonly ["az", "994", 0, any, "0"], readonly ["bs", "1", 8, readonly ["242"], "1"], readonly ["bh", "973"], readonly ["bd", "880", 0, any, "0"], readonly ["bb", "1", 9, readonly ["246"], "1"], readonly ["by", "375", 0, any, "8"], readonly ["be", "32", 0, any, "0"], readonly ["bz", "501"], readonly ["bj", "229"], readonly ["bm", "1", 10, readonly ["441"], "1"], readonly ["bt", "975"], readonly ["bo", "591", 0, any, "0"], readonly ["ba", "387", 0, any, "0"], readonly ["bw", "267"], readonly ["br", "55", 0, any, "0"], readonly ["io", "246"], readonly ["vg", "1", 11, readonly ["284"], "1"], readonly ["bn", "673"], readonly ["bg", "359", 0, any, "0"], readonly ["bf", "226"], readonly ["bi", "257"], readonly ["kh", "855", 0, any, "0"], readonly ["cm", "237"], readonly ["ca", "1", 1, readonly ["204", "226", "236", "249", "250", "257", "263", "289", "306", "343", "354", "365", "367", "368", "382", "403", "416", "418", "428", "431", "437", "438", "450", "468", "474", "506", "514", "519", "548", "579", "581", "584", "587", "604", "613", "639", "647", "672", "683", "705", "709", "742", "753", "778", "780", "782", "807", "819", "825", "867", "873", "879", "902", "905", "942"], "1"], readonly ["cv", "238"], readonly ["bq", "599", 1, readonly ["3", "4", "7"]], readonly ["ky", "1", 12, readonly ["345"], "1"], readonly ["cf", "236"], readonly ["td", "235"], readonly ["cl", "56"], readonly ["cn", "86", 0, any, "0"], readonly ["cx", "61", 2, readonly ["4", "89164"], "0"], readonly ["cc", "61", 1, readonly ["4", "89162"], "0"], readonly ["co", "57", 0, any, "0"], readonly ["km", "269"], readonly ["cg", "242"], readonly ["cd", "243", 0, any, "0"], readonly ["ck", "682"], readonly ["cr", "506"], readonly ["ci", "225"], readonly ["hr", "385", 0, any, "0"], readonly ["cu", "53", 0, any, "0"], readonly ["cw", "599", 0], readonly ["cy", "357"], readonly ["cz", "420"], readonly ["dk", "45"], readonly ["dj", "253"], readonly ["dm", "1", 13, readonly ["767"], "1"], readonly ["do", "1", 2, readonly ["809", "829", "849"], "1"], readonly ["ec", "593", 0, any, "0"], readonly ["eg", "20", 0, any, "0"], readonly ["sv", "503"], readonly ["gq", "240"], readonly ["er", "291", 0, any, "0"], readonly ["ee", "372"], readonly ["sz", "268"], readonly ["et", "251", 0, any, "0"], readonly ["fk", "500"], readonly ["fo", "298"], readonly ["fj", "679"], readonly ["fi", "358", 0, readonly ["4"], "0"], readonly ["fr", "33", 0, any, "0"], readonly ["gf", "594", 0, any, "0"], readonly ["pf", "689"], readonly ["ga", "241"], readonly ["gm", "220"], readonly ["ge", "995", 0, any, "0"], readonly ["de", "49", 0, any, "0"], readonly ["gh", "233", 0, any, "0"], readonly ["gi", "350"], readonly ["gr", "30"], readonly ["gl", "299"], readonly ["gd", "1", 14, readonly ["473"], "1"], readonly ["gp", "590", 0, any, "0"], readonly ["gu", "1", 15, readonly ["671"], "1"], readonly ["gt", "502"], readonly ["gg", "44", 1, readonly ["1481", "7781", "7839", "7911"], "0"], readonly ["gn", "224"], readonly ["gw", "245"], readonly ["gy", "592"], readonly ["ht", "509"], readonly ["hn", "504"], readonly ["hk", "852"], readonly ["hu", "36", 0, any, "06"], readonly ["is", "354"], readonly ["in", "91", 0, any, "0"], readonly ["id", "62", 0, any, "0"], readonly ["ir", "98", 0, any, "0"], readonly ["iq", "964", 0, any, "0"], readonly ["ie", "353", 0, any, "0"], readonly ["im", "44", 2, readonly ["1624", "74576", "7524", "7624", "7924"], "0"], readonly ["il", "972", 0, any, "0"], readonly ["it", "39", 0, readonly ["3"]], readonly ["jm", "1", 4, readonly ["658", "876"], "1"], readonly ["jp", "81", 0, any, "0"], readonly ["je", "44", 3, readonly ["1534", "7509", "7700", "7797", "7829", "7937"], "0"], readonly ["jo", "962", 0, any, "0"], readonly ["kz", "7", 1, readonly ["33", "7"], "8"], readonly ["ke", "254", 0, any, "0"], readonly ["ki", "686", 0, any, "0"], readonly ["xk", "383", 0, any, "0"], readonly ["kw", "965"], readonly ["kg", "996", 0, any, "0"], readonly ["la", "856", 0, any, "0"], readonly ["lv", "371"], readonly ["lb", "961", 0, any, "0"], readonly ["ls", "266"], readonly ["lr", "231", 0, any, "0"], readonly ["ly", "218", 0, any, "0"], readonly ["li", "423", 0, any, "0"], readonly ["lt", "370", 0, any, "0"], readonly ["lu", "352"], readonly ["mo", "853"], readonly ["mg", "261", 0, any, "0"], readonly ["mw", "265", 0, any, "0"], readonly ["my", "60", 0, any, "0"], readonly ["mv", "960"], readonly ["ml", "223"], readonly ["mt", "356"], readonly ["mh", "692", 0, any, "1"], readonly ["mq", "596", 0, any, "0"], readonly ["mr", "222"], readonly ["mu", "230"], readonly ["yt", "262", 1, readonly ["269", "639"], "0"], readonly ["mx", "52"], readonly ["fm", "691"], readonly ["md", "373", 0, any, "0"], readonly ["mc", "377", 0, any, "0"], readonly ["mn", "976", 0, any, "0"], readonly ["me", "382", 0, any, "0"], readonly ["ms", "1", 16, readonly ["664"], "1"], readonly ["ma", "212", 0, readonly ["6", "7"], "0"], readonly ["mz", "258"], readonly ["mm", "95", 0, any, "0"], readonly ["na", "264", 0, any, "0"], readonly ["nr", "674"], readonly ["np", "977", 0, any, "0"], readonly ["nl", "31", 0, any, "0"], readonly ["nc", "687"], readonly ["nz", "64", 0, any, "0"], readonly ["ni", "505"], readonly ["ne", "227"], readonly ["ng", "234", 0, any, "0"], readonly ["nu", "683"], readonly ["nf", "672"], readonly ["kp", "850", 0, any, "0"], readonly ["mk", "389", 0, any, "0"], readonly ["mp", "1", 17, readonly ["670"], "1"], readonly ["no", "47", 0, readonly ["4", "9"]], readonly ["om", "968"], readonly ["pk", "92", 0, any, "0"], readonly ["pw", "680"], readonly ["ps", "970", 0, any, "0"], readonly ["pa", "507"], readonly ["pg", "675"], readonly ["py", "595", 0, any, "0"], readonly ["pe", "51", 0, any, "0"], readonly ["ph", "63", 0, any, "0"], readonly ["pl", "48"], readonly ["pt", "351"], readonly ["pr", "1", 3, readonly ["787", "939"], "1"], readonly ["qa", "974"], readonly ["re", "262", 0, any, "0"], readonly ["ro", "40", 0, any, "0"], readonly ["ru", "7", 0, readonly ["33"], "8"], readonly ["rw", "250", 0, any, "0"], readonly ["ws", "685"], readonly ["sm", "378"], readonly ["st", "239"], readonly ["sa", "966", 0, any, "0"], readonly ["sn", "221"], readonly ["rs", "381", 0, any, "0"], readonly ["sc", "248"], readonly ["sl", "232", 0, any, "0"], readonly ["sg", "65"], readonly ["sx", "1", 21, readonly ["721"], "1"], readonly ["sk", "421", 0, any, "0"], readonly ["si", "386", 0, any, "0"], readonly ["sb", "677"], readonly ["so", "252", 0, any, "0"], readonly ["za", "27", 0, any, "0"], readonly ["kr", "82", 0, any, "0"], readonly ["ss", "211", 0, any, "0"], readonly ["es", "34"], readonly ["lk", "94", 0, any, "0"], readonly ["bl", "590", 1, any, "0"], readonly ["sh", "290"], readonly ["kn", "1", 18, readonly ["869"], "1"], readonly ["lc", "1", 19, readonly ["758"], "1"], readonly ["mf", "590", 2, any, "0"], readonly ["pm", "508", 0, any, "0"], readonly ["vc", "1", 20, readonly ["784"], "1"], readonly ["sd", "249", 0, any, "0"], readonly ["sr", "597"], readonly ["sj", "47", 1, readonly ["4", "79", "9"]], readonly ["se", "46", 0, any, "0"], readonly ["ch", "41", 0, any, "0"], readonly ["sy", "963", 0, any, "0"], readonly ["tw", "886", 0, any, "0"], readonly ["tj", "992"], readonly ["tz", "255", 0, any, "0"], readonly ["th", "66", 0, any, "0"], readonly ["tl", "670"], readonly ["tg", "228"], readonly ["tk", "690"], readonly ["to", "676"], readonly ["tt", "1", 22, readonly ["868"], "1"], readonly ["tn", "216"], readonly ["tr", "90", 0, any, "0"], readonly ["tm", "993", 0, any, "8"], readonly ["tc", "1", 23, readonly ["649"], "1"], readonly ["tv", "688"], readonly ["vi", "1", 24, readonly ["340"], "1"], readonly ["ug", "256", 0, any, "0"], readonly ["ua", "380", 0, any, "0"], readonly ["ae", "971", 0, any, "0"], readonly ["gb", "44", 0, any, "0"], readonly ["us", "1", 0, any, "1"], readonly ["uy", "598", 0, any, "0"], readonly ["uz", "998"], readonly ["vu", "678"], readonly ["va", "39", 1, readonly ["06698", "3"]], readonly ["ve", "58", 0, any, "0"], readonly ["vn", "84", 0, any, "0"], readonly ["wf", "681"], readonly ["eh", "212", 1, readonly ["5288", "5289", "6", "7"], "0"], readonly ["ye", "967", 0, any, "0"], readonly ["zm", "260", 0, any, "0"], readonly ["zw", "263", 0, any, "0"]]; export type Iso2 = typeof rawCountryData[number][0]; export type Country = { iso2: Iso2; dialCode: string; priority: number; areaCodes: string[] | null; nationalPrefix: string | null; name: string; nodeById: { [instanceId: number]: HTMLElement; }; normalisedName: string; initials: string; dialCodePlus: string; }; const allCountries: Country[]; export const iso2Set: Set<Iso2>; export const isIso2: (val: string) => val is Iso2; export default allCountries; } declare module "modules/constants" { import type { Iso2 } from "intl-tel-input/data"; export const EVENTS: { readonly OPEN_COUNTRY_DROPDOWN: "open:countrydropdown"; readonly CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown"; readonly COUNTRY_CHANGE: "countrychange"; readonly INPUT: "input"; }; export const CLASSES: { readonly HIDE: "iti__hide"; readonly V_HIDE: "iti__v-hide"; readonly ARROW_UP: "iti__arrow--up"; readonly GLOBE: "iti__globe"; readonly FLAG: "iti__flag"; readonly LOADING: "iti__loading"; readonly COUNTRY_ITEM: "iti__country"; readonly HIGHLIGHT: "iti__highlight"; }; export const KEYS: { readonly ARROW_UP: "ArrowUp"; readonly ARROW_DOWN: "ArrowDown"; readonly SPACE: " "; readonly ENTER: "Enter"; readonly ESC: "Escape"; readonly TAB: "Tab"; }; export const INPUT_TYPES: { readonly PASTE: "insertFromPaste"; readonly DELETE_FWD: "deleteContentForward"; }; export const REGEX: { readonly ALPHA_UNICODE: RegExp; readonly NON_PLUS_NUMERIC: RegExp; readonly NON_PLUS_NUMERIC_GLOBAL: RegExp; readonly HIDDEN_SEARCH_CHAR: RegExp; }; export const TIMINGS: { readonly SEARCH_DEBOUNCE_MS: 100; readonly HIDDEN_SEARCH_RESET_MS: 1000; readonly NEXT_TICK: 0; }; export const SENTINELS: { readonly UNKNOWN_NUMBER_TYPE: -99; readonly UNKNOWN_VALIDATION_ERROR: -99; }; export const LAYOUT: { readonly NARROW_VIEWPORT_WIDTH: 500; readonly SANE_SELECTED_WITH_DIAL_WIDTH: 78; readonly SANE_SELECTED_NO_DIAL_WIDTH: 42; readonly INPUT_PADDING_EXTRA_LEFT: 6; readonly DROPDOWN_MARGIN: 3; readonly SANE_DROPDOWN_HEIGHT: 200; }; export const DIAL: { readonly PLUS: "+"; readonly NANP: "1"; }; export const UK: { readonly ISO2: Iso2; readonly DIAL_CODE: "44"; readonly MOBILE_PREFIX: "7"; readonly MOBILE_CORE_LENGTH: 10; }; export const US: { ISO2: Iso2; DIAL_CODE: string; }; export const PLACEHOLDER_MODES: { readonly AGGRESSIVE: "aggressive"; readonly POLITE: "polite"; readonly OFF: "off"; }; export const INITIAL_COUNTRY: { readonly AUTO: "auto"; }; const NUMBER_TYPES: readonly ["FIXED_LINE", "MOBILE", "FIXED_LINE_OR_MOBILE", "TOLL_FREE", "PREMIUM_RATE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL", "UNKNOWN"]; export const NUMBER_TYPE_SET: ReadonlySet<(typeof NUMBER_TYPES)[number]> & { has(value: string): boolean; }; export const DATA_KEYS: { readonly COUNTRY_CODE: "countryCode"; readonly DIAL_CODE: "dialCode"; }; export const ARIA: { readonly EXPANDED: "aria-expanded"; readonly LABEL: "aria-label"; readonly SELECTED: "aria-selected"; readonly ACTIVE_DESCENDANT: "aria-activedescendant"; readonly HASPOPUP: "aria-haspopup"; readonly CONTROLS: "aria-controls"; readonly HIDDEN: "aria-hidden"; readonly AUTOCOMPLETE: "aria-autocomplete"; readonly MODAL: "aria-modal"; }; } declare module "intl-tel-input/i18n/types" { import type { Iso2 } from "intl-tel-input/data"; export type I18n = Partial<Record<Iso2, string>> & { selectedCountryAriaLabel?: string; searchPlaceholder?: string; clearSearchAriaLabel?: string; countryListAriaLabel?: string; noCountrySelected?: string; searchEmptyState?: string; searchSummaryAria?: (count: number) => string; }; } declare module "intl-tel-input/i18n/en" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "modules/types/public-api" { import type { Country, Iso2 } from "intl-tel-input/data"; import type { I18n } from "intl-tel-input/i18n/types"; import type { NUMBER_TYPE_SET, PLACEHOLDER_MODES } from "modules/constants"; export type UtilsLoader = () => Promise<{ default: ItiUtils; }>; export type ItiUtils = { formatNumber(number: string, iso2: string | undefined, format?: number): string; formatNumberAsYouType(number: string, iso2: string | undefined): string; getCoreNumber(number: string, iso2: string | undefined): string; getExampleNumber(iso2: string | undefined, nationalMode: boolean, numberType: number, useE164?: boolean): string; getExtension(number: string, iso2: string | undefined): string; getNumberType(number: string, iso2: string | undefined): number; getValidationError(number: string, iso2: string | undefined): number; isPossibleNumber(number: string, iso2: string | undefined, numberType?: NumberType[] | null): boolean; isValidNumber(number: string, iso2: string | undefined, numberType?: NumberType[] | null): boolean; numberFormat: { NATIONAL: number; INTERNATIONAL: number; E164: number; RFC3966: number; }; numberType: Record<string, number>; }; type SetValues<T> = T extends ReadonlySet<infer U> ? U : never; export type NumberType = SetValues<typeof NUMBER_TYPE_SET>; type ValueOf<T> = T[keyof T]; export interface AllOptions { allowDropdown: boolean; allowedNumberTypes: NumberType[] | null; allowNumberExtensions: boolean; allowPhonewords: boolean; autoPlaceholder: ValueOf<typeof PLACEHOLDER_MODES>; containerClass: string; countryNameLocale: string; countryOrder: Iso2[] | null; countrySearch: boolean; customPlaceholder: ((selectedCountryPlaceholder: string, selectedCountryData: SelectedCountryData) => string) | null; dropdownAlwaysOpen: boolean; dropdownContainer: HTMLElement | null; excludeCountries: Iso2[]; fixDropdownWidth: boolean; formatAsYouType: boolean; formatOnDisplay: boolean; geoIpLookup: ((success: (iso2: Iso2) => void, failure: () => void) => void) | null; hiddenInput: ((telInputName: string) => { phone: string; country?: string; }) | null; i18n: I18n; initialCountry: Iso2 | "auto" | ""; loadUtils: UtilsLoader | null; nationalMode: boolean; onlyCountries: Iso2[]; placeholderNumberType: NumberType; searchInputClass: string; separateDialCode: boolean; showFlags: boolean; strictMode: boolean; useFullscreenPopup: boolean; } export type SomeOptions = Partial<AllOptions>; type EmptyObject = Record<string, never>; export type SelectedCountryData = Pick<Country, "iso2" | "dialCode" | "name"> | EmptyObject; } declare module "modules/core/options" { import type { AllOptions, SomeOptions } from "modules/types/public-api"; export const defaults: AllOptions; /** * Validate runtime init options */ export const validateOptions: (customOptions: unknown) => SomeOptions; export const normaliseOptions: (o: AllOptions) => void; export const applyOptionSideEffects: (o: AllOptions) => void; } declare module "modules/utils/string" { export const getNumeric: (s: string) => string; export const normaliseString: (s?: string) => string; } declare module "modules/utils/isAndroid" { export const getIsAndroid: () => boolean; } declare module "modules/core/countrySearch" { import type { Country } from "intl-tel-input/data"; /** * Country search: Given raw query, return ordered list of countries by priority buckets. * Buckets (in order): * 1. exact ISO2 matches * 2. name starts with * 3. name contains * 4. dial code exact match (bare or with plus) * 5. dial code contains (with plus form) * 6. initials match * Each bucket preserves country.priority ordering. */ export const getMatchedCountries: (countries: Country[], query: string) => Country[]; /** * Hidden search (when countrySearch disabled): find first country whose name starts with query (case-insensitive). */ export const findFirstCountryStartingWith: (countries: Country[], query: string) => Country | null; } declare module "modules/utils/dom" { /** * Build a space-delimited class string from an object map of className -> truthy/falsey. * Only keys with truthy values are included. */ export const buildClassNames: (flags: Record<string, unknown>) => string; export const createEl: (tagName: string, attrs?: object | null, container?: HTMLElement) => HTMLElement; } declare module "modules/core/icons" { /** Magnifying glass search icon */ export const buildSearchIcon: () => string; /** * Clear (circle with X) icon * @param id Instance id used to create a unique mask id. */ export const buildClearIcon: (id: number) => string; /** Check icon shown next to the selected country in the dropdown. */ export const buildCheckIcon: () => string; /** Globe icon used when no country is selected */ export const buildGlobeIcon: () => string; } declare module "modules/core/ui" { import type { Country } from "intl-tel-input/data"; import type { AllOptions, SelectedCountryData } from "modules/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; } } declare module "modules/data/country-data" { import { type Country, type Iso2 } from "intl-tel-input/data"; import type { AllOptions } from "modules/types/public-api"; export interface DialCodeProcessingResult { dialCodes: Set<string>; dialCodeMaxLen: number; dialCodeToIso2Map: Record<string, Iso2[]>; } export const processAllCountries: (options: AllOptions) => Country[]; export const generateCountryNames: (countries: Country[], options: AllOptions) => void; export const processDialCodes: (countries: Country[]) => DialCodeProcessingResult; export const sortCountries: (countries: Country[], options: AllOptions) => void; export const cacheSearchTokens: (countries: Country[]) => void; } declare module "modules/data/intl-regionless" { export const REGIONLESS_DIAL_CODES: Set<string>; export const hasRegionlessDialCode: (number: string) => boolean; } declare module "modules/format/formatting" { import type { ItiUtils, SelectedCountryData } from "modules/types/public-api"; export const beforeSetNumber: (fullNumber: string, hasValidDialCode: boolean, separateDialCode: boolean, selectedCountryData: SelectedCountryData) => string; export const formatNumberAsYouType: (fullNumber: string, telInputValue: string, utils: ItiUtils | undefined, selectedCountryData: SelectedCountryData, separateDialCode: boolean) => string; } declare module "modules/format/caret" { export const translateCursorPosition: (relevantChars: number, formattedValue: string, prevCaretPos: number, isDeleteForwards: boolean) => number; } declare module "modules/data/nanp-regionless" { export const regionlessNanpNumbers: Set<string>; export const isRegionlessNanp: (number: string) => boolean; } declare module "modules/types/events" { import { EVENTS } from "modules/constants"; import type { SelectedCountryData } from "modules/types/public-api"; export type ItiEventMap = { [EVENTS.COUNTRY_CHANGE]: SelectedCountryData; [EVENTS.OPEN_COUNTRY_DROPDOWN]: Record<string, never>; [EVENTS.CLOSE_COUNTRY_DROPDOWN]: Record<string, never>; [EVENTS.INPUT]: { isSetNumber?: boolean; }; }; } declare module "modules/core/numerals" { export class Numerals { #private; constructor(initialValue: string); denormalise(str: string): string; normalise(str: string): string; isAscii(): boolean; } } declare module "modules/types/forEachInstanceArgsMap" { export type ForEachInstanceArgsMap = { handleUtils: []; handleUtilsFailure: [error?: unknown]; handleAutoCountry: []; handleAutoCountryFailure: []; }; } declare module "intl-tel-input" { import { type Country, type Iso2 } from "intl-tel-input/data"; import type { UtilsLoader, ItiUtils, NumberType, AllOptions, SomeOptions, SelectedCountryData } from "modules/types/public-api"; import type { ForEachInstanceArgsMap } from "modules/types/forEachInstanceArgsMap"; global { interface HTMLInputElement { iti?: Iti; } } export class Iti { #private; readonly id: number; readonly promise: Promise<void>; constructor(input: HTMLInputElement, customOptions?: SomeOptions); destroy(): void; isActive(): boolean; getExtension(): string; getNumber(format?: number): string; getNumberType(): number; getSelectedCountryData(): SelectedCountryData; getValidationError(): number; isValidNumber(): boolean | null; isValidNumberPrecise(): boolean | null; setCountry(iso2: Iso2): void; setNumber(number: string): void; setPlaceholderNumberType(type: NumberType): void; setDisabled(disabled: boolean): void; static forEachInstance<M extends keyof ForEachInstanceArgsMap>(method: M, ...args: ForEachInstanceArgsMap[M]): void; } interface IntlTelInputInterface { (input: HTMLInputElement, options?: SomeOptions): Iti; autoCountry?: Iso2; defaults: AllOptions; documentReady: () => boolean; getCountryData: () => Country[]; getInstance: (input: HTMLInputElement) => Iti | null; instances: { [key: string]: Iti; }; attachUtils: (source: UtilsLoader) => Promise<unknown> | null; startedLoadingAutoCountry: boolean; startedLoadingUtilsScript: boolean; version: string | undefined; utils?: ItiUtils; } const intlTelInput: IntlTelInputInterface; export default intlTelInput; } declare module "intl-tel-input/react" { import intlTelInput from "intl-tel-input"; import { Iti } from "intl-tel-input"; import React from "react"; import { SomeOptions } from "modules/types/public-api"; export { intlTelInput }; type InputProps = Omit<React.ComponentPropsWithoutRef<"input">, "onInput">; type ItiProps = { initialValue?: string; onChangeNumber?: (number: string) => void; onChangeCountry?: (country: string) => void; onChangeValidity?: (valid: boolean) => void; onChangeErrorCode?: (errorCode: number | null) => void; usePreciseValidation?: boolean; initOptions?: SomeOptions; inputProps?: InputProps; disabled?: boolean | undefined; }; export type IntlTelInputRef = { getInstance: () => Iti | null; getInput: () => HTMLInputElement | null; }; const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>; export default IntlTelInput; } declare module "intl-tel-input/utils" { export default utils; const utils: any; } declare module "intl-tel-input/intlTelInputWithUtils" { import intlTelInput from "intl-tel-input"; export default intlTelInput; } declare module "intl-tel-input/reactWithUtils" { import intlTelInput from "intl-tel-input/intlTelInputWithUtils"; import { Iti } from "intl-tel-input"; import React from "react"; import { SomeOptions } from "modules/types/public-api"; export { intlTelInput }; type InputProps = Omit<React.ComponentPropsWithoutRef<"input">, "onInput">; type ItiProps = { initialValue?: string; onChangeNumber?: (number: string) => void; onChangeCountry?: (country: string) => void; onChangeValidity?: (valid: boolean) => void; onChangeErrorCode?: (errorCode: number | null) => void; usePreciseValidation?: boolean; initOptions?: SomeOptions; inputProps?: InputProps; disabled?: boolean | undefined; }; export type IntlTelInputRef = { getInstance: () => Iti | null; getInput: () => HTMLInputElement | null; }; const IntlTelInput: React.ForwardRefExoticComponent<ItiProps & React.RefAttributes<IntlTelInputRef>>; export default IntlTelInput; } declare module "intl-tel-input/i18n/ar" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/bg" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/bn" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/bs" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ca" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/cs" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/da" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/de" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/el" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/es" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/et" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/fa" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/fi" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/fr" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/hi" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/hr" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/hu" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/id" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/it" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ja" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/kn" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ko" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/lt" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/mr" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/nl" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/no" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/pl" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/pt" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ro" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ru" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/sk" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/sl" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/sq" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/sr" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/sv" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/te" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/th" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/tr" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/uk" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/ur" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/uz" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/vi" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/zh" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n/zh-hk" { import type { I18n } from "intl-tel-input/i18n/types"; const interfaceTranslations: I18n; export default interfaceTranslations; } declare module "intl-tel-input/i18n" { export { default as ar } from "intl-tel-input/i18n/ar"; export { default as bg } from "intl-tel-input/i18n/bg"; export { default as bn } from "intl-tel-input/i18n/bn"; export { default as bs } from "intl-tel-input/i18n/bs"; export { default as ca } from "intl-tel-input/i18n/ca"; export { default as cs } from "intl-tel-input/i18n/cs"; export { default as da } from "intl-tel-input/i18n/da"; export { default as de } from "intl-tel-input/i18n/de"; export { default as el } from "intl-tel-input/i18n/el"; export { default as en } from "intl-tel-input/i18n/en"; export { default as es } from "intl-tel-input/i18n/es"; export { default as et } from "intl-tel-input/i18n/et"; export { default as fa } from "intl-tel-input/i18n/fa"; export { default as fi } from "intl-tel-input/i18n/fi"; export { default as fr } from "intl-tel-input/i18n/fr"; export { default as hi } from "intl-tel-input/i18n/hi"; export { default as hr } from "intl-tel-input/i18n/hr"; export { default as hu } from "intl-tel-input/i18n/hu"; export { default as id } from "intl-tel-input/i18n/id"; export { default as it } from "intl-tel-input/i18n/it"; export { default as ja } from "intl-tel-input/i18n/ja"; export { default as kn } from "intl-tel-input/i18n/kn"; export { default as ko } from "intl-tel-input/i18n/ko"; export { default as lt } from "intl-tel-input/i18n/lt"; export { default as mr } from "intl-tel-input/i18n/mr"; export { default as nl } from "intl-tel-input/i18n/nl"; export { default as no } from "intl-tel-input/i18n/no"; export { default as pl } from "intl-tel-input/i18n/pl"; export { default as pt } from "intl-tel-input/i18n/pt"; export { default as ro } from "intl-tel-input/i18n/ro"; export { default as ru } from "intl-tel-input/i18n/ru"; export { default as sk } from "intl-tel-input/i18n/sk"; export { default as sl } from "intl-tel-input/i18n/sl"; export { default as sq } from "intl-tel-input/i18n/sq"; export { default as sr } from "intl-tel-input/i18n/sr"; export { default as sv } from "intl-tel-input/i18n/sv"; export { default as te } from "intl-tel-input/i18n/te"; export { default as th } from "intl-tel-input/i18n/th"; export { default as tr } from "intl-tel-input/i18n/tr"; export { default as uk } from "intl-tel-input/i18n/uk"; export { default as ur } from "intl-tel-input/i18n/ur"; export { default as uz } from "intl-tel-input/i18n/uz"; export { default as vi } from "intl-tel-input/i18n/vi"; export { default as zh } from "intl-tel-input/i18n/zh"; export { default as zhHk } from "intl-tel-input/i18n/zh-hk"; }