@daffodil/cart 0.39.5 → 0.39.9
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.umd.js +3 -1
- 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.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-state-testing.umd.js +10 -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 +33 -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/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/errors/map.d.ts +2 -0
- 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/errors/map.js +4 -2
- 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 +7 -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 +3 -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 +4 -1
- package/fesm2015/daffodil-cart-driver-magento.js +3 -1
- package/fesm2015/daffodil-cart-driver-magento.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-state-testing.js +12 -0
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +33 -9
- package/fesm2015/daffodil-cart-state.js.map +1 -1
- package/package.json +5 -5
- 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 +4 -0
- package/state/facades/cart/cart.facade.d.ts +2 -0
- package/state/models/stateful-cart-item.d.ts +5 -0
- package/state/selectors/cart-item-entities/cart-item-entities.selectors.d.ts +5 -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 +1 -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
|
}
|
|
@@ -1950,6 +1965,7 @@
|
|
|
1950
1965
|
var amount = _a.amount;
|
|
1951
1966
|
return core.daffAdd(acc, amount);
|
|
1952
1967
|
}, 0)) || 0; }); }).memoized;
|
|
1968
|
+
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
1969
|
return {
|
|
1954
1970
|
selectCartItemEntitiesState: selectCartItemEntitiesState,
|
|
1955
1971
|
selectCartItemIds: selectCartItemIds,
|
|
@@ -1968,6 +1984,7 @@
|
|
|
1968
1984
|
selectCartItemQuantity: selectCartItemQuantity,
|
|
1969
1985
|
selectCartItemDiscounts: selectCartItemDiscounts,
|
|
1970
1986
|
selectCartItemTotalDiscount: selectCartItemTotalDiscount,
|
|
1987
|
+
selectCartItemErrors: selectCartItemErrors,
|
|
1971
1988
|
};
|
|
1972
1989
|
};
|
|
1973
1990
|
var ɵ0$2 = createCartItemEntitiesSelectors;
|
|
@@ -2535,6 +2552,9 @@
|
|
|
2535
2552
|
var id = _a.id;
|
|
2536
2553
|
return _this.driver.get(id);
|
|
2537
2554
|
}), operators.map(function (resp) { return new DaffResolveCartSuccess(resp); }), operators.catchError(function (innerError) { return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartNotFoundOrCreatedResolutionError(innerError.message)))); }));
|
|
2555
|
+
// I wish there was a better way to check this
|
|
2556
|
+
case error instanceof core.DaffInheritableError || !!error.code:
|
|
2557
|
+
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(error)));
|
|
2538
2558
|
default:
|
|
2539
2559
|
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartResolutionError(error.message))));
|
|
2540
2560
|
}
|
|
@@ -2759,7 +2779,7 @@
|
|
|
2759
2779
|
var _this = this;
|
|
2760
2780
|
this.store = store;
|
|
2761
2781
|
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;
|
|
2782
|
+
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, selectCartItemErrors = _a.selectCartItemErrors;
|
|
2763
2783
|
this._selectCartItemConfiguredAttributes = selectCartItemConfiguredAttributes;
|
|
2764
2784
|
this._selectCartItemCompositeOptions = selectCartItemCompositeOptions;
|
|
2765
2785
|
this._selectIsCartItemOutOfStock = selectIsCartItemOutOfStock;
|
|
@@ -2769,6 +2789,7 @@
|
|
|
2769
2789
|
this._selectCartItemRowTotal = selectCartItemRowTotal;
|
|
2770
2790
|
this._selectCartItemDiscounts = selectCartItemDiscounts;
|
|
2771
2791
|
this._selectCartItemTotalDiscount = selectCartItemTotalDiscount;
|
|
2792
|
+
this._selectCartItemErrors = selectCartItemErrors;
|
|
2772
2793
|
this.cart$ = this.store.pipe(i1.select(selectCartValue));
|
|
2773
2794
|
this.resolved$ = this.store.pipe(i1.select(selectCartResolved));
|
|
2774
2795
|
this.loadingObject$ = this.store.pipe(i1.select(selectCartLoadingObject));
|
|
@@ -2879,6 +2900,10 @@
|
|
|
2879
2900
|
DaffCartFacade.prototype.getCartItemTotalDiscount = function (itemId) {
|
|
2880
2901
|
return this.store.pipe(i1.select(this._selectCartItemTotalDiscount(itemId)));
|
|
2881
2902
|
};
|
|
2903
|
+
DaffCartFacade.prototype.getCartItemErrors = function (itemId) {
|
|
2904
|
+
return this.store.pipe(i1.select(this._selectCartItemErrors(itemId)));
|
|
2905
|
+
};
|
|
2906
|
+
;
|
|
2882
2907
|
DaffCartFacade.prototype.dispatch = function (action) {
|
|
2883
2908
|
this.store.dispatch(action);
|
|
2884
2909
|
};
|
|
@@ -2920,6 +2945,7 @@
|
|
|
2920
2945
|
exports.DaffCartCouponApply = DaffCartCouponApply;
|
|
2921
2946
|
exports.DaffCartCouponApplyFailure = DaffCartCouponApplyFailure;
|
|
2922
2947
|
exports.DaffCartCouponApplySuccess = DaffCartCouponApplySuccess;
|
|
2948
|
+
exports.DaffCartCouponClearErrors = DaffCartCouponClearErrors;
|
|
2923
2949
|
exports.DaffCartCouponList = DaffCartCouponList;
|
|
2924
2950
|
exports.DaffCartCouponListFailure = DaffCartCouponListFailure;
|
|
2925
2951
|
exports.DaffCartCouponListSuccess = DaffCartCouponListSuccess;
|