UNPKG

@umbraco/json-models-builders

Version:
43 lines 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ImageCropperValueBuilder = void 0; class ImageCropperValueBuilder { parentBuilder; crops; focalPoint; temporaryFileId; src; constructor(parentBuilder) { this.parentBuilder = parentBuilder; this.crops = []; } withCrop(crop) { this.crops.push(crop); return this; } withFocalPoint(focalPoint) { this.focalPoint = focalPoint; return this; } withSrc(src) { this.src = src; return this; } withTemporaryFileId(temporaryFileId) { this.temporaryFileId = temporaryFileId; return this; } done() { return this.parentBuilder; } getValue() { let value = {}; value.crops = this.crops || []; value.focalPoint = this.focalPoint || null; value.src = this.src || ""; value.temporaryFileId = this.temporaryFileId || ""; return value; } } exports.ImageCropperValueBuilder = ImageCropperValueBuilder; //# sourceMappingURL=imageCropperValueBuilder.js.map