@ikas/storefront 0.1.24-alpha.4 → 0.1.24-alpha.5

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.css CHANGED
@@ -589,9 +589,13 @@
589
589
  padding-bottom: 0; }
590
590
  .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_LoginText__3FSC9 .style-module_LoginCta__2sZZF {
591
591
  display: none; } }
592
- @media only screen and (min-width: 1000px) {
593
- .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
594
- display: none; } }
592
+ .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
593
+ position: sticky;
594
+ top: 0;
595
+ z-index: 10; }
596
+ @media only screen and (min-width: 1000px) {
597
+ .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
598
+ display: none; } }
595
599
  .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {
596
600
  padding-bottom: 16px; }
597
601
  @media only screen and (max-width: 1000px) {
@@ -1085,7 +1089,8 @@
1085
1089
  transition: height .3s ease-in-out; }
1086
1090
  @media only screen and (max-width: 1000px) {
1087
1091
  .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {
1088
- padding: 0 24px; } }
1092
+ padding: 0 24px;
1093
+ box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2); } }
1089
1094
 
1090
1095
  .style-module_CartSummary__30RcF .style-module_Details__3-X_i {
1091
1096
  overflow: hidden; }
@@ -589,9 +589,13 @@
589
589
  padding-bottom: 0; }
590
590
  .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_LoginText__3FSC9 .style-module_LoginCta__2sZZF {
591
591
  display: none; } }
592
- @media only screen and (min-width: 1000px) {
593
- .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
594
- display: none; } }
592
+ .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
593
+ position: sticky;
594
+ top: 0;
595
+ z-index: 10; }
596
+ @media only screen and (min-width: 1000px) {
597
+ .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {
598
+ display: none; } }
595
599
  .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {
596
600
  padding-bottom: 16px; }
597
601
  @media only screen and (max-width: 1000px) {
@@ -1085,7 +1089,8 @@
1085
1089
  transition: height .3s ease-in-out; }
1086
1090
  @media only screen and (max-width: 1000px) {
1087
1091
  .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {
1088
- padding: 0 24px; } }
1092
+ padding: 0 24px;
1093
+ box-shadow: 1px 2px 5px 0px rgba(0, 0, 0, 0.2); } }
1089
1094
 
1090
1095
  .style-module_CartSummary__30RcF .style-module_Details__3-X_i {
1091
1096
  overflow: hidden; }
package/build/index.es.js CHANGED
@@ -23156,6 +23156,15 @@ var CheckoutViewModel = /** @class */ (function () {
23156
23156
  shallow: true,
23157
23157
  });
23158
23158
  }
23159
+ // Check if there are available shipping methods for the shipping address
23160
+ if (this.step === CheckoutStep.SHIPPING &&
23161
+ !this.checkout.availableShippingMethods.length) {
23162
+ this.error = {
23163
+ type: ErrorType.NO_SHIPPING_ERROR,
23164
+ };
23165
+ this.isCheckoutLoaded = true;
23166
+ return [2 /*return*/];
23167
+ }
23159
23168
  if (!(this.step === CheckoutStep.PAYMENT ||
23160
23169
  this.step === CheckoutStep.SUCCESS)) return [3 /*break*/, 4];
23161
23170
  return [4 /*yield*/, this.listPaymentGateways()];
@@ -70319,13 +70328,18 @@ var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"styl
70319
70328
  var StepContainer = observer(function (_a) {
70320
70329
  var steps = _a.steps, stepContent = _a.stepContent;
70321
70330
  useEffect(function () {
70322
- var _a;
70331
+ var _a, _b;
70323
70332
  var width = document.body.getBoundingClientRect().width;
70324
70333
  if (width < 768) {
70325
70334
  var selectedStepIndex = steps.findIndex(function (s) { return s.isSelected; });
70326
70335
  if (selectedStepIndex === 0)
70327
70336
  return;
70328
- (_a = document.getElementById("step-" + selectedStepIndex)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
70337
+ if (selectedStepIndex === 2) {
70338
+ (_a = document.getElementById("step-" + 1)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
70339
+ }
70340
+ else {
70341
+ (_b = document.getElementById("step-" + selectedStepIndex)) === null || _b === void 0 ? void 0 : _b.scrollIntoView();
70342
+ }
70329
70343
  }
70330
70344
  }, []);
70331
70345
  return (createElement("div", { className: styles$k.StepContainer }, steps.map(function (step, index) { return (createElement("div", { className: styles$k.Step },
package/build/index.js CHANGED
@@ -23163,6 +23163,15 @@ var CheckoutViewModel = /** @class */ (function () {
23163
23163
  shallow: true,
23164
23164
  });
23165
23165
  }
23166
+ // Check if there are available shipping methods for the shipping address
23167
+ if (this.step === CheckoutStep.SHIPPING &&
23168
+ !this.checkout.availableShippingMethods.length) {
23169
+ this.error = {
23170
+ type: ErrorType.NO_SHIPPING_ERROR,
23171
+ };
23172
+ this.isCheckoutLoaded = true;
23173
+ return [2 /*return*/];
23174
+ }
23166
23175
  if (!(this.step === CheckoutStep.PAYMENT ||
23167
23176
  this.step === CheckoutStep.SUCCESS)) return [3 /*break*/, 4];
23168
23177
  return [4 /*yield*/, this.listPaymentGateways()];
@@ -70298,13 +70307,18 @@ var styles$k = {"StepContainer":"style-module_StepContainer__1O2dD","Step":"styl
70298
70307
  var StepContainer = mobxReactLite.observer(function (_a) {
70299
70308
  var steps = _a.steps, stepContent = _a.stepContent;
70300
70309
  React.useEffect(function () {
70301
- var _a;
70310
+ var _a, _b;
70302
70311
  var width = document.body.getBoundingClientRect().width;
70303
70312
  if (width < 768) {
70304
70313
  var selectedStepIndex = steps.findIndex(function (s) { return s.isSelected; });
70305
70314
  if (selectedStepIndex === 0)
70306
70315
  return;
70307
- (_a = document.getElementById("step-" + selectedStepIndex)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
70316
+ if (selectedStepIndex === 2) {
70317
+ (_a = document.getElementById("step-" + 1)) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
70318
+ }
70319
+ else {
70320
+ (_b = document.getElementById("step-" + selectedStepIndex)) === null || _b === void 0 ? void 0 : _b.scrollIntoView();
70321
+ }
70308
70322
  }
70309
70323
  }, []);
70310
70324
  return (React.createElement("div", { className: styles$k.StepContainer }, steps.map(function (step, index) { return (React.createElement("div", { className: styles$k.Step },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.1.24-alpha.4",
3
+ "version": "0.1.24-alpha.5",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",