@ikas/storefront 0.1.22-alpha.7 → 0.1.22-alpha.8

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/build/index.es.js CHANGED
@@ -69800,11 +69800,11 @@ var CartItem = observer(function (_a) {
69800
69800
  var _b, _c;
69801
69801
  var vm = _a.vm, currencyCode = _a.currencyCode, cartItem = _a.cartItem;
69802
69802
  var t = useTranslation().t;
69803
- var adjustments = (_b = vm.checkout.adjustments) === null || _b === void 0 ? void 0 : _b.filter(function (a) {
69804
- return a.appliedOrderLines &&
69805
- a.appliedOrderLines.some(function (aol) { return aol.orderLineId === cartItem.id; });
69803
+ var adjustmentAmounts = (_b = vm.checkout.adjustments) === null || _b === void 0 ? void 0 : _b.map(function (a) {
69804
+ var _a;
69805
+ return ((_a = a.appliedOrderLines) === null || _a === void 0 ? void 0 : _a.filter(function (aol) { return aol.orderLineId === cartItem.id; }).reduce(function (total, current) { return total + (current.amount || 0); }, 0)) || 0;
69806
69806
  });
69807
- var adjustmentTotal = (adjustments === null || adjustments === void 0 ? void 0 : adjustments.reduce(function (total, current) { return total + current.amount; }, 0)) || 0;
69807
+ var adjustmentTotal = adjustmentAmounts === null || adjustmentAmounts === void 0 ? void 0 : adjustmentAmounts.reduce(function (total, current) { return total + current; }, 0);
69808
69808
  return (createElement("div", { className: styles$e.CheckoutItem },
69809
69809
  createElement("div", { className: styles$e.ImageContainer },
69810
69810
  createElement("img", { className: styles$e.Image, src: (_c = cartItem.variant.mainImage) === null || _c === void 0 ? void 0 : _c.thumbnailSrc })),
package/build/index.js CHANGED
@@ -69779,11 +69779,11 @@ var CartItem = mobxReactLite.observer(function (_a) {
69779
69779
  var _b, _c;
69780
69780
  var vm = _a.vm, currencyCode = _a.currencyCode, cartItem = _a.cartItem;
69781
69781
  var t = useTranslation().t;
69782
- var adjustments = (_b = vm.checkout.adjustments) === null || _b === void 0 ? void 0 : _b.filter(function (a) {
69783
- return a.appliedOrderLines &&
69784
- a.appliedOrderLines.some(function (aol) { return aol.orderLineId === cartItem.id; });
69782
+ var adjustmentAmounts = (_b = vm.checkout.adjustments) === null || _b === void 0 ? void 0 : _b.map(function (a) {
69783
+ var _a;
69784
+ return ((_a = a.appliedOrderLines) === null || _a === void 0 ? void 0 : _a.filter(function (aol) { return aol.orderLineId === cartItem.id; }).reduce(function (total, current) { return total + (current.amount || 0); }, 0)) || 0;
69785
69785
  });
69786
- var adjustmentTotal = (adjustments === null || adjustments === void 0 ? void 0 : adjustments.reduce(function (total, current) { return total + current.amount; }, 0)) || 0;
69786
+ var adjustmentTotal = adjustmentAmounts === null || adjustmentAmounts === void 0 ? void 0 : adjustmentAmounts.reduce(function (total, current) { return total + current; }, 0);
69787
69787
  return (React.createElement("div", { className: styles$e.CheckoutItem },
69788
69788
  React.createElement("div", { className: styles$e.ImageContainer },
69789
69789
  React.createElement("img", { className: styles$e.Image, src: (_c = cartItem.variant.mainImage) === null || _c === void 0 ? void 0 : _c.thumbnailSrc })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.1.22-alpha.7",
3
+ "version": "0.1.22-alpha.8",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",