import * as _angular_core from '@angular/core'; import { OnDestroy, TemplateRef, OnInit } from '@angular/core'; import { FormGroup, FormControl, ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms'; import { SkyInputBoxHostService } from '@skyux/forms'; import { SkyCountryFieldCountry } from '@skyux/lookup'; interface SkyPhoneFieldCountry { /** * The country's * [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm) * country code. * @required */ iso2: string; /** * The country's international dial code. */ dialCode?: string; /** * The placeholder value that demonstrates the country's number format. This * value is `undefined` until a country is selected to validate against. */ exampleNumber?: string; /** * The name of the country. */ name?: string; /** * @internal */ priority?: number; /** * @internal */ areaCodes?: string[]; } /** * Represents the format for validated phone numbers. `default` returns the national format for the * default country, `national` returns the national format for all countries, and `international` * returns the international format for all countries. */ type SkyPhoneFieldNumberReturnFormat = 'default' | 'international' | 'national'; declare class SkyPhoneFieldComponent implements OnDestroy { #private; /** * Whether phone number extensions are allowed. * @default true */ readonly allowExtensions: _angular_core.InputSignalWithTransform; /** * The * [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm) * country code for the default country. The country selector button displays a flag * icon for this default country until users select a different country. * @default "us" */ readonly defaultCountry: _angular_core.InputSignalWithTransform; /** * The format for validated phone numbers. * Options include: `"default"`, `"international"`, and `"national"`. * @default "default" */ readonly returnFormat: _angular_core.InputSignal; /** * The [International Organization for Standardization Alpha 2](https://www.nationsonline.org/oneworld/country_code_list.htm) * country codes for the countries that users can select. By default, all countries are available. */ readonly supportedCountryISOs: _angular_core.InputSignalWithTransform; /** * Emits a `SkyPhoneFieldCountry` object when the selected country in the country search * input changes. */ readonly selectedCountryChange: _angular_core.OutputEmitterRef; readonly countries: _angular_core.Signal; readonly countrySelectDisabled: _angular_core.WritableSignal; readonly countrySearchShown: _angular_core.WritableSignal; countrySearchForm: FormGroup<{ countrySearch: FormControl; }>; readonly inputBoxHostSvc: SkyInputBoxHostService | null; /** * The currently selected country to validate against. */ readonly selectedCountry: _angular_core.ModelSignal; inputTemplateRef: TemplateRef | undefined; countryBtnTemplateRef: TemplateRef | undefined; buttonsInsetTemplateRef: TemplateRef | undefined; constructor(); ngOnDestroy(): void; /** * Sets the country to validate against based on the county's iso2 code. * @param newCountry The International Organization for Standardization's two-letter code * for the default country. * @internal */ onCountrySelected(newCountry: SkyCountryFieldCountry): void; toggleCountrySearch(showSearch: boolean): void; onCountryFieldFocusout({ relatedTarget }: FocusEvent): void; dismissButtonClicked(): void; private addFocusEventListener; setCountryByDialCode(phoneNumberRaw: string | undefined): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Creates a button, search input, and text input for entering and validating * international phone numbers. Place this attribute on an `input` element, and wrap * that element in a `sky-phone-field` component. By default, the country selector * button displays a flag icon for the default country, and the phone number input * displays a sample of the correct phone number format. When users select the country * selector button, they expose the country search input, which is * [an autocomplete input](https://developer.blackbaud.com/skyux/components/autocomplete) * that allows them to select different countries. When users enter `+` followed by an * international dial code in the phone number input, the country automatically switches * to the country associated with the dial code. * @required */ declare class SkyPhoneFieldInputDirective implements OnInit, OnDestroy, ControlValueAccessor, Validator { #private; /** * Whether to disable the phone field on template-driven forms. Don't use this input on reactive forms because they may overwrite the input or leave the control out of sync. * To set the disabled state on reactive forms, use the `FormControl` instead. * @default false */ readonly disabled: _angular_core.InputSignalWithTransform; /** * Whether to prevent validation on the phone number input. For validation, * phone numbers are driven through the `ngModel` attribute that you specify on an * `input` element or on a `FormControl` in a reactive form. To prevent validation, * set this property to `true`. * @default false */ readonly skyPhoneFieldNoValidate: _angular_core.InputSignalWithTransform; constructor(); ngOnInit(): void; ngOnDestroy(): void; registerOnChange(fn: (value: string) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; validate(control: AbstractControl): ValidationErrors | null; writeValue(value: unknown): void; protected onBlur(): void; protected onInput(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class SkyPhoneFieldModule { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵmod: _angular_core.ɵɵNgModuleDeclaration; static ɵinj: _angular_core.ɵɵInjectorDeclaration; } export { SkyPhoneFieldModule, SkyPhoneFieldComponent as λ1, SkyPhoneFieldInputDirective as λ2 }; export type { SkyPhoneFieldCountry, SkyPhoneFieldNumberReturnFormat };