UNPKG

@umbraco/json-models-builders

Version:
95 lines 2.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PackageBuilder = void 0; class PackageBuilder { name; contentNodeId; contentLoadChildNodes; mediaIds; mediaLoadChildNodes; documentTypes; mediaTypes; dataTypes; templates; partialViews; stylesheets; scripts; languages; dictionaryItems; withName(name) { this.name = name; return this; } withContentNodeId(contentNodeId) { this.contentNodeId = contentNodeId; return this; } withLoadContentChildNodes(contentLoadChildNodes) { this.contentLoadChildNodes = contentLoadChildNodes; return this; } withMediaIds(mediaIds) { this.mediaIds = mediaIds; return this; } withLoadMediaChildNodes(mediaLoadChildNodes) { this.mediaLoadChildNodes = mediaLoadChildNodes; return this; } withDocumentTypes(documentTypes) { this.documentTypes = documentTypes; return this; } withMediaTypes(mediaTypes) { this.mediaTypes = mediaTypes; return this; } withDataTypes(dataTypes) { this.dataTypes = dataTypes; return this; } withTemplates(templates) { this.templates = templates; return this; } withPartialViews(partialViews) { this.partialViews = partialViews; return this; } withStylesheets(stylesheets) { this.stylesheets = stylesheets; return this; } withScripts(scripts) { this.scripts = scripts; return this; } withLanguages(languages) { this.languages = languages; return this; } withDictionaryItems(dictionaryItems) { this.dictionaryItems = dictionaryItems; return this; } build() { return { name: this.name, contentNodeId: this.contentNodeId || '', contentLoadChildNodes: this.contentLoadChildNodes !== undefined ? this.contentLoadChildNodes : true, mediaIds: this.mediaIds, mediaLoadChildNodes: this.mediaLoadChildNodes !== undefined ? this.mediaLoadChildNodes : true, documentTypes: this.documentTypes, mediaTypes: this.mediaTypes, dataTypes: this.dataTypes, templates: this.templates, partialViews: this.partialViews, stylesheets: this.stylesheets, scripts: this.scripts, languages: this.languages, dictionaryItems: this.dictionaryItems, }; } } exports.PackageBuilder = PackageBuilder; //# sourceMappingURL=packageBuilder.js.map