fox-block-builder
Version:
Maintainable code for loop slack-block-kit-like modal builder
59 lines • 2.26 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PluginFormBlockDto = void 0;
const class_transformer_1 = require("class-transformer");
const plugin_form_block_utils_1 = require("./plugin-form-block.utils");
const modal_block_rdo_1 = require("../rdo/modal-block.rdo");
class PluginFormBlockDto extends modal_block_rdo_1.InputBlockFoxFields {
constructor() {
super(...arguments);
this.multi = false;
this.custom = false;
this.files = [];
}
setLabel(label) {
this.label = label;
return this;
}
setValue(value) {
this.value = value;
return this;
}
setText(text) {
this.text = text;
return this;
}
setParam(name, value) {
this[name] = value;
return this;
}
}
exports.PluginFormBlockDto = PluginFormBlockDto;
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "id", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "label", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "elementType", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "multi", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "custom", void 0);
__decorate([
(0, class_transformer_1.Expose)()
], PluginFormBlockDto.prototype, "text", void 0);
__decorate([
(0, class_transformer_1.Transform)(plugin_form_block_utils_1.setBlockValueData)
], PluginFormBlockDto.prototype, "value", void 0);
//# sourceMappingURL=plugin-form-block.dto.js.map
;