UNPKG

fox-block-builder

Version:

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

38 lines 1.26 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SectionBuilder = 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/blocks#section * @@displayName Section */ class SectionBuilder extends base_1.BlockBuilderBase { /** @internal */ build() { return this.getResult(dto_1.SlackBlockDto, { type: constants_1.BlockType.Section, text: (0, helpers_1.getMarkdownObject)(this.props.text), fields: (0, helpers_1.getFields)(this.props.fields), accessory: (0, helpers_1.getBuilderResult)(this.props.accessory), }); } } exports.SectionBuilder = SectionBuilder; (0, helpers_1.applyMixins)(SectionBuilder, [ methods_1.Accessory, methods_1.BlockId, methods_1.End, methods_1.Fields, methods_1.Text, methods_1.Access, methods_1.ForTeams, methods_1.BuildToJSON, (methods_1.BuildToObject), methods_1.NoSubmit, methods_1.VisibleIf, ]); //# sourceMappingURL=section.js.map