@ikas/storefront 6.1.0-beta.136 → 6.1.0-beta.138

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.
Files changed (36) hide show
  1. package/build/components/checkout/components/cart-summary/index.js +1 -1
  2. package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
  3. package/build/components/checkout/components/svg/coupon-code-tag.d.ts +6 -0
  4. package/build/components/checkout/components/svg/coupon-code-tag.js +1 -0
  5. package/build/components/checkout/components/svg/credit-balance.d.ts +6 -0
  6. package/build/components/checkout/components/svg/credit-balance.js +1 -0
  7. package/build/components/checkout/components/svg/gift-cart-tag.d.ts +6 -0
  8. package/build/components/checkout/components/svg/gift-cart-tag.js +1 -0
  9. package/build/components/checkout/components/svg/store-credit-tag.d.ts +6 -0
  10. package/build/components/checkout/components/svg/store-credit-tag.js +1 -0
  11. package/build/components/checkout/model.d.ts +5 -0
  12. package/build/components/checkout/model.js +1 -1
  13. package/build/components/checkout/steps/step-payment/index.js +1 -1
  14. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.d.ts +7 -0
  15. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.js +1 -0
  16. package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/style.module.scss.js +1 -0
  17. package/build/index.js +1 -1
  18. package/build/models/data/index.d.ts +1 -0
  19. package/build/models/data/order/gift-card-line/index.d.ts +2 -1
  20. package/build/models/data/order/gift-card-line/index.js +1 -1
  21. package/build/models/data/store-credit-balance/index.d.ts +26 -0
  22. package/build/models/data/store-credit-balance/index.js +1 -0
  23. package/build/models/ui/validator/form/login.d.ts +2 -1
  24. package/build/models/ui/validator/form/login.js +1 -1
  25. package/build/models/ui/validator/form/register.d.ts +11 -11
  26. package/build/models/ui/validator/form/register.js +1 -1
  27. package/build/models/ui/validator/index.d.ts +1 -1
  28. package/build/models/ui/validator/index.js +1 -1
  29. package/build/store/checkout/index.d.ts +1 -0
  30. package/build/store/checkout/index.js +1 -1
  31. package/build/store/customer/api.d.ts +10 -4
  32. package/build/store/customer/api.js +1 -1
  33. package/build/store/customer/index.d.ts +24 -5
  34. package/build/store/customer/index.js +1 -1
  35. package/build/store/product/index.d.ts +1 -0
  36. package/package.json +11 -11
