@annotation-studio/redux
Advanced tools
Comparing version 1.0.0-pr.a04439e7 to 1.0.0-pr.a2911fe9
@@ -12,5 +12,3 @@ export var MANIFEST_ADD = 'MANIFEST_ADD'; | ||
dispatch({ type: MANIFEST_REQUEST, payload: { url: url } }); | ||
return fetch(url, { | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache' | ||
}).then(function (response) { | ||
return fetch(url).then(function (response) { | ||
return response.json(); | ||
@@ -17,0 +15,0 @@ }).then(function (body) { |
@@ -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 @@ |
@@ -20,5 +20,3 @@ 'use strict'; | ||
dispatch({ type: MANIFEST_REQUEST, payload: { url: url } }); | ||
return fetch(url, { | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache' | ||
}).then(function (response) { | ||
return fetch(url).then(function (response) { | ||
return response.json(); | ||
@@ -25,0 +23,0 @@ }).then(function (body) { |
@@ -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-pr.a04439e7", | ||
"version": "1.0.0-pr.a2911fe9", | ||
"description": "Describe annotation-redux here", | ||
@@ -38,3 +38,3 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@fesk/test-environment": "1.0.0-pr.a04439e7", | ||
"@fesk/test-environment": "1.0.0-pr.a2911fe9", | ||
"babel-jest": "^20.0.3", | ||
@@ -47,5 +47,5 @@ "babel-plugin-transform-async-to-generator": "^6.24.1", | ||
"fetch-mock": "^6.5.1", | ||
"jest": "^20.0.0", | ||
"jest": "^23.6.0", | ||
"nwb": "^0.21.5", | ||
"nwb-watch": "1.0.0-pr.a04439e7", | ||
"nwb-watch": "1.0.0-pr.a2911fe9", | ||
"react-intl": "^2.2.2", | ||
@@ -52,0 +52,0 @@ "react-intl-redux": "^0.7.0", |
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
352132
108
9260