New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

digirati-annotation-bridge

Package Overview
Dependencies
Maintainers
1
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digirati-annotation-bridge - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

17

es/index.js
import { addCaptureModel, addInteractiveResource, addResourceTemplate } from 'digirati-annotation-redux/es/actions/resourceTemplate';
import { getCurrentResourceTemplate, getForm } from 'digirati-annotation-redux/es/query/resourceTemplateQuery';
import { getCurrentDraft } from 'digirati-annotation-redux/es/query/draftQuery';

@@ -7,2 +9,17 @@ import { BODY_TYPE, COMBINE, CONFORMS_TO, DESCRIPTION, EXTERNALISE, FORM_FIELDS, HUMAN_READABLE, ID, INPUT_TYPE, MOTIVATED_BY, MULTIPLE, PURPOSE, RDFS_LABEL, SERIALIZE, TITLE, TYPE, UI_GROUP, SELECTOR } from './vocab';

export function getW3CAnnotationBody(state) {
var currentDraft = getCurrentDraft(state);
var resourceTemplate = getCurrentResourceTemplate(state);
var captureModels = getForm(resourceTemplate).fields;
var values = currentDraft.input;
return captureModels.map(function (model) {
return {
type: model.omekaMetaData.bodyType.label,
purpose: model.omekaMetaData.purpose.label,
value: values[model.id]
};
});
}
export function omekaImportResourceTemplate(dispatch, resourceTemplate) {

@@ -9,0 +26,0 @@ // Set the resource template

1

es/vocab.js
// DUBLIN CORE CONSTANTS
export var ID = '@id';
export var CONTEXT = '@context';
export var TYPE = '@type';

@@ -4,0 +5,0 @@ export var DESCRIPTION = 'dcterms:description';

'use strict';
exports.__esModule = true;
exports.getW3CAnnotationBody = getW3CAnnotationBody;
exports.omekaImportResourceTemplate = omekaImportResourceTemplate;

@@ -9,2 +10,6 @@ exports.default = omekaCreateStore;

var _resourceTemplateQuery = require('digirati-annotation-redux/es/query/resourceTemplateQuery');
var _draftQuery = require('digirati-annotation-redux/es/query/draftQuery');
var _vocab = require('./vocab');

@@ -14,2 +19,17 @@

function getW3CAnnotationBody(state) {
var currentDraft = (0, _draftQuery.getCurrentDraft)(state);
var resourceTemplate = (0, _resourceTemplateQuery.getCurrentResourceTemplate)(state);
var captureModels = (0, _resourceTemplateQuery.getForm)(resourceTemplate).fields;
var values = currentDraft.input;
return captureModels.map(function (model) {
return {
type: model.omekaMetaData.bodyType.label,
purpose: model.omekaMetaData.purpose.label,
value: values[model.id]
};
});
}
function omekaImportResourceTemplate(dispatch, resourceTemplate) {

@@ -16,0 +36,0 @@ // Set the resource template

@@ -6,2 +6,3 @@ 'use strict';

var ID = exports.ID = '@id';
var CONTEXT = exports.CONTEXT = '@context';
var TYPE = exports.TYPE = '@type';

@@ -8,0 +9,0 @@ var DESCRIPTION = exports.DESCRIPTION = 'dcterms:description';

2

package.json
{
"name": "digirati-annotation-bridge",
"version": "0.1.9",
"version": "0.1.10",
"description": "Describe annotation-bridge here",

@@ -5,0 +5,0 @@ "main": "lib/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