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,34 +0,0 @@
|
|
|
1
|
-
import { SomeOptions } from './modules/types/public-api';
|
|
2
|
-
import { InputHTMLAttributes } from 'vue';
|
|
3
|
-
interface Props {
|
|
4
|
-
options?: SomeOptions;
|
|
5
|
-
usePreciseValidation?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
inputProps?: InputHTMLAttributes;
|
|
8
|
-
value?: string | null;
|
|
9
|
-
modelValue?: string | null;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: import('vue').DefineComponent<Props, {
|
|
12
|
-
instance: import('vue').ShallowRef<import('./intl-tel-input').Iti, import('./intl-tel-input').Iti>;
|
|
13
|
-
input: import('vue').Ref<HTMLInputElement, HTMLInputElement>;
|
|
14
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
changeNumber: (...args: any[]) => void;
|
|
16
|
-
changeCountry: (...args: any[]) => void;
|
|
17
|
-
changeValidity: (...args: any[]) => void;
|
|
18
|
-
changeErrorCode: (...args: any[]) => void;
|
|
19
|
-
"update:modelValue": (...args: any[]) => void;
|
|
20
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
-
onChangeNumber?: (...args: any[]) => any;
|
|
22
|
-
onChangeCountry?: (...args: any[]) => any;
|
|
23
|
-
onChangeValidity?: (...args: any[]) => any;
|
|
24
|
-
onChangeErrorCode?: (...args: any[]) => any;
|
|
25
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
26
|
-
}>, {
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
options: SomeOptions;
|
|
29
|
-
usePreciseValidation: boolean;
|
|
30
|
-
inputProps: InputHTMLAttributes;
|
|
31
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
32
|
-
input: HTMLInputElement;
|
|
33
|
-
}, any>;
|
|
34
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { SomeOptions } from './modules/types/public-api';
|
|
2
|
-
import { InputHTMLAttributes } from 'vue';
|
|
3
|
-
interface Props {
|
|
4
|
-
options?: SomeOptions;
|
|
5
|
-
usePreciseValidation?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
inputProps?: InputHTMLAttributes;
|
|
8
|
-
value?: string | null;
|
|
9
|
-
modelValue?: string | null;
|
|
10
|
-
}
|
|
11
|
-
declare const _default: import('vue').DefineComponent<Props, {
|
|
12
|
-
instance: import('vue').ShallowRef<import('./intl-tel-input').Iti, import('./intl-tel-input').Iti>;
|
|
13
|
-
input: import('vue').Ref<HTMLInputElement, HTMLInputElement>;
|
|
14
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
-
changeNumber: (...args: any[]) => void;
|
|
16
|
-
changeCountry: (...args: any[]) => void;
|
|
17
|
-
changeValidity: (...args: any[]) => void;
|
|
18
|
-
changeErrorCode: (...args: any[]) => void;
|
|
19
|
-
"update:modelValue": (...args: any[]) => void;
|
|
20
|
-
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
21
|
-
onChangeNumber?: (...args: any[]) => any;
|
|
22
|
-
onChangeCountry?: (...args: any[]) => any;
|
|
23
|
-
onChangeValidity?: (...args: any[]) => any;
|
|
24
|
-
onChangeErrorCode?: (...args: any[]) => any;
|
|
25
|
-
"onUpdate:modelValue"?: (...args: any[]) => any;
|
|
26
|
-
}>, {
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
options: SomeOptions;
|
|
29
|
-
usePreciseValidation: boolean;
|
|
30
|
-
inputProps: InputHTMLAttributes;
|
|
31
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
32
|
-
input: HTMLInputElement;
|
|
33
|
-
}, any>;
|
|
34
|
-
export default _default;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, computed as h, ref as s, shallowRef as B, onMounted as D, watch as V, onUnmounted as k, openBlock as w, createElementBlock as F, mergeProps as S } from "vue";
|
|
2
|
-
import { i as T } from "../intl-tel-input-MeSkUgHd.mjs";
|
|
3
|
-
const R = /* @__PURE__ */ x({
|
|
4
|
-
inheritAttrs: !1,
|
|
5
|
-
__name: "IntlTelInput",
|
|
6
|
-
props: {
|
|
7
|
-
options: { default: () => ({}) },
|
|
8
|
-
usePreciseValidation: { type: Boolean, default: !1 },
|
|
9
|
-
disabled: { type: Boolean, default: !1 },
|
|
10
|
-
inputProps: { default: () => ({}) },
|
|
11
|
-
value: {},
|
|
12
|
-
modelValue: {}
|
|
13
|
-
},
|
|
14
|
-
emits: [
|
|
15
|
-
"changeNumber",
|
|
16
|
-
"changeCountry",
|
|
17
|
-
"changeValidity",
|
|
18
|
-
"changeErrorCode",
|
|
19
|
-
"update:modelValue"
|
|
20
|
-
],
|
|
21
|
-
setup(b, { expose: _, emit: E }) {
|
|
22
|
-
const o = b, r = E, N = h(() => {
|
|
23
|
-
const {
|
|
24
|
-
type: e,
|
|
25
|
-
ref: t,
|
|
26
|
-
value: u,
|
|
27
|
-
// disabled: _disabled,
|
|
28
|
-
onInput: a,
|
|
29
|
-
oninput: l,
|
|
30
|
-
onCountrychange: f,
|
|
31
|
-
onCountryChange: z,
|
|
32
|
-
...P
|
|
33
|
-
} = o.inputProps ?? {};
|
|
34
|
-
return P;
|
|
35
|
-
}), d = h(() => o.value ?? o.modelValue ?? ""), i = s(null), n = B(null), c = s(), p = s(), v = s(), m = s(), y = () => n.value ? o.usePreciseValidation ? n.value.isValidNumberPrecise() : n.value.isValidNumber() : null, g = () => {
|
|
36
|
-
var a, l;
|
|
37
|
-
const e = y();
|
|
38
|
-
if (e === null) return;
|
|
39
|
-
const t = !!e, u = t ? null : ((l = (a = n.value) == null ? void 0 : a.getValidationError) == null ? void 0 : l.call(a)) ?? null;
|
|
40
|
-
t !== v.value && (v.value = t, r("changeValidity", t)), u !== m.value && (m.value = u, r("changeErrorCode", u));
|
|
41
|
-
}, C = () => {
|
|
42
|
-
var t;
|
|
43
|
-
const e = ((t = n.value) == null ? void 0 : t.getNumber()) ?? "";
|
|
44
|
-
e !== c.value && (c.value = e, r("changeNumber", e), r("update:modelValue", e)), g();
|
|
45
|
-
}, I = () => {
|
|
46
|
-
var t;
|
|
47
|
-
const e = ((t = n.value) == null ? void 0 : t.getSelectedCountryData().iso2) ?? "";
|
|
48
|
-
e !== p.value && (p.value = e, r("changeCountry", e)), C();
|
|
49
|
-
};
|
|
50
|
-
return D(() => {
|
|
51
|
-
var e, t, u, a;
|
|
52
|
-
if (i.value) {
|
|
53
|
-
n.value = T(i.value, o.options), d.value && n.value.setNumber(d.value), o.disabled && n.value.setDisabled(o.disabled), c.value = ((t = (e = n.value).getNumber) == null ? void 0 : t.call(e)) ?? "", p.value = n.value.getSelectedCountryData().iso2 ?? "";
|
|
54
|
-
const l = y();
|
|
55
|
-
l !== null && (v.value = !!l, m.value = l ? null : ((a = (u = n.value).getValidationError) == null ? void 0 : a.call(u)) ?? null);
|
|
56
|
-
}
|
|
57
|
-
}), V(
|
|
58
|
-
() => o.disabled,
|
|
59
|
-
(e) => {
|
|
60
|
-
var t;
|
|
61
|
-
return (t = n.value) == null ? void 0 : t.setDisabled(e);
|
|
62
|
-
}
|
|
63
|
-
), V(
|
|
64
|
-
() => d.value,
|
|
65
|
-
(e) => {
|
|
66
|
-
var l, f;
|
|
67
|
-
if (!n.value) return;
|
|
68
|
-
const t = e ?? "", u = ((f = (l = n.value).getNumber) == null ? void 0 : f.call(l)) ?? "";
|
|
69
|
-
document.activeElement === i.value || u === t || (n.value.setNumber(t), g());
|
|
70
|
-
},
|
|
71
|
-
{ flush: "post" }
|
|
72
|
-
), k(() => {
|
|
73
|
-
var e;
|
|
74
|
-
return (e = n.value) == null ? void 0 : e.destroy();
|
|
75
|
-
}), _({ instance: n, input: i }), (e, t) => (w(), F("input", S(N.value, {
|
|
76
|
-
ref_key: "input",
|
|
77
|
-
ref: i,
|
|
78
|
-
type: "tel",
|
|
79
|
-
onCountrychange: I,
|
|
80
|
-
onInput: C
|
|
81
|
-
}), null, 16));
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
export {
|
|
85
|
-
R as default
|
|
86
|
-
};
|