UNPKG

slack-block-builder

Version:

Maintainable code for interactive Slack messages, modals, home tabs, and workflow steps. A must-have for the Slack Block Kit framework.

36 lines (35 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextInputBuilder = void 0; const base_1 = require("../internal/base"); const constants_1 = require("../internal/constants"); const dto_1 = require("../internal/dto"); const helpers_1 = require("../internal/helpers"); const methods_1 = require("../internal/methods"); /** * @@link https://api.slack.com/reference/block-kit/block-elements#input * @@displayName Plain-Text Input */ class TextInputBuilder extends base_1.ElementBuilderBase { /** @internal */ build() { return this.getResult(dto_1.SlackElementDto, { type: constants_1.ElementType.TextInput, placeholder: helpers_1.getPlainTextObject(this.props.placeholder), dispatchActionConfig: helpers_1.getDispatchActionsConfigurationObject(this.props), }); } } exports.TextInputBuilder = TextInputBuilder; helpers_1.applyMixins(TextInputBuilder, [ methods_1.ActionId, methods_1.DispatchActionOnCharacterEntered, methods_1.DispatchActionOnEnterPressed, methods_1.End, methods_1.FocusOnLoad, methods_1.InitialValue, methods_1.MaxLength, methods_1.MinLength, methods_1.Multiline, methods_1.Placeholder, ]);