@@ -1 +1 @@
1
- import*as e from"react";import{observer as t}from"mobx-react-lite";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";import{Checkbox as i}from"../../components/checkbox/index.js";import n from"../../components/error/index.js";import{PaymentGateways as r}from"./payment-gateways/index.js";import{BillingAddress as a}from"./billing-address/index.js";import{Button as c}from"../../components/button/index.js";import s from"../../components/master-pass/link-card-to-client/index.js";import{PayPal as l}from"../../components/paypal/index.js";import m from"../../components/notification-box/index.js";import{createTranslationInputData as p,useTranslation as d}from"../../../../utils/i18n.js";import u from"../../components/svg/lock.js";import y from"./style.module.scss.js";var k=t((function(t){var k=t.vm,f=d().t,g=e.useCallback((function(e){e.stopPropagation(),k.policyModalTitle=f("checkout-page:privacyPolicy"),k.policyModalText=k.privacyPolicy}),[k,k.privacyPolicy]),v=e.useCallback((function(e){e.stopPropagation(),k.policyModalTitle=f("checkout-page:termsOfService"),k.policyModalText=k.termsOfService}),[k,k.termsOfService]),C=o.getTranslations()["checkout-page"],P=p(C.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[y.TermsLabelSpan,k.isErrorsVisible&&!k.isTermsAndConditionsChecked?y.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?g:v},"{{ ackPrivacyPolicy }}"===t.value?f("checkout-page:ackPrivacyPolicy"):f("checkout-page:ackTermsOfService")):t.value}));return e.createElement("div",{className:[y.StepPayment,k.isPaymentMethodVisible?"":y.Disabled].join(" ")},e.createElement(n,{vm:k}),k.isFree&&e.createElement(m,{type:"success",content:f("checkout-page:freeOrderDescription")}),!k.isFree&&e.createElement(e.Fragment,null,k.mpVM.isLinkCardToClientVisible&&e.createElement(s,{vm:k}),e.createElement(r,{vm:k})),e.createElement(a,{vm:k}),k.checkoutSettings.showTermsAndConditionsCheckbox&&e.createElement("div",{style:{marginTop:k.useDifferentAddress?"12px":"0px"}},e.createElement(i,{value:k.isTermsAndConditionsChecked,hasError:k.isErrorsVisible&&!k.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,P),onChange:k.onTermsAndConditionsCheckedChange})),!k.isFree&&k.isPayPal?e.createElement("div",{className:y.PayPalContainer},e.createElement(l,{vm:k})):e.createElement(c,{style:{width:"100%",marginTop:"24px"},text:f("checkout-page:actions.completeOrder"),isLoading:k.isStepLoading,onClick:k.isDigitalOnly?k.onCompleteDigitalOnlyPaymentClick:k.onCompletePaymentClick}),!!f("checkout-page:securePaymentTooltip")&&e.createElement("div",{className:y.SecurePaymentContainer},e.createElement("span",{className:y.Lock},e.createElement(u,null)),e.createElement("span",null,f("checkout-page:securePaymentTooltip"))))}));export{k as CheckoutStepPayment};
1
+ import*as e from"react";import{observer as t}from"mobx-react-lite";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";import{Checkbox as i}from"../../components/checkbox/index.js";import n from"../../components/error/index.js";import{PaymentGateways as r}from"./payment-gateways/index.js";import{BillingAddress as a}from"./billing-address/index.js";import{Button as c}from"../../components/button/index.js";import s from"../../components/master-pass/link-card-to-client/index.js";import{PayPal as m}from"../../components/paypal/index.js";import l from"../../components/notification-box/index.js";import{createTranslationInputData as p,useTranslation as d}from"../../../../utils/i18n.js";import y from"../../components/svg/lock.js";import u from"./style.module.scss.js";import{StoreCredit as k}from"./payment-gateways/store-credit/index.js";var f=t((function(t){var f=t.vm,g=d().t,v=e.useCallback((function(e){e.stopPropagation(),f.policyModalTitle=g("checkout-page:privacyPolicy"),f.policyModalText=f.privacyPolicy}),[f,f.privacyPolicy]),C=e.useCallback((function(e){e.stopPropagation(),f.policyModalTitle=g("checkout-page:termsOfService"),f.policyModalText=f.termsOfService}),[f,f.termsOfService]),E=o.getTranslations()["checkout-page"],P=p(E.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[u.TermsLabelSpan,f.isErrorsVisible&&!f.isTermsAndConditionsChecked?u.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?v:C},"{{ ackPrivacyPolicy }}"===t.value?g("checkout-page:ackPrivacyPolicy"):g("checkout-page:ackTermsOfService")):t.value}));return e.createElement("div",{className:[u.StepPayment,f.isPaymentMethodVisible?"":u.Disabled].join(" ")},e.createElement(n,{vm:f}),e.createElement(k,{vm:f}),f.isFree&&e.createElement(l,{type:"success",content:g("checkout-page:freeOrderDescription")}),!f.isFree&&e.createElement(e.Fragment,null,f.mpVM.isLinkCardToClientVisible&&e.createElement(s,{vm:f}),e.createElement(r,{vm:f})),e.createElement(a,{vm:f}),f.checkoutSettings.showTermsAndConditionsCheckbox&&e.createElement("div",{style:{marginTop:f.useDifferentAddress?"12px":"0px"}},e.createElement(i,{value:f.isTermsAndConditionsChecked,hasError:f.isErrorsVisible&&!f.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,P),onChange:f.onTermsAndConditionsCheckedChange})),!f.isFree&&f.isPayPal?e.createElement("div",{className:u.PayPalContainer},e.createElement(m,{vm:f})):e.createElement(c,{style:{width:"100%",marginTop:"24px"},text:g("checkout-page:actions.completeOrder"),isLoading:f.isStepLoading,onClick:f.isDigitalOnly?f.onCompleteDigitalOnlyPaymentClick:f.onCompletePaymentClick}),!!g("checkout-page:securePaymentTooltip")&&e.createElement("div",{className:u.SecurePaymentContainer},e.createElement("span",{className:u.Lock},e.createElement(y,null)),e.createElement("span",null,g("checkout-page:securePaymentTooltip"))))}));export{f as CheckoutStepPayment};
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import CheckoutViewModel from "../../../../model";
3
+ declare type Props = {
4
+ vm: CheckoutViewModel;
5
+ };
6
+ export declare const StoreCredit: React.FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ import{__awaiter as e,__generator as t}from'./../../../../../../ext/tslib/tslib.es6.js';import*as r from"react";import{observer as n}from"mobx-react-lite";import"@ikas/storefront-config";import{formatCurrency as o}from"../../../../../../utils/currency.js";import{useTranslation as i}from"../../../../../../utils/i18n.js";import a from"./style.module.scss.js";import c from"../../../../components/svg/credit-balance.js";var l=n((function(n){var l,u,d=n.vm,m=i().t,v=r.useState(!1),f=v[0],C=v[1],h=null===(l=d.checkout.giftCardLines)||void 0===l?void 0:l.find((function(e){var t;return e.code===(null===(t=d.storeCreditBalance)||void 0===t?void 0:t.storeCredits[0].code)}));if(r.useEffect((function(){C(!!h)}),[h]),!(null===(u=d.storeCreditBalance)||void 0===u?void 0:u.amount))return null;var p=h?(null==h?void 0:h.amount)||0:d.finalPrice>d.storeCreditBalance.amount?d.storeCreditBalance.amount:d.finalPrice;return r.createElement("div",{className:a.StoreCredit},r.createElement("div",{className:a.StoreCreditBalance},r.createElement("div",{className:a.StoreCreditBalanceLeft},r.createElement("div",{style:{width:"24px",height:"24px"}},r.createElement(c,null)),r.createElement("div",null,r.createElement("span",{className:a.StoreCreditBalanceAmount},o(p,d.checkout.currencyCode,d.checkout.currencySymbol)),r.createElement("span",null,m("checkout-page:storeCreditBalance")))),r.createElement("div",{className:a.StoreCreditBalanceRight},r.createElement("div",null,r.createElement(s,{value:f,onChange:function(r){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return C(r),r?(d.checkout.couponCode=(null===(e=d.storeCreditBalance)||void 0===e?void 0:e.storeCredits[0].code)||null,[4,d.onCouponCodeApply()]):[3,2];case 1:return t.sent(),[3,5];case 2:return[4,d.removeGiftCardLine((null==h?void 0:h.giftCardId)||"")];case 3:return t.sent(),[4,d.reInitPaymentMethod()];case 4:t.sent(),t.label=5;case 5:return[2]}}))}))}})))))})),s=function(e){var t=e.value,n=e.onChange;return r.createElement("div",{onClick:function(){n(!t)},className:[a.ToggleSwitch,t?a.ToggleSwitchActive:""].join(" ")},r.createElement("div",{className:[a.ToggleSwitchThumb,t?a.ToggleSwitchThumbActive:""].join(" ")}))};export{l as StoreCredit};
@@ -0,0 +1 @@
1
+ import e from'./../../../../../../ext/style-inject/dist/style-inject.es.js';var t={StoreCredit:"style-module_StoreCredit__uHh7P",StoreCreditBalance:"style-module_StoreCreditBalance__kGygT",StoreCreditBalanceLeft:"style-module_StoreCreditBalanceLeft__vyYsH",StoreCreditBalanceRight:"style-module_StoreCreditBalanceRight__CLOTz",StoreCreditBalanceAmount:"style-module_StoreCreditBalanceAmount__XoXTX",ToggleSwitch:"style-module_ToggleSwitch__kDPf4",ToggleSwitchActive:"style-module_ToggleSwitchActive__aDOuc",ToggleSwitchThumb:"style-module_ToggleSwitchThumb__70mB3",ToggleSwitchThumbActive:"style-module_ToggleSwitchThumbActive__Di-kz"};e(".style-module_StoreCredit__uHh7P {\n padding: 12px;\n border-radius: 6px;\n border: 1px solid var(--checkout-border-color);\n margin-bottom: 16px;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT {\n display: flex;\n justify-content: space-between;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT .style-module_StoreCreditBalanceLeft__vyYsH {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT .style-module_StoreCreditBalanceLeft__vyYsH span {\n font-size: 16px;\n line-height: 24px;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT .style-module_StoreCreditBalanceLeft__vyYsH span:first-child {\n margin-right: 4px;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT .style-module_StoreCreditBalanceRight__CLOTz {\n display: flex;\n gap: 6px;\n}\n.style-module_StoreCredit__uHh7P .style-module_StoreCreditBalance__kGygT .style-module_StoreCreditBalanceAmount__XoXTX {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n.style-module_StoreCredit__uHh7P .style-module_ToggleSwitch__kDPf4 {\n position: relative;\n width: 32px;\n height: 20px;\n background-color: #CDD5DF;\n border-radius: 12px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n display: flex;\n align-items: center;\n padding: 3px;\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);\n}\n.style-module_StoreCredit__uHh7P .style-module_ToggleSwitch__kDPf4.style-module_ToggleSwitchActive__aDOuc {\n background-color: var(--checkout-button-bg-color);\n}\n.style-module_StoreCredit__uHh7P .style-module_ToggleSwitchThumb__70mB3 {\n width: 14px;\n height: 14px;\n background-color: white;\n border-radius: 50%;\n transform: translateX(0px);\n transition: transform 0.2s ease;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n position: absolute;\n}\n.style-module_StoreCredit__uHh7P .style-module_ToggleSwitchThumb__70mB3.style-module_ToggleSwitchThumbActive__Di-kz {\n transform: translateX(12px);\n}");export{t as default};
package/build/index.js CHANGED
@@ -1 +1 @@
1
- export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{PlainImage}from"./components/plain-image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{PaypalExpressCheckout}from"./components/paypal-express-checkout/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStorefrontPopupAnalytics}from"./models/data/storefront-popup/storefront-popup-analytics/index.js";export{IkasStorefrontPopupDateFilter}from"./models/data/storefront-popup/storefront-popup-date-filter/index.js";export{IkasStorefrontPopupDisplayFilter,IkasStorefrontPopupDisplayFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-filter/index.js";export{IkasStorefrontPopupDisplayFrequencyEnum,IkasStorefrontPopupDisplaySettings,IkasStorefrontPopupDisplayTriggerTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-settings/index.js";export{IkasStorefrontPopupPageFilter,IkasStorefrontPopupPageFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-page-filter/index.js";export{IkasStorefrontPopupRouting}from"./models/data/storefront-popup/storefront-popup-routing/index.js";export{IkasStorefrontPopup,IkasStorefrontPopupDeviceTypeEnum,IkasStorefrontPopupStatusEnum,IkasStorefrontPopupTypeEnum}from"./models/data/storefront-popup/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as u from"./pages/editor.js";export{u as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as T from"./pages/account/activate.js";export{T as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasPaymentMethodTypeWithPrices,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionSourceWithPrices,IkasTransactionStatus,IkasTransactionStatusWithPrices,IkasTransactionType,IkasTransactionTypeWithPrices,IkasVariantSelectionType}from"@ikas/storefront-models";export{IkasTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/transaction-with-prices/index.js";
1
+ export{Analytics}from"./analytics/analytics.js";export{AnalyticsBody,AnalyticsHead}from"./analytics/head/index.js";export{IkasPage}from"./components/page/index.js";export{IkasPageHead}from"./components/page/head.js";export{Image}from"./components/image/index.js";export{PlainImage}from"./components/plain-image/index.js";export{default as Link}from"./components/link/index.js";export{IkasEditorComponentLoader}from"./components/page-editor/loader/index.js";export{GoogleCaptcha}from"./components/google-captcha/index.js";export{PaypalExpressCheckout}from"./components/paypal-express-checkout/index.js";export{useStore}from"./hooks/useStore.js";export{useCustomerReviews}from"./hooks/useCustomerReviews.js";import"react";export{IkasBaseModel}from"./models/data/base/index.js";export{IkasBlogCategory}from"./models/data/blog/category/index.js";export{IkasBlogContent}from"./models/data/blog/content/index.js";export{IkasBlogMetaData,IkasBlogMetaDataTargetType}from"./models/data/blog/meta-data/index.js";export{IkasBlogTag}from"./models/data/blog/tag/index.js";export{IkasBlogWriter}from"./models/data/blog/writer/index.js";export{IkasBlog}from"./models/data/blog/index.js";export{IkasProductBrandTranslation}from"./models/data/brand/translation/index.js";export{IkasBrand,IkasBrandOrderType}from"./models/data/brand/index.js";export{IkasCampaignOfferProduct,IkasCampaignOfferProductTranslation}from"./models/data/campaign-offer/product/index.js";export{IkasCampaignOffer,IkasCampaignOfferTriggerSettings}from"./models/data/campaign-offer/index.js";export{IkasAvailableShippingMethod}from"./models/data/cart/available-shipping-method/index.js";export{IkasCartCampaignOffer}from"./models/data/cart/campaign-offer/index.js";export{IkasCart}from"./models/data/cart/index.js";export{IkasCategoryPathItem}from"./models/data/category/path-item/index.js";export{IkasCategoryTranslation}from"./models/data/category/translations/index.js";export{IkasCategory}from"./models/data/category/index.js";export{IkasCheckout}from"./models/data/checkout/index.js";export{IkasCheckoutOption}from"./models/data/checkout-settings/option/index.js";export{IkasCheckoutSettingsPrice}from"./models/data/checkout-settings/price/index.js";export{IkasCheckoutSettings}from"./models/data/checkout-settings/index.js";export{IkasCity}from"./models/data/city/index.js";export{IkasContactForm}from"./models/data/contact-form/index.js";export{IkasCountry}from"./models/data/country/index.js";export{IkasCustomerAddressCity}from"./models/data/customer/address/city/index.js";export{IkasCustomerAddressCountry}from"./models/data/customer/address/country/index.js";export{IkasCustomerAddressDistrict}from"./models/data/customer/address/district/index.js";export{IkasCustomerAddressRegion}from"./models/data/customer/address/region/index.js";export{IkasCustomerAddressState}from"./models/data/customer/address/state/index.js";export{IkasCustomerAddress}from"./models/data/customer/address/index.js";export{IkasLocalizedCustomerAddress}from"./models/data/customer/address/ikas-localized-customer-address.js";export{IkasCustomerAttributeOption}from"./models/data/customer/attribute/option/index.js";export{IkasCustomerAttributeSalesChannel}from"./models/data/customer/attribute/sales-channel/index.js";export{IkasCustomerAttributeOptionTranslation}from"./models/data/customer/attribute/translation/option/index.js";export{IkasCustomerAttributeTranslation}from"./models/data/customer/attribute/translation/index.js";export{IkasCustomerAttributeValue}from"./models/data/customer/attribute/value/index.js";export{IkasCustomerAttribute}from"./models/data/customer/attribute/index.js";export{IkasCustomerPriceListRuleFilter}from"./models/data/customer/price-list-rule/filter/index.js";export{IkasCustomerPriceListRule}from"./models/data/customer/price-list-rule/index.js";export{IkasCustomerReviewSettings}from"./models/data/customer/review/settings/index.js";export{IkasCustomerReviewSummaryStar}from"./models/data/customer/review/summary/star/index.js";export{IkasCustomerReviewSummary}from"./models/data/customer/review/summary/index.js";export{IkasCustomerReview}from"./models/data/customer/review/index.js";export{IkasCustomer}from"./models/data/customer/index.js";export{IkasCustomerRegisterSubscriptionInput}from"./models/data/customer-form-data-input/customer-register-subscription-input/index.js";export{IkasCustomerGenderTypeEnum,IkasSaveCustomerFormDataInput}from"./models/data/customer-form-data-input/index.js";export{IkasDistrict}from"./models/data/district/index.js";export{IkasFavoriteProduct}from"./models/data/favorite-product/index.js";export{IkasFilterCategory}from"./models/data/filter-category/index.js";export{IkasHTMLMetaDataTranslations}from"./models/data/html-meta-data/translations/index.js";export{IkasHTMLMetaData,IkasHTMLMetaDataOverride,IkasHTMLMetaDataTargetType}from"./models/data/html-meta-data/index.js";export{IkasImage}from"./models/data/image/index.js";export{IkasLastViewedProduct}from"./models/data/last-viewed-product/index.js";export{IkasMerchantSettings}from"./models/data/merchant-settings/index.js";export{IkasOrderAddressCity}from"./models/data/order/address/city/index.js";export{IkasOrderAddressCountry}from"./models/data/order/address/country/index.js";export{IkasOrderAddressDistrict}from"./models/data/order/address/district/index.js";export{IkasOrderAddressRegion}from"./models/data/order/address/region/index.js";export{IkasOrderAddressState}from"./models/data/order/address/state/index.js";export{IkasOrderAddress}from"./models/data/order/address/index.js";export{IkasOrderAdjustmentAppliedOrderLine}from"./models/data/order/adjustment/applied-order-line/index.js";export{IkasOrderAdjustment}from"./models/data/order/adjustment/index.js";export{IkasOrderCustomer}from"./models/data/order/customer/index.js";export{IkasOrderGiftPackageLine}from"./models/data/order/gift-line/index.js";export{IkasInvoice}from"./models/data/order/invoice/index.js";export{IkasOrderLineDiscount}from"./models/data/order/line-item/discount/index.js";export{IkasOrderLineItemOptionValue}from"./models/data/order/line-item/option/value/index.js";export{IkasOrderLineItemOption}from"./models/data/order/line-item/option/index.js";export{IkasOrderLineVariantBrand}from"./models/data/order/line-item/variant/brand/index.js";export{IkasOrderLineVariantCategory,IkasOrderLineVariantCategoryPath}from"./models/data/order/line-item/variant/category/index.js";export{IkasOrderLineVariantPrice}from"./models/data/order/line-item/variant/price/index.js";export{IkasOrderLineVariantVariantValue}from"./models/data/order/line-item/variant/value/index.js";export{IkasOrderLineVariant}from"./models/data/order/line-item/variant/index.js";export{IkasOrderLineItem}from"./models/data/order/line-item/index.js";export{IkasOrderTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/index.js";export{IkasTrackingInfo}from"./models/data/order/package/tracking-info/index.js";export{IkasOrderPackage}from"./models/data/order/package/index.js";export{IkasOrderPaymentMethod}from"./models/data/order/payment-method/index.js";export{IkasOrderRefundOrderLineInput}from"./models/data/order/refund/line-item/index.js";export{IkasOrderRefundSettings}from"./models/data/order/refund/settings/index.js";export{IkasRefund}from"./models/data/order/refund/index.js";export{IkasOrderShippingLine}from"./models/data/order/shipping-line/index.js";export{IkasOrderTaxLine}from"./models/data/order/tax-line/index.js";export{IkasTransactionError}from"./models/data/order/transaction/error/index.js";export{IkasTransactionInstallmentPrice}from"./models/data/order/transaction/payment-method-detail/installment-price/index.js";export{IkasTransactionPaymentMethodDetail}from"./models/data/order/transaction/payment-method-detail/index.js";export{IkasOrderTransaction}from"./models/data/order/transaction/index.js";export{IkasOrder}from"./models/data/order/index.js";export{IkasPaymentGatewayAdditionalPrice}from"./models/data/payment-gateway/additional-price/index.js";export{IkasPaymentGatewaySettings}from"./models/data/payment-gateway/settings/index.js";export{IkasPaymentGatewayTranslation}from"./models/data/payment-gateway/translation/index.js";export{IkasPaymentGateway}from"./models/data/payment-gateway/index.js";export{IkasProductAttributeOption}from"./models/data/product/attribute/option/index.js";export{IkasProductAttributeTableCell}from"./models/data/product/attribute/table-cell/index.js";export{IkasProductAttributeTableTemplate}from"./models/data/product/attribute/table-template/index.js";export{IkasProductAttributeOptionTranslation,IkasProductAttributeTranslation}from"./models/data/product/attribute/translation/index.js";export{IkasProductAttribute}from"./models/data/product/attribute/index.js";export{IkasAttributeTableCellValue,IkasProductAttributeMap,IkasProductAttributeValue}from"./models/data/product/attribute-value/index.js";export{IkasProductBackInStockSettings}from"./models/data/product/back-in-stock-settings/index.js";export{IkasApplicableProductFilterValue,IkasFilterRangeValue,IkasProductFilter,IkasProductFilterNumberRangeListOption,IkasProductFilterSettings,IkasProductFilterValue,parseRangeStr}from"./models/data/product/filter/index.js";export{IkasProductCampaignData}from"./models/data/product/campaign/data/index.js";export{IkasProductCampaignFilter}from"./models/data/product/campaign/filter/index.js";export{IkasProductBuyX,IkasProductBuyXThenGetY,IkasProductGetY}from"./models/data/product/campaign/product-buyx-then-gety/index.js";export{IkasProductCampaignDateRangeField}from"./models/data/product/campaign/product-campaign-date-range-field/index.js";export{IkasCampaignMinMaxRangeField,IkasProductFixedDiscount}from"./models/data/product/campaign/product-fixed-discount/index.js";export{IkasProductCampaign}from"./models/data/product/campaign/index.js";export{IkasProductCampaignOffer,IkasProductOffer}from"./models/data/product/campaign-offer/index.js";export{IkasProductImage}from"./models/data/product/image/index.js";export{IkasProductOption,IkasProductOptionDateSettings,IkasProductOptionFileSettings,IkasProductOptionOtherPrice,IkasProductOptionSelectSettings,IkasProductOptionSelectValue,IkasProductOptionTextSettings}from"./models/data/product/option-set/option/index.js";export{IkasProductOptionSelectValueTranslations,IkasProductOptionSet,IkasProductOptionSetTranslations,IkasProductOptionTranslations}from"./models/data/product/option-set/index.js";export{IkasProductStockLocations}from"./models/data/product/stock-location/index.js";export{IkasProductTag}from"./models/data/product/tag/index.js";export{IkasProductPrice}from"./models/data/product/variant/price/index.js";export{IkasProductVariant}from"./models/data/product/variant/index.js";export{IkasProductVariantType}from"./models/data/product/variant-type/index.js";export{IkasProduct}from"./models/data/product/index.js";export{IkasProductFile}from"./models/data/product-file/index.js";export{IkasRaffle,IkasRaffleAppliedProduct,IkasRaffleDateRangeField,IkasRaffleMetaData,IkasRaffleParticipant}from"./models/data/raffle/index.js";export{IkasSalesChannel,IkasSalesChannelPaymentGateway,IkasSalesChannelStockLocation}from"./models/data/sales-channel/index.js";export{IkasShippingZoneRegion}from"./models/data/shipping-zone/state/city/district/region/index.js";export{IkasShippingZoneDistrict}from"./models/data/shipping-zone/state/city/district/index.js";export{IkasShippingZoneCity}from"./models/data/shipping-zone/state/city/index.js";export{IkasShippingZoneState}from"./models/data/shipping-zone/state/index.js";export{IkasShippingZone}from"./models/data/shipping-zone/index.js";export{IkasState}from"./models/data/state/index.js";export{IkasStockLocationAddressCity}from"./models/data/stock-location/address/city/index.js";export{IkasStockLocationAddressCountry}from"./models/data/stock-location/address/country/index.js";export{IkasStockLocationAddressDistrict}from"./models/data/stock-location/address/district/index.js";export{IkasStockLocationAddressState}from"./models/data/stock-location/address/state/index.js";export{IkasStockLocationAddress}from"./models/data/stock-location/address/index.js";export{IkasAvailableStockLocation}from"./models/data/stock-location/available/index.js";export{IkasStockLocation}from"./models/data/stock-location/index.js";export{IkasStoreCredit,IkasStoreCreditBalance,IkasStoreCreditSalesChannel}from"./models/data/store-credit-balance/index.js";export{IkasStorefrontPopupAnalytics}from"./models/data/storefront-popup/storefront-popup-analytics/index.js";export{IkasStorefrontPopupDateFilter}from"./models/data/storefront-popup/storefront-popup-date-filter/index.js";export{IkasStorefrontPopupDisplayFilter,IkasStorefrontPopupDisplayFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-filter/index.js";export{IkasStorefrontPopupDisplayFrequencyEnum,IkasStorefrontPopupDisplaySettings,IkasStorefrontPopupDisplayTriggerTypeEnum}from"./models/data/storefront-popup/storefront-popup-display-settings/index.js";export{IkasStorefrontPopupPageFilter,IkasStorefrontPopupPageFilterTypeEnum}from"./models/data/storefront-popup/storefront-popup-page-filter/index.js";export{IkasStorefrontPopupRouting}from"./models/data/storefront-popup/storefront-popup-routing/index.js";export{IkasStorefrontPopup,IkasStorefrontPopupDeviceTypeEnum,IkasStorefrontPopupStatusEnum,IkasStorefrontPopupTypeEnum}from"./models/data/storefront-popup/index.js";export{IkasStorefrontB2BSettings}from"./models/data/storefront/b2b-settings/index.js";export{IkasStorefrontDomain}from"./models/data/storefront/domain/index.js";export{IkasIndexPageSeoSetting}from"./models/data/storefront/index-page-seo-setting/index.js";export{IkasStorefrontLocalization}from"./models/data/storefront/localization/index.js";export{IkasStorefrontDynamicCurrencySettings}from"./models/data/storefront/routing/dynamic-currency/index.js";export{IkasStorefrontRouting}from"./models/data/storefront/routing/index.js";export{IkasStorefrontTheme}from"./models/data/storefront/theme/index.js";export{IkasStorefrontThemeLocalization}from"./models/data/storefront/theme-localization/index.js";export{IkasStorefront}from"./models/data/storefront/index.js";export{IkasThemeJsonComponentProp}from"./models/data/theme-json/component/prop/index.js";export{ComponentTranslation,IkasThemeJsonComponent}from"./models/data/theme-json/component/index.js";export{IkasThemeJsonCustomData,IkasThemeJsonCustomDataEnumOptionTranslation,IkasThemeJsonCustomDataTranslation,IkasThemeJsonEnumOption}from"./models/data/theme-json/custom-data/index.js";export{IkasThemeJsonPageComponent}from"./models/data/theme-json/page/component/index.js";export{IkasThemeJsonPage,IkasThemeJsonPageSpecification}from"./models/data/theme-json/page/index.js";export{IkasThemeJsonColor,IkasThemeJsonColorTranslation}from"./models/data/theme-json/settings/color/index.js";export{IkasThemeJsonFavicon}from"./models/data/theme-json/settings/favicon/index.js";export{IkasThemeJsonFontFamily}from"./models/data/theme-json/settings/font-family/index.js";export{IkasThemeJsonSettings}from"./models/data/theme-json/settings/index.js";export{CHECKOUT_ID,IkasThemeJson}from"./models/data/theme-json/index.js";export{IkasVariantValue}from"./models/data/variant-type/variant-value/index.js";export{IkasVariantType}from"./models/data/variant-type/index.js";export{IkasVideo}from"./models/data/video/index.js";export{AddressFormItem,BillingFormItem}from"@ikas/localized-address";export{IkasBlogList,IkasBlogListType}from"./models/ui/blog-list/index.js";export{IkasBlogCategoryList,IkasBlogCategoryListType}from"./models/ui/blog-category-list/index.js";export{IkasBrandList,IkasBrandListSortType,IkasBrandListType}from"./models/ui/brand-list/index.js";export{IkasCategoryList,IkasCategoryListSortType,IkasCategoryListType}from"./models/ui/category-list/index.js";export{IkasNavigationLink}from"./models/ui/navigation-link/index.js";export{IkasProductList,IkasProductListSortByTypeEnum,IkasProductListSortType,IkasProductListType,IkasRelatedProductsType}from"./models/ui/product-list/index.js";export{IkasAttributeDetail}from"./models/ui/product-attribute-detail/index.js";export{IkasAttributeList}from"./models/ui/product-attribute-list/index.js";export{IkasCustomerReviewList}from"./models/ui/customer-review-list/index.js";export{IkasCustomerReviewSummaryList}from"./models/ui/customer-review-summary-list/index.js";export{Validator}from"./models/ui/validator/index.js";export{EmailRule,EqualsRule,IdentityNumberRule,LessThanRule,MaxRule,MinRule,PhoneRule,RequiredRule,ValidationRule,ValidatorErrorType}from"./models/ui/validator/rules/index.js";export{LoginForm}from"./models/ui/validator/form/login.js";export{AddressForm}from"./models/ui/validator/form/address.js";export{IkasAddressForm}from"./models/ui/validator/form/ikas-address.js";export{RegisterForm}from"./models/ui/validator/form/register.js";export{ContactForm}from"./models/ui/validator/form/contact-form.js";export{ForgotPasswordForm}from"./models/ui/validator/form/forgot-password.js";export{RecoverPasswordForm}from"./models/ui/validator/form/recover-password.js";export{AccountInfoForm}from"./models/ui/validator/form/account-info.js";export{RaffleForm}from"./models/ui/validator/form/raffle-form.js";export{CustomerReviewForm}from"./models/ui/validator/form/customer-review.js";export{IkasComponentRenderer}from"./models/ui/component-renderer/index.js";export{IkasRaffleList}from"./models/ui/raffle-list/index.js";import*as e from"./pages/home.js";export{e as IndexPage};import*as t from"./pages/_slug_/index.js";export{t as SlugPage};import*as o from"./pages/pages/_slug_.js";export{o as CustomPage};import*as a from"./pages/checkout.js";export{a as CheckoutPage};import*as r from"./pages/account/index.js";export{r as AccountPage};import*as s from"./pages/account/addresses.js";export{s as AddressesPage};import*as d from"./pages/account/orders/index.js";export{d as OrdersPage};import*as i from"./pages/account/orders/_id_.js";export{i as OrderDetailPage};import*as n from"./pages/account/login.js";export{n as LoginPage};import*as m from"./pages/account/register.js";export{m as RegisterPage};import*as p from"./pages/account/forgot-password.js";export{p as ForgotPasswordPage};import*as l from"./pages/account/recover-password.js";export{l as RecoverPasswordPage};import*as x from"./pages/cart.js";export{x as CartPage};import*as u from"./pages/editor.js";export{u as EditorPage};import*as c from"./pages/account/favorite-products.js";export{c as FavoriteProductsPage};import*as f from"./pages/search.js";export{f as SearchPage};import*as k from"./pages/404.js";export{k as NotFoundPage};import*as I from"./pages/blog/index.js";export{I as BlogPage};import*as g from"./pages/blog/_slug_.js";export{g as BlogSlugPage};import*as j from"./pages/raffle/_slug_.js";export{j as RafflePage};import*as y from"./pages/raffle/index.js";export{y as RafflesPage};import*as P from"./pages/account/raffles.js";export{P as AccountRafflesPage};import*as S from"./pages/account/activate.js";export{S as ActivateCustomerPage};export{IkasBaseStore}from"./store/base.js";export{IkasCustomerStore}from"./store/customer/index.js";export{IkasCartStore}from"./store/cart/index.js";export{formatDate}from"./utils/helper.js";export{formatCurrency}from"./utils/currency.js";export{createTranslationInputData,useTranslation}from"./utils/i18n.js";export{IkasAdjustmentType,IkasAmountType,IkasCampaignApplicablePrice,IkasCampaignCreatedFor,IkasCampaignFilterType,IkasCampaignOfferProductShowCriteria,IkasCampaignOfferTargetPageType,IkasCampaignType,IkasCartCampaignOfferStatus,IkasCategoryProductsOrderType as IkasCategoryOrderType,IkasCheckoutRequirement,IkasCustomerAccountStatus,IkasCustomerAttributeType,IkasCustomerEmailSubscriptionStatus,IkasCustomerPriceListRuleFilterType,IkasCustomerPriceListRuleValueType,IkasCustomerRegistrationSource,IkasCustomerReviewStatus,IkasInvoiceType,IkasOrderCancelReason,IkasOrderLineItemStatus,IkasOrderPackageFullfillStatus,IkasOrderPackageStatus,IkasOrderPaymentStatus,IkasOrderShippingMethod,IkasOrderStatus,IkasPaymentGatewayAdditionalPriceType,IkasPaymentGatewaySettingsType,IkasPaymentGatewayTransactionFeeType,IkasPaymentGatewayType,IkasPaymentMethodType,IkasPaymentMethodTypeWithPrices,IkasProductAttributeType,IkasProductFilterDisplayType,IkasProductFilterSortType,IkasProductFilterType,IkasProductOptionSelectType,IkasProductOptionType,IkasProductStockFilterValue,IkasProductType,IkasRaffleMetadataTargetType,IkasRaffleVerificationType,IkasShippingMethod,IkasStockLocationDeliveryTime,IkasStockLocationType,IkasStorefrontB2BShowPricesEnum,IkasStorefrontB2BShowProductsEnum,IkasStorefrontStatus,IkasThemeJsonComponentPropType,IkasThemeJsonPageType,IkasThemeJsonStockPreference,IkasTransactionSourceWithPrices,IkasTransactionStatus,IkasTransactionStatusWithPrices,IkasTransactionType,IkasTransactionTypeWithPrices,IkasVariantSelectionType}from"@ikas/storefront-models";export{IkasTransactionWithPrices}from"./models/data/order/order-transaction-with-prices/transaction-with-prices/index.js";
@@ -130,6 +130,7 @@ export * from "./stock-location/address/state";
130
130
  export * from "./stock-location/address";
131
131
  export * from "./stock-location/available";
132
132
  export * from "./stock-location";
133
+ export * from "./store-credit-balance";
133
134
  export * from "./storefront-popup/storefront-popup-analytics";
134
135
  export * from "./storefront-popup/storefront-popup-date-filter";
135
136
  export * from "./storefront-popup/storefront-popup-display-filter";
@@ -1,8 +1,9 @@
1
- import { IkasOrderGiftCardLine as IOrderGiftCardLine } from "@ikas/storefront-models";
1
+ import { IkasGiftCardType, IkasOrderGiftCardLine as IOrderGiftCardLine } from "@ikas/storefront-models";
2
2
  export declare class IkasOrderGiftCardLine implements IOrderGiftCardLine {
3
3
  amount: number;
4
4
  code: string;
5
5
  giftCardId: string;
6
6
  id: string;
7
+ type: IkasGiftCardType;
7
8
  constructor(data: IOrderGiftCardLine);
8
9
  }
@@ -1 +1 @@
1
- import{makeAutoObservable as t}from"mobx";var i=function(i){this.amount=i.amount||0,this.code=i.code||"",this.giftCardId=i.giftCardId||"",this.id=i.id||"",t(this)};export{i as IkasOrderGiftCardLine};
1
+ import{IkasGiftCardType as t}from"@ikas/storefront-models";import{makeAutoObservable as i}from"mobx";var o=function(o){this.amount=o.amount||0,this.code=o.code||"",this.giftCardId=o.giftCardId||"",this.id=o.id||"",this.type=o.type||t.GIFT_CARD,i(this)};export{o as IkasOrderGiftCardLine};
@@ -0,0 +1,26 @@
1
+ import { IkasStoreCreditBalance as IStoreCreditBalance } from "@ikas/storefront-models";
2
+ import { IkasStoreCredit as IStoreCredit } from "@ikas/storefront-models";
3
+ import { IkasStoreCreditSalesChannel as IStoreCreditSalesChannel, IkasStoreCreditType } from "@ikas/storefront-models";
4
+ export declare class IkasStoreCreditBalance implements IStoreCreditBalance {
5
+ amount: number;
6
+ storeCredits: IkasStoreCredit[];
7
+ constructor(data: IStoreCreditBalance);
8
+ }
9
+ export declare class IkasStoreCredit implements IStoreCredit {
10
+ usedAmount: number;
11
+ usedAllAmount: boolean | null;
12
+ type: IkasStoreCreditType;
13
+ salesChannels: IkasStoreCreditSalesChannel[];
14
+ minimumRequiredCartAmount: number | null;
15
+ customerId: string | null;
16
+ code: string;
17
+ amount: number;
18
+ active: boolean;
19
+ constructor(data: IStoreCredit);
20
+ }
21
+ export declare class IkasStoreCreditSalesChannel implements IStoreCreditSalesChannel {
22
+ salesChannelId: string;
23
+ storefrontId: string | null;
24
+ storefrontRoutingId: string | null;
25
+ constructor(data: IStoreCreditSalesChannel);
26
+ }
@@ -0,0 +1 @@
1
+ import{makeAutoObservable as t}from"mobx";var s=function(t){this.amount=t.amount,this.storeCredits=t.storeCredits.map((function(t){return new n(t)}))},n=function(s){this.usedAmount=s.usedAmount,this.usedAllAmount=s.usedAllAmount,this.type=s.type,this.salesChannels=s.salesChannels,this.minimumRequiredCartAmount=s.minimumRequiredCartAmount,this.customerId=s.customerId,this.code=s.code,this.amount=s.amount,this.active=s.active,t(this)},e=function(s){this.salesChannelId=s.salesChannelId,this.storefrontId=s.storefrontId,this.storefrontRoutingId=s.storefrontRoutingId,t(this)};export{n as IkasStoreCredit,s as IkasStoreCreditBalance,e as IkasStoreCreditSalesChannel};
@@ -38,11 +38,12 @@ export declare class LoginForm {
38
38
  onPhoneChange: (value: string) => void;
39
39
  validateAll(): Promise<boolean>;
40
40
  login(): Promise<LoginResponse>;
41
- smsLogin(): Promise<LoginResponse>;
42
41
  }
43
42
  declare type LoginResponse = {
44
43
  isFormError: boolean;
45
44
  isSuccess: boolean;
46
45
  errorCodes: LoginResponseErrorCode[];
46
+ otpSend: boolean;
47
+ flowId: string | null;
47
48
  };
48
49
  export {};
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as r,__spreadArray as t,__assign as s}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as o,computed as i,observable as n,action as a}from"mobx";import{Validator as l}from"../index.js";import{IkasBaseStore as u}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";import{PhoneRule as d,RequiredRule as m,EmailRule as c,MinRule as p}from"../rules/index.js";var h=function(){function h(e){var r=this;this.model={email:"",password:"",isSmsLogin:!1,phone:null},this.validatorRules=function(e){return void 0===e&&(e=!1),t([new m({fieldKey:"email",valuePath:"email",message:r.message.requiredRule}),new m({fieldKey:"password",valuePath:"password",message:r.message.requiredRule}),new c({fieldKey:"email",valuePath:"email",message:r.message.emailRule}),new p({fieldKey:"password",valuePath:"password",minValue:6,message:r.message.minRule})],e?[new d({fieldKey:"phone",valuePath:"phone",message:r.message.phoneRule})]:[],!0)},this.onEmailChange=function(e){r.email=e},this.onPasswordChange=function(e){r.password=e},this.onSmsLoginChange=function(e){e?r.validator.setRules(r.validatorRules(!0)):r.validator.setRules(r.validatorRules(!1)),r.isSmsLogin=e},this.onPhoneChange=function(e){r.phone=e},o(this,{emailErrorMessage:i,passwordErrorMessage:i,hasError:i,redirect:i,email:i,password:i,model:n,validateAll:a,login:a,phoneErrorMessage:i}),this.message=e.message,this.validator=new l(this.model,this.validatorRules())}return Object.defineProperty(h.prototype,"phone",{get:function(){return this.model.phone},set:function(e){this.model.phone=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"email",{get:function(){return this.model.email},set:function(e){this.model.email=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"password",{get:function(){return this.model.password},set:function(e){this.model.password=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"emailErrorMessage",{get:function(){return this.validator.results.email.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"passwordErrorMessage",{get:function(){return this.validator.results.password.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"phoneErrorMessage",{get:function(){var e;return null===(e=this.validator.results.phone)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSmsLogin",{get:function(){return this.model.isSmsLogin},set:function(e){this.model.isSmsLogin=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"redirect",{get:function(){if("undefined"!=typeof window)return new URLSearchParams(window.location.search).get("redirect")},enumerable:!1,configurable:!0}),h.prototype.validateAll=function(){var e=this.isSmsLogin?["email","password"]:void 0;return this.validator.validateAll(e)},h.prototype.login=function(){return e(this,void 0,void 0,(function(){var e,t;return r(this,(function(r){switch(r.label){case 0:return e={isFormError:!1,isSuccess:!1,errorCodes:[]},[4,this.validateAll()];case 1:if(r.sent())return e.isFormError=!0,[2,e];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,u.getInstance().customerStore.customerLogin(this.model.email,this.model.password)];case 3:return t=r.sent(),e.isSuccess=t.isSuccess,e.errorCodes=t.errorCodes,[2,e];case 4:return r.sent(),[2,e];case 5:return[2]}}))}))},h.prototype.smsLogin=function(){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return e={isFormError:!1,isSuccess:!1,errorCodes:[]},[4,this.validateAll()];case 1:if(r.sent())return e.isFormError=!0,[2,e];try{return[2,s(s({},e),{isSuccess:!0})]}catch(r){return[2,e]}return[2]}}))}))},h}();export{h as LoginForm};
1
+ import{__awaiter as e,__generator as r,__spreadArray as o}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as s,computed as t,observable as i,action as n}from"mobx";import{Validator as a}from"../index.js";import{IkasBaseStore as l}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";import{PhoneRule as u,RequiredRule as d,EmailRule as m,MinRule as p}from"../rules/index.js";var h=function(){function h(e){var r=this;this.model={email:"",password:"",isSmsLogin:!1,phone:null},this.validatorRules=function(e){return void 0===e&&(e=!1),o([new d({fieldKey:"email",valuePath:"email",message:r.message.requiredRule}),new d({fieldKey:"password",valuePath:"password",message:r.message.requiredRule}),new m({fieldKey:"email",valuePath:"email",message:r.message.emailRule}),new p({fieldKey:"password",valuePath:"password",minValue:6,message:r.message.minRule})],e?[new u({fieldKey:"phone",valuePath:"phone",message:r.message.phoneRule})]:[],!0)},this.onEmailChange=function(e){r.email=e},this.onPasswordChange=function(e){r.password=e},this.onSmsLoginChange=function(e){e?r.validator.setRules([new d({fieldKey:"phone",valuePath:"phone",message:r.message.phoneRule}),new u({fieldKey:"phone",valuePath:"phone",message:r.message.phoneRule})]):r.validator.setRules(r.validatorRules()),r.isSmsLogin=e},this.onPhoneChange=function(e){r.phone=e},s(this,{emailErrorMessage:t,passwordErrorMessage:t,hasError:t,redirect:t,email:t,password:t,model:i,validateAll:n,login:n,phoneErrorMessage:t}),this.message=e.message,this.validator=new a(this.model,this.validatorRules())}return Object.defineProperty(h.prototype,"phone",{get:function(){return this.model.phone},set:function(e){this.model.phone=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"email",{get:function(){return this.model.email},set:function(e){this.model.email=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"password",{get:function(){return this.model.password},set:function(e){this.model.password=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"emailErrorMessage",{get:function(){var e;return null===(e=this.validator.results.email)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"passwordErrorMessage",{get:function(){var e;return null===(e=this.validator.results.password)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"phoneErrorMessage",{get:function(){var e;return null===(e=this.validator.results.phone)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isSmsLogin",{get:function(){return this.model.isSmsLogin},set:function(e){this.model.isSmsLogin=e},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"redirect",{get:function(){if("undefined"!=typeof window)return new URLSearchParams(window.location.search).get("redirect")},enumerable:!1,configurable:!0}),h.prototype.validateAll=function(){return this.validator.validateAll()},h.prototype.login=function(){return e(this,void 0,void 0,(function(){var e,o;return r(this,(function(r){switch(r.label){case 0:return e={isFormError:!1,isSuccess:!1,errorCodes:[],otpSend:!1,flowId:null},[4,this.validateAll()];case 1:if(r.sent())return e.isFormError=!0,[2,e];r.label=2;case 2:return r.trys.push([2,4,,5]),[4,l.getInstance().customerStore.customerLogin(this.isSmsLogin?void 0:this.model.email,this.isSmsLogin?void 0:this.model.password,this.isSmsLogin?this.model.phone:void 0)];case 3:return o=r.sent(),e.isSuccess=o.isSuccess,e.errorCodes=o.errorCodes,e.otpSend=o.otpSend||!1,e.flowId=o.flowId||null,[2,e];case 4:return r.sent(),[2,e];case 5:return[2]}}))}))},h}();export{h as LoginForm};
@@ -12,12 +12,13 @@ declare type RegisterFormProps<T> = {
12
12
  declare type RegisterFormModel = {
13
13
  firstName: string;
14
14
  lastName: string;
15
- email: string;
16
- password: string;
15
+ email?: string;
16
+ password?: string;
17
17
  attributes?: IkasCustomerAttributeValue[];
18
18
  isMarketingAccepted?: boolean;
19
19
  phone?: string | null;
20
20
  isSmsRegister?: boolean;
21
+ flowId?: string | null;
21
22
  };
22
23
  declare type AttributeValue = {
23
24
  isChecked?: boolean;
@@ -45,12 +46,14 @@ export declare class RegisterForm {
45
46
  set firstName(value: string);
46
47
  get lastName(): string;
47
48
  set lastName(value: string);
48
- get email(): string;
49
- set email(value: string);
50
- get password(): string;
51
- set password(value: string);
49
+ get email(): string | undefined;
50
+ set email(value: string | undefined);
51
+ get password(): string | undefined;
52
+ set password(value: string | undefined);
52
53
  get isMarketingAccepted(): boolean | undefined;
53
54
  set isMarketingAccepted(value: boolean | undefined);
55
+ get flowId(): string | null | undefined;
56
+ set flowId(value: string | null | undefined);
54
57
  get isSmsRegister(): boolean | undefined;
55
58
  set isSmsRegister(value: boolean | undefined);
56
59
  get phone(): string | null | undefined;
@@ -79,13 +82,10 @@ export declare class RegisterForm {
79
82
  validateAll(): Promise<boolean | undefined>;
80
83
  register(): Promise<{
81
84
  isSuccess: boolean;
85
+ flowId: string | null;
86
+ otpSend: boolean;
82
87
  errorCodes: import("@ikas/storefront-api").IkasRegisterError[];
83
88
  isFormError: boolean;
84
89
  }>;
85
- smsRegister(): Promise<{
86
- isFormError: boolean;
87
- isSuccess: boolean;
88
- errorCodes: never[];
89
- }>;
90
90
  }
91
91
  export {};
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e,__spreadArray as r,__assign as i}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as s,computed as a,observable as o,action as n}from"mobx";import u from"lodash/toNumber";import{Validator as d}from"../index.js";import{IkasBaseStore as m}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";import{PhoneRule as l,RequiredRule as p,EmailRule as c,MinRule as f}from"../rules/index.js";import"../../../data/blog/category/index.js";import"../../../data/blog/content/index.js";import"../../../data/blog/meta-data/index.js";import"../../../data/blog/tag/index.js";import"../../../data/blog/index.js";import"../../../data/brand/index.js";import{IkasCustomerAttributeType as h,IkasCustomerAttributeRegisterPageRequirement as b}from"@ikas/storefront-models";import"../../../data/campaign-offer/index.js";import"../../../data/cart/campaign-offer/index.js";import"../../../data/cart/index.js";import"../../../data/category/path-item/index.js";import"../../../data/category/index.js";import"../../../data/checkout/index.js";import"../../../data/checkout-settings/index.js";import"../../../data/city/index.js";import"../../../data/country/index.js";import"../../../data/customer/address/region/index.js";import"../../../data/customer/address/index.js";import"../../../data/customer/address/ikas-localized-customer-address.js";import"../../../data/customer/attribute/index.js";import"../../../data/customer/review/summary/index.js";import"../../../data/customer/review/index.js";import"../../../data/customer/index.js";import"../../../data/customer-form-data-input/index.js";import"../../../data/district/index.js";import"../../../data/favorite-product/index.js";import"../../../data/filter-category/index.js";import"../../../data/html-meta-data/index.js";import"../../../data/image/index.js";import"../../../data/order/address/region/index.js";import"../../../data/order/address/index.js";import"../../../data/order/line-item/option/value/index.js";import"../../../data/order/line-item/variant/value/index.js";import"../../../data/order/line-item/variant/index.js";import"../../../data/order/line-item/index.js";import"../../../data/order/order-transaction-with-prices/index.js";import"../../../data/order/package/index.js";import"../../../data/order/transaction/index.js";import"../../../data/order/index.js";import"../../../data/payment-gateway/index.js";import"../../../data/product/attribute-value/index.js";import"../../../data/product/filter/index.js";import"../../../data/product/campaign-offer/index.js";import"../../../data/product/option-set/option/index.js";import"../../../data/product/option-set/index.js";import"../../../data/product/stock-location/index.js";import"../../../data/product/variant/price/index.js";import"../../../data/product/variant/index.js";import"../../../data/variant-type/index.js";import"../../../data/product/index.js";import"../../../data/raffle/index.js";import"../../../data/shipping-zone/state/city/district/region/index.js";import"../../../data/state/index.js";import"../../../data/storefront-popup/storefront-popup-display-filter/index.js";import"../../../data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../data/storefront-popup/index.js";import"../../../data/theme-json/index.js";import"../../../data/theme-json/component/index.js";import"../../../data/theme-json/custom-data/index.js";import"../../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var g=function(){function g(t){var e=this;this.model={firstName:"",lastName:"",email:"",password:"",attributes:void 0,isMarketingAccepted:!1,phone:null,isSmsRegister:!1},this.isFormSubmit=!1,this._customerAttributes=void 0,this.validatorRules=function(t){return void 0===t&&(t=!1),r([new p({fieldKey:"firstName",valuePath:"firstName",message:e.message.requiredRule}),new p({fieldKey:"lastName",valuePath:"lastName",message:e.message.requiredRule}),new p({fieldKey:"email",valuePath:"email",message:e.message.requiredRule}),new p({fieldKey:"password",valuePath:"password",message:e.message.requiredRule}),new c({fieldKey:"email",valuePath:"email",message:e.message.emailRule}),new f({fieldKey:"password",valuePath:"password",minValue:6,message:e.message.minRule})],t?[new l({fieldKey:"phone",valuePath:"phone",message:e.message.phoneRule})]:[],!0)},this.onFirstNameChange=function(t){e.firstName=t},this.onLastNameChange=function(t){e.lastName=t},this.onEmailChange=function(t){e.email=t},this.onPasswordChange=function(t){e.password=t},this.onPhoneChange=function(t){e.phone=t},this.onSmsRegisterChange=function(t){if(t){var r=e.validatorRules(!0);e.validator.setRules(r)}else{r=e.validatorRules(!1);e.validator.setRules(r)}e.isSmsRegister=t},this.setCustomerAttributes=function(t){e._customerAttributes=(null==t?void 0:t.filter((function(t){return t.registerPageRequirement!==b.INVISIBLE})).map((function(t){return{attribute:t,attributeValue:{isChecked:void 0,value:void 0,selectedIdList:void 0},validator:{isRequired:t.registerPageRequirement===b.MANDATORY,hasError:!1,message:""}}})))||[]},this.onAttributeChange=function(t,r){var i;if(e._customerAttributes){var s=e._customerAttributes.find((function(e){return e.attribute.id===t}));if(s){var a=null===(i=e._customerAttributes)||void 0===i?void 0:i.findIndex((function(e){return e.attribute.id===t}));void 0!==a&&-1!==a&&(e._customerAttributes[a].attributeValue=e.getAttributeValue(s.attribute,r),e.validateCustomerAttribute())}}},s(this,{emailErrorMessage:a,passwordErrorMessage:a,firstNameErrorMessage:a,lastNameErrorMessage:a,phoneErrorMessage:a,hasError:a,redirect:a,model:o,validateAll:n,register:n,customerAttributes:a,_customerAttributes:o}),this.message=t.message,this.validator=new d(this.model,this.validatorRules())}return Object.defineProperty(g.prototype,"firstName",{get:function(){return this.model.firstName},set:function(t){this.model.firstName=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastName",{get:function(){return this.model.lastName},set:function(t){this.model.lastName=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"email",{get:function(){return this.model.email},set:function(t){this.model.email=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"password",{get:function(){return this.model.password},set:function(t){this.model.password=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isMarketingAccepted",{get:function(){return this.model.isMarketingAccepted},set:function(t){this.model.isMarketingAccepted=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isSmsRegister",{get:function(){return this.model.isSmsRegister},set:function(t){this.model.isSmsRegister=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"phone",{get:function(){return this.model.phone},set:function(t){this.model.phone=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"firstNameErrorMessage",{get:function(){return this.validator.results.firstName.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastNameErrorMessage",{get:function(){return this.validator.results.lastName.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"emailErrorMessage",{get:function(){return this.validator.results.email.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"passwordErrorMessage",{get:function(){return this.validator.results.password.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"phoneErrorMessage",{get:function(){var t;return null===(t=this.validator.results.phone)||void 0===t?void 0:t.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"attributes",{get:function(){return this.model.attributes},set:function(t){this.model.attributes=t},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"redirect",{get:function(){if("undefined"!=typeof window)return new URLSearchParams(window.location.search).get("redirect")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"customerAttributes",{get:function(){return this._customerAttributes},enumerable:!1,configurable:!0}),g.prototype.getAttributeValue=function(t,e){var r={isChecked:void 0,value:void 0,selectedIdList:void 0};return"string"!=typeof e||t.type!==h.TEXT&&t.type!==h.DATETIME&&t.type!==h.DATE&&t.type!==h.CHOICE||(r.value=e),"string"==typeof e&&t.type===h.NUMERIC&&(Number.isInteger(u(e))?r.value=e:r.value=e.slice(0,-1)),"boolean"==typeof e&&t.type===h.BOOLEAN&&(r.isChecked=e),"object"==typeof e&&t.type===h.MULTIPLE_CHOICE&&(r.selectedIdList=e),r},Object.defineProperty(g.prototype,"formattedAttributesInput",{get:function(){if(!this._customerAttributes)return null;if(!this._customerAttributes.some((function(t){return void 0!==t.attributeValue.value||void 0!==t.attributeValue.isChecked||void 0!==t.attributeValue.selectedIdList})))return null;var t=[];return this._customerAttributes.map((function(e){var r=e.attributeValue,i=r.selectedIdList,s=r.isChecked,a=r.value;void 0!==i&&h.MULTIPLE_CHOICE&&i.map((function(r){t.push({customerAttributeId:e.attribute.id,customerAttributeOptionId:r,value:null})})),e.attribute.type===h.BOOLEAN&&t.push({customerAttributeId:e.attribute.id,customerAttributeOptionId:null,value:s?s.toString():"false"}),void 0!==a&&(e.attribute.type!==h.TEXT&&e.attribute.type!==h.NUMERIC||t.push({customerAttributeId:e.attribute.id,customerAttributeOptionId:null,value:a.toString()}),e.attribute.type===h.CHOICE&&t.push({customerAttributeId:e.attribute.id,customerAttributeOptionId:a,value:null}),e.attribute.type!==h.DATETIME&&e.attribute.type!==h.DATE||t.push({customerAttributeId:e.attribute.id,customerAttributeOptionId:null,value:new Date(a).getTime().toString()}))})),t},enumerable:!1,configurable:!0}),g.prototype.validateCustomerAttribute=function(){var t,e=this;this._customerAttributes=null===(t=this._customerAttributes)||void 0===t?void 0:t.map((function(t){var r;return t.validator.isRequired&&e.isFormSubmit&&(t.attribute.type===h.BOOLEAN||t.attributeValue.value||(null===(r=t.attributeValue.selectedIdList)||void 0===r?void 0:r.length)?(t.validator.hasError=!1,t.validator.message=""):(t.validator.hasError=!0,t.validator.message="string"==typeof e.message.requiredRule?e.message.requiredRule:e.message.requiredRule(e.model))),t}))},g.prototype.validateAll=function(){var r;return t(this,void 0,void 0,(function(){var t,i,s;return e(this,(function(e){switch(e.label){case 0:return this.validateCustomerAttribute(),t=this.isSmsRegister?["email","password"]:void 0,[4,this.validator.validateAll(t)];case 1:return i=e.sent(),s=null===(r=this._customerAttributes)||void 0===r?void 0:r.some((function(t){return t.validator.hasError})),[2,i||s]}}))}))},g.prototype.register=function(){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return this.isFormSubmit=!0,t={isFormError:!1,isSuccess:!1,errorCodes:[]},this.email&&(this.email=this.email.trim()),this.phone&&this.validator.setRules(this.validatorRules(!0)),[4,this.validateAll()];case 1:if(e.sent())return t.isFormError=!0,[2,t];e.label=2;case 2:return e.trys.push([2,4,,5]),[4,m.getInstance().customerStore.register(this.model.firstName,this.model.lastName,this.model.email,this.model.password,this.model.isMarketingAccepted,this.model.attributes||this.formattedAttributesInput||void 0,this.model.phone)];case 3:return r=e.sent(),[2,i(i({},t),r)];case 4:return e.sent(),[2,t];case 5:return[2]}}))}))},g.prototype.smsRegister=function(){return t(this,void 0,void 0,(function(){var t,r,s;return e(this,(function(e){switch(e.label){case 0:return this.isFormSubmit=!0,t={isFormError:!1,isSuccess:!1,errorCodes:[]},[4,this.validateAll()];case 1:if(e.sent())return t.isFormError=!0,[2,t];r=this.model.phone||"",e.label=2;case 2:return e.trys.push([2,4,,5]),[4,m.getInstance().customerStore.smsRegister(this.model.firstName,this.model.lastName,r,this.model.isMarketingAccepted,this.model.attributes||this.formattedAttributesInput||void 0)];case 3:return s=e.sent(),[2,i(i({},t),{isSuccess:s})];case 4:return e.sent(),[2,t];case 5:return[2]}}))}))},g}();export{g as RegisterForm};
1
+ import{__awaiter as e,__generator as t,__spreadArray as r,__assign as i}from'./../../../../ext/tslib/tslib.es6.js';import{makeObservable as o,computed as a,observable as s,action as n}from"mobx";import d from"lodash/toNumber";import{Validator as u}from"../index.js";import{IkasBaseStore as l}from"../../../../store/base.js";import"../../../../store/customer/index.js";import"../../../../store/cart/index.js";import{PhoneRule as m,RequiredRule as p,EmailRule as c,MinRule as f}from"../rules/index.js";import"../../../data/blog/category/index.js";import"../../../data/blog/content/index.js";import"../../../data/blog/meta-data/index.js";import"../../../data/blog/tag/index.js";import"../../../data/blog/index.js";import"../../../data/brand/index.js";import{IkasCustomerAttributeType as h,IkasCustomerAttributeRegisterPageRequirement as b}from"@ikas/storefront-models";import"../../../data/campaign-offer/index.js";import"../../../data/cart/campaign-offer/index.js";import"../../../data/cart/index.js";import"../../../data/category/path-item/index.js";import"../../../data/category/index.js";import"../../../data/checkout/index.js";import"../../../data/checkout-settings/index.js";import"../../../data/city/index.js";import"../../../data/country/index.js";import"../../../data/customer/address/region/index.js";import"../../../data/customer/address/index.js";import"../../../data/customer/address/ikas-localized-customer-address.js";import"../../../data/customer/attribute/index.js";import"../../../data/customer/review/summary/index.js";import"../../../data/customer/review/index.js";import"../../../data/customer/index.js";import"../../../data/customer-form-data-input/index.js";import"../../../data/district/index.js";import"../../../data/favorite-product/index.js";import"../../../data/filter-category/index.js";import"../../../data/html-meta-data/index.js";import"../../../data/image/index.js";import"../../../data/order/address/region/index.js";import"../../../data/order/address/index.js";import"../../../data/order/line-item/option/value/index.js";import"../../../data/order/line-item/variant/value/index.js";import"../../../data/order/line-item/variant/index.js";import"../../../data/order/line-item/index.js";import"../../../data/order/order-transaction-with-prices/index.js";import"../../../data/order/package/index.js";import"../../../data/order/transaction/index.js";import"../../../data/order/index.js";import"../../../data/payment-gateway/index.js";import"../../../data/product/attribute-value/index.js";import"../../../data/product/filter/index.js";import"../../../data/product/campaign-offer/index.js";import"../../../data/product/option-set/option/index.js";import"../../../data/product/option-set/index.js";import"../../../data/product/stock-location/index.js";import"../../../data/product/variant/price/index.js";import"../../../data/product/variant/index.js";import"../../../data/variant-type/index.js";import"../../../data/product/index.js";import"../../../data/raffle/index.js";import"../../../data/shipping-zone/state/city/district/region/index.js";import"../../../data/state/index.js";import"../../../data/storefront-popup/storefront-popup-display-filter/index.js";import"../../../data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../data/storefront-popup/index.js";import"../../../data/theme-json/index.js";import"../../../data/theme-json/component/index.js";import"../../../data/theme-json/custom-data/index.js";import"../../../data/variant-type/variant-value/index.js";import"@ikas/localized-address";var g=function(){function g(e){var t=this;this.model={firstName:"",lastName:"",email:void 0,password:void 0,attributes:void 0,isMarketingAccepted:!1,phone:null,isSmsRegister:!1,flowId:null},this.isFormSubmit=!1,this._customerAttributes=void 0,this.validatorRules=function(e){return void 0===e&&(e=!1),r([new p({fieldKey:"firstName",valuePath:"firstName",message:t.message.requiredRule}),new p({fieldKey:"lastName",valuePath:"lastName",message:t.message.requiredRule}),new p({fieldKey:"email",valuePath:"email",message:t.message.requiredRule}),new p({fieldKey:"password",valuePath:"password",message:t.message.requiredRule}),new c({fieldKey:"email",valuePath:"email",message:t.message.emailRule}),new f({fieldKey:"password",valuePath:"password",minValue:6,message:t.message.minRule})],e?[new m({fieldKey:"phone",valuePath:"phone",message:t.message.phoneRule})]:[],!0)},this.onFirstNameChange=function(e){t.firstName=e},this.onLastNameChange=function(e){t.lastName=e},this.onEmailChange=function(e){t.email=e},this.onPasswordChange=function(e){t.password=e},this.onPhoneChange=function(e){t.phone=e},this.onSmsRegisterChange=function(e){e?t.validator.setRules([new p({fieldKey:"phone",valuePath:"phone",message:t.message.phoneRule}),new m({fieldKey:"phone",valuePath:"phone",message:t.message.phoneRule})]):t.validator.setRules(t.validatorRules()),t.isSmsRegister=e},this.setCustomerAttributes=function(e){t._customerAttributes=(null==e?void 0:e.filter((function(e){return e.registerPageRequirement!==b.INVISIBLE})).map((function(e){return{attribute:e,attributeValue:{isChecked:void 0,value:void 0,selectedIdList:void 0},validator:{isRequired:e.registerPageRequirement===b.MANDATORY,hasError:!1,message:""}}})))||[]},this.onAttributeChange=function(e,r){var i;if(t._customerAttributes){var o=t._customerAttributes.find((function(t){return t.attribute.id===e}));if(o){var a=null===(i=t._customerAttributes)||void 0===i?void 0:i.findIndex((function(t){return t.attribute.id===e}));void 0!==a&&-1!==a&&(t._customerAttributes[a].attributeValue=t.getAttributeValue(o.attribute,r),t.validateCustomerAttribute())}}},o(this,{emailErrorMessage:a,passwordErrorMessage:a,firstNameErrorMessage:a,lastNameErrorMessage:a,phoneErrorMessage:a,hasError:a,redirect:a,model:s,validateAll:n,register:n,customerAttributes:a,_customerAttributes:s}),this.message=e.message,this.validator=new u(this.model,this.validatorRules())}return Object.defineProperty(g.prototype,"firstName",{get:function(){return this.model.firstName},set:function(e){this.model.firstName=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastName",{get:function(){return this.model.lastName},set:function(e){this.model.lastName=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"email",{get:function(){return this.model.email},set:function(e){this.model.email=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"password",{get:function(){return this.model.password},set:function(e){this.model.password=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isMarketingAccepted",{get:function(){return this.model.isMarketingAccepted},set:function(e){this.model.isMarketingAccepted=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"flowId",{get:function(){return this.model.flowId},set:function(e){this.model.flowId=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"isSmsRegister",{get:function(){return this.model.isSmsRegister},set:function(e){this.model.isSmsRegister=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"phone",{get:function(){return this.model.phone},set:function(e){this.model.phone=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"firstNameErrorMessage",{get:function(){var e;return null===(e=this.validator.results.firstName)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"lastNameErrorMessage",{get:function(){var e;return null===(e=this.validator.results.lastName)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"emailErrorMessage",{get:function(){var e;return null===(e=this.validator.results.email)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"passwordErrorMessage",{get:function(){var e;return null===(e=this.validator.results.password)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"phoneErrorMessage",{get:function(){var e;return null===(e=this.validator.results.phone)||void 0===e?void 0:e.errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"attributes",{get:function(){return this.model.attributes},set:function(e){this.model.attributes=e},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"redirect",{get:function(){if("undefined"!=typeof window)return new URLSearchParams(window.location.search).get("redirect")},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"customerAttributes",{get:function(){return this._customerAttributes},enumerable:!1,configurable:!0}),g.prototype.getAttributeValue=function(e,t){var r={isChecked:void 0,value:void 0,selectedIdList:void 0};return"string"!=typeof t||e.type!==h.TEXT&&e.type!==h.DATETIME&&e.type!==h.DATE&&e.type!==h.CHOICE||(r.value=t),"string"==typeof t&&e.type===h.NUMERIC&&(Number.isInteger(d(t))?r.value=t:r.value=t.slice(0,-1)),"boolean"==typeof t&&e.type===h.BOOLEAN&&(r.isChecked=t),"object"==typeof t&&e.type===h.MULTIPLE_CHOICE&&(r.selectedIdList=t),r},Object.defineProperty(g.prototype,"formattedAttributesInput",{get:function(){if(!this._customerAttributes)return null;if(!this._customerAttributes.some((function(e){return void 0!==e.attributeValue.value||void 0!==e.attributeValue.isChecked||void 0!==e.attributeValue.selectedIdList})))return null;var e=[];return this._customerAttributes.map((function(t){var r=t.attributeValue,i=r.selectedIdList,o=r.isChecked,a=r.value;void 0!==i&&h.MULTIPLE_CHOICE&&i.map((function(r){e.push({customerAttributeId:t.attribute.id,customerAttributeOptionId:r,value:null})})),t.attribute.type===h.BOOLEAN&&e.push({customerAttributeId:t.attribute.id,customerAttributeOptionId:null,value:o?o.toString():"false"}),void 0!==a&&(t.attribute.type!==h.TEXT&&t.attribute.type!==h.NUMERIC||e.push({customerAttributeId:t.attribute.id,customerAttributeOptionId:null,value:a.toString()}),t.attribute.type===h.CHOICE&&e.push({customerAttributeId:t.attribute.id,customerAttributeOptionId:a,value:null}),t.attribute.type!==h.DATETIME&&t.attribute.type!==h.DATE||e.push({customerAttributeId:t.attribute.id,customerAttributeOptionId:null,value:new Date(a).getTime().toString()}))})),e},enumerable:!1,configurable:!0}),g.prototype.validateCustomerAttribute=function(){var e,t=this;this._customerAttributes=null===(e=this._customerAttributes)||void 0===e?void 0:e.map((function(e){var r;return e.validator.isRequired&&t.isFormSubmit&&(e.attribute.type===h.BOOLEAN||e.attributeValue.value||(null===(r=e.attributeValue.selectedIdList)||void 0===r?void 0:r.length)?(e.validator.hasError=!1,e.validator.message=""):(e.validator.hasError=!0,e.validator.message="string"==typeof t.message.requiredRule?t.message.requiredRule:t.message.requiredRule(t.model))),e}))},g.prototype.validateAll=function(){var r;return e(this,void 0,void 0,(function(){var e,i;return t(this,(function(t){switch(t.label){case 0:return this.validateCustomerAttribute(),[4,this.validator.validateAll()];case 1:return e=t.sent(),i=null===(r=this._customerAttributes)||void 0===r?void 0:r.some((function(e){return e.validator.hasError})),[2,e||i]}}))}))},g.prototype.register=function(){return e(this,void 0,void 0,(function(){var e,r;return t(this,(function(t){switch(t.label){case 0:return this.isFormSubmit=!0,e={isFormError:!1,isSuccess:!1,errorCodes:[],otpSend:!1,flowId:null},this.email&&(this.email=this.email.trim()),[4,this.validateAll()];case 1:if(t.sent())return e.isFormError=!0,[2,e];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,l.getInstance().customerStore.register(this.model.firstName,this.model.lastName,this.isSmsRegister?void 0:this.model.email,this.isSmsRegister?void 0:this.model.password,this.model.isMarketingAccepted,this.model.attributes||this.formattedAttributesInput||void 0,this.model.phone,this.flowId?this.flowId:void 0)];case 3:return r=t.sent(),[2,i(i({},e),r)];case 4:return t.sent(),[2,e];case 5:return[2]}}))}))},g}();export{g as RegisterForm};
@@ -11,7 +11,7 @@ export declare class Validator<T = any> {
11
11
  get hasError(): boolean;
12
12
  onValueChange: (validationRule: ValidationRule) => void;
13
13
  setRules(rules: ValidationRule[]): void;
14
- validateAll(ignoreFieldKeys?: string[]): Promise<boolean>;
14
+ validateAll(): Promise<boolean>;
15
15
  validateFieldRules(fieldKey: string): Promise<void>;
16
16
  private runRules;
17
17
  }
@@ -1 +1 @@
1
- import{__awaiter as e,__generator as r}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as t}from"mobx";import s from"lodash/groupBy";var i=function(){function i(e,r){var s=this;this.results={},this.onValueChange=function(e){var r=s.results[e.fieldKey];r&&"error"===r.status&&s.runRules(e.fieldKey,[e])},this.model=e,this.rules=[],this.setRules(r),t(this,{model:!1})}return Object.defineProperty(i.prototype,"hasError",{get:function(){return Object.values(this.results).some((function(e){return"error"===e.status}))},enumerable:!1,configurable:!0}),i.prototype.setRules=function(e){var r=this;this.rules.forEach((function(e){return e.disposer&&e.disposer()})),this.rules=e,this.rules.forEach((function(e){r.results[e.fieldKey]=new n(e.fieldKey),e.model=r.model,e.onValueChange=r.onValueChange}));var t=[];Object.keys(this.results).forEach((function(e){r.rules.some((function(r){return r.fieldKey===e}))||t.push(e)})),t.forEach((function(e){delete r.results[e]}))},i.prototype.validateAll=function(t){return e(this,void 0,void 0,(function(){var e,i,n,u,o;return r(this,(function(r){switch(r.label){case 0:t&&t.length>0&&(this.rules=this.rules.filter((function(e){return!t.includes(e.fieldKey)}))),e=s(this.rules,"fieldKey"),i=Object.keys(e),n=0,r.label=1;case 1:return n<i.length?(u=i[n],o=e[u],[4,this.runRules(u,o)]):[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2,this.hasError]}}))}))},i.prototype.validateFieldRules=function(t){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return e=this.rules.filter((function(e){return e.fieldKey===t})),[4,this.runRules(t,e)];case 1:return r.sent(),[2]}}))}))},i.prototype.runRules=function(t,s){return e(this,void 0,void 0,(function(){var e,i,n,u,o;return r(this,(function(r){switch(r.label){case 0:e=[],i=[],n=!1,u=0,r.label=1;case 1:return u<s.length?[4,(o=s[u]).run()]:[3,4];case 2:r.sent()||(n=!0,o.errorType&&e.push(o.errorType),i.push(o.errorMessage)),r.label=3;case 3:return u++,[3,1];case 4:return this.results[t]&&(this.results[t].errorTypes=e,this.results[t].messages=i,this.results[t].status=n?"error":void 0),[2]}}))}))},i}(),n=function(){function e(e,r,s,i){void 0===s&&(s=[]),void 0===i&&(i=[]),this.fieldKey=e,this.status=r,this.messages=s,this.errorTypes=i,t(this)}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){return this.messages.length?this.messages[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorType",{get:function(){return this.errorTypes.length?this.errorTypes[0]:void 0},enumerable:!1,configurable:!0}),e}();export{i as Validator};
1
+ import{__awaiter as e,__generator as r}from'./../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as t}from"mobx";import s from"lodash/groupBy";var n=function(){function n(e,r){var s=this;this.results={},this.onValueChange=function(e){var r=s.results[e.fieldKey];r&&"error"===r.status&&s.runRules(e.fieldKey,[e])},this.model=e,this.rules=[],this.setRules(r),t(this,{model:!1})}return Object.defineProperty(n.prototype,"hasError",{get:function(){return Object.values(this.results).some((function(e){return"error"===e.status}))},enumerable:!1,configurable:!0}),n.prototype.setRules=function(e){var r=this;this.rules.forEach((function(e){return e.disposer&&e.disposer()})),this.rules=e,this.rules.forEach((function(e){r.results[e.fieldKey]=new i(e.fieldKey),e.model=r.model,e.onValueChange=r.onValueChange}));var t=[];Object.keys(this.results).forEach((function(e){r.rules.some((function(r){return r.fieldKey===e}))||t.push(e)})),t.forEach((function(e){delete r.results[e]}))},n.prototype.validateAll=function(){return e(this,void 0,void 0,(function(){var e,t,n,i,o;return r(this,(function(r){switch(r.label){case 0:e=s(this.rules,"fieldKey"),t=Object.keys(e),n=0,r.label=1;case 1:return n<t.length?(i=t[n],o=e[i],[4,this.runRules(i,o)]):[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2,this.hasError]}}))}))},n.prototype.validateFieldRules=function(t){return e(this,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return e=this.rules.filter((function(e){return e.fieldKey===t})),[4,this.runRules(t,e)];case 1:return r.sent(),[2]}}))}))},n.prototype.runRules=function(t,s){return e(this,void 0,void 0,(function(){var e,n,i,o,u;return r(this,(function(r){switch(r.label){case 0:e=[],n=[],i=!1,o=0,r.label=1;case 1:return o<s.length?[4,(u=s[o]).run()]:[3,4];case 2:r.sent()||(i=!0,u.errorType&&e.push(u.errorType),n.push(u.errorMessage)),r.label=3;case 3:return o++,[3,1];case 4:return this.results[t]&&(this.results[t].errorTypes=e,this.results[t].messages=n,this.results[t].status=i?"error":void 0),[2]}}))}))},n}(),i=function(){function e(e,r,s,n){void 0===s&&(s=[]),void 0===n&&(n=[]),this.fieldKey=e,this.status=r,this.messages=s,this.errorTypes=n,t(this)}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){return this.messages.length?this.messages[0]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorType",{get:function(){return this.errorTypes.length?this.errorTypes[0]:void 0},enumerable:!1,configurable:!0}),e}();export{n as Validator};
@@ -4,6 +4,7 @@ import { IkasAvailableStockLocation, IkasCheckoutSettings, IkasPaymentGateway, I
4
4
  export default class CheckoutStore {
5
5
  static createSaleTransactionWithCart(params: CreateSaleTransactionQueryParams): Promise<APIResponse<import("@ikas/storefront-api").TransactionResponse> | APIResponse<undefined>>;
6
6
  static listPaymentGateway(params: ListPaymentGatewayQueryParams): Promise<APIResponse<IkasPaymentGateway[]>>;
7
+ static getStoreCreditBalance(): Promise<APIResponse<import("@ikas/storefront-models").IkasStoreCreditBalance | null>>;
7
8
  static listProductFile(params: ListProductFileQueryParams): Promise<APIResponse<IkasProductFile[]>>;
8
9
  static getDigitalProductFileDownloadUrl(params: GetDigitalProductFileDownloadUrlQueryParams): Promise<APIResponse<string>>;
9
10
  static retrieveInstallmentInfo(params: RetrieveInstallmentInfoQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api").RetrieveInstallmentInfoResponse>>;
@@ -1 +1 @@
1
- import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as r}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{createSaleTransactionWithCart as i,listPaymentGateway as o,listProductFile as n,getDigitalProductFileDownloadUrl as a,retrieveInstallmentInfo as s,checkStocks as d,checkCartStocks as u,listCheckoutSettings as m,getAvailableShippingCountries as c,listStockLocations as l,getAvailableStockLocations as p,createStripePaymentIntent as f,createKlarnaClientToken as h,createAdyenBalancePlatformPaymentSession as v,getPayPalClientId as j,createPayPalOrder as x,updatePaypalOrder as g,hepsipayFrameInit as w}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import{IkasCheckoutSettings as b}from"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import{IkasPaymentGateway as y}from"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasProductFile as k}from"../../models/data/product-file/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import{IkasAvailableStockLocation as L}from"../../models/data/stock-location/available/index.js";import{IkasStockLocation as P}from"../../models/data/stock-location/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var E=function(){function E(){}return E.createSaleTransactionWithCart=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,i(r)];case 1:return[2,t.sent()]}}))}))},E.listPaymentGateway=function(i){var n;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(i)];case 1:return t=e.sent(),[2,new r(null===(n=t.data)||void 0===n?void 0:n.map((function(t){return new y(t)})),t.graphQLErrors)]}}))}))},E.listProductFile=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new k(t)})),t.graphQLErrors)]}}))}))},E.getDigitalProductFileDownloadUrl=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.retrieveInstallmentInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,s(r)];case 1:return[2,t.sent()]}}))}))},E.checkStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,d(r)];case 1:return[2,t.sent()]}}))}))},E.checkCartStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,u(r)];case 1:return[2,t.sent()]}}))}))},E.listCheckoutSettings=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,m(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new b(t)})),t.graphQLErrors)]}}))}))},E.getAvailableShippingCountries=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},E.listStockLocation=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,l(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new P(t)})),t.graphQLErrors)]}}))}))},E.getAvailableStockLocations=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,p(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new L(t)})),t.graphQLErrors)]}}))}))},E.createStripePaymentIntent=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.createKlarnaClientToken=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.createAdyenBalancePlatformPaymentSession=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.getPayPalClientId=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.createPayPalOrder=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.updatePaypalOrder=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,g(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E.hepsipayFrameInit=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},E}();export{E as default};
1
+ import{__awaiter as t,__generator as e}from'./../../ext/tslib/tslib.es6.js';import{APIResponse as r}from'./../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../ext/axios/index.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_defineProperty.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseGetTag.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_stringToPath.js';import'./../../ext/@ikas/fe-api-client/build/ext/lodash/_baseToString.js';import{createSaleTransactionWithCart as i,listPaymentGateway as o,getStoreCreditBalance as n,listProductFile as a,getDigitalProductFileDownloadUrl as s,retrieveInstallmentInfo as d,checkStocks as u,checkCartStocks as c,listCheckoutSettings as m,getAvailableShippingCountries as l,listStockLocations as p,getAvailableStockLocations as f,createStripePaymentIntent as h,createKlarnaClientToken as v,createAdyenBalancePlatformPaymentSession as j,getPayPalClientId as x,createPayPalOrder as g,updatePaypalOrder as w,hepsipayFrameInit as b}from"@ikas/storefront-api";import"../../models/data/blog/category/index.js";import"../../models/data/blog/content/index.js";import"../../models/data/blog/meta-data/index.js";import"../../models/data/blog/tag/index.js";import"../../models/data/blog/index.js";import"../../models/data/brand/index.js";import"@ikas/storefront-models";import"mobx";import"../../models/data/campaign-offer/index.js";import"../../models/data/cart/campaign-offer/index.js";import"../../models/data/cart/index.js";import"../../models/data/category/path-item/index.js";import"../../models/data/category/index.js";import"../../models/data/checkout/index.js";import{IkasCheckoutSettings as y}from"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/index.js";import"../../models/data/customer/address/region/index.js";import"../../models/data/customer/address/index.js";import"../../models/data/customer/address/ikas-localized-customer-address.js";import"../../models/data/customer/attribute/index.js";import"../../models/data/customer/review/summary/index.js";import"../../models/data/customer/review/index.js";import"../../models/data/customer/index.js";import"../../models/data/customer-form-data-input/index.js";import"../../models/data/district/index.js";import"../../models/data/favorite-product/index.js";import"../../models/data/filter-category/index.js";import"../../models/data/html-meta-data/index.js";import"../../models/data/image/index.js";import"../../models/data/order/address/region/index.js";import"../../models/data/order/address/index.js";import"../../models/data/order/line-item/option/value/index.js";import"../../models/data/order/line-item/variant/value/index.js";import"../../models/data/order/line-item/variant/index.js";import"../../models/data/order/line-item/index.js";import"../../models/data/order/order-transaction-with-prices/index.js";import"../../models/data/order/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import{IkasPaymentGateway as k}from"../../models/data/payment-gateway/index.js";import"../../models/data/product/attribute-value/index.js";import"../../models/data/product/filter/index.js";import"../../models/data/product/campaign-offer/index.js";import"../../models/data/product/option-set/option/index.js";import"../../models/data/product/option-set/index.js";import"../../models/data/product/stock-location/index.js";import"../../models/data/product/variant/price/index.js";import"../../models/data/product/variant/index.js";import"../../models/data/variant-type/index.js";import"../../models/data/product/index.js";import{IkasProductFile as L}from"../../models/data/product-file/index.js";import"../../models/data/raffle/index.js";import"../../models/data/shipping-zone/state/city/district/region/index.js";import"../../models/data/state/index.js";import{IkasAvailableStockLocation as E}from"../../models/data/stock-location/available/index.js";import{IkasStockLocation as P}from"../../models/data/stock-location/index.js";import"../../models/data/storefront-popup/storefront-popup-display-filter/index.js";import"../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../models/data/storefront-popup/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/component/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";var Q=function(){function Q(){}return Q.createSaleTransactionWithCart=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,i(r)];case 1:return[2,t.sent()]}}))}))},Q.listPaymentGateway=function(i){var n;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,o(i)];case 1:return t=e.sent(),[2,new r(null===(n=t.data)||void 0===n?void 0:n.map((function(t){return new k(t)})),t.graphQLErrors)]}}))}))},Q.getStoreCreditBalance=function(){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,n()];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.listProductFile=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,a(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new L(t)})),t.graphQLErrors)]}}))}))},Q.getDigitalProductFileDownloadUrl=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,s(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.retrieveInstallmentInfo=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,d(r)];case 1:return[2,t.sent()]}}))}))},Q.checkStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,u(r)];case 1:return[2,t.sent()]}}))}))},Q.checkCartStocks=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,c(r)];case 1:return[2,t.sent()]}}))}))},Q.listCheckoutSettings=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,m(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new y(t)})),t.graphQLErrors)]}}))}))},Q.getAvailableShippingCountries=function(r){return t(this,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,l(r)];case 1:return[2,t.sent()]}}))}))},Q.listStockLocation=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,p(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new P(t)})),t.graphQLErrors)]}}))}))},Q.getAvailableStockLocations=function(i){var o;return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,f(i)];case 1:return t=e.sent(),[2,new r(null===(o=t.data)||void 0===o?void 0:o.map((function(t){return new E(t)})),t.graphQLErrors)]}}))}))},Q.createStripePaymentIntent=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,h(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.createKlarnaClientToken=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,v(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.createAdyenBalancePlatformPaymentSession=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,j(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.getPayPalClientId=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,x(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.createPayPalOrder=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,g(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.updatePaypalOrder=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,w(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q.hepsipayFrameInit=function(i){return t(this,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,b(i)];case 1:return t=e.sent(),[2,new r(t.data,t.graphQLErrors)]}}))}))},Q}();export{Q as default};
@@ -1,23 +1,28 @@
1
1
  import { APIResponse } from "@ikas/fe-api-client";
