@umbraco/json-models-builders
Advanced tools
Comparing version
import { DocumentBuilder } from "./documentBuilder"; | ||
import { MediaPickerValueBuilder } from "./mediaPickerValueBuilder"; | ||
import { URLPickerValueBuilder } from "./urlPickerValueBuilder"; | ||
export declare class DocumentValueBuilder { | ||
@@ -10,2 +11,3 @@ parentBuilder: DocumentBuilder; | ||
mediaPickerValueBuilder: MediaPickerValueBuilder[]; | ||
urlPickerValueBuilder: URLPickerValueBuilder[]; | ||
constructor(parentBuilder: DocumentBuilder); | ||
@@ -17,2 +19,3 @@ withCulture(culture: string): this; | ||
addMediaPickerValue(): MediaPickerValueBuilder; | ||
addURLPickerValue(): URLPickerValueBuilder; | ||
done(): DocumentBuilder; | ||
@@ -19,0 +22,0 @@ build(): { |
@@ -5,2 +5,3 @@ "use strict"; | ||
const mediaPickerValueBuilder_1 = require("./mediaPickerValueBuilder"); | ||
const urlPickerValueBuilder_1 = require("./urlPickerValueBuilder"); | ||
class DocumentValueBuilder { | ||
@@ -13,5 +14,7 @@ parentBuilder; | ||
mediaPickerValueBuilder; | ||
urlPickerValueBuilder; | ||
constructor(parentBuilder) { | ||
this.parentBuilder = parentBuilder; | ||
this.mediaPickerValueBuilder = []; | ||
this.urlPickerValueBuilder = []; | ||
} | ||
@@ -39,2 +42,7 @@ withCulture(culture) { | ||
} | ||
addURLPickerValue() { | ||
const builder = new urlPickerValueBuilder_1.URLPickerValueBuilder(this); | ||
this.urlPickerValueBuilder.push(builder); | ||
return builder; | ||
} | ||
done() { | ||
@@ -54,2 +62,7 @@ return this.parentBuilder; | ||
} | ||
if (this.urlPickerValueBuilder && this.urlPickerValueBuilder.length > 0) { | ||
value = this.urlPickerValueBuilder.map((builder) => { | ||
return builder.getValue(); | ||
}); | ||
} | ||
} | ||
@@ -56,0 +69,0 @@ return { |
@@ -7,3 +7,6 @@ import { DocumentValueBuilder } from "../documentValueBuilder"; | ||
mediaTypeAlias: string; | ||
focalPoint: any; | ||
focalPoint: { | ||
left: number; | ||
top: number; | ||
}; | ||
crops: string[]; | ||
@@ -14,4 +17,8 @@ constructor(parentBuilder: DocumentValueBuilder); | ||
withMediaTypeAlias(mediaTypeAlias: string): this; | ||
withFocalPoint(focalPoint: { | ||
left: number; | ||
top: number; | ||
}): this; | ||
done(): DocumentValueBuilder; | ||
getValue(): any; | ||
} |
@@ -26,2 +26,6 @@ "use strict"; | ||
} | ||
withFocalPoint(focalPoint) { | ||
this.focalPoint = focalPoint; | ||
return this; | ||
} | ||
done() { | ||
@@ -28,0 +32,0 @@ return this.parentBuilder; |
{ | ||
"name": "@umbraco/json-models-builders", | ||
"version": "2.0.13", | ||
"version": "2.0.14", | ||
"description": "Builders and models for Umbraco Sites", | ||
@@ -5,0 +5,0 @@ "main": "dist/lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
385900
2.48%219
2.82%5043
2.63%