digirati-annotation-redux
Advanced tools
Comparing version 0.8.0 to 0.8.2
@@ -9,3 +9,3 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
// Serialized fields | ||
function Annotation(id, label, body, target, motivation) { | ||
function Annotation(id, label, body, target, motivation, generator) { | ||
_classCallCheck(this, Annotation); | ||
@@ -21,2 +21,3 @@ | ||
this.motivation = motivation; | ||
this.generator = generator; | ||
} | ||
@@ -26,3 +27,4 @@ | ||
return _extends({}, this, { | ||
id: this.id === null ? undefined : this.id | ||
id: this.id === null ? undefined : this.id, | ||
generator: this.generator === null ? undefined : this.generator | ||
}); | ||
@@ -29,0 +31,0 @@ }; |
@@ -211,2 +211,6 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
export function getGenerator(captureModel) { | ||
return captureModel.id; | ||
} | ||
export function getLabelFromDraft(labelParts, captureModel, draft) { | ||
@@ -326,3 +330,5 @@ if (!(labelParts && labelParts.label)) { | ||
return new Annotation(null, label, AnnotationBodyList.fromJsonLD(bodies), AnnotationSelector.fromTarget(target, draftSelector), motivation); | ||
var generator = getGenerator(captureModel); | ||
return new Annotation(null, label, AnnotationBodyList.fromJsonLD(bodies), AnnotationSelector.fromTarget(target, draftSelector), motivation, generator); | ||
} |
@@ -27,3 +27,3 @@ 'use strict'; | ||
// Serialized fields | ||
function Annotation(id, label, body, target, motivation) { | ||
function Annotation(id, label, body, target, motivation, generator) { | ||
(0, _classCallCheck3.default)(this, Annotation); | ||
@@ -38,2 +38,3 @@ this.type = 'Annotation'; | ||
this.motivation = motivation; | ||
this.generator = generator; | ||
} | ||
@@ -43,3 +44,4 @@ | ||
return (0, _extends3.default)({}, this, { | ||
id: this.id === null ? undefined : this.id | ||
id: this.id === null ? undefined : this.id, | ||
generator: this.generator === null ? undefined : this.generator | ||
}); | ||
@@ -46,0 +48,0 @@ }; |
@@ -19,2 +19,3 @@ 'use strict'; | ||
exports.createMultipleAnnotations = createMultipleAnnotations; | ||
exports.getGenerator = getGenerator; | ||
exports.getLabelFromDraft = getLabelFromDraft; | ||
@@ -248,2 +249,6 @@ exports.getSuitableLabelFromBody = getSuitableLabelFromBody; | ||
function getGenerator(captureModel) { | ||
return captureModel.id; | ||
} | ||
function getLabelFromDraft(labelParts, captureModel, draft) { | ||
@@ -363,3 +368,5 @@ if (!(labelParts && labelParts.label)) { | ||
return new _Annotation2.default(null, label, _AnnotationBodyList2.default.fromJsonLD(bodies), _AnnotationSelector2.default.fromTarget(target, draftSelector), motivation); | ||
var generator = getGenerator(captureModel); | ||
return new _Annotation2.default(null, label, _AnnotationBodyList2.default.fromJsonLD(bodies), _AnnotationSelector2.default.fromTarget(target, draftSelector), motivation, generator); | ||
} |
{ | ||
"name": "digirati-annotation-redux", | ||
"version": "0.8.0", | ||
"version": "0.8.2", | ||
"description": "Describe annotation-redux here", | ||
@@ -5,0 +5,0 @@ "main": "es/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
200406
4970