@ikas/storefront 0.0.164-alpha.1 → 0.0.164-alpha.3

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.
@@ -59,8 +59,8 @@ export default class CheckoutViewModel {
59
59
  get installmentExtraPrice(): number | undefined;
60
60
  get finalPrice(): number;
61
61
  get hasStockError(): boolean;
62
- get canProceedToShipping(): boolean;
63
- get canProceedToPayment(): boolean;
62
+ get canProceedToShipping(): boolean | undefined;
63
+ get canProceedToPayment(): boolean | undefined;
64
64
  get canPerformPayment(): boolean | undefined;
65
65
  saveCheckout: () => Promise<void>;
66
66
  checkStocks: () => Promise<void>;
package/build/index.es.js CHANGED
@@ -23718,10 +23718,10 @@ var CheckoutViewModel = /** @class */ (function () {
23718
23718
  Object.defineProperty(CheckoutViewModel.prototype, "canProceedToShipping", {
23719
23719
  // VALIDATIONS
23720
23720
  get: function () {
23721
- var _a;
23722
- return (this.checkout.shippingAddress.isValid &&
23721
+ var _a, _b;
23722
+ return (((_a = this.checkout.shippingAddress) === null || _a === void 0 ? void 0 : _a.isValid) &&
23723
23723
  this.checkout.hasValidCustomer &&
23724
- ((_a = this.error) === null || _a === void 0 ? void 0 : _a.type) !== ErrorType.NO_SHIPPING_ERROR);
23724
+ ((_b = this.error) === null || _b === void 0 ? void 0 : _b.type) !== ErrorType.NO_SHIPPING_ERROR);
23725
23725
  },
23726
23726
  enumerable: false,
23727
23727
  configurable: true
@@ -61018,7 +61018,7 @@ var SVGGift = function (_a) {
61018
61018
  createElement("rect", { width: "16", height: "16", fill: "white" })))));
61019
61019
  };
61020
61020
 
61021
- var css_248z$i = ".style-module_CartSummary__30RcF {\n overflow: hidden;\n width: 480px; }\n @media only screen and (max-width: 1280px) {\n .style-module_CartSummary__30RcF {\n width: 360px; } }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color); } }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom .3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all .3s;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px; } }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px; } }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px; } }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8); }\n .style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px; } }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex; } }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center; }\n";
61021
+ var css_248z$i = "@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color); } }\n\n.style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid var(--checkout-border-color); }\n\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom .3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all .3s;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n\n.style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px; } }\n\n.style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px; } }\n\n.style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color); }\n\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color); }\n\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px; } }\n\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8); }\n\n.style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px; }\n\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px; } }\n\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px; }\n\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex; } }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center; }\n";
61022
61022
  var styles$h = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Price":"style-module_Price__sosrJ","PriceText":"style-module_PriceText__1ePGb","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","ActionTextBtn":"style-module_ActionTextBtn__FXJQX","NoUnderline":"style-module_NoUnderline__34-1r","Light":"style-module_Light__WFzH8","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Label":"style-module_Label__3E7LF","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","TotalPrice":"style-module_TotalPrice__2s7DC","AppliedCoupon":"style-module_AppliedCoupon__37qv8","CouponCode":"style-module_CouponCode__3rgOu","ClearCoupon":"style-module_ClearCoupon__1Rx4A","NotificationContainer":"style-module_NotificationContainer__Zblek","CheckoutNoteContainer":"style-module_CheckoutNoteContainer__zQQjd","CheckoutNoteDisplay":"style-module_CheckoutNoteDisplay__kTFTx","Success":"style-module_Success__2vqWA","GiftLabel":"style-module_GiftLabel__2f-wC","PoweredBy":"style-module_PoweredBy__1hgWQ"};
61023
61023
  styleInject(css_248z$i);
61024
61024
 
@@ -62456,7 +62456,7 @@ var _slug_ = /*#__PURE__*/Object.freeze({
62456
62456
  });
62457
62457
 
62458
62458
  var CheckoutPage = function (_a) {
62459
- var checkoutId = _a.checkoutId, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "checkoutSettingsStr", "customizationProps", "configJson"]);
62459
+ var checkoutId = _a.checkoutId, editorCheckout = _a.editorCheckout, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "editorCheckout", "checkoutSettingsStr", "customizationProps", "configJson"]);
62460
62460
  var router = useRouter();
