typings/lib2/messagev2/field/textField.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextField = void 0;
const internal_1 = require("../internal");
/**
 * Represents a text field.
 * @extends ReadOnlyField
 */
class TextField extends internal_1.ReadOnlyField {
    /**
     * Creates an instance of the TextField class.
     * @param {string} id The unique identifier of the field.
     * @param {string} label The label of the field.
     * @param {any} value The value of the field
     */
    constructor(label, value) {
        super();
        this.displayType = 'text';
        this.setLabel(label);
        this.setValue(value);
    }
    /**
     * Gets the truncateAt value of the field.
     * @returns The truncateAt value of the field.
     */
    getTruncateAt() {
        return this.truncateAt;
    }
    /**
     * Sets the truncateAt value of the field.
     * @param truncateAt The truncateAt value to set.
     * @returns The updated instance of the TextField.
     */
    setTruncateAt(truncateAt) {
        this.truncateAt = truncateAt;
        return this;
    }
    /**
     * Gets the fontSize value of the field.
     * @returns The fontSize value of the field.
     */
    getFontSize() {
        return this.fontSize;
    }
    /**
     * Sets the fontSize value of the field.
     * @param fontSize The fontSize value to set.
     * @returns The updated instance of the TextField.
     */
    setFontSize(fontSize) {
        this.fontSize = fontSize;
        return this;
    }
    /**
     * Gets the fontWeight value of the field.
     * @returns The fontWeight value of the field.
     */
    getFontWeight() {
        return this.fontWeight;
    }
    /**
     * Sets the fontWeight value of the field.
     * @param fontWeight The fontWeight value to set.
     * @returns The updated instance of the TextField.
     */
    setFontWeight(fontWeight) {
        this.fontWeight = fontWeight;
        return this;
    }
}
exports.TextField = TextField;