@daffodil/cart 0.39.6 → 0.39.10
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/bundles/daffodil-cart-driver-magento-testing.umd.js +2 -2
- package/bundles/daffodil-cart-driver-magento-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-driver-magento-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.js +88 -34
- package/bundles/daffodil-cart-driver-magento.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-magento.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.js +2 -2
- package/bundles/daffodil-cart-driver-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js +1 -1
- package/bundles/daffodil-cart-driver-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.js +34 -1
- package/bundles/daffodil-cart-driver.umd.js.map +1 -1
- package/bundles/daffodil-cart-driver.umd.min.js +2 -2
- package/bundles/daffodil-cart-driver.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.js +43 -0
- package/bundles/daffodil-cart-routing.umd.js.map +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js +1 -1
- package/bundles/daffodil-cart-routing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.js +12 -2
- package/bundles/daffodil-cart-state-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-state-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-state-testing.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.js +39 -7
- package/bundles/daffodil-cart-state.umd.js.map +1 -1
- package/bundles/daffodil-cart-state.umd.min.js +1 -1
- package/bundles/daffodil-cart-state.umd.min.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.js +3 -3
- package/bundles/daffodil-cart-testing.umd.js.map +1 -1
- package/bundles/daffodil-cart-testing.umd.min.js +2 -2
- package/bundles/daffodil-cart-testing.umd.min.js.map +1 -1
- package/driver/daffodil-cart-driver.metadata.json +1 -1
- package/driver/errors/codes.enum.d.ts +3 -1
- package/driver/errors/invalid-email.d.ts +8 -0
- package/driver/errors/item-exceeds-max-qty.d.ts +9 -0
- package/driver/errors/map.d.ts +4 -0
- package/driver/errors/product-out-of-stock.d.ts +1 -1
- package/driver/errors/public_api.d.ts +2 -0
- package/driver/magento/cart-item.service.d.ts +3 -1
- package/driver/magento/daffodil-cart-driver-magento.metadata.json +1 -1
- package/driver/magento/errors/map.d.ts +2 -0
- package/driver/magento/injection-tokens/public_api.d.ts +1 -0
- package/driver/magento/injection-tokens/transforms/cart-item/token.d.ts +22 -0
- package/driver/magento/interfaces/cart-item-transform.type.d.ts +3 -0
- package/driver/magento/interfaces/public_api.d.ts +1 -0
- package/driver/magento/public_api.d.ts +1 -0
- package/driver/magento/transforms/outputs/cart-coupon-response.service.d.ts +3 -0
- package/driver/magento/transforms/outputs/cart-item/cart-item-transformer.d.ts +7 -4
- package/driver/magento/transforms/outputs/cart.service.d.ts +3 -1
- package/esm2015/driver/errors/codes.enum.js +3 -1
- package/esm2015/driver/errors/invalid-email.js +12 -0
- package/esm2015/driver/errors/item-exceeds-max-qty.js +13 -0
- package/esm2015/driver/errors/map.js +5 -1
- package/esm2015/driver/errors/product-out-of-stock.js +2 -2
- package/esm2015/driver/errors/public_api.js +3 -1
- package/esm2015/driver/magento/cart-item.service.js +11 -8
- package/esm2015/driver/magento/errors/map.js +4 -2
- package/esm2015/driver/magento/injection-tokens/public_api.js +2 -1
- package/esm2015/driver/magento/injection-tokens/transforms/cart-item/token.js +27 -0
- package/esm2015/driver/magento/interfaces/cart-item-transform.type.js +2 -0
- package/esm2015/driver/magento/interfaces/public_api.js +2 -0
- package/esm2015/driver/magento/public_api.js +2 -1
- package/esm2015/driver/magento/testing/factories/cart-address-input.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-address.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-coupon.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/bundle-cart-item.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/cart-item.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-item/configurable-cart-item.factory.js +1 -1
- package/esm2015/driver/magento/testing/factories/cart-payment-method.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart-shipping-method.factory.js +2 -2
- package/esm2015/driver/magento/testing/factories/cart.factory.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-coupon-response.service.js +15 -5
- package/esm2015/driver/magento/transforms/outputs/cart-item/bundle-cart-item-transformer.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-item/cart-item-transformer.js +9 -6
- package/esm2015/driver/magento/transforms/outputs/cart-item/configurable-cart-item-transformer.js +2 -2
- package/esm2015/driver/magento/transforms/outputs/cart-item/simple-cart-item-transformer.js +3 -3
- package/esm2015/driver/magento/transforms/outputs/cart.service.js +12 -7
- package/esm2015/driver/testing/drivers/cart-order/cart-order.service.js +2 -2
- package/esm2015/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.js +6 -0
- package/esm2015/routing/guards/in-stock-items/in-stock-items.guard.js +43 -0
- package/esm2015/routing/guards/public_api.js +3 -1
- package/esm2015/state/actions/cart-coupon.actions.js +10 -1
- package/esm2015/state/effects/cart-resolver.effects.js +5 -2
- package/esm2015/state/facades/cart/cart-facade.interface.js +1 -1
- package/esm2015/state/facades/cart/cart.facade.js +9 -2
- package/esm2015/state/models/stateful-cart-item.js +1 -1
- package/esm2015/state/reducers/cart-coupon/cart-coupon.reducer.js +3 -1
- package/esm2015/state/reducers/cart-item/cart-item.reducer.js +3 -1
- package/esm2015/state/reducers/cart-item-entities/cart-item-entities.reducer.js +8 -7
- package/esm2015/state/selectors/cart-item-entities/cart-item-entities.selectors.js +7 -1
- package/esm2015/state/testing/factories/stateful-cart-item.factory.js +2 -1
- package/esm2015/state/testing/factories/stateful-composite-cart-item.factory.js +5 -1
- package/esm2015/state/testing/factories/stateful-configurable-cart-item.factory.js +5 -1
- package/esm2015/state/testing/mock-cart-facade.js +6 -1
- package/esm2015/testing/factories/cart-address.factory.js +2 -2
- package/esm2015/testing/factories/cart-coupon.factory.js +2 -2
- package/esm2015/testing/factories/cart-item/cart-item.factory.js +3 -3
- package/esm2015/testing/factories/cart-item/composite-cart-item.factory.js +2 -2
- package/esm2015/testing/factories/cart-item/configurable-cart-item.factory.js +1 -1
- package/esm2015/testing/factories/cart-shipping-rate.factory.js +2 -2
- package/esm2015/testing/factories/cart.factory.js +2 -2
- package/fesm2015/daffodil-cart-driver-magento-testing.js +1 -1
- package/fesm2015/daffodil-cart-driver-magento-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-magento.js +79 -35
- package/fesm2015/daffodil-cart-driver-magento.js.map +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js +1 -1
- package/fesm2015/daffodil-cart-driver-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-driver.js +27 -2
- package/fesm2015/daffodil-cart-driver.js.map +1 -1
- package/fesm2015/daffodil-cart-routing.js +40 -1
- package/fesm2015/daffodil-cart-routing.js.map +1 -1
- package/fesm2015/daffodil-cart-state-testing.js +14 -0
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +39 -9
- package/fesm2015/daffodil-cart-state.js.map +1 -1
- package/fesm2015/daffodil-cart-testing.js +2 -2
- package/fesm2015/daffodil-cart-testing.js.map +1 -1
- package/package.json +6 -6
- package/routing/daffodil-cart-routing.metadata.json +1 -1
- package/routing/guards/in-stock-items/in-stock-items-guard-redirect.token.d.ts +5 -0
- package/routing/guards/in-stock-items/in-stock-items.guard.d.ts +17 -0
- package/routing/guards/public_api.d.ts +2 -0
- package/state/actions/cart-coupon.actions.d.ts +9 -2
- package/state/daffodil-cart-state.metadata.json +1 -1
- package/state/facades/cart/cart-facade.interface.d.ts +12 -0
- package/state/facades/cart/cart.facade.d.ts +4 -0
- package/state/models/stateful-cart-item.d.ts +5 -0
- package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +13 -0
- package/state/testing/daffodil-cart-state-testing.metadata.json +1 -1
- package/state/testing/factories/stateful-cart-item.factory.d.ts +1 -0
- package/state/testing/factories/stateful-composite-cart-item.factory.d.ts +1 -0
- package/state/testing/factories/stateful-configurable-cart-item.factory.d.ts +1 -0
- package/state/testing/mock-cart-facade.d.ts +3 -0
|
@@ -935,6 +935,7 @@
|
|
|
935
935
|
DaffCartCouponActionTypes["CartCouponRemoveAllAction"] = "[DaffCart] Cart Coupon Remove All Action";
|
|
936
936
|
DaffCartCouponActionTypes["CartCouponRemoveAllSuccessAction"] = "[DaffCart] Cart Coupon Remove All Success Action";
|
|
937
937
|
DaffCartCouponActionTypes["CartCouponRemoveAllFailureAction"] = "[DaffCart] Cart Coupon Remove All Failure Action";
|
|
938
|
+
DaffCartCouponActionTypes["CartCouponClearErrorsAction"] = "[DaffCart] Cart Coupon Clear Errors Action";
|
|
938
939
|
})(exports.DaffCartCouponActionTypes || (exports.DaffCartCouponActionTypes = {}));
|
|
939
940
|
/**
|
|
940
941
|
* Triggers the application of a cart coupon.
|
|
@@ -1054,6 +1055,15 @@
|
|
|
1054
1055
|
}
|
|
1055
1056
|
return DaffCartCouponRemoveAllFailure;
|
|
1056
1057
|
}());
|
|
1058
|
+
/**
|
|
1059
|
+
* Removes the errors in cart coupon state.
|
|
1060
|
+
*/
|
|
1061
|
+
var DaffCartCouponClearErrors = /** @class */ (function () {
|
|
1062
|
+
function DaffCartCouponClearErrors() {
|
|
1063
|
+
this.type = exports.DaffCartCouponActionTypes.CartCouponClearErrorsAction;
|
|
1064
|
+
}
|
|
1065
|
+
return DaffCartCouponClearErrors;
|
|
1066
|
+
}());
|
|
1057
1067
|
|
|
1058
1068
|
(function (DaffCartItemStateEnum) {
|
|
1059
1069
|
DaffCartItemStateEnum["New"] = "new";
|
|
@@ -1081,12 +1091,13 @@
|
|
|
1081
1091
|
*/
|
|
1082
1092
|
function daffCartItemEntitiesReducer(state, action) {
|
|
1083
1093
|
if (state === void 0) { state = daffCartItemEntitiesAdapter().getInitialState(); }
|
|
1094
|
+
var _a, _b;
|
|
1084
1095
|
var adapter = daffCartItemEntitiesAdapter();
|
|
1085
1096
|
switch (action.type) {
|
|
1086
1097
|
case exports.DaffCartItemActionTypes.CartItemListSuccessAction:
|
|
1087
|
-
return adapter.setAll(action.payload.map(function (item) { return (Object.assign(Object.assign({}, item), { daffState: getDaffState(state.entities[item.id]) || exports.DaffCartItemStateEnum.Default })); }), state);
|
|
1098
|
+
return adapter.setAll(action.payload.map(function (item) { return (Object.assign(Object.assign({}, item), { daffState: getDaffState(state.entities[item.id]) || exports.DaffCartItemStateEnum.Default, errors: [] })); }), state);
|
|
1088
1099
|
case exports.DaffCartItemActionTypes.CartItemLoadSuccessAction:
|
|
1089
|
-
return adapter.upsertOne(Object.assign(Object.assign({}, action.payload), { daffState: getDaffState(state.entities[action.payload.id]) || exports.DaffCartItemStateEnum.Default }), state);
|
|
1100
|
+
return adapter.upsertOne(Object.assign(Object.assign({}, action.payload), { daffState: getDaffState(state.entities[action.payload.id]) || exports.DaffCartItemStateEnum.Default, errors: [] }), state);
|
|
1090
1101
|
case exports.DaffCartItemActionTypes.CartItemAddSuccessAction:
|
|
1091
1102
|
return adapter.setAll(updateAddedCartItemState(state.entities, action.payload.items), state);
|
|
1092
1103
|
case exports.DaffCartItemActionTypes.CartItemUpdateSuccessAction:
|
|
@@ -1094,7 +1105,7 @@
|
|
|
1094
1105
|
case exports.DaffCartItemActionTypes.CartItemDeleteFailureAction:
|
|
1095
1106
|
case exports.DaffCartItemActionTypes.CartItemLoadFailureAction:
|
|
1096
1107
|
case exports.DaffCartItemActionTypes.CartItemUpdateFailureAction:
|
|
1097
|
-
return adapter.upsertOne(Object.assign(Object.assign({}, state.entities[action.itemId]), { daffState: exports.DaffCartItemStateEnum.Error }), state);
|
|
1108
|
+
return adapter.upsertOne(Object.assign(Object.assign({}, state.entities[action.itemId]), { daffState: exports.DaffCartItemStateEnum.Error, errors: ((_b = (_a = state.entities[action.itemId]) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b.concat(action.payload)) || [action.payload] }), state);
|
|
1098
1109
|
case exports.DaffCartItemActionTypes.CartItemDeleteSuccessAction:
|
|
1099
1110
|
case exports.DaffCartActionTypes.CartLoadSuccessAction:
|
|
1100
1111
|
case exports.DaffCartActionTypes.ResolveCartSuccessAction:
|
|
@@ -1119,16 +1130,16 @@
|
|
|
1119
1130
|
var oldItem = oldCartItems[newItem.id];
|
|
1120
1131
|
switch (true) {
|
|
1121
1132
|
case !oldItem:
|
|
1122
|
-
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.New });
|
|
1133
|
+
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.New, errors: [] });
|
|
1123
1134
|
case (oldItem === null || oldItem === void 0 ? void 0 : oldItem.qty) !== newItem.qty:
|
|
1124
|
-
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.Updated });
|
|
1135
|
+
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.Updated, errors: [] });
|
|
1125
1136
|
default:
|
|
1126
1137
|
return newItem;
|
|
1127
1138
|
}
|
|
1128
1139
|
});
|
|
1129
1140
|
}
|
|
1130
1141
|
function updateMutatedCartItemState(responseItems, stateItems, itemId) {
|
|
1131
|
-
return responseItems.map(function (item) { return item.id === itemId ? Object.assign(Object.assign({}, item), { daffState: exports.DaffCartItemStateEnum.Updated }) : Object.assign(Object.assign({}, item), { daffState: getDaffState(stateItems[item.id]) || exports.DaffCartItemStateEnum.Default }); });
|
|
1142
|
+
return responseItems.map(function (item) { return item.id === itemId ? Object.assign(Object.assign({}, item), { daffState: exports.DaffCartItemStateEnum.Updated, errors: [] }) : Object.assign(Object.assign({}, item), { daffState: getDaffState(stateItems[item.id]) || exports.DaffCartItemStateEnum.Default }); });
|
|
1132
1143
|
}
|
|
1133
1144
|
|
|
1134
1145
|
/*! *****************************************************************************
|
|
@@ -1601,6 +1612,8 @@
|
|
|
1601
1612
|
case exports.DaffCartCouponActionTypes.CartCouponRemoveSuccessAction:
|
|
1602
1613
|
case exports.DaffCartCouponActionTypes.CartCouponRemoveAllSuccessAction:
|
|
1603
1614
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, state), resetErrors$1(state.errors)), { cart: Object.assign(Object.assign({}, state.cart), action.payload) }), setLoading$1(state.loading, "Stable" /* Complete */));
|
|
1615
|
+
case exports.DaffCartCouponActionTypes.CartCouponClearErrorsAction:
|
|
1616
|
+
return Object.assign(Object.assign({}, state), resetErrors$1(state.errors));
|
|
1604
1617
|
case exports.DaffCartCouponActionTypes.CartCouponListSuccessAction:
|
|
1605
1618
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, state), resetErrors$1(state.errors)), { cart: Object.assign(Object.assign({}, state.cart), { coupons: action.payload }) }), setLoading$1(state.loading, "Stable" /* Complete */));
|
|
1606
1619
|
case exports.DaffCartCouponActionTypes.CartCouponApplyFailureAction:
|
|
@@ -1640,6 +1653,8 @@
|
|
|
1640
1653
|
case exports.DaffCartItemActionTypes.CartItemAddFailureAction:
|
|
1641
1654
|
case exports.DaffCartItemActionTypes.CartItemDeleteFailureAction:
|
|
1642
1655
|
return Object.assign(Object.assign(Object.assign({}, state), addError$2(state.errors, action.payload)), setLoading$2(state.loading, "Stable" /* Complete */));
|
|
1656
|
+
case exports.DaffCartItemActionTypes.CartItemUpdateFailureAction:
|
|
1657
|
+
return Object.assign(Object.assign({}, state), setLoading$2(state.loading, "Stable" /* Complete */));
|
|
1643
1658
|
default:
|
|
1644
1659
|
return state;
|
|
1645
1660
|
}
|
|
@@ -1940,6 +1955,8 @@
|
|
|
1940
1955
|
return cartItem.options;
|
|
1941
1956
|
}); }).memoized;
|
|
1942
1957
|
var selectIsCartItemOutOfStock = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return cartItem ? !cartItem.in_stock : null; }); }).memoized;
|
|
1958
|
+
var selectOutOfStockCartItems = i1.createSelector(selectAllCartItems, function (items) { return items.filter(function (item) { return !item.in_stock; }); });
|
|
1959
|
+
var selectInStockCartItems = i1.createSelector(selectAllCartItems, function (items) { return items.filter(function (item) { return item.in_stock; }); });
|
|
1943
1960
|
var selectCartItemMutating = i1.createSelector(selectAllCartItems, function (cartItems) { return cartItems === null || cartItems === void 0 ? void 0 : cartItems.reduce(function (acc, item) { return acc || item.daffState === exports.DaffCartItemStateEnum.Mutating; }, false); });
|
|
1944
1961
|
var selectCartItemState = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return (cartItem === null || cartItem === void 0 ? void 0 : cartItem.daffState) || null; }); }).memoized;
|
|
1945
1962
|
var selectCartItemQuantity = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return (cartItem === null || cartItem === void 0 ? void 0 : cartItem.qty) || 0; }); }).memoized;
|
|
@@ -1950,6 +1967,7 @@
|
|
|
1950
1967
|
var amount = _a.amount;
|
|
1951
1968
|
return core.daffAdd(acc, amount);
|
|
1952
1969
|
}, 0)) || 0; }); }).memoized;
|
|
1970
|
+
var selectCartItemErrors = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return (cartItem === null || cartItem === void 0 ? void 0 : cartItem.errors) || []; }); }).memoized;
|
|
1953
1971
|
return {
|
|
1954
1972
|
selectCartItemEntitiesState: selectCartItemEntitiesState,
|
|
1955
1973
|
selectCartItemIds: selectCartItemIds,
|
|
@@ -1961,6 +1979,8 @@
|
|
|
1961
1979
|
selectCartItemConfiguredAttributes: selectCartItemConfiguredAttributes,
|
|
1962
1980
|
selectCartItemCompositeOptions: selectCartItemCompositeOptions,
|
|
1963
1981
|
selectIsCartItemOutOfStock: selectIsCartItemOutOfStock,
|
|
1982
|
+
selectInStockCartItems: selectInStockCartItems,
|
|
1983
|
+
selectOutOfStockCartItems: selectOutOfStockCartItems,
|
|
1964
1984
|
selectCartItemMutating: selectCartItemMutating,
|
|
1965
1985
|
selectCartItemState: selectCartItemState,
|
|
1966
1986
|
selectCartItemPrice: selectCartItemPrice,
|
|
@@ -1968,6 +1988,7 @@
|
|
|
1968
1988
|
selectCartItemQuantity: selectCartItemQuantity,
|
|
1969
1989
|
selectCartItemDiscounts: selectCartItemDiscounts,
|
|
1970
1990
|
selectCartItemTotalDiscount: selectCartItemTotalDiscount,
|
|
1991
|
+
selectCartItemErrors: selectCartItemErrors,
|
|
1971
1992
|
};
|
|
1972
1993
|
};
|
|
1973
1994
|
var ɵ0$2 = createCartItemEntitiesSelectors;
|
|
@@ -2535,6 +2556,9 @@
|
|
|
2535
2556
|
var id = _a.id;
|
|
2536
2557
|
return _this.driver.get(id);
|
|
2537
2558
|
}), operators.map(function (resp) { return new DaffResolveCartSuccess(resp); }), operators.catchError(function (innerError) { return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartNotFoundOrCreatedResolutionError(innerError.message)))); }));
|
|
2559
|
+
// I wish there was a better way to check this
|
|
2560
|
+
case error instanceof core.DaffInheritableError || !!error.code:
|
|
2561
|
+
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(error)));
|
|
2538
2562
|
default:
|
|
2539
2563
|
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartResolutionError(error.message))));
|
|
2540
2564
|
}
|
|
@@ -2759,7 +2783,7 @@
|
|
|
2759
2783
|
var _this = this;
|
|
2760
2784
|
this.store = store;
|
|
2761
2785
|
this.paymentMethodMap = paymentMethodMap;
|
|
2762
|
-
var _a = getDaffCartSelectors(), selectCartValue = _a.selectCartValue, selectCartResolved = _a.selectCartResolved, selectCartLoadingObject = _a.selectCartLoadingObject, selectCartFeatureLoading = _a.selectCartFeatureLoading, selectCartFeatureResolving = _a.selectCartFeatureResolving, selectCartFeatureMutating = _a.selectCartFeatureMutating, selectCartLoading = _a.selectCartLoading, selectCartResolving = _a.selectCartResolving, selectCartMutating = _a.selectCartMutating, selectBillingAddressLoading = _a.selectBillingAddressLoading, selectBillingAddressResolving = _a.selectBillingAddressResolving, selectBillingAddressMutating = _a.selectBillingAddressMutating, selectShippingAddressLoading = _a.selectShippingAddressLoading, selectShippingAddressResolving = _a.selectShippingAddressResolving, selectShippingAddressMutating = _a.selectShippingAddressMutating, selectShippingInformationLoading = _a.selectShippingInformationLoading, selectShippingInformationResolving = _a.selectShippingInformationResolving, selectShippingInformationMutating = _a.selectShippingInformationMutating, selectShippingMethodsLoading = _a.selectShippingMethodsLoading, selectShippingMethodsResolving = _a.selectShippingMethodsResolving, selectPaymentLoading = _a.selectPaymentLoading, selectPaymentResolving = _a.selectPaymentResolving, selectPaymentMutating = _a.selectPaymentMutating, selectPaymentMethodsLoading = _a.selectPaymentMethodsLoading, selectPaymentMethodsResolving = _a.selectPaymentMethodsResolving, selectCouponLoading = _a.selectCouponLoading, selectCouponResolving = _a.selectCouponResolving, selectCouponMutating = _a.selectCouponMutating, selectItemLoading = _a.selectItemLoading, selectItemAdding = _a.selectItemAdding, selectItemResolving = _a.selectItemResolving, selectCartItemMutating = _a.selectCartItemMutating, selectCartErrorsObject = _a.selectCartErrorsObject, selectCartErrors = _a.selectCartErrors, selectItemErrors = _a.selectItemErrors, selectBillingAddressErrors = _a.selectBillingAddressErrors, selectShippingAddressErrors = _a.selectShippingAddressErrors, selectShippingInformationErrors = _a.selectShippingInformationErrors, selectShippingMethodsErrors = _a.selectShippingMethodsErrors, selectPaymentErrors = _a.selectPaymentErrors, selectPaymentMethodsErrors = _a.selectPaymentMethodsErrors, selectCouponErrors = _a.selectCouponErrors, selectCartId = _a.selectCartId, selectCartSubtotal = _a.selectCartSubtotal, selectCartGrandTotal = _a.selectCartGrandTotal, selectCartSubtotalExcludingTax = _a.selectCartSubtotalExcludingTax, selectCartSubtotalIncludingTax = _a.selectCartSubtotalIncludingTax, selectCartSubtotalWithDiscountExcludingTax = _a.selectCartSubtotalWithDiscountExcludingTax, selectCartSubtotalWithDiscountIncludingTax = _a.selectCartSubtotalWithDiscountIncludingTax, selectCartDiscountTotals = _a.selectCartDiscountTotals, selectCartTotalTax = _a.selectCartTotalTax, selectCartShippingTotal = _a.selectCartShippingTotal, selectCartCoupons = _a.selectCartCoupons, selectCartItems = _a.selectCartItems, selectCartHasOutOfStockItems = _a.selectCartHasOutOfStockItems, selectCartItemEntities = _a.selectCartItemEntities, selectTotalNumberOfCartItems = _a.selectTotalNumberOfCartItems, selectCartItemConfiguredAttributes = _a.selectCartItemConfiguredAttributes, selectCartItemCompositeOptions = _a.selectCartItemCompositeOptions, selectCartBillingAddress = _a.selectCartBillingAddress, selectCartShippingAddress = _a.selectCartShippingAddress, selectCartPayment = _a.selectCartPayment, selectCartTotals = _a.selectCartTotals, selectCartShippingInformation = _a.selectCartShippingInformation, selectCartAvailableShippingMethods = _a.selectCartAvailableShippingMethods, selectCartAvailablePaymentMethods = _a.selectCartAvailablePaymentMethods, selectIsCartEmpty = _a.selectIsCartEmpty, selectIsBillingSameAsShipping = _a.selectIsBillingSameAsShipping, selectCartOrderLoading = _a.selectCartOrderLoading, selectCartOrderErrors = _a.selectCartOrderErrors, selectCartOrderValue = _a.selectCartOrderValue, selectCartOrderId = _a.selectCartOrderId, selectCartOrderCartId = _a.selectCartOrderCartId, selectHasOrderResult = _a.selectHasOrderResult, selectIsCartItemOutOfStock = _a.selectIsCartItemOutOfStock, selectCartItemState = _a.selectCartItemState, selectHasBillingAddress = _a.selectHasBillingAddress, selectHasShippingAddress = _a.selectHasShippingAddress, selectHasShippingMethod = _a.selectHasShippingMethod, selectHasPaymentMethod = _a.selectHasPaymentMethod, selectCanPlaceOrder = _a.selectCanPlaceOrder, selectCartItemPrice = _a.selectCartItemPrice, selectCartItemRowTotal = _a.selectCartItemRowTotal, selectCartItemQuantity = _a.selectCartItemQuantity, selectCartItemDiscounts = _a.selectCartItemDiscounts, selectCartItemTotalDiscount = _a.selectCartItemTotalDiscount;
|
|
2786
|
+
var _a = getDaffCartSelectors(), selectCartValue = _a.selectCartValue, selectCartResolved = _a.selectCartResolved, selectCartLoadingObject = _a.selectCartLoadingObject, selectCartFeatureLoading = _a.selectCartFeatureLoading, selectCartFeatureResolving = _a.selectCartFeatureResolving, selectCartFeatureMutating = _a.selectCartFeatureMutating, selectCartLoading = _a.selectCartLoading, selectCartResolving = _a.selectCartResolving, selectCartMutating = _a.selectCartMutating, selectBillingAddressLoading = _a.selectBillingAddressLoading, selectBillingAddressResolving = _a.selectBillingAddressResolving, selectBillingAddressMutating = _a.selectBillingAddressMutating, selectShippingAddressLoading = _a.selectShippingAddressLoading, selectShippingAddressResolving = _a.selectShippingAddressResolving, selectShippingAddressMutating = _a.selectShippingAddressMutating, selectShippingInformationLoading = _a.selectShippingInformationLoading, selectShippingInformationResolving = _a.selectShippingInformationResolving, selectShippingInformationMutating = _a.selectShippingInformationMutating, selectShippingMethodsLoading = _a.selectShippingMethodsLoading, selectShippingMethodsResolving = _a.selectShippingMethodsResolving, selectPaymentLoading = _a.selectPaymentLoading, selectPaymentResolving = _a.selectPaymentResolving, selectPaymentMutating = _a.selectPaymentMutating, selectPaymentMethodsLoading = _a.selectPaymentMethodsLoading, selectPaymentMethodsResolving = _a.selectPaymentMethodsResolving, selectCouponLoading = _a.selectCouponLoading, selectCouponResolving = _a.selectCouponResolving, selectCouponMutating = _a.selectCouponMutating, selectItemLoading = _a.selectItemLoading, selectItemAdding = _a.selectItemAdding, selectItemResolving = _a.selectItemResolving, selectCartItemMutating = _a.selectCartItemMutating, selectCartErrorsObject = _a.selectCartErrorsObject, selectCartErrors = _a.selectCartErrors, selectItemErrors = _a.selectItemErrors, selectBillingAddressErrors = _a.selectBillingAddressErrors, selectShippingAddressErrors = _a.selectShippingAddressErrors, selectShippingInformationErrors = _a.selectShippingInformationErrors, selectShippingMethodsErrors = _a.selectShippingMethodsErrors, selectPaymentErrors = _a.selectPaymentErrors, selectPaymentMethodsErrors = _a.selectPaymentMethodsErrors, selectCouponErrors = _a.selectCouponErrors, selectCartId = _a.selectCartId, selectCartSubtotal = _a.selectCartSubtotal, selectCartGrandTotal = _a.selectCartGrandTotal, selectCartSubtotalExcludingTax = _a.selectCartSubtotalExcludingTax, selectCartSubtotalIncludingTax = _a.selectCartSubtotalIncludingTax, selectCartSubtotalWithDiscountExcludingTax = _a.selectCartSubtotalWithDiscountExcludingTax, selectCartSubtotalWithDiscountIncludingTax = _a.selectCartSubtotalWithDiscountIncludingTax, selectCartDiscountTotals = _a.selectCartDiscountTotals, selectCartTotalTax = _a.selectCartTotalTax, selectCartShippingTotal = _a.selectCartShippingTotal, selectCartCoupons = _a.selectCartCoupons, selectCartItems = _a.selectCartItems, selectCartHasOutOfStockItems = _a.selectCartHasOutOfStockItems, selectOutOfStockCartItems = _a.selectOutOfStockCartItems, selectInStockCartItems = _a.selectInStockCartItems, selectCartItemEntities = _a.selectCartItemEntities, selectTotalNumberOfCartItems = _a.selectTotalNumberOfCartItems, selectCartItemConfiguredAttributes = _a.selectCartItemConfiguredAttributes, selectCartItemCompositeOptions = _a.selectCartItemCompositeOptions, selectCartBillingAddress = _a.selectCartBillingAddress, selectCartShippingAddress = _a.selectCartShippingAddress, selectCartPayment = _a.selectCartPayment, selectCartTotals = _a.selectCartTotals, selectCartShippingInformation = _a.selectCartShippingInformation, selectCartAvailableShippingMethods = _a.selectCartAvailableShippingMethods, selectCartAvailablePaymentMethods = _a.selectCartAvailablePaymentMethods, selectIsCartEmpty = _a.selectIsCartEmpty, selectIsBillingSameAsShipping = _a.selectIsBillingSameAsShipping, selectCartOrderLoading = _a.selectCartOrderLoading, selectCartOrderErrors = _a.selectCartOrderErrors, selectCartOrderValue = _a.selectCartOrderValue, selectCartOrderId = _a.selectCartOrderId, selectCartOrderCartId = _a.selectCartOrderCartId, selectHasOrderResult = _a.selectHasOrderResult, selectIsCartItemOutOfStock = _a.selectIsCartItemOutOfStock, selectCartItemState = _a.selectCartItemState, selectHasBillingAddress = _a.selectHasBillingAddress, selectHasShippingAddress = _a.selectHasShippingAddress, selectHasShippingMethod = _a.selectHasShippingMethod, selectHasPaymentMethod = _a.selectHasPaymentMethod, selectCanPlaceOrder = _a.selectCanPlaceOrder, selectCartItemPrice = _a.selectCartItemPrice, selectCartItemRowTotal = _a.selectCartItemRowTotal, selectCartItemQuantity = _a.selectCartItemQuantity, selectCartItemDiscounts = _a.selectCartItemDiscounts, selectCartItemTotalDiscount = _a.selectCartItemTotalDiscount, selectCartItemErrors = _a.selectCartItemErrors;
|
|
2763
2787
|
this._selectCartItemConfiguredAttributes = selectCartItemConfiguredAttributes;
|
|
2764
2788
|
this._selectCartItemCompositeOptions = selectCartItemCompositeOptions;
|
|
2765
2789
|
this._selectIsCartItemOutOfStock = selectIsCartItemOutOfStock;
|
|
@@ -2769,6 +2793,7 @@
|
|
|
2769
2793
|
this._selectCartItemRowTotal = selectCartItemRowTotal;
|
|
2770
2794
|
this._selectCartItemDiscounts = selectCartItemDiscounts;
|
|
2771
2795
|
this._selectCartItemTotalDiscount = selectCartItemTotalDiscount;
|
|
2796
|
+
this._selectCartItemErrors = selectCartItemErrors;
|
|
2772
2797
|
this.cart$ = this.store.pipe(i1.select(selectCartValue));
|
|
2773
2798
|
this.resolved$ = this.store.pipe(i1.select(selectCartResolved));
|
|
2774
2799
|
this.loadingObject$ = this.store.pipe(i1.select(selectCartLoadingObject));
|
|
@@ -2825,6 +2850,8 @@
|
|
|
2825
2850
|
this.items$ = this.store.pipe(i1.select(selectCartItems));
|
|
2826
2851
|
this.totalItems$ = this.store.pipe(i1.select(selectTotalNumberOfCartItems));
|
|
2827
2852
|
this.hasOutOfStockItems$ = this.store.pipe(i1.select(selectCartHasOutOfStockItems));
|
|
2853
|
+
this.outOfStockItems$ = this.store.pipe(i1.select(selectOutOfStockCartItems));
|
|
2854
|
+
this.inStockItems$ = this.store.pipe(i1.select(selectInStockCartItems));
|
|
2828
2855
|
this.itemDictionary$ = this.store.pipe(i1.select(selectCartItemEntities));
|
|
2829
2856
|
this.billingAddress$ = this.store.pipe(i1.select(selectCartBillingAddress));
|
|
2830
2857
|
this.shippingAddress$ = this.store.pipe(i1.select(selectCartShippingAddress));
|
|
@@ -2879,6 +2906,10 @@
|
|
|
2879
2906
|
DaffCartFacade.prototype.getCartItemTotalDiscount = function (itemId) {
|
|
2880
2907
|
return this.store.pipe(i1.select(this._selectCartItemTotalDiscount(itemId)));
|
|
2881
2908
|
};
|
|
2909
|
+
DaffCartFacade.prototype.getCartItemErrors = function (itemId) {
|
|
2910
|
+
return this.store.pipe(i1.select(this._selectCartItemErrors(itemId)));
|
|
2911
|
+
};
|
|
2912
|
+
;
|
|
2882
2913
|
DaffCartFacade.prototype.dispatch = function (action) {
|
|
2883
2914
|
this.store.dispatch(action);
|
|
2884
2915
|
};
|
|
@@ -2920,6 +2951,7 @@
|
|
|
2920
2951
|
exports.DaffCartCouponApply = DaffCartCouponApply;
|
|
2921
2952
|
exports.DaffCartCouponApplyFailure = DaffCartCouponApplyFailure;
|
|
2922
2953
|
exports.DaffCartCouponApplySuccess = DaffCartCouponApplySuccess;
|
|
2954
|
+
exports.DaffCartCouponClearErrors = DaffCartCouponClearErrors;
|
|
2923
2955
|
exports.DaffCartCouponList = DaffCartCouponList;
|
|
2924
2956
|
exports.DaffCartCouponListFailure = DaffCartCouponListFailure;
|
|
2925
2957
|
exports.DaffCartCouponListSuccess = DaffCartCouponListSuccess;
|