digirati-annotation-bridge
Advanced tools
Comparing version 0.8.9 to 0.8.11
@@ -6,3 +6,3 @@ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
import { castBool, castId, get, labelId, motivationFromForm } from '../helpers'; | ||
import { COMBINE, DESCRIPTION, EXTERNALISE, HAS_PART, HUMAN_READABLE, ID, LABEL_PARTS, MOTIVATED_BY, MULTIPLE, SELECTOR, SERIALIZE, TITLE, UI_GROUP } from '../vocab'; | ||
import { COMBINE, DESCRIPTION, EXTERNALISE, HAS_PART, HUMAN_READABLE, ID, LABEL_PARTS, MOTIVATED_BY, MULTIPLE, OMEKA_LABEL, SELECTOR, SERIALIZE, TITLE, UI_GROUP } from '../vocab'; | ||
import Field from './Field'; | ||
@@ -72,3 +72,6 @@ | ||
var $ = get(jsonLd); | ||
return $(UI_GROUP) ? $(UI_GROUP)[ID] === 'madoc:form' : false; | ||
if ($(UI_GROUP) ? $(UI_GROUP)[ID] === 'madoc:form' : false) { | ||
return true; | ||
} | ||
return $(UI_GROUP) ? $(UI_GROUP)[OMEKA_LABEL] === 'madoc:form' : false; | ||
}; | ||
@@ -75,0 +78,0 @@ |
@@ -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_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, INPUT_DEFAULT_VALUE, PURPOSE, RDFS_LABEL, SELECTOR, SELECTOR_VALUE, TITLE, TYPE, FIELD_GROUP } from '../vocab'; | ||
@@ -57,3 +57,4 @@ var Field = function () { | ||
selector: $(SELECTOR) ? $(SELECTOR)[ID] : null, | ||
selectorValue: parseSelectorTarget($(SELECTOR_VALUE)) | ||
selectorValue: parseSelectorTarget($(SELECTOR_VALUE)), | ||
defaultValue: $(INPUT_DEFAULT_VALUE) | ||
}); | ||
@@ -60,0 +61,0 @@ }; |
@@ -35,4 +35,5 @@ // DUBLIN CORE CONSTANTS | ||
export var INPUT_OPTIONS = 'crowds:uiInputOptions'; | ||
export var INPUT_DEFAULT_VALUE = 'crowds:uiInputDefaultValue'; | ||
export var BOX_SELECTOR = 'madoc:boxdraw'; | ||
export var WHOLE_CANVAS_SELECTOR = 'WholeCanvasSelector'; // @todo change to madoc: ns |
@@ -82,3 +82,6 @@ 'use strict'; | ||
var $ = (0, _helpers.get)(jsonLd); | ||
return $(_vocab.UI_GROUP) ? $(_vocab.UI_GROUP)[_vocab.ID] === 'madoc:form' : false; | ||
if ($(_vocab.UI_GROUP) ? $(_vocab.UI_GROUP)[_vocab.ID] === 'madoc:form' : false) { | ||
return true; | ||
} | ||
return $(_vocab.UI_GROUP) ? $(_vocab.UI_GROUP)[_vocab.OMEKA_LABEL] === 'madoc:form' : false; | ||
}; | ||
@@ -85,0 +88,0 @@ |
@@ -62,3 +62,4 @@ 'use strict'; | ||
selector: $(_vocab.SELECTOR) ? $(_vocab.SELECTOR)[_vocab.ID] : null, | ||
selectorValue: (0, _helpers.parseSelectorTarget)($(_vocab.SELECTOR_VALUE)) | ||
selectorValue: (0, _helpers.parseSelectorTarget)($(_vocab.SELECTOR_VALUE)), | ||
defaultValue: $(_vocab.INPUT_DEFAULT_VALUE) | ||
}); | ||
@@ -65,0 +66,0 @@ }; |
@@ -38,4 +38,5 @@ 'use strict'; | ||
var INPUT_OPTIONS = exports.INPUT_OPTIONS = 'crowds:uiInputOptions'; | ||
var INPUT_DEFAULT_VALUE = exports.INPUT_DEFAULT_VALUE = 'crowds:uiInputDefaultValue'; | ||
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.9", | ||
"version": "0.8.11", | ||
"description": "Describe annotation-bridge here", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
61341
1513