typings/lib2/messagev2/field/textInputField.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InputStyle = exports.TextInputField = void 0;
const internal_1 = require("../internal");
/**
 * Represents a text input field.
 * @extends EditableField
 */
class TextInputField extends internal_1.EditableField {
    /**
     * Creates an instance of the TextInputField class.
     * @param {string} id The unique identifier of the field.
     * @param {string} label The label of the field.
     */
    constructor(id, label) {
        super(id);
        this.displayType = 'textInput';
        this.setLabel(label);
    }
    /**
     * Gets the validationRegularExpression value of the field.
     * @returns {string} The validationRegularExpression value of the field.
     */
    getValidationRegularExpression() {
        return this.validationRegularExpression;
    }
    /**
     * Sets the validationRegularExpression value of the field.
     * @param {string} validationRegularExpression The validationRegularExpression value to set.
     * @returns The updated instance of the TextInputField.
     */
    setValidationRegularExpression(validationRegularExpression) {
        this.validationRegularExpression = validationRegularExpression;
        return this;
    }
    /**
     * Gets the multiLine value of the field.
     * @returns {Boolean} The multiLine value of the field.
     */
    getMultiLine() {
        return this.multiLine;
    }
    /**
     * Sets the multiLine value of the field.
     * @param {boolean} multiLine The multiLine value to set.
     * @returns The updated instance of the TextInputField.
     */
    setMultiLine(multiLine) {
        this.multiLine = multiLine;
        return this;
    }
    /**
     * Gets the minLength value of the field.
     * @returns {number} The minLength value of the field.
     */
    getMinLength() {
        return this.minLength;
    }
    /**
     * Sets the minLength value of the field.
     * @param {number} minLength The minLength value to set.
     * @returns The updated instance of the TextInputField.
     */
    setMinLength(minLength) {
        this.minLength = minLength;
        return this;
    }
    /**
     * Gets the maxLength value of the field.
     * @returns {number} The maxLength value of the field.
     */
    getMaxLength() {
        return this.maxLength;
    }
    /**
     * Sets the maxLength value of the field.
     * @param {number} maxLength The maxLength value to set.
     * @returns The updated instance of the TextInputField.
     */
    setMaxLength(maxLength) {
        this.maxLength = maxLength;
        return this;
    }
    /**
     * Gets the defaultValue value of the field.
     * @returns {string} The defaultValue value of the field.
     */
    getDefaultValue() {
        return this.defaultValue;
    }
    /**
     * Sets the defaultValue value of the field.
     * @param {string} defaultValue The defaultValue value to set.
     * @returns The updated instance of the TextInputField.
     */
    setDefaultValue(defaultValue) {
        this.defaultValue = defaultValue;
        return this;
    }
    /**
     * Gets the inputStyle value of the field.
     * @returns {InputStyle} The inputStyle value of the field.
     */
    getInputStyle() {
        return this.inputStyle;
    }
    /**
     * Sets the inputStyle value of the field.
     * @param {InputStyle} inputStyle The inputStyle value to set.
     * @returns The updated instance of the TextInputField.
     */
    setInputStyle(inputStyle) {
        this.inputStyle = inputStyle;
        return this;
    }
}
exports.TextInputField = TextInputField;
/**
 * Represents the input style options for a text input field.
 */
var InputStyle;
(function (InputStyle) {
    InputStyle["text"] = "text";
    InputStyle["tel"] = "tel";
    InputStyle["url"] = "url";
    InputStyle["email"] = "email";
    InputStyle["password"] = "password";
})(InputStyle = exports.InputStyle || (exports.InputStyle = {}));