@daffodil/cart 0.39.7 → 0.39.11
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 +12 -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 +13 -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 +27 -8
- 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/testing/daffodil-cart-driver-magento-testing.metadata.json +1 -1
- package/driver/magento/testing/factories/public_api.d.ts +10 -10
- 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/testing/factories/public_api.js +11 -11
- 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/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 +10 -2
- package/esm2015/state/models/stateful-cart-item.js +1 -1
- package/esm2015/state/reducers/cart/cart.reducer.js +1 -2
- 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 +7 -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 +2 -2
- 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 +15 -0
- package/fesm2015/daffodil-cart-state-testing.js.map +1 -1
- package/fesm2015/daffodil-cart-state.js +28 -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/daffodil-cart-state.metadata.json +1 -1
- package/state/facades/cart/cart-facade.interface.d.ts +19 -0
- package/state/facades/cart/cart.facade.d.ts +5 -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 +4 -0
|
@@ -1091,12 +1091,13 @@
|
|
|
1091
1091
|
*/
|
|
1092
1092
|
function daffCartItemEntitiesReducer(state, action) {
|
|
1093
1093
|
if (state === void 0) { state = daffCartItemEntitiesAdapter().getInitialState(); }
|
|
1094
|
+
var _a, _b;
|
|
1094
1095
|
var adapter = daffCartItemEntitiesAdapter();
|
|
1095
1096
|
switch (action.type) {
|
|
1096
1097
|
case exports.DaffCartItemActionTypes.CartItemListSuccessAction:
|
|
1097
|
-
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);
|
|
1098
1099
|
case exports.DaffCartItemActionTypes.CartItemLoadSuccessAction:
|
|
1099
|
-
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);
|
|
1100
1101
|
case exports.DaffCartItemActionTypes.CartItemAddSuccessAction:
|
|
1101
1102
|
return adapter.setAll(updateAddedCartItemState(state.entities, action.payload.items), state);
|
|
1102
1103
|
case exports.DaffCartItemActionTypes.CartItemUpdateSuccessAction:
|
|
@@ -1104,7 +1105,7 @@
|
|
|
1104
1105
|
case exports.DaffCartItemActionTypes.CartItemDeleteFailureAction:
|
|
1105
1106
|
case exports.DaffCartItemActionTypes.CartItemLoadFailureAction:
|
|
1106
1107
|
case exports.DaffCartItemActionTypes.CartItemUpdateFailureAction:
|
|
1107
|
-
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);
|
|
1108
1109
|
case exports.DaffCartItemActionTypes.CartItemDeleteSuccessAction:
|
|
1109
1110
|
case exports.DaffCartActionTypes.CartLoadSuccessAction:
|
|
1110
1111
|
case exports.DaffCartActionTypes.ResolveCartSuccessAction:
|
|
@@ -1129,16 +1130,16 @@
|
|
|
1129
1130
|
var oldItem = oldCartItems[newItem.id];
|
|
1130
1131
|
switch (true) {
|
|
1131
1132
|
case !oldItem:
|
|
1132
|
-
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.New });
|
|
1133
|
+
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.New, errors: [] });
|
|
1133
1134
|
case (oldItem === null || oldItem === void 0 ? void 0 : oldItem.qty) !== newItem.qty:
|
|
1134
|
-
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.Updated });
|
|
1135
|
+
return Object.assign(Object.assign({}, newItem), { daffState: exports.DaffCartItemStateEnum.Updated, errors: [] });
|
|
1135
1136
|
default:
|
|
1136
1137
|
return newItem;
|
|
1137
1138
|
}
|
|
1138
1139
|
});
|
|
1139
1140
|
}
|
|
1140
1141
|
function updateMutatedCartItemState(responseItems, stateItems, itemId) {
|
|
1141
|
-
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 }); });
|
|
1142
1143
|
}
|
|
1143
1144
|
|
|
1144
1145
|
/*! *****************************************************************************
|
|
@@ -1652,6 +1653,8 @@
|
|
|
1652
1653
|
case exports.DaffCartItemActionTypes.CartItemAddFailureAction:
|
|
1653
1654
|
case exports.DaffCartItemActionTypes.CartItemDeleteFailureAction:
|
|
1654
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 */));
|
|
1655
1658
|
default:
|
|
1656
1659
|
return state;
|
|
1657
1660
|
}
|
|
@@ -1816,7 +1819,6 @@
|
|
|
1816
1819
|
case exports.DaffCartActionTypes.CartLoadSuccessAction:
|
|
1817
1820
|
case exports.DaffCartActionTypes.CartClearSuccessAction:
|
|
1818
1821
|
case exports.DaffCartActionTypes.AddToCartSuccessAction:
|
|
1819
|
-
case exports.DaffCartActionTypes.CartCreateSuccessAction:
|
|
1820
1822
|
case exports.DaffCartActionTypes.ResolveCartSuccessAction:
|
|
1821
1823
|
return Object.assign(Object.assign(Object.assign(Object.assign({}, state), resetErrors$8(state.errors)), { cart: Object.assign(Object.assign({}, state.cart), action.payload) }), setLoading$8(state.loading, "Stable" /* Complete */));
|
|
1822
1824
|
case exports.DaffCartActionTypes.CartCreateSuccessAction:
|
|
@@ -1952,6 +1954,8 @@
|
|
|
1952
1954
|
return cartItem.options;
|
|
1953
1955
|
}); }).memoized;
|
|
1954
1956
|
var selectIsCartItemOutOfStock = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return cartItem ? !cartItem.in_stock : null; }); }).memoized;
|
|
1957
|
+
var selectOutOfStockCartItems = i1.createSelector(selectAllCartItems, function (items) { return items.filter(function (item) { return !item.in_stock; }); });
|
|
1958
|
+
var selectInStockCartItems = i1.createSelector(selectAllCartItems, function (items) { return items.filter(function (item) { return item.in_stock; }); });
|
|
1955
1959
|
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); });
|
|
1956
1960
|
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;
|
|
1957
1961
|
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;
|
|
@@ -1962,6 +1966,7 @@
|
|
|
1962
1966
|
var amount = _a.amount;
|
|
1963
1967
|
return core.daffAdd(acc, amount);
|
|
1964
1968
|
}, 0)) || 0; }); }).memoized;
|
|
1969
|
+
var selectCartItemErrors = i1.defaultMemoize(function (itemId) { return i1.createSelector(selectCartItem(itemId), function (cartItem) { return (cartItem === null || cartItem === void 0 ? void 0 : cartItem.errors) || []; }); }).memoized;
|
|
1965
1970
|
return {
|
|
1966
1971
|
selectCartItemEntitiesState: selectCartItemEntitiesState,
|
|
1967
1972
|
selectCartItemIds: selectCartItemIds,
|
|
@@ -1973,6 +1978,8 @@
|
|
|
1973
1978
|
selectCartItemConfiguredAttributes: selectCartItemConfiguredAttributes,
|
|
1974
1979
|
selectCartItemCompositeOptions: selectCartItemCompositeOptions,
|
|
1975
1980
|
selectIsCartItemOutOfStock: selectIsCartItemOutOfStock,
|
|
1981
|
+
selectInStockCartItems: selectInStockCartItems,
|
|
1982
|
+
selectOutOfStockCartItems: selectOutOfStockCartItems,
|
|
1976
1983
|
selectCartItemMutating: selectCartItemMutating,
|
|
1977
1984
|
selectCartItemState: selectCartItemState,
|
|
1978
1985
|
selectCartItemPrice: selectCartItemPrice,
|
|
@@ -1980,6 +1987,7 @@
|
|
|
1980
1987
|
selectCartItemQuantity: selectCartItemQuantity,
|
|
1981
1988
|
selectCartItemDiscounts: selectCartItemDiscounts,
|
|
1982
1989
|
selectCartItemTotalDiscount: selectCartItemTotalDiscount,
|
|
1990
|
+
selectCartItemErrors: selectCartItemErrors,
|
|
1983
1991
|
};
|
|
1984
1992
|
};
|
|
1985
1993
|
var ɵ0$2 = createCartItemEntitiesSelectors;
|
|
@@ -2547,6 +2555,9 @@
|
|
|
2547
2555
|
var id = _a.id;
|
|
2548
2556
|
return _this.driver.get(id);
|
|
2549
2557
|
}), operators.map(function (resp) { return new DaffResolveCartSuccess(resp); }), operators.catchError(function (innerError) { return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartNotFoundOrCreatedResolutionError(innerError.message)))); }));
|
|
2558
|
+
// I wish there was a better way to check this
|
|
2559
|
+
case error instanceof core.DaffInheritableError || !!error.code:
|
|
2560
|
+
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(error)));
|
|
2550
2561
|
default:
|
|
2551
2562
|
return rxjs.of(new DaffResolveCartFailure(_this.errorMatcher(new i2.DaffCartResolutionError(error.message))));
|
|
2552
2563
|
}
|
|
@@ -2771,7 +2782,7 @@
|
|
|
2771
2782
|
var _this = this;
|
|
2772
2783
|
this.store = store;
|
|
2773
2784
|
this.paymentMethodMap = paymentMethodMap;
|
|
2774
|
-
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;
|
|
2785
|
+
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, selectAllCartItems = _a.selectAllCartItems, 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;
|
|
2775
2786
|
this._selectCartItemConfiguredAttributes = selectCartItemConfiguredAttributes;
|
|
2776
2787
|
this._selectCartItemCompositeOptions = selectCartItemCompositeOptions;
|
|
2777
2788
|
this._selectIsCartItemOutOfStock = selectIsCartItemOutOfStock;
|
|
@@ -2781,6 +2792,7 @@
|
|
|
2781
2792
|
this._selectCartItemRowTotal = selectCartItemRowTotal;
|
|
2782
2793
|
this._selectCartItemDiscounts = selectCartItemDiscounts;
|
|
2783
2794
|
this._selectCartItemTotalDiscount = selectCartItemTotalDiscount;
|
|
2795
|
+
this._selectCartItemErrors = selectCartItemErrors;
|
|
2784
2796
|
this.cart$ = this.store.pipe(i1.select(selectCartValue));
|
|
2785
2797
|
this.resolved$ = this.store.pipe(i1.select(selectCartResolved));
|
|
2786
2798
|
this.loadingObject$ = this.store.pipe(i1.select(selectCartLoadingObject));
|
|
@@ -2835,8 +2847,11 @@
|
|
|
2835
2847
|
this.shippingTotal$ = this.store.pipe(i1.select(selectCartShippingTotal));
|
|
2836
2848
|
this.coupons$ = this.store.pipe(i1.select(selectCartCoupons));
|
|
2837
2849
|
this.items$ = this.store.pipe(i1.select(selectCartItems));
|
|
2850
|
+
this.itemEntities$ = this.store.pipe(i1.select(selectAllCartItems));
|
|
2838
2851
|
this.totalItems$ = this.store.pipe(i1.select(selectTotalNumberOfCartItems));
|
|
2839
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));
|
|
2840
2855
|
this.itemDictionary$ = this.store.pipe(i1.select(selectCartItemEntities));
|
|
2841
2856
|
this.billingAddress$ = this.store.pipe(i1.select(selectCartBillingAddress));
|
|
2842
2857
|
this.shippingAddress$ = this.store.pipe(i1.select(selectCartShippingAddress));
|
|
@@ -2891,6 +2906,10 @@
|
|
|
2891
2906
|
DaffCartFacade.prototype.getCartItemTotalDiscount = function (itemId) {
|
|
2892
2907
|
return this.store.pipe(i1.select(this._selectCartItemTotalDiscount(itemId)));
|
|
2893
2908
|
};
|
|
2909
|
+
DaffCartFacade.prototype.getCartItemErrors = function (itemId) {
|
|
2910
|
+
return this.store.pipe(i1.select(this._selectCartItemErrors(itemId)));
|
|
2911
|
+
};
|
|
2912
|
+
;
|
|
2894
2913
|
DaffCartFacade.prototype.dispatch = function (action) {
|
|
2895
2914
|
this.store.dispatch(action);
|
|
2896
2915
|
};
|