UNPKG

@umbraco/json-models-builders

Version:
41 lines 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockListContentDataBuilder = void 0; const blockListContentDataValueBuilder_1 = require("./blockListContentDataValueBuilder"); class BlockListContentDataBuilder { parentBuilder; contentTypeKey; key; contentDataValueBuilder; constructor(parentBuilder) { this.parentBuilder = parentBuilder; this.contentDataValueBuilder = []; } withContentTypeKey(contentTypeKey) { this.contentTypeKey = contentTypeKey; return this; } withKey(key) { this.key = key; return this; } addContentDataValue() { const builder = new blockListContentDataValueBuilder_1.BlockListContentDataValueBuilder(this); this.contentDataValueBuilder.push(builder); return builder; } done() { return this.parentBuilder; } getValue() { return { contentTypeKey: this.contentTypeKey, key: this.key, values: this.contentDataValueBuilder.map((builder) => { return builder.getValue(); }) }; } } exports.BlockListContentDataBuilder = BlockListContentDataBuilder; //# sourceMappingURL=blockListContentDataBuilder.js.map