UNPKG

powerpagestoolkit

Version:

Reference, manipulate, and engage with Power Pages sites through the nodes in the DOM; use a variety of custom methods that allow customizing your power pages site quicker and easier.

26 lines (25 loc) 827 B
/// <reference path="../globals.d.ts" /> import InputMask from "./InputMask.d.ts"; type CountryCodeFormat = "+" | "()" | "00"; interface PhoneNumberMaskOptions { countryCode?: string; countryCodeFormat?: CountryCodeFormat; format: string; } export default class PhoneNumberMask extends InputMask { input: HTMLInputElement; protected options: PhoneNumberMaskOptions; constructor(inputElement: HTMLInputElement, options?: Partial<PhoneNumberMaskOptions>); protected setupEventListeners(): void; protected formatInput(): void; private formatPhoneNumber; protected onFocus(): void; protected onBlur(): void; getDigits(): string; getCountryCode(): string; getPhoneDigits(): string; setValue(digits: string): void; isValid(): boolean; destroy(): void; } export {};