slack-block-builder
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BitBuilderBase = void 0; | ||
var lib_1 = require("../lib"); | ||
var BitBuilderBase = /** @class */ (function (_super) { | ||
__extends(BitBuilderBase, _super); | ||
function BitBuilderBase() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return BitBuilderBase; | ||
}(lib_1.Builder)); | ||
const lib_1 = require("../lib"); | ||
class BitBuilderBase extends lib_1.Builder { | ||
} | ||
exports.BitBuilderBase = BitBuilderBase; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BlockBuilderBase = void 0; | ||
var lib_1 = require("../lib"); | ||
var BlockBuilderBase = /** @class */ (function (_super) { | ||
__extends(BlockBuilderBase, _super); | ||
function BlockBuilderBase() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return BlockBuilderBase; | ||
}(lib_1.Builder)); | ||
const lib_1 = require("../lib"); | ||
class BlockBuilderBase extends lib_1.Builder { | ||
} | ||
exports.BlockBuilderBase = BlockBuilderBase; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CompositionObjectBase = void 0; | ||
var CompositionObjectBase = /** @class */ (function () { | ||
function CompositionObjectBase() { | ||
} | ||
return CompositionObjectBase; | ||
}()); | ||
class CompositionObjectBase { | ||
} | ||
exports.CompositionObjectBase = CompositionObjectBase; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ElementBuilderBase = void 0; | ||
var lib_1 = require("../lib"); | ||
var ElementBuilderBase = /** @class */ (function (_super) { | ||
__extends(ElementBuilderBase, _super); | ||
function ElementBuilderBase() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return ElementBuilderBase; | ||
}(lib_1.Builder)); | ||
const lib_1 = require("../lib"); | ||
class ElementBuilderBase extends lib_1.Builder { | ||
} | ||
exports.ElementBuilderBase = ElementBuilderBase; |
@@ -12,3 +12,3 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./bit-builder-base"), exports); | ||
@@ -15,0 +15,0 @@ __exportStar(require("./block-builder-base"), exports); |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SurfaceBuilderBase = void 0; | ||
var lib_1 = require("../lib"); | ||
var SurfaceBuilderBase = /** @class */ (function (_super) { | ||
__extends(SurfaceBuilderBase, _super); | ||
function SurfaceBuilderBase() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SurfaceBuilderBase; | ||
}(lib_1.Builder)); | ||
const lib_1 = require("../lib"); | ||
class SurfaceBuilderBase extends lib_1.Builder { | ||
} | ||
exports.SurfaceBuilderBase = SurfaceBuilderBase; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AttachmentBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
/** | ||
@@ -27,15 +12,10 @@ * @@link https://api.slack.com/reference/messaging/attachments | ||
*/ | ||
var AttachmentBuilder = /** @class */ (function (_super) { | ||
__extends(AttachmentBuilder, _super); | ||
function AttachmentBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class AttachmentBuilder extends base_1.BitBuilderBase { | ||
/** @internal */ | ||
AttachmentBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackDto, { | ||
blocks: helpers_1.getBuilderResults(this.props.blocks) | ||
blocks: helpers_1.getBuilderResults(this.props.blocks), | ||
}); | ||
}; | ||
return AttachmentBuilder; | ||
}(base_1.BitBuilderBase)); | ||
} | ||
} | ||
exports.AttachmentBuilder = AttachmentBuilder; | ||
@@ -42,0 +22,0 @@ helpers_1.applyMixins(AttachmentBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConfirmationDialogBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
/** | ||
@@ -27,9 +12,5 @@ * @@link https://api.slack.com/reference/block-kit/composition-objects#confirm | ||
*/ | ||
var ConfirmationDialogBuilder = /** @class */ (function (_super) { | ||
__extends(ConfirmationDialogBuilder, _super); | ||
function ConfirmationDialogBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ConfirmationDialogBuilder extends base_1.BitBuilderBase { | ||
/** @internal */ | ||
ConfirmationDialogBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackDto, { | ||
@@ -39,7 +20,6 @@ text: helpers_1.getMarkdownObject(this.props.text), | ||
confirm: helpers_1.getPlainTextObject(this.props.confirm), | ||
deny: helpers_1.getPlainTextObject(this.props.deny) | ||
deny: helpers_1.getPlainTextObject(this.props.deny), | ||
}); | ||
}; | ||
return ConfirmationDialogBuilder; | ||
}(base_1.BitBuilderBase)); | ||
} | ||
} | ||
exports.ConfirmationDialogBuilder = ConfirmationDialogBuilder; | ||
@@ -46,0 +26,0 @@ helpers_1.applyMixins(ConfirmationDialogBuilder, [ |
@@ -5,6 +5,3 @@ import { AttachmentBuilder, AttachmentParams } from './attachment'; | ||
import { OptionGroupBuilder, OptionGroupParams } from './option-group'; | ||
export type { AttachmentBuilder, AttachmentParams } from './attachment'; | ||
export type { ConfirmationDialogBuilder, ConfirmationDialogParams } from './confirmation-dialog'; | ||
export type { OptionBuilder, OptionParams } from './option'; | ||
export type { OptionGroupBuilder, OptionGroupParams } from './option-group'; | ||
export type { AttachmentBuilder, AttachmentParams, ConfirmationDialogBuilder, ConfirmationDialogParams, OptionBuilder, OptionParams, OptionGroupBuilder, OptionGroupParams, }; | ||
/** | ||
@@ -11,0 +8,0 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. |
"use strict"; | ||
/* eslint-disable max-len */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Bits = exports.OptionGroup = exports.Option = exports.ConfirmationDialog = exports.Attachment = void 0; | ||
var attachment_1 = require("./attachment"); | ||
var confirmation_dialog_1 = require("./confirmation-dialog"); | ||
var option_1 = require("./option"); | ||
var option_group_1 = require("./option-group"); | ||
const attachment_1 = require("./attachment"); | ||
const confirmation_dialog_1 = require("./confirmation-dialog"); | ||
const option_1 = require("./option"); | ||
const option_group_1 = require("./option-group"); | ||
/** | ||
@@ -58,8 +58,8 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. | ||
exports.OptionGroup = OptionGroup; | ||
var bitObjects = { | ||
Attachment: Attachment, | ||
ConfirmationDialog: ConfirmationDialog, | ||
Option: Option, | ||
OptionGroup: OptionGroup | ||
const bitObjects = { | ||
Attachment, | ||
ConfirmationDialog, | ||
Option, | ||
OptionGroup, | ||
}; | ||
exports.Bits = bitObjects; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OptionGroupBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
/** | ||
@@ -27,16 +12,11 @@ * @@link https://api.slack.com/reference/block-kit/composition-objects#option_group | ||
*/ | ||
var OptionGroupBuilder = /** @class */ (function (_super) { | ||
__extends(OptionGroupBuilder, _super); | ||
function OptionGroupBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class OptionGroupBuilder extends base_1.BitBuilderBase { | ||
/** @internal */ | ||
OptionGroupBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackDto, { | ||
label: helpers_1.getPlainTextObject(this.props.label), | ||
options: helpers_1.getBuilderResults(this.props.options) | ||
options: helpers_1.getBuilderResults(this.props.options), | ||
}); | ||
}; | ||
return OptionGroupBuilder; | ||
}(base_1.BitBuilderBase)); | ||
} | ||
} | ||
exports.OptionGroupBuilder = OptionGroupBuilder; | ||
@@ -43,0 +23,0 @@ helpers_1.applyMixins(OptionGroupBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OptionBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
/** | ||
@@ -27,10 +12,5 @@ * @@link https://api.slack.com/reference/block-kit/composition-objects#option | ||
*/ | ||
var OptionBuilder = /** @class */ (function (_super) { | ||
__extends(OptionBuilder, _super); | ||
function OptionBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class OptionBuilder extends base_1.BitBuilderBase { | ||
/** @internal */ | ||
OptionBuilder.prototype.build = function (_a) { | ||
var _b = _a === void 0 ? { isMarkdown: false } : _a, isMarkdown = _b.isMarkdown; | ||
build({ isMarkdown } = { isMarkdown: false }) { | ||
return this.getResult(lib_1.SlackDto, { | ||
@@ -42,7 +22,6 @@ text: isMarkdown | ||
? helpers_1.getMarkdownObject(this.props.description) | ||
: helpers_1.getPlainTextObject(this.props.description) | ||
: helpers_1.getPlainTextObject(this.props.description), | ||
}); | ||
}; | ||
return OptionBuilder; | ||
}(base_1.BitBuilderBase)); | ||
} | ||
} | ||
exports.OptionBuilder = OptionBuilder; | ||
@@ -49,0 +28,0 @@ helpers_1.applyMixins(OptionBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ActionsBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/block-kit/blocks#actions | ||
*/ | ||
var ActionsBuilder = /** @class */ (function (_super) { | ||
__extends(ActionsBuilder, _super); | ||
function ActionsBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ActionsBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
ActionsBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.Actions, | ||
elements: helpers_1.getBuilderResults(this.props.elements) | ||
elements: helpers_1.getBuilderResults(this.props.elements), | ||
}); | ||
}; | ||
return ActionsBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.ActionsBuilder = ActionsBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(ActionsBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ContextBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/block-kit/blocks#context | ||
*/ | ||
var ContextBuilder = /** @class */ (function (_super) { | ||
__extends(ContextBuilder, _super); | ||
function ContextBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ContextBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
ContextBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.Context, | ||
elements: helpers_1.getElementsForContext(this.props.elements) | ||
elements: helpers_1.getElementsForContext(this.props.elements), | ||
}); | ||
}; | ||
return ContextBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.ContextBuilder = ContextBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(ContextBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DividerBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,15 +13,10 @@ * @@link https://api.slack.com/reference/block-kit/blocks#divider | ||
*/ | ||
var DividerBuilder = /** @class */ (function (_super) { | ||
__extends(DividerBuilder, _super); | ||
function DividerBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DividerBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
DividerBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.Divider | ||
type: constants_1.BlockType.Divider, | ||
}); | ||
}; | ||
return DividerBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.DividerBuilder = DividerBuilder; | ||
@@ -43,0 +23,0 @@ helpers_1.applyMixins(DividerBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FileBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/block-kit/blocks#file | ||
*/ | ||
var FileBuilder = /** @class */ (function (_super) { | ||
__extends(FileBuilder, _super); | ||
function FileBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class FileBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
FileBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.File, | ||
source: constants_1.FileType.Remote | ||
source: constants_1.FileType.Remote, | ||
}); | ||
}; | ||
return FileBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.FileBuilder = FileBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(FileBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HeaderBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/block-kit/blocks#header | ||
*/ | ||
var HeaderBuilder = /** @class */ (function (_super) { | ||
__extends(HeaderBuilder, _super); | ||
function HeaderBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class HeaderBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
HeaderBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.Header, | ||
text: helpers_1.getPlainTextObject(this.props.text) | ||
text: helpers_1.getPlainTextObject(this.props.text), | ||
}); | ||
}; | ||
return HeaderBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.HeaderBuilder = HeaderBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(HeaderBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ImageBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/block-kit/blocks#image | ||
*/ | ||
var ImageBuilder = /** @class */ (function (_super) { | ||
__extends(ImageBuilder, _super); | ||
function ImageBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ImageBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
ImageBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
type: constants_1.BlockType.Image, | ||
title: helpers_1.getPlainTextObject(this.props.title) | ||
title: helpers_1.getPlainTextObject(this.props.title), | ||
}); | ||
}; | ||
return ImageBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.ImageBuilder = ImageBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(ImageBuilder, [ |
@@ -9,10 +9,3 @@ import { ActionsBuilder, ActionsParams } from './actions'; | ||
import { SectionBuilder, SectionParams } from './section'; | ||
export type { ActionsBuilder, ActionsParams } from './actions'; | ||
export type { ContextBuilder, ContextParams } from './context'; | ||
export type { DividerBuilder, DividerParams } from './divider'; | ||
export type { FileBuilder, FileParams } from './file'; | ||
export type { HeaderBuilder, HeaderParams } from './header'; | ||
export type { ImageBuilder, ImageParams } from './image'; | ||
export type { InputBuilder, InputParams } from './input'; | ||
export type { SectionBuilder, SectionParams } from './section'; | ||
export type { ActionsBuilder, ActionsParams, ContextBuilder, ContextParams, DividerBuilder, DividerParams, FileBuilder, FileParams, HeaderBuilder, HeaderParams, ImageBuilder, ImageParams, InputBuilder, InputParams, SectionBuilder, SectionParams, }; | ||
/** | ||
@@ -19,0 +12,0 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. |
"use strict"; | ||
/* eslint-disable max-len */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Blocks = exports.Section = exports.Input = exports.Image = exports.Header = exports.File = exports.Divider = exports.Context = exports.Actions = void 0; | ||
var actions_1 = require("./actions"); | ||
var context_1 = require("./context"); | ||
var divider_1 = require("./divider"); | ||
var file_1 = require("./file"); | ||
var header_1 = require("./header"); | ||
var image_1 = require("./image"); | ||
var input_1 = require("./input"); | ||
var section_1 = require("./section"); | ||
const actions_1 = require("./actions"); | ||
const context_1 = require("./context"); | ||
const divider_1 = require("./divider"); | ||
const file_1 = require("./file"); | ||
const header_1 = require("./header"); | ||
const image_1 = require("./image"); | ||
const input_1 = require("./input"); | ||
const section_1 = require("./section"); | ||
/** | ||
@@ -104,12 +104,12 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. | ||
exports.Section = Section; | ||
var blockObjects = { | ||
Actions: Actions, | ||
Context: Context, | ||
Divider: Divider, | ||
File: File, | ||
Header: Header, | ||
Image: Image, | ||
Input: Input, | ||
Section: Section | ||
const blockObjects = { | ||
Actions, | ||
Context, | ||
Divider, | ||
File, | ||
Header, | ||
Image, | ||
Input, | ||
Section, | ||
}; | ||
exports.Blocks = blockObjects; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.InputBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/blocks#input | ||
*/ | ||
var InputBuilder = /** @class */ (function (_super) { | ||
__extends(InputBuilder, _super); | ||
function InputBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InputBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
InputBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.BlockType.Input, | ||
hint: helpers_1.getPlainTextObject(this.props.hint), | ||
element: helpers_1.getBuilderResult(this.props.element) | ||
element: helpers_1.getBuilderResult(this.props.element), | ||
}); | ||
}; | ||
return InputBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.InputBuilder = InputBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(InputBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SectionBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/blocks#section | ||
*/ | ||
var SectionBuilder = /** @class */ (function (_super) { | ||
__extends(SectionBuilder, _super); | ||
function SectionBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class SectionBuilder extends base_1.BlockBuilderBase { | ||
/** @internal */ | ||
SectionBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackBlockDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.BlockType.Section, | ||
fields: helpers_1.getFields(this.props.fields), | ||
accessory: helpers_1.getBuilderResult(this.props.accessory) | ||
accessory: helpers_1.getBuilderResult(this.props.accessory), | ||
}); | ||
}; | ||
return SectionBuilder; | ||
}(base_1.BlockBuilderBase)); | ||
} | ||
} | ||
exports.SectionBuilder = SectionBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(SectionBuilder, [ |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BlockType = void 0; | ||
@@ -4,0 +4,0 @@ var BlockType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ButtonStyle = void 0; | ||
@@ -4,0 +4,0 @@ var ButtonStyle; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DispatchOnType = void 0; | ||
@@ -4,0 +4,0 @@ var DispatchOnType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ElementType = void 0; | ||
@@ -4,0 +4,0 @@ var ElementType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FileType = void 0; | ||
@@ -4,0 +4,0 @@ var FileType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Filter = void 0; | ||
@@ -4,0 +4,0 @@ var Filter; |
@@ -12,3 +12,3 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./block-types"), exports); | ||
@@ -15,0 +15,0 @@ __exportStar(require("./button-styles"), exports); |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ObjectType = void 0; | ||
@@ -4,0 +4,0 @@ var ObjectType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Prop = void 0; | ||
@@ -4,0 +4,0 @@ var Prop; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ResponseType = void 0; | ||
@@ -4,0 +4,0 @@ var ResponseType; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SurfaceType = void 0; | ||
@@ -4,0 +4,0 @@ var SurfaceType; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ButtonBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#button | ||
*/ | ||
var ButtonBuilder = /** @class */ (function (_super) { | ||
__extends(ButtonBuilder, _super); | ||
function ButtonBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ButtonBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ButtonBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.Button, | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
text: helpers_1.getPlainTextObject(this.props.text) | ||
text: helpers_1.getPlainTextObject(this.props.text), | ||
}); | ||
}; | ||
return ButtonBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ButtonBuilder = ButtonBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(ButtonBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChannelMultiSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#channel_multi_select | ||
*/ | ||
var ChannelMultiSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ChannelMultiSelectBuilder, _super); | ||
function ChannelMultiSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ChannelMultiSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ChannelMultiSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.ChannelsMultiSelect, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return ChannelMultiSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ChannelMultiSelectBuilder = ChannelMultiSelectBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(ChannelMultiSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ChannelSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#channel_select | ||
*/ | ||
var ChannelSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ChannelSelectBuilder, _super); | ||
function ChannelSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ChannelSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ChannelSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.ChannelSelect, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return ChannelSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ChannelSelectBuilder = ChannelSelectBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(ChannelSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CheckboxesBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#checkboxes | ||
*/ | ||
var CheckboxesBuilder = /** @class */ (function (_super) { | ||
__extends(CheckboxesBuilder, _super); | ||
function CheckboxesBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class CheckboxesBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
CheckboxesBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.Checkboxes, | ||
initialOptions: helpers_1.getBuilderResults(this.props.initialOptions, { isMarkdown: true }), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return CheckboxesBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.CheckboxesBuilder = CheckboxesBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(CheckboxesBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConversationMultiSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#conversation_multi_select | ||
*/ | ||
var ConversationMultiSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ConversationMultiSelectBuilder, _super); | ||
function ConversationMultiSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ConversationMultiSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ConversationMultiSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.ConversationsMultiSelect, | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
filter: helpers_1.getFilter(this.props) | ||
filter: helpers_1.getFilter(this.props), | ||
}); | ||
}; | ||
return ConversationMultiSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ConversationMultiSelectBuilder = ConversationMultiSelectBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(ConversationMultiSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ConversationSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#conversation_select | ||
*/ | ||
var ConversationSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ConversationSelectBuilder, _super); | ||
function ConversationSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ConversationSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ConversationSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.ConversationSelect, | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
filter: helpers_1.getFilter(this.props) | ||
filter: helpers_1.getFilter(this.props), | ||
}); | ||
}; | ||
return ConversationSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ConversationSelectBuilder = ConversationSelectBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(ConversationSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DatePickerBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#datepicker | ||
*/ | ||
var DatePickerBuilder = /** @class */ (function (_super) { | ||
__extends(DatePickerBuilder, _super); | ||
function DatePickerBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DatePickerBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
DatePickerBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.DatePicker, | ||
initialDate: helpers_1.getFormattedDate(this.props.initialDate), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return DatePickerBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.DatePickerBuilder = DatePickerBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(DatePickerBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExternalMultiSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#external_multi_select | ||
*/ | ||
var ExternalMultiSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ExternalMultiSelectBuilder, _super); | ||
function ExternalMultiSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ExternalMultiSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ExternalMultiSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.ExternalMultiSelect, | ||
initialOptions: helpers_1.getBuilderResults(this.props.initialOptions), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return ExternalMultiSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ExternalMultiSelectBuilder = ExternalMultiSelectBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(ExternalMultiSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ExternalSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#external_select | ||
*/ | ||
var ExternalSelectBuilder = /** @class */ (function (_super) { | ||
__extends(ExternalSelectBuilder, _super); | ||
function ExternalSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ExternalSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ExternalSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.ExternalSelect, | ||
initialOption: helpers_1.getBuilderResult(this.props.initialOption), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return ExternalSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ExternalSelectBuilder = ExternalSelectBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(ExternalSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ImgBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,15 +13,10 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#image | ||
*/ | ||
var ImgBuilder = /** @class */ (function (_super) { | ||
__extends(ImgBuilder, _super); | ||
function ImgBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ImgBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
ImgBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.Image | ||
type: constants_1.ElementType.Image, | ||
}); | ||
}; | ||
return ImgBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.ImgBuilder = ImgBuilder; | ||
@@ -43,0 +23,0 @@ helpers_1.applyMixins(ImgBuilder, [ |
@@ -19,20 +19,3 @@ import { ButtonBuilder, ButtonParams } from './button'; | ||
import { UserSelectBuilder, UserSelectParams } from './user-select'; | ||
export type { ButtonBuilder, ButtonParams } from './button'; | ||
export type { ChannelMultiSelectBuilder, ChannelMultiSelectParams } from './channel-multi-select'; | ||
export type { ChannelSelectBuilder, ChannelSelectParams } from './channel-select'; | ||
export type { CheckboxesBuilder, CheckboxesParams } from './checkboxes'; | ||
export type { ConversationMultiSelectBuilder, ConversationMultiSelectParams } from './conversation-multi-select'; | ||
export type { ConversationSelectBuilder, ConversationSelectParams } from './conversation-select'; | ||
export type { DatePickerBuilder, DatePickerParams } from './datepicker'; | ||
export type { ExternalMultiSelectBuilder, ExternalMultiSelectParams } from './external-multi-select'; | ||
export type { ExternalSelectBuilder, ExternalSelectParams } from './external-select'; | ||
export type { ImgBuilder, ImgParams } from './img'; | ||
export type { OverflowMenuBuilder, OverflowMenuParams } from './overflow-menu'; | ||
export type { RadioButtonsBuilder, RadioButtonsParams } from './radio-buttons'; | ||
export type { StaticMultiSelectBuilder, StaticMultiSelectParams } from './static-multi-select'; | ||
export type { StaticSelectBuilder, StaticSelectParams } from './static-select'; | ||
export type { TextInputBuilder, TextInputParams } from './text-input'; | ||
export type { TimePickerBuilder, TimePickerParams } from './timepicker'; | ||
export type { UserMultiSelectBuilder, UserMultiSelectParams } from './user-multi-select'; | ||
export type { UserSelectBuilder, UserSelectParams } from './user-select'; | ||
export type { ButtonBuilder, ButtonParams, ChannelMultiSelectBuilder, ChannelMultiSelectParams, ChannelSelectBuilder, ChannelSelectParams, CheckboxesBuilder, CheckboxesParams, ConversationMultiSelectBuilder, ConversationMultiSelectParams, ConversationSelectBuilder, ConversationSelectParams, DatePickerBuilder, DatePickerParams, ExternalMultiSelectBuilder, ExternalMultiSelectParams, ExternalSelectBuilder, ExternalSelectParams, ImgBuilder, ImgParams, OverflowMenuBuilder, OverflowMenuParams, RadioButtonsBuilder, RadioButtonsParams, StaticMultiSelectBuilder, StaticMultiSelectParams, StaticSelectBuilder, StaticSelectParams, TextInputBuilder, TextInputParams, TimePickerBuilder, TimePickerParams, UserMultiSelectBuilder, UserMultiSelectParams, UserSelectBuilder, UserSelectParams, }; | ||
/** | ||
@@ -39,0 +22,0 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. |
"use strict"; | ||
/* eslint-disable max-len */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Elements = exports.UserSelect = exports.UserMultiSelect = exports.TimePicker = exports.TextInput = exports.StaticSelect = exports.StaticMultiSelect = exports.RadioButtons = exports.OverflowMenu = exports.Img = exports.ExternalSelect = exports.ExternalMultiSelect = exports.DatePicker = exports.ConversationSelect = exports.ConversationMultiSelect = exports.Checkboxes = exports.ChannelSelect = exports.ChannelMultiSelect = exports.Button = void 0; | ||
var button_1 = require("./button"); | ||
var channel_multi_select_1 = require("./channel-multi-select"); | ||
var channel_select_1 = require("./channel-select"); | ||
var checkboxes_1 = require("./checkboxes"); | ||
var conversation_multi_select_1 = require("./conversation-multi-select"); | ||
var conversation_select_1 = require("./conversation-select"); | ||
var datepicker_1 = require("./datepicker"); | ||
var external_multi_select_1 = require("./external-multi-select"); | ||
var external_select_1 = require("./external-select"); | ||
var img_1 = require("./img"); | ||
var overflow_menu_1 = require("./overflow-menu"); | ||
var radio_buttons_1 = require("./radio-buttons"); | ||
var static_multi_select_1 = require("./static-multi-select"); | ||
var static_select_1 = require("./static-select"); | ||
var text_input_1 = require("./text-input"); | ||
var timepicker_1 = require("./timepicker"); | ||
var user_multi_select_1 = require("./user-multi-select"); | ||
var user_select_1 = require("./user-select"); | ||
const button_1 = require("./button"); | ||
const channel_multi_select_1 = require("./channel-multi-select"); | ||
const channel_select_1 = require("./channel-select"); | ||
const checkboxes_1 = require("./checkboxes"); | ||
const conversation_multi_select_1 = require("./conversation-multi-select"); | ||
const conversation_select_1 = require("./conversation-select"); | ||
const datepicker_1 = require("./datepicker"); | ||
const external_multi_select_1 = require("./external-multi-select"); | ||
const external_select_1 = require("./external-select"); | ||
const img_1 = require("./img"); | ||
const overflow_menu_1 = require("./overflow-menu"); | ||
const radio_buttons_1 = require("./radio-buttons"); | ||
const static_multi_select_1 = require("./static-multi-select"); | ||
const static_select_1 = require("./static-select"); | ||
const text_input_1 = require("./text-input"); | ||
const timepicker_1 = require("./timepicker"); | ||
const user_multi_select_1 = require("./user-multi-select"); | ||
const user_select_1 = require("./user-select"); | ||
/** | ||
@@ -238,22 +238,22 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. | ||
exports.UserSelect = UserSelect; | ||
var elementObjects = { | ||
Button: Button, | ||
ChannelMultiSelect: ChannelMultiSelect, | ||
ChannelSelect: ChannelSelect, | ||
Checkboxes: Checkboxes, | ||
ConversationMultiSelect: ConversationMultiSelect, | ||
ConversationSelect: ConversationSelect, | ||
DatePicker: DatePicker, | ||
ExternalMultiSelect: ExternalMultiSelect, | ||
ExternalSelect: ExternalSelect, | ||
Img: Img, | ||
OverflowMenu: OverflowMenu, | ||
RadioButtons: RadioButtons, | ||
StaticMultiSelect: StaticMultiSelect, | ||
StaticSelect: StaticSelect, | ||
TextInput: TextInput, | ||
TimePicker: TimePicker, | ||
UserMultiSelect: UserMultiSelect, | ||
UserSelect: UserSelect | ||
const elementObjects = { | ||
Button, | ||
ChannelMultiSelect, | ||
ChannelSelect, | ||
Checkboxes, | ||
ConversationMultiSelect, | ||
ConversationSelect, | ||
DatePicker, | ||
ExternalMultiSelect, | ||
ExternalSelect, | ||
Img, | ||
OverflowMenu, | ||
RadioButtons, | ||
StaticMultiSelect, | ||
StaticSelect, | ||
TextInput, | ||
TimePicker, | ||
UserMultiSelect, | ||
UserSelect, | ||
}; | ||
exports.Elements = elementObjects; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.OverflowMenuBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#overflow | ||
*/ | ||
var OverflowMenuBuilder = /** @class */ (function (_super) { | ||
__extends(OverflowMenuBuilder, _super); | ||
function OverflowMenuBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class OverflowMenuBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
OverflowMenuBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.Overflow, | ||
options: helpers_1.getBuilderResults(this.props.options), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return OverflowMenuBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.OverflowMenuBuilder = OverflowMenuBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(OverflowMenuBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.RadioButtonsBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#radio | ||
*/ | ||
var RadioButtonsBuilder = /** @class */ (function (_super) { | ||
__extends(RadioButtonsBuilder, _super); | ||
function RadioButtonsBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class RadioButtonsBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
RadioButtonsBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -40,7 +21,6 @@ type: constants_1.ElementType.RadioButtons, | ||
initialOption: helpers_1.getBuilderResult(this.props.initialOption, { isMarkdown: true }), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return RadioButtonsBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.RadioButtonsBuilder = RadioButtonsBuilder; | ||
@@ -47,0 +27,0 @@ helpers_1.applyMixins(RadioButtonsBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StaticMultiSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
var StaticMultiSelectBuilder = /** @class */ (function (_super) { | ||
__extends(StaticMultiSelectBuilder, _super); | ||
function StaticMultiSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
class StaticMultiSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
StaticMultiSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -37,7 +18,6 @@ type: constants_1.ElementType.StaticMultiSelect, | ||
optionGroups: helpers_1.getBuilderResults(this.props.optionGroups), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return StaticMultiSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.StaticMultiSelectBuilder = StaticMultiSelectBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(StaticMultiSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.StaticSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#static_select | ||
*/ | ||
var StaticSelectBuilder = /** @class */ (function (_super) { | ||
__extends(StaticSelectBuilder, _super); | ||
function StaticSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class StaticSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
StaticSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
@@ -42,7 +23,6 @@ type: constants_1.ElementType.StaticSelect, | ||
initialOption: helpers_1.getBuilderResult(this.props.initialOption), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return StaticSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.StaticSelectBuilder = StaticSelectBuilder; | ||
@@ -49,0 +29,0 @@ helpers_1.applyMixins(StaticSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TextInputBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#input | ||
*/ | ||
var TextInputBuilder = /** @class */ (function (_super) { | ||
__extends(TextInputBuilder, _super); | ||
function TextInputBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class TextInputBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
TextInputBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.TextInput, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
dispatchActionConfig: helpers_1.getDispatchActionsConfigurationObject(this.props) | ||
dispatchActionConfig: helpers_1.getDispatchActionsConfigurationObject(this.props), | ||
}); | ||
}; | ||
return TextInputBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.TextInputBuilder = TextInputBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(TextInputBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TimePickerBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#timepicker | ||
*/ | ||
var TimePickerBuilder = /** @class */ (function (_super) { | ||
__extends(TimePickerBuilder, _super); | ||
function TimePickerBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class TimePickerBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
TimePickerBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.TimePicker, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return TimePickerBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.TimePickerBuilder = TimePickerBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(TimePickerBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UserMultiSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#users_multi_select | ||
*/ | ||
var UserMultiSelectBuilder = /** @class */ (function (_super) { | ||
__extends(UserMultiSelectBuilder, _super); | ||
function UserMultiSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class UserMultiSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
UserMultiSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.UserMultiSelect, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return UserMultiSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.UserMultiSelectBuilder = UserMultiSelectBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(UserMultiSelectBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UserSelectBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,17 +13,12 @@ * @@link https://api.slack.com/reference/block-kit/block-elements#users_select | ||
*/ | ||
var UserSelectBuilder = /** @class */ (function (_super) { | ||
__extends(UserSelectBuilder, _super); | ||
function UserSelectBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class UserSelectBuilder extends base_1.ElementBuilderBase { | ||
/** @internal */ | ||
UserSelectBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackElementDto, { | ||
type: constants_1.ElementType.UserSelect, | ||
placeholder: helpers_1.getPlainTextObject(this.props.placeholder), | ||
confirm: helpers_1.getBuilderResult(this.props.confirm) | ||
confirm: helpers_1.getBuilderResult(this.props.confirm), | ||
}); | ||
}; | ||
return UserSelectBuilder; | ||
}(base_1.ElementBuilderBase)); | ||
} | ||
} | ||
exports.UserSelectBuilder = UserSelectBuilder; | ||
@@ -45,0 +25,0 @@ helpers_1.applyMixins(UserSelectBuilder, [ |
@@ -7,9 +7,9 @@ "use strict"; | ||
*/ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyMixins = void 0; | ||
function applyMixins(derivedCtor, baseCtors) { | ||
var constructor = derivedCtor.prototype.constructor; | ||
baseCtors.forEach(function (baseCtor) { | ||
Object.getOwnPropertyNames(baseCtor.prototype).forEach(function (name) { | ||
var descriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name); | ||
const { constructor } = derivedCtor.prototype; | ||
baseCtors.forEach((baseCtor) => { | ||
Object.getOwnPropertyNames(baseCtor.prototype).forEach((name) => { | ||
const descriptor = Object.getOwnPropertyDescriptor(baseCtor.prototype, name); | ||
Object.defineProperty(derivedCtor.prototype, name, descriptor); | ||
@@ -16,0 +16,0 @@ }); |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getDispatchActionsConfigurationObject = exports.getFilter = exports.getFormattedDate = exports.getFields = exports.getElementsForContext = exports.getMarkdownObject = exports.getPlainTextObject = exports.getBuilderResults = exports.getBuilderResult = void 0; | ||
var objects_1 = require("../objects"); | ||
var defaultParams = { | ||
isMarkdown: false | ||
const objects_1 = require("../objects"); | ||
const defaultParams = { | ||
isMarkdown: false, | ||
}; | ||
var isUndefined = function (value) { return value === undefined; }; | ||
var areUndefined = function () { | ||
var values = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
values[_i] = arguments[_i]; | ||
} | ||
return values | ||
.filter(function (value) { return isUndefined(value); }).length === values.length; | ||
}; | ||
function getBuilderResult(builder, params) { | ||
if (params === void 0) { params = defaultParams; } | ||
const isUndefined = (value) => value === undefined; | ||
const areUndefined = (...values) => values | ||
.filter((value) => isUndefined(value)).length === values.length; | ||
function getBuilderResult(builder, params = defaultParams) { | ||
return isUndefined(builder) ? undefined : builder.build(params); | ||
} | ||
exports.getBuilderResult = getBuilderResult; | ||
function getBuilderResults(builders, params) { | ||
if (params === void 0) { params = defaultParams; } | ||
function getBuilderResults(builders, params = defaultParams) { | ||
return areUndefined(builders) ? undefined : builders | ||
.map(function (builder) { return getBuilderResult(builder, params); }); | ||
.map((builder) => getBuilderResult(builder, params)); | ||
} | ||
@@ -39,5 +31,5 @@ exports.getBuilderResults = getBuilderResults; | ||
? undefined | ||
: elements.map(function (element) { return (typeof element === 'string' | ||
: elements.map((element) => (typeof element === 'string' | ||
? getMarkdownObject(element) | ||
: element.build()); }); | ||
: element.build())); | ||
} | ||
@@ -48,3 +40,3 @@ exports.getElementsForContext = getElementsForContext; | ||
? undefined | ||
: fields.map(function (field) { return getMarkdownObject(field); }); | ||
: fields.map((field) => getMarkdownObject(field)); | ||
} | ||
@@ -59,11 +51,11 @@ exports.getFields = getFields; | ||
function getFilter(params) { | ||
var filter = params.filter, excludeBotUsers = params.excludeBotUsers, excludeExternalSharedChannels = params.excludeExternalSharedChannels; | ||
const { filter, excludeBotUsers, excludeExternalSharedChannels } = params; | ||
if (areUndefined(filter, excludeBotUsers, excludeExternalSharedChannels)) { | ||
return undefined; | ||
} | ||
return new objects_1.FilterObject({ filter: filter, excludeBotUsers: excludeBotUsers, excludeExternalSharedChannels: excludeExternalSharedChannels }); | ||
return new objects_1.FilterObject({ filter, excludeBotUsers, excludeExternalSharedChannels }); | ||
} | ||
exports.getFilter = getFilter; | ||
function getDispatchActionsConfigurationObject(params) { | ||
var onEnterPressed = params.onEnterPressed, onCharacterEntered = params.onCharacterEntered; | ||
const { onEnterPressed, onCharacterEntered } = params; | ||
if (areUndefined(onEnterPressed, onCharacterEntered)) { | ||
@@ -70,0 +62,0 @@ return undefined; |
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getBuiltCollection = void 0; | ||
var build_helpers_1 = require("./build-helpers"); | ||
function getBuiltCollection() { | ||
var builders = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
builders[_i] = arguments[_i]; | ||
} | ||
var prunedBuilders = builders.flat().filter(Boolean); | ||
const build_helpers_1 = require("./build-helpers"); | ||
function getBuiltCollection(...builders) { | ||
const prunedBuilders = builders.flat().filter(Boolean); | ||
return prunedBuilders.length === 0 | ||
@@ -12,0 +8,0 @@ ? [] |
@@ -12,5 +12,5 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./apply-mixins"), exports); | ||
__exportStar(require("./build-helpers"), exports); | ||
__exportStar(require("./get-built-collection"), exports); |
@@ -12,3 +12,3 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./bits"), exports); | ||
@@ -15,0 +15,0 @@ __exportStar(require("./blocks"), exports); |
"use strict"; | ||
var __assign = (this && this.__assign) || function () { | ||
__assign = Object.assign || function(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) | ||
t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Builder = void 0; | ||
var error_1 = require("./error"); | ||
var Builder = /** @class */ (function () { | ||
function Builder(params) { | ||
var _this = this; | ||
const error_1 = require("./error"); | ||
class Builder { | ||
constructor(params) { | ||
this.props = params || {}; | ||
Object.keys(this.props) | ||
.forEach(function (prop) { return _this.props[prop] === undefined | ||
&& delete _this.props[prop]; }); | ||
.forEach((prop) => this.props[prop] === undefined | ||
&& delete this.props[prop]); | ||
Object.seal(this); | ||
} | ||
Builder.prototype.set = function (value, prop) { | ||
set(value, prop) { | ||
if (this.props[prop] !== undefined) { | ||
throw new error_1.BlockBuilderError("Property " + prop + " can only be assigned once."); | ||
throw new error_1.BlockBuilderError(`Property ${prop} can only be assigned once.`); | ||
} | ||
@@ -33,5 +21,5 @@ if (value !== undefined) { | ||
return this; | ||
}; | ||
Builder.prototype.append = function (value, prop) { | ||
var prunedValue = value.filter(Boolean); | ||
} | ||
append(value, prop) { | ||
const prunedValue = value.filter(Boolean); | ||
if (prunedValue.length > 0) { | ||
@@ -43,14 +31,13 @@ this.props[prop] = this.props[prop] === undefined | ||
return this; | ||
}; | ||
Builder.prototype.getResult = function (Clazz, overrideProps) { | ||
return new Clazz(__assign(__assign({}, this.props), overrideProps)); | ||
}; | ||
} | ||
getResult(Clazz, overrideProps) { | ||
return new Clazz({ ...this.props, ...overrideProps }); | ||
} | ||
/** @internal */ | ||
// eslint-disable-next-line max-len | ||
// eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any | ||
Builder.prototype.build = function (params) { | ||
build(params) { | ||
throw new error_1.BlockBuilderError('Builder must have a declared \'build\' method'); | ||
}; | ||
return Builder; | ||
}()); | ||
} | ||
} | ||
exports.Builder = Builder; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BlockBuilderError = void 0; | ||
var BlockBuilderError = /** @class */ (function (_super) { | ||
__extends(BlockBuilderError, _super); | ||
function BlockBuilderError(message) { | ||
var _this = _super.call(this, message) || this; | ||
_this.name = 'BlockBuilderError'; | ||
Error.captureStackTrace(_this, _this.constructor); | ||
return _this; | ||
class BlockBuilderError extends Error { | ||
constructor(message) { | ||
super(message); | ||
this.name = 'BlockBuilderError'; | ||
Error.captureStackTrace(this, this.constructor); | ||
} | ||
return BlockBuilderError; | ||
}(Error)); | ||
} | ||
exports.BlockBuilderError = BlockBuilderError; |
@@ -12,5 +12,5 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./builder"), exports); | ||
__exportStar(require("./error"), exports); | ||
__exportStar(require("./slack-dto"), exports); |
"use strict"; | ||
/* eslint-disable max-classes-per-file */ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SlackElementDto = exports.SlackBlockDto = exports.SlackViewDto = exports.SlackTypeableDto = exports.SlackMessageDto = exports.SlackDto = exports.Param = void 0; | ||
@@ -91,57 +76,30 @@ var Param; | ||
})(Param = exports.Param || (exports.Param = {})); | ||
var SlackDto = /** @class */ (function () { | ||
function SlackDto(params) { | ||
var _this = this; | ||
Object.keys(params).forEach(function (paramName) { | ||
var mappedParam = SlackDto.mapParam(paramName); | ||
class SlackDto { | ||
constructor(params) { | ||
Object.keys(params).forEach((paramName) => { | ||
const mappedParam = SlackDto.mapParam(paramName); | ||
if (params[paramName] !== undefined && mappedParam !== undefined) { | ||
_this[mappedParam] = params[paramName]; | ||
this[mappedParam] = params[paramName]; | ||
} | ||
}); | ||
} | ||
SlackDto.mapParam = function (param) { | ||
static mapParam(param) { | ||
return Param[param]; | ||
}; | ||
return SlackDto; | ||
}()); | ||
} | ||
} | ||
exports.SlackDto = SlackDto; | ||
var SlackMessageDto = /** @class */ (function (_super) { | ||
__extends(SlackMessageDto, _super); | ||
function SlackMessageDto() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SlackMessageDto; | ||
}(SlackDto)); | ||
class SlackMessageDto extends SlackDto { | ||
} | ||
exports.SlackMessageDto = SlackMessageDto; | ||
var SlackTypeableDto = /** @class */ (function (_super) { | ||
__extends(SlackTypeableDto, _super); | ||
function SlackTypeableDto() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SlackTypeableDto; | ||
}(SlackDto)); | ||
class SlackTypeableDto extends SlackDto { | ||
} | ||
exports.SlackTypeableDto = SlackTypeableDto; | ||
var SlackViewDto = /** @class */ (function (_super) { | ||
__extends(SlackViewDto, _super); | ||
function SlackViewDto() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SlackViewDto; | ||
}(SlackTypeableDto)); | ||
class SlackViewDto extends SlackTypeableDto { | ||
} | ||
exports.SlackViewDto = SlackViewDto; | ||
var SlackBlockDto = /** @class */ (function (_super) { | ||
__extends(SlackBlockDto, _super); | ||
function SlackBlockDto() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SlackBlockDto; | ||
}(SlackTypeableDto)); | ||
class SlackBlockDto extends SlackTypeableDto { | ||
} | ||
exports.SlackBlockDto = SlackBlockDto; | ||
var SlackElementDto = /** @class */ (function (_super) { | ||
__extends(SlackElementDto, _super); | ||
function SlackElementDto() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
return SlackElementDto; | ||
}(SlackTypeableDto)); | ||
class SlackElementDto extends SlackTypeableDto { | ||
} | ||
exports.SlackElementDto = SlackElementDto; |
"use strict"; | ||
/* eslint-disable max-classes-per-file */ | ||
/* eslint-disable max-len */ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Options = exports.OptionGroups = exports.InitialUsers = exports.InitialOptions = exports.InitialConversations = exports.InitialChannels = exports.Filter = exports.Fields = exports.Elements = exports.Blocks = exports.Attachments = void 0; | ||
var lib_1 = require("../lib"); | ||
var constants_1 = require("../constants"); | ||
var Attachments = /** @class */ (function (_super) { | ||
__extends(Attachments, _super); | ||
function Attachments() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
const lib_1 = require("../lib"); | ||
const constants_1 = require("../constants"); | ||
class Attachments extends lib_1.Builder { | ||
attachments(...attachments) { | ||
return this.append(attachments.flat(), constants_1.Prop.Attachments); | ||
} | ||
Attachments.prototype.attachments = function () { | ||
var attachments = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
attachments[_i] = arguments[_i]; | ||
} | ||
return this.append(attachments.flat(), constants_1.Prop.Attachments); | ||
}; | ||
return Attachments; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Attachments = Attachments; | ||
var Blocks = /** @class */ (function (_super) { | ||
__extends(Blocks, _super); | ||
function Blocks() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class Blocks extends lib_1.Builder { | ||
blocks(...blocks) { | ||
return this.append(blocks.flat(), constants_1.Prop.Blocks); | ||
} | ||
Blocks.prototype.blocks = function () { | ||
var blocks = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
blocks[_i] = arguments[_i]; | ||
} | ||
return this.append(blocks.flat(), constants_1.Prop.Blocks); | ||
}; | ||
return Blocks; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Blocks = Blocks; | ||
var Elements = /** @class */ (function (_super) { | ||
__extends(Elements, _super); | ||
function Elements() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class Elements extends lib_1.Builder { | ||
elements(...elements) { | ||
return this.append(elements.flat(), constants_1.Prop.Elements); | ||
} | ||
Elements.prototype.elements = function () { | ||
var elements = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
elements[_i] = arguments[_i]; | ||
} | ||
return this.append(elements.flat(), constants_1.Prop.Elements); | ||
}; | ||
return Elements; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Elements = Elements; | ||
var Fields = /** @class */ (function (_super) { | ||
__extends(Fields, _super); | ||
function Fields() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class Fields extends lib_1.Builder { | ||
fields(...fields) { | ||
return this.append(fields.flat(), constants_1.Prop.Fields); | ||
} | ||
Fields.prototype.fields = function () { | ||
var fields = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
fields[_i] = arguments[_i]; | ||
} | ||
return this.append(fields.flat(), constants_1.Prop.Fields); | ||
}; | ||
return Fields; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Fields = Fields; | ||
var Filter = /** @class */ (function (_super) { | ||
__extends(Filter, _super); | ||
function Filter() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class Filter extends lib_1.Builder { | ||
filter(...filters) { | ||
return this.append(filters.flat(), constants_1.Prop.Filter); | ||
} | ||
Filter.prototype.filter = function () { | ||
var filters = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
filters[_i] = arguments[_i]; | ||
} | ||
return this.append(filters.flat(), constants_1.Prop.Filter); | ||
}; | ||
return Filter; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Filter = Filter; | ||
var InitialChannels = /** @class */ (function (_super) { | ||
__extends(InitialChannels, _super); | ||
function InitialChannels() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class InitialChannels extends lib_1.Builder { | ||
initialChannels(...channelIds) { | ||
return this.append(channelIds.flat(), constants_1.Prop.InitialChannels); | ||
} | ||
InitialChannels.prototype.initialChannels = function () { | ||
var channelIds = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
channelIds[_i] = arguments[_i]; | ||
} | ||
return this.append(channelIds.flat(), constants_1.Prop.InitialChannels); | ||
}; | ||
return InitialChannels; | ||
}(lib_1.Builder)); | ||
} | ||
exports.InitialChannels = InitialChannels; | ||
var InitialConversations = /** @class */ (function (_super) { | ||
__extends(InitialConversations, _super); | ||
function InitialConversations() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class InitialConversations extends lib_1.Builder { | ||
initialConversations(...conversationIds) { | ||
return this.append(conversationIds.flat(), constants_1.Prop.InitialConversations); | ||
} | ||
InitialConversations.prototype.initialConversations = function () { | ||
var conversationIds = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
conversationIds[_i] = arguments[_i]; | ||
} | ||
return this.append(conversationIds.flat(), constants_1.Prop.InitialConversations); | ||
}; | ||
return InitialConversations; | ||
}(lib_1.Builder)); | ||
} | ||
exports.InitialConversations = InitialConversations; | ||
var InitialOptions = /** @class */ (function (_super) { | ||
__extends(InitialOptions, _super); | ||
function InitialOptions() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class InitialOptions extends lib_1.Builder { | ||
initialOptions(...options) { | ||
return this.append(options.flat(), constants_1.Prop.InitialOptions); | ||
} | ||
InitialOptions.prototype.initialOptions = function () { | ||
var options = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
options[_i] = arguments[_i]; | ||
} | ||
return this.append(options.flat(), constants_1.Prop.InitialOptions); | ||
}; | ||
return InitialOptions; | ||
}(lib_1.Builder)); | ||
} | ||
exports.InitialOptions = InitialOptions; | ||
var InitialUsers = /** @class */ (function (_super) { | ||
__extends(InitialUsers, _super); | ||
function InitialUsers() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class InitialUsers extends lib_1.Builder { | ||
initialUsers(...userIds) { | ||
return this.append(userIds.flat(), constants_1.Prop.InitialUsers); | ||
} | ||
InitialUsers.prototype.initialUsers = function () { | ||
var userIds = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
userIds[_i] = arguments[_i]; | ||
} | ||
return this.append(userIds.flat(), constants_1.Prop.InitialUsers); | ||
}; | ||
return InitialUsers; | ||
}(lib_1.Builder)); | ||
} | ||
exports.InitialUsers = InitialUsers; | ||
var OptionGroups = /** @class */ (function (_super) { | ||
__extends(OptionGroups, _super); | ||
function OptionGroups() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class OptionGroups extends lib_1.Builder { | ||
optionGroups(...optionGroups) { | ||
return this.append(optionGroups.flat(), constants_1.Prop.OptionGroups); | ||
} | ||
OptionGroups.prototype.optionGroups = function () { | ||
var optionGroups = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
optionGroups[_i] = arguments[_i]; | ||
} | ||
return this.append(optionGroups.flat(), constants_1.Prop.OptionGroups); | ||
}; | ||
return OptionGroups; | ||
}(lib_1.Builder)); | ||
} | ||
exports.OptionGroups = OptionGroups; | ||
var Options = /** @class */ (function (_super) { | ||
__extends(Options, _super); | ||
function Options() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
class Options extends lib_1.Builder { | ||
options(...options) { | ||
return this.append(options.flat(), constants_1.Prop.Options); | ||
} | ||
Options.prototype.options = function () { | ||
var options = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
options[_i] = arguments[_i]; | ||
} | ||
return this.append(options.flat(), constants_1.Prop.Options); | ||
}; | ||
return Options; | ||
}(lib_1.Builder)); | ||
} | ||
exports.Options = Options; |
"use strict"; | ||
/* eslint-disable max-classes-per-file */ | ||
/* eslint-disable max-len */ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SubmitDisabled = exports.ResponseUrlEnabled = exports.ReplaceOriginal = exports.Primary = exports.Optional = exports.NotifyOnClose = exports.Multiline = exports.InChannel = exports.IgnoreMarkdown = exports.ExcludeBotUsers = exports.ExcludeExternalSharedChannels = exports.Ephemeral = exports.DispatchActionOnEnterPressed = exports.DispatchActionOnCharacterEntered = exports.DispatchAction = exports.DeleteOriginal = exports.DefaultToCurrentConversation = exports.Danger = exports.ClearOnClose = exports.AsUser = void 0; | ||
var lib_1 = require("../lib"); | ||
var constants_1 = require("../constants"); | ||
var AsUser = /** @class */ (function (_super) { | ||
__extends(AsUser, _super); | ||
function AsUser() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
const lib_1 = require("../lib"); | ||
const constants_1 = require("../constants"); | ||
class AsUser extends lib_1.Builder { | ||
/** | ||
@@ -34,14 +15,8 @@ * @description Sets the message to be sent as either the user whose auth token is being used or as the bot user associated with your app. | ||
*/ | ||
AsUser.prototype.asUser = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
asUser(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.AsUser); | ||
}; | ||
return AsUser; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.AsUser = AsUser; | ||
var ClearOnClose = /** @class */ (function (_super) { | ||
__extends(ClearOnClose, _super); | ||
function ClearOnClose() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ClearOnClose extends lib_1.Builder { | ||
/** | ||
@@ -53,14 +28,8 @@ * @description Instructs the Slack API to close all open views in the view stack when this particular view is closed. | ||
*/ | ||
ClearOnClose.prototype.clearOnClose = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
clearOnClose(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.ClearOnClose); | ||
}; | ||
return ClearOnClose; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ClearOnClose = ClearOnClose; | ||
var Danger = /** @class */ (function (_super) { | ||
__extends(Danger, _super); | ||
function Danger() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Danger extends lib_1.Builder { | ||
/** | ||
@@ -72,14 +41,8 @@ * @description For a button element, this changes the color to red. For confirmation dialogs, this sets the main button in the bottom right corner to red, indicating that an action is potentially destructive. | ||
*/ | ||
Danger.prototype.danger = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
danger(boolean = true) { | ||
return boolean ? this.set(constants_1.ButtonStyle.Danger, constants_1.Prop.Style) : this; | ||
}; | ||
return Danger; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Danger = Danger; | ||
var DefaultToCurrentConversation = /** @class */ (function (_super) { | ||
__extends(DefaultToCurrentConversation, _super); | ||
function DefaultToCurrentConversation() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DefaultToCurrentConversation extends lib_1.Builder { | ||
/** | ||
@@ -94,14 +57,8 @@ * @description Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. | ||
*/ | ||
DefaultToCurrentConversation.prototype.defaultToCurrentConversation = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
defaultToCurrentConversation(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.DefaultToCurrentConversation); | ||
}; | ||
return DefaultToCurrentConversation; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.DefaultToCurrentConversation = DefaultToCurrentConversation; | ||
var DeleteOriginal = /** @class */ (function (_super) { | ||
__extends(DeleteOriginal, _super); | ||
function DeleteOriginal() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DeleteOriginal extends lib_1.Builder { | ||
/** | ||
@@ -113,14 +70,8 @@ * @description Instructs the Slack API to delete the message from which the interaction originated when sending the current message. | ||
*/ | ||
DeleteOriginal.prototype.deleteOriginal = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
deleteOriginal(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.DeleteOriginal); | ||
}; | ||
return DeleteOriginal; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.DeleteOriginal = DeleteOriginal; | ||
var DispatchAction = /** @class */ (function (_super) { | ||
__extends(DispatchAction, _super); | ||
function DispatchAction() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DispatchAction extends lib_1.Builder { | ||
/** | ||
@@ -132,14 +83,8 @@ * @description Instructs the Slack API to send an interaction event to your app when the element in the input block has been interacted with. | ||
*/ | ||
DispatchAction.prototype.dispatchAction = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
dispatchAction(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.DispatchAction); | ||
}; | ||
return DispatchAction; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.DispatchAction = DispatchAction; | ||
var DispatchActionOnCharacterEntered = /** @class */ (function (_super) { | ||
__extends(DispatchActionOnCharacterEntered, _super); | ||
function DispatchActionOnCharacterEntered() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DispatchActionOnCharacterEntered extends lib_1.Builder { | ||
/** | ||
@@ -151,14 +96,8 @@ * @description Instructs the Slack API to dispatch an interaction payload to your app when the user enters or deletes a character in the input. | ||
*/ | ||
DispatchActionOnCharacterEntered.prototype.dispatchActionOnCharacterEntered = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
dispatchActionOnCharacterEntered(boolean = true) { | ||
return boolean ? this.set(constants_1.DispatchOnType.OnCharacterEntered, constants_1.Prop.OnCharacterEntered) : this; | ||
}; | ||
return DispatchActionOnCharacterEntered; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.DispatchActionOnCharacterEntered = DispatchActionOnCharacterEntered; | ||
var DispatchActionOnEnterPressed = /** @class */ (function (_super) { | ||
__extends(DispatchActionOnEnterPressed, _super); | ||
function DispatchActionOnEnterPressed() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class DispatchActionOnEnterPressed extends lib_1.Builder { | ||
/** | ||
@@ -170,14 +109,8 @@ * @description Instructs the Slack API to dispatch an interaction payload to your app when the user presses the enter key while the input is in focus. | ||
*/ | ||
DispatchActionOnEnterPressed.prototype.dispatchActionOnEnterPressed = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
dispatchActionOnEnterPressed(boolean = true) { | ||
return boolean ? this.set(constants_1.DispatchOnType.OnEnterPressed, constants_1.Prop.OnEnterPressed) : this; | ||
}; | ||
return DispatchActionOnEnterPressed; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.DispatchActionOnEnterPressed = DispatchActionOnEnterPressed; | ||
var Ephemeral = /** @class */ (function (_super) { | ||
__extends(Ephemeral, _super); | ||
function Ephemeral() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Ephemeral extends lib_1.Builder { | ||
/** | ||
@@ -189,14 +122,8 @@ * @description Instructs the Slack API to display the message only to the user who invoked the interaction payload or slash command. | ||
*/ | ||
Ephemeral.prototype.ephemeral = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
ephemeral(boolean = true) { | ||
return boolean ? this.set(constants_1.ResponseType.Ephemeral, constants_1.Prop.ResponseType) : this; | ||
}; | ||
return Ephemeral; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Ephemeral = Ephemeral; | ||
var ExcludeExternalSharedChannels = /** @class */ (function (_super) { | ||
__extends(ExcludeExternalSharedChannels, _super); | ||
function ExcludeExternalSharedChannels() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ExcludeExternalSharedChannels extends lib_1.Builder { | ||
/** | ||
@@ -208,14 +135,8 @@ * @description Excludes conversations shared with external organizations from the menu's options. | ||
*/ | ||
ExcludeExternalSharedChannels.prototype.excludeExternalSharedChannels = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
excludeExternalSharedChannels(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.ExcludeExternalSharedChannels); | ||
}; | ||
return ExcludeExternalSharedChannels; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ExcludeExternalSharedChannels = ExcludeExternalSharedChannels; | ||
var ExcludeBotUsers = /** @class */ (function (_super) { | ||
__extends(ExcludeBotUsers, _super); | ||
function ExcludeBotUsers() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ExcludeBotUsers extends lib_1.Builder { | ||
/** | ||
@@ -227,14 +148,8 @@ * @description Excludes conversations with bot users from the menu's options. | ||
*/ | ||
ExcludeBotUsers.prototype.excludeBotUsers = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
excludeBotUsers(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.ExcludeBotUsers); | ||
}; | ||
return ExcludeBotUsers; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ExcludeBotUsers = ExcludeBotUsers; | ||
var IgnoreMarkdown = /** @class */ (function (_super) { | ||
__extends(IgnoreMarkdown, _super); | ||
function IgnoreMarkdown() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class IgnoreMarkdown extends lib_1.Builder { | ||
/** | ||
@@ -246,14 +161,8 @@ * @description Instructs the Slack API to ignore any markdown in the text property of the message. | ||
*/ | ||
IgnoreMarkdown.prototype.ignoreMarkdown = function (boolean) { | ||
if (boolean === void 0) { boolean = false; } | ||
ignoreMarkdown(boolean = false) { | ||
return this.set(boolean, constants_1.Prop.Mrkdwn); | ||
}; | ||
return IgnoreMarkdown; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.IgnoreMarkdown = IgnoreMarkdown; | ||
var InChannel = /** @class */ (function (_super) { | ||
__extends(InChannel, _super); | ||
function InChannel() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InChannel extends lib_1.Builder { | ||
/** | ||
@@ -265,14 +174,8 @@ * @description Instructs the Slack API to make the message visible to everyone in the channel from which the interaction payload or slash command originated. | ||
*/ | ||
InChannel.prototype.inChannel = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
inChannel(boolean = true) { | ||
return boolean ? this.set(constants_1.ResponseType.InChannel, constants_1.Prop.ResponseType) : this; | ||
}; | ||
return InChannel; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InChannel = InChannel; | ||
var Multiline = /** @class */ (function (_super) { | ||
__extends(Multiline, _super); | ||
function Multiline() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Multiline extends lib_1.Builder { | ||
/** | ||
@@ -284,14 +187,8 @@ * @description Sets the text input to be a larger, multi-line input for larger portions of text. | ||
*/ | ||
Multiline.prototype.multiline = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
multiline(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.Multiline); | ||
}; | ||
return Multiline; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Multiline = Multiline; | ||
var NotifyOnClose = /** @class */ (function (_super) { | ||
__extends(NotifyOnClose, _super); | ||
function NotifyOnClose() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class NotifyOnClose extends lib_1.Builder { | ||
/** | ||
@@ -303,14 +200,8 @@ * @description Instructs the Slack API to send an interaction payload to your app when the view is closed. | ||
*/ | ||
NotifyOnClose.prototype.notifyOnClose = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
notifyOnClose(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.NotifyOnClose); | ||
}; | ||
return NotifyOnClose; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.NotifyOnClose = NotifyOnClose; | ||
var Optional = /** @class */ (function (_super) { | ||
__extends(Optional, _super); | ||
function Optional() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Optional extends lib_1.Builder { | ||
/** | ||
@@ -322,14 +213,8 @@ * @description Lets the Slack API know that inputting data in the the input is not required for the view to be successfully submitted. | ||
*/ | ||
Optional.prototype.optional = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
optional(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.Optional); | ||
}; | ||
return Optional; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Optional = Optional; | ||
var Primary = /** @class */ (function (_super) { | ||
__extends(Primary, _super); | ||
function Primary() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Primary extends lib_1.Builder { | ||
/** | ||
@@ -341,14 +226,8 @@ * @description For a button element, this changes the color to green. For confirmation dialogs, this sets the main button in the bottom right corner to green, which is meant to confirm the action. | ||
*/ | ||
Primary.prototype.primary = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
primary(boolean = true) { | ||
return boolean ? this.set(constants_1.ButtonStyle.Primary, constants_1.Prop.Style) : this; | ||
}; | ||
return Primary; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Primary = Primary; | ||
var ReplaceOriginal = /** @class */ (function (_super) { | ||
__extends(ReplaceOriginal, _super); | ||
function ReplaceOriginal() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ReplaceOriginal extends lib_1.Builder { | ||
/** | ||
@@ -360,14 +239,8 @@ * @description Instructs the Slack API to replace the original message, from which the interaction payload originated, with the current message. | ||
*/ | ||
ReplaceOriginal.prototype.replaceOriginal = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
replaceOriginal(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.ReplaceOriginal); | ||
}; | ||
return ReplaceOriginal; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ReplaceOriginal = ReplaceOriginal; | ||
var ResponseUrlEnabled = /** @class */ (function (_super) { | ||
__extends(ResponseUrlEnabled, _super); | ||
function ResponseUrlEnabled() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ResponseUrlEnabled extends lib_1.Builder { | ||
/** | ||
@@ -382,14 +255,8 @@ * @description Instructs the Slack API to provide a response URL at view submission. | ||
*/ | ||
ResponseUrlEnabled.prototype.responseUrlEnabled = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
responseUrlEnabled(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.ResponseUrlEnabled); | ||
}; | ||
return ResponseUrlEnabled; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ResponseUrlEnabled = ResponseUrlEnabled; | ||
var SubmitDisabled = /** @class */ (function (_super) { | ||
__extends(SubmitDisabled, _super); | ||
function SubmitDisabled() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class SubmitDisabled extends lib_1.Builder { | ||
/** | ||
@@ -401,8 +268,6 @@ * @description Configures the workflow step to have a disabled submit button until the user has input data into one or more inputs. | ||
*/ | ||
SubmitDisabled.prototype.submitDisabled = function (boolean) { | ||
if (boolean === void 0) { boolean = true; } | ||
submitDisabled(boolean = true) { | ||
return this.set(boolean, constants_1.Prop.SubmitDisabled); | ||
}; | ||
return SubmitDisabled; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.SubmitDisabled = SubmitDisabled; |
@@ -12,3 +12,3 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./append-methods"), exports); | ||
@@ -15,0 +15,0 @@ __exportStar(require("./configuration-methods"), exports); |
"use strict"; | ||
/* eslint-disable max-classes-per-file */ | ||
/* eslint-disable max-len */ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PrintPreviewUrl = exports.GetBlocks = exports.GetAttachments = exports.End = exports.BuildToObject = exports.BuildToJSON = void 0; | ||
var lib_1 = require("../lib"); | ||
var BuildToJSON = /** @class */ (function (_super) { | ||
__extends(BuildToJSON, _super); | ||
function BuildToJSON() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
const lib_1 = require("../lib"); | ||
class BuildToJSON extends lib_1.Builder { | ||
/** | ||
* @description Builds the view and returns it as a Slack API-compatible JSON string. | ||
*/ | ||
BuildToJSON.prototype.buildToJSON = function () { | ||
var result = this.build(); | ||
buildToJSON() { | ||
const result = this.build(); | ||
return JSON.stringify(result); | ||
}; | ||
return BuildToJSON; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.BuildToJSON = BuildToJSON; | ||
var BuildToObject = /** @class */ (function (_super) { | ||
__extends(BuildToObject, _super); | ||
function BuildToObject() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class BuildToObject extends lib_1.Builder { | ||
/** | ||
* @description Builds the view and returns it as a Slack API-compatible object. | ||
*/ | ||
BuildToObject.prototype.buildToObject = function () { | ||
buildToObject() { | ||
return this.build(); | ||
}; | ||
return BuildToObject; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.BuildToObject = BuildToObject; | ||
var End = /** @class */ (function (_super) { | ||
__extends(End, _super); | ||
function End() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class End extends lib_1.Builder { | ||
/** | ||
@@ -62,13 +33,8 @@ * @description Performs no alterations to the object on which it is called. It is meant to simulate a closing HTML tag for those who prefer to have an explicit end declared for an object. | ||
*/ | ||
End.prototype.end = function () { | ||
end() { | ||
return this; | ||
}; | ||
return End; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.End = End; | ||
var GetAttachments = /** @class */ (function (_super) { | ||
__extends(GetAttachments, _super); | ||
function GetAttachments() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class GetAttachments extends lib_1.Builder { | ||
/** | ||
@@ -79,13 +45,8 @@ * @description Builds the view and returns a Slack API-compatible array of attachments. | ||
*/ | ||
GetAttachments.prototype.getAttachments = function () { | ||
getAttachments() { | ||
return this.build().attachments; | ||
}; | ||
return GetAttachments; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.GetAttachments = GetAttachments; | ||
var GetBlocks = /** @class */ (function (_super) { | ||
__extends(GetBlocks, _super); | ||
function GetBlocks() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class GetBlocks extends lib_1.Builder { | ||
/** | ||
@@ -96,28 +57,22 @@ * @description Builds the view and returns a Slack API-compatible array of blocks. | ||
*/ | ||
GetBlocks.prototype.getBlocks = function () { | ||
getBlocks() { | ||
this.build(); | ||
return this.build().blocks; | ||
}; | ||
return GetBlocks; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.GetBlocks = GetBlocks; | ||
var PrintPreviewUrl = /** @class */ (function (_super) { | ||
__extends(PrintPreviewUrl, _super); | ||
function PrintPreviewUrl() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class PrintPreviewUrl extends lib_1.Builder { | ||
/** | ||
* @description When called, builds the view and prints to the console the preview URL in order to open and preview the view on Slack's Block Kit Builder web application. | ||
*/ | ||
PrintPreviewUrl.prototype.printPreviewUrl = function () { | ||
var result = this.build(); | ||
var baseUri = 'https://app.slack.com/block-kit-builder/#'; | ||
var stringifiedBlocks = this.props.type | ||
printPreviewUrl() { | ||
const result = this.build(); | ||
const baseUri = 'https://app.slack.com/block-kit-builder/#'; | ||
const stringifiedBlocks = this.props.type | ||
? JSON.stringify(result) | ||
: JSON.stringify({ blocks: result.blocks, attachments: result.attachments }); | ||
// eslint-disable-next-line no-console | ||
console.log(encodeURI("" + baseUri + stringifiedBlocks).replace(/[!'()*]/g, escape)); | ||
}; | ||
return PrintPreviewUrl; | ||
}(lib_1.Builder)); | ||
console.log(encodeURI(`${baseUri}${stringifiedBlocks}`).replace(/[!'()*]/g, escape)); | ||
} | ||
} | ||
exports.PrintPreviewUrl = PrintPreviewUrl; |
"use strict"; | ||
/* eslint-disable max-classes-per-file */ | ||
/* eslint-disable max-len */ | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Value = exports.Url = exports.Ts = exports.ThreadTs = exports.Title = exports.Text = exports.Submit = exports.PrivateMetaData = exports.PostAt = exports.Placeholder = exports.MinLength = exports.MinQueryLength = exports.MaxSelectedItems = exports.MaxLength = exports.Label = exports.InitialValue = exports.InitialUser = exports.InitialTime = exports.InitialOption = exports.InitialDate = exports.InitialConversation = exports.InitialChannel = exports.ImageUrl = exports.Hint = exports.Fallback = exports.ExternalId = exports.Element = exports.Description = exports.Deny = exports.Confirm = exports.Color = exports.Close = exports.Channel = exports.CallbackId = exports.BlockId = exports.AltText = exports.ActionId = exports.Accessory = void 0; | ||
var lib_1 = require("../lib"); | ||
var constants_1 = require("../constants"); | ||
var Accessory = /** @class */ (function (_super) { | ||
__extends(Accessory, _super); | ||
function Accessory() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
const lib_1 = require("../lib"); | ||
const constants_1 = require("../constants"); | ||
class Accessory extends lib_1.Builder { | ||
/** | ||
@@ -38,13 +19,8 @@ * @description Adds an element to the section block of your view or message. | ||
*/ | ||
Accessory.prototype.accessory = function (element) { | ||
accessory(element) { | ||
return this.set(element, constants_1.Prop.Accessory); | ||
}; | ||
return Accessory; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Accessory = Accessory; | ||
var ActionId = /** @class */ (function (_super) { | ||
__extends(ActionId, _super); | ||
function ActionId() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ActionId extends lib_1.Builder { | ||
/** | ||
@@ -61,13 +37,8 @@ * @description Sets a string to be an identifier for the action taken by the user. It is sent back to your app in the interaction payload when the element is interacted or when the view is submitted. | ||
*/ | ||
ActionId.prototype.actionId = function (actionId) { | ||
actionId(actionId) { | ||
return this.set(actionId, constants_1.Prop.ActionId); | ||
}; | ||
return ActionId; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ActionId = ActionId; | ||
var AltText = /** @class */ (function (_super) { | ||
__extends(AltText, _super); | ||
function AltText() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class AltText extends lib_1.Builder { | ||
/** | ||
@@ -85,13 +56,8 @@ * @description This a plain-text summary of the image element or block. | ||
*/ | ||
AltText.prototype.altText = function (altText) { | ||
altText(altText) { | ||
return this.set(altText, constants_1.Prop.AltText); | ||
}; | ||
return AltText; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.AltText = AltText; | ||
var BlockId = /** @class */ (function (_super) { | ||
__extends(BlockId, _super); | ||
function BlockId() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class BlockId extends lib_1.Builder { | ||
/** | ||
@@ -108,13 +74,8 @@ * @description Sets a string to be an identifier for any given block in a view or message. This is sent back to your app in interaction payloads and view submissions for your app to process. | ||
*/ | ||
BlockId.prototype.blockId = function (blockId) { | ||
blockId(blockId) { | ||
return this.set(blockId, constants_1.Prop.BlockId); | ||
}; | ||
return BlockId; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.BlockId = BlockId; | ||
var CallbackId = /** @class */ (function (_super) { | ||
__extends(CallbackId, _super); | ||
function CallbackId() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class CallbackId extends lib_1.Builder { | ||
/** | ||
@@ -130,13 +91,8 @@ * @description Sets a string for your view that is sent back to your server in all of the interaction payloads and view submissions. Used to identify the view from which the interaction payload is generated. | ||
*/ | ||
CallbackId.prototype.callbackId = function (callbackId) { | ||
callbackId(callbackId) { | ||
return this.set(callbackId, constants_1.Prop.CallbackId); | ||
}; | ||
return CallbackId; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.CallbackId = CallbackId; | ||
var Channel = /** @class */ (function (_super) { | ||
__extends(Channel, _super); | ||
function Channel() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Channel extends lib_1.Builder { | ||
/** | ||
@@ -148,13 +104,8 @@ * @description Sets the Slack channel ID to which the message will be sent via the API. | ||
*/ | ||
Channel.prototype.channel = function (channel) { | ||
channel(channel) { | ||
return this.set(channel, constants_1.Prop.Channel); | ||
}; | ||
return Channel; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Channel = Channel; | ||
var Close = /** @class */ (function (_super) { | ||
__extends(Close, _super); | ||
function Close() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Close extends lib_1.Builder { | ||
/** | ||
@@ -169,13 +120,8 @@ * @description Sets the text displayed on the button that closes the view. | ||
*/ | ||
Close.prototype.close = function (closeButtonText) { | ||
close(closeButtonText) { | ||
return this.set(closeButtonText, constants_1.Prop.Close); | ||
}; | ||
return Close; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Close = Close; | ||
var Color = /** @class */ (function (_super) { | ||
__extends(Color, _super); | ||
function Color() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Color extends lib_1.Builder { | ||
/** | ||
@@ -187,13 +133,8 @@ * @description Sets the color for the blockquote border to the left of the attachment. | ||
*/ | ||
Color.prototype.color = function (color) { | ||
color(color) { | ||
return this.set(color, constants_1.Prop.Color); | ||
}; | ||
return Color; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Color = Color; | ||
var Confirm = /** @class */ (function (_super) { | ||
__extends(Confirm, _super); | ||
function Confirm() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Confirm extends lib_1.Builder { | ||
/** | ||
@@ -205,13 +146,8 @@ * @description For confirmation dialogs, sets the text of the button that confirms the action to which the confirmation dialog has been added. For elements, adds a confirmation dialog that is displayed when the user interacts with the element to confirm the selection or action. | ||
*/ | ||
Confirm.prototype.confirm = function (value) { | ||
confirm(value) { | ||
return this.set(value, constants_1.Prop.Confirm); | ||
}; | ||
return Confirm; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Confirm = Confirm; | ||
var Deny = /** @class */ (function (_super) { | ||
__extends(Deny, _super); | ||
function Deny() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Deny extends lib_1.Builder { | ||
/** | ||
@@ -227,13 +163,8 @@ * @description Sets the text of the button that is meant to cancel the action or which the confirmation dialog was called. | ||
*/ | ||
Deny.prototype.deny = function (text) { | ||
deny(text) { | ||
return this.set(text, constants_1.Prop.Deny); | ||
}; | ||
return Deny; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Deny = Deny; | ||
var Description = /** @class */ (function (_super) { | ||
__extends(Description, _super); | ||
function Description() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Description extends lib_1.Builder { | ||
/** | ||
@@ -248,13 +179,8 @@ * @description Sets the descriptive text displayed below the text field of the option. | ||
*/ | ||
Description.prototype.description = function (description) { | ||
description(description) { | ||
return this.set(description, constants_1.Prop.Description); | ||
}; | ||
return Description; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Description = Description; | ||
var Element = /** @class */ (function (_super) { | ||
__extends(Element, _super); | ||
function Element() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Element extends lib_1.Builder { | ||
/** | ||
@@ -271,13 +197,8 @@ * @description Adds a user input element to the input block for gathering information from the user. | ||
*/ | ||
Element.prototype.element = function (element) { | ||
element(element) { | ||
return this.set(element, constants_1.Prop.Element); | ||
}; | ||
return Element; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Element = Element; | ||
var ExternalId = /** @class */ (function (_super) { | ||
__extends(ExternalId, _super); | ||
function ExternalId() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ExternalId extends lib_1.Builder { | ||
/** | ||
@@ -293,13 +214,8 @@ * @description Sets a custom identifier for a view or file that must be unique for all views on a per-team basis. | ||
*/ | ||
ExternalId.prototype.externalId = function (externalId) { | ||
externalId(externalId) { | ||
return this.set(externalId, constants_1.Prop.ExternalId); | ||
}; | ||
return ExternalId; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ExternalId = ExternalId; | ||
var Fallback = /** @class */ (function (_super) { | ||
__extends(Fallback, _super); | ||
function Fallback() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Fallback extends lib_1.Builder { | ||
/** | ||
@@ -311,13 +227,8 @@ * @description Sets the plain text summary of the attachment used in clients that can't display formatted text (eg. IRC, mobile notifications). | ||
*/ | ||
Fallback.prototype.fallback = function (text) { | ||
fallback(text) { | ||
return this.set(text, constants_1.Prop.Fallback); | ||
}; | ||
return Fallback; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Fallback = Fallback; | ||
var Hint = /** @class */ (function (_super) { | ||
__extends(Hint, _super); | ||
function Hint() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Hint extends lib_1.Builder { | ||
/** | ||
@@ -332,13 +243,8 @@ * @description Adds a hint below the input block to provide users with more context or instructions for using the input. | ||
*/ | ||
Hint.prototype.hint = function (hint) { | ||
hint(hint) { | ||
return this.set(hint, constants_1.Prop.Hint); | ||
}; | ||
return Hint; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Hint = Hint; | ||
var ImageUrl = /** @class */ (function (_super) { | ||
__extends(ImageUrl, _super); | ||
function ImageUrl() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ImageUrl extends lib_1.Builder { | ||
/** | ||
@@ -354,13 +260,8 @@ * @description Sets the source URL for the image block or element that you wish to include in your view or message. | ||
*/ | ||
ImageUrl.prototype.imageUrl = function (url) { | ||
imageUrl(url) { | ||
return this.set(url, constants_1.Prop.ImageUrl); | ||
}; | ||
return ImageUrl; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ImageUrl = ImageUrl; | ||
var InitialChannel = /** @class */ (function (_super) { | ||
__extends(InitialChannel, _super); | ||
function InitialChannel() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialChannel extends lib_1.Builder { | ||
/** | ||
@@ -372,13 +273,8 @@ * @description Pre-populates the menu with a selected, default channel. | ||
*/ | ||
InitialChannel.prototype.initialChannel = function (channelId) { | ||
initialChannel(channelId) { | ||
return this.set(channelId, constants_1.Prop.InitialChannel); | ||
}; | ||
return InitialChannel; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialChannel = InitialChannel; | ||
var InitialConversation = /** @class */ (function (_super) { | ||
__extends(InitialConversation, _super); | ||
function InitialConversation() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialConversation extends lib_1.Builder { | ||
/** | ||
@@ -390,13 +286,8 @@ * @description Pre-populates the menu with a selected, default conversation. | ||
*/ | ||
InitialConversation.prototype.initialConversation = function (conversationId) { | ||
initialConversation(conversationId) { | ||
return this.set(conversationId, constants_1.Prop.InitialConversation); | ||
}; | ||
return InitialConversation; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialConversation = InitialConversation; | ||
var InitialDate = /** @class */ (function (_super) { | ||
__extends(InitialDate, _super); | ||
function InitialDate() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialDate extends lib_1.Builder { | ||
/** | ||
@@ -408,13 +299,8 @@ * @description Pre-populates the date picker with a selected, default date. | ||
*/ | ||
InitialDate.prototype.initialDate = function (date) { | ||
initialDate(date) { | ||
return this.set(date, constants_1.Prop.InitialDate); | ||
}; | ||
return InitialDate; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialDate = InitialDate; | ||
var InitialOption = /** @class */ (function (_super) { | ||
__extends(InitialOption, _super); | ||
function InitialOption() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialOption extends lib_1.Builder { | ||
/** | ||
@@ -429,13 +315,8 @@ * @description Pre-populates the menu or date picker with a selected, default option. | ||
*/ | ||
InitialOption.prototype.initialOption = function (option) { | ||
initialOption(option) { | ||
return this.set(option, constants_1.Prop.InitialOption); | ||
}; | ||
return InitialOption; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialOption = InitialOption; | ||
var InitialTime = /** @class */ (function (_super) { | ||
__extends(InitialTime, _super); | ||
function InitialTime() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialTime extends lib_1.Builder { | ||
/** | ||
@@ -450,13 +331,8 @@ * @description Pre-populates the time picker with a selected, default time. | ||
*/ | ||
InitialTime.prototype.initialTime = function (time) { | ||
initialTime(time) { | ||
return this.set(time, constants_1.Prop.InitialTime); | ||
}; | ||
return InitialTime; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialTime = InitialTime; | ||
var InitialUser = /** @class */ (function (_super) { | ||
__extends(InitialUser, _super); | ||
function InitialUser() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialUser extends lib_1.Builder { | ||
/** | ||
@@ -468,13 +344,8 @@ * @description Pre-populates the menu with a selected, default user. | ||
*/ | ||
InitialUser.prototype.initialUser = function (userId) { | ||
initialUser(userId) { | ||
return this.set(userId, constants_1.Prop.InitialUser); | ||
}; | ||
return InitialUser; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialUser = InitialUser; | ||
var InitialValue = /** @class */ (function (_super) { | ||
__extends(InitialValue, _super); | ||
function InitialValue() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class InitialValue extends lib_1.Builder { | ||
/** | ||
@@ -486,13 +357,8 @@ * @description Pre-populates the text input with default, editable text. | ||
*/ | ||
InitialValue.prototype.initialValue = function (value) { | ||
initialValue(value) { | ||
return this.set(value, constants_1.Prop.InitialValue); | ||
}; | ||
return InitialValue; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.InitialValue = InitialValue; | ||
var Label = /** @class */ (function (_super) { | ||
__extends(Label, _super); | ||
function Label() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Label extends lib_1.Builder { | ||
/** | ||
@@ -509,13 +375,8 @@ * @description For input blocks, this sets the text displayed in the label for the input. For an option group, it defines the text displayed as a title for the group. | ||
*/ | ||
Label.prototype.label = function (label) { | ||
label(label) { | ||
return this.set(label, constants_1.Prop.Label); | ||
}; | ||
return Label; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Label = Label; | ||
var MaxLength = /** @class */ (function (_super) { | ||
__extends(MaxLength, _super); | ||
function MaxLength() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class MaxLength extends lib_1.Builder { | ||
/** | ||
@@ -527,13 +388,8 @@ * @description Sets a maximum character count allowed in the given text input. | ||
*/ | ||
MaxLength.prototype.maxLength = function (length) { | ||
maxLength(length) { | ||
return this.set(length, constants_1.Prop.MaxLength); | ||
}; | ||
return MaxLength; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.MaxLength = MaxLength; | ||
var MaxSelectedItems = /** @class */ (function (_super) { | ||
__extends(MaxSelectedItems, _super); | ||
function MaxSelectedItems() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class MaxSelectedItems extends lib_1.Builder { | ||
/** | ||
@@ -545,13 +401,8 @@ * @description Sets a limit to how many items the user can select in the multi-select menu. | ||
*/ | ||
MaxSelectedItems.prototype.maxSelectedItems = function (quantity) { | ||
maxSelectedItems(quantity) { | ||
return this.set(quantity, constants_1.Prop.MaxSelectedItems); | ||
}; | ||
return MaxSelectedItems; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.MaxSelectedItems = MaxSelectedItems; | ||
var MinQueryLength = /** @class */ (function (_super) { | ||
__extends(MinQueryLength, _super); | ||
function MinQueryLength() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class MinQueryLength extends lib_1.Builder { | ||
/** | ||
@@ -566,13 +417,8 @@ * @description Sets a minimum number of characters required before Slack queries your app for a list of options. | ||
*/ | ||
MinQueryLength.prototype.minQueryLength = function (length) { | ||
minQueryLength(length) { | ||
return this.set(length, constants_1.Prop.MinQueryLength); | ||
}; | ||
return MinQueryLength; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.MinQueryLength = MinQueryLength; | ||
var MinLength = /** @class */ (function (_super) { | ||
__extends(MinLength, _super); | ||
function MinLength() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class MinLength extends lib_1.Builder { | ||
/** | ||
@@ -587,13 +433,8 @@ * @description Sets a minimum character count required for the given text input before the user can submit the view. | ||
*/ | ||
MinLength.prototype.minLength = function (length) { | ||
minLength(length) { | ||
return this.set(length, constants_1.Prop.MinLength); | ||
}; | ||
return MinLength; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.MinLength = MinLength; | ||
var Placeholder = /** @class */ (function (_super) { | ||
__extends(Placeholder, _super); | ||
function Placeholder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Placeholder extends lib_1.Builder { | ||
/** | ||
@@ -608,13 +449,8 @@ * @description Defines the text displayed as a placeholder in the empty input element. | ||
*/ | ||
Placeholder.prototype.placeholder = function (placeholder) { | ||
placeholder(placeholder) { | ||
return this.set(placeholder, constants_1.Prop.Placeholder); | ||
}; | ||
return Placeholder; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Placeholder = Placeholder; | ||
var PostAt = /** @class */ (function (_super) { | ||
__extends(PostAt, _super); | ||
function PostAt() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class PostAt extends lib_1.Builder { | ||
/** | ||
@@ -626,13 +462,8 @@ * @description Sets a time in the future for the message to be sent to the channel or user, as a scheduled message. | ||
*/ | ||
PostAt.prototype.postAt = function (timestamp) { | ||
postAt(timestamp) { | ||
return this.set(timestamp, constants_1.Prop.PostAt); | ||
}; | ||
return PostAt; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.PostAt = PostAt; | ||
var PrivateMetaData = /** @class */ (function (_super) { | ||
__extends(PrivateMetaData, _super); | ||
function PrivateMetaData() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class PrivateMetaData extends lib_1.Builder { | ||
/** | ||
@@ -648,13 +479,8 @@ * @description Defines a string sent back to your server with view and interaction payloads. | ||
*/ | ||
PrivateMetaData.prototype.privateMetaData = function (privateMetaData) { | ||
privateMetaData(privateMetaData) { | ||
return this.set(privateMetaData, constants_1.Prop.PrivateMetaData); | ||
}; | ||
return PrivateMetaData; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.PrivateMetaData = PrivateMetaData; | ||
var Submit = /** @class */ (function (_super) { | ||
__extends(Submit, _super); | ||
function Submit() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Submit extends lib_1.Builder { | ||
/** | ||
@@ -669,13 +495,8 @@ * @description Sets the text displayed on the button that submits the view. | ||
*/ | ||
Submit.prototype.submit = function (text) { | ||
submit(text) { | ||
return this.set(text, constants_1.Prop.Submit); | ||
}; | ||
return Submit; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Submit = Submit; | ||
var Text = /** @class */ (function (_super) { | ||
__extends(Text, _super); | ||
function Text() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Text extends lib_1.Builder { | ||
/** | ||
@@ -694,13 +515,8 @@ * @description Sets the text displayed for buttons, headers, confirmation dialogs, sections, context blocks, and options. | ||
*/ | ||
Text.prototype.text = function (text) { | ||
text(text) { | ||
return this.set(text, constants_1.Prop.Text); | ||
}; | ||
return Text; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Text = Text; | ||
var Title = /** @class */ (function (_super) { | ||
__extends(Title, _super); | ||
function Title() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Title extends lib_1.Builder { | ||
/** | ||
@@ -718,13 +534,8 @@ * @description Sets the title displayed for the block, element, or confirmation dialog. | ||
*/ | ||
Title.prototype.title = function (title) { | ||
title(title) { | ||
return this.set(title, constants_1.Prop.Title); | ||
}; | ||
return Title; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Title = Title; | ||
var ThreadTs = /** @class */ (function (_super) { | ||
__extends(ThreadTs, _super); | ||
function ThreadTs() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ThreadTs extends lib_1.Builder { | ||
/** | ||
@@ -736,13 +547,8 @@ * @description Instructs the Slack API to send the message to the thread of the message associated with the timestamp. | ||
*/ | ||
ThreadTs.prototype.threadTs = function (threadTs) { | ||
threadTs(threadTs) { | ||
return this.set(threadTs, constants_1.Prop.ThreadTs); | ||
}; | ||
return ThreadTs; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.ThreadTs = ThreadTs; | ||
var Ts = /** @class */ (function (_super) { | ||
__extends(Ts, _super); | ||
function Ts() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Ts extends lib_1.Builder { | ||
/** | ||
@@ -754,13 +560,8 @@ * @description Instructs the Slack API to use the message to replaced an existing message. | ||
*/ | ||
Ts.prototype.ts = function (ts) { | ||
ts(ts) { | ||
return this.set(ts, constants_1.Prop.Ts); | ||
}; | ||
return Ts; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Ts = Ts; | ||
var Url = /** @class */ (function (_super) { | ||
__extends(Url, _super); | ||
function Url() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Url extends lib_1.Builder { | ||
/** | ||
@@ -776,13 +577,8 @@ * @description Sets the URL to which the user is redirected when interacting with a button or option. | ||
*/ | ||
Url.prototype.url = function (url) { | ||
url(url) { | ||
return this.set(url, constants_1.Prop.Url); | ||
}; | ||
return Url; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Url = Url; | ||
var Value = /** @class */ (function (_super) { | ||
__extends(Value, _super); | ||
function Value() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class Value extends lib_1.Builder { | ||
/** | ||
@@ -798,7 +594,6 @@ * @description Sets a value to be sent to your app when a user interacts with a button or option. | ||
*/ | ||
Value.prototype.value = function (value) { | ||
value(value) { | ||
return this.set(value, constants_1.Prop.Value); | ||
}; | ||
return Value; | ||
}(lib_1.Builder)); | ||
} | ||
} | ||
exports.Value = Value; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DispatchActionsConfigurationObject = void 0; | ||
var base_1 = require("../base"); | ||
var DispatchActionsConfigurationObject = /** @class */ (function (_super) { | ||
__extends(DispatchActionsConfigurationObject, _super); | ||
function DispatchActionsConfigurationObject(params) { | ||
var _this = _super.call(this) || this; | ||
_this.trigger_actions_on = params; | ||
return _this; | ||
const base_1 = require("../base"); | ||
class DispatchActionsConfigurationObject extends base_1.CompositionObjectBase { | ||
constructor(params) { | ||
super(); | ||
this.trigger_actions_on = params; | ||
} | ||
return DispatchActionsConfigurationObject; | ||
}(base_1.CompositionObjectBase)); | ||
} | ||
exports.DispatchActionsConfigurationObject = DispatchActionsConfigurationObject; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FilterObject = void 0; | ||
var base_1 = require("../base"); | ||
var FilterObject = /** @class */ (function (_super) { | ||
__extends(FilterObject, _super); | ||
function FilterObject(params) { | ||
var _this = _super.call(this) || this; | ||
_this.include = params.filter; | ||
_this.exclude_external_shared_channels = params.excludeExternalSharedChannels; | ||
_this.exclude_bot_users = params.excludeBotUsers; | ||
return _this; | ||
const base_1 = require("../base"); | ||
class FilterObject extends base_1.CompositionObjectBase { | ||
constructor(params) { | ||
super(); | ||
this.include = params.filter; | ||
this.exclude_external_shared_channels = params.excludeExternalSharedChannels; | ||
this.exclude_bot_users = params.excludeBotUsers; | ||
} | ||
return FilterObject; | ||
}(base_1.CompositionObjectBase)); | ||
} | ||
exports.FilterObject = FilterObject; |
@@ -12,3 +12,3 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./dispatch-actions-configuration-object"), exports); | ||
@@ -15,0 +15,0 @@ __exportStar(require("./filter-object"), exports); |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MarkdownObject = void 0; | ||
var base_1 = require("../base"); | ||
var constants_1 = require("../constants"); | ||
var MarkdownObject = /** @class */ (function (_super) { | ||
__extends(MarkdownObject, _super); | ||
function MarkdownObject(text) { | ||
var _this = _super.call(this) || this; | ||
_this.type = constants_1.ObjectType.Markdown; | ||
_this.text = text; | ||
return _this; | ||
const base_1 = require("../base"); | ||
const constants_1 = require("../constants"); | ||
class MarkdownObject extends base_1.CompositionObjectBase { | ||
constructor(text) { | ||
super(); | ||
this.type = constants_1.ObjectType.Markdown; | ||
this.text = text; | ||
} | ||
return MarkdownObject; | ||
}(base_1.CompositionObjectBase)); | ||
} | ||
exports.MarkdownObject = MarkdownObject; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PlainTextObject = void 0; | ||
var base_1 = require("../base"); | ||
var constants_1 = require("../constants"); | ||
var PlainTextObject = /** @class */ (function (_super) { | ||
__extends(PlainTextObject, _super); | ||
function PlainTextObject(text) { | ||
var _this = _super.call(this) || this; | ||
_this.type = constants_1.ObjectType.Text; | ||
_this.text = text; | ||
return _this; | ||
const base_1 = require("../base"); | ||
const constants_1 = require("../constants"); | ||
class PlainTextObject extends base_1.CompositionObjectBase { | ||
constructor(text) { | ||
super(); | ||
this.type = constants_1.ObjectType.Text; | ||
this.text = text; | ||
} | ||
return PlainTextObject; | ||
}(base_1.CompositionObjectBase)); | ||
} | ||
exports.PlainTextObject = PlainTextObject; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.HomeTabBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,16 +13,11 @@ * @@link https://api.slack.com/reference/surfaces/views | ||
*/ | ||
var HomeTabBuilder = /** @class */ (function (_super) { | ||
__extends(HomeTabBuilder, _super); | ||
function HomeTabBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class HomeTabBuilder extends base_1.SurfaceBuilderBase { | ||
/** @internal */ | ||
HomeTabBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackViewDto, { | ||
type: constants_1.SurfaceType.HomeTab, | ||
blocks: helpers_1.getBuilderResults(this.props.blocks) | ||
blocks: helpers_1.getBuilderResults(this.props.blocks), | ||
}); | ||
}; | ||
return HomeTabBuilder; | ||
}(base_1.SurfaceBuilderBase)); | ||
} | ||
} | ||
exports.HomeTabBuilder = HomeTabBuilder; | ||
@@ -44,0 +24,0 @@ helpers_1.applyMixins(HomeTabBuilder, [ |
@@ -5,6 +5,3 @@ import { HomeTabBuilder, HomeTabParams } from './home-tab'; | ||
import { WorkflowStepBuilder, WorkflowStepParams } from './workflow-step'; | ||
export type { HomeTabBuilder, HomeTabParams } from './home-tab'; | ||
export type { MessageBuilder, MessageParams } from './message'; | ||
export type { ModalBuilder, ModalParams } from './modal'; | ||
export type { WorkflowStepBuilder, WorkflowStepParams } from './workflow-step'; | ||
export type { HomeTabBuilder, HomeTabParams, MessageBuilder, MessageParams, ModalBuilder, ModalParams, WorkflowStepBuilder, WorkflowStepParams, }; | ||
/** | ||
@@ -11,0 +8,0 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. |
"use strict"; | ||
/* eslint-disable max-len */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Surfaces = exports.WorkflowStep = exports.Modal = exports.Message = exports.HomeTab = void 0; | ||
var home_tab_1 = require("./home-tab"); | ||
var message_1 = require("./message"); | ||
var modal_1 = require("./modal"); | ||
var workflow_step_1 = require("./workflow-step"); | ||
const home_tab_1 = require("./home-tab"); | ||
const message_1 = require("./message"); | ||
const modal_1 = require("./modal"); | ||
const workflow_step_1 = require("./workflow-step"); | ||
/** | ||
@@ -63,8 +63,8 @@ * Functions here do not use arrow functions stored in variables for IDE color compatibility. | ||
exports.WorkflowStep = WorkflowStep; | ||
var surfaceObjects = { | ||
HomeTab: HomeTab, | ||
Message: Message, | ||
Modal: Modal, | ||
WorkflowStep: WorkflowStep | ||
const surfaceObjects = { | ||
HomeTab, | ||
Message, | ||
Modal, | ||
WorkflowStep, | ||
}; | ||
exports.Surfaces = surfaceObjects; |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.MessageBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
/** | ||
@@ -27,16 +12,11 @@ * @@link https://api.slack.com/messaging/composing | ||
*/ | ||
var MessageBuilder = /** @class */ (function (_super) { | ||
__extends(MessageBuilder, _super); | ||
function MessageBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class MessageBuilder extends base_1.SurfaceBuilderBase { | ||
/** @internal */ | ||
MessageBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackMessageDto, { | ||
blocks: helpers_1.getBuilderResults(this.props.blocks), | ||
attachments: helpers_1.getBuilderResults(this.props.attachments) | ||
attachments: helpers_1.getBuilderResults(this.props.attachments), | ||
}); | ||
}; | ||
return MessageBuilder; | ||
}(base_1.SurfaceBuilderBase)); | ||
} | ||
} | ||
exports.MessageBuilder = MessageBuilder; | ||
@@ -43,0 +23,0 @@ helpers_1.applyMixins(MessageBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ModalBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/surfaces/views | ||
*/ | ||
var ModalBuilder = /** @class */ (function (_super) { | ||
__extends(ModalBuilder, _super); | ||
function ModalBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class ModalBuilder extends base_1.SurfaceBuilderBase { | ||
/** @internal */ | ||
ModalBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackViewDto, { | ||
@@ -41,7 +22,6 @@ type: constants_1.SurfaceType.Modal, | ||
close: helpers_1.getPlainTextObject(this.props.close), | ||
submit: helpers_1.getPlainTextObject(this.props.submit) | ||
submit: helpers_1.getPlainTextObject(this.props.submit), | ||
}); | ||
}; | ||
return ModalBuilder; | ||
}(base_1.SurfaceBuilderBase)); | ||
} | ||
} | ||
exports.ModalBuilder = ModalBuilder; | ||
@@ -48,0 +28,0 @@ helpers_1.applyMixins(ModalBuilder, [ |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
if (typeof b !== "function" && b !== null) | ||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WorkflowStepBuilder = void 0; | ||
var base_1 = require("../base"); | ||
var lib_1 = require("../lib"); | ||
var methods_1 = require("../methods"); | ||
var helpers_1 = require("../helpers"); | ||
var constants_1 = require("../constants"); | ||
const base_1 = require("../base"); | ||
const lib_1 = require("../lib"); | ||
const methods_1 = require("../methods"); | ||
const helpers_1 = require("../helpers"); | ||
const constants_1 = require("../constants"); | ||
/** | ||
@@ -28,9 +13,5 @@ * @@link https://api.slack.com/reference/workflows/configuration-view | ||
*/ | ||
var WorkflowStepBuilder = /** @class */ (function (_super) { | ||
__extends(WorkflowStepBuilder, _super); | ||
function WorkflowStepBuilder() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
class WorkflowStepBuilder extends base_1.SurfaceBuilderBase { | ||
/** @internal */ | ||
WorkflowStepBuilder.prototype.build = function () { | ||
build() { | ||
return this.getResult(lib_1.SlackViewDto, { | ||
@@ -41,7 +22,6 @@ type: constants_1.SurfaceType.WorkflowStep, | ||
close: helpers_1.getPlainTextObject(this.props.close), | ||
submit: helpers_1.getPlainTextObject(this.props.submit) | ||
submit: helpers_1.getPlainTextObject(this.props.submit), | ||
}); | ||
}; | ||
return WorkflowStepBuilder; | ||
}(base_1.SurfaceBuilderBase)); | ||
} | ||
} | ||
exports.WorkflowStepBuilder = WorkflowStepBuilder; | ||
@@ -48,0 +28,0 @@ helpers_1.applyMixins(WorkflowStepBuilder, [ |
"use strict"; | ||
// Elements | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
@@ -12,4 +12,4 @@ "use strict"; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./general-interfaces"), exports); | ||
__exportStar(require("./builder-union-types"), exports); |
"use strict"; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
}; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Utilities = exports.AttachmentCollection = exports.BlockCollection = void 0; | ||
var helpers_1 = require("../helpers"); | ||
function BlockCollection(block) { | ||
var blocks = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
blocks[_i - 1] = arguments[_i]; | ||
} | ||
return helpers_1.getBuiltCollection.apply(void 0, __spreadArray([block], blocks)); | ||
const helpers_1 = require("../helpers"); | ||
function BlockCollection(block, ...blocks) { | ||
return helpers_1.getBuiltCollection(...[block, ...blocks]); | ||
} | ||
exports.BlockCollection = BlockCollection; | ||
function AttachmentCollection(attachment) { | ||
var attachments = []; | ||
for (var _i = 1; _i < arguments.length; _i++) { | ||
attachments[_i - 1] = arguments[_i]; | ||
} | ||
return helpers_1.getBuiltCollection.apply(void 0, __spreadArray([attachment], attachments)); | ||
function AttachmentCollection(attachment, ...attachments) { | ||
return helpers_1.getBuiltCollection(...[attachment, ...attachments]); | ||
} | ||
exports.AttachmentCollection = AttachmentCollection; | ||
var utilities = { | ||
BlockCollection: BlockCollection, | ||
AttachmentCollection: AttachmentCollection | ||
const utilities = { | ||
BlockCollection, | ||
AttachmentCollection, | ||
}; | ||
exports.Utilities = utilities; |
{ | ||
"name": "slack-block-builder", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "Maintainable code for interactive Slack messages, modals, home tabs, and workflow steps. A must-have for the Slack Block Kit framework.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -32,2 +32,4 @@ <p align="center"> | ||
> :tada: **Block Builder Version 2.0 is now in beta! Learn about the new features and how to install it [here](docs/announcements/version-2.md).** | ||
**Block Builder** helps you keep your Slack app code for UI maintainable, testable, and reusable. It has a declarative, chainable syntax inspired by [SwiftUI](https://developer.apple.com/documentation/swiftui) and is built for better UI architecture. | ||
@@ -267,3 +269,3 @@ | ||
blocks: BlockCollection( /* Pass in blocks */ ), | ||
attachments: AttachmentCollection( /* Pass in blocks */ ), | ||
attachments: AttachmentCollection( /* Pass in attachments */ ), | ||
}) | ||
@@ -270,0 +272,0 @@ .then((response) => console.log(response)) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
308
248780
5344