@annotation-studio/redux
Advanced tools
Comparing version 1.0.0-rc.24 to 1.0.0-rc.27
@@ -20,4 +20,5 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
var id = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; | ||
var partOf = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null; | ||
return new Annotation(id, label, new AnnotationBodyList(new AnnotationBody(null, JSON.stringify(json), 'text/json', 'TextualBody', 'editing')), target, 'http://www.digirati.com/ns/crowds#drafting', generator); | ||
return new Annotation(id, label, new AnnotationBodyList(new AnnotationBody(null, JSON.stringify(json), 'text/json', 'TextualBody', 'editing')), AnnotationSelector.fromTarget(target, json.selector || null, partOf), 'http://www.digirati.com/ns/crowds#drafting', generator); | ||
} | ||
@@ -185,3 +186,3 @@ | ||
export function createMultipleAnnotations(target, captureModel, draft) { | ||
export function createMultipleAnnotations(target, captureModel, draft, partOf) { | ||
var fieldKeys = Object.keys(draft.input); | ||
@@ -230,3 +231,3 @@ | ||
return new Annotation(null, field.input, new AnnotationBodyList(new AnnotationBody(null, JSON.stringify(dataSet), 'text/plain', 'Dataset', purpose ? purpose.id : null)), AnnotationSelector.fromTarget(target, field.selector)); | ||
return new Annotation(null, field.input, new AnnotationBodyList(new AnnotationBody(null, JSON.stringify(dataSet), 'text/plain', 'Dataset', purpose ? purpose.id : null)), AnnotationSelector.fromTarget(target, field.selector, partOf)); | ||
}); | ||
@@ -323,3 +324,3 @@ } | ||
if (combine === false) { | ||
return createMultipleAnnotations(target, captureModel, draft); | ||
return createMultipleAnnotations(target, captureModel, draft, partOf); | ||
} | ||
@@ -326,0 +327,0 @@ |
@@ -58,4 +58,5 @@ 'use strict'; | ||
var id = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; | ||
var partOf = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null; | ||
return new _Annotation2.default(id, label, new _AnnotationBodyList2.default(new _AnnotationBody2.default(null, JSON.stringify(json), 'text/json', 'TextualBody', 'editing')), target, 'http://www.digirati.com/ns/crowds#drafting', generator); | ||
return new _Annotation2.default(id, label, new _AnnotationBodyList2.default(new _AnnotationBody2.default(null, JSON.stringify(json), 'text/json', 'TextualBody', 'editing')), _AnnotationSelector2.default.fromTarget(target, json.selector || null, partOf), 'http://www.digirati.com/ns/crowds#drafting', generator); | ||
} | ||
@@ -223,3 +224,3 @@ | ||
function createMultipleAnnotations(target, captureModel, draft) { | ||
function createMultipleAnnotations(target, captureModel, draft, partOf) { | ||
var fieldKeys = Object.keys(draft.input); | ||
@@ -268,3 +269,3 @@ | ||
return new _Annotation2.default(null, field.input, new _AnnotationBodyList2.default(new _AnnotationBody2.default(null, JSON.stringify(dataSet), 'text/plain', 'Dataset', purpose ? purpose.id : null)), _AnnotationSelector2.default.fromTarget(target, field.selector)); | ||
return new _Annotation2.default(null, field.input, new _AnnotationBodyList2.default(new _AnnotationBody2.default(null, JSON.stringify(dataSet), 'text/plain', 'Dataset', purpose ? purpose.id : null)), _AnnotationSelector2.default.fromTarget(target, field.selector, partOf)); | ||
}); | ||
@@ -361,3 +362,3 @@ } | ||
if (combine === false) { | ||
return createMultipleAnnotations(target, captureModel, draft); | ||
return createMultipleAnnotations(target, captureModel, draft, partOf); | ||
} | ||
@@ -364,0 +365,0 @@ |
{ | ||
"name": "@annotation-studio/redux", | ||
"version": "1.0.0-rc.24", | ||
"version": "1.0.0-rc.27", | ||
"description": "Describe annotation-redux here", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
352115
108
9260