@ordergroove/offers 2.30.1-alpha-PR-714-9.8 → 2.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/bundle-report.html +28 -28
- package/dist/examples.js +1 -1
- package/dist/examples.js.map +2 -2
- package/dist/offers.js +34 -34
- package/dist/offers.js.map +2 -2
- package/examples/index.html +0 -1
- package/examples/index.js +8 -9
- package/package.json +3 -3
- package/src/components/Offer.js +0 -1
- package/src/core/__tests__/adapters.spec.js +1 -309
- package/src/core/__tests__/reducer.spec.js +1 -79
- package/src/core/actions-preview.js +0 -127
- package/src/core/adapters.js +1 -14
- package/src/core/constants.js +0 -2
- package/src/core/reducer.js +1 -12
package/src/core/reducer.js
CHANGED
|
@@ -3,7 +3,7 @@ import { combineReducers } from 'redux';
|
|
|
3
3
|
import * as constants from './constants';
|
|
4
4
|
import { isSameProduct } from './selectors';
|
|
5
5
|
import { stringifyFrequency } from './api';
|
|
6
|
-
import { getObjectStructuredProductPlans
|
|
6
|
+
import { getObjectStructuredProductPlans } from './adapters';
|
|
7
7
|
import { safeProductId, getMatchingProductIfExists } from './utils';
|
|
8
8
|
|
|
9
9
|
export const optedin = (state = [], action) => {
|
|
@@ -420,15 +420,6 @@ export const previewUpsellOffer = (state = false, action) => {
|
|
|
420
420
|
}
|
|
421
421
|
};
|
|
422
422
|
|
|
423
|
-
export const previewPrepaidOffer = (state = false, action) => {
|
|
424
|
-
switch (action.type) {
|
|
425
|
-
case constants.SET_PREVIEW_PREPAID_OFFER:
|
|
426
|
-
return action.payload;
|
|
427
|
-
default:
|
|
428
|
-
return state;
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
|
|
432
423
|
export const autoshipByDefault = (state = [], action) => {
|
|
433
424
|
switch (action.type) {
|
|
434
425
|
case constants.RECEIVE_OFFER:
|
|
@@ -469,8 +460,6 @@ export const productPlans = (state = {}, action) => {
|
|
|
469
460
|
switch (action.type) {
|
|
470
461
|
case constants.RECEIVE_PRODUCT_PLANS:
|
|
471
462
|
return getObjectStructuredProductPlans(action.payload);
|
|
472
|
-
case constants.ADD_PRODUCT_PLANS:
|
|
473
|
-
return mergeProductPlansToState(state, getObjectStructuredProductPlans(action.payload));
|
|
474
463
|
default:
|
|
475
464
|
return state;
|
|
476
465
|
}
|