@crodriguezdominguez/ion-intl-tel-input 2.4.3 → 3.1.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/crodriguezdominguez-ion-intl-tel-input-3.1.0.tgz +0 -0
- package/fesm2022/crodriguezdominguez-ion-intl-tel-input.mjs +177 -331
- package/fesm2022/crodriguezdominguez-ion-intl-tel-input.mjs.map +1 -1
- package/index.d.ts +359 -3
- package/package.json +6 -8
- package/crodriguezdominguez-ion-intl-tel-input-2.4.3.tgz +0 -0
- package/esm2022/crodriguezdominguez-ion-intl-tel-input.mjs +0 -5
- package/esm2022/lib/data/countries.mjs +0 -2263
- package/esm2022/lib/ion-intl-tel-input/ion-intl-tel-code.component.mjs +0 -86
- package/esm2022/lib/ion-intl-tel-input/ion-intl-tel-input.component.mjs +0 -761
- package/esm2022/lib/ion-intl-tel-input.directive.mjs +0 -69
- package/esm2022/lib/ion-intl-tel-input.module.mjs +0 -56
- package/esm2022/lib/ion-intl-tel-input.service.mjs +0 -20
- package/esm2022/lib/models/country.model.mjs +0 -2
- package/esm2022/lib/pipes/country-placeholder.mjs +0 -39
- package/esm2022/lib/util/util.mjs +0 -10
- package/esm2022/public-api.mjs +0 -9
- package/lib/data/countries.d.ts +0 -2
- package/lib/ion-intl-tel-input/ion-intl-tel-code.component.d.ts +0 -28
- package/lib/ion-intl-tel-input/ion-intl-tel-input.component.d.ts +0 -312
- package/lib/ion-intl-tel-input.directive.d.ts +0 -10
- package/lib/ion-intl-tel-input.module.d.ts +0 -14
- package/lib/ion-intl-tel-input.service.d.ts +0 -9
- package/lib/models/country.model.d.ts +0 -10
- package/lib/pipes/country-placeholder.d.ts +0 -8
- package/lib/util/util.d.ts +0 -1
- package/public-api.d.ts +0 -5
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable,
|
|
3
|
-
import * as
|
|
4
|
-
import { NG_VALIDATORS,
|
|
2
|
+
import { Directive, Injectable, inject, input, viewChild, computed, signal, ChangeDetectionStrategy, Component, Pipe, ElementRef, output, forwardRef, HostBinding } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { NG_VALIDATORS, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { parsePhoneNumber, getExampleNumber } from 'libphonenumber-js';
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import * as i3 from '@angular/cdk/scrolling';
|
|
11
|
-
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
6
|
+
import { addIcons } from 'ionicons';
|
|
7
|
+
import { caretDown } from 'ionicons/icons';
|
|
8
|
+
import { ModalController, IonToolbar, IonTitle, IonHeader, IonButtons, IonButton, IonSearchbar, IonContent, IonList, IonRadioGroup, IonItem, IonRadio, IonText, Platform, IonInput, IonIcon } from '@ionic/angular/standalone';
|
|
9
|
+
import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
12
10
|
import examples from 'libphonenumber-js/mobile/examples';
|
|
13
11
|
|
|
14
12
|
class IonIntlTelInputValidators {
|
|
@@ -51,8 +49,8 @@ class IonIntlTelInputValidatorDirective {
|
|
|
51
49
|
validate(control) {
|
|
52
50
|
return IonIntlTelInputValidators.phone(control);
|
|
53
51
|
}
|
|
54
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
55
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
52
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
53
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.18", type: IonIntlTelInputValidatorDirective, isStandalone: true, selector: "[ionIntlTelInputValid]", providers: [
|
|
56
54
|
{
|
|
57
55
|
provide: NG_VALIDATORS,
|
|
58
56
|
useExisting: IonIntlTelInputValidatorDirective,
|
|
@@ -60,11 +58,12 @@ class IonIntlTelInputValidatorDirective {
|
|
|
60
58
|
},
|
|
61
59
|
], ngImport: i0 });
|
|
62
60
|
}
|
|
63
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
61
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputValidatorDirective, decorators: [{
|
|
64
62
|
type: Directive,
|
|
65
63
|
args: [{
|
|
66
64
|
// tslint:disable-next-line: directive-selector
|
|
67
65
|
selector: '[ionIntlTelInputValid]',
|
|
66
|
+
standalone: true,
|
|
68
67
|
providers: [
|
|
69
68
|
{
|
|
70
69
|
provide: NG_VALIDATORS,
|
|
@@ -2344,15 +2343,15 @@ class IonIntlTelInputService {
|
|
|
2344
2343
|
getListOfCountries() {
|
|
2345
2344
|
return this.countryList;
|
|
2346
2345
|
}
|
|
2347
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2348
|
-
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
2346
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2347
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputService, providedIn: 'root' });
|
|
2349
2348
|
}
|
|
2350
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputService, decorators: [{
|
|
2351
2350
|
type: Injectable,
|
|
2352
2351
|
args: [{
|
|
2353
2352
|
providedIn: 'root'
|
|
2354
2353
|
}]
|
|
2355
|
-
}], ctorParameters:
|
|
2354
|
+
}], ctorParameters: () => [] });
|
|
2356
2355
|
|
|
2357
2356
|
const raf = (h) => {
|
|
2358
2357
|
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
@@ -2365,83 +2364,75 @@ const raf = (h) => {
|
|
|
2365
2364
|
};
|
|
2366
2365
|
|
|
2367
2366
|
class IonIntTelCodeComponent {
|
|
2368
|
-
|
|
2369
|
-
country;
|
|
2370
|
-
canSearch;
|
|
2371
|
-
closeButtonText = 'Close';
|
|
2372
|
-
closeButtonSlot = 'end';
|
|
2373
|
-
countries;
|
|
2374
|
-
searchFailText;
|
|
2375
|
-
searchPlaceholder;
|
|
2376
|
-
shouldFocusSearchbar;
|
|
2377
|
-
title;
|
|
2378
|
-
dialCode;
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
constructor(modalCtrl) {
|
|
2383
|
-
this.modalCtrl = modalCtrl;
|
|
2384
|
-
}
|
|
2385
|
-
ngOnInit() {
|
|
2386
|
-
this.allCountries = this.countries;
|
|
2387
|
-
}
|
|
2388
|
-
ionViewDidEnter() {
|
|
2389
|
-
if (this.sbar && this.shouldFocusSearchbar) {
|
|
2390
|
-
setTimeout(() => { this.sbar.setFocus(); }, 400);
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
search(ev) {
|
|
2394
|
-
let search = ev.detail.value;
|
|
2395
|
-
this.notFound = false;
|
|
2367
|
+
modalController = inject(ModalController);
|
|
2368
|
+
country = input(undefined, ...(ngDevMode ? [{ debugName: "country" }] : []));
|
|
2369
|
+
canSearch = input(undefined, ...(ngDevMode ? [{ debugName: "canSearch" }] : []));
|
|
2370
|
+
closeButtonText = input('Close', ...(ngDevMode ? [{ debugName: "closeButtonText" }] : []));
|
|
2371
|
+
closeButtonSlot = input('end', ...(ngDevMode ? [{ debugName: "closeButtonSlot" }] : []));
|
|
2372
|
+
countries = input(undefined, ...(ngDevMode ? [{ debugName: "countries" }] : []));
|
|
2373
|
+
searchFailText = input(undefined, ...(ngDevMode ? [{ debugName: "searchFailText" }] : []));
|
|
2374
|
+
searchPlaceholder = input(undefined, ...(ngDevMode ? [{ debugName: "searchPlaceholder" }] : []));
|
|
2375
|
+
shouldFocusSearchbar = input(undefined, ...(ngDevMode ? [{ debugName: "shouldFocusSearchbar" }] : []));
|
|
2376
|
+
title = input(undefined, ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
2377
|
+
dialCode = input(undefined, ...(ngDevMode ? [{ debugName: "dialCode" }] : []));
|
|
2378
|
+
searchBar = viewChild('searchBar', ...(ngDevMode ? [{ debugName: "searchBar" }] : []));
|
|
2379
|
+
displayedCountries = computed(() => {
|
|
2380
|
+
let search = this.searchText();
|
|
2396
2381
|
if (search === '' || search === null) {
|
|
2397
|
-
|
|
2382
|
+
return this.allCountries;
|
|
2398
2383
|
}
|
|
2399
2384
|
else {
|
|
2400
2385
|
search = search.toLocaleLowerCase();
|
|
2401
|
-
|
|
2386
|
+
return this.allCountries.filter(r => {
|
|
2402
2387
|
return (r.name && r.name.toLocaleLowerCase().indexOf(search) !== -1);
|
|
2403
2388
|
});
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2389
|
+
}
|
|
2390
|
+
}, ...(ngDevMode ? [{ debugName: "displayedCountries" }] : []));
|
|
2391
|
+
searchText = signal(null, ...(ngDevMode ? [{ debugName: "searchText" }] : []));
|
|
2392
|
+
notFound = computed(() => {
|
|
2393
|
+
return (this.displayedCountries().length === 0);
|
|
2394
|
+
}, ...(ngDevMode ? [{ debugName: "notFound" }] : []));
|
|
2395
|
+
allCountries;
|
|
2396
|
+
ngOnInit() {
|
|
2397
|
+
this.allCountries = this.countries();
|
|
2398
|
+
}
|
|
2399
|
+
ionViewDidEnter() {
|
|
2400
|
+
if (this.searchBar() && this.shouldFocusSearchbar()) {
|
|
2401
|
+
setTimeout(() => { this.searchBar().setFocus().then(); }, 400);
|
|
2407
2402
|
}
|
|
2408
2403
|
}
|
|
2409
|
-
|
|
2410
|
-
this.
|
|
2404
|
+
search(ev) {
|
|
2405
|
+
this.searchText.set(ev.detail.value);
|
|
2406
|
+
}
|
|
2407
|
+
async itemTapped(c) {
|
|
2408
|
+
await this.modalController.dismiss(c);
|
|
2411
2409
|
}
|
|
2412
|
-
closeModal() {
|
|
2413
|
-
this.
|
|
2410
|
+
async closeModal() {
|
|
2411
|
+
await this.modalController.dismiss(null);
|
|
2414
2412
|
}
|
|
2415
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2416
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2413
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntTelCodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2414
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: IonIntTelCodeComponent, isStandalone: true, selector: "ion-intl-tel-code", inputs: { country: { classPropertyName: "country", publicName: "country", isSignal: true, isRequired: false, transformFunction: null }, canSearch: { classPropertyName: "canSearch", publicName: "canSearch", isSignal: true, isRequired: false, transformFunction: null }, closeButtonText: { classPropertyName: "closeButtonText", publicName: "closeButtonText", isSignal: true, isRequired: false, transformFunction: null }, closeButtonSlot: { classPropertyName: "closeButtonSlot", publicName: "closeButtonSlot", isSignal: true, isRequired: false, transformFunction: null }, countries: { classPropertyName: "countries", publicName: "countries", isSignal: true, isRequired: false, transformFunction: null }, searchFailText: { classPropertyName: "searchFailText", publicName: "searchFailText", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, shouldFocusSearchbar: { classPropertyName: "shouldFocusSearchbar", publicName: "shouldFocusSearchbar", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, dialCode: { classPropertyName: "dialCode", publicName: "dialCode", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "searchBar", first: true, predicate: ["searchBar"], descendants: true, isSignal: true }], ngImport: i0, template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title()}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot()\">\n <ion-button (click)=\"closeModal()\">{{closeButtonText()}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n @if (canSearch()) {\n <ion-searchbar #searchBar\n placeholder=\"{{searchPlaceholder()}}\"\n [debounce]=\"400\"\n (ionInput)=\"search($event); $event.target.blur()\"\n (keyup.enter)=\"$event.target.blur()\"\n (ionChange)=\"search($event)\"></ion-searchbar>\n }\n</ion-header>\n\n<ion-content>\n <cdk-virtual-scroll-viewport style=\"width: 100%; height: 100%;\" itemSize=\"56\" minBufferPx=\"900\" maxBufferPx=\"1350\">\n <ion-list lines=\"full\">\n <ion-radio-group [value]=\"country().isoCode\">\n <ion-item style=\"white-space:normal\" *cdkVirtualFor=\"let c of countries()\">\n <ion-radio labelPlacement=\"end\" [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\">\n <span class=\"fi fi-{{c.flagClass}}\"></span> {{c.name}} @if (dialCode()) {\n <span>{{dialCode()}}{{c.displayDialCode}}</span>\n }\n </ion-radio>\n </ion-item>\n </ion-radio-group>\n @if (notFound()) {\n <ion-item lines=\"none\">\n <ion-text>{{searchFailText()}}</ion-text>\n </ion-item>\n }\n </ion-list>\n </cdk-virtual-scroll-viewport>\n</ion-content>\n", dependencies: [{ kind: "component", type: IonToolbar, selector: "ion-toolbar", inputs: ["color", "mode"] }, { kind: "component", type: IonTitle, selector: "ion-title", inputs: ["color", "size"] }, { kind: "component", type: IonHeader, selector: "ion-header", inputs: ["collapse", "mode", "translucent"] }, { kind: "component", type: IonButtons, selector: "ion-buttons", inputs: ["collapse"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonSearchbar, selector: "ion-searchbar", inputs: ["animated", "autocomplete", "autocorrect", "cancelButtonIcon", "cancelButtonText", "clearIcon", "color", "debounce", "disabled", "enterkeyhint", "inputmode", "mode", "name", "placeholder", "searchIcon", "showCancelButton", "showClearButton", "spellcheck", "type", "value"] }, { kind: "component", type: IonContent, selector: "ion-content", inputs: ["color", "fixedSlotPlacement", "forceOverscroll", "fullscreen", "scrollEvents", "scrollX", "scrollY"] }, { kind: "component", type: CdkVirtualScrollViewport, selector: "cdk-virtual-scroll-viewport", inputs: ["orientation", "appendOnly"], outputs: ["scrolledIndexChange"] }, { kind: "component", type: IonList, selector: "ion-list", inputs: ["inset", "lines", "mode"] }, { kind: "component", type: IonRadioGroup, selector: "ion-radio-group", inputs: ["allowEmptySelection", "compareWith", "errorText", "helperText", "name", "value"] }, { kind: "component", type: IonItem, selector: "ion-item", inputs: ["button", "color", "detail", "detailIcon", "disabled", "download", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "target", "type"] }, { kind: "directive", type: CdkFixedSizeVirtualScroll, selector: "cdk-virtual-scroll-viewport[itemSize]", inputs: ["itemSize", "minBufferPx", "maxBufferPx"] }, { kind: "component", type: IonRadio, selector: "ion-radio", inputs: ["alignment", "color", "disabled", "justify", "labelPlacement", "mode", "name", "value"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "directive", type: CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2417
2415
|
}
|
|
2418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntTelCodeComponent, decorators: [{
|
|
2419
2417
|
type: Component,
|
|
2420
|
-
args: [{ selector: 'ion-intl-tel-code',
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
type: Input
|
|
2439
|
-
}], dialCode: [{
|
|
2440
|
-
type: Input
|
|
2441
|
-
}], sbar: [{
|
|
2442
|
-
type: ViewChild,
|
|
2443
|
-
args: ['searchBar']
|
|
2444
|
-
}] } });
|
|
2418
|
+
args: [{ selector: 'ion-intl-tel-code', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
2419
|
+
IonToolbar,
|
|
2420
|
+
IonTitle,
|
|
2421
|
+
IonHeader,
|
|
2422
|
+
IonButtons,
|
|
2423
|
+
IonButton,
|
|
2424
|
+
IonSearchbar,
|
|
2425
|
+
IonContent,
|
|
2426
|
+
CdkVirtualScrollViewport,
|
|
2427
|
+
IonList,
|
|
2428
|
+
IonRadioGroup,
|
|
2429
|
+
IonItem,
|
|
2430
|
+
CdkFixedSizeVirtualScroll,
|
|
2431
|
+
IonRadio,
|
|
2432
|
+
IonText,
|
|
2433
|
+
CdkVirtualForOf
|
|
2434
|
+
], template: "<ion-header>\n <ion-toolbar>\n <ion-title class=\"ion-text-center\">\n {{title()}}\n </ion-title>\n\n <ion-buttons [slot]=\"closeButtonSlot()\">\n <ion-button (click)=\"closeModal()\">{{closeButtonText()}}</ion-button>\n </ion-buttons>\n\n </ion-toolbar>\n @if (canSearch()) {\n <ion-searchbar #searchBar\n placeholder=\"{{searchPlaceholder()}}\"\n [debounce]=\"400\"\n (ionInput)=\"search($event); $event.target.blur()\"\n (keyup.enter)=\"$event.target.blur()\"\n (ionChange)=\"search($event)\"></ion-searchbar>\n }\n</ion-header>\n\n<ion-content>\n <cdk-virtual-scroll-viewport style=\"width: 100%; height: 100%;\" itemSize=\"56\" minBufferPx=\"900\" maxBufferPx=\"1350\">\n <ion-list lines=\"full\">\n <ion-radio-group [value]=\"country().isoCode\">\n <ion-item style=\"white-space:normal\" *cdkVirtualFor=\"let c of countries()\">\n <ion-radio labelPlacement=\"end\" [value]=\"c.isoCode\" slot=\"start\" color=\"primary\" (click)=\"itemTapped(c)\">\n <span class=\"fi fi-{{c.flagClass}}\"></span> {{c.name}} @if (dialCode()) {\n <span>{{dialCode()}}{{c.displayDialCode}}</span>\n }\n </ion-radio>\n </ion-item>\n </ion-radio-group>\n @if (notFound()) {\n <ion-item lines=\"none\">\n <ion-text>{{searchFailText()}}</ion-text>\n </ion-item>\n }\n </ion-list>\n </cdk-virtual-scroll-viewport>\n</ion-content>\n" }]
|
|
2435
|
+
}], propDecorators: { country: [{ type: i0.Input, args: [{ isSignal: true, alias: "country", required: false }] }], canSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "canSearch", required: false }] }], closeButtonText: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonText", required: false }] }], closeButtonSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonSlot", required: false }] }], countries: [{ type: i0.Input, args: [{ isSignal: true, alias: "countries", required: false }] }], searchFailText: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchFailText", required: false }] }], searchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchPlaceholder", required: false }] }], shouldFocusSearchbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "shouldFocusSearchbar", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], dialCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialCode", required: false }] }], searchBar: [{ type: i0.ViewChild, args: ['searchBar', { isSignal: true }] }] } });
|
|
2445
2436
|
|
|
2446
2437
|
class CountryPlaceholder {
|
|
2447
2438
|
transform(country, inputPlaceholder, separateDialCode, fallbackPlaceholder, usePatternPlaceholder) {
|
|
@@ -2469,22 +2460,27 @@ class CountryPlaceholder {
|
|
|
2469
2460
|
return fallbackPlaceholder;
|
|
2470
2461
|
}
|
|
2471
2462
|
}
|
|
2472
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2473
|
-
/** @nocollapse */ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
2463
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CountryPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2464
|
+
/** @nocollapse */ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.18", ngImport: i0, type: CountryPlaceholder, isStandalone: true, name: "countryPlaceholder" });
|
|
2474
2465
|
}
|
|
2475
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CountryPlaceholder, decorators: [{
|
|
2476
2467
|
type: Pipe,
|
|
2477
|
-
args: [{ name: 'countryPlaceholder' }]
|
|
2468
|
+
args: [{ standalone: true, name: 'countryPlaceholder' }]
|
|
2478
2469
|
}] });
|
|
2479
2470
|
|
|
2480
2471
|
/**
|
|
2481
2472
|
* @ignore
|
|
2482
2473
|
*/
|
|
2474
|
+
/**
|
|
2475
|
+
* @author Azzam Asghar <azzam.asghar@interstellus.com>
|
|
2476
|
+
* @author Steve Drew <sdrew@waitwell.ca>
|
|
2477
|
+
* @author Carlos Rodríguez <carlosrodriguez@ugr.es>
|
|
2478
|
+
*/
|
|
2483
2479
|
class IonIntlTelInputComponent {
|
|
2484
|
-
el;
|
|
2485
|
-
platform;
|
|
2486
|
-
ionIntlTelInputService;
|
|
2487
|
-
modalCtrl;
|
|
2480
|
+
el = inject(ElementRef);
|
|
2481
|
+
platform = inject(Platform);
|
|
2482
|
+
ionIntlTelInputService = inject(IonIntlTelInputService);
|
|
2483
|
+
modalCtrl = inject(ModalController);
|
|
2488
2484
|
cssClass = true;
|
|
2489
2485
|
isIos;
|
|
2490
2486
|
isMD;
|
|
@@ -2501,14 +2497,14 @@ class IonIntlTelInputComponent {
|
|
|
2501
2497
|
* @default 'off'
|
|
2502
2498
|
* @memberof IonIntlTelInputComponent
|
|
2503
2499
|
*/
|
|
2504
|
-
autocomplete = 'off';
|
|
2500
|
+
autocomplete = input('off', ...(ngDevMode ? [{ debugName: "autocomplete" }] : []));
|
|
2505
2501
|
/**
|
|
2506
2502
|
* required, passed onto ion-input so we can be accessiblity compliant
|
|
2507
2503
|
*
|
|
2508
2504
|
* @default false
|
|
2509
2505
|
* @memberof IonIntlTelInputComponent
|
|
2510
2506
|
*/
|
|
2511
|
-
required = false;
|
|
2507
|
+
required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
2512
2508
|
/**
|
|
2513
2509
|
* Iso Code of default selected Country.
|
|
2514
2510
|
* See more on.
|
|
@@ -2516,7 +2512,7 @@ class IonIntlTelInputComponent {
|
|
|
2516
2512
|
* @default ''
|
|
2517
2513
|
* @memberof IonIntlTelInputComponent
|
|
2518
2514
|
*/
|
|
2519
|
-
defaultCountryiso = '';
|
|
2515
|
+
defaultCountryiso = input('', ...(ngDevMode ? [{ debugName: "defaultCountryiso" }] : []));
|
|
2520
2516
|
/**
|
|
2521
2517
|
* Determines whether to use `00` or `+` as dial code prefix.
|
|
2522
2518
|
* Available attributes are '+' | '00'.
|
|
@@ -2525,7 +2521,7 @@ class IonIntlTelInputComponent {
|
|
|
2525
2521
|
* @default +
|
|
2526
2522
|
* @memberof IonIntlTelInputComponent
|
|
2527
2523
|
*/
|
|
2528
|
-
dialCodePrefix = '+';
|
|
2524
|
+
dialCodePrefix = input('+', ...(ngDevMode ? [{ debugName: "dialCodePrefix" }] : []));
|
|
2529
2525
|
/**
|
|
2530
2526
|
* Determines whether to select automatic country based on user input.
|
|
2531
2527
|
* See more on.
|
|
@@ -2533,7 +2529,7 @@ class IonIntlTelInputComponent {
|
|
|
2533
2529
|
* @default true
|
|
2534
2530
|
* @memberof IonIntlTelInputComponent
|
|
2535
2531
|
*/
|
|
2536
|
-
enableAutoCountrySelect = true;
|
|
2532
|
+
enableAutoCountrySelect = input(true, ...(ngDevMode ? [{ debugName: "enableAutoCountrySelect" }] : []));
|
|
2537
2533
|
/**
|
|
2538
2534
|
* Determines whether an example number will be shown as a placeholder in input.
|
|
2539
2535
|
* See more on.
|
|
@@ -2541,7 +2537,7 @@ class IonIntlTelInputComponent {
|
|
|
2541
2537
|
* @default true
|
|
2542
2538
|
* @memberof IonIntlTelInputComponent
|
|
2543
2539
|
*/
|
|
2544
|
-
enablePlaceholder = true;
|
|
2540
|
+
enablePlaceholder = input(true, ...(ngDevMode ? [{ debugName: "enablePlaceholder" }] : []));
|
|
2545
2541
|
/**
|
|
2546
2542
|
* A fallaback placeholder to be used if no example number is found for a country.
|
|
2547
2543
|
* See more on.
|
|
@@ -2549,7 +2545,7 @@ class IonIntlTelInputComponent {
|
|
|
2549
2545
|
* @default ''
|
|
2550
2546
|
* @memberof IonIntlTelInputComponent
|
|
2551
2547
|
*/
|
|
2552
|
-
fallbackPlaceholder = '';
|
|
2548
|
+
fallbackPlaceholder = input('', ...(ngDevMode ? [{ debugName: "fallbackPlaceholder" }] : []));
|
|
2553
2549
|
/**
|
|
2554
2550
|
* If a custom placeholder is needed for input.
|
|
2555
2551
|
* If this property is set it will override `enablePlaceholder` and only this placeholder will be shown.
|
|
@@ -2558,10 +2554,10 @@ class IonIntlTelInputComponent {
|
|
|
2558
2554
|
* @default ''
|
|
2559
2555
|
* @memberof IonIntlTelInputComponent
|
|
2560
2556
|
*/
|
|
2561
|
-
inputPlaceholder = '';
|
|
2562
|
-
inputLabel = '';
|
|
2563
|
-
inputLabelColor = undefined;
|
|
2564
|
-
inputLabelPlacement = 'start';
|
|
2557
|
+
inputPlaceholder = input('', ...(ngDevMode ? [{ debugName: "inputPlaceholder" }] : []));
|
|
2558
|
+
inputLabel = input('', ...(ngDevMode ? [{ debugName: "inputLabel" }] : []));
|
|
2559
|
+
inputLabelColor = input(undefined, ...(ngDevMode ? [{ debugName: "inputLabelColor" }] : []));
|
|
2560
|
+
inputLabelPlacement = input('start', ...(ngDevMode ? [{ debugName: "inputLabelPlacement" }] : []));
|
|
2565
2561
|
/**
|
|
2566
2562
|
* Instead of an example phone number, use a x pattern. Such as xxx-xxx-xxxx, this will be obtained
|
|
2567
2563
|
* based on the example number from the google phone lib.
|
|
@@ -2569,7 +2565,7 @@ class IonIntlTelInputComponent {
|
|
|
2569
2565
|
* @default true
|
|
2570
2566
|
* @memberof IonIntlTelInputComponent
|
|
2571
2567
|
*/
|
|
2572
|
-
usePatternPlaceholder = true;
|
|
2568
|
+
usePatternPlaceholder = input(true, ...(ngDevMode ? [{ debugName: "usePatternPlaceholder" }] : []));
|
|
2573
2569
|
/**
|
|
2574
2570
|
* Maximum Length for input.
|
|
2575
2571
|
* See more on.
|
|
@@ -2577,7 +2573,7 @@ class IonIntlTelInputComponent {
|
|
|
2577
2573
|
* @default '15'
|
|
2578
2574
|
* @memberof IonIntlTelInputComponent
|
|
2579
2575
|
*/
|
|
2580
|
-
maxLength = '15';
|
|
2576
|
+
maxLength = input('15', ...(ngDevMode ? [{ debugName: "maxLength" }] : []));
|
|
2581
2577
|
/**
|
|
2582
2578
|
* Title of modal opened to select country dial code.
|
|
2583
2579
|
* See more on.
|
|
@@ -2585,7 +2581,7 @@ class IonIntlTelInputComponent {
|
|
|
2585
2581
|
* @default 'Select Country'
|
|
2586
2582
|
* @memberof IonIntlTelInputComponent
|
|
2587
2583
|
*/
|
|
2588
|
-
modalTitle = 'Select Country';
|
|
2584
|
+
modalTitle = input('Select Country', ...(ngDevMode ? [{ debugName: "modalTitle" }] : []));
|
|
2589
2585
|
/**
|
|
2590
2586
|
* CSS class to attach to dial code selectionmodal.
|
|
2591
2587
|
* See more on.
|
|
@@ -2593,7 +2589,7 @@ class IonIntlTelInputComponent {
|
|
|
2593
2589
|
* @default 'ion-intl-tel-modal'
|
|
2594
2590
|
* @memberof IonIntlTelInputComponent
|
|
2595
2591
|
*/
|
|
2596
|
-
modalCssClass = 'ion-intl-tel-modal';
|
|
2592
|
+
modalCssClass = input('ion-intl-tel-modal', ...(ngDevMode ? [{ debugName: "modalCssClass" }] : []));
|
|
2597
2593
|
/**
|
|
2598
2594
|
* Placeholder for input in dial code selection modal.
|
|
2599
2595
|
* See more on.
|
|
@@ -2601,7 +2597,7 @@ class IonIntlTelInputComponent {
|
|
|
2601
2597
|
* @default 'Enter country name'
|
|
2602
2598
|
* @memberof IonIntlTelInputComponent
|
|
2603
2599
|
*/
|
|
2604
|
-
modalSearchPlaceholder = 'Enter country name';
|
|
2600
|
+
modalSearchPlaceholder = input('Enter country name', ...(ngDevMode ? [{ debugName: "modalSearchPlaceholder" }] : []));
|
|
2605
2601
|
/**
|
|
2606
2602
|
* Text for close button in dial code selection modal.
|
|
2607
2603
|
* See more on.
|
|
@@ -2609,7 +2605,7 @@ class IonIntlTelInputComponent {
|
|
|
2609
2605
|
* @default 'Close'
|
|
2610
2606
|
* @memberof IonIntlTelInputComponent
|
|
2611
2607
|
*/
|
|
2612
|
-
modalCloseText = 'Close';
|
|
2608
|
+
modalCloseText = input('Close', ...(ngDevMode ? [{ debugName: "modalCloseText" }] : []));
|
|
2613
2609
|
/**
|
|
2614
2610
|
* Slot for close button in dial code selection modal. [Ionic slots](https://ionicframework.com/docs/api/item) are supported
|
|
2615
2611
|
* See more on.
|
|
@@ -2617,7 +2613,7 @@ class IonIntlTelInputComponent {
|
|
|
2617
2613
|
* @default 'end'
|
|
2618
2614
|
* @memberof IonIntlTelInputComponent
|
|
2619
2615
|
*/
|
|
2620
|
-
modalCloseButtonSlot = 'end';
|
|
2616
|
+
modalCloseButtonSlot = input('end', ...(ngDevMode ? [{ debugName: "modalCloseButtonSlot" }] : []));
|
|
2621
2617
|
/**
|
|
2622
2618
|
* Determines whether dial code selection modal should be searchable or not.
|
|
2623
2619
|
* See more on.
|
|
@@ -2625,7 +2621,7 @@ class IonIntlTelInputComponent {
|
|
|
2625
2621
|
* @default 'true'
|
|
2626
2622
|
* @memberof IonIntlTelInputComponent
|
|
2627
2623
|
*/
|
|
2628
|
-
modalCanSearch = true;
|
|
2624
|
+
modalCanSearch = input(true, ...(ngDevMode ? [{ debugName: "modalCanSearch" }] : []));
|
|
2629
2625
|
/**
|
|
2630
2626
|
* Determines whether dial code selection modal is closed on backdrop click.
|
|
2631
2627
|
* See more on.
|
|
@@ -2633,7 +2629,7 @@ class IonIntlTelInputComponent {
|
|
|
2633
2629
|
* @default 'true'
|
|
2634
2630
|
* @memberof IonIntlTelInputComponent
|
|
2635
2631
|
*/
|
|
2636
|
-
modalShouldBackdropClose = true;
|
|
2632
|
+
modalShouldBackdropClose = input(true, ...(ngDevMode ? [{ debugName: "modalShouldBackdropClose" }] : []));
|
|
2637
2633
|
/**
|
|
2638
2634
|
* Determines whether input should be focused when dial code selection modal is opened.
|
|
2639
2635
|
* See more on.
|
|
@@ -2641,7 +2637,7 @@ class IonIntlTelInputComponent {
|
|
|
2641
2637
|
* @default 'true'
|
|
2642
2638
|
* @memberof IonIntlTelInputComponent
|
|
2643
2639
|
*/
|
|
2644
|
-
modalShouldFocusSearchbar = true;
|
|
2640
|
+
modalShouldFocusSearchbar = input(true, ...(ngDevMode ? [{ debugName: "modalShouldFocusSearchbar" }] : []));
|
|
2645
2641
|
/**
|
|
2646
2642
|
* Message to show when no countries are found for search in dial code selection modal.
|
|
2647
2643
|
* See more on.
|
|
@@ -2649,7 +2645,7 @@ class IonIntlTelInputComponent {
|
|
|
2649
2645
|
* @default 'true'
|
|
2650
2646
|
* @memberof IonIntlTelInputComponent
|
|
2651
2647
|
*/
|
|
2652
|
-
modalSearchFailText = 'No countries found';
|
|
2648
|
+
modalSearchFailText = input('No countries found', ...(ngDevMode ? [{ debugName: "modalSearchFailText" }] : []));
|
|
2653
2649
|
/**
|
|
2654
2650
|
* List of iso codes of manually selected countries as string, which will appear in the dropdown.
|
|
2655
2651
|
* **Note**: `onlyCountries` should be a string array of country iso codes.
|
|
@@ -2658,7 +2654,7 @@ class IonIntlTelInputComponent {
|
|
|
2658
2654
|
* @default null
|
|
2659
2655
|
* @memberof IonIntlTelInputComponent
|
|
2660
2656
|
*/
|
|
2661
|
-
onlyCountries = [];
|
|
2657
|
+
onlyCountries = input([], ...(ngDevMode ? [{ debugName: "onlyCountries" }] : []));
|
|
2662
2658
|
/**
|
|
2663
2659
|
* List of iso codesn as string of countries, which will appear at the top in dial code selection modal.
|
|
2664
2660
|
* **Note**: `preferredCountries` should be a string array of country iso codes.
|
|
@@ -2667,7 +2663,7 @@ class IonIntlTelInputComponent {
|
|
|
2667
2663
|
* @default null
|
|
2668
2664
|
* @memberof IonIntlTelInputComponent
|
|
2669
2665
|
*/
|
|
2670
|
-
preferredCountries = [];
|
|
2666
|
+
preferredCountries = input([], ...(ngDevMode ? [{ debugName: "preferredCountries" }] : []));
|
|
2671
2667
|
/**
|
|
2672
2668
|
* Determines whether first country should be selected in dial code select or not.
|
|
2673
2669
|
* See more on.
|
|
@@ -2675,7 +2671,7 @@ class IonIntlTelInputComponent {
|
|
|
2675
2671
|
* @default true
|
|
2676
2672
|
* @memberof IonIntlTelInputComponent
|
|
2677
2673
|
*/
|
|
2678
|
-
selectFirstCountry = true;
|
|
2674
|
+
selectFirstCountry = input(true, ...(ngDevMode ? [{ debugName: "selectFirstCountry" }] : []));
|
|
2679
2675
|
/**
|
|
2680
2676
|
* Determines whether to visually separate dialcode into the drop down element.
|
|
2681
2677
|
* See more on.
|
|
@@ -2683,64 +2679,64 @@ class IonIntlTelInputComponent {
|
|
|
2683
2679
|
* @default true
|
|
2684
2680
|
* @memberof IonIntlTelInputComponent
|
|
2685
2681
|
*/
|
|
2686
|
-
separateDialCode = true;
|
|
2682
|
+
separateDialCode = input(true, ...(ngDevMode ? [{ debugName: "separateDialCode" }] : []));
|
|
2687
2683
|
/**
|
|
2688
2684
|
* Fires when the Phone number Input is changed.
|
|
2689
2685
|
* See more on.
|
|
2690
2686
|
*
|
|
2691
2687
|
* @memberof IonIntlTelInputComponent
|
|
2692
2688
|
*/
|
|
2693
|
-
numberChange =
|
|
2689
|
+
numberChange = output();
|
|
2694
2690
|
/**
|
|
2695
2691
|
* Fires when the Phone number Input is blurred.
|
|
2696
2692
|
* See more on.
|
|
2697
2693
|
*
|
|
2698
2694
|
* @memberof IonIntlTelInputComponent
|
|
2699
2695
|
*/
|
|
2700
|
-
numberBlur =
|
|
2696
|
+
numberBlur = output();
|
|
2701
2697
|
/**
|
|
2702
2698
|
* Fires when the Phone number Input is focused.
|
|
2703
2699
|
* See more on.
|
|
2704
2700
|
*
|
|
2705
2701
|
* @memberof IonIntlTelInputComponent
|
|
2706
2702
|
*/
|
|
2707
|
-
numberFocus =
|
|
2703
|
+
numberFocus = output();
|
|
2708
2704
|
/**
|
|
2709
2705
|
* Fires when the user is typing in Phone number Input.
|
|
2710
2706
|
* See more on.
|
|
2711
2707
|
*
|
|
2712
2708
|
* @memberof IonIntlTelInputComponent
|
|
2713
2709
|
*/
|
|
2714
|
-
numberInput =
|
|
2710
|
+
numberInput = output();
|
|
2715
2711
|
/**
|
|
2716
2712
|
* Fires when the dial code selection is changed.
|
|
2717
2713
|
* See more on.
|
|
2718
2714
|
*
|
|
2719
2715
|
* @memberof IonIntlTelInputComponent
|
|
2720
2716
|
*/
|
|
2721
|
-
codeChange =
|
|
2717
|
+
codeChange = output();
|
|
2722
2718
|
/**
|
|
2723
2719
|
* Fires when the dial code selection modal is opened.
|
|
2724
2720
|
* See more on.
|
|
2725
2721
|
*
|
|
2726
2722
|
* @memberof IonIntlTelInputComponent
|
|
2727
2723
|
*/
|
|
2728
|
-
codeOpen =
|
|
2724
|
+
codeOpen = output();
|
|
2729
2725
|
/**
|
|
2730
2726
|
* Fires when the dial code selection modal is closed.
|
|
2731
2727
|
* See more on.
|
|
2732
2728
|
*
|
|
2733
2729
|
* @memberof IonIntlTelInputComponent
|
|
2734
2730
|
*/
|
|
2735
|
-
codeClose =
|
|
2731
|
+
codeClose = output();
|
|
2736
2732
|
/**
|
|
2737
2733
|
* Fires when a dial code is selected in dial code selection modal.
|
|
2738
2734
|
* See more on.
|
|
2739
2735
|
*
|
|
2740
2736
|
* @memberof IonIntlTelInputComponent
|
|
2741
2737
|
*/
|
|
2742
|
-
codeSelect =
|
|
2743
|
-
numberInputEl;
|
|
2738
|
+
codeSelect = output();
|
|
2739
|
+
numberInputEl = viewChild('numberInput', ...(ngDevMode ? [{ debugName: "numberInputEl" }] : []));
|
|
2744
2740
|
// tslint:disable-next-line: variable-name
|
|
2745
2741
|
_value = null;
|
|
2746
2742
|
country;
|
|
@@ -2749,11 +2745,8 @@ class IonIntlTelInputComponent {
|
|
|
2749
2745
|
disabled = false;
|
|
2750
2746
|
onTouched = () => { };
|
|
2751
2747
|
propagateChange = (_) => { };
|
|
2752
|
-
constructor(
|
|
2753
|
-
|
|
2754
|
-
this.platform = platform;
|
|
2755
|
-
this.ionIntlTelInputService = ionIntlTelInputService;
|
|
2756
|
-
this.modalCtrl = modalCtrl;
|
|
2748
|
+
constructor() {
|
|
2749
|
+
addIcons({ caretDown });
|
|
2757
2750
|
}
|
|
2758
2751
|
get value() {
|
|
2759
2752
|
return this._value;
|
|
@@ -2771,17 +2764,19 @@ class IonIntlTelInputComponent {
|
|
|
2771
2764
|
this.setItemClass(this.el, 'item-interactive', true);
|
|
2772
2765
|
this.fetchAllCountries();
|
|
2773
2766
|
this.setPreferredCountries();
|
|
2774
|
-
if (this.onlyCountries.length) {
|
|
2775
|
-
this.countries = this.countries.filter((country) => this.onlyCountries.includes(country.isoCode));
|
|
2767
|
+
if (this.onlyCountries().length) {
|
|
2768
|
+
this.countries = this.countries.filter((country) => this.onlyCountries().includes(country.isoCode));
|
|
2776
2769
|
}
|
|
2777
|
-
if (this.selectFirstCountry) {
|
|
2778
|
-
|
|
2779
|
-
|
|
2770
|
+
if (this.selectFirstCountry()) {
|
|
2771
|
+
const defaultCountryiso = this.defaultCountryiso();
|
|
2772
|
+
if (defaultCountryiso) {
|
|
2773
|
+
this.setCountry(this.getCountryByIsoCode(defaultCountryiso));
|
|
2780
2774
|
}
|
|
2781
2775
|
else {
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2776
|
+
const preferredCountries = this.preferredCountries();
|
|
2777
|
+
if (preferredCountries.length &&
|
|
2778
|
+
preferredCountries.includes(defaultCountryiso)) {
|
|
2779
|
+
this.setCountry(this.getCountryByIsoCode(preferredCountries[0]));
|
|
2785
2780
|
}
|
|
2786
2781
|
else {
|
|
2787
2782
|
this.setCountry(this.countries[0]);
|
|
@@ -2848,25 +2843,22 @@ class IonIntlTelInputComponent {
|
|
|
2848
2843
|
hasValue() {
|
|
2849
2844
|
return !this.isNullOrWhiteSpace(this.value);
|
|
2850
2845
|
}
|
|
2851
|
-
onCodeOpen() {
|
|
2852
|
-
this.codeOpen.emit();
|
|
2853
|
-
}
|
|
2854
2846
|
async openModal() {
|
|
2855
2847
|
const modal = await this.modalCtrl.create({
|
|
2856
2848
|
component: IonIntTelCodeComponent,
|
|
2857
|
-
cssClass: this.modalCssClass,
|
|
2858
|
-
backdropDismiss: this.modalShouldBackdropClose,
|
|
2849
|
+
cssClass: this.modalCssClass(),
|
|
2850
|
+
backdropDismiss: this.modalShouldBackdropClose(),
|
|
2859
2851
|
componentProps: {
|
|
2860
2852
|
country: this.country,
|
|
2861
|
-
canSearch: this.modalCanSearch,
|
|
2862
|
-
closeButtonText: this.modalCloseText,
|
|
2863
|
-
closeButtonSlot: this.modalCloseButtonSlot,
|
|
2853
|
+
canSearch: this.modalCanSearch(),
|
|
2854
|
+
closeButtonText: this.modalCloseText(),
|
|
2855
|
+
closeButtonSlot: this.modalCloseButtonSlot(),
|
|
2864
2856
|
countries: this.countries,
|
|
2865
|
-
title: this.modalTitle,
|
|
2866
|
-
searchFailText: this.modalSearchFailText,
|
|
2867
|
-
searchPlaceholder: this.modalSearchPlaceholder,
|
|
2868
|
-
shouldFocusSearchbar: this.modalShouldFocusSearchbar,
|
|
2869
|
-
dialCode: this.separateDialCode ? this.dialCodePrefix : null
|
|
2857
|
+
title: this.modalTitle(),
|
|
2858
|
+
searchFailText: this.modalSearchFailText(),
|
|
2859
|
+
searchPlaceholder: this.modalSearchPlaceholder(),
|
|
2860
|
+
shouldFocusSearchbar: this.modalShouldFocusSearchbar(),
|
|
2861
|
+
dialCode: this.separateDialCode() ? this.dialCodePrefix() : null
|
|
2870
2862
|
}
|
|
2871
2863
|
});
|
|
2872
2864
|
await modal.present();
|
|
@@ -2890,29 +2882,17 @@ class IonIntlTelInputComponent {
|
|
|
2890
2882
|
const internationallNo = googleNumber
|
|
2891
2883
|
? googleNumber.formatInternational()
|
|
2892
2884
|
: '';
|
|
2893
|
-
|
|
2894
|
-
? googleNumber.formatNational()
|
|
2895
|
-
: '';
|
|
2896
|
-
if (this.separateDialCode && internationallNo) {
|
|
2885
|
+
if (this.separateDialCode() && internationallNo) {
|
|
2897
2886
|
this.phoneNumber = this.removeDialCode(internationallNo);
|
|
2898
2887
|
}
|
|
2899
2888
|
this.emitValueChange(internationallNo);
|
|
2900
|
-
|
|
2889
|
+
// TODO: The 'emit' function requires a mandatory any argument
|
|
2890
|
+
this.codeChange.emit(undefined);
|
|
2901
2891
|
}
|
|
2902
2892
|
setTimeout(() => {
|
|
2903
|
-
this.numberInputEl.setFocus();
|
|
2893
|
+
this.numberInputEl().setFocus().then();
|
|
2904
2894
|
}, 400);
|
|
2905
2895
|
}
|
|
2906
|
-
onCodeClose() {
|
|
2907
|
-
this.onTouched();
|
|
2908
|
-
this.setIonicClasses(this.el);
|
|
2909
|
-
this.hasFocus = false;
|
|
2910
|
-
this.setItemClass(this.el, 'item-has-focus', false);
|
|
2911
|
-
this.codeClose.emit();
|
|
2912
|
-
}
|
|
2913
|
-
onCodeSelect() {
|
|
2914
|
-
this.codeSelect.emit();
|
|
2915
|
-
}
|
|
2916
2896
|
onIonNumberChange(event) {
|
|
2917
2897
|
this.setIonicClasses(this.el);
|
|
2918
2898
|
this.numberChange.emit(event);
|
|
@@ -2922,11 +2902,13 @@ class IonIntlTelInputComponent {
|
|
|
2922
2902
|
this.setIonicClasses(this.el);
|
|
2923
2903
|
this.hasFocus = false;
|
|
2924
2904
|
this.setItemClass(this.el, 'item-has-focus', false);
|
|
2905
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
2925
2906
|
this.numberBlur.emit();
|
|
2926
2907
|
}
|
|
2927
2908
|
onIonNumberFocus() {
|
|
2928
2909
|
this.hasFocus = true;
|
|
2929
2910
|
this.setItemClass(this.el, 'item-has-focus', true);
|
|
2911
|
+
// TODO: The 'emit' function requires a mandatory void argument
|
|
2930
2912
|
this.numberFocus.emit();
|
|
2931
2913
|
}
|
|
2932
2914
|
onIonNumberInput(event) {
|
|
@@ -2940,7 +2922,7 @@ class IonIntlTelInputComponent {
|
|
|
2940
2922
|
return;
|
|
2941
2923
|
}
|
|
2942
2924
|
if (this.country) {
|
|
2943
|
-
this.emitValueChange(this.dialCodePrefix + this.country.dialCode + ' ' + this.phoneNumber);
|
|
2925
|
+
this.emitValueChange(this.dialCodePrefix() + this.country.dialCode + ' ' + this.phoneNumber);
|
|
2944
2926
|
}
|
|
2945
2927
|
let googleNumber;
|
|
2946
2928
|
try {
|
|
@@ -2951,7 +2933,7 @@ class IonIntlTelInputComponent {
|
|
|
2951
2933
|
}
|
|
2952
2934
|
let isoCode = this.country ? this.country.isoCode : null;
|
|
2953
2935
|
// auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)
|
|
2954
|
-
if (this.enableAutoCountrySelect) {
|
|
2936
|
+
if (this.enableAutoCountrySelect()) {
|
|
2955
2937
|
isoCode =
|
|
2956
2938
|
googleNumber && googleNumber.country
|
|
2957
2939
|
? googleNumber.country
|
|
@@ -2974,7 +2956,7 @@ class IonIntlTelInputComponent {
|
|
|
2974
2956
|
const nationalNo = googleNumber
|
|
2975
2957
|
? googleNumber.formatNational()
|
|
2976
2958
|
: '';
|
|
2977
|
-
if (this.separateDialCode && internationallNo) {
|
|
2959
|
+
if (this.separateDialCode() && internationallNo) {
|
|
2978
2960
|
this.phoneNumber = this.removeDialCode(internationallNo);
|
|
2979
2961
|
}
|
|
2980
2962
|
this.emitValueChange(internationallNo);
|
|
@@ -3002,28 +2984,6 @@ class IonIntlTelInputComponent {
|
|
|
3002
2984
|
event.preventDefault();
|
|
3003
2985
|
}
|
|
3004
2986
|
}
|
|
3005
|
-
filterCountries(text) {
|
|
3006
|
-
return this.countries.filter((country) => {
|
|
3007
|
-
return (country.name.toLowerCase().indexOf(text) !== -1 ||
|
|
3008
|
-
country.name.toLowerCase().indexOf(text) !== -1 ||
|
|
3009
|
-
country.dialCode.toString().toLowerCase().indexOf(text) !== -1);
|
|
3010
|
-
});
|
|
3011
|
-
}
|
|
3012
|
-
getCountryIsoCode(countryCode, googleNumber) {
|
|
3013
|
-
const rawNumber = googleNumber.values_[2].toString();
|
|
3014
|
-
const countries = this.countries.filter((country) => country.dialCode === countryCode.toString());
|
|
3015
|
-
const mainCountry = countries.find((country) => country.areaCodes === undefined);
|
|
3016
|
-
const secondaryCountries = countries.filter((country) => country.areaCodes !== undefined);
|
|
3017
|
-
let matchedCountry = mainCountry ? mainCountry.isoCode : undefined;
|
|
3018
|
-
secondaryCountries.forEach((country) => {
|
|
3019
|
-
country.areaCodes.forEach((areaCode) => {
|
|
3020
|
-
if (rawNumber.startsWith(areaCode)) {
|
|
3021
|
-
matchedCountry = country.isoCode;
|
|
3022
|
-
}
|
|
3023
|
-
});
|
|
3024
|
-
});
|
|
3025
|
-
return matchedCountry;
|
|
3026
|
-
}
|
|
3027
2987
|
fetchAllCountries() {
|
|
3028
2988
|
this.countries = this.ionIntlTelInputService.getListOfCountries();
|
|
3029
2989
|
}
|
|
@@ -3046,7 +3006,7 @@ class IonIntlTelInputComponent {
|
|
|
3046
3006
|
return typeof value === 'object' && Object.keys(value).length === 0;
|
|
3047
3007
|
}
|
|
3048
3008
|
removeDialCode(phoneNumber) {
|
|
3049
|
-
if (this.separateDialCode && phoneNumber) {
|
|
3009
|
+
if (this.separateDialCode() && phoneNumber) {
|
|
3050
3010
|
phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);
|
|
3051
3011
|
}
|
|
3052
3012
|
return phoneNumber;
|
|
@@ -3056,22 +3016,19 @@ class IonIntlTelInputComponent {
|
|
|
3056
3016
|
this.codeChange.emit(this.country);
|
|
3057
3017
|
}
|
|
3058
3018
|
setPreferredCountries() {
|
|
3059
|
-
for (const preferedCountryIsoCode of this.preferredCountries) {
|
|
3019
|
+
for (const preferedCountryIsoCode of this.preferredCountries()) {
|
|
3060
3020
|
const country = this.getCountryByIsoCode(preferedCountryIsoCode);
|
|
3061
3021
|
country.priority = country ? 1 : country.priority;
|
|
3062
3022
|
}
|
|
3063
3023
|
this.countries.sort((a, b) => a.priority > b.priority ? -1 : a.priority < b.priority ? 1 : 0);
|
|
3064
3024
|
}
|
|
3065
|
-
startsWith = (input, search) => {
|
|
3066
|
-
return input.substr(0, search.length) === search;
|
|
3067
|
-
};
|
|
3068
3025
|
getClasses = (element) => {
|
|
3069
3026
|
const classList = element.classList;
|
|
3070
3027
|
const classes = [];
|
|
3071
3028
|
for (let i = 0; i < classList.length; i++) {
|
|
3072
3029
|
const item = classList.item(i);
|
|
3073
|
-
if (item !== null &&
|
|
3074
|
-
classes.push(`ion-${item.
|
|
3030
|
+
if (item !== null && item.startsWith('ng-')) {
|
|
3031
|
+
classes.push(`ion-${item.substring(3)}`);
|
|
3075
3032
|
}
|
|
3076
3033
|
}
|
|
3077
3034
|
return classes;
|
|
@@ -3090,18 +3047,18 @@ class IonIntlTelInputComponent {
|
|
|
3090
3047
|
};
|
|
3091
3048
|
setIonicClasses = (element) => {
|
|
3092
3049
|
raf(() => {
|
|
3093
|
-
const
|
|
3094
|
-
const classes = this.getClasses(
|
|
3095
|
-
this.setClasses(
|
|
3096
|
-
const item =
|
|
3050
|
+
const htmlElement = element.nativeElement;
|
|
3051
|
+
const classes = this.getClasses(htmlElement);
|
|
3052
|
+
this.setClasses(htmlElement, classes);
|
|
3053
|
+
const item = htmlElement.closest('ion-item');
|
|
3097
3054
|
if (item) {
|
|
3098
3055
|
this.setClasses(item, classes);
|
|
3099
3056
|
}
|
|
3100
3057
|
});
|
|
3101
3058
|
};
|
|
3102
3059
|
setItemClass = (element, className, addClass) => {
|
|
3103
|
-
const
|
|
3104
|
-
const item =
|
|
3060
|
+
const htmlElement = element.nativeElement;
|
|
3061
|
+
const item = htmlElement.closest('ion-item');
|
|
3105
3062
|
if (item) {
|
|
3106
3063
|
const classList = item.classList;
|
|
3107
3064
|
if (addClass) {
|
|
@@ -3112,25 +3069,32 @@ class IonIntlTelInputComponent {
|
|
|
3112
3069
|
}
|
|
3113
3070
|
}
|
|
3114
3071
|
};
|
|
3115
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
3116
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3072
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3073
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: IonIntlTelInputComponent, isStandalone: true, selector: "ion-intl-tel-input", inputs: { autocomplete: { classPropertyName: "autocomplete", publicName: "autocomplete", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, defaultCountryiso: { classPropertyName: "defaultCountryiso", publicName: "defaultCountryiso", isSignal: true, isRequired: false, transformFunction: null }, dialCodePrefix: { classPropertyName: "dialCodePrefix", publicName: "dialCodePrefix", isSignal: true, isRequired: false, transformFunction: null }, enableAutoCountrySelect: { classPropertyName: "enableAutoCountrySelect", publicName: "enableAutoCountrySelect", isSignal: true, isRequired: false, transformFunction: null }, enablePlaceholder: { classPropertyName: "enablePlaceholder", publicName: "enablePlaceholder", isSignal: true, isRequired: false, transformFunction: null }, fallbackPlaceholder: { classPropertyName: "fallbackPlaceholder", publicName: "fallbackPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, inputPlaceholder: { classPropertyName: "inputPlaceholder", publicName: "inputPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, inputLabelColor: { classPropertyName: "inputLabelColor", publicName: "inputLabelColor", isSignal: true, isRequired: false, transformFunction: null }, inputLabelPlacement: { classPropertyName: "inputLabelPlacement", publicName: "inputLabelPlacement", isSignal: true, isRequired: false, transformFunction: null }, usePatternPlaceholder: { classPropertyName: "usePatternPlaceholder", publicName: "usePatternPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, modalTitle: { classPropertyName: "modalTitle", publicName: "modalTitle", isSignal: true, isRequired: false, transformFunction: null }, modalCssClass: { classPropertyName: "modalCssClass", publicName: "modalCssClass", isSignal: true, isRequired: false, transformFunction: null }, modalSearchPlaceholder: { classPropertyName: "modalSearchPlaceholder", publicName: "modalSearchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, modalCloseText: { classPropertyName: "modalCloseText", publicName: "modalCloseText", isSignal: true, isRequired: false, transformFunction: null }, modalCloseButtonSlot: { classPropertyName: "modalCloseButtonSlot", publicName: "modalCloseButtonSlot", isSignal: true, isRequired: false, transformFunction: null }, modalCanSearch: { classPropertyName: "modalCanSearch", publicName: "modalCanSearch", isSignal: true, isRequired: false, transformFunction: null }, modalShouldBackdropClose: { classPropertyName: "modalShouldBackdropClose", publicName: "modalShouldBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, modalShouldFocusSearchbar: { classPropertyName: "modalShouldFocusSearchbar", publicName: "modalShouldFocusSearchbar", isSignal: true, isRequired: false, transformFunction: null }, modalSearchFailText: { classPropertyName: "modalSearchFailText", publicName: "modalSearchFailText", isSignal: true, isRequired: false, transformFunction: null }, onlyCountries: { classPropertyName: "onlyCountries", publicName: "onlyCountries", isSignal: true, isRequired: false, transformFunction: null }, preferredCountries: { classPropertyName: "preferredCountries", publicName: "preferredCountries", isSignal: true, isRequired: false, transformFunction: null }, selectFirstCountry: { classPropertyName: "selectFirstCountry", publicName: "selectFirstCountry", isSignal: true, isRequired: false, transformFunction: null }, separateDialCode: { classPropertyName: "separateDialCode", publicName: "separateDialCode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { numberChange: "numberChange", numberBlur: "numberBlur", numberFocus: "numberFocus", numberInput: "numberInput", codeChange: "codeChange", codeOpen: "codeOpen", codeClose: "codeClose", codeSelect: "codeSelect" }, host: { properties: { "class.ion-intl-tel-input": "this.cssClass", "class.ion-intl-tel-input-ios": "this.isIos", "class.ion-intl-tel-input-md": "this.isMD", "class.has-focus": "this.hasFocus", "class.ion-intl-tel-input-has-value": "this.hasValueCssClass", "class.ion-intl-tel-input-is-enabled": "this.isEnabled" } }, providers: [
|
|
3117
3074
|
{
|
|
3118
3075
|
provide: NG_VALUE_ACCESSOR,
|
|
3119
3076
|
useExisting: forwardRef((() => IonIntlTelInputComponent)),
|
|
3120
3077
|
multi: true,
|
|
3121
3078
|
},
|
|
3122
|
-
], viewQueries: [{ propertyName: "numberInputEl", first: true, predicate: ["numberInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ion-input\n
|
|
3079
|
+
], viewQueries: [{ propertyName: "numberInputEl", first: true, predicate: ["numberInput"], descendants: true, isSignal: true }], usesOnChanges: true, ngImport: i0, template: "<ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete()\"\n [required]=\"required()\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength()\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n [labelPlacement]=\"inputLabelPlacement()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder():separateDialCode():fallbackPlaceholder():usePatternPlaceholder()}}\">\n <div slot=\"label\">\n <ion-text [color]=\"inputLabelColor()\">{{inputLabel()}}</ion-text>\n </div>\n <ion-button\n slot=\"start\"\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\">\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span>@if (separateDialCode()) {\n <span class=\"ion-intl-tel-input-code\">{{dialCodePrefix()}}{{country.dialCode}}</span>\n }\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n</ion-input>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"], dependencies: [{ kind: "component", type: IonInput, selector: "ion-input", inputs: ["accept", "autocapitalize", "autocomplete", "autocorrect", "autofocus", "clearInput", "clearOnEdit", "color", "counter", "counterFormatter", "debounce", "disabled", "enterkeyhint", "errorText", "fill", "helperText", "inputmode", "label", "labelPlacement", "max", "maxlength", "min", "minlength", "mode", "multiple", "name", "pattern", "placeholder", "readonly", "required", "shape", "size", "spellcheck", "step", "type", "value"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: IonText, selector: "ion-text", inputs: ["color", "mode"] }, { kind: "component", type: IonButton, selector: "ion-button", inputs: ["buttonType", "color", "disabled", "download", "expand", "fill", "form", "href", "mode", "rel", "routerAnimation", "routerDirection", "shape", "size", "strong", "target", "type"] }, { kind: "component", type: IonIcon, selector: "ion-icon", inputs: ["color", "flipRtl", "icon", "ios", "lazy", "md", "mode", "name", "sanitize", "size", "src"] }, { kind: "pipe", type: CountryPlaceholder, name: "countryPlaceholder" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3123
3080
|
}
|
|
3124
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
3081
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputComponent, decorators: [{
|
|
3125
3082
|
type: Component,
|
|
3126
|
-
args: [{ selector: 'ion-intl-tel-input', providers: [
|
|
3083
|
+
args: [{ selector: 'ion-intl-tel-input', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [
|
|
3127
3084
|
{
|
|
3128
3085
|
provide: NG_VALUE_ACCESSOR,
|
|
3129
3086
|
useExisting: forwardRef((() => IonIntlTelInputComponent)),
|
|
3130
3087
|
multi: true,
|
|
3131
3088
|
},
|
|
3132
|
-
],
|
|
3133
|
-
|
|
3089
|
+
], imports: [
|
|
3090
|
+
IonInput,
|
|
3091
|
+
FormsModule,
|
|
3092
|
+
IonText,
|
|
3093
|
+
IonButton,
|
|
3094
|
+
IonIcon,
|
|
3095
|
+
CountryPlaceholder
|
|
3096
|
+
], template: "<ion-input\n #numberInput\n [(ngModel)]=\"phoneNumber\"\n [autocomplete]=\"autocomplete()\"\n [required]=\"required()\"\n [disabled] = \"disabled\"\n [attr.maxLength]=\"maxLength()\"\n type=\"tel\"\n (ionBlur)=\"onIonNumberBlur()\"\n (ionChange)=\"onIonNumberChange($event)\"\n (ionFocus)=\"onIonNumberFocus()\"\n (ionInput)=\"onIonNumberInput($event)\"\n (keydown)=\"onNumberKeyDown($event)\"\n (ngModelChange)=\"onNumberChange()\"\n [labelPlacement]=\"inputLabelPlacement()\"\n placeholder=\"{{country | countryPlaceholder: inputPlaceholder():separateDialCode():fallbackPlaceholder():usePatternPlaceholder()}}\">\n <div slot=\"label\">\n <ion-text [color]=\"inputLabelColor()\">{{inputLabel()}}</ion-text>\n </div>\n <ion-button\n slot=\"start\"\n fill=\"clear\"\n class=\"ion-intl-tel-input-btn\"\n [disabled] = \"disabled\"\n aria-label=\"country\"\n (click)=\"openModal()\">\n <span class=\"ion-intl-tel-input-flag fi fi-{{country.flagClass}}\"></span>@if (separateDialCode()) {\n <span class=\"ion-intl-tel-input-code\">{{dialCodePrefix()}}{{country.dialCode}}</span>\n }\n <ion-icon style=\"font-size:14px;opacity:.5;\" name=\"caret-down\"></ion-icon>\n</ion-button>\n</ion-input>\n", styles: [":host{width:100%;display:flex;align-items:center}:host ion-button{color:var(--ion-color);height:100%;margin:0}:host ion-button::part(native){padding-inline-start:0;padding-inline-end:2px;margin:0;font-size:16px;font-weight:400}:host .fi{margin-right:5px}\n"] }]
|
|
3097
|
+
}], ctorParameters: () => [], propDecorators: { cssClass: [{
|
|
3134
3098
|
type: HostBinding,
|
|
3135
3099
|
args: ['class.ion-intl-tel-input']
|
|
3136
3100
|
}], isIos: [{
|
|
@@ -3148,125 +3112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3148
3112
|
}], isEnabled: [{
|
|
3149
3113
|
type: HostBinding,
|
|
3150
3114
|
args: ['class.ion-intl-tel-input-is-enabled']
|
|
3151
|
-
}, {
|
|
3152
|
-
type: Input,
|
|
3153
|
-
args: ['isEnabled']
|
|
3154
|
-
}], autocomplete: [{
|
|
3155
|
-
type: Input
|
|
3156
|
-
}], required: [{
|
|
3157
|
-
type: Input
|
|
3158
|
-
}], defaultCountryiso: [{
|
|
3159
|
-
type: Input
|
|
3160
|
-
}], dialCodePrefix: [{
|
|
3161
|
-
type: Input
|
|
3162
|
-
}], enableAutoCountrySelect: [{
|
|
3163
|
-
type: Input
|
|
3164
|
-
}], enablePlaceholder: [{
|
|
3165
|
-
type: Input
|
|
3166
|
-
}], fallbackPlaceholder: [{
|
|
3167
|
-
type: Input
|
|
3168
|
-
}], inputPlaceholder: [{
|
|
3169
|
-
type: Input
|
|
3170
|
-
}], inputLabel: [{
|
|
3171
|
-
type: Input
|
|
3172
|
-
}], inputLabelColor: [{
|
|
3173
|
-
type: Input
|
|
3174
|
-
}], inputLabelPlacement: [{
|
|
3175
|
-
type: Input
|
|
3176
|
-
}], usePatternPlaceholder: [{
|
|
3177
|
-
type: Input
|
|
3178
|
-
}], maxLength: [{
|
|
3179
|
-
type: Input
|
|
3180
|
-
}], modalTitle: [{
|
|
3181
|
-
type: Input
|
|
3182
|
-
}], modalCssClass: [{
|
|
3183
|
-
type: Input
|
|
3184
|
-
}], modalSearchPlaceholder: [{
|
|
3185
|
-
type: Input
|
|
3186
|
-
}], modalCloseText: [{
|
|
3187
|
-
type: Input
|
|
3188
|
-
}], modalCloseButtonSlot: [{
|
|
3189
|
-
type: Input
|
|
3190
|
-
}], modalCanSearch: [{
|
|
3191
|
-
type: Input
|
|
3192
|
-
}], modalShouldBackdropClose: [{
|
|
3193
|
-
type: Input
|
|
3194
|
-
}], modalShouldFocusSearchbar: [{
|
|
3195
|
-
type: Input
|
|
3196
|
-
}], modalSearchFailText: [{
|
|
3197
|
-
type: Input
|
|
3198
|
-
}], onlyCountries: [{
|
|
3199
|
-
type: Input
|
|
3200
|
-
}], preferredCountries: [{
|
|
3201
|
-
type: Input
|
|
3202
|
-
}], selectFirstCountry: [{
|
|
3203
|
-
type: Input
|
|
3204
|
-
}], separateDialCode: [{
|
|
3205
|
-
type: Input
|
|
3206
|
-
}], numberChange: [{
|
|
3207
|
-
type: Output
|
|
3208
|
-
}], numberBlur: [{
|
|
3209
|
-
type: Output
|
|
3210
|
-
}], numberFocus: [{
|
|
3211
|
-
type: Output
|
|
3212
|
-
}], numberInput: [{
|
|
3213
|
-
type: Output
|
|
3214
|
-
}], codeChange: [{
|
|
3215
|
-
type: Output
|
|
3216
|
-
}], codeOpen: [{
|
|
3217
|
-
type: Output
|
|
3218
|
-
}], codeClose: [{
|
|
3219
|
-
type: Output
|
|
3220
|
-
}], codeSelect: [{
|
|
3221
|
-
type: Output
|
|
3222
|
-
}], numberInputEl: [{
|
|
3223
|
-
type: ViewChild,
|
|
3224
|
-
args: ['numberInput', { static: false }]
|
|
3225
|
-
}] } });
|
|
3226
|
-
|
|
3227
|
-
class IonIntlTelInputModule {
|
|
3228
|
-
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: IonIntlTelInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3229
|
-
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.9", ngImport: i0, type: IonIntlTelInputModule, declarations: [CountryPlaceholder,
|
|
3230
|
-
IonIntlTelInputValidatorDirective,
|
|
3231
|
-
IonIntlTelInputComponent,
|
|
3232
|
-
IonIntTelCodeComponent], imports: [CommonModule,
|
|
3233
|
-
FormsModule,
|
|
3234
|
-
IonicModule,
|
|
3235
|
-
ScrollingModule], exports: [IonIntlTelInputComponent,
|
|
3236
|
-
IonIntlTelInputValidatorDirective,
|
|
3237
|
-
IonIntTelCodeComponent] });
|
|
3238
|
-
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: IonIntlTelInputModule, providers: [
|
|
3239
|
-
IonIntlTelInputService
|
|
3240
|
-
], imports: [CommonModule,
|
|
3241
|
-
FormsModule,
|
|
3242
|
-
IonicModule,
|
|
3243
|
-
ScrollingModule] });
|
|
3244
|
-
}
|
|
3245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImport: i0, type: IonIntlTelInputModule, decorators: [{
|
|
3246
|
-
type: NgModule,
|
|
3247
|
-
args: [{
|
|
3248
|
-
declarations: [
|
|
3249
|
-
CountryPlaceholder,
|
|
3250
|
-
IonIntlTelInputValidatorDirective,
|
|
3251
|
-
IonIntlTelInputComponent,
|
|
3252
|
-
IonIntTelCodeComponent
|
|
3253
|
-
],
|
|
3254
|
-
imports: [
|
|
3255
|
-
CommonModule,
|
|
3256
|
-
FormsModule,
|
|
3257
|
-
IonicModule,
|
|
3258
|
-
ScrollingModule
|
|
3259
|
-
],
|
|
3260
|
-
exports: [
|
|
3261
|
-
IonIntlTelInputComponent,
|
|
3262
|
-
IonIntlTelInputValidatorDirective,
|
|
3263
|
-
IonIntTelCodeComponent
|
|
3264
|
-
],
|
|
3265
|
-
providers: [
|
|
3266
|
-
IonIntlTelInputService
|
|
3267
|
-
],
|
|
3268
|
-
}]
|
|
3269
|
-
}] });
|
|
3115
|
+
}], autocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "autocomplete", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], defaultCountryiso: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultCountryiso", required: false }] }], dialCodePrefix: [{ type: i0.Input, args: [{ isSignal: true, alias: "dialCodePrefix", required: false }] }], enableAutoCountrySelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableAutoCountrySelect", required: false }] }], enablePlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePlaceholder", required: false }] }], fallbackPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackPlaceholder", required: false }] }], inputPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputPlaceholder", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], inputLabelColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabelColor", required: false }] }], inputLabelPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabelPlacement", required: false }] }], usePatternPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "usePatternPlaceholder", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], modalTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalTitle", required: false }] }], modalCssClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalCssClass", required: false }] }], modalSearchPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalSearchPlaceholder", required: false }] }], modalCloseText: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalCloseText", required: false }] }], modalCloseButtonSlot: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalCloseButtonSlot", required: false }] }], modalCanSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalCanSearch", required: false }] }], modalShouldBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalShouldBackdropClose", required: false }] }], modalShouldFocusSearchbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalShouldFocusSearchbar", required: false }] }], modalSearchFailText: [{ type: i0.Input, args: [{ isSignal: true, alias: "modalSearchFailText", required: false }] }], onlyCountries: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlyCountries", required: false }] }], preferredCountries: [{ type: i0.Input, args: [{ isSignal: true, alias: "preferredCountries", required: false }] }], selectFirstCountry: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectFirstCountry", required: false }] }], separateDialCode: [{ type: i0.Input, args: [{ isSignal: true, alias: "separateDialCode", required: false }] }], numberChange: [{ type: i0.Output, args: ["numberChange"] }], numberBlur: [{ type: i0.Output, args: ["numberBlur"] }], numberFocus: [{ type: i0.Output, args: ["numberFocus"] }], numberInput: [{ type: i0.Output, args: ["numberInput"] }], codeChange: [{ type: i0.Output, args: ["codeChange"] }], codeOpen: [{ type: i0.Output, args: ["codeOpen"] }], codeClose: [{ type: i0.Output, args: ["codeClose"] }], codeSelect: [{ type: i0.Output, args: ["codeSelect"] }], numberInputEl: [{ type: i0.ViewChild, args: ['numberInput', { isSignal: true }] }] } });
|
|
3270
3116
|
|
|
3271
3117
|
/*
|
|
3272
3118
|
* Public API Surface of ion-intl-tel-input
|
|
@@ -3276,5 +3122,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.9", ngImpor
|
|
|
3276
3122
|
* Generated bundle index. Do not edit.
|
|
3277
3123
|
*/
|
|
3278
3124
|
|
|
3279
|
-
export { IonIntTelCodeComponent, IonIntlTelInputComponent,
|
|
3125
|
+
export { IonIntTelCodeComponent, IonIntlTelInputComponent, IonIntlTelInputService, IonIntlTelInputValidatorDirective, IonIntlTelInputValidators };
|
|
3280
3126
|
//# sourceMappingURL=crodriguezdominguez-ion-intl-tel-input.mjs.map
|