digirati-annotation-bridge
Advanced tools
Comparing version 0.8.0 to 0.8.2
@@ -6,3 +6,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import { get, labelId, parseSelectorTarget } from '../helpers'; | ||
import { BODY_TYPE, CONFORMS_TO, DESCRIPTION, ID, INPUT_AUTOCOMPLETE_URI, INPUT_OPTIONS, INPUT_TYPE, PURPOSE, RDFS_LABEL, SELECTOR, SELECTOR_VALUE, TITLE, TYPE, FIELD_GROUP } from '../vocab'; | ||
import { BODY_TYPE, CONFORMS_TO, DESCRIPTION, ID, INPUT_OPTIONS, INPUT_TYPE, PURPOSE, RDFS_LABEL, SELECTOR, SELECTOR_VALUE, TITLE, TYPE, FIELD_GROUP } from '../vocab'; | ||
@@ -14,2 +14,9 @@ var Field = function () { | ||
Field.getAutocompleteEndpoint = function getAutocompleteEndpoint(options) { | ||
if (!options) { | ||
return null; | ||
} | ||
return options[0] ? options[0] : options['@id'] ? options['@id'] : null; | ||
}; | ||
function Field(id, inputType, annotationMetaData, omekaMetaData, metaData) { | ||
@@ -40,3 +47,3 @@ _classCallCheck(this, Field); | ||
options: $(INPUT_OPTIONS), | ||
autocomplete: $(INPUT_AUTOCOMPLETE_URI) | ||
autocomplete: Field.getAutocompleteEndpoint($(INPUT_OPTIONS)) | ||
}, { | ||
@@ -43,0 +50,0 @@ type: $(TYPE), |
@@ -35,5 +35,4 @@ // DUBLIN CORE CONSTANTS | ||
export var INPUT_OPTIONS = 'crowds:uiInputOptions'; | ||
export var INPUT_AUTOCOMPLETE_URI = 'crowds:uiInputAutocomplete'; | ||
export var BOX_SELECTOR = 'madoc:boxdraw'; | ||
export var WHOLE_CANVAS_SELECTOR = 'WholeCanvasSelector'; // @todo change to madoc: ns |
@@ -19,2 +19,9 @@ 'use strict'; | ||
Field.getAutocompleteEndpoint = function getAutocompleteEndpoint(options) { | ||
if (!options) { | ||
return null; | ||
} | ||
return options[0] ? options[0] : options['@id'] ? options['@id'] : null; | ||
}; | ||
function Field(id, inputType, annotationMetaData, omekaMetaData, metaData) { | ||
@@ -45,3 +52,3 @@ _classCallCheck(this, Field); | ||
options: $(_vocab.INPUT_OPTIONS), | ||
autocomplete: $(_vocab.INPUT_AUTOCOMPLETE_URI) | ||
autocomplete: Field.getAutocompleteEndpoint($(_vocab.INPUT_OPTIONS)) | ||
}, { | ||
@@ -48,0 +55,0 @@ type: $(_vocab.TYPE), |
@@ -38,5 +38,4 @@ 'use strict'; | ||
var INPUT_OPTIONS = exports.INPUT_OPTIONS = 'crowds:uiInputOptions'; | ||
var INPUT_AUTOCOMPLETE_URI = exports.INPUT_AUTOCOMPLETE_URI = 'crowds:uiInputAutocomplete'; | ||
var BOX_SELECTOR = exports.BOX_SELECTOR = 'madoc:boxdraw'; | ||
var WHOLE_CANVAS_SELECTOR = exports.WHOLE_CANVAS_SELECTOR = 'WholeCanvasSelector'; // @todo change to madoc: ns |
{ | ||
"name": "digirati-annotation-bridge", | ||
"version": "0.8.0", | ||
"version": "0.8.2", | ||
"description": "Describe annotation-bridge here", | ||
@@ -22,3 +22,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"digirati-annotation-redux": "^0.8.0", | ||
"digirati-annotation-redux": "^0.8.2", | ||
"lodash.flatten": "^4.4.0" | ||
@@ -25,0 +25,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
60204
1471