@ikas/storefront 0.0.163-alpha.8 → 0.0.163-alpha.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/build/index.es.js CHANGED
@@ -17536,11 +17536,21 @@ var IkasCheckout = /** @class */ (function () {
17536
17536
  });
17537
17537
  Object.defineProperty(IkasCheckout.prototype, "totalTax", {
17538
17538
  get: function () {
17539
- var _a, _b, _c;
17540
- var cartTotalTax = ((_a = this.cart) === null || _a === void 0 ? void 0 : _a.items.reduce(function (total, current) { return total + current.tax; }, 0)) || 0;
17541
- var shippingTotalTax = ((_b = this.shippingLines) === null || _b === void 0 ? void 0 : _b.reduce(function (total, current) { return total + (current.taxValue || 0); }, 0)) || 0;
17542
- var giftTotalTax = ((_c = this.giftPackageLines) === null || _c === void 0 ? void 0 : _c.reduce(function (total, current) { return total + (current.taxValue || 0); }, 0)) || 0;
17543
- return cartTotalTax + shippingTotalTax + giftTotalTax;
17539
+ var _a;
17540
+ return (_a = this.cart) === null || _a === void 0 ? void 0 : _a.totalTax;
17541
+ // const cartTotalTax =
17542
+ // this.cart?.items.reduce((total, current) => total + current.tax, 0) || 0;
17543
+ // const shippingTotalTax =
17544
+ // this.shippingLines?.reduce(
17545
+ // (total, current) => total + (current.taxValue || 0),
17546
+ // 0
17547
+ // ) || 0;
17548
+ // const giftTotalTax =
17549
+ // this.giftPackageLines?.reduce(
17550
+ // (total, current) => total + (current.taxValue || 0),
17551
+ // 0
17552
+ // ) || 0;
17553
+ // return cartTotalTax;
17544
17554
  },
17545
17555
  enumerable: false,
17546
17556
  configurable: true
package/build/index.js CHANGED
@@ -17552,11 +17552,21 @@ var IkasCheckout = /** @class */ (function () {
17552
17552
  });
17553
17553
  Object.defineProperty(IkasCheckout.prototype, "totalTax", {
17554
17554
  get: function () {
17555
- var _a, _b, _c;
17556
- var cartTotalTax = ((_a = this.cart) === null || _a === void 0 ? void 0 : _a.items.reduce(function (total, current) { return total + current.tax; }, 0)) || 0;
17557
- var shippingTotalTax = ((_b = this.shippingLines) === null || _b === void 0 ? void 0 : _b.reduce(function (total, current) { return total + (current.taxValue || 0); }, 0)) || 0;
17558
- var giftTotalTax = ((_c = this.giftPackageLines) === null || _c === void 0 ? void 0 : _c.reduce(function (total, current) { return total + (current.taxValue || 0); }, 0)) || 0;
17559
- return cartTotalTax + shippingTotalTax + giftTotalTax;
17555
+ var _a;
17556
+ return (_a = this.cart) === null || _a === void 0 ? void 0 : _a.totalTax;
17557
+ // const cartTotalTax =
17558
+ // this.cart?.items.reduce((total, current) => total + current.tax, 0) || 0;
17559
+ // const shippingTotalTax =
17560
+ // this.shippingLines?.reduce(
17561
+ // (total, current) => total + (current.taxValue || 0),
17562
+ // 0
17563
+ // ) || 0;
17564
+ // const giftTotalTax =
17565
+ // this.giftPackageLines?.reduce(
17566
+ // (total, current) => total + (current.taxValue || 0),
17567
+ // 0
17568
+ // ) || 0;
17569
+ // return cartTotalTax;
17560
17570
  },
17561
17571
  enumerable: false,
17562
17572
  configurable: true
@@ -35,7 +35,7 @@ export declare class IkasCheckout {
35
35
  selectedPaymentGateway?: IkasPaymentGateway | null;
36
36
  constructor(data?: Partial<IkasCheckout>);
37
37
  get isComplete(): boolean;
38
- get totalTax(): number;
38
+ get totalTax(): number | undefined;
39
39
  get shippingTotal(): number;
40
40
  get hasCustomer(): boolean;
41
41
  get hasValidCustomer(): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.163-alpha.8",
3
+ "version": "0.0.163-alpha.9",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",