@ikas/storefront 0.0.139 → 0.0.140

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.
@@ -170,6 +170,7 @@ export interface getCheckoutById_getCheckoutById_adjustments {
170
170
  name: string;
171
171
  order: number;
172
172
  type: AdjustmentEnum;
173
+ couponId: string | null;
173
174
  }
174
175
  export interface getCheckoutById_getCheckoutById {
175
176
  __typename: "Checkout";
@@ -1,7 +1,10 @@
1
1
  import * as React from "react";
2
2
  declare type Props = {
3
- text: string;
3
+ text: string | React.ReactNode;
4
4
  isLoading?: boolean;
5
+ isDisabled?: boolean;
6
+ size?: "large" | "medium";
7
+ style?: React.CSSProperties;
5
8
  onClick: () => void;
6
9
  };
7
10
  export declare const Button: React.FC<Props>;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ declare type Props = {
3
+ className?: string;
4
+ };
5
+ declare const SVGCross: React.FC<Props>;
6
+ export default SVGCross;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ declare type Props = {
3
+ className?: string;
4
+ };
5
+ declare const SVGTag: React.FC<Props>;
6
+ export default SVGTag;
@@ -65,6 +65,7 @@ export default class CheckoutViewModel {
65
65
  onEmailChange: (value: string) => void;
66
66
  onShippingMethodChange: (shippingMethod: IkasAvailableShippingMethod) => Promise<void>;
67
67
  onCouponCodeChange: (value: string) => void;
68
+ onCouponCodeApply: () => Promise<void>;
68
69
  onSelectedShippingAddressIdChange: (value: string) => void;
69
70
  onSelectedBillingAddressIdChange: (value: string) => void;
70
71
  onTermsAndConditionsCheckedChange: (value: boolean) => void;
@@ -73,6 +74,7 @@ export default class CheckoutViewModel {
73
74
  onCardHolderNameChange: (value: string) => void;
74
75
  onExpirationDateChange: (value: string) => void;
75
76
  onCvcChange: (value: string) => void;
77
+ onGoToCartClick: () => void;
76
78
  onBackToShoppingClick: () => void;
77
79
  onProceedToShippingClick: () => Promise<void>;
78
80
  onProceedToPaymentClick: () => Promise<void>;
package/build/index.es.js CHANGED
@@ -11439,6 +11439,8 @@ var IkasCheckout = /** @class */ (function () {
11439
11439
  this.totalFinalPrice = null;
11440
11440
  this.adjustments = null;
11441
11441
  this.note = null;
11442
+ // Extra
11443
+ this.appliedCouponCode = null;
11442
11444
  this.id = data.id;
11443
11445
  this.createdAt = data.createdAt;
11444
11446
  this.updatedAt = data.updatedAt;
@@ -11453,14 +11455,15 @@ var IkasCheckout = /** @class */ (function () {
11453
11455
  this.customer = data.customer;
11454
11456
  this.billingAddress = data.billingAddress
11455
11457
  ? new IkasOrderAddress(data.billingAddress)
11456
- : undefined;
11458
+ : new IkasOrderAddress();
11457
11459
  this.shippingAddress = data.shippingAddress
11458
11460
  ? new IkasOrderAddress(data.shippingAddress)
11459
- : undefined;
11461
+ : new IkasOrderAddress();
11460
11462
  this.shippingLines = data.shippingLines || [];
11461
11463
  this.shippingMethod = data.shippingMethod || IkasShippingMethod.NO_SHIPMENT;
11462
11464
  this.status = data.status || IkasCheckoutStatus.OPEN;
11463
11465
  this.couponCode = data.couponCode;
11466
+ this.appliedCouponCode = data.couponCode;
11464
11467
  this.recoverEmailStatus = data.recoverEmailStatus;
11465
11468
  this.recoveryStatus = data.recoveryStatus;
11466
11469
  this.totalFinalPrice = data.totalFinalPrice;
@@ -16478,6 +16481,33 @@ var CheckoutViewModel = /** @class */ (function () {
16478
16481
  this.onCouponCodeChange = function (value) {
16479
16482
  _this.checkout.couponCode = value;
16480
16483
  };
16484
+ this.onCouponCodeApply = function () { return __awaiter(_this, void 0, void 0, function () {
16485
+ var newCheckout, oldCheckout;
16486
+ return __generator(this, function (_a) {
16487
+ switch (_a.label) {
16488
+ case 0:
16489
+ _a.trys.push([0, 3, , 4]);
16490
+ return [4 /*yield*/, this.saveCheckout()];
16491
+ case 1:
16492
+ _a.sent();
16493
+ return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(this.checkout.id)];
16494
+ case 2:
16495
+ newCheckout = _a.sent();
16496
+ if (newCheckout) {
16497
+ oldCheckout = this.checkout;
16498
+ this.checkout = newCheckout;
16499
+ this.checkout.customer = oldCheckout.customer;
16500
+ this.checkout.shippingAddress = oldCheckout.shippingAddress;
16501
+ this.checkout.billingAddress = oldCheckout.billingAddress;
16502
+ }
16503
+ return [3 /*break*/, 4];
16504
+ case 3:
16505
+ _a.sent();
16506
+ return [3 /*break*/, 4];
16507
+ case 4: return [2 /*return*/];
16508
+ }
16509
+ });
16510
+ }); };
16481
16511
  this.onSelectedShippingAddressIdChange = function (value) {
16482
16512
  var _a;
16483
16513
  _this.selectedShippingAddressId = value;
@@ -16567,11 +16597,14 @@ var CheckoutViewModel = /** @class */ (function () {
16567
16597
  _this.cardData.cvv = value;
16568
16598
  };
16569
16599
  // CREDIT CARD END
16600
+ this.onGoToCartClick = function () {
16601
+ _this.router.push("/cart");
16602
+ };
16570
16603
  this.onBackToShoppingClick = function () {
16571
16604
  _this.router.push("/");
16572
16605
  };
16573
16606
  this.onProceedToShippingClick = function () { return __awaiter(_this, void 0, void 0, function () {
16574
- var newAddress, customer, err_2;
16607
+ var newAddress, customer, err_3;
16575
16608
  return __generator(this, function (_a) {
16576
16609
  switch (_a.label) {
16577
16610
  case 0:
@@ -16601,12 +16634,12 @@ var CheckoutViewModel = /** @class */ (function () {
16601
16634
  this.changeStep(CheckoutStep.SHIPPING);
16602
16635
  return [3 /*break*/, 7];
16603
16636
  case 6:
16604
- err_2 = _a.sent();
16605
- if (err_2.type) {
16606
- this.error = err_2;
16637
+ err_3 = _a.sent();
16638
+ if (err_3.type) {
16639
+ this.error = err_3;
16607
16640
  }
16608
16641
  else {
16609
- console.log(err_2);
16642
+ console.log(err_3);
16610
16643
  this.error = {
16611
16644
  type: ErrorType.UNKNOWN,
16612
16645
  };
@@ -16618,7 +16651,7 @@ var CheckoutViewModel = /** @class */ (function () {
16618
16651
  });
16619
16652
  }); };
16620
16653
  this.onProceedToPaymentClick = function () { return __awaiter(_this, void 0, void 0, function () {
16621
- var err_3;
16654
+ var err_4;
16622
16655
  return __generator(this, function (_a) {
16623
16656
  switch (_a.label) {
16624
16657
  case 0:
@@ -16638,12 +16671,12 @@ var CheckoutViewModel = /** @class */ (function () {
16638
16671
  this.changeStep(CheckoutStep.PAYMENT);
16639
16672
  return [3 /*break*/, 4];
16640
16673
  case 3:
16641
- err_3 = _a.sent();
16642
- if (err_3.type) {
16643
- this.error = err_3;
16674
+ err_4 = _a.sent();
16675
+ if (err_4.type) {
16676
+ this.error = err_4;
16644
16677
  }
16645
16678
  else {
16646
- console.log(err_3);
16679
+ console.log(err_4);
16647
16680
  this.error = {
16648
16681
  type: ErrorType.UNKNOWN,
16649
16682
  };
@@ -16655,7 +16688,7 @@ var CheckoutViewModel = /** @class */ (function () {
16655
16688
  });
16656
16689
  }); };
16657
16690
  this.performPayment = function () { return __awaiter(_this, void 0, void 0, function () {
16658
- var response, transactionStatus, err_4;
16691
+ var response, transactionStatus, err_5;
16659
16692
  var _a;
16660
16693
  return __generator(this, function (_b) {
16661
16694
  switch (_b.label) {
@@ -16706,10 +16739,10 @@ var CheckoutViewModel = /** @class */ (function () {
16706
16739
  }
16707
16740
  return [3 /*break*/, 6];
16708
16741
  case 5:
16709
- err_4 = _b.sent();
16710
- if (err_4.type) {
16711
- console.log(err_4);
16712
- this.error = err_4;
16742
+ err_5 = _b.sent();
16743
+ if (err_5.type) {
16744
+ console.log(err_5);
16745
+ this.error = err_5;
16713
16746
  }
16714
16747
  else {
16715
16748
  this.error = {
@@ -26538,7 +26571,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26538
26571
  return __generator(this, function (_b) {
26539
26572
  switch (_b.label) {
26540
26573
  case 0:
26541
- QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "])));
26574
+ QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n }\n }\n "])));
26542
26575
  _b.label = 1;
26543
26576
  case 1:
26544
26577
  _b.trys.push([1, 3, , 4]);
@@ -28176,7 +28209,7 @@ var SVGCaretDown = function (_a) {
28176
28209
  };
28177
28210
 
28178
28211
  var FormItem = observer(function (props) {
28179
- var vm = useState(function () { return new FormItemViewModel(props); })[0];
28212
+ var _a = useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
28180
28213
  useEffect(function () {
28181
28214
  runInAction(function () {
28182
28215
  vm.type = props.type;
@@ -28209,7 +28242,7 @@ var FormItem = observer(function (props) {
28209
28242
  }, [props.errorText]);
28210
28243
  useEffect(function () {
28211
28244
  runInAction(function () {
28212
- vm.onChange = props.onChange;
28245
+ setVM(new FormItemViewModel(props));
28213
28246
  });
28214
28247
  }, [props.onChange]);
28215
28248
  return (createElement("div", { className: vm.formItemStyle },
@@ -28610,7 +28643,7 @@ var css_248z$2 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n di
28610
28643
  var commonStyles = {"FormSectionTitle":"common-module_FormSectionTitle___Mykh","Title":"common-module_Title__3JTHt","WithSubTitle":"common-module_WithSubTitle__1VHWv","SubTitle":"common-module_SubTitle__1H4kH","Grid":"common-module_Grid__2CuvH","Grid2":"common-module_Grid2__9CCag","Grid3":"common-module_Grid3__3p0jJ","FormContainer":"common-module_FormContainer__2I_Lj","mtFormRow":"common-module_mtFormRow__2tsDn","mt1":"common-module_mt1__3tpC1","mt2":"common-module_mt2__2bl5q","fadeInFromRight":"common-module_fadeInFromRight__3RYk5"};
28611
28644
  styleInject(css_248z$2);
28612
28645
 
28613
- var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28646
+ var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28614
28647
  var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
28615
28648
  styleInject(css_248z$3);
28616
28649
 
@@ -28651,16 +28684,17 @@ var AddressForm$1 = observer(function (_a) {
28651
28684
  IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" })))));
28652
28685
  });
28653
28686
 
28654
- var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #545454;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28655
- var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28687
+ var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28688
+ var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28656
28689
  styleInject(css_248z$4);
28657
28690
 
28658
28691
  var Button = observer(function (_a) {
28659
- var text = _a.text, onClick = _a.onClick, isLoading = _a.isLoading;
28660
- return (createElement("button", { type: "button", className: [
28692
+ var text = _a.text, style = _a.style, onClick = _a.onClick, size = _a.size, isLoading = _a.isLoading, isDisabled = _a.isDisabled;
28693
+ return (createElement("button", { style: style, type: "button", className: [
28661
28694
  styles$3.Button,
28662
28695
  styles$3.Dark,
28663
- styles$3.Large,
28696
+ size === "medium" ? styles$3.Medium : styles$3.Large,
28697
+ isDisabled ? styles$3.Disabled : "",
28664
28698
  styles$3.FullWidthMobile,
28665
28699
  ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (createElement("div", { className: styles$3.loader })) : (createElement("span", null, text))));
28666
28700
  });
@@ -29008,8 +29042,8 @@ var CartItem = observer(function (_a) {
29008
29042
  createElement("div", { className: styles$e.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
29009
29043
  });
29010
29044
 
29011
- var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n border-bottom: 1px solid #d9d9d9;\n overflow: hidden; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex;\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA .style-module_CouponButton__14hL- {\n flex: 0 0 auto;\n width: 60px;\n margin-left: 0.5em;\n display: flex;\n justify-content: center;\n align-items: center;\n color: white; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\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: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\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 padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
29012
- var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","Coupon":"style-module_Coupon__3pdQA","CouponButton":"style-module_CouponButton__14hL-","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
29045
+ var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\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: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\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 padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
29046
+ var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
29013
29047
  styleInject(css_248z$g);
29014
29048
 
29015
29049
  var SVGArrowDown = function (_a) {
@@ -29026,6 +29060,20 @@ var SVGShoppingBag = function (_a) {
29026
29060
  createElement("path", { fill: "currentColor", d: "M4 16V4H2V2h3a1 1 0 0 1 1 1v12h12.438l2-8H8V5h13.72a1 1 0 0 1 .97 1.243l-2.5 10a1 1 0 0 1-.97.757H5a1 1 0 0 1-1-1zm2 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm12 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" })));
29027
29061
  };
29028
29062
 
29063
+ var SVGTag = function (_a) {
29064
+ var className = _a.className;
29065
+ return (createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", className: className },
29066
+ createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
29067
+ createElement("path", { fill: "currentColor", d: "M10.9 2.1l9.899 1.415 1.414 9.9-9.192 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.414L10.9 2.1zm2.828 8.486a2 2 0 1 0 2.828-2.829 2 2 0 0 0-2.828 2.829z" })));
29068
+ };
29069
+
29070
+ var SVGCross = function (_a) {
29071
+ var className = _a.className;
29072
+ return (createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", className: className },
29073
+ createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
29074
+ createElement("path", { fill: "currentColor", d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" })));
29075
+ };
29076
+
29029
29077
  var CartSummary = observer(function (_a) {
29030
29078
  var _b;
29031
29079
  var vm = _a.vm, allowExpand = _a.allowExpand;
@@ -29083,6 +29131,7 @@ var CartSummary = observer(function (_a) {
29083
29131
  cart.items.map(function (item, index) { return (createElement("div", { key: index },
29084
29132
  createElement(CartItem, { cartItem: item, currencyCode: cart.currencyCode }),
29085
29133
  createElement("div", { className: styles$f.Divider }))); }),
29134
+ createElement(Coupon, { vm: vm }),
29086
29135
  createElement("div", { className: styles$f.SubTotalInfo },
29087
29136
  createElement("div", { className: styles$f.InfoRow },
29088
29137
  createElement("div", { className: styles$f.Label }, "Alt Toplam"),
@@ -29097,7 +29146,10 @@ var CartSummary = observer(function (_a) {
29097
29146
  createElement("div", { className: styles$f.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
29098
29147
  sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (createElement("div", { className: styles$f.InfoRow, key: index },
29099
29148
  createElement("div", { className: styles$f.Label }, adjustment.name),
29100
- createElement("div", { className: styles$f.Value }, formatMoney(adjustment.amount, cart.currencyCode)))); })),
29149
+ createElement("div", { className: styles$f.Value },
29150
+ createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
29151
+ " ",
29152
+ createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); })),
29101
29153
  createElement("div", { className: styles$f.TotalContainer },
29102
29154
  createElement("div", { className: styles$f.TitleContainer },
29103
29155
  createElement("div", { className: styles$f.Title }, "Toplam"),
@@ -29106,6 +29158,51 @@ var CartSummary = observer(function (_a) {
29106
29158
  createElement("div", { className: styles$f.TotalPrice }, formatMoney(vm.installmentPrice ||
29107
29159
  vm.checkout.totalFinalPrice ||
29108
29160
  cart.totalPrice, cart.currencyCode)))))));
29161
+ });
29162
+ var Coupon = observer(function (_a) {
29163
+ var vm = _a.vm;
29164
+ var _b = useState(""), couponCode = _b[0], setCouponCode = _b[1];
29165
+ var _c = useState(false), isLoadingCoupon = _c[0], setLoadingCoupon = _c[1];
29166
+ var onCouponApply = function () { return __awaiter(void 0, void 0, void 0, function () {
29167
+ return __generator(this, function (_a) {
29168
+ switch (_a.label) {
29169
+ case 0:
29170
+ vm.checkout.couponCode = couponCode;
29171
+ setLoadingCoupon(true);
29172
+ return [4 /*yield*/, vm.onCouponCodeApply()];
29173
+ case 1:
29174
+ _a.sent();
29175
+ setLoadingCoupon(false);
29176
+ setCouponCode("");
29177
+ return [2 /*return*/];
29178
+ }
29179
+ });
29180
+ }); };
29181
+ var onClearCouponCode = function () { return __awaiter(void 0, void 0, void 0, function () {
29182
+ return __generator(this, function (_a) {
29183
+ switch (_a.label) {
29184
+ case 0:
29185
+ vm.checkout.couponCode = null;
29186
+ setLoadingCoupon(true);
29187
+ return [4 /*yield*/, vm.onCouponCodeApply()];
29188
+ case 1:
29189
+ _a.sent();
29190
+ setLoadingCoupon(false);
29191
+ return [2 /*return*/];
29192
+ }
29193
+ });
29194
+ }); };
29195
+ if (vm.step === CheckoutStep.SUCCESS)
29196
+ return null;
29197
+ return (createElement("div", { className: styles$f.CouponContainer },
29198
+ createElement("div", { className: styles$f.Coupon },
29199
+ createElement(FormItem, { type: FormItemType.TEXT, label: "Hediye kartı veya indirim kodu", value: couponCode, onChange: function (value) { return setCouponCode(value); } }),
29200
+ createElement(Button, { text: "Uygula", onClick: onCouponApply, isDisabled: !couponCode, isLoading: isLoadingCoupon, size: "medium", style: { marginLeft: "0.5em", maxWidth: "80px" } })),
29201
+ !!vm.checkout.appliedCouponCode && (createElement("div", { className: styles$f.AppliedCoupon },
29202
+ createElement(SVGTag, null),
29203
+ createElement("div", { className: styles$f.AppliedCouponCode }, vm.checkout.appliedCouponCode),
29204
+ createElement("div", { className: styles$f.Cross, onClick: onClearCouponCode },
29205
+ createElement(SVGCross, null))))));
29109
29206
  });
29110
29207
 
29111
29208
  var css_248z$h = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
@@ -29136,7 +29233,7 @@ var Breadcrumbs = observer(function (_a) {
29136
29233
  catch (err) { }
29137
29234
  };
29138
29235
  return (createElement("div", { className: styles$g.Breadcrumbs },
29139
- createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onBackToShoppingClick },
29236
+ createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onGoToCartClick },
29140
29237
  createElement("span", null, "Sepet"),
29141
29238
  createElement("span", { className: styles$g.icon },
29142
29239
  createElement(SVGArrowLeft, null))),
package/build/index.js CHANGED
@@ -11453,6 +11453,8 @@ var IkasCheckout = /** @class */ (function () {
11453
11453
  this.totalFinalPrice = null;
11454
11454
  this.adjustments = null;
11455
11455
  this.note = null;
11456
+ // Extra
11457
+ this.appliedCouponCode = null;
11456
11458
  this.id = data.id;
11457
11459
  this.createdAt = data.createdAt;
11458
11460
  this.updatedAt = data.updatedAt;
@@ -11467,14 +11469,15 @@ var IkasCheckout = /** @class */ (function () {
11467
11469
  this.customer = data.customer;
11468
11470
  this.billingAddress = data.billingAddress
11469
11471
  ? new IkasOrderAddress(data.billingAddress)
11470
- : undefined;
11472
+ : new IkasOrderAddress();
11471
11473
  this.shippingAddress = data.shippingAddress
11472
11474
  ? new IkasOrderAddress(data.shippingAddress)
11473
- : undefined;
11475
+ : new IkasOrderAddress();
11474
11476
  this.shippingLines = data.shippingLines || [];
11475
11477
  this.shippingMethod = data.shippingMethod || exports.IkasShippingMethod.NO_SHIPMENT;
11476
11478
  this.status = data.status || exports.IkasCheckoutStatus.OPEN;
11477
11479
  this.couponCode = data.couponCode;
11480
+ this.appliedCouponCode = data.couponCode;
11478
11481
  this.recoverEmailStatus = data.recoverEmailStatus;
11479
11482
  this.recoveryStatus = data.recoveryStatus;
11480
11483
  this.totalFinalPrice = data.totalFinalPrice;
@@ -16484,6 +16487,33 @@ var CheckoutViewModel = /** @class */ (function () {
16484
16487
  this.onCouponCodeChange = function (value) {
16485
16488
  _this.checkout.couponCode = value;
16486
16489
  };
16490
+ this.onCouponCodeApply = function () { return __awaiter(_this, void 0, void 0, function () {
16491
+ var newCheckout, oldCheckout;
16492
+ return __generator(this, function (_a) {
16493
+ switch (_a.label) {
16494
+ case 0:
16495
+ _a.trys.push([0, 3, , 4]);
16496
+ return [4 /*yield*/, this.saveCheckout()];
16497
+ case 1:
16498
+ _a.sent();
16499
+ return [4 /*yield*/, IkasCheckoutAPI.getCheckoutById(this.checkout.id)];
16500
+ case 2:
16501
+ newCheckout = _a.sent();
16502
+ if (newCheckout) {
16503
+ oldCheckout = this.checkout;
16504
+ this.checkout = newCheckout;
16505
+ this.checkout.customer = oldCheckout.customer;
16506
+ this.checkout.shippingAddress = oldCheckout.shippingAddress;
16507
+ this.checkout.billingAddress = oldCheckout.billingAddress;
16508
+ }
16509
+ return [3 /*break*/, 4];
16510
+ case 3:
16511
+ _a.sent();
16512
+ return [3 /*break*/, 4];
16513
+ case 4: return [2 /*return*/];
16514
+ }
16515
+ });
16516
+ }); };
16487
16517
  this.onSelectedShippingAddressIdChange = function (value) {
16488
16518
  var _a;
16489
16519
  _this.selectedShippingAddressId = value;
@@ -16573,11 +16603,14 @@ var CheckoutViewModel = /** @class */ (function () {
16573
16603
  _this.cardData.cvv = value;
16574
16604
  };
16575
16605
  // CREDIT CARD END
16606
+ this.onGoToCartClick = function () {
16607
+ _this.router.push("/cart");
16608
+ };
16576
16609
  this.onBackToShoppingClick = function () {
16577
16610
  _this.router.push("/");
16578
16611
  };
16579
16612
  this.onProceedToShippingClick = function () { return __awaiter(_this, void 0, void 0, function () {
16580
- var newAddress, customer, err_2;
16613
+ var newAddress, customer, err_3;
16581
16614
  return __generator(this, function (_a) {
16582
16615
  switch (_a.label) {
16583
16616
  case 0:
@@ -16607,12 +16640,12 @@ var CheckoutViewModel = /** @class */ (function () {
16607
16640
  this.changeStep(CheckoutStep.SHIPPING);
16608
16641
  return [3 /*break*/, 7];
16609
16642
  case 6:
16610
- err_2 = _a.sent();
16611
- if (err_2.type) {
16612
- this.error = err_2;
16643
+ err_3 = _a.sent();
16644
+ if (err_3.type) {
16645
+ this.error = err_3;
16613
16646
  }
16614
16647
  else {
16615
- console.log(err_2);
16648
+ console.log(err_3);
16616
16649
  this.error = {
16617
16650
  type: ErrorType.UNKNOWN,
16618
16651
  };
@@ -16624,7 +16657,7 @@ var CheckoutViewModel = /** @class */ (function () {
16624
16657
  });
16625
16658
  }); };
16626
16659
  this.onProceedToPaymentClick = function () { return __awaiter(_this, void 0, void 0, function () {
16627
- var err_3;
16660
+ var err_4;
16628
16661
  return __generator(this, function (_a) {
16629
16662
  switch (_a.label) {
16630
16663
  case 0:
@@ -16644,12 +16677,12 @@ var CheckoutViewModel = /** @class */ (function () {
16644
16677
  this.changeStep(CheckoutStep.PAYMENT);
16645
16678
  return [3 /*break*/, 4];
16646
16679
  case 3:
16647
- err_3 = _a.sent();
16648
- if (err_3.type) {
16649
- this.error = err_3;
16680
+ err_4 = _a.sent();
16681
+ if (err_4.type) {
16682
+ this.error = err_4;
16650
16683
  }
16651
16684
  else {
16652
- console.log(err_3);
16685
+ console.log(err_4);
16653
16686
  this.error = {
16654
16687
  type: ErrorType.UNKNOWN,
16655
16688
  };
@@ -16661,7 +16694,7 @@ var CheckoutViewModel = /** @class */ (function () {
16661
16694
  });
16662
16695
  }); };
16663
16696
  this.performPayment = function () { return __awaiter(_this, void 0, void 0, function () {
16664
- var response, transactionStatus, err_4;
16697
+ var response, transactionStatus, err_5;
16665
16698
  var _a;
16666
16699
  return __generator(this, function (_b) {
16667
16700
  switch (_b.label) {
@@ -16712,10 +16745,10 @@ var CheckoutViewModel = /** @class */ (function () {
16712
16745
  }
16713
16746
  return [3 /*break*/, 6];
16714
16747
  case 5:
16715
- err_4 = _b.sent();
16716
- if (err_4.type) {
16717
- console.log(err_4);
16718
- this.error = err_4;
16748
+ err_5 = _b.sent();
16749
+ if (err_5.type) {
16750
+ console.log(err_5);
16751
+ this.error = err_5;
16719
16752
  }
16720
16753
  else {
16721
16754
  this.error = {
@@ -26517,7 +26550,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
26517
26550
  return __generator(this, function (_b) {
26518
26551
  switch (_b.label) {
26519
26552
  case 0:
26520
- QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n }\n }\n }\n "])));
26553
+ QUERY = src(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n }\n }\n "], ["\n query getCheckoutById($id: String!) {\n getCheckoutById(id: $id) {\n totalFinalPrice\n note\n availableShippingMethods {\n price\n rateName\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n }\n billingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n code\n id\n name\n }\n district {\n code\n id\n name\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n code\n id\n name\n }\n taxNumber\n taxOffice\n }\n cartId\n couponCode\n createdAt\n customer {\n email\n firstName\n id\n lastName\n }\n deleted\n id\n merchantId\n orderId\n orderNumber\n recoverEmailStatus\n recoveryStatus\n shippingAddress {\n addressLine1\n addressLine2\n city {\n code\n id\n name\n }\n company\n country {\n id\n code\n name\n }\n district {\n name\n id\n code\n }\n firstName\n identityNumber\n isDefault\n lastName\n phone\n postalCode\n state {\n name\n id\n code\n }\n taxNumber\n taxOffice\n }\n shippingLines {\n title\n taxValue\n price\n shippingSettingsId\n shippingZoneRateId\n }\n shippingMethod\n shippingSettingsId\n shippingZoneRateId\n status\n updatedAt\n cart {\n createdAt\n currencyCode\n customerId\n dueDate\n id\n itemCount\n items {\n createdAt\n currencyCode\n discount {\n amount\n amountType\n reason\n }\n discountPrice\n finalPrice\n id\n originalOrderLineItemId\n price\n quantity\n status\n deleted\n statusUpdatedAt\n stockLocationId\n taxValue\n updatedAt\n variant {\n barcodeList\n id\n mainImageId\n name\n productId\n sku\n variantValues {\n order\n variantTypeId\n variantTypeName\n variantValueId\n variantValueName\n }\n }\n }\n merchantId\n status\n totalPrice\n updatedAt\n }\n adjustments {\n amount\n amountType\n name\n order\n type\n couponId\n }\n }\n }\n "])));
26521
26554
  _b.label = 1;
26522
26555
  case 1:
26523
26556
  _b.trys.push([1, 3, , 4]);
@@ -28155,7 +28188,7 @@ var SVGCaretDown = function (_a) {
28155
28188
  };
28156
28189
 
28157
28190
  var FormItem = mobxReactLite.observer(function (props) {
28158
- var vm = React.useState(function () { return new FormItemViewModel(props); })[0];
28191
+ var _a = React.useState(function () { return new FormItemViewModel(props); }), vm = _a[0], setVM = _a[1];
28159
28192
  React.useEffect(function () {
28160
28193
  mobx.runInAction(function () {
28161
28194
  vm.type = props.type;
@@ -28188,7 +28221,7 @@ var FormItem = mobxReactLite.observer(function (props) {
28188
28221
  }, [props.errorText]);
28189
28222
  React.useEffect(function () {
28190
28223
  mobx.runInAction(function () {
28191
- vm.onChange = props.onChange;
28224
+ setVM(new FormItemViewModel(props));
28192
28225
  });
28193
28226
  }, [props.onChange]);
28194
28227
  return (React.createElement("div", { className: vm.formItemStyle },
@@ -28589,7 +28622,7 @@ var css_248z$2 = ".common-module_FormSectionTitle___Mykh {\n width: 100%;\n di
28589
28622
  var commonStyles = {"FormSectionTitle":"common-module_FormSectionTitle___Mykh","Title":"common-module_Title__3JTHt","WithSubTitle":"common-module_WithSubTitle__1VHWv","SubTitle":"common-module_SubTitle__1H4kH","Grid":"common-module_Grid__2CuvH","Grid2":"common-module_Grid2__9CCag","Grid3":"common-module_Grid3__3p0jJ","FormContainer":"common-module_FormContainer__2I_Lj","mtFormRow":"common-module_mtFormRow__2tsDn","mt1":"common-module_mt1__3tpC1","mt2":"common-module_mt2__2bl5q","fadeInFromRight":"common-module_fadeInFromRight__3RYk5"};
28590
28623
  styleInject(css_248z$2);
28591
28624
 
28592
- var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28625
+ var css_248z$3 = ".style-module_CheckoutPage__A_f2V {\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex; }\n .style-module_CheckoutPage__A_f2V * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n font-size: 16px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 40px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Space__1e2de {\n width: 100%;\n height: 100px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n flex: 0 0 auto;\n height: 50px;\n background-color: white;\n width: calc(100% - 1em);\n display: flex;\n align-items: center;\n border-top: 1px solid #d9d9d9; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc {\n font-size: 0.7em;\n margin-right: 1.4em;\n color: #737373;\n cursor: pointer;\n user-select: none; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg .style-module_FooterItem__1ofBc:hover {\n color: #111111; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 .style-module_Footer__ebdyg {\n width: 100%;\n padding-left: 0.7em; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 {\n width: 100%;\n height: 96px;\n display: flex;\n align-items: center;\n font-weight: 500;\n font-size: 1.5em;\n padding-left: 0.4em; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 a {\n width: 100%; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do {\n width: 100%;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_Header__1vfF1 .style-module_Logo__2E8Do img {\n object-fit: contain;\n object-position: left;\n pointer-events: none; }\n @media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_MobileCartSummary__3NrcP {\n display: none; } }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_RowPB__3M7Tz {\n padding-bottom: 0.7em; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px; }\n .style-module_CheckoutPage__A_f2V .style-module_Left__2dWz6 .style-module_LeftContent__1Tyb7 {\n width: 100%;\n min-width: auto;\n max-width: 100%; } }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: #FAFAFA;\n border-left: 1px solid #d9d9d9;\n display: flex;\n padding-left: 40px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto; }\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f .style-module_RightContent__1TcO5 {\n width: 100%;\n max-width: 600px;\n padding-top: 80px; }\n @media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__A_f2V .style-module_Right__3AN4f {\n display: none; } }\n";
28593
28626
  var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-module_Left__2dWz6","LeftContent":"style-module_LeftContent__1Tyb7","Space":"style-module_Space__1e2de","Footer":"style-module_Footer__ebdyg","FooterItem":"style-module_FooterItem__1ofBc","Header":"style-module_Header__1vfF1","Logo":"style-module_Logo__2E8Do","MobileCartSummary":"style-module_MobileCartSummary__3NrcP","RowPB":"style-module_RowPB__3M7Tz","Right":"style-module_Right__3AN4f","RightContent":"style-module_RightContent__1TcO5"};
28594
28627
  styleInject(css_248z$3);
28595
28628
 
@@ -28630,16 +28663,17 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
28630
28663
  IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "TC Kimlik No", value: vm.identityNumber || "", onChange: vm.onIdentityNumberChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.identityNumber), errorText: "TC kimlik no girin" })))));
28631
28664
  });
28632
28665
 
28633
- var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #545454;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28634
- var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28666
+ var css_248z$4 = ".style-module_Button__1UPMN {\n cursor: pointer;\n border: 1px transparent solid;\n border-radius: 6px;\n font-weight: 500;\n text-align: center;\n position: relative;\n transition: all .2s;\n display: flex;\n justify-content: center;\n align-items: center; }\n .style-module_Button__1UPMN:focus {\n outline: 0; }\n .style-module_Button__1UPMN.style-module_Large__2wPlw {\n height: 64px;\n padding: 0 1.7em; }\n .style-module_Button__1UPMN.style-module_Medium__3t0pu {\n height: 3em;\n padding: 0.5em 1em; }\n .style-module_Button__1UPMN.style-module_Dark__1Z_hs {\n background-color: #111111;\n color: white; }\n .style-module_Button__1UPMN.style-module_Disabled__3HYF_ {\n background-color: #c8c8c8;\n color: #FAFAFA;\n pointer-events: none; }\n @media only screen and (max-width: 1000px) {\n .style-module_Button__1UPMN.style-module_FullWidthMobile__3MTFv {\n width: 100%; } }\n .style-module_Button__1UPMN .style-module_loader__3v6kq,\n .style-module_Button__1UPMN .style-module_loader__3v6kq:after {\n border-radius: 50%;\n width: 5em;\n height: 5em; }\n .style-module_Button__1UPMN .style-module_loader__3v6kq {\n font-size: 6px;\n position: relative;\n text-indent: -9999em;\n border-top: 0.5em solid rgba(255, 255, 255, 0.2);\n border-right: 0.5em solid rgba(255, 255, 255, 0.2);\n border-bottom: 0.5em solid rgba(255, 255, 255, 0.2);\n border-left: 0.5em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: style-module_load8__2z7nj 1.1s infinite linear;\n animation: style-module_load8__2z7nj 1.1s infinite linear; }\n\n@-webkit-keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n\n@keyframes style-module_load8__2z7nj {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg); }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg); } }\n";
28667
+ var styles$3 = {"Button":"style-module_Button__1UPMN","Large":"style-module_Large__2wPlw","Medium":"style-module_Medium__3t0pu","Dark":"style-module_Dark__1Z_hs","Disabled":"style-module_Disabled__3HYF_","FullWidthMobile":"style-module_FullWidthMobile__3MTFv","loader":"style-module_loader__3v6kq","load8":"style-module_load8__2z7nj"};
28635
28668
  styleInject(css_248z$4);
28636
28669
 
28637
28670
  var Button = mobxReactLite.observer(function (_a) {
28638
- var text = _a.text, onClick = _a.onClick, isLoading = _a.isLoading;
28639
- return (React.createElement("button", { type: "button", className: [
28671
+ var text = _a.text, style = _a.style, onClick = _a.onClick, size = _a.size, isLoading = _a.isLoading, isDisabled = _a.isDisabled;
28672
+ return (React.createElement("button", { style: style, type: "button", className: [
28640
28673
  styles$3.Button,
28641
28674
  styles$3.Dark,
28642
- styles$3.Large,
28675
+ size === "medium" ? styles$3.Medium : styles$3.Large,
28676
+ isDisabled ? styles$3.Disabled : "",
28643
28677
  styles$3.FullWidthMobile,
28644
28678
  ].join(" "), onClick: !isLoading ? onClick : undefined }, isLoading ? (React.createElement("div", { className: styles$3.loader })) : (React.createElement("span", null, text))));
28645
28679
  });
@@ -28987,8 +29021,8 @@ var CartItem = mobxReactLite.observer(function (_a) {
28987
29021
  React.createElement("div", { className: styles$e.Price }, formatMoney(cartItem.finalPriceWithQuantity, currencyCode))));
28988
29022
  });
28989
29023
 
28990
- var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n border-bottom: 1px solid #d9d9d9;\n overflow: hidden; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex;\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA .style-module_CouponButton__14hL- {\n flex: 0 0 auto;\n width: 60px;\n margin-left: 0.5em;\n display: flex;\n justify-content: center;\n align-items: center;\n color: white; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\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: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\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 padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
28991
- var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","Coupon":"style-module_Coupon__3pdQA","CouponButton":"style-module_CouponButton__14hL-","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
29024
+ var css_248z$g = ".style-module_CartSummary__30RcF {\n background-color: #FAFAFA;\n padding: 0 0.7em;\n overflow: hidden;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF.style-module_AllowExpand__3kDXF {\n border-top: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 56px;\n padding: 0 1em;\n width: calc(100% + 1.4em);\n margin-left: -0.7em;\n border-bottom: 1px solid transparent;\n transition: border-bottom .3s;\n user-select: none; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv {\n display: flex;\n align-items: center;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_Label__3E7LF {\n margin-left: 0.5em; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d {\n transition: all .3s; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Left__A54sv .style-module_ArrowDown__2ET-d.style-module_Rotated__3sgbm {\n transform: rotate(-180deg); }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA .style-module_Price__sosrJ {\n font-weight: 500; }\n .style-module_CartSummary__30RcF .style-module_ExpandHeader__2ICjA.style-module_Expanded__3VBL2 {\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_DetailsContainer__FBBIP {\n overflow: hidden;\n width: 100%;\n transition: height .3s ease-in-out; }\n .style-module_CartSummary__30RcF .style-module_Details__3-X_i {\n overflow: hidden; }\n .style-module_CartSummary__30RcF .style-module_Divider__2d0Zk {\n width: 100%;\n height: 1px;\n margin: auto;\n background-color: #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_CouponContainer__1zCXG {\n padding: 1.2em 0.1em;\n border-bottom: 1px solid #d9d9d9; }\n .style-module_CartSummary__30RcF .style-module_Coupon__3pdQA {\n display: flex; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 {\n display: inline-flex;\n align-items: center;\n padding: 0.65em;\n margin-top: 0.85em;\n color: #333333;\n background-color: rgba(113, 113, 113, 0.11);\n user-select: none;\n border-radius: 6px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_AppliedCouponCode__2o7pn {\n margin-left: 0.25em;\n margin-right: 0.25em;\n font-weight: 500;\n position: relative;\n top: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d {\n color: #545454;\n cursor: pointer;\n position: relative;\n bottom: -1px; }\n .style-module_CartSummary__30RcF .style-module_AppliedCoupon__37qv8 .style-module_Cross__2dc3d:hover {\n color: #333333; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr {\n padding: 1.2em 0;\n border-bottom: 1px solid #d9d9d9; }\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: 0.3em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF {\n color: #545454;\n font-size: 0.8em; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.8em; }\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 padding: 1.5em 0; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Title__16M5E {\n font-size: 1em; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TitleContainer__3ptQE .style-module_Tax__17g6O {\n font-size: 0.8em;\n color: #545454; }\n .style-module_CartSummary__30RcF .style-module_TotalContainer__36DNt .style-module_TotalPrice__2s7DC {\n font-size: 1.5em;\n font-weight: 500; }\n @media only screen and (min-width: 1000px) {\n .style-module_CartSummary__30RcF {\n border-bottom: none; }\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Label__3E7LF,\n .style-module_CartSummary__30RcF .style-module_SubTotalInfo__1QMnr .style-module_InfoRow__3eZdJ .style-module_Value__3mBvk {\n font-size: 0.9em; } }\n";
29025
+ var styles$f = {"CartSummary":"style-module_CartSummary__30RcF","AllowExpand":"style-module_AllowExpand__3kDXF","ExpandHeader":"style-module_ExpandHeader__2ICjA","Left":"style-module_Left__A54sv","Label":"style-module_Label__3E7LF","ArrowDown":"style-module_ArrowDown__2ET-d","Rotated":"style-module_Rotated__3sgbm","Price":"style-module_Price__sosrJ","Expanded":"style-module_Expanded__3VBL2","DetailsContainer":"style-module_DetailsContainer__FBBIP","Details":"style-module_Details__3-X_i","Divider":"style-module_Divider__2d0Zk","CouponContainer":"style-module_CouponContainer__1zCXG","Coupon":"style-module_Coupon__3pdQA","AppliedCoupon":"style-module_AppliedCoupon__37qv8","AppliedCouponCode":"style-module_AppliedCouponCode__2o7pn","Cross":"style-module_Cross__2dc3d","SubTotalInfo":"style-module_SubTotalInfo__1QMnr","InfoRow":"style-module_InfoRow__3eZdJ","Value":"style-module_Value__3mBvk","TotalContainer":"style-module_TotalContainer__36DNt","TitleContainer":"style-module_TitleContainer__3ptQE","Title":"style-module_Title__16M5E","Tax":"style-module_Tax__17g6O","TotalPrice":"style-module_TotalPrice__2s7DC"};
28992
29026
  styleInject(css_248z$g);
28993
29027
 
28994
29028
  var SVGArrowDown = function (_a) {
@@ -29005,6 +29039,20 @@ var SVGShoppingBag = function (_a) {
29005
29039
  React.createElement("path", { fill: "currentColor", d: "M4 16V4H2V2h3a1 1 0 0 1 1 1v12h12.438l2-8H8V5h13.72a1 1 0 0 1 .97 1.243l-2.5 10a1 1 0 0 1-.97.757H5a1 1 0 0 1-1-1zm2 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm12 0a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" })));
29006
29040
  };
29007
29041
 
29042
+ var SVGTag = function (_a) {
29043
+ var className = _a.className;
29044
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", className: className },
29045
+ React.createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
29046
+ React.createElement("path", { fill: "currentColor", d: "M10.9 2.1l9.899 1.415 1.414 9.9-9.192 9.192a1 1 0 0 1-1.414 0l-9.9-9.9a1 1 0 0 1 0-1.414L10.9 2.1zm2.828 8.486a2 2 0 1 0 2.828-2.829 2 2 0 0 0-2.828 2.829z" })));
29047
+ };
29048
+
29049
+ var SVGCross = function (_a) {
29050
+ var className = _a.className;
29051
+ return (React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", className: className },
29052
+ React.createElement("path", { fill: "none", d: "M0 0h24v24H0z" }),
29053
+ React.createElement("path", { fill: "currentColor", d: "M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" })));
29054
+ };
29055
+
29008
29056
  var CartSummary = mobxReactLite.observer(function (_a) {
29009
29057
  var _b;
29010
29058
  var vm = _a.vm, allowExpand = _a.allowExpand;
@@ -29062,6 +29110,7 @@ var CartSummary = mobxReactLite.observer(function (_a) {
29062
29110
  cart.items.map(function (item, index) { return (React.createElement("div", { key: index },
29063
29111
  React.createElement(CartItem, { cartItem: item, currencyCode: cart.currencyCode }),
29064
29112
  React.createElement("div", { className: styles$f.Divider }))); }),
29113
+ React.createElement(Coupon, { vm: vm }),
29065
29114
  React.createElement("div", { className: styles$f.SubTotalInfo },
29066
29115
  React.createElement("div", { className: styles$f.InfoRow },
29067
29116
  React.createElement("div", { className: styles$f.Label }, "Alt Toplam"),
@@ -29076,7 +29125,10 @@ var CartSummary = mobxReactLite.observer(function (_a) {
29076
29125
  React.createElement("div", { className: styles$f.Value }, formatMoney(vm.installmentExtraPrice, cart.currencyCode)))),
29077
29126
  sortBy_1(vm.checkout.adjustments || [], "order").map(function (adjustment, index) { return (React.createElement("div", { className: styles$f.InfoRow, key: index },
29078
29127
  React.createElement("div", { className: styles$f.Label }, adjustment.name),
29079
- React.createElement("div", { className: styles$f.Value }, formatMoney(adjustment.amount, cart.currencyCode)))); })),
29128
+ React.createElement("div", { className: styles$f.Value },
29129
+ React.createElement("span", null, adjustment.type === "DECREMENT" ? "- " : ""),
29130
+ " ",
29131
+ React.createElement("span", null, formatMoney(adjustment.amount, cart.currencyCode))))); })),
29080
29132
  React.createElement("div", { className: styles$f.TotalContainer },
29081
29133
  React.createElement("div", { className: styles$f.TitleContainer },
29082
29134
  React.createElement("div", { className: styles$f.Title }, "Toplam"),
@@ -29085,6 +29137,51 @@ var CartSummary = mobxReactLite.observer(function (_a) {
29085
29137
  React.createElement("div", { className: styles$f.TotalPrice }, formatMoney(vm.installmentPrice ||
29086
29138
  vm.checkout.totalFinalPrice ||
29087
29139
  cart.totalPrice, cart.currencyCode)))))));
29140
+ });
29141
+ var Coupon = mobxReactLite.observer(function (_a) {
29142
+ var vm = _a.vm;
29143
+ var _b = React.useState(""), couponCode = _b[0], setCouponCode = _b[1];
29144
+ var _c = React.useState(false), isLoadingCoupon = _c[0], setLoadingCoupon = _c[1];
29145
+ var onCouponApply = function () { return __awaiter(void 0, void 0, void 0, function () {
29146
+ return __generator(this, function (_a) {
29147
+ switch (_a.label) {
29148
+ case 0:
29149
+ vm.checkout.couponCode = couponCode;
29150
+ setLoadingCoupon(true);
29151
+ return [4 /*yield*/, vm.onCouponCodeApply()];
29152
+ case 1:
29153
+ _a.sent();
29154
+ setLoadingCoupon(false);
29155
+ setCouponCode("");
29156
+ return [2 /*return*/];
29157
+ }
29158
+ });
29159
+ }); };
29160
+ var onClearCouponCode = function () { return __awaiter(void 0, void 0, void 0, function () {
29161
+ return __generator(this, function (_a) {
29162
+ switch (_a.label) {
29163
+ case 0:
29164
+ vm.checkout.couponCode = null;
29165
+ setLoadingCoupon(true);
29166
+ return [4 /*yield*/, vm.onCouponCodeApply()];
29167
+ case 1:
29168
+ _a.sent();
29169
+ setLoadingCoupon(false);
29170
+ return [2 /*return*/];
29171
+ }
29172
+ });
29173
+ }); };
29174
+ if (vm.step === CheckoutStep.SUCCESS)
29175
+ return null;
29176
+ return (React.createElement("div", { className: styles$f.CouponContainer },
29177
+ React.createElement("div", { className: styles$f.Coupon },
29178
+ React.createElement(FormItem, { type: FormItemType.TEXT, label: "Hediye kartı veya indirim kodu", value: couponCode, onChange: function (value) { return setCouponCode(value); } }),
29179
+ React.createElement(Button, { text: "Uygula", onClick: onCouponApply, isDisabled: !couponCode, isLoading: isLoadingCoupon, size: "medium", style: { marginLeft: "0.5em", maxWidth: "80px" } })),
29180
+ !!vm.checkout.appliedCouponCode && (React.createElement("div", { className: styles$f.AppliedCoupon },
29181
+ React.createElement(SVGTag, null),
29182
+ React.createElement("div", { className: styles$f.AppliedCouponCode }, vm.checkout.appliedCouponCode),
29183
+ React.createElement("div", { className: styles$f.Cross, onClick: onClearCouponCode },
29184
+ React.createElement(SVGCross, null))))));
29088
29185
  });
29089
29186
 
29090
29187
  var css_248z$h = ".style-module_Breadcrumbs__1jIPZ {\n display: flex;\n align-items: center;\n padding: 0 0.7em; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 {\n font-size: 0.8em;\n padding: 1em 0;\n display: flex;\n align-items: center;\n user-select: none;\n cursor: pointer;\n color: #545454; }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3 .style-module_icon__3Rq6w {\n transform: rotate(180deg); }\n .style-module_Breadcrumbs__1jIPZ .style-module_Breadcrumb__2qdy3.style-module_Active__3KwX8 {\n color: #111111;\n font-weight: 500; }\n";
@@ -29115,7 +29212,7 @@ var Breadcrumbs = mobxReactLite.observer(function (_a) {
29115
29212
  catch (err) { }
29116
29213
  };
29117
29214
  return (React.createElement("div", { className: styles$g.Breadcrumbs },
29118
- React.createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onBackToShoppingClick },
29215
+ React.createElement("div", { className: styles$g.Breadcrumb, onClick: vm.onGoToCartClick },
29119
29216
  React.createElement("span", null, "Sepet"),
29120
29217
  React.createElement("span", { className: styles$g.icon },
29121
29218
  React.createElement(SVGArrowLeft, null))),
@@ -26,6 +26,7 @@ export declare class IkasCheckout {
26
26
  totalFinalPrice?: number | null;
27
27
  adjustments?: IkasOrderAdjustment[] | null;
28
28
  note: string | null;
29
+ appliedCouponCode?: string | null;
29
30
  constructor(data?: Partial<IkasCheckout>);
30
31
  get shippingTotal(): number;
31
32
  get hasCustomer(): boolean;
@@ -38,6 +38,7 @@ export declare type IkasOrderAdjustment = {
38
38
  name: string;
39
39
  order: number;
40
40
  type: IkasAdjustmentEnum;
41
+ couponId: string | null;
41
42
  };
42
43
  export declare type IkasOrderCustomer = {
43
44
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.139",
3
+ "version": "0.0.140",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",