@crodriguezdominguez/ion-intl-tel-input 3.0.0 → 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.
@@ -1,14 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Injectable, Component, Input, ViewChild, Pipe, EventEmitter, forwardRef, HostBinding, Output } from '@angular/core';
3
- import * as i3 from '@angular/forms';
4
- import { NG_VALIDATORS, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
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
6
  import { addIcons } from 'ionicons';
7
7
  import { caretDown } from 'ionicons/icons';
8
- import * as i1 from '@ionic/angular/standalone';
9
- import { IonToolbar, IonTitle, IonHeader, IonButtons, IonButton, IonSearchbar, IonContent, IonList, IonRadioGroup, IonItem, IonRadio, IonText, IonInput, IonIcon } from '@ionic/angular/standalone';
8
+ import { ModalController, IonToolbar, IonTitle, IonHeader, IonButtons, IonButton, IonSearchbar, IonContent, IonList, IonRadioGroup, IonItem, IonRadio, IonText, Platform, IonInput, IonIcon } from '@ionic/angular/standalone';
10
9
  import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
11
- import { NgIf } from '@angular/common';
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: "18.2.12", ngImport: i0, type: IonIntlTelInputValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
55
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.12", type: IonIntlTelInputValidatorDirective, isStandalone: true, selector: "[ionIntlTelInputValid]", providers: [
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,7 +58,7 @@ class IonIntlTelInputValidatorDirective {
60
58
  },
61
59
  ], ngImport: i0 });
