@umbraco/json-models-builders
Version:
Builders and models for Umbraco Sites
50 lines • 1.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentPickerDataTypeBuilder = void 0;
const dataTypeBuilder_1 = require("./dataTypeBuilder");
class ContentPickerDataTypeBuilder extends dataTypeBuilder_1.DataTypeBuilder {
showOpenButton;
ignoreUserStartNodes;
startNodeId;
constructor() {
super();
this.editorAlias = 'Umbraco.ContentPicker';
this.editorUiAlias = 'Umb.PropertyEditorUi.DocumentPicker';
}
withShowOpenButton(showOpenButton) {
this.showOpenButton = showOpenButton;
return this;
}
withIgnoreUserStartNodes(ignoreUserStartNodes) {
this.ignoreUserStartNodes = ignoreUserStartNodes;
return this;
}
withStartNodeId(startNodeId) {
this.startNodeId = startNodeId;
return this;
}
getValues() {
let values = [];
if (this.showOpenButton !== undefined) {
values.push({
alias: 'showOpenButton',
value: this.showOpenButton
});
}
if (this.ignoreUserStartNodes !== undefined) {
values.push({
alias: 'ignoreUserStartNodes',
value: this.ignoreUserStartNodes
});
}
if (this.startNodeId !== undefined) {
values.push({
alias: 'startNodeId',
value: this.startNodeId
});
}
return values;
}
}
exports.ContentPickerDataTypeBuilder = ContentPickerDataTypeBuilder;
//# sourceMappingURL=contentPickerDataTypeBuilder.js.map