@umbraco/json-models-builders
Version:
Builders and models for Umbraco Sites
53 lines • 1.4 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.TextAreaDataTypeBuilder = void 0;
const dataTypeBuilder_1 = require("./dataTypeBuilder");
class TextAreaDataTypeBuilder extends dataTypeBuilder_1.DataTypeBuilder {
maxChars;
rows;
minHeight;
maxHeight;
constructor() {
super();
this.editorAlias = 'Umbraco.TextArea';
this.editorUiAlias = 'Umb.PropertyEditorUi.TextArea';
}
withMaxChars(maxChars) {
this.maxChars = maxChars;
return this;
}
withRows(rows) {
this.rows = rows;
return this;
}
withMinHeight(minHeight) {
this.minHeight = minHeight;
return this;
}
withMaxHeight(maxHeight) {
this.maxHeight = maxHeight;
return this;
}
getValues() {
let values = [];
values.push({
alias: 'maxChars',
value: this.maxChars || 0
});
values.push({
alias: 'rows',
value: this.rows || 0
});
values.push({
alias: 'minHeight',
value: this.minHeight || 0
});
values.push({
alias: 'maxHeight',
value: this.maxHeight || 0
});
return values;
}
}
exports.TextAreaDataTypeBuilder = TextAreaDataTypeBuilder;
//# sourceMappingURL=textAreaDataTypeBuilder.js.map