2
- import { CheckCustomerEmailQueryParams, SubscribeToMarketingNotificationsQueryParams, CreateCustomerReviewQueryParams, CreateOrderRefundRequestQueryParams, CustomerForgotPasswordQueryParams, CustomerLoginQueryParams, CustomerRecoverPasswordQueryParams, CustomerRefreshTokenQueryParams, CustomerSocialLoginQueryParams, GetCustomerOrdersQueryParams, GetLastViewedProductsQueryParams, GetOrderByEmailQueryParams, IsFavoriteProductQueryParams, ListCustomerReviewsQueryParams, ListCustomerReviewSummaryQueryParams, ListOrderRefundSettingsQueryParams, ListOrderTransactionsQueryParams, ListOrderTransactionsWithPricesQueryParams, RegisterCustomerQueryParams, SaveFavoriteProductQueryParams, SaveLastViewedProductsQueryParams, SaveMyCustomerQueryParams, SendContactFormToMerchantQueryParams, ActivateCustomerQueryParams, ResendCustomerActivationMailQueryParams, ValidateCustomerPhoneVerificationCodeQueryParams, ValidateCustomerPhoneLoginCodeQueryParams, SendCustomerSmsLoginCodeQueryParams, ResendCustomerPhoneVerificationCodeQueryParams, SaveCustomerFormDataQueryParams, CustomerDeactiveQueryParams, SmsRegisterCustomerQueryParams } from "@ikas/storefront-api";
2
+ import { CheckCustomerEmailQueryParams, SubscribeToMarketingNotificationsQueryParams, CreateCustomerReviewQueryParams, CreateOrderRefundRequestQueryParams, CustomerForgotPasswordQueryParams, CustomerLoginQueryParams, CustomerRecoverPasswordQueryParams, CustomerRefreshTokenQueryParams, CustomerSocialLoginQueryParams, GetCustomerOrdersQueryParams, GetLastViewedProductsQueryParams, GetOrderByEmailQueryParams, IsFavoriteProductQueryParams, ListCustomerReviewsQueryParams, ListCustomerReviewSummaryQueryParams, ListOrderRefundSettingsQueryParams, ListOrderTransactionsQueryParams, ListOrderTransactionsWithPricesQueryParams, RegisterCustomerQueryParams, SaveFavoriteProductQueryParams, SaveLastViewedProductsQueryParams, SaveMyCustomerQueryParams, SendContactFormToMerchantQueryParams, ActivateCustomerQueryParams, ResendCustomerActivationMailQueryParams, ValidateCustomerPhoneVerificationCodeQueryParams, ResendCustomerPhoneVerificationCodeQueryParams, SaveCustomerFormDataQueryParams, CustomerDeactiveQueryParams, ValidateOTPCodeQueryParams } from "@ikas/storefront-api";
3
3
  import { IkasCustomer, IkasCustomerAttribute, IkasCustomerReview, IkasCustomerReviewSummary, IkasFavoriteProduct, IkasLastViewedProduct, IkasOrder, IkasOrderRefundSettings, IkasOrderTransaction, IkasOrderTransactionWithPrices } from "../../models/data";
