UNPKG

@umbraco/json-models-builders

Version:
72 lines 1.73 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.URLPickerValueBuilder = void 0; class URLPickerValueBuilder { parentBuilder; icon; name; published; queryString; target; trashed; type; unique; url; constructor(parentBuilder) { this.parentBuilder = parentBuilder; } withIcon(icon) { this.icon = icon; return this; } withName(name) { this.name = name; return this; } withPublished(published) { this.published = published; return this; } withQueryString(queryString) { this.queryString = queryString; return this; } withTarget(target) { this.target = target; return this; } withTrashed(trashed) { this.trashed = trashed; return this; } withType(type) { this.type = type; return this; } withUnique(unique) { this.unique = unique; return this; } withUrl(url) { this.url = url; return this; } done() { return this.parentBuilder; } getValue() { let value = {}; value.icon = this.icon; value.name = this.name || null; value.published = this.published !== undefined ? this.published : true; value.queryString = this.queryString || null; value.target = this.target || null; value.trashed = this.trashed || false; value.type = this.type; value.unique = this.unique || null; value.url = this.url; return value; } } exports.URLPickerValueBuilder = URLPickerValueBuilder; //# sourceMappingURL=urlPickerValueBuilder.js.map