@ikas/storefront 0.1.23-alpha.1 → 0.1.23

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.
@@ -69,6 +69,7 @@ export default class CheckoutViewModel {
69
69
  createBillingAddress: () => void;
70
70
  onShippingMethodChange: (shippingMethod: IkasAvailableShippingMethod) => Promise<void>;
71
71
  onCouponCodeApply: () => Promise<void>;
72
+ onCouponCodeDelete: () => Promise<void>;
72
73
  onSelectedShippingAddressIdChange: (value: string) => void;
73
74
  onSelectedBillingAddressIdChange: (value: string) => void;
74
75
  onTermsAndConditionsCheckedChange: (value: boolean) => void;
package/build/index.es.js CHANGED
@@ -23480,6 +23480,28 @@ var CheckoutViewModel = /** @class */ (function () {
23480
23480
  }
23481
23481
  });
23482
23482
  }); };
23483
+ this.onCouponCodeDelete = function () { return __awaiter(_this, void 0, void 0, function () {
23484
+ var newCheckout;
23485
+ return __generator(this, function (_b) {
23486
+ switch (_b.label) {
23487
+ case 0:
23488
+ _b.trys.push([0, 3, , 4]);
23489
+ return [4 /*yield*/, this.saveCheckout()];
23490
+ case 1:
23491
+ _b.sent();
23492
+ return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(this.checkout.id)];
23493
+ case 2:
23494
+ newCheckout = _b.sent();
23495
+ if (newCheckout)
23496
+ this.checkout = newCheckout;
23497
+ return [3 /*break*/, 4];
23498
+ case 3:
23499
+ _b.sent();
23500
+ return [3 /*break*/, 4];
23501
+ case 4: return [2 /*return*/];
23502
+ }
23503
+ });
23504
+ }); };
23483
23505
  this.onSelectedShippingAddressIdChange = function (value) {
23484
23506
  var _a;
23485
23507
  _this.selectedShippingAddressId = value;
@@ -69609,7 +69631,7 @@ var Coupon = observer(function (_a) {
69609
69631
  case 0:
69610
69632
  vm.checkout.couponCode = null;
69611
69633
  setLoadingCoupon(true);
69612
- return [4 /*yield*/, vm.saveCheckout()];
69634
+ return [4 /*yield*/, vm.onCouponCodeDelete()];
69613
69635
  case 1:
69614
69636
  _a.sent();
69615
69637
  setLoadingCoupon(false);
package/build/index.js CHANGED
@@ -23487,6 +23487,28 @@ var CheckoutViewModel = /** @class */ (function () {
23487
23487
  }
23488
23488
  });
23489
23489
  }); };
23490
+ this.onCouponCodeDelete = function () { return __awaiter(_this, void 0, void 0, function () {
23491
+ var newCheckout;
23492
+ return __generator(this, function (_b) {
23493
+ switch (_b.label) {
23494
+ case 0:
23495
+ _b.trys.push([0, 3, , 4]);
23496
+ return [4 /*yield*/, this.saveCheckout()];
23497
+ case 1:
23498
+ _b.sent();
23499
+ return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(this.checkout.id)];
23500
+ case 2:
23501
+ newCheckout = _b.sent();
23502
+ if (newCheckout)
23503
+ this.checkout = newCheckout;
23504
+ return [3 /*break*/, 4];
23505
+ case 3:
23506
+ _b.sent();
23507
+ return [3 /*break*/, 4];
23508
+ case 4: return [2 /*return*/];
23509
+ }
23510
+ });
23511
+ }); };
23490
23512
  this.onSelectedShippingAddressIdChange = function (value) {
23491
23513
  var _a;
23492
23514
  _this.selectedShippingAddressId = value;
@@ -69588,7 +69610,7 @@ var Coupon = mobxReactLite.observer(function (_a) {
69588
69610
  case 0:
69589
69611
  vm.checkout.couponCode = null;
69590
69612
  setLoadingCoupon(true);
69591
- return [4 /*yield*/, vm.saveCheckout()];
69613
+ return [4 /*yield*/, vm.onCouponCodeDelete()];
69592
69614
  case 1:
69593
69615
  _a.sent();
69594
69616
  setLoadingCoupon(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.1.23-alpha.1",
3
+ "version": "0.1.23",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",