4
4
  export default class CustomerStoreAPI {
5
5
  static login(params: CustomerLoginQueryParams): Promise<APIResponse<{
6
6
  customer: IkasCustomer | null;
7
+ flowId: string | null;
8
+ otpSend: boolean | null;
7
9
  token: string;
8
10
  tokenExpiry: number;
9
11
  } | null>>;
10
12
  static socialLogin(params: CustomerSocialLoginQueryParams): Promise<APIResponse<{
11
13
  customer: IkasCustomer | null;
14
+ flowId: string | null;
15
+ otpSend: boolean | null;
12
16
  token: string;
13
17
  tokenExpiry: number;
14
18
  } | null>>;
15
19
  static register(params: RegisterCustomerQueryParams): Promise<APIResponse<{
16
20
  customer: IkasCustomer | null;
21
+ flowId: string | null;
22
+ otpSend: boolean | null;
17
23
  token: string;
18
24
  tokenExpiry: number;
19
25
  } | null>>;
20
- static smsRegister(params: SmsRegisterCustomerQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
21
26
  static refreshToken(params: CustomerRefreshTokenQueryParams): Promise<APIResponse<undefined> | APIResponse<import("@ikas/storefront-api/build/__api/types").CustomerRefreshTokenResponse>>;
22
27
  static forgotPassword(params: CustomerForgotPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
23
28
  static recoverPassword(params: CustomerRecoverPasswordQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
@@ -57,12 +62,13 @@ export default class CustomerStoreAPI {
57
62
  static resendCustomerActivationMail(params: ResendCustomerActivationMailQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
58
63
  static resendCustomerPhoneVerificationCode(params: ResendCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
59
64
  static validateCustomerPhoneVerificationCode(params: ValidateCustomerPhoneVerificationCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
60
- static validateCustomerPhoneLoginCode(params: ValidateCustomerPhoneLoginCodeQueryParams): Promise<APIResponse<{
65
+ static validateOTPCode(params: ValidateOTPCodeQueryParams): Promise<APIResponse<{
61
66
  customer: IkasCustomer | null;
67
+ flowId: string | null;
68
+ otpSend: boolean | null;
62
69
  token: string;
63
70
  tokenExpiry: number;
64
71
  } | null>>;
65
- static sendCustomerSmsLoginCode(params: SendCustomerSmsLoginCodeQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
66
72
  static saveCustomerFormData(params: SaveCustomerFormDataQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;
67
73
  static exportCustomerPersonelData(): Promise<APIResponse<undefined> | APIResponse<string>>;
68
74
  static deactivateCustomer(params: CustomerDeactiveQueryParams): Promise<APIResponse<undefined> | APIResponse<boolean>>;