@lab009/erebus
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -41,8 +41,18 @@ 'use strict'; | ||
// subset state | ||
var createSubset = function createSubset(state, _ref2) { | ||
var deleteEntities = function deleteEntities(state, _ref2) { | ||
var _ref2$payload = _ref2.payload, | ||
subset = _ref2$payload.subset, | ||
fresh = _ref2$payload.fresh; | ||
params = _ref2$payload.params, | ||
model = _ref2$payload.model; | ||
if (!model) return state; | ||
return state.deleteIn(['entities', model.key, params.get('id').toString()]); | ||
}; | ||
// subset state | ||
var createSubset = function createSubset(state, _ref3) { | ||
var _ref3$payload = _ref3.payload, | ||
subset = _ref3$payload.subset, | ||
fresh = _ref3$payload.fresh; | ||
if (!subset) return state; | ||
@@ -58,7 +68,7 @@ var path = ['subsets', subset]; | ||
var setSubsetData = function setSubsetData(state, _ref3) { | ||
var subset = _ref3.meta.subset, | ||
_ref3$payload = _ref3.payload, | ||
raw = _ref3$payload.raw, | ||
normalized = _ref3$payload.normalized; | ||
var setSubsetData = function setSubsetData(state, _ref4) { | ||
var subset = _ref4.meta.subset, | ||
_ref4$payload = _ref4.payload, | ||
raw = _ref4$payload.raw, | ||
normalized = _ref4$payload.normalized; | ||
@@ -73,5 +83,5 @@ if (!subset) return state; | ||
var setSubsetError = function setSubsetError(state, _ref4) { | ||
var subset = _ref4.meta.subset, | ||
payload = _ref4.payload; | ||
var setSubsetError = function setSubsetError(state, _ref5) { | ||
var subset = _ref5.meta.subset, | ||
payload = _ref5.payload; | ||
@@ -91,3 +101,4 @@ if (!subset) return state; | ||
'erebus.failure': setSubsetError, | ||
'erebus.success': (0, _reduceReducers2.default)(setSubsetData, addEntities) | ||
'erebus.success': (0, _reduceReducers2.default)(setSubsetData, addEntities), | ||
'erebus.delete': deleteEntities | ||
}, initialState); |
@@ -28,8 +28,18 @@ import { handleActions } from 'redux-actions'; | ||
// subset state | ||
var createSubset = function createSubset(state, _ref2) { | ||
var deleteEntities = function deleteEntities(state, _ref2) { | ||
var _ref2$payload = _ref2.payload, | ||
subset = _ref2$payload.subset, | ||
fresh = _ref2$payload.fresh; | ||
params = _ref2$payload.params, | ||
model = _ref2$payload.model; | ||
if (!model) return state; | ||
return state.deleteIn(['entities', model.key, params.get('id').toString()]); | ||
}; | ||
// subset state | ||
var createSubset = function createSubset(state, _ref3) { | ||
var _ref3$payload = _ref3.payload, | ||
subset = _ref3$payload.subset, | ||
fresh = _ref3$payload.fresh; | ||
if (!subset) return state; | ||
@@ -45,7 +55,7 @@ var path = ['subsets', subset]; | ||
var setSubsetData = function setSubsetData(state, _ref3) { | ||
var subset = _ref3.meta.subset, | ||
_ref3$payload = _ref3.payload, | ||
raw = _ref3$payload.raw, | ||
normalized = _ref3$payload.normalized; | ||
var setSubsetData = function setSubsetData(state, _ref4) { | ||
var subset = _ref4.meta.subset, | ||
_ref4$payload = _ref4.payload, | ||
raw = _ref4$payload.raw, | ||
normalized = _ref4$payload.normalized; | ||
@@ -60,5 +70,5 @@ if (!subset) return state; | ||
var setSubsetError = function setSubsetError(state, _ref4) { | ||
var subset = _ref4.meta.subset, | ||
payload = _ref4.payload; | ||
var setSubsetError = function setSubsetError(state, _ref5) { | ||
var subset = _ref5.meta.subset, | ||
payload = _ref5.payload; | ||
@@ -78,3 +88,4 @@ if (!subset) return state; | ||
'erebus.failure': setSubsetError, | ||
'erebus.success': compose(setSubsetData, addEntities) | ||
'erebus.success': compose(setSubsetData, addEntities), | ||
'erebus.delete': deleteEntities | ||
}, initialState); |
{ | ||
"name": "@lab009/erebus", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "Dead-simple API actions for Redux", | ||
@@ -5,0 +5,0 @@ "repository": "lab009/teide", |
@@ -0,0 +0,0 @@ # @lab009/erebus |
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
32970
20
850