ontimize-web-ngx
Version:
Ontimize Web framework using Angular 15
60 lines (59 loc) • 2.99 kB
TypeScript
import { AfterViewInit, ElementRef, EventEmitter, Injector, OnInit } from '@angular/core';
import { ValidatorFn } from '@angular/forms';
import { MatSelectChange } from '@angular/material/select';
import { FormValueOptions } from '../../../types/form-value-options.type';
import { OFormComponent } from '../../form/o-form.component';
import { OFormDataComponent } from '../../o-form-data-component.class';
import { CountryCode } from './data/country-code';
import { CountryISO } from './enums/country-iso.enum';
import { PhoneNumberFormat } from './enums/phone-number-format.enum';
import { OPhoneInputData } from './interfaces/change-data';
import { Country } from './model/country.model';
import * as i0 from "@angular/core";
export declare const DEFAULT_INPUTS_O_PHONE_INPUT: string[];
export declare class OPhoneInputComponent extends OFormDataComponent implements OnInit, AfterViewInit {
private countryCodeData;
countries: Array<string>;
readonly countryChange: EventEmitter<Country>;
readonly onPhoneDataChange: EventEmitter<OPhoneInputData>;
countryList: ElementRef;
private matInputRef;
gap: string;
_selectedCountry: Country;
set selectedCountry(value: Country);
get selectedCountry(): Country;
allCountries: Array<Country>;
states: typeof CountryISO;
selectedStates: typeof CountryISO;
protected phoneUtil: any;
protected separateDialCode: boolean;
protected numberFormat: PhoneNumberFormat;
constructor(countryCodeData: CountryCode, form: OFormComponent, elRef: ElementRef, injector: Injector);
initialize(): void;
ngAfterViewInit(): void;
protected addOntimizeCustomAppearanceClass(): void;
getValue(): any;
resolveValidators(): ValidatorFn[];
onFormControlChange(value: any): void;
protected setFormValue(val: any, options?: FormValueOptions, setDirty?: boolean): void;
onCountrySelect(value: MatSelectChange): void;
innerOnBlur(event: any): void;
protected getSelectedCountryIso2(): string;
protected initializeCountryData(): void;
protected ensurePhoneValue(value: any): void;
protected getCountryByDialCode(countryDialCode: any): Country;
protected sortCountries(): Country[];
protected getSeparatedValues(value: any): {
countryDialCode: string;
number: string;
};
protected emitPhoneInputData(intlNo?: string, number?: string): void;
private getParsedNumber;
private removeDialCode;
private getCountryIsoCode;
protected getPhoneNumberPlaceHolder(countryCode: string): string;
protected fetchCountryData(): void;
private resolvePlaceholder;
static ɵfac: i0.ɵɵFactoryDeclaration<OPhoneInputComponent, [null, { optional: true; }, null, null]>;
static ɵcmp: i0.ɵɵComponentDeclaration<OPhoneInputComponent, "o-phone-input", never, { "gap": "gap"; "countries": "countries"; }, { "countryChange": "countryChange"; "onPhoneDataChange": "onPhoneDataChange"; }, never, never, false, never>;
}