@ikas/storefront 0.0.109 → 0.0.110

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.
@@ -10,6 +10,7 @@ export interface listPaymentGateway_listPaymentGateway {
10
10
  paymentMethodType: PaymentMethodEnum;
11
11
  id: string;
12
12
  name: string;
13
+ description: string | null;
13
14
  testMode: boolean | null;
14
15
  }
15
16
  export interface listPaymentGateway {
package/build/index.es.js CHANGED
@@ -24804,7 +24804,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
24804
24804
  return __generator(this, function (_b) {
24805
24805
  switch (_b.label) {
24806
24806
  case 0:
24807
- QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n testMode\n }\n }\n "], ["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n testMode\n }\n }\n "])));
24807
+ QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "], ["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "])));
24808
24808
  _b.label = 1;
24809
24809
  case 1:
24810
24810
  _b.trys.push([1, 3, , 4]);
@@ -24881,7 +24881,9 @@ var IkasCheckoutAPI = /** @class */ (function () {
24881
24881
  query: QUERY,
24882
24882
  variables: {
24883
24883
  lines: lines,
24884
- stockLocationIdList: stockLocationIdList,
24884
+ stockLocationIdList: stockLocationIdList.length
24885
+ ? stockLocationIdList
24886
+ : null,
24885
24887
  },
24886
24888
  })];
24887
24889
  case 2:
@@ -26652,7 +26654,7 @@ var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-
26652
26654
  styleInject(css_248z$3);
26653
26655
 
26654
26656
  var AddressForm$1 = observer(function (_a) {
26655
- var _b, _c, _d, _e, _f, _g, _h;
26657
+ var _b, _c, _d, _e, _f;
26656
26658
  var isErrorsVisible = _a.isErrorsVisible, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "validationResult"]);
26657
26659
  var vm = useState(function () { return new AddressFormViewModel(props); })[0];
