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.

54 lines (53 loc) 2.18 kB
/// <reference path="../globals.d.ts" /> import DOMNodeReference from "../ancillary/DOMNodeReference.d.ts"; import Radio from "../ancillary/Radio.d.ts"; /********/ /********/ export default class PowerPagesElement extends DOMNodeReference { [key: symbol]: (...arg: any[]) => any; private isMasked; /** * Represents the 'yes' option of a boolean radio field. * This property is only available when the parent node * is a main field for a boolean radio input. */ yesRadio: Radio | undefined; /** * Represents the 'no' option of a boolean radio field. * This property is only available when the parent node * is a main field for a boolean radio input. */ noRadio: Radio | undefined; /** * Creates an instance of PowerPagesElement. * @param target - The CSS selector to find the desired DOM element. * @param root - Optionally specify the element within to search for the element targeted by 'target' * Defaults to 'document.body' */ /******/ constructor(target: Element | string, root: Element | undefined, timeoutMs: number); protected initValueManager(): void; protected initVisibilityManager(): void; protected initEventManager(): void; protected _attachRadioButtons(): Promise<void>; clearValue(): void; /** * Unchecks both the yes and no radio buttons if they exist. * @returns - Instance of this [provides option to method chain] */ uncheckRadios(): PowerPagesElement; /** * Apply an input mask to this element * @param type The type of input mask to apply to this element * @param options The options to specify the behavior of the mask */ inputMask(type: "phone" | "money", options: InputMaskOptions): PowerPagesElement; inputMask(type: "phone", options?: { format?: PhoneNumberFormats; countryCode?: CountryCodeFormats; }): PowerPagesElement; inputMask(type: "money", options?: { prefix?: CurrencySymbol; decimalPlaces?: number; thousandsSeparator?: string; decimalSeparator?: string; allowNegative?: boolean; }): PowerPagesElement; }