digirati-annotation-redux
Advanced tools
Comparing version 1.0.0-rc.e8dc19f9 to 1.0.0-rc.f3739a39
@@ -355,6 +355,4 @@ import _extends from 'babel-runtime/helpers/extends'; | ||
dispatch(addAnnotation(getState().drafts.list[id])); | ||
if (dry === false) { | ||
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope } }); | ||
} | ||
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope, dry: dry } }); | ||
}; | ||
} |
@@ -12,3 +12,5 @@ export var MANIFEST_ADD = 'MANIFEST_ADD'; | ||
dispatch({ type: MANIFEST_REQUEST, payload: { url: url } }); | ||
return fetch(url).then(function (response) { | ||
return fetch(url, { | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache' | ||
}).then(function (response) { | ||
return response.json(); | ||
@@ -15,0 +17,0 @@ }).then(function (body) { |
@@ -106,2 +106,3 @@ import _regeneratorRuntime from 'babel-runtime/regenerator'; | ||
credentials: 'same-origin', | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache', | ||
redirect: 'follow' | ||
@@ -108,0 +109,0 @@ }).then(function (response) { |
@@ -33,3 +33,3 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties'; | ||
export default function draftReducer() { | ||
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _currentDrafts3, _isConfirmed2, _currentDrafts4; | ||
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _isConfirmed2, _currentDrafts3; | ||
@@ -113,4 +113,3 @@ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; | ||
case DRAFT_PUBLISHED: | ||
return update(state, { | ||
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3), | ||
var updater = { | ||
isConfirmed: (_isConfirmed2 = {}, _isConfirmed2[action.payload.scope] = { $set: false }, _isConfirmed2), | ||
@@ -125,4 +124,11 @@ list: { | ||
} | ||
}); | ||
}; | ||
if (action.payload.dry !== true) { | ||
var _updater$currentDraft; | ||
updater.currentDrafts = (_updater$currentDraft = {}, _updater$currentDraft[action.payload.scope] = { $set: null }, _updater$currentDraft); | ||
} | ||
return update(state, updater); | ||
case DRAFT_DISCARD: | ||
@@ -143,3 +149,3 @@ var listUpdate = { | ||
return update(state, { | ||
currentDrafts: (_currentDrafts4 = {}, _currentDrafts4[action.payload.scope] = { $set: null }, _currentDrafts4), | ||
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3), | ||
list: listUpdate | ||
@@ -146,0 +152,0 @@ }); |
@@ -408,6 +408,4 @@ 'use strict'; | ||
dispatch((0, _annotations.addAnnotation)(getState().drafts.list[id])); | ||
if (dry === false) { | ||
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope } }); | ||
} | ||
dispatch({ type: DRAFT_PUBLISHED, payload: { id: id, scope: scope, dry: dry } }); | ||
}; | ||
} |
@@ -20,3 +20,5 @@ 'use strict'; | ||
dispatch({ type: MANIFEST_REQUEST, payload: { url: url } }); | ||
return fetch(url).then(function (response) { | ||
return fetch(url, { | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache' | ||
}).then(function (response) { | ||
return response.json(); | ||
@@ -23,0 +25,0 @@ }).then(function (body) { |
@@ -241,2 +241,3 @@ 'use strict'; | ||
credentials: 'same-origin', | ||
cache: process.env.NODE_ENV === 'production' ? 'default' : 'force-cache', | ||
redirect: 'follow' | ||
@@ -243,0 +244,0 @@ }).then(function (response) { |
@@ -47,3 +47,3 @@ 'use strict'; | ||
function draftReducer() { | ||
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _currentDrafts3, _isConfirmed2, _currentDrafts4; | ||
var _list, _list2, _list3, _list4, _list5, _currentDrafts, _currentDrafts2, _list6, _list7, _list8, _isConfirmed, _isConfirmed2, _currentDrafts3; | ||
@@ -127,4 +127,3 @@ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; | ||
case _drafts.DRAFT_PUBLISHED: | ||
return (0, _immutabilityHelper2.default)(state, { | ||
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3), | ||
var updater = { | ||
isConfirmed: (_isConfirmed2 = {}, _isConfirmed2[action.payload.scope] = { $set: false }, _isConfirmed2), | ||
@@ -139,4 +138,11 @@ list: { | ||
} | ||
}); | ||
}; | ||
if (action.payload.dry !== true) { | ||
var _updater$currentDraft; | ||
updater.currentDrafts = (_updater$currentDraft = {}, _updater$currentDraft[action.payload.scope] = { $set: null }, _updater$currentDraft); | ||
} | ||
return (0, _immutabilityHelper2.default)(state, updater); | ||
case _drafts.DRAFT_DISCARD: | ||
@@ -157,3 +163,3 @@ var listUpdate = { | ||
return (0, _immutabilityHelper2.default)(state, { | ||
currentDrafts: (_currentDrafts4 = {}, _currentDrafts4[action.payload.scope] = { $set: null }, _currentDrafts4), | ||
currentDrafts: (_currentDrafts3 = {}, _currentDrafts3[action.payload.scope] = { $set: null }, _currentDrafts3), | ||
list: listUpdate | ||
@@ -160,0 +166,0 @@ }); |
{ | ||
"name": "digirati-annotation-redux", | ||
"version": "1.0.0-rc.e8dc19f9", | ||
"version": "1.0.0-rc.f3739a39", | ||
"description": "Describe annotation-redux here", | ||
@@ -37,3 +37,3 @@ "main": "es/index.js", | ||
"babel-plugin-transform-regenerator": "^6.24.1", | ||
"digirati-test-environment": "^1.0.0-rc.e8dc19f9", | ||
"digirati-test-environment": "^1.0.0-rc.f3739a39", | ||
"jest": "^20.0.0", | ||
@@ -40,0 +40,0 @@ "nwb": "0.15.x" |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
221497
5403
5