26658
26660
  useEffect(function () {
@@ -26680,10 +26682,12 @@ var AddressForm$1 = observer(function (_a) {
26680
26682
  vm.hasState && (createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
26681
26683
  createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
26682
26684
  vm.districtOptions.length ? (createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, errorText: "İlçe seçin" })) : (createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
26683
- ((_g = vm.address.checkoutSettings) === null || _g === void 0 ? void 0 : _g.phoneRequirement) !==
26684
- IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
26685
- ((_h = vm.address.checkoutSettings) === null || _h === void 0 ? void 0 : _h.identityNumberRequirement) !==
26686
- 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" })))));
26685
+ !!vm.address.checkoutSettings &&
26686
+ vm.address.checkoutSettings.phoneRequirement !==
26687
+ IkasCheckoutRequirementEnum.INVISIBLE && (createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
26688
+ !!vm.address.checkoutSettings &&
26689
+ vm.address.checkoutSettings.identityNumberRequirement !==
26690
+ 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" })))));
26687
26691
  });
26688
26692
 
26689
26693
  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";
@@ -26950,7 +26954,7 @@ var PaymentGateways = observer(function (_a) {
26950
26954
  : pg.name)),
26951
26955
  expandContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD ? (createElement("div", null,
26952
26956
  createElement(CreditCardForm, { vm: vm }),
26953
- vm.installmentInfo && createElement(Installments, { vm: vm }))) : undefined,
26957
+ vm.installmentInfo && createElement(Installments, { vm: vm }))) : pg.description ? (createElement("div", null, pg.description)) : undefined,
26954
26958
  rightContent: (createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
26955
26959
  return pm.logoUrl ? (createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
26956
26960
  createElement("img", { src: pm.logoUrl }))) : (createElement("div", { className: styles$b.PaymentLogoContainer, key: index }, pm.name));
package/build/index.js CHANGED
@@ -24784,7 +24784,7 @@ var IkasCheckoutAPI = /** @class */ (function () {
24784
24784
  return __generator(this, function (_b) {
24785
24785
  switch (_b.label) {
24786
24786
  case 0:
24787
- QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n testMode\n }\n }\n "], ["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n testMode\n }\n }\n "])));
24787
+ QUERY = src(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "], ["\n query listPaymentGateway {\n listPaymentGateway {\n paymentMethods {\n name\n logoUrl\n }\n paymentMethodType\n id\n name\n description\n testMode\n }\n }\n "])));
24788
24788
  _b.label = 1;
24789
24789
  case 1:
24790
24790
  _b.trys.push([1, 3, , 4]);
@@ -24861,7 +24861,9 @@ var IkasCheckoutAPI = /** @class */ (function () {
24861
24861
  query: QUERY,
24862
24862
  variables: {
24863
24863
  lines: lines,
24864
- stockLocationIdList: stockLocationIdList,
24864
+ stockLocationIdList: stockLocationIdList.length
24865
+ ? stockLocationIdList
24866
+ : null,
24865
24867
  },
24866
24868
  })];
24867
24869
  case 2:
@@ -26632,7 +26634,7 @@ var styles$2 = {"CheckoutPage":"style-module_CheckoutPage__A_f2V","Left":"style-
26632
26634
  styleInject(css_248z$3);
26633
26635
 
26634
26636
  var AddressForm$1 = mobxReactLite.observer(function (_a) {
26635
- var _b, _c, _d, _e, _f, _g, _h;
26637
+ var _b, _c, _d, _e, _f;
26636
26638
  var isErrorsVisible = _a.isErrorsVisible, validationResult = _a.validationResult, props = __rest(_a, ["isErrorsVisible", "validationResult"]);
26637
26639
  var vm = React.useState(function () { return new AddressFormViewModel(props); })[0];
26638
26640
  React.useEffect(function () {
@@ -26660,10 +26662,12 @@ var AddressForm$1 = mobxReactLite.observer(function (_a) {
26660
26662
  vm.hasState && (React.createElement(FormItem, { type: FormItemType.SELECT, label: "Eyalet", value: ((_c = vm.state) === null || _c === void 0 ? void 0 : _c.id) || "", onChange: vm.onStateChange, options: vm.stateOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.state), errorText: "Eyalet seçin" })),
26661
26663
  React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l", value: ((_d = vm.city) === null || _d === void 0 ? void 0 : _d.id) || "", onChange: vm.onCityChange, options: vm.cityOptions, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.city), errorText: "Şehir seçin" }),
26662
26664
  vm.districtOptions.length ? (React.createElement(FormItem, { type: FormItemType.SELECT, label: "\u0130l\u00E7e", value: ((_e = vm.district) === null || _e === void 0 ? void 0 : _e.id) || "", onChange: vm.onDistrictChange, options: vm.districtOptions, errorText: "İlçe seçin" })) : (React.createElement(FormItem, { type: FormItemType.TEXT, label: "\u0130l\u00E7e", value: ((_f = vm.district) === null || _f === void 0 ? void 0 : _f.name) || "", onChange: vm.onDistrictInputChange })),
26663
- ((_g = vm.address.checkoutSettings) === null || _g === void 0 ? void 0 : _g.phoneRequirement) !==
26664
- IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
26665
- ((_h = vm.address.checkoutSettings) === null || _h === void 0 ? void 0 : _h.identityNumberRequirement) !==
26666
- 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" })))));
26665
+ !!vm.address.checkoutSettings &&
26666
+ vm.address.checkoutSettings.phoneRequirement !==
26667
+ IkasCheckoutRequirementEnum.INVISIBLE && (React.createElement(FormItem, { type: FormItemType.TEXT, label: "Telefon", autocomplete: "tel", value: vm.phone || "", onChange: vm.onPhoneChange, hasError: isErrorsVisible && !(validationResult === null || validationResult === void 0 ? void 0 : validationResult.phone), errorText: "Geçerli bir telefon girin" })),
26668
+ !!vm.address.checkoutSettings &&
26669
+ vm.address.checkoutSettings.identityNumberRequirement !==
26670
+ 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" })))));
26667
26671
  });
26668
26672
 
26669
26673
  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";
@@ -26930,7 +26934,7 @@ var PaymentGateways = mobxReactLite.observer(function (_a) {
26930
26934
  : pg.name)),
26931
26935
  expandContent: pg.paymentMethodType === IkasPaymentMethodType.CREDIT_CARD ? (React.createElement("div", null,
26932
26936
  React.createElement(CreditCardForm, { vm: vm }),
26933
- vm.installmentInfo && React.createElement(Installments, { vm: vm }))) : undefined,
26937
+ vm.installmentInfo && React.createElement(Installments, { vm: vm }))) : pg.description ? (React.createElement("div", null, pg.description)) : undefined,
26934
26938
  rightContent: (React.createElement(PaymentMethodLogos, null, pg.paymentMethods.map(function (pm, index) {
26935
26939
  return pm.logoUrl ? (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index },
26936
26940
  React.createElement("img", { src: pm.logoUrl }))) : (React.createElement("div", { className: styles$b.PaymentLogoContainer, key: index }, pm.name));
@@ -4,6 +4,7 @@ export declare type IkasPaymentGateway = {
4
4
  id: string | null;
5
5
  name: string;
6
6
  testMode: boolean | null;
7
+ description: string | null;
7
8
  };
8
9
  export declare type IkasPaymentMethod = {
9
10
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront",
3
- "version": "0.0.109",
3
+ "version": "0.0.110",
4
4
  "main": "./build/index.js",
5
5
  "module": "./build/index.es.js",
6
6
  "author": "Umut Ozan Yıldırım",