UNPKG

fox-block-builder

Version:

Maintainable code for loop slack-block-kit-like modal builder

39 lines 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NumberInputBuilder = 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#number * @@displayName Email Input */ class NumberInputBuilder extends base_1.ElementBuilderBase { /** @internal */ build() { return this.getResult(dto_1.SlackElementDto, { type: constants_1.ElementType.NumberInput, initialValue: (0, helpers_1.getStringFromNumber)(this.props.initialValue), placeholder: (0, helpers_1.getPlainTextObject)(this.props.placeholder), dispatchActionConfig: (0, helpers_1.getDispatchActionsConfigurationObject)(this.props), }); } } exports.NumberInputBuilder = NumberInputBuilder; (0, helpers_1.applyMixins)(NumberInputBuilder, [ methods_1.ActionId, methods_1.DispatchActionOnCharacterEntered, methods_1.DispatchActionOnEnterPressed, methods_1.End, methods_1.FocusOnLoad, methods_1.InitialValue, methods_1.IsDecimalAllowed, methods_1.MaxValue, methods_1.MinValue, methods_1.MinLength, methods_1.MaxLength, methods_1.Placeholder, ]); //# sourceMappingURL=number-input.js.map