Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

digirati-annotation-redux

Package Overview
Dependencies
Maintainers
3
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digirati-annotation-redux - npm Package Compare versions

Comparing version 0.8.0 to 0.8.2

6

es/lib/annotation/Annotation.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc