@annotation-studio/bridge
Advanced tools
Comparing version 1.0.0-next.d6fe37d0 to 1.0.0-next.dafe059c
@@ -51,3 +51,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
if (Object.prototype.toString.call(body) === '[object Object]' && body.value) { | ||
return new AnnotationBody(null, body['value']); | ||
return new AnnotationBody(null, body.value); | ||
} | ||
@@ -67,3 +67,3 @@ | ||
var source = specificResource && specificResource[0] ? specificResource[0]['source'] : null; | ||
var source = specificResource && specificResource[0] ? specificResource[0].source : null; | ||
var type = source ? tagClassForUri(source) : null; | ||
@@ -70,0 +70,0 @@ |
@@ -20,4 +20,7 @@ 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; }; | ||
var boxSelector = parseTarget(target, scale); | ||
if (!boxSelector || typeof boxSelector.target === 'string') { | ||
return { type: WHOLE_CANVAS_SELECTOR, target: boxSelector && boxSelector.target || '' }; | ||
if (!boxSelector || !boxSelector.target || !boxSelector.target.x || !boxSelector.target.y) { | ||
return { | ||
type: WHOLE_CANVAS_SELECTOR, | ||
target: boxSelector && boxSelector.target || '' | ||
}; | ||
} | ||
@@ -24,0 +27,0 @@ boxSelector.type = BOX_SELECTOR; |
@@ -47,3 +47,6 @@ import { ID, OMEKA_LABEL } from './vocab'; | ||
var contexts = Object.keys(context).map(function (key) { | ||
return { key: key, id: context[key] && context[key][ID] ? context[key][ID] : null }; | ||
return { | ||
key: key, | ||
id: context[key] && context[key][ID] ? context[key][ID] : null | ||
}; | ||
}); | ||
@@ -139,3 +142,5 @@ | ||
export function warning(component, id, message) { | ||
process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && console.warn('WARNING: ' + component + '\n==================================================\nPlease check model at:\n' + id + '\n\n' + message + '\n'); | ||
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') { | ||
console.warn('WARNING: ' + component + '\n==================================================\nPlease check model at:\n' + id + '\n\n' + message + '\n'); | ||
} | ||
} |
@@ -148,3 +148,11 @@ 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; }; | ||
dispatch(createDraft(scope, resources, captureModelId, motivation || defaultMotivation, selectors, draftDefaults, null, path, name)); | ||
dispatch(createDraft(scope, { | ||
emptyInput: resources, | ||
template: captureModelId, | ||
motivation: motivation || defaultMotivation, | ||
selectors: selectors, | ||
draftDefaults: draftDefaults, | ||
path: path, | ||
name: name | ||
})); | ||
}; | ||
@@ -151,0 +159,0 @@ } |
@@ -56,3 +56,3 @@ 'use strict'; | ||
if (Object.prototype.toString.call(body) === '[object Object]' && body.value) { | ||
return new AnnotationBody(null, body['value']); | ||
return new AnnotationBody(null, body.value); | ||
} | ||
@@ -72,3 +72,3 @@ | ||
var source = specificResource && specificResource[0] ? specificResource[0]['source'] : null; | ||
var source = specificResource && specificResource[0] ? specificResource[0].source : null; | ||
var type = source ? tagClassForUri(source) : null; | ||
@@ -75,0 +75,0 @@ |
@@ -43,4 +43,7 @@ 'use strict'; | ||
var boxSelector = parseTarget(target, scale); | ||
if (!boxSelector || typeof boxSelector.target === 'string') { | ||
return { type: _vocab.WHOLE_CANVAS_SELECTOR, target: boxSelector && boxSelector.target || '' }; | ||
if (!boxSelector || !boxSelector.target || !boxSelector.target.x || !boxSelector.target.y) { | ||
return { | ||
type: _vocab.WHOLE_CANVAS_SELECTOR, | ||
target: boxSelector && boxSelector.target || '' | ||
}; | ||
} | ||
@@ -47,0 +50,0 @@ boxSelector.type = _vocab.BOX_SELECTOR; |
@@ -61,3 +61,6 @@ 'use strict'; | ||
var contexts = Object.keys(context).map(function (key) { | ||
return { key: key, id: context[key] && context[key][_vocab.ID] ? context[key][_vocab.ID] : null }; | ||
return { | ||
key: key, | ||
id: context[key] && context[key][_vocab.ID] ? context[key][_vocab.ID] : null | ||
}; | ||
}); | ||
@@ -153,3 +156,5 @@ | ||
function warning(component, id, message) { | ||
process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test' && console.warn('WARNING: ' + component + '\n==================================================\nPlease check model at:\n' + id + '\n\n' + message + '\n'); | ||
if (process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'test') { | ||
console.warn('WARNING: ' + component + '\n==================================================\nPlease check model at:\n' + id + '\n\n' + message + '\n'); | ||
} | ||
} |
@@ -176,3 +176,11 @@ 'use strict'; | ||
dispatch((0, _drafts.createDraft)(scope, resources, captureModelId, motivation || defaultMotivation, selectors, draftDefaults, null, path, name)); | ||
dispatch((0, _drafts.createDraft)(scope, { | ||
emptyInput: resources, | ||
template: captureModelId, | ||
motivation: motivation || defaultMotivation, | ||
selectors: selectors, | ||
draftDefaults: draftDefaults, | ||
path: path, | ||
name: name | ||
})); | ||
}; | ||
@@ -179,0 +187,0 @@ } |
{ | ||
"name": "@annotation-studio/bridge", | ||
"version": "1.0.0-next.d6fe37d0", | ||
"version": "1.0.0-next.dafe059c", | ||
"description": "Describe annotation-bridge here", | ||
@@ -25,11 +25,11 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@annotation-studio/redux": "^1.0.0-rc.14" | ||
"@annotation-studio/redux": "1.0.0-rc.24" | ||
}, | ||
"devDependencies": { | ||
"@annotation-studio/redux": "^1.0.0-next.d6fe37d0", | ||
"@fesk/test-environment": "^1.0.0-next.d6fe37d0", | ||
"@annotation-studio/redux": "1.0.0-next.dafe059c", | ||
"@fesk/test-environment": "1.0.0-next.dafe059c", | ||
"babel-jest": "^20.0.3", | ||
"jest": "^20.0.0", | ||
"jest": "^23.6.0", | ||
"nwb": "^0.21.5", | ||
"nwb-watch": "^1.0.0-next.d6fe37d0", | ||
"nwb-watch": "1.0.0-next.dafe059c", | ||
"react": "^15.6.2" | ||
@@ -36,0 +36,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
70177
1729