intl-tel-input 26.9.2 → 27.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/angular/README.md +1 -1
- package/angular/dist/IntlTelInput.d.ts +97 -0
- package/angular/dist/IntlTelInput.js +4812 -0
- package/angular/dist/IntlTelInputWithUtils.d.ts +3 -0
- package/angular/{build → dist}/IntlTelInputWithUtils.js +2342 -2096
- package/{build → dist}/css/demo.css +1 -1
- package/dist/css/intlTelInput-no-assets.css +1 -0
- package/dist/css/intlTelInput-no-assets.min.css +1 -0
- package/dist/css/intlTelInput.css +1 -0
- package/dist/css/intlTelInput.min.css +1 -0
- package/dist/img/flags.png +0 -0
- package/dist/img/flags.webp +0 -0
- package/dist/img/flags@2x.png +0 -0
- package/dist/img/flags@2x.webp +0 -0
- package/dist/js/data.d.ts +1616 -0
- package/{build → dist}/js/data.js +5 -17
- package/dist/js/data.min.js +7 -0
- package/dist/js/data.mjs +1708 -0
- package/{build/js/i18n/ar/index.js → dist/js/i18n/ar.js} +1 -0
- package/{build/js/i18n/bg/index.js → dist/js/i18n/bg.js} +1 -0
- package/{build/js/i18n/bn/index.js → dist/js/i18n/bn.js} +1 -0
- package/{build/js/i18n/bs/index.js → dist/js/i18n/bs.js} +1 -0
- package/{build/js/i18n/ca/index.js → dist/js/i18n/ca.js} +1 -0
- package/{build/js/i18n/cs/index.js → dist/js/i18n/cs.js} +1 -0
- package/{build/js/i18n/da/index.js → dist/js/i18n/da.js} +1 -0
- package/{build/js/i18n/de/index.js → dist/js/i18n/de.js} +1 -0
- package/{build/js/i18n/el/index.js → dist/js/i18n/el.js} +1 -0
- package/{build/js/i18n/en/index.js → dist/js/i18n/en.js} +3 -2
- package/{build/js/i18n/es/index.js → dist/js/i18n/es.js} +1 -0
- package/{build/js/i18n/et/index.js → dist/js/i18n/et.js} +1 -0
- package/{build/js/i18n/fa/index.js → dist/js/i18n/fa.js} +1 -0
- package/{build/js/i18n/fi/index.js → dist/js/i18n/fi.js} +1 -0
- package/{build/js/i18n/fr/index.js → dist/js/i18n/fr.js} +1 -0
- package/{build/js/i18n/hi/index.js → dist/js/i18n/hi.js} +1 -0
- package/{build/js/i18n/hr/index.js → dist/js/i18n/hr.js} +1 -0
- package/{build/js/i18n/hu/index.js → dist/js/i18n/hu.js} +1 -0
- package/{build/js/i18n/id/index.js → dist/js/i18n/id.js} +1 -0
- package/{build → dist}/js/i18n/index.js +1 -0
- package/{build/js/i18n/it/index.js → dist/js/i18n/it.js} +1 -0
- package/{build/js/i18n/ja/index.js → dist/js/i18n/ja.js} +1 -0
- package/{build/js/i18n/kn/index.js → dist/js/i18n/kn.js} +1 -0
- package/{build/js/i18n/ko/index.js → dist/js/i18n/ko.js} +1 -0
- package/{build/js/i18n/lt/index.js → dist/js/i18n/lt.js} +1 -0
- package/{build/js/i18n/mr/index.js → dist/js/i18n/mr.js} +1 -0
- package/{build/js/i18n/nl/index.js → dist/js/i18n/nl.js} +1 -0
- package/{build/js/i18n/no/index.js → dist/js/i18n/no.js} +1 -0
- package/{build/js/i18n/pl/index.js → dist/js/i18n/pl.js} +1 -0
- package/{build/js/i18n/pt/index.js → dist/js/i18n/pt.js} +1 -0
- package/{build/js/i18n/ro/index.js → dist/js/i18n/ro.js} +1 -0
- package/{build/js/i18n/ru/index.js → dist/js/i18n/ru.js} +1 -0
- package/{build/js/i18n/sk/index.js → dist/js/i18n/sk.js} +1 -0
- package/{build/js/i18n/sl/index.js → dist/js/i18n/sl.js} +1 -0
- package/{build/js/i18n/sq/index.js → dist/js/i18n/sq.js} +1 -0
- package/{build/js/i18n/sr/index.js → dist/js/i18n/sr.js} +1 -0
- package/{build/js/i18n/sv/index.js → dist/js/i18n/sv.js} +1 -0
- package/{build/js/i18n/te/index.js → dist/js/i18n/te.js} +1 -0
- package/{build/js/i18n/th/index.js → dist/js/i18n/th.js} +1 -0
- package/{build/js/i18n/tr/index.js → dist/js/i18n/tr.js} +1 -0
- package/dist/js/i18n/types.js +1 -0
- package/{build/js/i18n/uk/index.js → dist/js/i18n/uk.js} +1 -0
- package/{build/js/i18n/ur/index.js → dist/js/i18n/ur.js} +1 -0
- package/{build/js/i18n/uz/index.js → dist/js/i18n/uz.js} +1 -0
- package/{build/js/i18n/vi/index.js → dist/js/i18n/vi.js} +1 -0
- package/{build/js/i18n/zh-hk/index.js → dist/js/i18n/zh-hk.js} +1 -0
- package/{build/js/i18n/zh/index.js → dist/js/i18n/zh.js} +1 -0
- package/dist/js/i18n.d.ts +1697 -0
- package/dist/js/intlTelInput.d.ts +1773 -0
- package/{build → dist}/js/intlTelInput.js +228 -215
- package/dist/js/intlTelInput.min.js +25 -0
- package/{react/build/IntlTelInput.cjs → dist/js/intlTelInput.mjs} +230 -340
- package/{build → dist}/js/intlTelInputWithUtils.js +531 -498
- package/dist/js/intlTelInputWithUtils.min.js +25 -0
- package/{react/build/IntlTelInputWithUtils.cjs → dist/js/intlTelInputWithUtils.mjs} +530 -621
- package/{build → dist}/js/utils.js +46 -47
- package/package.json +122 -122
- package/react/README.md +1 -1
- package/react/dist/IntlTelInput.d.ts +20 -0
- package/react/{build → dist}/IntlTelInput.js +274 -255
- package/react/dist/IntlTelInputWithUtils.d.ts +4 -0
- package/react/{build → dist}/IntlTelInputWithUtils.js +580 -542
- package/svelte/README.md +1 -1
- package/svelte/src/IntlTelInput.svelte +199 -0
- package/svelte/src/IntlTelInputWithUtils.svelte +15 -0
- package/svelte/src/shims.d.ts +4 -0
- package/vue/README.md +1 -1
- package/vue/dist/IntlTelInput-D7r449B2.js +2577 -0
- package/vue/dist/IntlTelInput.js +5 -0
- package/vue/dist/IntlTelInputWithUtils.js +49385 -0
- package/vue/dist/src/IntlTelInput.vue.d.ts +35 -0
- package/vue/dist/src/index.d.ts +4 -0
- package/vue/dist/src/indexWithUtils.d.ts +3 -0
- package/angular/build/IntlTelInput.js +0 -4501
- package/angular/build/types/intl-tel-input/angular.d.ts +0 -65
- package/angular/build/types/intl-tel-input/angularWithUtils.d.ts +0 -65
- package/angular/build/types/intl-tel-input/data.d.ts +0 -20
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +0 -45
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +0 -10
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/angular/build/types/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/angular/build/types/intl-tel-input/utils.d.ts +0 -2
- package/angular/build/types/intl-tel-input.d.ts +0 -46
- package/angular/build/types/modules/constants.d.ts +0 -94
- package/angular/build/types/modules/core/countrySearch.d.ts +0 -17
- package/angular/build/types/modules/core/icons.d.ts +0 -11
- package/angular/build/types/modules/core/numerals.d.ts +0 -7
- package/angular/build/types/modules/core/options.d.ts +0 -8
- package/angular/build/types/modules/core/ui.d.ts +0 -30
- package/angular/build/types/modules/data/country-data.d.ts +0 -12
- package/angular/build/types/modules/data/intl-regionless.d.ts +0 -2
- package/angular/build/types/modules/data/nanp-regionless.d.ts +0 -2
- package/angular/build/types/modules/format/caret.d.ts +0 -1
- package/angular/build/types/modules/format/formatting.d.ts +0 -3
- package/angular/build/types/modules/types/events.d.ts +0 -10
- package/angular/build/types/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/angular/build/types/modules/types/public-api.d.ts +0 -65
- package/angular/build/types/modules/utils/dom.d.ts +0 -6
- package/angular/build/types/modules/utils/isAndroid.d.ts +0 -1
- package/angular/build/types/modules/utils/string.d.ts +0 -2
- package/build/css/intlTelInput-no-assets.css +0 -1323
- package/build/css/intlTelInput-no-assets.min.css +0 -1
- package/build/css/intlTelInput.css +0 -1327
- package/build/css/intlTelInput.min.css +0 -1
- package/build/img/flags.png +0 -0
- package/build/img/flags.webp +0 -0
- package/build/img/flags@2x.png +0 -0
- package/build/img/flags@2x.webp +0 -0
- package/build/js/data.min.js +0 -20
- package/build/js/i18n/types.js +0 -0
- package/build/js/intlTelInput.d.ts +0 -671
- package/build/js/intlTelInput.min.js +0 -38
- package/build/js/intlTelInputWithUtils.min.js +0 -38
- package/index.js +0 -1
- package/react/build/IntlTelInput.d.ts +0 -721
- package/svelte/build/IntlTelInput.mjs +0 -5294
- package/svelte/build/IntlTelInputWithUtils.mjs +0 -11381
- package/vue/build/IntlTelInput.vue.d.ts +0 -34
- package/vue/build/IntlTelInputWithUtils.vue.d.ts +0 -34
- package/vue/build/exports/IntlTelInput.d.ts +0 -3
- package/vue/build/exports/IntlTelInput.mjs +0 -86
- package/vue/build/exports/IntlTelInputWithUtils.d.ts +0 -3
- package/vue/build/exports/IntlTelInputWithUtils.mjs +0 -6173
- package/vue/build/intl-tel-input/data.d.ts +0 -20
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/et/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/index.d.ts +0 -45
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/kn/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/types.d.ts +0 -10
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +0 -3
- package/vue/build/intl-tel-input/i18n/zh-hk/index.d.ts +0 -3
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +0 -2
- package/vue/build/intl-tel-input-MeSkUgHd.mjs +0 -3438
- package/vue/build/intl-tel-input.d.ts +0 -46
- package/vue/build/modules/constants.d.ts +0 -94
- package/vue/build/modules/core/countrySearch.d.ts +0 -17
- package/vue/build/modules/core/icons.d.ts +0 -11
- package/vue/build/modules/core/numerals.d.ts +0 -7
- package/vue/build/modules/core/options.d.ts +0 -8
- package/vue/build/modules/core/ui.d.ts +0 -30
- package/vue/build/modules/data/country-data.d.ts +0 -12
- package/vue/build/modules/data/intl-regionless.d.ts +0 -2
- package/vue/build/modules/data/nanp-regionless.d.ts +0 -2
- package/vue/build/modules/format/caret.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +0 -3
- package/vue/build/modules/types/events.d.ts +0 -10
- package/vue/build/modules/types/forEachInstanceArgsMap.d.ts +0 -6
- package/vue/build/modules/types/public-api.d.ts +0 -65
- package/vue/build/modules/utils/dom.d.ts +0 -6
- package/vue/build/modules/utils/isAndroid.d.ts +0 -1
- package/vue/build/modules/utils/string.d.ts +0 -2
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Country, Iso2 } from './intl-tel-input/data';
|
|
2
|
-
import { UtilsLoader, ItiUtils, NumberType, AllOptions, SomeOptions, SelectedCountryData } from './modules/types/public-api';
|
|
3
|
-
import { ForEachInstanceArgsMap } from './modules/types/forEachInstanceArgsMap';
|
|
4
|
-
declare global {
|
|
5
|
-
interface HTMLInputElement {
|
|
6
|
-
iti?: Iti;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
export declare class Iti {
|
|
10
|
-
#private;
|
|
11
|
-
readonly id: number;
|
|
12
|
-
readonly promise: Promise<void>;
|
|
13
|
-
constructor(input: HTMLInputElement, customOptions?: SomeOptions);
|
|
14
|
-
destroy(): void;
|
|
15
|
-
isActive(): boolean;
|
|
16
|
-
getExtension(): string;
|
|
17
|
-
getNumber(format?: number): string;
|
|
18
|
-
getNumberType(): number;
|
|
19
|
-
getSelectedCountryData(): SelectedCountryData;
|
|
20
|
-
getValidationError(): number;
|
|
21
|
-
isValidNumber(): boolean | null;
|
|
22
|
-
isValidNumberPrecise(): boolean | null;
|
|
23
|
-
setCountry(iso2: Iso2): void;
|
|
24
|
-
setNumber(number: string): void;
|
|
25
|
-
setPlaceholderNumberType(type: NumberType): void;
|
|
26
|
-
setDisabled(disabled: boolean): void;
|
|
27
|
-
static forEachInstance<M extends keyof ForEachInstanceArgsMap>(method: M, ...args: ForEachInstanceArgsMap[M]): void;
|
|
28
|
-
}
|
|
29
|
-
interface IntlTelInputInterface {
|
|
30
|
-
(input: HTMLInputElement, options?: SomeOptions): Iti;
|
|
31
|
-
autoCountry?: Iso2;
|
|
32
|
-
defaults: AllOptions;
|
|
33
|
-
documentReady: () => boolean;
|
|
34
|
-
getCountryData: () => Country[];
|
|
35
|
-
getInstance: (input: HTMLInputElement) => Iti | null;
|
|
36
|
-
instances: {
|
|
37
|
-
[key: string]: Iti;
|
|
38
|
-
};
|
|
39
|
-
attachUtils: (source: UtilsLoader) => Promise<unknown> | null;
|
|
40
|
-
startedLoadingAutoCountry: boolean;
|
|
41
|
-
startedLoadingUtilsScript: boolean;
|
|
42
|
-
version: string | undefined;
|
|
43
|
-
utils?: ItiUtils;
|
|
44
|
-
}
|
|
45
|
-
declare const intlTelInput: IntlTelInputInterface;
|
|
46
|
-
export default intlTelInput;
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { Iso2 } from '../intl-tel-input/data';
|
|
2
|
-
export declare const EVENTS: {
|
|
3
|
-
readonly OPEN_COUNTRY_DROPDOWN: "open:countrydropdown";
|
|
4
|
-
readonly CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown";
|
|
5
|
-
readonly COUNTRY_CHANGE: "countrychange";
|
|
6
|
-
readonly INPUT: "input";
|
|
7
|
-
};
|
|
8
|
-
export declare const CLASSES: {
|
|
9
|
-
readonly HIDE: "iti__hide";
|
|
10
|
-
readonly V_HIDE: "iti__v-hide";
|
|
11
|
-
readonly ARROW_UP: "iti__arrow--up";
|
|
12
|
-
readonly GLOBE: "iti__globe";
|
|
13
|
-
readonly FLAG: "iti__flag";
|
|
14
|
-
readonly LOADING: "iti__loading";
|
|
15
|
-
readonly COUNTRY_ITEM: "iti__country";
|
|
16
|
-
readonly HIGHLIGHT: "iti__highlight";
|
|
17
|
-
};
|
|
18
|
-
export declare const KEYS: {
|
|
19
|
-
readonly ARROW_UP: "ArrowUp";
|
|
20
|
-
readonly ARROW_DOWN: "ArrowDown";
|
|
21
|
-
readonly SPACE: " ";
|
|
22
|
-
readonly ENTER: "Enter";
|
|
23
|
-
readonly ESC: "Escape";
|
|
24
|
-
readonly TAB: "Tab";
|
|
25
|
-
};
|
|
26
|
-
export declare const INPUT_TYPES: {
|
|
27
|
-
readonly PASTE: "insertFromPaste";
|
|
28
|
-
readonly DELETE_FWD: "deleteContentForward";
|
|
29
|
-
};
|
|
30
|
-
export declare const REGEX: {
|
|
31
|
-
readonly ALPHA_UNICODE: RegExp;
|
|
32
|
-
readonly NON_PLUS_NUMERIC: RegExp;
|
|
33
|
-
readonly NON_PLUS_NUMERIC_GLOBAL: RegExp;
|
|
34
|
-
readonly HIDDEN_SEARCH_CHAR: RegExp;
|
|
35
|
-
};
|
|
36
|
-
export declare const TIMINGS: {
|
|
37
|
-
readonly SEARCH_DEBOUNCE_MS: 100;
|
|
38
|
-
readonly HIDDEN_SEARCH_RESET_MS: 1000;
|
|
39
|
-
readonly NEXT_TICK: 0;
|
|
40
|
-
};
|
|
41
|
-
export declare const SENTINELS: {
|
|
42
|
-
readonly UNKNOWN_NUMBER_TYPE: -99;
|
|
43
|
-
readonly UNKNOWN_VALIDATION_ERROR: -99;
|
|
44
|
-
};
|
|
45
|
-
export declare const LAYOUT: {
|
|
46
|
-
readonly NARROW_VIEWPORT_WIDTH: 500;
|
|
47
|
-
readonly SANE_SELECTED_WITH_DIAL_WIDTH: 78;
|
|
48
|
-
readonly SANE_SELECTED_NO_DIAL_WIDTH: 42;
|
|
49
|
-
readonly INPUT_PADDING_EXTRA_LEFT: 6;
|
|
50
|
-
readonly DROPDOWN_MARGIN: 3;
|
|
51
|
-
readonly SANE_DROPDOWN_HEIGHT: 200;
|
|
52
|
-
};
|
|
53
|
-
export declare const DIAL: {
|
|
54
|
-
readonly PLUS: "+";
|
|
55
|
-
readonly NANP: "1";
|
|
56
|
-
};
|
|
57
|
-
export declare const UK: {
|
|
58
|
-
readonly ISO2: Iso2;
|
|
59
|
-
readonly DIAL_CODE: "44";
|
|
60
|
-
readonly MOBILE_PREFIX: "7";
|
|
61
|
-
readonly MOBILE_CORE_LENGTH: 10;
|
|
62
|
-
};
|
|
63
|
-
export declare const US: {
|
|
64
|
-
ISO2: Iso2;
|
|
65
|
-
DIAL_CODE: string;
|
|
66
|
-
};
|
|
67
|
-
export declare const PLACEHOLDER_MODES: {
|
|
68
|
-
readonly AGGRESSIVE: "aggressive";
|
|
69
|
-
readonly POLITE: "polite";
|
|
70
|
-
readonly OFF: "off";
|
|
71
|
-
};
|
|
72
|
-
export declare const INITIAL_COUNTRY: {
|
|
73
|
-
readonly AUTO: "auto";
|
|
74
|
-
};
|
|
75
|
-
declare const NUMBER_TYPES: readonly ["FIXED_LINE", "MOBILE", "FIXED_LINE_OR_MOBILE", "TOLL_FREE", "PREMIUM_RATE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL", "UNKNOWN"];
|
|
76
|
-
export declare const NUMBER_TYPE_SET: ReadonlySet<(typeof NUMBER_TYPES)[number]> & {
|
|
77
|
-
has(value: string): boolean;
|
|
78
|
-
};
|
|
79
|
-
export declare const DATA_KEYS: {
|
|
80
|
-
readonly COUNTRY_CODE: "countryCode";
|
|
81
|
-
readonly DIAL_CODE: "dialCode";
|
|
82
|
-
};
|
|
83
|
-
export declare const ARIA: {
|
|
84
|
-
readonly EXPANDED: "aria-expanded";
|
|
85
|
-
readonly LABEL: "aria-label";
|
|
86
|
-
readonly SELECTED: "aria-selected";
|
|
87
|
-
readonly ACTIVE_DESCENDANT: "aria-activedescendant";
|
|
88
|
-
readonly HASPOPUP: "aria-haspopup";
|
|
89
|
-
readonly CONTROLS: "aria-controls";
|
|
90
|
-
readonly HIDDEN: "aria-hidden";
|
|
91
|
-
readonly AUTOCOMPLETE: "aria-autocomplete";
|
|
92
|
-
readonly MODAL: "aria-modal";
|
|
93
|
-
};
|
|
94
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Country } from '../../intl-tel-input/data';
|
|
2
|
-
/**
|
|
3
|
-
* Country search: Given raw query, return ordered list of countries by priority buckets.
|
|
4
|
-
* Buckets (in order):
|
|
5
|
-
* 1. exact ISO2 matches
|
|
6
|
-
* 2. name starts with
|
|
7
|
-
* 3. name contains
|
|
8
|
-
* 4. dial code exact match (bare or with plus)
|
|
9
|
-
* 5. dial code contains (with plus form)
|
|
10
|
-
* 6. initials match
|
|
11
|
-
* Each bucket preserves country.priority ordering.
|
|
12
|
-
*/
|
|
13
|
-
export declare const getMatchedCountries: (countries: Country[], query: string) => Country[];
|
|
14
|
-
/**
|
|
15
|
-
* Hidden search (when countrySearch disabled): find first country whose name starts with query (case-insensitive).
|
|
16
|
-
*/
|
|
17
|
-
export declare const findFirstCountryStartingWith: (countries: Country[], query: string) => Country | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** Magnifying glass search icon */
|
|
2
|
-
export declare const buildSearchIcon: () => string;
|
|
3
|
-
/**
|
|
4
|
-
* Clear (circle with X) icon
|
|
5
|
-
* @param id Instance id used to create a unique mask id.
|
|
6
|
-
*/
|
|
7
|
-
export declare const buildClearIcon: (id: number) => string;
|
|
8
|
-
/** Check icon shown next to the selected country in the dropdown. */
|
|
9
|
-
export declare const buildCheckIcon: () => string;
|
|
10
|
-
/** Globe icon used when no country is selected */
|
|
11
|
-
export declare const buildGlobeIcon: () => string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { AllOptions, SomeOptions } from '../types/public-api';
|
|
2
|
-
export declare const defaults: AllOptions;
|
|
3
|
-
/**
|
|
4
|
-
* Validate runtime init options
|
|
5
|
-
*/
|
|
6
|
-
export declare const validateOptions: (customOptions: unknown) => SomeOptions;
|
|
7
|
-
export declare const normaliseOptions: (o: AllOptions) => void;
|
|
8
|
-
export declare const applyOptionSideEffects: (o: AllOptions) => void;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Country } from '../../intl-tel-input/data';
|
|
2
|
-
import { AllOptions, SelectedCountryData } from '../types/public-api';
|
|
3
|
-
export default class UI {
|
|
4
|
-
#private;
|
|
5
|
-
telInput: HTMLInputElement | null;
|
|
6
|
-
countryContainer: HTMLElement | null;
|
|
7
|
-
selectedCountry: HTMLElement | null;
|
|
8
|
-
selectedCountryInner: HTMLElement | null;
|
|
9
|
-
searchInput: HTMLInputElement | null;
|
|
10
|
-
searchClearButton: HTMLButtonElement | null;
|
|
11
|
-
countryList: HTMLElement | null;
|
|
12
|
-
hiddenInput: HTMLInputElement | null;
|
|
13
|
-
hiddenInputCountry: HTMLInputElement | null;
|
|
14
|
-
highlightedItem: HTMLElement | null;
|
|
15
|
-
readonly hadInitialPlaceholder: boolean;
|
|
16
|
-
constructor(input: HTMLInputElement, options: AllOptions, id: number);
|
|
17
|
-
static validateInput(input: unknown): void;
|
|
18
|
-
generateMarkup(countries: Country[]): void;
|
|
19
|
-
filterCountriesByQuery(query: string): void;
|
|
20
|
-
handleSearchChange(): void;
|
|
21
|
-
handleSearchClear(): void;
|
|
22
|
-
scrollCountryListToItem(element: HTMLElement): void;
|
|
23
|
-
highlightListItem(listItem: HTMLElement | null, shouldFocus: boolean): void;
|
|
24
|
-
handleUpDownKey(key: string): void;
|
|
25
|
-
destroy(): void;
|
|
26
|
-
openDropdown(): void;
|
|
27
|
-
closeDropdown(): void;
|
|
28
|
-
isDropdownClosed(): boolean;
|
|
29
|
-
setCountry(selectedCountryData: SelectedCountryData): void;
|
|
30
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Country, Iso2 } from '../../intl-tel-input/data';
|
|
2
|
-
import { AllOptions } from '../types/public-api';
|
|
3
|
-
export interface DialCodeProcessingResult {
|
|
4
|
-
dialCodes: Set<string>;
|
|
5
|
-
dialCodeMaxLen: number;
|
|
6
|
-
dialCodeToIso2Map: Record<string, Iso2[]>;
|
|
7
|
-
}
|
|
8
|
-
export declare const processAllCountries: (options: AllOptions) => Country[];
|
|
9
|
-
export declare const generateCountryNames: (countries: Country[], options: AllOptions) => void;
|
|
10
|
-
export declare const processDialCodes: (countries: Country[]) => DialCodeProcessingResult;
|
|
11
|
-
export declare const sortCountries: (countries: Country[], options: AllOptions) => void;
|
|
12
|
-
export declare const cacheSearchTokens: (countries: Country[]) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const translateCursorPosition: (relevantChars: number, formattedValue: string, prevCaretPos: number, isDeleteForwards: boolean) => number;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ItiUtils, SelectedCountryData } from '../types/public-api';
|
|
2
|
-
export declare const beforeSetNumber: (fullNumber: string, hasValidDialCode: boolean, separateDialCode: boolean, selectedCountryData: SelectedCountryData) => string;
|
|
3
|
-
export declare const formatNumberAsYouType: (fullNumber: string, telInputValue: string, utils: ItiUtils | undefined, selectedCountryData: SelectedCountryData, separateDialCode: boolean) => string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { EVENTS } from '../constants';
|
|
2
|
-
import { SelectedCountryData } from '../types/public-api';
|
|
3
|
-
export type ItiEventMap = {
|
|
4
|
-
[EVENTS.COUNTRY_CHANGE]: SelectedCountryData;
|
|
5
|
-
[EVENTS.OPEN_COUNTRY_DROPDOWN]: Record<string, never>;
|
|
6
|
-
[EVENTS.CLOSE_COUNTRY_DROPDOWN]: Record<string, never>;
|
|
7
|
-
[EVENTS.INPUT]: {
|
|
8
|
-
isSetNumber?: boolean;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { Country, Iso2 } from '../../intl-tel-input/data';
|
|
2
|
-
import { I18n } from '../../intl-tel-input/i18n/types';
|
|
3
|
-
import { NUMBER_TYPE_SET, PLACEHOLDER_MODES } from '../constants';
|
|
4
|
-
export type UtilsLoader = () => Promise<{
|
|
5
|
-
default: ItiUtils;
|
|
6
|
-
}>;
|
|
7
|
-
export type ItiUtils = {
|
|
8
|
-
formatNumber(number: string, iso2: string | undefined, format?: number): string;
|
|
9
|
-
formatNumberAsYouType(number: string, iso2: string | undefined): string;
|
|
10
|
-
getCoreNumber(number: string, iso2: string | undefined): string;
|
|
11
|
-
getExampleNumber(iso2: string | undefined, nationalMode: boolean, numberType: number, useE164?: boolean): string;
|
|
12
|
-
getExtension(number: string, iso2: string | undefined): string;
|
|
13
|
-
getNumberType(number: string, iso2: string | undefined): number;
|
|
14
|
-
getValidationError(number: string, iso2: string | undefined): number;
|
|
15
|
-
isPossibleNumber(number: string, iso2: string | undefined, numberType?: NumberType[] | null): boolean;
|
|
16
|
-
isValidNumber(number: string, iso2: string | undefined, numberType?: NumberType[] | null): boolean;
|
|
17
|
-
numberFormat: {
|
|
18
|
-
NATIONAL: number;
|
|
19
|
-
INTERNATIONAL: number;
|
|
20
|
-
E164: number;
|
|
21
|
-
RFC3966: number;
|
|
22
|
-
};
|
|
23
|
-
numberType: Record<string, number>;
|
|
24
|
-
};
|
|
25
|
-
type SetValues<T> = T extends ReadonlySet<infer U> ? U : never;
|
|
26
|
-
export type NumberType = SetValues<typeof NUMBER_TYPE_SET>;
|
|
27
|
-
type ValueOf<T> = T[keyof T];
|
|
28
|
-
export interface AllOptions {
|
|
29
|
-
allowDropdown: boolean;
|
|
30
|
-
allowedNumberTypes: NumberType[] | null;
|
|
31
|
-
allowNumberExtensions: boolean;
|
|
32
|
-
allowPhonewords: boolean;
|
|
33
|
-
autoPlaceholder: ValueOf<typeof PLACEHOLDER_MODES>;
|
|
34
|
-
containerClass: string;
|
|
35
|
-
countryNameLocale: string;
|
|
36
|
-
countryOrder: Iso2[] | null;
|
|
37
|
-
countrySearch: boolean;
|
|
38
|
-
customPlaceholder: ((selectedCountryPlaceholder: string, selectedCountryData: SelectedCountryData) => string) | null;
|
|
39
|
-
dropdownAlwaysOpen: boolean;
|
|
40
|
-
dropdownContainer: HTMLElement | null;
|
|
41
|
-
excludeCountries: Iso2[];
|
|
42
|
-
fixDropdownWidth: boolean;
|
|
43
|
-
formatAsYouType: boolean;
|
|
44
|
-
formatOnDisplay: boolean;
|
|
45
|
-
geoIpLookup: ((success: (iso2: Iso2) => void, failure: () => void) => void) | null;
|
|
46
|
-
hiddenInput: ((telInputName: string) => {
|
|
47
|
-
phone: string;
|
|
48
|
-
country?: string;
|
|
49
|
-
}) | null;
|
|
50
|
-
i18n: I18n;
|
|
51
|
-
initialCountry: Iso2 | "auto" | "";
|
|
52
|
-
loadUtils: UtilsLoader | null;
|
|
53
|
-
nationalMode: boolean;
|
|
54
|
-
onlyCountries: Iso2[];
|
|
55
|
-
placeholderNumberType: NumberType;
|
|
56
|
-
searchInputClass: string;
|
|
57
|
-
separateDialCode: boolean;
|
|
58
|
-
showFlags: boolean;
|
|
59
|
-
strictMode: boolean;
|
|
60
|
-
useFullscreenPopup: boolean;
|
|
61
|
-
}
|
|
62
|
-
export type SomeOptions = Partial<AllOptions>;
|
|
63
|
-
type EmptyObject = Record<string, never>;
|
|
64
|
-
export type SelectedCountryData = Pick<Country, "iso2" | "dialCode" | "name"> | EmptyObject;
|
|
65
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Build a space-delimited class string from an object map of className -> truthy/falsey.
|
|
3
|
-
* Only keys with truthy values are included.
|
|
4
|
-
*/
|
|
5
|
-
export declare const buildClassNames: (flags: Record<string, unknown>) => string;
|
|
6
|
-
export declare const createEl: (tagName: string, attrs?: object | null, container?: HTMLElement) => HTMLElement;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getIsAndroid: () => boolean;
|