@ikas/storefront 0.0.165-alpha.4 → 0.0.165-alpha.6

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
@@ -22885,6 +22885,14 @@ var CheckoutViewModel = /** @class */ (function () {
22885
22885
  this.checkShippingCountries();
22886
22886
  _b.label = 2;
22887
22887
  case 2:
22888
+ // Skip shipping if there is only 1 shipping method
22889
+ if (this.step === CheckoutStep.SHIPPING &&
22890
+ this.checkout.availableShippingMethods.length === 1) {
22891
+ this.step = CheckoutStep.PAYMENT;
22892
+ this.router.replace("/checkout/" + this.checkout.id + "?step=" + this.step, undefined, {
22893
+ shallow: true,
22894
+ });
22895
+ }
22888
22896
  if (!(this.step === CheckoutStep.PAYMENT ||
22889
22897
  this.step === CheckoutStep.SUCCESS)) return [3 /*break*/, 4];
22890
22898
  return [4 /*yield*/, this.listPaymentGateways()];
@@ -61733,7 +61741,7 @@ var Steps = observer(function (_a) {
61733
61741
  createElement(StepSummaryAddress, { vm: vm }))) : undefined),
61734
61742
  new Step(t("checkout-page:shipping"), vm.step === CheckoutStep.SHIPPING, vm.step === CheckoutStep.PAYMENT, vm.step === CheckoutStep.PAYMENT ? (createElement("div", { className: styles$5.AdressStepInfo },
61735
61743
  createElement(StepSummaryShipping, { vm: vm }),
61736
- createElement("div", { className: styles$5.EditBtn, onClick: vm.onBackToShippingClick }, t("checkout-page:actions.edit")))) : undefined, vm.step === CheckoutStep.PAYMENT ? (createElement("div", { className: styles$5.AddressStepInfoMobile },
61744
+ vm.checkout.availableShippingMethods.length > 1 && (createElement("div", { className: styles$5.EditBtn, onClick: vm.onBackToShippingClick }, t("checkout-page:actions.edit"))))) : undefined, vm.step === CheckoutStep.PAYMENT ? (createElement("div", { className: styles$5.AddressStepInfoMobile },
61737
61745
  createElement(StepSummaryShipping, { vm: vm }))) : undefined),
61738
61746
  new Step(t("checkout-page:payment"), vm.step === CheckoutStep.PAYMENT, false),
61739
61747
  ];
package/build/index.js CHANGED
@@ -22894,6 +22894,14 @@ var CheckoutViewModel = /** @class */ (function () {
22894
22894
  this.checkShippingCountries();
22895
22895
  _b.label = 2;
22896
22896
  case 2:
22897
+ // Skip shipping if there is only 1 shipping method
22898
+ if (this.step === CheckoutStep.SHIPPING &&
22899
+ this.checkout.availableShippingMethods.length === 1) {
22900
+ this.step = CheckoutStep.PAYMENT;
22901
+ this.router.replace("/checkout/" + this.checkout.id + "?step=" + this.step, undefined, {
22902
+ shallow: true,
22903
+ });
22904
+ }
22897
22905
  if (!(this.step === CheckoutStep.PAYMENT ||
22898
22906
  this.step === CheckoutStep.SUCCESS)) return [3 /*break*/, 4];
22899
22907
  return [4 /*yield*/, this.listPaymentGateways()];
@@ -61713,7 +61721,7 @@ var Steps = mobxReactLite.observer(function (_a) {
61713
61721
  React.createElement(StepSummaryAddress, { vm: vm }))) : undefined),
61714
61722
  new Step(t("checkout-page:shipping"), vm.step === CheckoutStep.SHIPPING, vm.step === CheckoutStep.PAYMENT, vm.step === CheckoutStep.PAYMENT ? (React.createElement("div", { className: styles$5.AdressStepInfo },
61715
61723
  React.createElement(StepSummaryShipping, { vm: vm }),
61716
- React.createElement("div", { className: styles$5.EditBtn, onClick: vm.onBackToShippingClick }, t("checkout-page:actions.edit")))) : undefined, vm.step === CheckoutStep.PAYMENT ? (React.createElement("div", { className: styles$5.AddressStepInfoMobile },
61724
+ vm.checkout.availableShippingMethods.length > 1 && (React.createElement("div", { className: styles$5.EditBtn, onClick: vm.onBackToShippingClick }, t("checkout-page:actions.edit"))))) : undefined, vm.step === CheckoutStep.PAYMENT ? (React.createElement("div", { className: styles$5.AddressStepInfoMobile },
61717
61725
  React.createElement(StepSummaryShipping, { vm: vm }))) : undefined),
61718
61726
  new Step(t("checkout-page:payment"), vm.step === CheckoutStep.PAYMENT, false),
61719
61727
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.165-alpha.4",
3
+ "version": "0.0.165-alpha.6",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",