62461
62461
  var _b = useState(), checkout = _b[0], setCheckout = _b[1];
62462
62462
  IkasStorefrontConfig.initWithJson(configJson);
@@ -62484,7 +62484,10 @@ var CheckoutPage = function (_a) {
62484
62484
  }, [customizationProps]);
62485
62485
  useEffect(function () {
62486
62486
  store.checkLocalization();
62487
- getCheckout();
62487
+ if (!editorCheckout)
62488
+ getCheckout();
62489
+ else
62490
+ setCheckout(editorCheckout);
62488
62491
  }, []);
62489
62492
  var getCheckout = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
62490
62493
  var checkout;
package/build/index.js CHANGED
@@ -23726,10 +23726,10 @@ var CheckoutViewModel = /** @class */ (function () {
23726
23726
  Object.defineProperty(CheckoutViewModel.prototype, "canProceedToShipping", {
23727
23727
  // VALIDATIONS
23728
23728
  get: function () {
23729
- var _a;
23730
- return (this.checkout.shippingAddress.isValid &&
23729
+ var _a, _b;
23730
+ return (((_a = this.checkout.shippingAddress) === null || _a === void 0 ? void 0 : _a.isValid) &&
23731
23731
  this.checkout.hasValidCustomer &&
23732
- ((_a = this.error) === null || _a === void 0 ? void 0 : _a.type) !== ErrorType.NO_SHIPPING_ERROR);
23732
+ ((_b = this.error) === null || _b === void 0 ? void 0 : _b.type) !== ErrorType.NO_SHIPPING_ERROR);
23733
23733
  },
23734
23734
  enumerable: false,
23735
23735
  configurable: true
@@ -60997,7 +60997,7 @@ var SVGGift = function (_a) {
60997
60997
  React.createElement("rect", { width: "16", height: "16", fill: "white" })))));
60998
60998
  };
60999
60999
 
61000
- var css_248z$i = ".style-module_CartSummary__30RcF {\n overflow: hidden;\n width: 480px; }\n @media only screen and (max-width: 1280px) {\n .style-module_CartSummary__30RcF {\n width: 360px; } }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color); } }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom .3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all .3s;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px; } }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px; } }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px; } }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8); }\n .style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px; } }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex; } }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center; }\n";
61000
+ var css_248z$i = "@media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF {\n width: 100%;\n background-color: var(--checkout-card-bg-color); } }\n\n.style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid var(--checkout-border-color); }\n\n.style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 48px;\n padding: 0 24px;\n width: 100%;\n border-bottom: 1px solid var(--checkout-border-color);\n transition: border-bottom .3s;\n user-select: none;\n background-color: var(--checkout-primary-bg-color); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 600;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_PriceText__1ePGb {\n font-weight: 600;\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d {\n transition: all .3s;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n\n.style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n padding: 0 24px; } }\n\n.style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n padding-top: 24px; } }\n\n.style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: var(--checkout-border-color); }\n\n.style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX {\n color: var(--checkout-primary-text-color);\n user-select: none;\n cursor: pointer;\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX:hover {\n text-decoration: underline; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_NoUnderline__34-1r:hover {\n text-decoration: none; }\n .style-module_CartSummary__30RcF .style-module_ActionTextBtn__FXJQX.style-module_Light__WFzH8 {\n color: var(--checkout-secondary-text-color); }\n\n.style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 24px 0;\n border-bottom: 1px solid var(--checkout-border-color); }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: var(--checkout-secondary-text-color);\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ:last-of-type {\n margin-bottom: 0; }\n\n.style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 12px; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 20px;\n font-weight: 600; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 20px;\n font-weight: 600; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt {\n height: 64px;\n margin-top: 0px; } }\n\n.style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: flex;\n align-items: center;\n padding: 4px 4px 4px 8px;\n background-color: white;\n border-radius: 6px;\n margin-left: 12px;\n font-size: 14px;\n line-height: 20px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_CouponCode__3rgOu {\n font-size: 14px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A {\n cursor: pointer;\n display: flex;\n align-items: center;\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_ClearCoupon__1Rx4A svg {\n transform: scale(0.8); }\n\n.style-module_CartSummary__30RcF .style-module_NotificationContainer__Zblek {\n margin-bottom: 14px; }\n\n.style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 24px;\n width: calc(100% - 2px);\n margin-left: 1px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_Title__16M5E {\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n margin-bottom: 8px; }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd .style-module_CheckoutNoteDisplay__kTFTx {\n color: var(--checkout-secondary-text-color); }\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd.style-module_Success__2vqWA {\n margin-top: 0; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_CheckoutNoteContainer__zQQjd {\n margin-top: 0px; } }\n\n.style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC {\n display: flex;\n align-items: center; }\n .style-module_CartSummary__30RcF .style-module_GiftLabel__2f-wC span {\n margin-left: 8px; }\n\n.style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n width: 100%;\n height: 50px;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n display: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ {\n display: flex; } }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px; }\n .style-module_CartSummary__30RcF .style-module_PoweredBy__1hgWQ a {\n display: flex;\n align-items: center; }\n";
61001
61001
  var styles$h = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Price":"style-module_Price__sosrJ","PriceText":"style-module_PriceText__1ePGb","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","ActionTextBtn":"style-module_ActionTextBtn__FXJQX","NoUnderline":"style-module_NoUnderline__34-1r","Light":"style-module_Light__WFzH8","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Label":"style-module_Label__3E7LF","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","TotalPrice":"style-module_TotalPrice__2s7DC","AppliedCoupon":"style-module_AppliedCoupon__37qv8","CouponCode":"style-module_CouponCode__3rgOu","ClearCoupon":"style-module_ClearCoupon__1Rx4A","NotificationContainer":"style-module_NotificationContainer__Zblek","CheckoutNoteContainer":"style-module_CheckoutNoteContainer__zQQjd","CheckoutNoteDisplay":"style-module_CheckoutNoteDisplay__kTFTx","Success":"style-module_Success__2vqWA","GiftLabel":"style-module_GiftLabel__2f-wC","PoweredBy":"style-module_PoweredBy__1hgWQ"};