62
60
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputValidatorDirective, decorators: [{
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
@@ -2345,10 +2343,10 @@ class IonIntlTelInputService {
2345
2343
  getListOfCountries() {
2346
2344
  return this.countryList;
2347
2345
  }
2348
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2349
- /** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputService, providedIn: 'root' });
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' });
2350
2348
  }
2351
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputService, decorators: [{
2349
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputService, decorators: [{
2352
2350
  type: Injectable,
2353
2351
  args: [{
2354
2352
  providedIn: 'root'
@@ -2366,59 +2364,58 @@ const raf = (h) => {
2366
2364
  };
2367
2365
 
2368
2366
  class IonIntTelCodeComponent {
2369
- modalCtrl;
2370
- country;
2371
- canSearch;
2372
- closeButtonText = 'Close';
2373
- closeButtonSlot = 'end';
2374
- countries;
2375
- searchFailText;
2376
- searchPlaceholder;
2377
- shouldFocusSearchbar;
2378
- title;
2379
- dialCode;
2380
- sbar;
2381
- allCountries;
2382
- notFound;
2383
- constructor(modalCtrl) {
2384
- this.modalCtrl = modalCtrl;
2385
- }
2386
- ngOnInit() {
2387
- this.allCountries = this.countries;
2388
- }
2389
- ionViewDidEnter() {
2390
- if (this.sbar && this.shouldFocusSearchbar) {
2391
- setTimeout(() => { this.sbar.setFocus(); }, 400);
2392
- }
2393
- }
2394
- search(ev) {
2395
- let search = ev.detail.value;
2396
- 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();
2397
2381
  if (search === '' || search === null) {
2398
- this.countries = this.allCountries;
2382
+ return this.allCountries;
2399
2383
  }
2400
2384
  else {
2401
2385
  search = search.toLocaleLowerCase();
2402
- this.countries = this.allCountries.filter(r => {
2386
+ return this.allCountries.filter(r => {
2403
2387
  return (r.name && r.name.toLocaleLowerCase().indexOf(search) !== -1);
2404
2388
  });
2405
- if (this.countries.length === 0) {
2406
- this.notFound = true;
2407
- }
2408
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);
2402
+ }
2403
+ }
2404
+ search(ev) {
2405
+ this.searchText.set(ev.detail.value);
2409
2406
  }
2410
2407
  async itemTapped(c) {
2411
- await this.modalCtrl.dismiss(c);
2408
+ await this.modalController.dismiss(c);
2412
2409
  }
2413
2410
  async closeModal() {
2414
- await this.modalCtrl.dismiss(null);
2411
+ await this.modalController.dismiss(null);
2415
2412
  }
2416
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntTelCodeComponent, deps: [{ token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
2417
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: IonIntTelCodeComponent, isStandalone: true, selector: "ion-intl-tel-code", inputs: { country: "country", canSearch: "canSearch", closeButtonText: "closeButtonText", closeButtonSlot: "closeButtonSlot", countries: "countries", searchFailText: "searchFailText", searchPlaceholder: "searchPlaceholder", shouldFocusSearchbar: "shouldFocusSearchbar", title: "title", dialCode: "dialCode" }, viewQueries: [{ propertyName: "sbar", first: true, predicate: ["searchBar"], descendants: 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 <ion-searchbar #searchBar *ngIf=\"canSearch\"\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</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>\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>&nbsp;&nbsp;{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span>\n </ion-radio>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\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", "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"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
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>&nbsp;&nbsp;{{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 });
2418
2415
  }
2419
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntTelCodeComponent, decorators: [{
2416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntTelCodeComponent, decorators: [{
2420
2417
  type: Component,
2421
- args: [{ selector: 'ion-intl-tel-code', standalone: true, imports: [
2418
+ args: [{ selector: 'ion-intl-tel-code', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
2422
2419
  IonToolbar,
2423
2420
  IonTitle,
2424
2421
  IonHeader,
@@ -2433,33 +2430,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
2433
2430
  CdkFixedSizeVirtualScroll,
2434
2431
  IonRadio,
2435
2432
  IonText,
2436
- CdkVirtualForOf,
2437
- NgIf
2438
- ], 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 <ion-searchbar #searchBar *ngIf=\"canSearch\"\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</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>\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>&nbsp;&nbsp;{{c.name}} <span *ngIf=\"dialCode\">{{dialCode}}{{c.displayDialCode}}</span>\n </ion-radio>\n </ion-item>\n </ion-radio-group>\n <ion-item lines=\"none\" *ngIf=\"notFound\">\n <ion-text>{{searchFailText}}</ion-text>\n </ion-item>\n </ion-list>\n </cdk-virtual-scroll-viewport>\n</ion-content>\n" }]
2439
- }], ctorParameters: () => [{ type: i1.ModalController }], propDecorators: { country: [{
2440
- type: Input
2441
- }], canSearch: [{
2442
- type: Input
2443
- }], closeButtonText: [{
2444
- type: Input
2445
- }], closeButtonSlot: [{
2446
- type: Input
2447
- }], countries: [{
2448
- type: Input
2449
- }], searchFailText: [{
2450
- type: Input
2451
- }], searchPlaceholder: [{
2452
- type: Input
2453
- }], shouldFocusSearchbar: [{
2454
- type: Input
2455
- }], title: [{
2456
- type: Input
2457
- }], dialCode: [{
2458
- type: Input
2459
- }], sbar: [{
2460
- type: ViewChild,
2461
- args: ['searchBar']
2462
- }] } });
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>&nbsp;&nbsp;{{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 }] }] } });
2463
2436
 
2464
2437
  class CountryPlaceholder {
2465
2438
  transform(country, inputPlaceholder, separateDialCode, fallbackPlaceholder, usePatternPlaceholder) {
@@ -2487,10 +2460,10 @@ class CountryPlaceholder {
2487
2460
  return fallbackPlaceholder;
2488
2461
  }
2489
2462
  }
2490
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CountryPlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2491
- /** @nocollapse */ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.12", ngImport: i0, type: CountryPlaceholder, isStandalone: true, name: "countryPlaceholder" });
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" });
2492
2465
  }
2493
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: CountryPlaceholder, decorators: [{
2466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: CountryPlaceholder, decorators: [{
2494
2467
  type: Pipe,
2495
2468
  args: [{ standalone: true, name: 'countryPlaceholder' }]
2496
2469
  }] });
@@ -2501,12 +2474,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
2501
2474
  /**
2502
2475
  * @author Azzam Asghar <azzam.asghar@interstellus.com>
2503
2476
  * @author Steve Drew <sdrew@waitwell.ca>
2477
+ * @author Carlos Rodríguez <carlosrodriguez@ugr.es>
2504
2478
  */
2505
2479
  class IonIntlTelInputComponent {
2506
- el;
2507
- platform;
2508
- ionIntlTelInputService;
2509
- modalCtrl;
2480
+ el = inject(ElementRef);
2481
+ platform = inject(Platform);
2482
+ ionIntlTelInputService = inject(IonIntlTelInputService);
2483
+ modalCtrl = inject(ModalController);
2510
2484
  cssClass = true;
2511
2485
  isIos;
2512
2486
  isMD;
@@ -2523,14 +2497,14 @@ class IonIntlTelInputComponent {
2523
2497
  * @default 'off'
2524
2498
  * @memberof IonIntlTelInputComponent
2525
2499
  */
2526
- autocomplete = 'off';
2500
+ autocomplete = input('off', ...(ngDevMode ? [{ debugName: "autocomplete" }] : []));
2527
2501
  /**
2528
2502
  * required, passed onto ion-input so we can be accessiblity compliant
2529
2503
  *
2530
2504
  * @default false
2531
2505
  * @memberof IonIntlTelInputComponent
2532
2506
  */
2533
- required = false;
2507
+ required = input(false, ...(ngDevMode ? [{ debugName: "required" }] : []));
2534
2508
  /**
2535
2509
  * Iso Code of default selected Country.
2536
2510
  * See more on.
@@ -2538,7 +2512,7 @@ class IonIntlTelInputComponent {
2538
2512
  * @default ''
2539
2513
  * @memberof IonIntlTelInputComponent
2540
2514
  */
2541
- defaultCountryiso = '';
2515
+ defaultCountryiso = input('', ...(ngDevMode ? [{ debugName: "defaultCountryiso" }] : []));
2542
2516
  /**
2543
2517
  * Determines whether to use `00` or `+` as dial code prefix.
2544
2518
  * Available attributes are '+' | '00'.
@@ -2547,7 +2521,7 @@ class IonIntlTelInputComponent {
2547
2521
  * @default +
2548
2522
  * @memberof IonIntlTelInputComponent
2549
2523
  */
2550
- dialCodePrefix = '+';
2524
+ dialCodePrefix = input('+', ...(ngDevMode ? [{ debugName: "dialCodePrefix" }] : []));
2551
2525
  /**
2552
2526
  * Determines whether to select automatic country based on user input.
2553
2527
  * See more on.
@@ -2555,7 +2529,7 @@ class IonIntlTelInputComponent {
2555
2529
  * @default true
2556
2530
  * @memberof IonIntlTelInputComponent
2557
2531
  */
2558
- enableAutoCountrySelect = true;
2532
+ enableAutoCountrySelect = input(true, ...(ngDevMode ? [{ debugName: "enableAutoCountrySelect" }] : []));
2559
2533
  /**
2560
2534
  * Determines whether an example number will be shown as a placeholder in input.
2561
2535
  * See more on.
@@ -2563,7 +2537,7 @@ class IonIntlTelInputComponent {
2563
2537
  * @default true
2564
2538
  * @memberof IonIntlTelInputComponent
2565
2539
  */
2566
- enablePlaceholder = true;
2540
+ enablePlaceholder = input(true, ...(ngDevMode ? [{ debugName: "enablePlaceholder" }] : []));
2567
2541
  /**
2568
2542
  * A fallaback placeholder to be used if no example number is found for a country.
2569
2543
  * See more on.
@@ -2571,7 +2545,7 @@ class IonIntlTelInputComponent {
2571
2545
  * @default ''
2572
2546
  * @memberof IonIntlTelInputComponent
2573
2547
  */
2574
- fallbackPlaceholder = '';
2548
+ fallbackPlaceholder = input('', ...(ngDevMode ? [{ debugName: "fallbackPlaceholder" }] : []));
2575
2549
  /**
2576
2550
  * If a custom placeholder is needed for input.
2577
2551
  * If this property is set it will override `enablePlaceholder` and only this placeholder will be shown.
@@ -2580,10 +2554,10 @@ class IonIntlTelInputComponent {
2580
2554
  * @default ''
2581
2555
  * @memberof IonIntlTelInputComponent
2582
2556
  */
2583
- inputPlaceholder = '';
2584
- inputLabel = '';
2585
- inputLabelColor = undefined;
2586
- 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" }] : []));
2587
2561
  /**
2588
2562
  * Instead of an example phone number, use a x pattern. Such as xxx-xxx-xxxx, this will be obtained
2589
2563
  * based on the example number from the google phone lib.
@@ -2591,7 +2565,7 @@ class IonIntlTelInputComponent {
2591
2565
  * @default true
2592
2566
  * @memberof IonIntlTelInputComponent
2593
2567
  */
2594
- usePatternPlaceholder = true;
2568
+ usePatternPlaceholder = input(true, ...(ngDevMode ? [{ debugName: "usePatternPlaceholder" }] : []));
2595
2569
  /**
2596
2570
  * Maximum Length for input.
2597
2571
  * See more on.
@@ -2599,7 +2573,7 @@ class IonIntlTelInputComponent {
2599
2573
  * @default '15'
2600
2574
  * @memberof IonIntlTelInputComponent
2601
2575
  */
2602
- maxLength = '15';
2576
+ maxLength = input('15', ...(ngDevMode ? [{ debugName: "maxLength" }] : []));
2603
2577
  /**
2604
2578
  * Title of modal opened to select country dial code.
2605
2579
  * See more on.
@@ -2607,7 +2581,7 @@ class IonIntlTelInputComponent {
2607
2581
  * @default 'Select Country'
2608
2582
  * @memberof IonIntlTelInputComponent
2609
2583
  */
2610
- modalTitle = 'Select Country';
2584
+ modalTitle = input('Select Country', ...(ngDevMode ? [{ debugName: "modalTitle" }] : []));
2611
2585
  /**
2612
2586
  * CSS class to attach to dial code selectionmodal.
2613
2587
  * See more on.
@@ -2615,7 +2589,7 @@ class IonIntlTelInputComponent {
2615
2589
  * @default 'ion-intl-tel-modal'
2616
2590
  * @memberof IonIntlTelInputComponent
2617
2591
  */
2618
- modalCssClass = 'ion-intl-tel-modal';
2592
+ modalCssClass = input('ion-intl-tel-modal', ...(ngDevMode ? [{ debugName: "modalCssClass" }] : []));
2619
2593
  /**
2620
2594
  * Placeholder for input in dial code selection modal.
2621
2595
  * See more on.
@@ -2623,7 +2597,7 @@ class IonIntlTelInputComponent {
2623
2597
  * @default 'Enter country name'
2624
2598
  * @memberof IonIntlTelInputComponent
2625
2599
  */
2626
- modalSearchPlaceholder = 'Enter country name';
2600
+ modalSearchPlaceholder = input('Enter country name', ...(ngDevMode ? [{ debugName: "modalSearchPlaceholder" }] : []));
2627
2601
  /**
2628
2602
  * Text for close button in dial code selection modal.
2629
2603
  * See more on.
@@ -2631,7 +2605,7 @@ class IonIntlTelInputComponent {
2631
2605
  * @default 'Close'
2632
2606
  * @memberof IonIntlTelInputComponent
2633
2607
  */
2634
- modalCloseText = 'Close';
2608
+ modalCloseText = input('Close', ...(ngDevMode ? [{ debugName: "modalCloseText" }] : []));
2635
2609
  /**
2636
2610
  * Slot for close button in dial code selection modal. [Ionic slots](https://ionicframework.com/docs/api/item) are supported
2637
2611
  * See more on.
@@ -2639,7 +2613,7 @@ class IonIntlTelInputComponent {
2639
2613
  * @default 'end'
2640
2614
  * @memberof IonIntlTelInputComponent
2641
2615
  */
2642
- modalCloseButtonSlot = 'end';
2616
+ modalCloseButtonSlot = input('end', ...(ngDevMode ? [{ debugName: "modalCloseButtonSlot" }] : []));
2643
2617
  /**
2644
2618
  * Determines whether dial code selection modal should be searchable or not.
2645
2619
  * See more on.
@@ -2647,7 +2621,7 @@ class IonIntlTelInputComponent {
2647
2621
  * @default 'true'
2648
2622
  * @memberof IonIntlTelInputComponent
2649
2623
  */
2650
- modalCanSearch = true;
2624
+ modalCanSearch = input(true, ...(ngDevMode ? [{ debugName: "modalCanSearch" }] : []));
2651
2625
  /**
2652
2626
  * Determines whether dial code selection modal is closed on backdrop click.
2653
2627
  * See more on.
@@ -2655,7 +2629,7 @@ class IonIntlTelInputComponent {
2655
2629
  * @default 'true'
2656
2630
  * @memberof IonIntlTelInputComponent
2657
2631
  */
2658
- modalShouldBackdropClose = true;
2632
+ modalShouldBackdropClose = input(true, ...(ngDevMode ? [{ debugName: "modalShouldBackdropClose" }] : []));
2659
2633
  /**
2660
2634
  * Determines whether input should be focused when dial code selection modal is opened.
2661
2635
  * See more on.
@@ -2663,7 +2637,7 @@ class IonIntlTelInputComponent {
2663
2637
  * @default 'true'
2664
2638
  * @memberof IonIntlTelInputComponent
2665
2639
  */
2666
- modalShouldFocusSearchbar = true;
2640
+ modalShouldFocusSearchbar = input(true, ...(ngDevMode ? [{ debugName: "modalShouldFocusSearchbar" }] : []));
2667
2641
  /**
2668
2642
  * Message to show when no countries are found for search in dial code selection modal.
2669
2643
  * See more on.
@@ -2671,7 +2645,7 @@ class IonIntlTelInputComponent {
2671
2645
  * @default 'true'
2672
2646
  * @memberof IonIntlTelInputComponent
2673
2647
  */
2674
- modalSearchFailText = 'No countries found';
2648
+ modalSearchFailText = input('No countries found', ...(ngDevMode ? [{ debugName: "modalSearchFailText" }] : []));
2675
2649
  /**
2676
2650
  * List of iso codes of manually selected countries as string, which will appear in the dropdown.
2677
2651
  * **Note**: `onlyCountries` should be a string array of country iso codes.
@@ -2680,7 +2654,7 @@ class IonIntlTelInputComponent {
2680
2654
  * @default null
2681
2655
  * @memberof IonIntlTelInputComponent
2682
2656
  */
2683
- onlyCountries = [];
2657
+ onlyCountries = input([], ...(ngDevMode ? [{ debugName: "onlyCountries" }] : []));
2684
2658
  /**
2685
2659
  * List of iso codesn as string of countries, which will appear at the top in dial code selection modal.
2686
2660
  * **Note**: `preferredCountries` should be a string array of country iso codes.
@@ -2689,7 +2663,7 @@ class IonIntlTelInputComponent {
2689
2663
  * @default null
2690
2664
  * @memberof IonIntlTelInputComponent
2691
2665
  */
2692
- preferredCountries = [];
2666
+ preferredCountries = input([], ...(ngDevMode ? [{ debugName: "preferredCountries" }] : []));
2693
2667
  /**
2694
2668
  * Determines whether first country should be selected in dial code select or not.
2695
2669
  * See more on.
@@ -2697,7 +2671,7 @@ class IonIntlTelInputComponent {
2697
2671
  * @default true
2698
2672
  * @memberof IonIntlTelInputComponent
2699
2673
  */
2700
- selectFirstCountry = true;
2674
+ selectFirstCountry = input(true, ...(ngDevMode ? [{ debugName: "selectFirstCountry" }] : []));
2701
2675
  /**
2702
2676
  * Determines whether to visually separate dialcode into the drop down element.
2703
2677
  * See more on.
@@ -2705,64 +2679,64 @@ class IonIntlTelInputComponent {
2705
2679
  * @default true
2706
2680
  * @memberof IonIntlTelInputComponent
2707
2681
  */
2708
- separateDialCode = true;
2682
+ separateDialCode = input(true, ...(ngDevMode ? [{ debugName: "separateDialCode" }] : []));
2709
2683
  /**
2710
2684
  * Fires when the Phone number Input is changed.
2711
2685
  * See more on.
2712
2686
  *
2713
2687
  * @memberof IonIntlTelInputComponent
2714
2688
  */
2715
- numberChange = new EventEmitter();
2689
+ numberChange = output();
2716
2690
  /**
2717
2691
  * Fires when the Phone number Input is blurred.
2718
2692
  * See more on.
2719
2693
  *
2720
2694
  * @memberof IonIntlTelInputComponent
2721
2695
  */
2722
- numberBlur = new EventEmitter();
2696
+ numberBlur = output();
2723
2697
  /**
2724
2698
  * Fires when the Phone number Input is focused.
2725
2699
  * See more on.
2726
2700
  *
2727
2701
  * @memberof IonIntlTelInputComponent
2728
2702
  */
2729
- numberFocus = new EventEmitter();
2703
+ numberFocus = output();
2730
2704
  /**
2731
2705
  * Fires when the user is typing in Phone number Input.
2732
2706
  * See more on.
2733
2707
  *
2734
2708
  * @memberof IonIntlTelInputComponent
2735
2709
  */
2736
- numberInput = new EventEmitter();
2710
+ numberInput = output();
2737
2711
  /**
2738
2712
  * Fires when the dial code selection is changed.
2739
2713
  * See more on.
2740
2714
  *
2741
2715
  * @memberof IonIntlTelInputComponent
2742
2716
  */
2743
- codeChange = new EventEmitter();
2717
+ codeChange = output();
2744
2718
  /**
2745
2719
  * Fires when the dial code selection modal is opened.
2746
2720
  * See more on.
2747
2721
  *
2748
2722
  * @memberof IonIntlTelInputComponent
2749
2723
  */
2750
- codeOpen = new EventEmitter();
2724
+ codeOpen = output();
2751
2725
  /**
2752
2726
  * Fires when the dial code selection modal is closed.
2753
2727
  * See more on.
2754
2728
  *
2755
2729
  * @memberof IonIntlTelInputComponent
2756
2730
  */
2757
- codeClose = new EventEmitter();
2731
+ codeClose = output();
2758
2732
  /**
2759
2733
  * Fires when a dial code is selected in dial code selection modal.
2760
2734
  * See more on.
2761
2735
  *
2762
2736
  * @memberof IonIntlTelInputComponent
2763
2737
  */
2764
- codeSelect = new EventEmitter();
2765
- numberInputEl;
2738
+ codeSelect = output();
2739
+ numberInputEl = viewChild('numberInput', ...(ngDevMode ? [{ debugName: "numberInputEl" }] : []));
2766
2740
  // tslint:disable-next-line: variable-name
2767
2741
  _value = null;
2768
2742
  country;
@@ -2771,11 +2745,7 @@ class IonIntlTelInputComponent {
2771
2745
  disabled = false;
2772
2746
  onTouched = () => { };
2773
2747
  propagateChange = (_) => { };
2774
- constructor(el, platform, ionIntlTelInputService, modalCtrl) {
2775
- this.el = el;
2776
- this.platform = platform;
2777
- this.ionIntlTelInputService = ionIntlTelInputService;
2778
- this.modalCtrl = modalCtrl;
2748
+ constructor() {
2779
2749
  addIcons({ caretDown });
2780
2750
  }
2781
2751
  get value() {
@@ -2794,17 +2764,19 @@ class IonIntlTelInputComponent {
2794
2764
  this.setItemClass(this.el, 'item-interactive', true);
2795
2765
  this.fetchAllCountries();
2796
2766
  this.setPreferredCountries();
2797
- if (this.onlyCountries.length) {
2798
- 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));
2799
2769
  }
2800
- if (this.selectFirstCountry) {
2801
- if (this.defaultCountryiso) {
2802
- this.setCountry(this.getCountryByIsoCode(this.defaultCountryiso));
2770
+ if (this.selectFirstCountry()) {
2771
+ const defaultCountryiso = this.defaultCountryiso();
2772
+ if (defaultCountryiso) {
2773
+ this.setCountry(this.getCountryByIsoCode(defaultCountryiso));
2803
2774
  }
2804
2775
  else {
2805
- if (this.preferredCountries.length &&
2806
- this.preferredCountries.includes(this.defaultCountryiso)) {
2807
- this.setCountry(this.getCountryByIsoCode(this.preferredCountries[0]));
2776
+ const preferredCountries = this.preferredCountries();
2777
+ if (preferredCountries.length &&
2778
+ preferredCountries.includes(defaultCountryiso)) {
2779
+ this.setCountry(this.getCountryByIsoCode(preferredCountries[0]));
2808
2780
  }
2809
2781
  else {
2810
2782
  this.setCountry(this.countries[0]);
@@ -2871,25 +2843,22 @@ class IonIntlTelInputComponent {
2871
2843
  hasValue() {
2872
2844
  return !this.isNullOrWhiteSpace(this.value);
2873
2845
  }
2874
- onCodeOpen() {
2875
- this.codeOpen.emit();
2876
- }
2877
2846
  async openModal() {
2878
2847
  const modal = await this.modalCtrl.create({
2879
2848
  component: IonIntTelCodeComponent,
2880
- cssClass: this.modalCssClass,
2881
- backdropDismiss: this.modalShouldBackdropClose,
2849
+ cssClass: this.modalCssClass(),
2850
+ backdropDismiss: this.modalShouldBackdropClose(),
2882
2851
  componentProps: {
2883
2852
  country: this.country,
2884
- canSearch: this.modalCanSearch,
2885
- closeButtonText: this.modalCloseText,
2886
- closeButtonSlot: this.modalCloseButtonSlot,
2853
+ canSearch: this.modalCanSearch(),
2854
+ closeButtonText: this.modalCloseText(),
2855
+ closeButtonSlot: this.modalCloseButtonSlot(),
2887
2856
  countries: this.countries,
2888
- title: this.modalTitle,
2889
- searchFailText: this.modalSearchFailText,
2890
- searchPlaceholder: this.modalSearchPlaceholder,
2891
- shouldFocusSearchbar: this.modalShouldFocusSearchbar,
2892
- 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
2893
2862
  }
2894
2863
  });
2895
2864
  await modal.present();
@@ -2913,29 +2882,17 @@ class IonIntlTelInputComponent {
2913
2882
  const internationallNo = googleNumber
2914
2883
  ? googleNumber.formatInternational()
2915
2884
  : '';
2916
- const nationalNo = googleNumber
2917
- ? googleNumber.formatNational()
2918
- : '';
2919
- if (this.separateDialCode && internationallNo) {
2885
+ if (this.separateDialCode() && internationallNo) {
2920
2886
  this.phoneNumber = this.removeDialCode(internationallNo);
2921
2887
  }
2922
2888
  this.emitValueChange(internationallNo);
2923
- this.codeChange.emit();
2889
+ // TODO: The 'emit' function requires a mandatory any argument
2890
+ this.codeChange.emit(undefined);
2924
2891
  }
2925
2892
  setTimeout(() => {
2926
- this.numberInputEl.setFocus();
2893
+ this.numberInputEl().setFocus().then();
2927
2894
  }, 400);
2928
2895
  }
2929
- onCodeClose() {
2930
- this.onTouched();
2931
- this.setIonicClasses(this.el);
2932
- this.hasFocus = false;
2933
- this.setItemClass(this.el, 'item-has-focus', false);
2934
- this.codeClose.emit();
2935
- }
2936
- onCodeSelect() {
2937
- this.codeSelect.emit();
2938
- }
2939
2896
  onIonNumberChange(event) {
2940
2897
  this.setIonicClasses(this.el);
2941
2898
  this.numberChange.emit(event);
@@ -2945,11 +2902,13 @@ class IonIntlTelInputComponent {
2945
2902
  this.setIonicClasses(this.el);
2946
2903
  this.hasFocus = false;
2947
2904
  this.setItemClass(this.el, 'item-has-focus', false);
2905
+ // TODO: The 'emit' function requires a mandatory void argument
2948
2906
  this.numberBlur.emit();
2949
2907
  }
2950
2908
  onIonNumberFocus() {
2951
2909
  this.hasFocus = true;
2952
2910
  this.setItemClass(this.el, 'item-has-focus', true);
2911
+ // TODO: The 'emit' function requires a mandatory void argument
2953
2912
  this.numberFocus.emit();
2954
2913
  }
2955
2914
  onIonNumberInput(event) {
@@ -2963,7 +2922,7 @@ class IonIntlTelInputComponent {
2963
2922
  return;
2964
2923
  }
2965
2924
  if (this.country) {
2966
- this.emitValueChange(this.dialCodePrefix + this.country.dialCode + ' ' + this.phoneNumber);
2925
+ this.emitValueChange(this.dialCodePrefix() + this.country.dialCode + ' ' + this.phoneNumber);
2967
2926
  }
2968
2927
  let googleNumber;
2969
2928
  try {
@@ -2974,7 +2933,7 @@ class IonIntlTelInputComponent {
2974
2933
  }
2975
2934
  let isoCode = this.country ? this.country.isoCode : null;
2976
2935
  // auto select country based on the extension (and areaCode if needed) (e.g select Canada if number starts with +1 416)
2977
- if (this.enableAutoCountrySelect) {
2936
+ if (this.enableAutoCountrySelect()) {
2978
2937
  isoCode =
2979
2938
  googleNumber && googleNumber.country
2980
2939
  ? googleNumber.country
@@ -2997,7 +2956,7 @@ class IonIntlTelInputComponent {
2997
2956
  const nationalNo = googleNumber
2998
2957
  ? googleNumber.formatNational()
2999
2958
  : '';
3000
- if (this.separateDialCode && internationallNo) {
2959
+ if (this.separateDialCode() && internationallNo) {
3001
2960
  this.phoneNumber = this.removeDialCode(internationallNo);
3002
2961
  }
3003
2962
  this.emitValueChange(internationallNo);
@@ -3025,28 +2984,6 @@ class IonIntlTelInputComponent {
3025
2984
  event.preventDefault();
3026
2985
  }
3027
2986
  }
3028
- filterCountries(text) {
3029
- return this.countries.filter((country) => {
3030
- return (country.name.toLowerCase().indexOf(text) !== -1 ||
3031
- country.name.toLowerCase().indexOf(text) !== -1 ||
3032
- country.dialCode.toString().toLowerCase().indexOf(text) !== -1);
3033
- });
3034
- }
3035
- getCountryIsoCode(countryCode, googleNumber) {
3036
- const rawNumber = googleNumber.values_[2].toString();
3037
- const countries = this.countries.filter((country) => country.dialCode === countryCode.toString());
3038
- const mainCountry = countries.find((country) => country.areaCodes === undefined);
3039
- const secondaryCountries = countries.filter((country) => country.areaCodes !== undefined);
3040
- let matchedCountry = mainCountry ? mainCountry.isoCode : undefined;
3041
- secondaryCountries.forEach((country) => {
3042
- country.areaCodes.forEach((areaCode) => {
3043
- if (rawNumber.startsWith(areaCode)) {
3044
- matchedCountry = country.isoCode;
3045
- }
3046
- });
3047
- });
3048
- return matchedCountry;
3049
- }
3050
2987
  fetchAllCountries() {
3051
2988
  this.countries = this.ionIntlTelInputService.getListOfCountries();
3052
2989
  }
@@ -3069,7 +3006,7 @@ class IonIntlTelInputComponent {
3069
3006
  return typeof value === 'object' && Object.keys(value).length === 0;
3070
3007
  }
3071
3008
  removeDialCode(phoneNumber) {
3072
- if (this.separateDialCode && phoneNumber) {
3009
+ if (this.separateDialCode() && phoneNumber) {
3073
3010
  phoneNumber = phoneNumber.substr(phoneNumber.indexOf(' ') + 1);
3074
3011
  }
3075
3012
  return phoneNumber;
@@ -3079,22 +3016,19 @@ class IonIntlTelInputComponent {
3079
3016
  this.codeChange.emit(this.country);
3080
3017
  }
3081
3018
  setPreferredCountries() {
3082
- for (const preferedCountryIsoCode of this.preferredCountries) {
3019
+ for (const preferedCountryIsoCode of this.preferredCountries()) {
3083
3020
  const country = this.getCountryByIsoCode(preferedCountryIsoCode);
3084
3021
  country.priority = country ? 1 : country.priority;
3085
3022
  }
3086
3023
  this.countries.sort((a, b) => a.priority > b.priority ? -1 : a.priority < b.priority ? 1 : 0);
3087
3024
  }
3088
- startsWith = (input, search) => {
3089
- return input.substr(0, search.length) === search;
3090
- };
3091
3025
  getClasses = (element) => {
3092
3026
  const classList = element.classList;
3093
3027
  const classes = [];
3094
3028
  for (let i = 0; i < classList.length; i++) {
3095
3029
  const item = classList.item(i);
3096
- if (item !== null && this.startsWith(item, 'ng-')) {
3097
- classes.push(`ion-${item.substr(3)}`);
3030
+ if (item !== null && item.startsWith('ng-')) {
3031
+ classes.push(`ion-${item.substring(3)}`);
3098
3032
  }
3099
3033
  }
3100
3034
  return classes;
@@ -3113,18 +3047,18 @@ class IonIntlTelInputComponent {
3113
3047
  };
3114
3048
  setIonicClasses = (element) => {
3115
3049
  raf(() => {
3116
- const input = element.nativeElement;
3117
- const classes = this.getClasses(input);
3118
- this.setClasses(input, classes);
3119
- const item = input.closest('ion-item');
3050
+ const htmlElement = element.nativeElement;
3051
+ const classes = this.getClasses(htmlElement);
3052
+ this.setClasses(htmlElement, classes);
3053
+ const item = htmlElement.closest('ion-item');
3120
3054
  if (item) {
3121
3055
  this.setClasses(item, classes);
3122
3056
  }
3123
3057
  });
3124
3058
  };
3125
3059
  setItemClass = (element, className, addClass) => {
3126
- const input = element.nativeElement;
3127
- const item = input.closest('ion-item');
3060
+ const htmlElement = element.nativeElement;
3061
+ const item = htmlElement.closest('ion-item');
3128
3062
  if (item) {
3129
3063
  const classList = item.classList;
3130
3064
  if (addClass) {
@@ -3135,18 +3069,18 @@ class IonIntlTelInputComponent {
3135
3069
  }
3136
3070
  }
3137
3071
  };
3138
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputComponent, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: IonIntlTelInputService }, { token: i1.ModalController }], target: i0.ɵɵFactoryTarget.Component });
3139
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.12", type: IonIntlTelInputComponent, isStandalone: true, selector: "ion-intl-tel-input", inputs: { isEnabled: "isEnabled", autocomplete: "autocomplete", required: "required", defaultCountryiso: "defaultCountryiso", dialCodePrefix: "dialCodePrefix", enableAutoCountrySelect: "enableAutoCountrySelect", enablePlaceholder: "enablePlaceholder", fallbackPlaceholder: "fallbackPlaceholder", inputPlaceholder: "inputPlaceholder", inputLabel: "inputLabel", inputLabelColor: "inputLabelColor", inputLabelPlacement: "inputLabelPlacement", usePatternPlaceholder: "usePatternPlaceholder", maxLength: "maxLength", modalTitle: "modalTitle", modalCssClass: "modalCssClass", modalSearchPlaceholder: "modalSearchPlaceholder", modalCloseText: "modalCloseText", modalCloseButtonSlot: "modalCloseButtonSlot", modalCanSearch: "modalCanSearch", modalShouldBackdropClose: "modalShouldBackdropClose", modalShouldFocusSearchbar: "modalShouldFocusSearchbar", modalSearchFailText: "modalSearchFailText", onlyCountries: "onlyCountries", preferredCountries: "preferredCountries", selectFirstCountry: "selectFirstCountry", separateDialCode: "separateDialCode" }, 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: [
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: [
3140
3074
  {
3141
3075
  provide: NG_VALUE_ACCESSOR,
3142
3076
  useExisting: forwardRef((() => IonIntlTelInputComponent)),
3143
3077
  multi: true,
3144
3078
  },
3145
- ], viewQueries: [{ propertyName: "numberInputEl", first: true, predicate: ["numberInput"], descendants: 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><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: CountryPlaceholder, name: "countryPlaceholder" }] });
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 });
3146
3080
  }
3147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImport: i0, type: IonIntlTelInputComponent, decorators: [{
3081
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: IonIntlTelInputComponent, decorators: [{
3148
3082
  type: Component,
3149
- args: [{ selector: 'ion-intl-tel-input', standalone: true, providers: [
3083
+ args: [{ selector: 'ion-intl-tel-input', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, providers: [
3150
3084
  {
3151
3085
  provide: NG_VALUE_ACCESSOR,
3152
3086
  useExisting: forwardRef((() => IonIntlTelInputComponent)),
@@ -3158,10 +3092,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
3158
3092
  IonText,
3159
3093
  IonButton,
3160
3094
  IonIcon,
3161
- NgIf,
3162
3095
  CountryPlaceholder
3163
- ], 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><span class=\"ion-intl-tel-input-code\" *ngIf=\"separateDialCode\">{{dialCodePrefix}}{{country.dialCode}}</span>\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"] }]
3164
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Platform }, { type: IonIntlTelInputService }, { type: i1.ModalController }], propDecorators: { cssClass: [{
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: [{
3165
3098
  type: HostBinding,
3166
3099
  args: ['class.ion-intl-tel-input']
3167
3100
  }], isIos: [{
@@ -3179,81 +3112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.12", ngImpo
3179
3112
  }], isEnabled: [{
3180
3113
  type: HostBinding,
3181
3114
  args: ['class.ion-intl-tel-input-is-enabled']
3182
- }, {
3183
- type: Input,
3184
- args: ['isEnabled']
3185
- }], autocomplete: [{
3186
- type: Input
3187
- }], required: [{
3188
- type: Input
3189
- }], defaultCountryiso: [{
3190
- type: Input
3191
- }], dialCodePrefix: [{
3192
- type: Input
3193
- }], enableAutoCountrySelect: [{
3194
- type: Input
3195
- }], enablePlaceholder: [{
3196
- type: Input
3197
- }], fallbackPlaceholder: [{
3198
- type: Input
3199
- }], inputPlaceholder: [{
3200
- type: Input
3201
- }], inputLabel: [{
3202
- type: Input
3203
- }], inputLabelColor: [{
3204
- type: Input
3205
- }], inputLabelPlacement: [{
3206
- type: Input
3207
- }], usePatternPlaceholder: [{
3208
- type: Input
3209
- }], maxLength: [{
3210
- type: Input
3211
- }], modalTitle: [{
3212
- type: Input
3213
- }], modalCssClass: [{
3214
- type: Input
3215
- }], modalSearchPlaceholder: [{
3216
- type: Input
3217
- }], modalCloseText: [{
3218
- type: Input
3219
- }], modalCloseButtonSlot: [{
3220
- type: Input
3221
- }], modalCanSearch: [{
3222
- type: Input
3223
- }], modalShouldBackdropClose: [{
3224
- type: Input
3225
- }], modalShouldFocusSearchbar: [{
3226
- type: Input
3227
- }], modalSearchFailText: [{
3228
- type: Input
3229
- }], onlyCountries: [{
3230
- type: Input
3231
- }], preferredCountries: [{
3232
- type: Input
3233
- }], selectFirstCountry: [{
3234
- type: Input
3235
- }], separateDialCode: [{
3236
- type: Input
3237
- }], numberChange: [{
3238
- type: Output
3239
- }], numberBlur: [{
3240
- type: Output
3241
- }], numberFocus: [{
3242
- type: Output
3243
- }], numberInput: [{
3244
- type: Output
3245
- }], codeChange: [{
3246
- type: Output
3247
- }], codeOpen: [{
3248
- type: Output
3249
- }], codeClose: [{
3250
- type: Output
3251
- }], codeSelect: [{
3252
- type: Output
3253
- }], numberInputEl: [{
3254
- type: ViewChild,
3255
- args: ['numberInput', { static: false }]
3256
- }] } });
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 }] }] } });
3257
3116
 
3258
3117
  /*
3259
3118
  * Public API Surface of ion-intl-tel-input