61002
61002
  styleInject(css_248z$i);
61003
61003
 
@@ -62435,7 +62435,7 @@ var _slug_ = /*#__PURE__*/Object.freeze({
62435
62435
  });
62436
62436
 
62437
62437
  var CheckoutPage = function (_a) {
62438
- var checkoutId = _a.checkoutId, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "checkoutSettingsStr", "customizationProps", "configJson"]);
62438
+ var checkoutId = _a.checkoutId, editorCheckout = _a.editorCheckout, checkoutSettingsStr = _a.checkoutSettingsStr, customizationProps = _a.customizationProps, configJson = _a.configJson, others = __rest(_a, ["checkoutId", "editorCheckout", "checkoutSettingsStr", "customizationProps", "configJson"]);
62439
62439
  var router$1 = router.useRouter();
62440
62440
  var _b = React.useState(), checkout = _b[0], setCheckout = _b[1];
62441
62441
  IkasStorefrontConfig.initWithJson(configJson);
@@ -62463,7 +62463,10 @@ var CheckoutPage = function (_a) {
62463
62463
  }, [customizationProps]);
62464
62464
  React.useEffect(function () {
62465
62465
  store.checkLocalization();
62466
- getCheckout();
62466
+ if (!editorCheckout)
62467
+ getCheckout();
62468
+ else
62469
+ setCheckout(editorCheckout);
62467
62470
  }, []);
62468
62471
  var getCheckout = React.useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
62469
62472
  var checkout;
@@ -3,8 +3,10 @@ import * as React from "react";
3
3
  import { GetServerSideProps } from "next";
4
4
  import { ParsedUrlQuery } from "querystring";
5
5
  import { IkasCheckoutCustomizationProps } from "../../components/checkout/index";
6
+ import { IkasCheckout } from "../../models/index";
6
7
  declare type Props = {
7
8
  checkoutId: string;
9
+ editorCheckout?: IkasCheckout;
8
10
  checkoutSettingsStr: string | null;
9
11
  customizationProps: IkasCheckoutCustomizationProps;
10
12
  returnPolicy: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.164-alpha.1",
3
+ "version": "0.0.164-alpha.3",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",