@ikas/storefront 5.0.0-beta.2 → 5.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/analytics/analytics.d.ts +32 -37
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.js +1 -1
- package/build/analytics/facebookPixel.d.ts +11 -15
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleAnalytics.d.ts +10 -13
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.d.ts +188 -191
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/googleUniversal.d.ts +5 -8
- package/build/analytics/googleUniversal.js +1 -1
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikas.d.ts +33 -40
- package/build/analytics/ikas.js +1 -1
- package/build/analytics/index.d.ts +1 -1
- package/build/analytics/tiktokPixel.d.ts +9 -12
- package/build/analytics/tiktokPixel.js +1 -1
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +6 -6
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.d.ts +4 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/delivery-methods/index.js +1 -1
- package/build/components/checkout/components/epaykolay-button/index.d.ts +5 -0
- package/build/components/checkout/components/epaykolay-button/index.js +1 -0
- package/build/components/checkout/components/epaykolay-button/style.module.scss.js +1 -0
- package/build/components/checkout/components/error/customer-login-required-error/index.js +1 -1
- package/build/components/checkout/components/error/index.js +1 -1
- package/build/components/checkout/components/error/no-shipping-error/index.js +1 -1
- package/build/components/checkout/components/error/payment-error/index.d.ts +1 -1
- package/build/components/checkout/components/error/payment-error/index.js +1 -1
- package/build/components/checkout/components/error/stock-error/index.d.ts +2 -1
- package/build/components/checkout/components/error/stock-error/index.js +1 -1
- package/build/components/checkout/components/error/unknown-error/index.d.ts +1 -1
- package/build/components/checkout/components/error/unknown-error/index.js +1 -1
- package/build/components/checkout/components/expandable-section/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/klarna/index.js +1 -1
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/master-pass/link-card-to-client/index.js +1 -1
- package/build/components/checkout/components/master-pass/modal-otp/index.js +1 -1
- package/build/components/checkout/components/offer-product/index.d.ts +2 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/paypal/index.d.ts +7 -0
- package/build/components/checkout/components/paypal/index.js +1 -0
- package/build/components/checkout/components/paypal/style.module.scss.js +1 -0
- package/build/components/checkout/components/quick-registration/completed.js +1 -1
- package/build/components/checkout/components/quick-registration/index.js +1 -1
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/components/svg/epaykolay.d.ts +6 -0
- package/build/components/checkout/components/svg/epaykolay.js +1 -0
- package/build/components/checkout/index.d.ts +1 -1
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +22 -44
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/modelMasterPass.d.ts +13 -23
- package/build/components/checkout/modelMasterPass.js +1 -1
- package/build/components/checkout/steps/step-info/index.js +1 -1
- package/build/components/checkout/steps/step-payment/billing-address/index.js +1 -1
- package/build/components/checkout/steps/step-payment/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/index.js +1 -1
- package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.js +1 -1
- package/build/components/checkout/steps/step-payment/style.module.scss.js +1 -1
- package/build/components/checkout/steps/step-shipping/index.js +1 -1
- package/build/components/checkout/steps/step-success/index.js +1 -1
- package/build/components/checkout/style.module.scss.js +1 -1
- package/build/components/checkout/types.d.ts +29 -0
- package/build/components/checkout/types.js +1 -0
- package/build/components/google-captcha/index.js +1 -1
- package/build/components/image/index.d.ts +1 -1
- package/build/components/image/index.js +1 -1
- package/build/components/link/index.js +1 -1
- package/build/components/page/ThemeComponent.js +1 -1
- package/build/components/page/functions.d.ts +3 -0
- package/build/components/page/functions.js +1 -0
- package/build/components/page/head.d.ts +1 -1
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +4 -3
- package/build/components/page/index.js +1 -1
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/index.js +1 -1
- package/build/components/page-editor/model.d.ts +5 -1
- package/build/components/page-editor/model.js +1 -1
- package/build/ext/@ikas/fe-api-client/build/utils/api.js +1 -1
- package/build/hooks/index.d.ts +0 -1
- package/build/hooks/useCustomerReviews.d.ts +2 -3
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.js +1 -1
- package/build/model-helpers/index.d.ts +5 -0
- package/build/model-helpers/order/line-item/option/value/functions.d.ts +3 -0
- package/build/model-helpers/order/line-item/option/value/functions.js +1 -0
- package/build/model-helpers/product/attribute-value/functions.d.ts +2 -0
- package/build/model-helpers/product/attribute-value/functions.js +1 -0
- package/build/model-helpers/product/functions.d.ts +10 -0
- package/build/model-helpers/product/functions.js +1 -0
- package/build/model-helpers/product/option-set/option/functions.d.ts +2 -0
- package/build/model-helpers/product/option-set/option/functions.js +1 -0
- package/build/model-helpers/product/variant/functions.d.ts +2 -0
- package/build/model-helpers/product/variant/functions.js +1 -0
- package/build/models/data/checkout/index.d.ts +4 -21
- package/build/models/data/index.d.ts +7 -138
- package/build/models/data/localized-customer-address/functions.d.ts +65 -0
- package/build/models/data/localized-customer-address/functions.js +1 -0
- package/build/models/data/localized-customer-address/index.d.ts +6 -0
- package/build/models/data/localized-order-address/functions.d.ts +63 -0
- package/build/models/data/localized-order-address/functions.js +1 -0
- package/build/models/data/localized-order-address/index.d.ts +6 -0
- package/build/models/data/review-form/index.d.ts +6 -0
- package/build/models/data/theme-json/component/index.d.ts +1 -0
- package/build/models/data/theme-json/component/index.js +1 -1
- package/build/models/data/theme-json/custom-data/index.d.ts +1 -2
- package/build/models/data/theme-json/custom-data/index.js +1 -1
- package/build/models/data/theme-json/settings/color/index.js +1 -1
- package/build/models/index.d.ts +1 -0
- package/build/models/ui/blog-category-list/functions.d.ts +6 -0
- package/build/models/ui/blog-category-list/functions.js +1 -0
- package/build/models/ui/blog-category-list/index.d.ts +8 -42
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/functions.d.ts +6 -0
- package/build/models/ui/blog-list/functions.js +1 -0
- package/build/models/ui/blog-list/index.d.ts +9 -45
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/functions.d.ts +8 -0
- package/build/models/ui/brand-list/functions.js +1 -0
- package/build/models/ui/brand-list/index.d.ts +9 -48
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/functions.d.ts +8 -0
- package/build/models/ui/category-list/functions.js +1 -0
- package/build/models/ui/category-list/index.d.ts +9 -48
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/functions.d.ts +7 -0
- package/build/models/ui/customer-review-list/functions.js +1 -0
- package/build/models/ui/customer-review-list/index.d.ts +8 -40
- package/build/models/ui/customer-review-summary-list/functions.d.ts +7 -0
- package/build/models/ui/customer-review-summary-list/functions.js +1 -0
- package/build/models/ui/customer-review-summary-list/index.d.ts +7 -39
- package/build/models/ui/index.d.ts +17 -10
- package/build/models/ui/list-commons/index.d.ts +13 -0
- package/build/models/ui/list-commons/index.js +1 -0
- package/build/models/ui/navigation-link/index.d.ts +3 -3
- package/build/models/ui/navigation-link/index.js +1 -1
- package/build/models/ui/product-attribute-detail/index.d.ts +1 -1
- package/build/models/ui/product-attribute-detail/index.js +1 -1
- package/build/models/ui/product-attribute-list/index.js +1 -1
- package/build/models/ui/product-list/functions.d.ts +32 -0
- package/build/models/ui/product-list/functions.js +1 -0
- package/build/models/ui/product-list/index.d.ts +18 -110
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/functions.d.ts +6 -0
- package/build/models/ui/raffle-list/functions.js +1 -0
- package/build/models/ui/raffle-list/index.d.ts +14 -50
- package/build/models/ui/validator/form/account-info.js +1 -1
- package/build/models/ui/validator/form/address.js +1 -1
- package/build/models/ui/validator/form/contact-form.js +1 -1
- package/build/models/ui/validator/form/customer-review.js +1 -1
- package/build/models/ui/validator/form/forgot-password.js +1 -1
- package/build/models/ui/validator/form/ikas-address.d.ts +32 -20
- package/build/models/ui/validator/form/ikas-address.js +1 -1
- package/build/models/ui/validator/form/login.js +1 -1
- package/build/models/ui/validator/form/raffle-form.js +1 -1
- package/build/models/ui/validator/form/recover-password.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +10 -1
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.d.ts +7 -18
- package/build/page-data-init/index.js +1 -1
- package/build/pages/account/activate.d.ts +4 -0
- package/build/pages/account/activate.js +1 -0
- package/build/pages/checkout.js +1 -1
- package/build/pages/index.d.ts +1 -0
- package/build/store/analytics/index.d.ts +9 -0
- package/build/store/analytics/index.js +1 -0
- package/build/store/base/functions.d.ts +7 -0
- package/build/store/base/functions.js +1 -0
- package/build/store/{base.d.ts → base/index.d.ts} +7 -17
- package/build/store/base/index.js +1 -0
- package/build/store/base/public.d.ts +1 -0
- package/build/store/base/public.js +1 -0
- package/build/store/cart/functions.d.ts +24 -0
- package/build/store/cart/functions.js +1 -0
- package/build/store/cart/index.d.ts +7 -28
- package/build/store/cart/index.js +1 -1
- package/build/store/cart/public.d.ts +1 -0
- package/build/store/cart/public.js +1 -0
- package/build/store/customer/account-auth/data.d.ts +4 -0
- package/build/store/customer/account-auth/data.js +1 -0
- package/build/store/customer/account-auth/functions.d.ts +24 -0
- package/build/store/customer/account-auth/functions.js +1 -0
- package/build/store/customer/account-auth/public.d.ts +1 -0
- package/build/store/customer/captcha/data.d.ts +3 -0
- package/build/store/customer/captcha/data.js +1 -0
- package/build/store/customer/captcha/functions.d.ts +5 -0
- package/build/store/customer/captcha/functions.js +1 -0
- package/build/store/customer/captcha/public.d.ts +1 -0
- package/build/store/customer/consent/data.d.ts +3 -0
- package/build/store/customer/consent/data.js +1 -0
- package/build/store/customer/consent/functions.d.ts +6 -0
- package/build/store/customer/consent/functions.js +1 -0
- package/build/store/customer/consent/public.d.ts +1 -0
- package/build/store/customer/functions.d.ts +4 -0
- package/build/store/customer/functions.js +1 -0
- package/build/store/customer/index.d.ts +8 -82
- package/build/store/customer/index.js +1 -1
- package/build/store/customer/marketing/data.d.ts +3 -0
- package/build/store/customer/marketing/data.js +1 -0
- package/build/store/customer/marketing/functions.d.ts +5 -0
- package/build/store/customer/marketing/functions.js +1 -0
- package/build/store/customer/marketing/public.d.ts +1 -0
- package/build/store/customer/order/data.d.ts +4 -0
- package/build/store/customer/order/data.js +1 -0
- package/build/store/customer/order/functions.d.ts +11 -0
- package/build/store/customer/order/functions.js +1 -0
- package/build/store/customer/order/public.d.ts +1 -0
- package/build/store/customer/product/data.d.ts +17 -0
- package/build/store/customer/product/data.js +1 -0
- package/build/store/customer/product/functions.d.ts +20 -0
- package/build/store/customer/product/functions.js +1 -0
- package/build/store/customer/product/public.d.ts +1 -0
- package/build/store/customer/public.d.ts +8 -0
- package/build/store/customer/public.js +1 -0
- package/build/store/customer/raffle/functions.d.ts +1 -0
- package/build/store/customer/raffle/functions.js +1 -0
- package/build/store/customer/raffle/public.d.ts +1 -0
- package/build/store/index.d.ts +9 -4
- package/build/utils/constants.js +1 -1
- package/build/utils/helper.d.ts +1 -1
- package/build/utils/helper.js +1 -1
- package/build/utils/index.d.ts +1 -2
- package/package.json +17 -13
- package/build/ext/@builder.io/partytown/integration/index.mjs.js +0 -1
- package/build/ext/@builder.io/partytown/react/index.mjs.js +0 -1
- package/build/hooks/useStore.d.ts +0 -2
- package/build/hooks/useStore.js +0 -1
- package/build/models/data/base/index.d.ts +0 -8
- package/build/models/data/base/index.js +0 -1
- package/build/models/data/blog/category/index.d.ts +0 -12
- package/build/models/data/blog/category/index.js +0 -1
- package/build/models/data/blog/content/index.d.ts +0 -6
- package/build/models/data/blog/content/index.js +0 -1
- package/build/models/data/blog/index.d.ts +0 -27
- package/build/models/data/blog/index.js +0 -1
- package/build/models/data/blog/meta-data/index.d.ts +0 -16
- package/build/models/data/blog/meta-data/index.js +0 -1
- package/build/models/data/blog/tag/index.d.ts +0 -6
- package/build/models/data/blog/tag/index.js +0 -1
- package/build/models/data/blog/writer/index.d.ts +0 -6
- package/build/models/data/blog/writer/index.js +0 -1
- package/build/models/data/brand/index.d.ts +0 -26
- package/build/models/data/brand/index.js +0 -1
- package/build/models/data/brand/translation/index.d.ts +0 -7
- package/build/models/data/brand/translation/index.js +0 -1
- package/build/models/data/campaign-offer/index.d.ts +0 -21
- package/build/models/data/campaign-offer/index.js +0 -1
- package/build/models/data/campaign-offer/product/index.d.ts +0 -25
- package/build/models/data/campaign-offer/product/index.js +0 -1
- package/build/models/data/cart/available-shipping-method/index.d.ts +0 -10
- package/build/models/data/cart/available-shipping-method/index.js +0 -1
- package/build/models/data/cart/campaign-offer/index.d.ts +0 -16
- package/build/models/data/cart/campaign-offer/index.js +0 -1
- package/build/models/data/cart/index.d.ts +0 -14
- package/build/models/data/cart/index.js +0 -1
- package/build/models/data/category/index.d.ts +0 -22
- package/build/models/data/category/index.js +0 -1
- package/build/models/data/category/path-item/index.d.ts +0 -14
- package/build/models/data/category/path-item/index.js +0 -1
- package/build/models/data/category/translations/index.d.ts +0 -7
- package/build/models/data/category/translations/index.js +0 -1
- package/build/models/data/checkout/country-settings-model.d.ts +0 -141
- package/build/models/data/checkout/country-settings-model.js +0 -1
- package/build/models/data/checkout/index.js +0 -1
- package/build/models/data/checkout-settings/index.d.ts +0 -21
- package/build/models/data/checkout-settings/index.js +0 -1
- package/build/models/data/checkout-settings/option/index.d.ts +0 -6
- package/build/models/data/checkout-settings/option/index.js +0 -1
- package/build/models/data/checkout-settings/price/index.d.ts +0 -7
- package/build/models/data/checkout-settings/price/index.js +0 -1
- package/build/models/data/city/index.d.ts +0 -12
- package/build/models/data/city/index.js +0 -1
- package/build/models/data/contact-form/index.d.ts +0 -9
- package/build/models/data/contact-form/index.js +0 -1
- package/build/models/data/country/index.d.ts +0 -18
- package/build/models/data/country/index.js +0 -1
- package/build/models/data/country/location-translations/index.d.ts +0 -7
- package/build/models/data/customer/address/city/index.d.ts +0 -7
- package/build/models/data/customer/address/city/index.js +0 -1
- package/build/models/data/customer/address/country/index.d.ts +0 -9
- package/build/models/data/customer/address/country/index.js +0 -1
- package/build/models/data/customer/address/district/index.d.ts +0 -7
- package/build/models/data/customer/address/district/index.js +0 -1
- package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +0 -50
- package/build/models/data/customer/address/ikas-localized-customer-address.js +0 -1
- package/build/models/data/customer/address/index.d.ts +0 -40
- package/build/models/data/customer/address/index.js +0 -1
- package/build/models/data/customer/address/state/index.d.ts +0 -7
- package/build/models/data/customer/address/state/index.js +0 -1
- package/build/models/data/customer/attribute/index.d.ts +0 -18
- package/build/models/data/customer/attribute/index.js +0 -1
- package/build/models/data/customer/attribute/option/index.d.ts +0 -9
- package/build/models/data/customer/attribute/option/index.js +0 -1
- package/build/models/data/customer/attribute/sales-channel/index.d.ts +0 -8
- package/build/models/data/customer/attribute/sales-channel/index.js +0 -1
- package/build/models/data/customer/attribute/translation/index.d.ts +0 -9
- package/build/models/data/customer/attribute/translation/index.js +0 -1
- package/build/models/data/customer/attribute/translation/option/index.d.ts +0 -6
- package/build/models/data/customer/attribute/translation/option/index.js +0 -1
- package/build/models/data/customer/attribute/value/index.d.ts +0 -11
- package/build/models/data/customer/attribute/value/index.js +0 -1
- package/build/models/data/customer/index.d.ts +0 -38
- package/build/models/data/customer/index.js +0 -1
- package/build/models/data/customer/review/index.d.ts +0 -24
- package/build/models/data/customer/review/index.js +0 -1
- package/build/models/data/customer/review/settings/index.d.ts +0 -6
- package/build/models/data/customer/review/settings/index.js +0 -1
- package/build/models/data/customer/review/summary/index.d.ts +0 -10
- package/build/models/data/customer/review/summary/index.js +0 -1
- package/build/models/data/customer/review/summary/star/index.d.ts +0 -6
- package/build/models/data/customer/review/summary/star/index.js +0 -1
- package/build/models/data/district/index.d.ts +0 -12
- package/build/models/data/district/index.js +0 -1
- package/build/models/data/favorite-product/index.d.ts +0 -7
- package/build/models/data/favorite-product/index.js +0 -1
- package/build/models/data/filter-category/index.d.ts +0 -12
- package/build/models/data/filter-category/index.js +0 -1
- package/build/models/data/html-meta-data/index.d.ts +0 -28
- package/build/models/data/html-meta-data/index.js +0 -1
- package/build/models/data/html-meta-data/translations/index.d.ts +0 -7
- package/build/models/data/html-meta-data/translations/index.js +0 -1
- package/build/models/data/image/index.d.ts +0 -10
- package/build/models/data/image/index.js +0 -1
- package/build/models/data/last-viewed-product/index.d.ts +0 -6
- package/build/models/data/last-viewed-product/index.js +0 -1
- package/build/models/data/merchant-settings/index.d.ts +0 -12
- package/build/models/data/merchant-settings/index.js +0 -1
- package/build/models/data/order/address/city/index.d.ts +0 -7
- package/build/models/data/order/address/city/index.js +0 -1
- package/build/models/data/order/address/country/index.d.ts +0 -9
- package/build/models/data/order/address/country/index.js +0 -1
- package/build/models/data/order/address/district/index.d.ts +0 -7
- package/build/models/data/order/address/district/index.js +0 -1
- package/build/models/data/order/address/ikas-localized-order-address.d.ts +0 -32
- package/build/models/data/order/address/ikas-localized-order-address.js +0 -1
- package/build/models/data/order/address/index.d.ts +0 -37
- package/build/models/data/order/address/index.js +0 -1
- package/build/models/data/order/address/state/index.d.ts +0 -7
- package/build/models/data/order/address/state/index.js +0 -1
- package/build/models/data/order/adjustment/applied-order-line/index.d.ts +0 -8
- package/build/models/data/order/adjustment/applied-order-line/index.js +0 -1
- package/build/models/data/order/adjustment/index.d.ts +0 -15
- package/build/models/data/order/adjustment/index.js +0 -1
- package/build/models/data/order/customer/index.d.ts +0 -11
- package/build/models/data/order/customer/index.js +0 -1
- package/build/models/data/order/gift-line/index.d.ts +0 -6
- package/build/models/data/order/gift-line/index.js +0 -1
- package/build/models/data/order/index.d.ts +0 -69
- package/build/models/data/order/index.js +0 -1
- package/build/models/data/order/invoice/index.d.ts +0 -12
- package/build/models/data/order/invoice/index.js +0 -1
- package/build/models/data/order/line-item/base-unit/index.d.ts +0 -9
- package/build/models/data/order/line-item/base-unit/index.js +0 -1
- package/build/models/data/order/line-item/base-unit/unit-type/index.d.ts +0 -6
- package/build/models/data/order/line-item/base-unit/unit-type/index.js +0 -1
- package/build/models/data/order/line-item/discount/index.d.ts +0 -11
- package/build/models/data/order/line-item/discount/index.js +0 -1
- package/build/models/data/order/line-item/index.d.ts +0 -46
- package/build/models/data/order/line-item/index.js +0 -1
- package/build/models/data/order/line-item/option/index.d.ts +0 -10
- package/build/models/data/order/line-item/option/index.js +0 -1
- package/build/models/data/order/line-item/option/value/index.d.ts +0 -9
- package/build/models/data/order/line-item/option/value/index.js +0 -1
- package/build/models/data/order/line-item/variant/brand/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/brand/index.js +0 -1
- package/build/models/data/order/line-item/variant/category/index.d.ts +0 -12
- package/build/models/data/order/line-item/variant/category/index.js +0 -1
- package/build/models/data/order/line-item/variant/index.d.ts +0 -32
- package/build/models/data/order/line-item/variant/index.js +0 -1
- package/build/models/data/order/line-item/variant/price/index.d.ts +0 -10
- package/build/models/data/order/line-item/variant/price/index.js +0 -1
- package/build/models/data/order/line-item/variant/tag/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/tag/index.js +0 -1
- package/build/models/data/order/line-item/variant/unit/index.d.ts +0 -6
- package/build/models/data/order/line-item/variant/unit/index.js +0 -1
- package/build/models/data/order/line-item/variant/value/index.d.ts +0 -11
- package/build/models/data/order/line-item/variant/value/index.js +0 -1
- package/build/models/data/order/package/index.d.ts +0 -16
- package/build/models/data/order/package/index.js +0 -1
- package/build/models/data/order/package/tracking-info/index.d.ts +0 -9
- package/build/models/data/order/package/tracking-info/index.js +0 -1
- package/build/models/data/order/payment-method/index.d.ts +0 -9
- package/build/models/data/order/payment-method/index.js +0 -1
- package/build/models/data/order/refund/index.d.ts +0 -7
- package/build/models/data/order/refund/index.js +0 -1
- package/build/models/data/order/refund/line-item/index.d.ts +0 -6
- package/build/models/data/order/refund/line-item/index.js +0 -1
- package/build/models/data/order/refund/settings/index.d.ts +0 -7
- package/build/models/data/order/refund/settings/index.js +0 -1
- package/build/models/data/order/shipping-line/index.d.ts +0 -12
- package/build/models/data/order/shipping-line/index.js +0 -1
- package/build/models/data/order/tax-line/index.d.ts +0 -6
- package/build/models/data/order/tax-line/index.js +0 -1
- package/build/models/data/order/transaction/error/index.d.ts +0 -7
- package/build/models/data/order/transaction/error/index.js +0 -1
- package/build/models/data/order/transaction/index.d.ts +0 -26
- package/build/models/data/order/transaction/index.js +0 -1
- package/build/models/data/order/transaction/payment-method-detail/index.d.ts +0 -13
- package/build/models/data/order/transaction/payment-method-detail/index.js +0 -1
- package/build/models/data/order/transaction/payment-method-detail/installment-price/index.d.ts +0 -9
- package/build/models/data/order/transaction/payment-method-detail/installment-price/index.js +0 -1
- package/build/models/data/payment-gateway/additional-price/index.d.ts +0 -9
- package/build/models/data/payment-gateway/additional-price/index.js +0 -1
- package/build/models/data/payment-gateway/index.d.ts +0 -31
- package/build/models/data/payment-gateway/index.js +0 -1
- package/build/models/data/payment-gateway/settings/index.d.ts +0 -10
- package/build/models/data/payment-gateway/settings/index.js +0 -1
- package/build/models/data/payment-gateway/translation/index.d.ts +0 -7
- package/build/models/data/payment-gateway/translation/index.js +0 -1
- package/build/models/data/product/attribute/index.d.ts +0 -15
- package/build/models/data/product/attribute/index.js +0 -1
- package/build/models/data/product/attribute/option/index.d.ts +0 -6
- package/build/models/data/product/attribute/option/index.js +0 -1
- package/build/models/data/product/attribute/table-cell/index.d.ts +0 -6
- package/build/models/data/product/attribute/table-cell/index.js +0 -1
- package/build/models/data/product/attribute/table-template/index.d.ts +0 -7
- package/build/models/data/product/attribute/table-template/index.js +0 -1
- package/build/models/data/product/attribute/translation/index.d.ts +0 -13
- package/build/models/data/product/attribute/translation/index.js +0 -1
- package/build/models/data/product/attribute-value/index.d.ts +0 -28
- package/build/models/data/product/attribute-value/index.js +0 -1
- package/build/models/data/product/back-in-stock-settings/index.d.ts +0 -5
- package/build/models/data/product/back-in-stock-settings/index.js +0 -1
- package/build/models/data/product/base-unit/index.d.ts +0 -12
- package/build/models/data/product/base-unit/index.js +0 -1
- package/build/models/data/product/campaign/data/index.d.ts +0 -27
- package/build/models/data/product/campaign/data/index.js +0 -1
- package/build/models/data/product/campaign/filter/index.d.ts +0 -7
- package/build/models/data/product/campaign/filter/index.js +0 -1
- package/build/models/data/product/campaign/index.d.ts +0 -7
- package/build/models/data/product/campaign/index.js +0 -1
- package/build/models/data/product/campaign/product-buyx-then-gety/index.d.ts +0 -20
- package/build/models/data/product/campaign/product-buyx-then-gety/index.js +0 -1
- package/build/models/data/product/campaign/product-campaign-date-range-field/index.d.ts +0 -6
- package/build/models/data/product/campaign/product-campaign-date-range-field/index.js +0 -1
- package/build/models/data/product/campaign/product-fixed-discount/index.d.ts +0 -14
- package/build/models/data/product/campaign/product-fixed-discount/index.js +0 -1
- package/build/models/data/product/filter/index.d.ts +0 -82
- package/build/models/data/product/filter/index.js +0 -1
- package/build/models/data/product/image/index.d.ts +0 -10
- package/build/models/data/product/image/index.js +0 -1
- package/build/models/data/product/index.d.ts +0 -77
- package/build/models/data/product/index.js +0 -1
- package/build/models/data/product/option-set/index.d.ts +0 -29
- package/build/models/data/product/option-set/index.js +0 -1
- package/build/models/data/product/option-set/option/index.d.ts +0 -70
- package/build/models/data/product/option-set/option/index.js +0 -1
- package/build/models/data/product/star/index.d.ts +0 -6
- package/build/models/data/product/star/index.js +0 -1
- package/build/models/data/product/stock-location/index.d.ts +0 -8
- package/build/models/data/product/stock-location/index.js +0 -1
- package/build/models/data/product/tag/index.d.ts +0 -6
- package/build/models/data/product/tag/index.js +0 -1
- package/build/models/data/product/variant/index.d.ts +0 -31
- package/build/models/data/product/variant/index.js +0 -1
- package/build/models/data/product/variant/price/index.d.ts +0 -19
- package/build/models/data/product/variant/price/index.js +0 -1
- package/build/models/data/product/variant/unit/index.d.ts +0 -6
- package/build/models/data/product/variant/unit/index.js +0 -1
- package/build/models/data/product/variant-type/index.d.ts +0 -8
- package/build/models/data/product/variant-type/index.js +0 -1
- package/build/models/data/raffle/index.d.ts +0 -63
- package/build/models/data/raffle/index.js +0 -1
- package/build/models/data/sales-channel/index.d.ts +0 -19
- package/build/models/data/sales-channel/index.js +0 -1
- package/build/models/data/state/index.d.ts +0 -11
- package/build/models/data/state/index.js +0 -1
- package/build/models/data/state/location-translations/index.d.ts +0 -7
- package/build/models/data/stock-location/address/city/index.d.ts +0 -7
- package/build/models/data/stock-location/address/city/index.js +0 -1
- package/build/models/data/stock-location/address/country/index.d.ts +0 -7
- package/build/models/data/stock-location/address/country/index.js +0 -1
- package/build/models/data/stock-location/address/district/index.d.ts +0 -7
- package/build/models/data/stock-location/address/district/index.js +0 -1
- package/build/models/data/stock-location/address/index.d.ts +0 -15
- package/build/models/data/stock-location/address/index.js +0 -1
- package/build/models/data/stock-location/address/state/index.d.ts +0 -7
- package/build/models/data/stock-location/address/state/index.js +0 -1
- package/build/models/data/stock-location/available/index.d.ts +0 -10
- package/build/models/data/stock-location/available/index.js +0 -1
- package/build/models/data/stock-location/index.d.ts +0 -14
- package/build/models/data/stock-location/index.js +0 -1
- package/build/models/data/storefront/domain/index.d.ts +0 -9
- package/build/models/data/storefront/domain/index.js +0 -1
- package/build/models/data/storefront/index.d.ts +0 -30
- package/build/models/data/storefront/index.js +0 -1
- package/build/models/data/storefront/localization/index.d.ts +0 -8
- package/build/models/data/storefront/localization/index.js +0 -1
- package/build/models/data/storefront/meta-templates/index.d.ts +0 -8
- package/build/models/data/storefront/meta-templates/index.js +0 -1
- package/build/models/data/storefront/routing/dynamic-currency/index.d.ts +0 -6
- package/build/models/data/storefront/routing/dynamic-currency/index.js +0 -1
- package/build/models/data/storefront/routing/index.d.ts +0 -14
- package/build/models/data/storefront/routing/index.js +0 -1
- package/build/models/data/storefront/theme/index.d.ts +0 -10
- package/build/models/data/storefront/theme/index.js +0 -1
- package/build/models/data/storefront/theme-localization/index.d.ts +0 -15
- package/build/models/data/storefront/theme-localization/index.js +0 -1
- package/build/models/data/variant-type/index.d.ts +0 -13
- package/build/models/data/variant-type/index.js +0 -1
- package/build/models/data/variant-type/variant-value/index.d.ts +0 -12
- package/build/models/data/variant-type/variant-value/index.js +0 -1
- package/build/models/ui/customer-review-list/index.js +0 -1
- package/build/models/ui/customer-review-summary-list/index.js +0 -1
- package/build/models/ui/raffle-list/index.js +0 -1
- package/build/store/base.js +0 -1
- package/build/store/blog/index.d.ts +0 -26
- package/build/store/blog/index.js +0 -1
- package/build/store/brand/index.d.ts +0 -12
- package/build/store/brand/index.js +0 -1
- package/build/store/cart/api.d.ts +0 -10
- package/build/store/cart/api.js +0 -1
- package/build/store/category/index.d.ts +0 -12
- package/build/store/category/index.js +0 -1
- package/build/store/checkout/index.d.ts +0 -16
- package/build/store/checkout/index.js +0 -1
- package/build/store/customer/api.d.ts +0 -54
- package/build/store/customer/api.js +0 -1
- package/build/store/html-meta-data/index.d.ts +0 -6
- package/build/store/html-meta-data/index.js +0 -1
- package/build/store/location/index.d.ts +0 -9
- package/build/store/location/index.js +0 -1
- package/build/store/merchant/index.d.ts +0 -6
- package/build/store/product/index.d.ts +0 -47
- package/build/store/product/index.js +0 -1
- package/build/store/raffle/index.d.ts +0 -15
- package/build/store/raffle/index.js +0 -1
- package/build/store/storefront/index.d.ts +0 -5
- package/build/utils/currency.d.ts +0 -7
- package/build/utils/currency.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as s,__rest as t}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import{useTranslation as a}from"../../utils/i18n.js";import{getMasterPassRequestToken as n,MasterPassOperationTypeEnum as r}from"@ikas/storefront-api";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";var c="ikasMasterPass",u="https://cdn.myikas.com/sf/scripts/mfs-client-nojquery.min.js",d="undefined"==typeof localStorage,l=/000000[0|1]{10}/g,h=/[0|1]1100[0|1]{11}/g,p=/[0|1]11100[0|1]{10}/g,m=function(){function c(){var c=this;this.checkMasterPassData={status:""},this.saveCardToMasterPass={isCheckboxChecked:!1,cardName:"",phoneNumber:"",isSendConfirmationButtonPending:!1},this.otpResponse={status:"",text:""},this.isOtpFormSubmitAtLeastOnce=!1,this.visibleModal=void 0,this.cards=[],this.saveCardToMasterPassPhoneNumberDisabledInputValue=function(e){var s=e.store,t=e.checkout,o=e.withPlus;return c.phoneNumber({store:s,checkout:t,withPlus:o})||""},this.onSaveCardToMasterPassCheckedChange=function(e){c.saveCardToMasterPass.isCheckboxChecked=e},this.onSaveCardToMasterPassCardNameChange=function(e){c.saveCardToMasterPass.cardName=e},this.onSaveCardToMasterPassPhoneNumberChange=function(e){c.saveCardToMasterPass.phoneNumber=e},this.onSaveCardToMasterPassSendConfirmationButtonClick=function(e){var s=e.creditCard,t=e.store,o=e.checkout,a=e.paymentGateway,n=e.callback;console.log("onSaveCardToMasterPassSendConfirmationButtonClick 1"),c.register({creditCard:s,store:t,checkout:o,paymentGateway:a,callback:n})},this.showLinkCardToClient=function(){c.visibleModal="linkCardToClient"},this.hideLinkCardToClient=function(){c.visibleModal=void 0},this.showOtpModal=function(e){c.otpResponse.text="",c.otpResponse.status="",c.visibleModal="masterPassOtp"===e?"otpModalMasterPass":"otpModalBank",console.log("calisti",c.visibleModal)},this.hideOtpModal=function(){c.visibleModal=void 0,c.otpResponse.text="",c.otpResponse.status="",c.isOtpFormSubmitAtLeastOnce=!1},this.onResponseModalClose=function(){c.visibleModal=void 0,c.mfsResponseModalText=""},this.onSuccessModalClose=function(){c.visibleModal=void 0},this.onLinkCardToClientButtonClick=function(e){c.linkCardToClient(e)},this.onOtpFormSubmit=function(e){c.otpResponse.text="",c.otpResponse.status="",c.validateTransaction(e)},this.MFS=function(){var e;if(!d){if(window.MFS&&(null===(e=window.MFS)||void 0===e?void 0:e.setClientId)){var s=window.MFS;return s.setAddress("https://ui.masterpassturkiye.com/v2"),s}console.error("MFS can not use.")}},this.getToken=function(t){var o=t.cartId,a=t.paymentGatewayId,r=t.operationType,i=t.phoneNumber;return e(c,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:return[4,n({cartId:o,paymentGatewayId:a,operationType:r,phoneNumber:i})];case 1:return(e=s.sent()).data&&e.isSuccess&&!e.errors.length?[2,e.data]:(this.showTokenErrorWithModal(),[2])}}))}))},this.phoneNumber=function(e){var s,t,o=e.store,a=e.checkout,n=e.withPlus,r=void 0!==n&&n,i=(null===(s=o.customerStore.customer)||void 0===s?void 0:s.phone)||(null===(t=a.shippingAddress)||void 0===t?void 0:t.phone);return i&&i.includes("+")&&!r&&(i=i.replace("+","")),i},this.sendSmsLanguage=function(e){var s,t="tur";if(e.localeOptions.length){var o=e.localeOptions.find((function(e){return e.routing.locale===i.getCurrentLocale()}));o&&o.iso3&&(t=null===(s=o.iso3)||void 0===s?void 0:s.toLowerCase())}return t},this.clearSaveCardToMasterPassForm=function(){c.saveCardToMasterPass.isCheckboxChecked=!1,c.saveCardToMasterPass.phoneNumber="",c.saveCardToMasterPass.cardName="",c.saveCardToMasterPass.isSendConfirmationButtonPending=!1},this.mfsResponseHandler=function(e){return function(s,t){console.log({field:"mfsResponseHandler",response:t}),e.callback&&e.callback();var o,a=function(e){var s;return null===(s=null==t?void 0:t.accountStatus)||void 0===s?void 0:s.match(e)};a(l)&&(c.checkMasterPassData.status="noMasterPassAccount",(o=c.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(c.saveCardToMasterPass.phoneNumber=o));a(h)&&(c.checkMasterPassData.status="hasMasterPassAccountButDoesNotHaveAnyOperation",c.showLinkCardToClient(),(o=c.phoneNumber({checkout:e.checkout,store:e.store,withPlus:!0}))&&(c.saveCardToMasterPass.phoneNumber=o));if(a(p)&&(c.checkMasterPassData.status="hasMasterPassAccountAndHasRelation",(null==e?void 0:e.checkout)&&e.store&&(c.listCards({store:e.store,checkout:e.checkout}),console.log("call listcards"))),"validateTransaction"!==e.source&&"resendOtp"!==e.source||!t.responseDescription||(c.otpResponse.text=t.responseDescription,"1409"===t.responseCode&&(c.otpResponse.status="error")),"0000"!=t.responseCode&&""!=t.responseCode||(console.log("Register Success"),"deleteCard"===e.source&&c.listCards({store:e.store,checkout:e.checkout}),"validateTransaction"===e.source&&(null==e?void 0:e.checkout)&&e.store&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===c.checkMasterPassData.status?c.visibleModal="linkCardToClientModalSuccess":c.visibleModal="otpModalSuccess",e.checkout.selectedPaymentGateway=void 0,c.clearSaveCardToMasterPassForm(),c.listCards({store:e.store,checkout:e.checkout}))),"5196"===t.responseCode&&t.responseDescription&&(c.visibleModal="mfsResponseModal",c.mfsResponseModalText=t.responseDescription),"5001"==t.responseCode||"5008"==t.responseCode){var n="5001"===t.responseCode?"bankOtp":"masterPassOtp";c.showOtpModal(n)}if("5010"==t.responseCode&&"undefined"!=typeof window)return console.log('response.responseCode == "5010"'),void window.location.assign(t.url3D+"&returnUrl="+window.location.href);console.log({source:"MFS response.responseDescription",responseDescription:t.responseDescription,response:t})}},this.showTokenErrorWithModal=function(){var e=a().t;c.visibleModal="mfsResponseModal",c.mfsResponseModalText=e("checkout-page:errorUnknown")},this.checkMasterPass=function(o){return e(c,void 0,void 0,(function(){var e,a,n,i,c,u,d=o.checkout,l=o.store;return t(o,["checkout","store"]),s(this,(function(s){switch(s.label){case 0:return console.log("checkMasterPass 1"),(e=this.MFS())?(a=this.phoneNumber({store:l,checkout:d}),console.log("checkMasterPass 2"),n=d.masterPassPaymentGateway,a&&n&&n.masterPassClientId?(console.log("checkMasterPass 3",a),[4,this.getToken({cartId:d.id,paymentGatewayId:n.id,operationType:r.CHECK_MASTER_PASS_USER,phoneNumber:a})]):[2]):[2];case 1:return(i=s.sent())?(e.setClientId(n.masterPassClientId),c=this.sendSmsLanguage(l),u=this.prepareFormData({sendSmsLanguage:c,sendSms:"N",referenceNo:i.requestReferenceNumber,token:i.token,userId:a}),e.checkMasterPass(u,this.mfsResponseHandler({source:"checkMasterPass",checkout:d,store:l})),console.log("checkMasterPass 4"),[2]):[2]}}))}))},this.register=function(t){var o=t.creditCard,a=t.store,n=t.checkout,i=t.paymentGateway,u=t.callback;return e(c,void 0,void 0,(function(){var e,t,c,d;return s(this,(function(s){switch(s.label){case 0:return console.log("register 1"),(e=this.MFS())?(console.log("register 2"),(t=o.phoneNumber)&&i.masterPassClientId?(console.log("register 3"),[4,this.getToken({cartId:n.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]):[2]):[2];case 1:return c=s.sent(),console.log("register 4"),(null==c?void 0:c.token)?(d=this.prepareFormData({msisdn:t,token:null==c?void 0:c.token,referenceNo:c.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(a),rtaPan:o.rtaPan,expiryDate:o.expiryDate,cvc:o.cvc,accountAliasName:o.accountAliasName,timeZone:c.timeZone,sendSms:"Y",actionType:"A",clientIp:"",delinkReason:"",eActionType:"A",cardTypeFlag:"05",cpinFlag:"Y",defaultAccount:"Y",mmrpConfig:"110010",identityVerificationFlag:"Y",mobileAccountConfig:"MWA",uiChannelType:"6"}),console.log("reigster 5"),e.setClientId(i.masterPassClientId),e.register(d,this.mfsResponseHandler({source:"register",store:a,checkout:n,callback:u})),[2]):[2]}}))}))},this.resendOtp=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(c,void 0,void 0,(function(){var e,t,r;return s(this,(function(s){return this.isOtpFormSubmitAtLeastOnce&&(e=this.MFS())?(t=e.getLastToken(),r=this.sendSmsLanguage(o),e.resendOtp(t,r,this.mfsResponseHandler({source:"resendOtp",store:o,checkout:a,callback:n})),[2]):[2]}))}))},this.linkCardToClient=function(t){var o=t.store,a=t.checkout,n=t.callback;return e(c,void 0,void 0,(function(){var e,t,i,c,u;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:o,checkout:a}))&&(null==(i=a.masterPassPaymentGateway)?void 0:i.id))?[4,this.getToken({cartId:a.id,paymentGatewayId:i.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(c=s.sent())?(u=this.prepareFormData({sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(o),token:c.token,referenceNo:c.requestReferenceNumber,cardAliasName:"",msisdn:t}),e.linkCardToClient(u,this.mfsResponseHandler({source:"linkCardToClient",store:o,checkout:a,callback:n})),[2]):(n&&n(),[2])}}))}))},this.validateTransaction=function(t){var o=t.validationCode,a=t.store,n=t.checkout,i=t.callback;return e(c,void 0,void 0,(function(){var e,t,c,u,d;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({store:a,checkout:n}))&&(c=n.masterPassPaymentGateway))?[4,this.getToken({cartId:n.id,paymentGatewayId:c.id,operationType:r.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(u=s.sent())?(d=this.prepareFormData({pinType:"otp",validationCode:o,sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(a),token:u.token,referenceNo:u.requestReferenceNumber}),this.isOtpFormSubmitAtLeastOnce||(this.isOtpFormSubmitAtLeastOnce=!0),e.validateTransaction(d,this.mfsResponseHandler({source:"validateTransaction",store:a,checkout:n,callback:i})),[2]):[2]}}))}))},this.listCards=function(t){var o=t.store,a=t.checkout;return e(c,void 0,void 0,(function(){var e,t,n,i,c,u,d=this;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?(n=null===(u=a.masterPassPaymentGateway)||void 0===u?void 0:u.id,console.log("listCards paymentGatewayId",n),n?[4,this.getToken({cartId:a.id,paymentGatewayId:n,operationType:r.LIST_CARDS,phoneNumber:t})]:[2]):[2];case 1:return(i=s.sent())?(c=function(e,s){"0000"!=s.responseCode&&""!=s.responseCode&&(console.error({source:"mfs response.responseDescription",responseDescription:s.responseDescription,response:s}),console.log("TransactionID->",s.transactionId));var t=[];if(Array.isArray(s.cards)&&s.cards.length)for(var o=0;o<s.cards.length;o++){var a=s.cards[o];a.paymentGatewayId=n,t.push(a)}d.cards=t,console.log("list_card response->",s),console.log("Cards",t),console.log("TransactionID->",s.transactionId)},e.listCards(t,i.token,c),[2]):[2]}}))}))},this.deleteCard=function(t){var o=t.store,a=t.checkout,n=t.card;return e(c,void 0,void 0,(function(){var e,t,i,c;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({store:o,checkout:a}))?[4,this.getToken({cartId:a.id,paymentGatewayId:n.paymentGatewayId,operationType:r.DELETE_CARD,phoneNumber:t})]:[2];case 1:return(i=s.sent())?(c=this.prepareFormData({sendSms:"N",msisdn:t,token:i.token,referenceNo:i.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(o),accountAliasName:n.Name}),e.deleteCard(c,this.mfsResponseHandler({source:"deleteCard",store:o,checkout:a})),[2]):[2]}}))}))},o(this)}return Object.defineProperty(c.prototype,"isSaveCardToMasterPassPhoneNumberInputVisible",{get:function(){return("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||this.checkMasterPassData.status,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isSaveCardToMasterPassPhoneNumberInputDisabled",{get:function(){return!("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)||("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||"noMasterPassAccount"===this.checkMasterPassData.status)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isSendConfirmationButtonDisabled",{get:function(){return this.isSaveCardToMasterPassPhoneNumberInputVisible?this.isSaveCardToMasterPassPhoneNumberInputDisabled?!this.saveCardToMasterPass.cardName:!this.saveCardToMasterPass.cardName||!this.saveCardToMasterPass.phoneNumber:!this.saveCardToMasterPass.cardName},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isLinkCardToClientVisible",{get:function(){return"linkCardToClient"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isOtpModalVisible",{get:function(){return"otpModalBank"===this.visibleModal||"otpModalMasterPass"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isResponseModalVisible",{get:function(){return!("mfsResponseModal"!==this.visibleModal||!this.mfsResponseModalText)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"isSuccessModalVisible",{get:function(){return"linkCardToClientModalSuccess"===this.visibleModal||"otpModalSuccess"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"otpModalType",{get:function(){return"otpModalMasterPass"===this.visibleModal?"masterPassOtp":"bankOtp"},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"successModalType",{get:function(){return"hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status?"linkCardToClient":"register"},enumerable:!1,configurable:!0}),c.prototype.prepareFormData=function(e){var s=new FormData;return Object.entries(e).forEach((function(e){var t=e[0],o=e[1];return s.append(t,o)})),s},c}();export{c as MFS_ELEMENT_ID,u as MFS_SCRIPT_URL,m as default};
|
|
1
|
+
import{__awaiter as e,__generator as s,__rest as t}from'./../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o}from"mobx";import{useTranslation as a}from"../../utils/i18n.js";import{IkasBaseStore as n}from"../../store/base/index.js";import{getMasterPassRequestToken as r,MasterPassOperationTypeEnum as i}from"@ikas/storefront-api";import{IkasStorefrontConfig as c}from"@ikas/storefront-config";import"lodash/flatten";import"lodash/sortBy";import"@ikas/storefront-model-functions";import"../../store/cart/index.js";import"./types.js";import{IkasCustomerStore as d}from"../../store/customer/index.js";import"../../analytics/events.js";import"lodash/cloneDeep";import"../../store/analytics/index.js";import"../../analytics/ikas.js";import"../../store/customer/consent/data.js";import"../../analytics/head/index.js";import"../../store/customer/account-auth/data.js";import"../../store/customer/captcha/data.js";import"../../store/customer/product/data.js";import"lodash/xorBy";import'./../../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"@ikas/storefront-models";import"@ikas/localized-address";import"../../store/customer/marketing/data.js";import"../../store/customer/order/data.js";import"@ikas/storefront-providers";var u="ikasMasterPass",l="https://cdn.myikas.com/sf/scripts/mfs-client-nojquery.min.js",p="undefined"==typeof localStorage,h=/000000[0|1]{10}/g,m=/[0|1]1100[0|1]{11}/g,f=/[0|1]11100[0|1]{10}/g,v=function(){function u(){var u=this;this.checkMasterPassData={status:""},this.saveCardToMasterPass={isCheckboxChecked:!1,cardName:"",phoneNumber:"",isSendConfirmationButtonPending:!1},this.otpResponse={status:"",text:""},this.isOtpFormSubmitAtLeastOnce=!1,this.visibleModal=void 0,this.cards=[],this.saveCardToMasterPassPhoneNumberDisabledInputValue=function(e){var s=e.checkout,t=e.withPlus;return u.phoneNumber({checkout:s,withPlus:t})||""},this.onSaveCardToMasterPassCheckedChange=function(e){u.saveCardToMasterPass.isCheckboxChecked=e},this.onSaveCardToMasterPassCardNameChange=function(e){u.saveCardToMasterPass.cardName=e},this.onSaveCardToMasterPassPhoneNumberChange=function(e){u.saveCardToMasterPass.phoneNumber=e},this.onSaveCardToMasterPassSendConfirmationButtonClick=function(e){var s=e.creditCard,t=e.checkout,o=e.paymentGateway,a=e.callback;console.log("onSaveCardToMasterPassSendConfirmationButtonClick 1"),u.register({creditCard:s,checkout:t,paymentGateway:o,callback:a})},this.showLinkCardToClient=function(){u.visibleModal="linkCardToClient"},this.hideLinkCardToClient=function(){u.visibleModal=void 0},this.showOtpModal=function(e){u.otpResponse.text="",u.otpResponse.status="",u.visibleModal="masterPassOtp"===e?"otpModalMasterPass":"otpModalBank",console.log("calisti",u.visibleModal)},this.hideOtpModal=function(){u.visibleModal=void 0,u.otpResponse.text="",u.otpResponse.status="",u.isOtpFormSubmitAtLeastOnce=!1},this.onResponseModalClose=function(){u.visibleModal=void 0,u.mfsResponseModalText=""},this.onSuccessModalClose=function(){u.visibleModal=void 0},this.onLinkCardToClientButtonClick=function(e){u.linkCardToClient(e)},this.onOtpFormSubmit=function(e){u.otpResponse.text="",u.otpResponse.status="",u.validateTransaction(e)},this.MFS=function(){var e;if(!p){if(window.MFS&&(null===(e=window.MFS)||void 0===e?void 0:e.setClientId)){var s=window.MFS;return s.setAddress("https://ui.masterpassturkiye.com/v2"),s}console.error("MFS can not use.")}},this.getToken=function(t){var o=t.cartId,a=t.paymentGatewayId,n=t.operationType,i=t.phoneNumber;return e(u,void 0,void 0,(function(){var e;return s(this,(function(s){switch(s.label){case 0:return[4,r({cartId:o,paymentGatewayId:a,operationType:n,phoneNumber:i})];case 1:return(e=s.sent()).data&&e.isSuccess&&!e.errors.length?[2,e.data]:(this.showTokenErrorWithModal(),[2])}}))}))},this.phoneNumber=function(e){var s,t,o=e.checkout,a=e.withPlus,n=void 0!==a&&a,r=(null===(s=d.customer)||void 0===s?void 0:s.phone)||(null===(t=o.shippingAddress)||void 0===t?void 0:t.phone);return r&&r.includes("+")&&!n&&(r=r.replace("+","")),r},this.sendSmsLanguage=function(){var e,s=n,t="tur";if(s.localeOptions.length){var o=s.localeOptions.find((function(e){return e.routing.locale===c.getCurrentLocale()}));o&&o.iso3&&(t=null===(e=o.iso3)||void 0===e?void 0:e.toLowerCase())}return t},this.clearSaveCardToMasterPassForm=function(){u.saveCardToMasterPass.isCheckboxChecked=!1,u.saveCardToMasterPass.phoneNumber="",u.saveCardToMasterPass.cardName="",u.saveCardToMasterPass.isSendConfirmationButtonPending=!1},this.mfsResponseHandler=function(e){return function(s,t){console.log({field:"mfsResponseHandler",response:t}),e.callback&&e.callback();var o,a=function(e){var s;return null===(s=null==t?void 0:t.accountStatus)||void 0===s?void 0:s.match(e)};a(h)&&(u.checkMasterPassData.status="noMasterPassAccount",(o=u.phoneNumber({checkout:e.checkout,withPlus:!0}))&&(u.saveCardToMasterPass.phoneNumber=o));a(m)&&(u.checkMasterPassData.status="hasMasterPassAccountButDoesNotHaveAnyOperation",u.showLinkCardToClient(),(o=u.phoneNumber({checkout:e.checkout,withPlus:!0}))&&(u.saveCardToMasterPass.phoneNumber=o));if(a(f)&&(u.checkMasterPassData.status="hasMasterPassAccountAndHasRelation",(null==e?void 0:e.checkout)&&(u.listCards({checkout:e.checkout}),console.log("call listcards"))),"validateTransaction"!==e.source&&"resendOtp"!==e.source||!t.responseDescription||(u.otpResponse.text=t.responseDescription,"1409"===t.responseCode&&(u.otpResponse.status="error")),"0000"!=t.responseCode&&""!=t.responseCode||(console.log("Register Success"),"deleteCard"===e.source&&u.listCards({checkout:e.checkout}),"validateTransaction"===e.source&&(null==e?void 0:e.checkout)&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===u.checkMasterPassData.status?u.visibleModal="linkCardToClientModalSuccess":u.visibleModal="otpModalSuccess",e.checkout.selectedPaymentGateway=void 0,u.clearSaveCardToMasterPassForm(),u.listCards({checkout:e.checkout}))),"5196"===t.responseCode&&t.responseDescription&&(u.visibleModal="mfsResponseModal",u.mfsResponseModalText=t.responseDescription),"5001"==t.responseCode||"5008"==t.responseCode){var n="5001"===t.responseCode?"bankOtp":"masterPassOtp";u.showOtpModal(n)}if("5010"==t.responseCode&&"undefined"!=typeof window)return console.log('response.responseCode == "5010"'),void window.location.assign(t.url3D+"&returnUrl="+window.location.href);console.log({source:"MFS response.responseDescription",responseDescription:t.responseDescription,response:t})}},this.showTokenErrorWithModal=function(){var e=a().t;u.visibleModal="mfsResponseModal",u.mfsResponseModalText=e("checkout-page:errorUnknown")},this.checkMasterPass=function(o){return e(u,void 0,void 0,(function(){var e,a,n,r,c,d,u=o.checkout;return t(o,["checkout"]),s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())?(a=this.phoneNumber({checkout:u}),n=u.masterPassPaymentGateway,a&&n&&n.masterPassClientId?[4,this.getToken({cartId:u.id,paymentGatewayId:n.id,operationType:i.CHECK_MASTER_PASS_USER,phoneNumber:a})]:[2]):[2];case 1:return(r=s.sent())?(e.setClientId(n.masterPassClientId),c=this.sendSmsLanguage(),d=this.prepareFormData({sendSmsLanguage:c,sendSms:"N",referenceNo:r.requestReferenceNumber,token:r.token,userId:a}),e.checkMasterPass(d,this.mfsResponseHandler({source:"checkMasterPass",checkout:u})),console.log("checkMasterPass 4"),[2]):[2]}}))}))},this.register=function(t){var o=t.creditCard,a=t.checkout,n=t.paymentGateway,r=t.callback;return e(u,void 0,void 0,(function(){var e,t,c,d;return s(this,(function(s){switch(s.label){case 0:return console.log("register 1"),(e=this.MFS())?(console.log("register 2"),(t=o.phoneNumber)&&n.masterPassClientId?(console.log("register 3"),[4,this.getToken({cartId:a.id,paymentGatewayId:n.id,operationType:i.REGISTER_CARD,phoneNumber:t})]):[2]):[2];case 1:return c=s.sent(),console.log("register 4"),(null==c?void 0:c.token)?(d=this.prepareFormData({msisdn:t,token:null==c?void 0:c.token,referenceNo:c.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(),rtaPan:o.rtaPan,expiryDate:o.expiryDate,cvc:o.cvc,accountAliasName:o.accountAliasName,timeZone:c.timeZone,sendSms:"Y",actionType:"A",clientIp:"",delinkReason:"",eActionType:"A",cardTypeFlag:"05",cpinFlag:"Y",defaultAccount:"Y",mmrpConfig:"110010",identityVerificationFlag:"Y",mobileAccountConfig:"MWA",uiChannelType:"6"}),console.log("reigster 5"),e.setClientId(n.masterPassClientId),e.register(d,this.mfsResponseHandler({source:"register",checkout:a,callback:r})),[2]):[2]}}))}))},this.resendOtp=function(t){var o=t.checkout,a=t.callback;return e(u,void 0,void 0,(function(){var e,t,n;return s(this,(function(s){return this.isOtpFormSubmitAtLeastOnce&&(e=this.MFS())?(t=e.getLastToken(),n=this.sendSmsLanguage(),e.resendOtp(t,n,this.mfsResponseHandler({source:"resendOtp",checkout:o,callback:a})),[2]):[2]}))}))},this.linkCardToClient=function(t){var o=t.checkout,a=t.callback;return e(u,void 0,void 0,(function(){var e,t,n,r,c;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({checkout:o}))&&(null==(n=o.masterPassPaymentGateway)?void 0:n.id))?[4,this.getToken({cartId:o.id,paymentGatewayId:n.id,operationType:i.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(r=s.sent())?(c=this.prepareFormData({sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(),token:r.token,referenceNo:r.requestReferenceNumber,cardAliasName:"",msisdn:t}),e.linkCardToClient(c,this.mfsResponseHandler({source:"linkCardToClient",checkout:o,callback:a})),[2]):(a&&a(),[2])}}))}))},this.validateTransaction=function(t){var o=t.validationCode,a=t.checkout,n=t.callback;return e(u,void 0,void 0,(function(){var e,t,r,c,d;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&((t=this.phoneNumber({checkout:a}))&&(r=a.masterPassPaymentGateway))?[4,this.getToken({cartId:a.id,paymentGatewayId:r.id,operationType:i.REGISTER_CARD,phoneNumber:t})]:[2];case 1:return(c=s.sent())?(d=this.prepareFormData({pinType:"otp",validationCode:o,sendSms:"Y",sendSmsLanguage:this.sendSmsLanguage(),token:c.token,referenceNo:c.requestReferenceNumber}),this.isOtpFormSubmitAtLeastOnce||(this.isOtpFormSubmitAtLeastOnce=!0),e.validateTransaction(d,this.mfsResponseHandler({source:"validateTransaction",checkout:a,callback:n})),[2]):[2]}}))}))},this.listCards=function(t){var o=t.checkout;return e(u,void 0,void 0,(function(){var e,t,a,n,r,c,d=this;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({checkout:o}))?(a=null===(c=o.masterPassPaymentGateway)||void 0===c?void 0:c.id,console.log("listCards paymentGatewayId",a),a?[4,this.getToken({cartId:o.id,paymentGatewayId:a,operationType:i.LIST_CARDS,phoneNumber:t})]:[2]):[2];case 1:return(n=s.sent())?(r=function(e,s){"0000"!=s.responseCode&&""!=s.responseCode&&(console.error({source:"mfs response.responseDescription",responseDescription:s.responseDescription,response:s}),console.log("TransactionID->",s.transactionId));var t=[];if(Array.isArray(s.cards)&&s.cards.length)for(var o=0;o<s.cards.length;o++){var n=s.cards[o];n.paymentGatewayId=a,t.push(n)}d.cards=t,console.log("list_card response->",s),console.log("Cards",t),console.log("TransactionID->",s.transactionId)},e.listCards(t,n.token,r),[2]):[2]}}))}))},this.deleteCard=function(t){var o=t.checkout,a=t.card;return e(u,void 0,void 0,(function(){var e,t,n,r;return s(this,(function(s){switch(s.label){case 0:return(e=this.MFS())&&(t=this.phoneNumber({checkout:o}))?[4,this.getToken({cartId:o.id,paymentGatewayId:a.paymentGatewayId,operationType:i.DELETE_CARD,phoneNumber:t})]:[2];case 1:return(n=s.sent())?(r=this.prepareFormData({sendSms:"N",msisdn:t,token:n.token,referenceNo:n.requestReferenceNumber,sendSmsLanguage:this.sendSmsLanguage(),accountAliasName:a.Name}),e.deleteCard(r,this.mfsResponseHandler({source:"deleteCard",checkout:o})),[2]):[2]}}))}))},o(this)}return Object.defineProperty(u.prototype,"isSaveCardToMasterPassPhoneNumberInputVisible",{get:function(){return("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)&&("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||this.checkMasterPassData.status,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSaveCardToMasterPassPhoneNumberInputDisabled",{get:function(){return!("hasMasterPassAccountAndHasRelation"!==this.checkMasterPassData.status||!this.cards.length)||("hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status||"noMasterPassAccount"===this.checkMasterPassData.status)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSendConfirmationButtonDisabled",{get:function(){return this.isSaveCardToMasterPassPhoneNumberInputVisible?this.isSaveCardToMasterPassPhoneNumberInputDisabled?!this.saveCardToMasterPass.cardName:!this.saveCardToMasterPass.cardName||!this.saveCardToMasterPass.phoneNumber:!this.saveCardToMasterPass.cardName},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isLinkCardToClientVisible",{get:function(){return"linkCardToClient"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isOtpModalVisible",{get:function(){return"otpModalBank"===this.visibleModal||"otpModalMasterPass"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isResponseModalVisible",{get:function(){return!("mfsResponseModal"!==this.visibleModal||!this.mfsResponseModalText)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"isSuccessModalVisible",{get:function(){return"linkCardToClientModalSuccess"===this.visibleModal||"otpModalSuccess"===this.visibleModal},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"otpModalType",{get:function(){return"otpModalMasterPass"===this.visibleModal?"masterPassOtp":"bankOtp"},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"successModalType",{get:function(){return"hasMasterPassAccountButDoesNotHaveAnyOperation"===this.checkMasterPassData.status?"linkCardToClient":"register"},enumerable:!1,configurable:!0}),u.prototype.prepareFormData=function(e){var s=new FormData;return Object.entries(e).forEach((function(e){var t=e[0],o=e[1];return s.append(t,o)})),s},u}();export{u as MFS_ELEMENT_ID,l as MFS_SCRIPT_URL,v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as o}from"../../components/form-item/index.js";import{FormItemType as i,FormItemInputMode as
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as o}from"../../components/form-item/index.js";import{FormItemType as i,FormItemInputMode as s}from"../../components/form-item/model.js";import{Button as r}from"../../components/button/index.js";import{Checkbox as m}from"../../components/checkbox/index.js";import a from"../../components/error/index.js";import n from"../../styles/common.module.scss.js";import c from"../../components/customer-addresses/index.js";import l from"../../components/customer-addresses/model.js";import{IkasOrderFunctions as p}from"@ikas/storefront-model-functions";import{useTranslation as d}from"../../../../utils/i18n.js";import"../../../../store/base/index.js";import"@ikas/storefront-api";import"@ikas/storefront-config";import"lodash/flatten";import"lodash/sortBy";import"../../../../store/cart/index.js";import"../../types.js";import{IkasCustomerStore as u}from"../../../../store/customer/index.js";import"../../../../analytics/events.js";import"lodash/cloneDeep";import"../../../../store/analytics/index.js";import"../../../../analytics/ikas.js";import"../../../../store/customer/consent/data.js";import"../../../../analytics/head/index.js";import"../../../../store/customer/account-auth/data.js";import"../../../../store/customer/captcha/data.js";import"../../../../store/customer/product/data.js";import"lodash/xorBy";import'./../../../../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"@ikas/storefront-models";import"@ikas/localized-address";import"../../../../store/customer/marketing/data.js";import"../../../../store/customer/order/data.js";import"@ikas/storefront-providers";var h=t((function(t){var h,f,k=t.vm,g=d().t,j=e.useCallback((function(e){k.checkout.customer&&(k.checkout.customer.email=e?e.trim():e)}),[k,k.checkout,k.checkout.customer]),x=e.useMemo((function(){return k.isDigitalOnly?new l(k,"billing"):new l(k,"shipping")}),[k]),y=p.hasCustomer,v=p.hasValidCustomerEmail;return e.createElement("div",null,e.createElement(a,{vm:k}),!y(k.checkout)&&e.createElement("div",{style:{marginTop:"8px",marginBottom:"40px"}},e.createElement("div",{className:n.FormSectionTitle},e.createElement("div",{className:n.Title},g("checkout-page:contactInfo"))),e.createElement(o,{type:i.TEXT,inputMode:s.EMAIL,label:g("checkout-page:email"),autocomplete:"email",value:(null===(h=k.checkout.customer)||void 0===h?void 0:h.email)||"",onChange:j,hasError:k.isErrorsVisible&&!v(k.checkout),errorText:g("checkout-page:emailError"),tooltipText:g("checkout-page:guestEmailTooltip")}),e.createElement(m,{value:(null===(f=k.checkout.customer)||void 0===f?void 0:f.notificationsAccepted)||!1,label:g("checkout-page:customerConsentCta"),onChange:k.setCustomerConsentGranted})),e.createElement(c,{vm:x}),!x.editingCustomerAddress&&e.createElement(r,{style:{width:"100%",marginTop:u.customer?"0px":"32px"},text:"address"!==k.deliveryMethod||k.isDigitalOnly?g("checkout-page:actions.continueWithPayment"):g("checkout-page:actions.continueWithShipping"),isLoading:k.isStepLoading,onClick:k.isDigitalOnly?k.onProceedToDigitalOnlyPaymentClick:k.onProceedToShippingClick}))}));export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as r}from"mobx-react-lite";import{Checkbox as t}from"../../../components/checkbox/index.js";import s from"../../../components/customer-addresses/model.js";import n from"../../../components/customer-addresses/index.js";import"@ikas/storefront-
|
|
1
|
+
import*as e from"react";import{observer as r}from"mobx-react-lite";import{Checkbox as t}from"../../../components/checkbox/index.js";import s from"../../../components/customer-addresses/model.js";import n from"../../../components/customer-addresses/index.js";import"@ikas/storefront-model-functions";import{useTranslation as o}from"../../../../../utils/i18n.js";var i=r((function(r){var i=r.vm,m=o().t,d=e.useMemo((function(){return new s(i,"billing")}),[i]);return e.useEffect((function(){"in-store"===i.deliveryMethod&&i.setUseDifferentAddress(!0)}),[i]),e.createElement(e.Fragment,null,e.createElement("div",{style:{marginTop:"32px",marginBottom:i.useDifferentAddress?"24px":"0px"}},"address"===i.deliveryMethod&&!i.isDigitalOnly&&e.createElement(t,{value:!i.useDifferentAddress,hasError:i.isErrorsVisible&&!i.isTermsAndConditionsChecked,label:m("checkout-page:useShippingForBilling"),onChange:function(e){return i.setUseDifferentAddress(!e)}})),i.useDifferentAddress&&e.createElement(n,{vm:d}))}));export{i as BillingAddress};
|
|
@@ -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
|
|
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 a}from"./payment-gateways/index.js";import{BillingAddress as r}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"@ikas/storefront-model-functions";import{createTranslationInputData as l,useTranslation as m}from"../../../../utils/i18n.js";import p from"../../components/svg/lock.js";import d from"./style.module.scss.js";import{PayPal as k}from"../../components/paypal/index.js";var u=t((function(t){var u=t.vm,y=m().t,f=e.useCallback((function(e){e.stopPropagation(),u.policyModalTitle=y("checkout-page:privacyPolicy"),u.policyModalText=u.privacyPolicy}),[u,u.privacyPolicy]),v=e.useCallback((function(e){e.stopPropagation(),u.policyModalTitle=y("checkout-page:termsOfService"),u.policyModalText=u.termsOfService}),[u,u.termsOfService]),g=o.getTranslations()["checkout-page"],C=l(g.ackPoliciesSentence).map((function(t){return t.isVariable?e.createElement("span",{className:[d.TermsLabelSpan,u.isErrorsVisible&&!u.isTermsAndConditionsChecked?d.Error:""].join(" "),onClick:"{{ ackPrivacyPolicy }}"===t.value?f:v},"{{ ackPrivacyPolicy }}"===t.value?y("checkout-page:ackPrivacyPolicy"):y("checkout-page:ackTermsOfService")):t.value}));return e.createElement("div",{className:[d.StepPayment].join(" ")},e.createElement(n,{vm:u}),u.mpVM.isLinkCardToClientVisible&&e.createElement(s,{vm:u}),e.createElement(a,{vm:u}),e.createElement(r,{vm:u}),u.checkoutSettings.showTermsAndConditionsCheckbox&&e.createElement("div",{style:{marginTop:u.useDifferentAddress?"12px":"0px"}},e.createElement(i,{value:u.isTermsAndConditionsChecked,hasError:u.isErrorsVisible&&!u.isTermsAndConditionsChecked,label:e.createElement(e.Fragment,null,C),onChange:u.onTermsAndConditionsCheckedChange})),u.isPayPal?e.createElement("div",{className:d.PayPalContainer},e.createElement(k,{vm:u})):e.createElement(c,{style:{width:"100%",marginTop:"24px"},text:y("checkout-page:actions.completeOrder"),isLoading:u.isStepLoading,onClick:u.isDigitalOnly?u.onCompleteDigitalOnlyPaymentClick:u.onCompletePaymentClick}),!!y("checkout-page:securePaymentTooltip")&&e.createElement("div",{className:d.SecurePaymentContainer},e.createElement("span",{className:d.Lock},e.createElement(p,null)),e.createElement("span",null,y("checkout-page:securePaymentTooltip"))))}));export{u as CheckoutStepPayment};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";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{IkasPaymentMethodType as a,IkasPaymentGatewayTransactionFeeType as n,IkasPaymentGatewayAdditionalPriceType as o,IkasPaymentGatewayType as r}from"@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"../../../../../models/data/checkout/country-settings-model.js";import"../../../../../models/data/checkout-settings/index.js";import"../../../../../models/data/city/index.js";import"../../../../../models/data/country/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/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/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/package/index.js";import"../../../../../models/data/order/transaction/index.js";import"../../../../../models/data/order/index.js";import"../../../../../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/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"../../../../../models/data/raffle/index.js";import"../../../../../models/data/state/index.js";import"../../../../../models/data/theme-json/index.js";import"../../../../../models/data/theme-json/custom-data/index.js";import"../../../../../models/data/variant-type/variant-value/index.js";import{CreditCardForm as m}from"../../../components/credit-card-form/index.js";import{Installments as d}from"./installments/index.js";import i from"../../../components/select-box/index.js";import l from"./style.module.scss.js";import"@ikas/storefront-config";import{formatCurrency as s}from"../../../../../utils/currency.js";import{useTranslation as c}from"../../../../../utils/i18n.js";import p from"../../../components/svg/external.js";import y from"next/dynamic";import u from"../../../components/credit-card-form/model.js";import x from"../../../components/master-pass/credit-card-form/index.js";import{Klarna as v}from"../../../components/klarna/index.js";import{Adyen as f}from"../../../components/adyen/index.js";import{Toggle as j}from"../../../components/toggle/index.js";import g from"../../../components/select-box/style.module.scss.js";import E from"../../../components/master-pass/payment-gateway/svg/master-card.js";import P from"../../../components/master-pass/payment-gateway/svg/troy.js";import w from"../../../components/master-pass/payment-gateway/svg/visa.js";var h=y((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),C=t((function(t){var y=t.vm,C=c().t,k=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},G=function(t){return e.createElement("div",{className:l.AdditionalPrice},t.children)},I=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?s(e.amount,y.checkout.currencyCode,y.checkout.currencySymbol):" %"+e.amount).concat(e.type===o.DECREMENT?" "+C("checkout-page:paymentMethodDiscount"):" "+C("checkout-page:paymentMethodAdditionalPrice"))},N=function(e){var t;return"STRIPE"===e.code&&(null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"allow_custom_flow"===e.label&&"1"===e.value})))};return e.createElement(e.Fragment,null,!!y.mpVM.cards.length&&y.mpVM.cards.map((function(t,n){var o,m=y.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),s=e.createElement("button",{className:l.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),y.mpVM.deleteCard({store:y.store,checkout:y.checkout,card:t})}},C("checkout-page:masterPass.paymentGatewaySelectBox.delete")),c=function(e){return t.Value1.startsWith(e)},p=c("4"),x=c("5")||c("6"),v=c("9"),f=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:l.MasterPassSelectBoxLabelLogo},p&&e.createElement(w,null),x&&e.createElement(E,null),v&&e.createElement(P,null)),t.Name," ",t.Value1),j=(null==m?void 0:m.id)&&m.paymentMethodType===a.CREDIT_CARD&&m.type===r.INTERNAL?y.installmentInfo&&e.createElement(d,{vm:y}):void 0;return e.createElement(i,{key:n,isSelected:(null===(o=y.mpVM.selectedCard)||void 0===o?void 0:o.UniqueId)===t.UniqueId,label:f,rightContent:s,bottomContent:j,onClick:function(){var e;(null===(e=y.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(y.checkout.selectedPaymentGateway=null,y.cardData=new u,y.installmentInfo=void 0,y.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&y.checkout.totalFinalPrice&&y.retrieveInstallmentInfo({input:{binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:y.checkout.totalFinalPrice}}))}})})),y.paymentGateways.filter((function(e){return"in-store"!==y.deliveryMethod&&!y.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var o;if(function(e){return"KLARNA"===e.code}(t)||function(e){return"ADYEN"===e.code}(t))return null;var s=t.paymentMethodType===a.CREDIT_CARD&&t.type===r.INTERNAL?e.createElement(e.Fragment,null,N(t)?e.createElement(h,{vm:y,pg:t}):e.createElement("div",null,e.createElement(m,{vm:y}),y.isPaymentGatewayHasMasterPass&&e.createElement(x,{vm:y}),y.installmentInfo&&e.createElement(d,{vm:y}))):t.description?e.createElement(e.Fragment,null,t.type===r.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(p,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(i,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===r.INTERNAL?N(t)?" ":C("checkout-page:creditCard"):t.name,isSelected:y.selectedPaymentGatewayIndex===n,rightContent:(null===(o=t.additionalPrices)||void 0===o?void 0:o.length)?e.createElement(G,null,I(t.additionalPrices[0])):e.createElement(k,null,!!t.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:s,onClick:function(){y.selectedPaymentGatewayIndex!==n&&(y.setPaymentGateway(n),y.mpVM.selectedCard=void 0)}})})),y.klarnaPaymentGateway&&function(){var t,a=y.selectedPaymentGatewayIndex===y.klarnaPaymentGatewayIndex;return y.klarnaPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){y.setPaymentGateway(y.klarnaPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(j,{value:a,label:y.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=y.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(G,null,I(y.klarnaPaymentGateway.additionalPrices[0])):e.createElement(k,null,!!y.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(v,{vm:y})))):null}(),y.adyenPaymentGateway&&function(){var t,a=y.selectedPaymentGatewayIndex===y.adyenPaymentGatewayIndex;return y.adyenPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){y.setPaymentGateway(y.adyenPaymentGatewayIndex),y.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(j,{value:a,label:y.adyenPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=y.adyenPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(G,null,I(y.adyenPaymentGateway.additionalPrices[0])):e.createElement(k,null,!!y.adyenPaymentGateway.logoUrl&&e.createElement("div",{className:l.PaymentLogoContainer},e.createElement("img",{src:y.adyenPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":l.Hidden)},e.createElement(f,{vm:y})))):null}())}));export{C as PaymentGateways};
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{IkasPaymentMethodType as a,IkasPaymentGatewayTransactionFeeType as n,IkasPaymentGatewayAdditionalPriceType as l,IkasPaymentGatewayType as o}from"@ikas/storefront-models";import"@ikas/localized-address";import{CreditCardForm as r}from"../../../components/credit-card-form/index.js";import{Installments as m}from"./installments/index.js";import c from"../../../components/select-box/index.js";import i from"./style.module.scss.js";import{formatCurrency as d}from"@ikas/storefront-model-functions";import{useTranslation as s}from"../../../../../utils/i18n.js";import y from"../../../components/svg/external.js";import u from"next/dynamic";import p from"../../../components/credit-card-form/model.js";import v from"../../../components/master-pass/credit-card-form/index.js";import{Klarna as E}from"../../../components/klarna/index.js";import{Adyen as P}from"../../../components/adyen/index.js";import{Toggle as f}from"../../../components/toggle/index.js";import g from"../../../components/select-box/style.module.scss.js";import w from"../../../components/master-pass/payment-gateway/svg/master-card.js";import C from"../../../components/master-pass/payment-gateway/svg/troy.js";import G from"../../../components/master-pass/payment-gateway/svg/visa.js";var x=u((function(){return import("../../../components/stripe/index.js").then((function(e){return e.default}))})),I=t((function(t){var u=t.vm,I=s().t,h=function(t){return e.createElement("div",{style:{display:"flex",justifyContent:"flex-end",alignItems:"center",flexWrap:"wrap"}},t.children)},N=function(t){return e.createElement("div",{className:i.AdditionalPrice},t.children)},k=function(e){return 0===e.amount?"":"".concat(e.amountType===n.AMOUNT?d(e.amount,u.checkout.currencyCode,u.checkout.currencySymbol):" %"+e.amount).concat(e.type===l.DECREMENT?" "+I("checkout-page:paymentMethodDiscount"):" "+I("checkout-page:paymentMethodAdditionalPrice"))},M=function(e){var t;return"STRIPE"===e.code&&(null===(t=e.settings)||void 0===t?void 0:t.find((function(e){return"allow_custom_flow"===e.label&&"1"===e.value})))};return e.createElement(e.Fragment,null,!!u.mpVM.cards.length&&u.mpVM.cards.map((function(t,n){var l,r=u.paymentGateways.find((function(e){return e.id===t.paymentGatewayId})),d=e.createElement("button",{className:i.MasterPassSelectBoxDeleteButton,onClick:function(e){e.stopPropagation(),u.mpVM.deleteCard({checkout:u.checkout,card:t})}},I("checkout-page:masterPass.paymentGatewaySelectBox.delete")),s=function(e){return t.Value1.startsWith(e)},y=s("4"),v=s("5")||s("6"),E=s("9"),P=e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("span",{className:i.MasterPassSelectBoxLabelLogo},y&&e.createElement(G,null),v&&e.createElement(w,null),E&&e.createElement(C,null)),t.Name," ",t.Value1),f=(null==r?void 0:r.id)&&r.paymentMethodType===a.CREDIT_CARD&&r.type===o.INTERNAL?u.installmentInfo&&e.createElement(m,{vm:u}):void 0;return e.createElement(c,{key:n,isSelected:(null===(l=u.mpVM.selectedCard)||void 0===l?void 0:l.UniqueId)===t.UniqueId,label:P,rightContent:d,bottomContent:f,onClick:function(){var e;(null===(e=u.mpVM.selectedCard)||void 0===e?void 0:e.UniqueId)!==t.UniqueId&&(u.checkout.selectedPaymentGateway=null,u.cardData=new p,u.installmentInfo=void 0,u.mpVM.selectedCard=t,t.Value1&&t.paymentGatewayId&&u.checkout.totalFinalPrice&&u.retrieveInstallmentInfo({input:{binNumber:t.Value1.slice(0,6),paymentGatewayId:t.paymentGatewayId,price:u.checkout.totalFinalPrice}}))}})})),u.paymentGateways.filter((function(e){return"in-store"!==u.deliveryMethod&&!u.isDigitalOnly||e.paymentMethodType!==a.CASH_ON_DELIVERY&&e.paymentMethodType!==a.CREDIT_CARD_ON_DELIVERY})).map((function(t,n){var l;if(function(e){return"KLARNA"===e.code}(t)||function(e){return"ADYEN"===e.code}(t)||function(e){return"PAYPAL"===e.code}(t))return null;var d=t.paymentMethodType===a.CREDIT_CARD&&t.type===o.INTERNAL?e.createElement(e.Fragment,null,M(t)?e.createElement(x,{vm:u,pg:t}):e.createElement("div",null,e.createElement(r,{vm:u}),u.isPaymentGatewayHasMasterPass&&e.createElement(v,{vm:u}),u.installmentInfo&&e.createElement(m,{vm:u}))):t.description?e.createElement(e.Fragment,null,t.type===o.EXTERNAL&&e.createElement("div",{style:{height:"52px",display:"flex",justifyContent:"center",margin:"24px 0"}},e.createElement(y,null)),e.createElement("div",{dangerouslySetInnerHTML:{__html:t.description}})):void 0;return e.createElement(c,{key:t.id,label:t.paymentMethodType===a.CREDIT_CARD&&t.type===o.INTERNAL?M(t)?" ":I("checkout-page:creditCard"):t.name,isSelected:u.selectedPaymentGatewayIndex===n,rightContent:(null===(l=t.additionalPrices)||void 0===l?void 0:l.length)?e.createElement(N,null,k(t.additionalPrices[0])):e.createElement(h,null,!!t.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:t.logoUrl}))),bottomContent:d,onClick:function(){u.selectedPaymentGatewayIndex!==n&&(u.setPaymentGateway(n),u.mpVM.selectedCard=void 0)}})})),u.klarnaPaymentGateway&&function(){var t,a=u.selectedPaymentGatewayIndex===u.klarnaPaymentGatewayIndex;return u.klarnaPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){u.setPaymentGateway(u.klarnaPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:u.klarnaPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=u.klarnaPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(N,null,k(u.klarnaPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!u.klarnaPaymentGateway.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:u.klarnaPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":i.Hidden)},e.createElement(E,{vm:u})))):null}(),u.adyenPaymentGateway&&function(){var t,a=u.selectedPaymentGatewayIndex===u.adyenPaymentGatewayIndex;return u.adyenPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){u.setPaymentGateway(u.adyenPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:u.adyenPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=u.adyenPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(N,null,k(u.adyenPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!u.adyenPaymentGateway.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:u.adyenPaymentGateway.logoUrl}))))),e.createElement("div",{className:"".concat(a?g.BottomContent:""," ").concat(a?"":i.Hidden)},e.createElement(P,{vm:u})))):null}(),u.payPalPaymentGateway&&function(){var t,a=u.selectedPaymentGatewayIndex===u.payPalPaymentGatewayIndex;return u.payPalPaymentGateway?e.createElement("div",{className:g.SelectBoxContainer},e.createElement("div",{className:"".concat(g.SelectBox," ").concat(a?g.Selected:""),onClick:function(){u.setPaymentGateway(u.payPalPaymentGatewayIndex),u.mpVM.selectedCard=void 0}},e.createElement("div",{className:g.TopContent},e.createElement(f,{value:a,label:u.payPalPaymentGateway.name,removePadding:!0}),e.createElement("div",{className:g.RightContent},(null===(t=u.payPalPaymentGateway.additionalPrices)||void 0===t?void 0:t.length)?e.createElement(N,null,k(u.payPalPaymentGateway.additionalPrices[0])):e.createElement(h,null,!!u.payPalPaymentGateway.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:u.payPalPaymentGateway.logoUrl}))))))):null}())}));export{I as PaymentGateways};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{formatCurrency as n}from"@ikas/storefront-model-functions";import{useTranslation as l}from"../../../../../../utils/i18n.js";import c from"./style.module.scss.js";import{Toggle as a}from"../../../../components/toggle/index.js";var o=t((function(t){var o,m,s=t.vm,r=l().t;return e.createElement("div",{className:c.Installments},e.createElement("div",{className:c.Title},r("checkout-page:installmentOptions")),e.createElement("div",{className:c.Container},null===(m=null===(o=s.installmentInfo)||void 0===o?void 0:o.installmentPrices)||void 0===m?void 0:m.map((function(t,l){return e.createElement("div",{className:c.Row,onClick:function(){return s.setInstallmentCount(t.installmentCount||1)}},e.createElement(a,{value:s.selectedInstallmentIndex===l}),e.createElement("div",{className:c.InstallmentInfo},e.createElement("div",{className:c.InstallmentCount},1===t.installmentCount?r("checkout-page:singleInstallment"):"".concat(t.installmentCount," ").concat(r("checkout-page:installments"))),1!==t.installmentCount&&e.createElement("div",{className:c.InstallmentPrice},n(t.installmentPrice,s.checkout.currencyCode,s.checkout.currencySymbol))),e.createElement("div",{className:c.Price},n(t.totalPrice,s.checkout.currencyCode,s.checkout.currencySymbol)))}))))}));export{o as Installments};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var
|
|
1
|
+
import e from'./../../../../ext/style-inject/dist/style-inject.es.js';var n={StepPayment:"style-module_StepPayment__V1Mfh",TermsLabelSpan:"style-module_TermsLabelSpan__Pnw87",Error:"style-module_Error__S-jQW",SecurePaymentContainer:"style-module_SecurePaymentContainer__PF-bW",Lock:"style-module_Lock__dj1gx",PayPalContainer:"style-module_PayPalContainer__Fwcuv"};e(".style-module_StepPayment__V1Mfh {\n margin-top: 8px;\n}\n.style-module_StepPayment__V1Mfh .style-module_TermsLabelSpan__Pnw87 {\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n}\n.style-module_StepPayment__V1Mfh .style-module_TermsLabelSpan__Pnw87:hover {\n text-decoration: underline;\n}\n.style-module_StepPayment__V1Mfh .style-module_Error__S-jQW {\n color: var(--checkout-error-color);\n}\n.style-module_StepPayment__V1Mfh .style-module_SecurePaymentContainer__PF-bW {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-top: 24px;\n color: var(--checkout-secondary-text-color);\n}\n.style-module_StepPayment__V1Mfh .style-module_SecurePaymentContainer__PF-bW .style-module_Lock__dj1gx {\n color: #CFCED3;\n margin-right: 8px;\n display: flex;\n align-items: center;\n position: relative;\n top: -1px;\n}\n\n.style-module_PayPalContainer__Fwcuv {\n margin-top: 24px;\n}");export{n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{formatCurrency as o}from"@ikas/storefront-model-functions";import{useTranslation as c}from"../../../../utils/i18n.js";import n from"./style.module.scss.js";import{Button as i}from"../../components/button/index.js";import{Checkbox as r}from"../../components/checkbox/index.js";import{FormItemType as a}from"../../components/form-item/model.js";import{FormItem as m}from"../../components/form-item/index.js";import s from"../../components/error/index.js";import p from"../../components/select-box/index.js";var l=t((function(t){var o=t.vm,r=c().t;return e.createElement("div",{className:[n.StepShipping].join(" ")},e.createElement(u,{vm:o}),e.createElement(g,{vm:o}),e.createElement(i,{style:{width:"100%",marginTop:"32px"},text:r("checkout-page:actions.continueWithPayment"),isLoading:o.isStepLoading,onClick:o.onProceedToPaymentClick}))})),u=t((function(t){var i,r=t.vm,a=c().t;return e.createElement("div",{className:[n.InfoBox,r.isChangingShippingMethod?n.Dimmed:""].join(" ")},e.createElement(s,{vm:r}),null===(i=r.checkout.availableShippingMethods)||void 0===i?void 0:i.map((function(t,c){return e.createElement(p,{key:t.shippingSettingsId+t.shippingZoneRateId,label:t.rateName,isSelected:r.checkout.shippingSettingsId===t.shippingSettingsId&&r.checkout.shippingZoneRateId===t.shippingZoneRateId,rightContent:e.createElement("div",{className:n.ShippingPrice},0===t.price?a("checkout-page:free"):o(t.price,r.checkout.currencyCode,r.checkout.currencySymbol)),onClick:function(){return r.onShippingMethodChange(t)}})})))})),g=t((function(t){var i=t.vm,s=c().t,p=e.useCallback((function(e){i.checkout.isGiftPackage=e}),[i]),l=e.useCallback((function(e){i.checkout.giftPackageNote=e}),[i,i.checkout]),u=e.useMemo((function(){var e;return null===(e=i.checkoutSettings.giftPackagePriceList)||void 0===e?void 0:e.find((function(e){return e.currencyCode===i.checkout.currencyCode}))}),[i,i.checkoutSettings,i.checkout]),g=s("checkout-page:giftPackageCta")+(u&&u.price?" (+ ".concat(o(u.price,u.currencyCode,u.currencySymbol),")"):"");return i.checkoutSettings.isGiftPackageEnabled?e.createElement("div",{className:n.GiftSection},e.createElement(r,{value:i.checkout.isGiftPackage||!1,label:g,onChange:p,removePadding:!0}),i.checkout.isGiftPackage&&e.createElement(m,{type:a.TEXT_AREA,label:"",value:i.checkout.giftPackageNote||"",onChange:l,style:{marginTop:"16px"},textAreaPlaceholder:s("checkout-page:giftPackageCtaPlaceholder")})):null}));export{l as CheckoutStepShipping};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import{CART_LS_KEY as a}from"../../../../store/cart/index.js";import i from"./style.module.scss.js";import s from"../../components/svg/success-circle.js";import r from"../../components/expandable-section/index.js";import d from"../../components/credit-card-form/svg/amex.js";import n from"../../components/credit-card-form/svg/master-card.js";import c from"../../components/credit-card-form/svg/troy.js";import l from"../../components/credit-card-form/svg/visa.js";import"@ikas/storefront-config";import{formatCurrency as m}from"../../../../utils/currency.js";import{useTranslation as u}from"../../../../utils/i18n.js";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{IkasPaymentMethodType as p,IkasPaymentGatewayType as v,IkasOrderPackageStatus as E,IkasTransactionCardAssociation as f}from"@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"../../../../models/data/checkout/country-settings-model.js";import"../../../../models/data/checkout-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/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/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/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/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../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/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"../../../../models/data/raffle/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"../../../../models/ui/product-list/index.js";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/customer-review-list/index.js";import"../../../../models/ui/customer-review-summary-list/index.js";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import"../../../../models/ui/raffle-list/index.js";import g from"../../components/offer-product/index.js";import{Analytics as x}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as j}from"../../components/quick-registration/index.js";var h=t((function(t){var E,h,y,T,N,I,L=t.vm,A=u().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(a);e&&e===L.checkout.id&&(L.successTransaction&&x.purchase(L.checkout,L.successTransaction),localStorage.removeItem(a)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var C=((null===(E=L.checkout.customer)||void 0===E?void 0:E.firstName)||"")+" "+((null===(h=L.checkout.customer)||void 0===h?void 0:h.lastName)||""),D=((null===(y=L.checkout.shippingAddress)||void 0===y?void 0:y.firstName)||"")+" "+((null===(T=L.checkout.shippingAddress)||void 0===T?void 0:T.lastName)||""),S=L.paymentGateways.find((function(e){var t;return e.id===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),R=null===(N=L.successTransaction)||void 0===N?void 0:N.paymentMethodDetail,b=e.useMemo((function(){var t,o,a,s;return e.createElement("div",{className:[i.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:paymentMethod")),S&&e.createElement(e.Fragment,null,!!S.logoUrl&&e.createElement("div",{className:i.PaymentLogoContainer},e.createElement("img",{src:S.logoUrl})),!S.logoUrl&&e.createElement("div",{className:i.InfoText},S.paymentMethodType===p.CREDIT_CARD&&S.type===v.INTERNAL?A("checkout-page:creditCard"):S.name),!!S.description&&S.type!==v.EXTERNAL&&e.createElement("div",{className:i.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:S.description}}))),"CREDIT_CARD"===(null===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethod)&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoText},e.createElement("div",{className:i.CardLogoContainer},function(){var t,o;switch(null===(o=null===(t=L.successTransaction)||void 0===t?void 0:t.paymentMethodDetail)||void 0===o?void 0:o.cardAssociation){case f.AMERICAN_EXPRESS:return e.createElement(d,null);case f.MASTER_CARD:return e.createElement(n,null);case f.TROY:return e.createElement(c,null);case f.VISA:return e.createElement(l,null);default:return e.createElement("div",null)}}()),e.createElement("span",null,"**** ".concat((null==R?void 0:R.lastFourDigits)||""))),(null===(o=null==R?void 0:R.installment)||void 0===o?void 0:o.installmentCount)&&R.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoText},"".concat(R.installment.installmentCount," ").concat(A("checkout-page:installments"))),null!==R.installment.installmentPrice&&e.createElement("div",{className:i.InfoText},"".concat(R.installment.installmentCount," x ").concat(m(R.installment.installmentPrice,L.checkout.currencyCode,L.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:billingAddress")),!!(null===(a=L.checkout.billingAddress)||void 0===a?void 0:a.company)&&e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},L.checkout.billingAddress.company),e.createElement("div",{className:i.InfoText},null===(s=L.checkout.billingAddress)||void 0===s?void 0:s.addressText)))}),[]),P=e.useMemo((function(){var t,o,a,s,r;return e.createElement("div",{className:[i.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:contactInfo")),e.createElement("div",{className:i.InfoText},null===(t=L.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:i.InfoText},C),!!(null===(o=L.checkout.shippingAddress)||void 0===o?void 0:o.phone)&&e.createElement("div",{className:i.InfoText},null===(a=L.checkout.shippingAddress)||void 0===a?void 0:a.phone)),e.createElement("div",null,"in-store"===L.deliveryMethod&&e.createElement(e.Fragment,null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:receiver")),e.createElement("div",{className:[i.InfoText,i.withMBottom].join(" ")},D)),e.createElement("div",{className:i.InfoTitle},"address"===L.deliveryMethod?A("checkout-page:shippingAddress"):A("checkout-page:pickUpLocation")),!!(null===(s=L.checkout.shippingAddress)||void 0===s?void 0:s.company)&&e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},L.checkout.shippingAddress.company),e.createElement("div",{className:i.InfoText},null===(r=L.checkout.shippingAddress)||void 0===r?void 0:r.addressText)))}),[]);return e.createElement("div",{className:i.StepSuccess},e.createElement("div",{className:i.SuccessTitleContainer},e.createElement(s,{className:i.SuccessCircle}),e.createElement("span",{className:i.SuccessTitle},A("checkout-page:orderSuccessTitle"))),e.createElement("div",{className:i.SuccessSubTitle},A("address"===L.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:C})),e.createElement("div",{className:[i.InfoGrid,i.WithBorder].join(" ")},e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:orderNoAndDate")),e.createElement("div",{className:[i.InfoText,i.InfoTextBold].join(" ")},"#"+(L.checkout.orderNumber||"")),e.createElement("div",{className:i.InfoText},L.checkout.dateStr),e.createElement(k,{vm:L})),e.createElement("div",null,e.createElement("div",{className:i.InfoTitle},A("checkout-page:contactInfo")),e.createElement("div",{className:i.InfoText},null===(I=L.checkout.customer)||void 0===I?void 0:I.email),e.createElement("div",{className:i.InfoText},C))),L.postCheckoutCampaignOffer&&e.createElement(g,{vm:L,campaignOffer:L.postCheckoutCampaignOffer}),L.hasQuickRegistration&&e.createElement(j,{vm:L}),e.createElement(r,{title:A("checkout-page:paymentSummary")},b),!L.isDigitalOnly&&e.createElement(r,{title:A("checkout-page:shippingSummary")},P),e.createElement("div",{className:i.Actions},e.createElement("div",{className:i.HelpText},e.createElement("span",null,A("checkout-page:helpCtaQuestion")),e.createElement("span",{className:i.Cta,onClick:function(){return L.setContactModalVisible(!0)}},A("checkout-page:helpCta"))),e.createElement(o,{text:A("checkout-page:actions.backToShopping"),onClick:L.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),k=t((function(t){var o,a=t.vm,s=u().t,r=i.Yellow;switch(a.checkout.orderPackageStatus){case E.FULFILLED:case E.PARTIALLY_FULFILLED:case E.DELIVERED:case E.PARTIALLY_DELIVERED:r=i.Green;break;case E.CANCELLED:case E.PARTIALLY_CANCELLED:case E.CANCEL_REJECTED:case E.CANCEL_REQUESTED:r=i.Red}return e.createElement("div",{className:[i.OrderStatus,r].join(" ")},a.checkout.orderPackageStatus?null===(o=[{types:[E.UNFULFILLED],text:s("checkout-page:orderPackageStatus.unfulfilled")},{types:[E.READY_FOR_SHIPMENT],text:s("checkout-page:orderPackageStatus.readyForShipment")},{types:[E.PARTIALLY_FULFILLED],text:s("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[E.FULFILLED],text:s("checkout-page:orderPackageStatus.fulfilled")},{types:[E.DELIVERED,E.PARTIALLY_DELIVERED],text:s("checkout-page:orderPackageStatus.delivered")},{types:[E.UNABLE_TO_DELIVER],text:s("checkout-page:orderPackageStatus.unableToDeliver")},{types:[E.CANCELLED,E.PARTIALLY_CANCELLED],text:s("checkout-page:orderPackageStatus.cancelled")},{types:[E.CANCEL_REJECTED],text:s("checkout-page:orderPackageStatus.cancelRejected")},{types:[E.REFUNDED,E.PARTIALLY_REFUNDED],text:s("checkout-page:orderPackageStatus.refunded")},{types:[E.REFUND_REQUEST_ACCEPTED],text:s("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[E.REFUND_REJECTED],text:s("checkout-page:orderPackageStatus.refundRejected")},{types:[E.REFUND_REQUESTED],text:s("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(a.checkout.orderPackageStatus)})))||void 0===o?void 0:o.text:"")}));export{h as StepSuccess};
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../../components/button/index.js";import a from"./style.module.scss.js";import c from"../../components/svg/success-circle.js";import r from"../../components/expandable-section/index.js";import s from"../../components/credit-card-form/svg/amex.js";import n from"../../components/credit-card-form/svg/master-card.js";import i from"../../components/credit-card-form/svg/troy.js";import l from"../../components/credit-card-form/svg/visa.js";import{IkasOrderAddressFunctions as m,formatCurrency as d,IkasCheckoutFunctions as u}from"@ikas/storefront-model-functions";import{useTranslation as p}from"../../../../utils/i18n.js";import{IkasPaymentMethodType as E,IkasPaymentGatewayType as v,IkasOrderPackageStatus as f,IkasTransactionCardAssociation as g}from"@ikas/storefront-models";import"@ikas/localized-address";import"mobx";import"@ikas/storefront-api";import"../../../../models/ui/blog-category-list/index.js";import"../../../../models/ui/blog-list/index.js";import"../../../../models/ui/brand-list/index.js";import"../../../../models/ui/category-list/index.js";import"@ikas/storefront-config";import"../../../../models/ui/product-attribute-detail/index.js";import"../../../../models/ui/product-attribute-list/index.js";import"../../../../models/ui/product-list/functions.js";import"../../../../models/ui/product-list/index.js";import"@ikas/storefront-providers";import"../../../../models/ui/validator/index.js";import"../../../../models/ui/validator/rules/index.js";import"../../../../models/ui/validator/form/login.js";import"../../../../models/ui/validator/form/address.js";import"../../../../models/ui/validator/form/ikas-address.js";import"../../../../models/ui/validator/form/register.js";import"../../../../models/ui/validator/form/contact-form.js";import"../../../../models/ui/validator/form/forgot-password.js";import"../../../../models/ui/validator/form/recover-password.js";import"../../../../models/ui/validator/form/account-info.js";import"../../../../models/ui/validator/form/raffle-form.js";import"../../../../models/ui/validator/form/customer-review.js";import h from"../../components/offer-product/index.js";import{purchase as k}from"../../../../analytics/analytics.js";import"../../../../analytics/head/index.js";import{QuickRegistration as T}from"../../components/quick-registration/index.js";import{CART_LS_KEY as N}from"../../../../store/cart/functions.js";var I=t((function(t){var f,I,y,A,L,C,D=t.vm,S=p().t;e.useEffect((function(){if("undefined"!=typeof localStorage){var e=localStorage.getItem(N);e&&e===D.checkout.id&&(D.successTransaction&&k(D.checkout,D.successTransaction),localStorage.removeItem(N)),window&&window.handleKlarna&&window.handleKlarna(void 0)}}),[]);var j=((null===(f=D.checkout.customer)||void 0===f?void 0:f.firstName)||"")+" "+((null===(I=D.checkout.customer)||void 0===I?void 0:I.lastName)||""),R=((null===(y=D.checkout.shippingAddress)||void 0===y?void 0:y.firstName)||"")+" "+((null===(A=D.checkout.shippingAddress)||void 0===A?void 0:A.lastName)||""),P=D.paymentGateways.find((function(e){var t;return e.id===(null===(t=D.successTransaction)||void 0===t?void 0:t.paymentGatewayId)})),_=null===(L=D.successTransaction)||void 0===L?void 0:L.paymentMethodDetail,F=m.getOrderAddressText,b=e.useMemo((function(){var t,o,c;return e.createElement("div",{className:[a.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:paymentMethod")),P&&e.createElement(e.Fragment,null,!!P.logoUrl&&e.createElement("div",{className:a.PaymentLogoContainer},e.createElement("img",{src:P.logoUrl})),!P.logoUrl&&e.createElement("div",{className:a.InfoText},P.paymentMethodType===E.CREDIT_CARD&&P.type===v.INTERNAL?S("checkout-page:creditCard"):P.name),!!P.description&&P.type!==v.EXTERNAL&&e.createElement("div",{className:a.InfoText},e.createElement("div",{dangerouslySetInnerHTML:{__html:P.description}}))),"CREDIT_CARD"===(null===(t=D.successTransaction)||void 0===t?void 0:t.paymentMethod)&&e.createElement(e.Fragment,null,e.createElement("div",{className:a.InfoText},e.createElement("div",{className:a.CardLogoContainer},function(){var t,o;switch(null===(o=null===(t=D.successTransaction)||void 0===t?void 0:t.paymentMethodDetail)||void 0===o?void 0:o.cardAssociation){case g.AMERICAN_EXPRESS:return e.createElement(s,null);case g.MASTER_CARD:return e.createElement(n,null);case g.TROY:return e.createElement(i,null);case g.VISA:return e.createElement(l,null);default:return e.createElement("div",null)}}()),e.createElement("span",null,"**** ".concat((null==_?void 0:_.lastFourDigits)||""))),(null===(o=null==_?void 0:_.installment)||void 0===o?void 0:o.installmentCount)&&_.installment.installmentCount>1&&e.createElement(e.Fragment,null,e.createElement("div",{className:a.InfoText},"".concat(_.installment.installmentCount," ").concat(S("checkout-page:installments"))),null!==_.installment.installmentPrice&&e.createElement("div",{className:a.InfoText},"".concat(_.installment.installmentCount," x ").concat(d(_.installment.installmentPrice,D.checkout.currencyCode,D.checkout.currencySymbol)))))),e.createElement("div",null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:billingAddress")),!!(null===(c=D.checkout.billingAddress)||void 0===c?void 0:c.company)&&e.createElement("div",{className:[a.InfoText,a.InfoTextBold].join(" ")},D.checkout.billingAddress.company),e.createElement("div",{className:a.InfoText},D.checkout.billingAddress?F(D.checkout.billingAddress):"")))}),[]),U=e.useMemo((function(){var t,o,c,r;return e.createElement("div",{className:[a.InfoGrid].join(" ")},e.createElement("div",null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:contactInfo")),e.createElement("div",{className:a.InfoText},null===(t=D.checkout.customer)||void 0===t?void 0:t.email),e.createElement("div",{className:a.InfoText},j),!!(null===(o=D.checkout.shippingAddress)||void 0===o?void 0:o.phone)&&e.createElement("div",{className:a.InfoText},null===(c=D.checkout.shippingAddress)||void 0===c?void 0:c.phone)),e.createElement("div",null,"in-store"===D.deliveryMethod&&e.createElement(e.Fragment,null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:receiver")),e.createElement("div",{className:[a.InfoText,a.withMBottom].join(" ")},R)),e.createElement("div",{className:a.InfoTitle},"address"===D.deliveryMethod?S("checkout-page:shippingAddress"):S("checkout-page:pickUpLocation")),!!(null===(r=D.checkout.shippingAddress)||void 0===r?void 0:r.company)&&e.createElement("div",{className:[a.InfoText,a.InfoTextBold].join(" ")},D.checkout.shippingAddress.company),e.createElement("div",{className:a.InfoText},D.checkout.shippingAddress?F(D.checkout.shippingAddress):"")))}),[]),M=u.getCheckoutDateStr;return e.createElement("div",{className:a.StepSuccess},e.createElement("div",{className:a.SuccessTitleContainer},e.createElement(c,{className:a.SuccessCircle}),e.createElement("span",{className:a.SuccessTitle},S("checkout-page:orderSuccessTitle"))),e.createElement("div",{className:a.SuccessSubTitle},S("address"===D.deliveryMethod?"checkout-page:orderSuccessDescription":"checkout-page:orderSuccessInStoreDeliveryDescription",{customerName:j})),e.createElement("div",{className:[a.InfoGrid,a.WithBorder].join(" ")},e.createElement("div",null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:orderNoAndDate")),e.createElement("div",{className:[a.InfoText,a.InfoTextBold].join(" ")},"#"+(D.checkout.orderNumber||"")),e.createElement("div",{className:a.InfoText},M(D.checkout)),e.createElement(x,{vm:D})),e.createElement("div",null,e.createElement("div",{className:a.InfoTitle},S("checkout-page:contactInfo")),e.createElement("div",{className:a.InfoText},null===(C=D.checkout.customer)||void 0===C?void 0:C.email),e.createElement("div",{className:a.InfoText},j))),D.postCheckoutCampaignOffer&&e.createElement(h,{vm:D,campaignOffer:D.postCheckoutCampaignOffer}),D.hasQuickRegistration&&e.createElement(T,{vm:D}),e.createElement(r,{title:S("checkout-page:paymentSummary")},b),!D.isDigitalOnly&&e.createElement(r,{title:S("checkout-page:shippingSummary")},U),e.createElement("div",{className:a.Actions},e.createElement("div",{className:a.HelpText},e.createElement("span",null,S("checkout-page:helpCtaQuestion")),e.createElement("span",{className:a.Cta,onClick:function(){return D.setContactModalVisible(!0)}},S("checkout-page:helpCta"))),e.createElement(o,{text:S("checkout-page:actions.backToShopping"),onClick:D.onBackToShoppingClick,style:{flex:"0 0 auto"}})))})),x=t((function(t){var o,c=t.vm,r=p().t,s=a.Yellow;switch(c.checkout.orderPackageStatus){case f.FULFILLED:case f.PARTIALLY_FULFILLED:case f.DELIVERED:case f.PARTIALLY_DELIVERED:s=a.Green;break;case f.CANCELLED:case f.PARTIALLY_CANCELLED:case f.CANCEL_REJECTED:case f.CANCEL_REQUESTED:s=a.Red}return e.createElement("div",{className:[a.OrderStatus,s].join(" ")},c.checkout.orderPackageStatus?null===(o=[{types:[f.UNFULFILLED],text:r("checkout-page:orderPackageStatus.unfulfilled")},{types:[f.READY_FOR_SHIPMENT],text:r("checkout-page:orderPackageStatus.readyForShipment")},{types:[f.PARTIALLY_FULFILLED],text:r("checkout-page:orderPackageStatus.partiallyFulfilled")},{types:[f.FULFILLED],text:r("checkout-page:orderPackageStatus.fulfilled")},{types:[f.DELIVERED,f.PARTIALLY_DELIVERED],text:r("checkout-page:orderPackageStatus.delivered")},{types:[f.UNABLE_TO_DELIVER],text:r("checkout-page:orderPackageStatus.unableToDeliver")},{types:[f.CANCELLED,f.PARTIALLY_CANCELLED],text:r("checkout-page:orderPackageStatus.cancelled")},{types:[f.CANCEL_REJECTED],text:r("checkout-page:orderPackageStatus.cancelRejected")},{types:[f.REFUNDED,f.PARTIALLY_REFUNDED],text:r("checkout-page:orderPackageStatus.refunded")},{types:[f.REFUND_REQUEST_ACCEPTED],text:r("checkout-page:orderPackageStatus.refundRequestAccepted")},{types:[f.REFUND_REJECTED],text:r("checkout-page:orderPackageStatus.refundRejected")},{types:[f.REFUND_REQUESTED],text:r("checkout-page:orderPackageStatus.refundRequested")}].find((function(e){return e.types.includes(c.checkout.orderPackageStatus)})))||void 0===o?void 0:o.text:"")}));export{I as StepSuccess};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from'./../../ext/style-inject/dist/style-inject.es.js';var t={CheckoutPage:"style-module_CheckoutPage__ZhJkP",Left:"style-module_Left__Fi9Ka",LeftContent:"style-module_LeftContent__9OjX9",Space:"style-module_Space__rZnAy",Footer:"style-module_Footer__x-8Uy",FooterItem:"style-module_FooterItem__33V-M",FooterBullet:"style-module_FooterBullet__ReSoQ",AdressStepInfo:"style-module_AdressStepInfo__n4JGO",Address:"style-module_Address__yS7Ou",Text:"style-module_Text__jEuRS",WithMBottom:"style-module_WithMBottom__4Eb0o",WithMTop:"style-module_WithMTop__I550k",Gray:"style-module_Gray__p6WTS",EditBtn:"style-module_EditBtn__1BG0f",AddressStepInfoMobile:"style-module_AddressStepInfoMobile__7awcG",ErrorContainer:"style-module_ErrorContainer__TAK-J",Header:"style-module_Header__V7Pe2",Logo:"style-module_Logo__y9GGC",LoginText:"style-module_LoginText__OOD8r",LoginBtn:"style-module_LoginBtn__m-qco",CustomerInfo:"style-module_CustomerInfo__ECTKP",Name:"style-module_Name__iIq-v",Email:"style-module_Email__UX6fN",LoginCta:"style-module_LoginCta__TDolx",MobileCartSummary:"style-module_MobileCartSummary__bUmJj",RowPB:"style-module_RowPB__tAM9q",Right:"style-module_Right__1BcGi",RightContent:"style-module_RightContent__qvFkp",PoweredBy:"style-module_PoweredBy__3k1Sx",LightText:"style-module_LightText__IsehB",ReactTooltipWrap:"style-module_ReactTooltipWrap__HX-4g"};e('.style-module_CheckoutPage__ZhJkP {\n all: unset;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex;\n color: var(--checkout-primary-text-color);\n background-color: var(--checkout-primary-bg-color);\n}\n.style-module_CheckoutPage__ZhJkP input::placeholder,\n.style-module_CheckoutPage__ZhJkP textarea::placeholder {\n all: unset;\n}\n.style-module_CheckoutPage__ZhJkP a,\n.style-module_CheckoutPage__ZhJkP a:hover,\n.style-module_CheckoutPage__ZhJkP a:focus,\n.style-module_CheckoutPage__ZhJkP a:active {\n color: inherit;\n}\n.style-module_CheckoutPage__ZhJkP * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: unset;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n justify-content: flex-end;\n padding-left: 20px;\n padding-right: 64px;\n background-color: var(--checkout-primary-bg-color);\n z-index: 1;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Space__rZnAy {\n width: 100%;\n height: 100px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Space__rZnAy {\n height: 48px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy {\n flex: 0 0 auto;\n background-color: transparent;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: wrap;\n padding: 12.205px 0;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n cursor: pointer;\n user-select: none;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M:hover {\n color: var(--checkout-primary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterBullet__ReSoQ {\n margin: 0 12px;\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy {\n width: 100%;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M {\n text-align: center;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO {\n display: flex;\n justify-content: space-between;\n padding-left: 78px;\n padding-top: 5px;\n width: 100%;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou {\n font-size: 16px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS {\n font-size: 14px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMBottom__4Eb0o {\n margin-bottom: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMTop__I550k {\n margin-top: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_Gray__p6WTS {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_EditBtn__1BG0f {\n cursor: pointer;\n user-select: none;\n align-self: flex-start;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_EditBtn__1BG0f:hover {\n text-decoration: underline;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO {\n padding-top: 0;\n justify-content: flex-end;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG {\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG {\n display: block;\n padding-top: 16px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou {\n font-size: 16px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS {\n font-size: 14px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMBottom__4Eb0o {\n margin-bottom: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_Gray__p6WTS {\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_ErrorContainer__TAK-J {\n padding: 0 24px;\n }\n}\n@media only screen and (max-width: 480px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_ErrorContainer__TAK-J {\n padding: 0 10px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 {\n width: 100%;\n height: 96px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: 500;\n font-size: 20px;\n margin-bottom: 44px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 a {\n flex: 1 1 auto;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC {\n width: calc(100% - 24px);\n max-width: 200px;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC img {\n object-fit: contain;\n object-position: left;\n pointer-events: none;\n}\n@media only screen and (max-width: 1280px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC {\n max-width: 150px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r {\n font-size: 14px;\n text-align: right;\n flex: 0 0 auto;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r span {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginBtn__m-qco {\n margin-left: 4px;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Name__iIq-v {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Email__UX6fN {\n font-weight: 500;\n font-size: 14px;\n user-select: none;\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 {\n height: 72px;\n margin-bottom: 0;\n padding: 0 24px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Name__iIq-v {\n font-size: 15px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Email__UX6fN {\n font-size: 13px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r {\n display: flex;\n flex-direction: column;\n padding-bottom: 0;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r .style-module_LoginCta__TDolx {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_MobileCartSummary__bUmJj {\n position: sticky;\n top: 0;\n z-index: 10;\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_MobileCartSummary__bUmJj {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_RowPB__tAM9q {\n padding-bottom: 16px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 {\n width: 100%;\n min-width: auto;\n max-width: 100%;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: var(--checkout-secondary-bg-color);\n display: flex;\n padding-left: 64px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto;\n z-index: 1;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp {\n width: 100%;\n max-width: 600px;\n padding-top: 168px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx {\n width: 100%;\n padding: 16px 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n user-select: none;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx a {\n display: flex;\n align-items: center;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi {\n display: none;\n }\n}\n\n.style-module_LightText__IsehB {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ReactTooltipWrap__HX-4g {\n max-width: 300px;\n}');export{t as default};
|
|
1
|
+
import e from'./../../ext/style-inject/dist/style-inject.es.js';var t={CheckoutPage:"style-module_CheckoutPage__ZhJkP",Left:"style-module_Left__Fi9Ka",epaykolay:"style-module_epaykolay__3MlS-",LeftContent:"style-module_LeftContent__9OjX9",Space:"style-module_Space__rZnAy",Footer:"style-module_Footer__x-8Uy",FooterItem:"style-module_FooterItem__33V-M",FooterBullet:"style-module_FooterBullet__ReSoQ",AdressStepInfo:"style-module_AdressStepInfo__n4JGO",Address:"style-module_Address__yS7Ou",Text:"style-module_Text__jEuRS",WithMBottom:"style-module_WithMBottom__4Eb0o",WithMTop:"style-module_WithMTop__I550k",Gray:"style-module_Gray__p6WTS",EditBtn:"style-module_EditBtn__1BG0f",AddressStepInfoMobile:"style-module_AddressStepInfoMobile__7awcG",ErrorContainer:"style-module_ErrorContainer__TAK-J",Header:"style-module_Header__V7Pe2",Logo:"style-module_Logo__y9GGC",LoginText:"style-module_LoginText__OOD8r",LoginBtn:"style-module_LoginBtn__m-qco",CustomerInfo:"style-module_CustomerInfo__ECTKP",Name:"style-module_Name__iIq-v",Email:"style-module_Email__UX6fN",LoginCta:"style-module_LoginCta__TDolx",MobileCartSummary:"style-module_MobileCartSummary__bUmJj",RowPB:"style-module_RowPB__tAM9q",Right:"style-module_Right__1BcGi",RightContent:"style-module_RightContent__qvFkp",PoweredBy:"style-module_PoweredBy__3k1Sx",LightText:"style-module_LightText__IsehB",ReactTooltipWrap:"style-module_ReactTooltipWrap__HX-4g"};e('.style-module_CheckoutPage__ZhJkP {\n all: unset;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n font-size: 16px !important;\n width: 100%;\n height: 100vh;\n overflow: auto;\n overflow-x: hidden;\n display: flex;\n color: var(--checkout-primary-text-color);\n background-color: var(--checkout-primary-bg-color);\n}\n.style-module_CheckoutPage__ZhJkP input::placeholder,\n.style-module_CheckoutPage__ZhJkP textarea::placeholder {\n all: unset;\n}\n.style-module_CheckoutPage__ZhJkP a,\n.style-module_CheckoutPage__ZhJkP a:hover,\n.style-module_CheckoutPage__ZhJkP a:focus,\n.style-module_CheckoutPage__ZhJkP a:active {\n color: inherit;\n}\n.style-module_CheckoutPage__ZhJkP * {\n box-sizing: border-box !important;\n font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;\n font-size: 16px;\n letter-spacing: normal;\n font-weight: normal;\n line-height: unset;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka {\n width: 50%;\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n padding-left: 20px;\n padding-right: 64px;\n background-color: var(--checkout-primary-bg-color);\n z-index: 1;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka.style-module_epaykolay__3MlS- {\n padding-left: 0;\n padding-right: 0;\n z-index: 2;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 {\n width: 100%;\n min-width: 400px;\n max-width: 600px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 100vh;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Space__rZnAy {\n width: 100%;\n height: 100px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Space__rZnAy {\n height: 48px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy {\n flex: 0 0 auto;\n background-color: transparent;\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n flex-wrap: wrap;\n padding: 12.205px 0;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M {\n font-size: 14px;\n color: var(--checkout-secondary-text-color);\n cursor: pointer;\n user-select: none;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M:hover {\n color: var(--checkout-primary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterBullet__ReSoQ {\n margin: 0 12px;\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy {\n width: 100%;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_Footer__x-8Uy .style-module_FooterItem__33V-M {\n text-align: center;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO {\n display: flex;\n justify-content: space-between;\n padding-left: 78px;\n padding-top: 5px;\n width: 100%;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou {\n font-size: 16px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS {\n font-size: 14px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMBottom__4Eb0o {\n margin-bottom: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMTop__I550k {\n margin-top: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_Gray__p6WTS {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_EditBtn__1BG0f {\n cursor: pointer;\n user-select: none;\n align-self: flex-start;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_EditBtn__1BG0f:hover {\n text-decoration: underline;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO {\n padding-top: 0;\n justify-content: flex-end;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AdressStepInfo__n4JGO .style-module_Address__yS7Ou {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG {\n display: none;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG {\n display: block;\n padding-top: 16px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou {\n font-size: 16px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS {\n font-size: 14px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_WithMBottom__4Eb0o {\n margin-bottom: 12px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_AddressStepInfoMobile__7awcG .style-module_Address__yS7Ou .style-module_Text__jEuRS.style-module_Gray__p6WTS {\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_ErrorContainer__TAK-J {\n padding: 0 24px;\n }\n}\n@media only screen and (max-width: 480px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 .style-module_ErrorContainer__TAK-J {\n padding: 0 10px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 {\n width: 100%;\n height: 96px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-weight: 500;\n font-size: 20px;\n margin-bottom: 44px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 a {\n flex: 1 1 auto;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC {\n width: calc(100% - 24px);\n max-width: 200px;\n height: 64px;\n position: relative;\n user-select: none;\n cursor: pointer;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC img {\n object-fit: contain;\n object-position: left;\n pointer-events: none;\n}\n@media only screen and (max-width: 1280px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_Logo__y9GGC {\n max-width: 150px;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r {\n font-size: 14px;\n text-align: right;\n flex: 0 0 auto;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r span {\n color: var(--checkout-secondary-text-color);\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginBtn__m-qco {\n margin-left: 4px;\n font-weight: bold;\n user-select: none;\n cursor: pointer;\n font-weight: 500;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP {\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Name__iIq-v {\n font-size: 20px;\n font-weight: 600;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Email__UX6fN {\n font-weight: 500;\n font-size: 14px;\n user-select: none;\n color: var(--checkout-secondary-text-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 {\n height: 72px;\n margin-bottom: 0;\n padding: 0 24px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Name__iIq-v {\n font-size: 15px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_CustomerInfo__ECTKP .style-module_Email__UX6fN {\n font-size: 13px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r {\n display: flex;\n flex-direction: column;\n padding-bottom: 0;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_Header__V7Pe2 .style-module_LoginText__OOD8r .style-module_LoginCta__TDolx {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_MobileCartSummary__bUmJj {\n position: sticky;\n top: 0;\n z-index: 10;\n}\n@media only screen and (min-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_MobileCartSummary__bUmJj {\n display: none;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_RowPB__tAM9q {\n padding-bottom: 16px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka {\n width: 100%;\n justify-content: center;\n padding-right: 0px;\n padding-left: 0px;\n }\n .style-module_CheckoutPage__ZhJkP .style-module_Left__Fi9Ka .style-module_LeftContent__9OjX9 {\n width: 100%;\n min-width: auto;\n max-width: 100%;\n }\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi {\n width: 50%;\n min-height: 100%;\n flex: 0 0 auto;\n background-color: var(--checkout-secondary-bg-color);\n display: flex;\n padding-left: 64px;\n padding-right: 20px;\n position: sticky;\n top: 0;\n overflow-y: auto;\n z-index: 1;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp {\n width: 100%;\n max-width: 600px;\n padding-top: 168px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx {\n width: 100%;\n padding: 16px 0;\n display: flex;\n justify-content: center;\n align-items: center;\n color: var(--checkout-primary-text-color);\n user-select: none;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx span {\n font-size: 14px;\n line-height: 20px;\n color: var(--checkout-secondary-text-color);\n margin-right: 8px;\n}\n.style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi .style-module_RightContent__qvFkp .style-module_PoweredBy__3k1Sx a {\n display: flex;\n align-items: center;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CheckoutPage__ZhJkP .style-module_Right__1BcGi {\n display: none;\n }\n}\n\n.style-module_LightText__IsehB {\n color: var(--checkout-secondary-text-color);\n}\n\n.style-module_ReactTooltipWrap__HX-4g {\n max-width: 300px;\n}');export{t as default};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IkasCampaignOfferProduct, IkasCartCampaignOffer, IkasOrderLineVariant, IkasProduct, IkasProductVariant } from "@ikas/storefront-models";
|
|
2
|
+
export declare enum CheckoutStep {
|
|
3
|
+
INFO = "info",
|
|
4
|
+
SHIPPING = "shipping",
|
|
5
|
+
PAYMENT = "payment",
|
|
6
|
+
SUCCESS = "success"
|
|
7
|
+
}
|
|
8
|
+
export declare enum ErrorType {
|
|
9
|
+
UNKNOWN = 0,
|
|
10
|
+
API_ERROR = 1,
|
|
11
|
+
STOCK_ERROR = 2,
|
|
12
|
+
PAYMENT_ERROR = 3,
|
|
13
|
+
NO_SHIPPING_ERROR = 4,
|
|
14
|
+
CUSTOMER_LOGIN_REQUIRED_ERROR = 5
|
|
15
|
+
}
|
|
16
|
+
export declare type CheckoutError = {
|
|
17
|
+
type: ErrorType;
|
|
18
|
+
data?: any;
|
|
19
|
+
};
|
|
20
|
+
export declare type StockErrorData = {
|
|
21
|
+
variant: IkasOrderLineVariant;
|
|
22
|
+
availableQuantity: number;
|
|
23
|
+
};
|
|
24
|
+
export declare type CampaignOfferType = {
|
|
25
|
+
product: IkasProduct;
|
|
26
|
+
variants: IkasProductVariant[];
|
|
27
|
+
campaignOffer: IkasCartCampaignOffer;
|
|
28
|
+
offer: IkasCampaignOfferProduct;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var R,O;!function(R){R.INFO="info",R.SHIPPING="shipping",R.PAYMENT="payment",R.SUCCESS="success"}(R||(R={})),function(R){R[R.UNKNOWN=0]="UNKNOWN",R[R.API_ERROR=1]="API_ERROR",R[R.STOCK_ERROR=2]="STOCK_ERROR",R[R.PAYMENT_ERROR=3]="PAYMENT_ERROR",R[R.NO_SHIPPING_ERROR=4]="NO_SHIPPING_ERROR",R[R.CUSTOMER_LOGIN_REQUIRED_ERROR=5]="CUSTOMER_LOGIN_REQUIRED_ERROR"}(O||(O={}));export{R as CheckoutStep,O as ErrorType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as c}from"mobx-react-lite";import{setCaptchaToken as r}from"../../store/customer/captcha/functions.js";var n=c((function(c){return a.useEffect((function(){window.captchaOnLoad=function(e){r(e)}}),[]),a.useEffect((function(){try{var a=document.createElement("script");a.src="https://www.google.com/recaptcha/api.js?render=6LcBVyAhAAAAAPqU6pwhCXm26KgqYAdLrwYAVjZ2",a.className="googleRecaptchaScript",a.async=!0,document.body.appendChild(a);var c=document.getElementsByClassName("grecaptcha-badge");e(void 0,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,new Promise((function(e){var t=setInterval((function(){if(c&&c.length>1){clearInterval(t);for(var a=0;a<c.length;a++){var r=c[a].getAttribute("style");r&&(r=r.concat("opacity: 0; visibility: hidden !important;")),c[a].setAttribute("style","".concat(r))}e(null)}else c=document.getElementsByClassName("grecaptcha-badge")}),100)}))];case 1:return[2,e.sent()]}}))}))}catch(e){console.log("Captcha Error",e)}}),[]),a.useEffect((function(){return function(){var e,t;try{var a=document.getElementsByClassName("grecaptcha-badge");if(a&&a.length)for(var c=0;c<a.length;c++)null===(e=a[c].parentNode)||void 0===e||e.removeChild(a[c]);var r=document.getElementsByClassName("googleRecaptchaScript");if(r&&r.length)for(c=0;c<r.length;c++)null===(t=r[c].parentNode)||void 0===t||t.removeChild(r[c])}catch(e){console.log("Captcha Remove Error",e)}}}),[]),a.createElement("div",{id:"recaptcha",className:"g-recaptcha","data-sitekey":"6LcBVyAhAAAAAPqU6pwhCXm26KgqYAdLrwYAVjZ2","data-callback":"captchaOnLoad","data-size":"invisible"})}));export{n as GoogleCaptcha};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ImageProps as NextImageProps } from "next/image.js";
|
|
3
|
-
import { IkasImage } from "
|
|
3
|
+
import { IkasImage } from "@ikas/storefront-models";
|
|
4
4
|
export declare const Image: React.FC<ImageProps>;
|
|
5
5
|
declare type ImageProps = Omit<NextImageProps, "src" | "srcSet" | "blurDataURL" | "placeholder" | "loader" | "quality"> & {
|
|
6
6
|
priority?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import a from"next/image.js";import{IkasImageFunctions as o}from"@ikas/storefront-model-functions";var l=[180,360,540,720,900,1080,1296,1512,1728,1950,2560,3840],m=function(m){var u=m.image,i=m.useBlur,n=e(m,["image","useBlur"]),s=o.getImageDefaultSrc,c=o.getImageSrc;return u?t.createElement(a,r({},n,{loader:function(e){var r=e.width,t=l.reduce((function(e,t){return Math.abs(t-r)<Math.abs(e-r)?t:e}));return c(u,t)},quality:100,src:s(u),alt:n.alt||"Image",placeholder:i?"blur":"empty",blurDataURL:i?c(u,10):void 0})):null};export{m as Image};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as t}from'./../../ext/tslib/tslib.es6.js';import o,{useState as e}from"react";import s from"next/link";import{observer as i}from"mobx-react-lite";import{IkasBaseStore as r}from"../../store/base/index.js";import"@ikas/storefront-api";import"@ikas/storefront-config";import"lodash/flatten";import"lodash/sortBy";import"@ikas/storefront-model-functions";import"../../store/cart/index.js";import"../checkout/types.js";import"../../store/customer/index.js";import"../../analytics/events.js";import"lodash/cloneDeep";import"../../store/analytics/index.js";import"../../analytics/ikas.js";import"../../store/customer/consent/data.js";import"../../analytics/head/index.js";import"../../store/customer/account-auth/data.js";import"../../store/customer/captcha/data.js";import"../../store/customer/product/data.js";import"lodash/xorBy";import'./../../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"@ikas/storefront-models";import"@ikas/localized-address";import"../../store/customer/marketing/data.js";import"../../store/customer/order/data.js";import"@ikas/storefront-providers";var a=i((function(i){var a=e(!1),m=a[0],d=a[1];return o.useEffect((function(){var t="string"==typeof i.href,o=r.spaLinksDisabled;d(o&&t)}),[r.spaLinksDisabled]),m?o.createElement("a",{href:i.href},i.children):o.createElement(s,t({},i),i.children)}));export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__extends as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import*as o from"react";import{makeObservable as t,computed as n}from"mobx";import{Observer as p}from"mobx-react-lite";import{IkasThemeJsonComponentPropType as
|
|
1
|
+
import{__extends as e,__assign as r}from'./../../ext/tslib/tslib.es6.js';import*as o from"react";import{makeObservable as t,computed as n}from"mobx";import{Observer as p}from"mobx-react-lite";import{IkasThemeJsonComponentPropType as a}from"@ikas/storefront-models";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{IkasPageDataInit as u}from"../../page-data-init/index.js";var l=function(l){function m(e){var r=l.call(this,e)||this;return r.state={hasError:!1},t(r,{hasNullValue:n,Component:n}),r}return e(m,l),m.getDerivedStateFromError=function(e){return console.error(e),{hasError:!0}},Object.defineProperty(m.prototype,"hasNullValue",{get:function(){var e=this.props.pageComponentPropValue,r=e.propValues;return e.component.props.some((function(o){if(o.isRequired){var t=(r||{})[o.name],n=null==e?void 0:e.component.props.find((function(e){return e.id===o.requiredPropId}));if(n){var p=(r||{})[n.name];if(n.type===a.BOOLEAN&&!p||n.type===a.CUSTOM&&p!==o.requiredEnumOptionValue)return!1}return null===t||null==t}}))},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"Component",{get:function(){var e=this.props.pageComponentPropValue,r=i.getCurrentPageComponents(),o=e.pageComponent;return r?r[o.componentId]:null},enumerable:!1,configurable:!0}),m.prototype.render=function(){var e=this;return o.createElement(p,null,(function(){var t=e.props,n=t.index,p=t.pageComponentPropValue,a=t.settings,i=e.Component,l=p.pageComponent,m=p.propValues;return i?e.state.hasError?null:o.createElement("div",{id:n+""},e.hasNullValue?null:o.createElement(i,r({key:l.id},m,{settings:a,pageSpecificData:u.pageSpecificData}))):(console.error("COMPONENT NOT FOUND!"),null)}))},m}(o.Component);export{l as ThemeComponent};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IkasPageComponentPropValue } from "@ikas/storefront-providers";
|
|
2
|
+
import { IkasThemeJsonSettings } from "../../models/data/theme-json/settings";
|
|
3
|
+
export declare const renderComponent: (pageComponentPropValue: IkasPageComponentPropValue, settings: IkasThemeJsonSettings, index: number) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"react";import{ThemeComponent as o}from"./ThemeComponent.js";var t=function(t,n,r){return e.createElement(o,{key:t.pageComponent.id,index:r,pageComponentPropValue:t,settings:n})};export{t as renderComponent};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { IkasCustomerReviewSummary, IkasMerchantSettings, IkasThemeJsonPageType } from "../../models";
|
|
2
|
+
import { IkasCustomerReviewSummary, IkasMerchantSettings, IkasThemeJsonPageType } from "../../models/data";
|
|
3
3
|
declare type Props = {
|
|
4
4
|
pageType: IkasThemeJsonPageType;
|
|
5
5
|
pageTitle?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as o}from"mobx-react-lite";import a from"next/head.js";import{useRouter as r}from"next/router";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{IkasThemeJsonPageType as i}from"@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"../../models/data/checkout/country-settings-model.js";import"../../models/data/checkout-settings/index.js";import"../../models/data/city/index.js";import"../../models/data/country/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/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/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/package/index.js";import"../../models/data/order/transaction/index.js";import"../../models/data/order/index.js";import"../../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/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"../../models/data/raffle/index.js";import"../../models/data/state/index.js";import"../../models/data/theme-json/index.js";import"../../models/data/theme-json/custom-data/index.js";import"../../models/data/variant-type/variant-value/index.js";import"../../models/ui/blog-list/index.js";import"../../models/ui/blog-category-list/index.js";import"../../models/ui/brand-list/index.js";import"../../models/ui/category-list/index.js";import"../../models/ui/product-list/index.js";import"../../models/ui/product-attribute-detail/index.js";import"../../models/ui/product-attribute-list/index.js";import"../../models/ui/customer-review-list/index.js";import"../../models/ui/customer-review-summary-list/index.js";import"../../models/ui/validator/index.js";import"../../models/ui/validator/rules/index.js";import"../../models/ui/validator/form/login.js";import"../../models/ui/validator/form/address.js";import"../../models/ui/validator/form/ikas-address.js";import"../../models/ui/validator/form/register.js";import"../../models/ui/validator/form/contact-form.js";import"../../models/ui/validator/form/forgot-password.js";import"../../models/ui/validator/form/recover-password.js";import"../../models/ui/validator/form/account-info.js";import"../../models/ui/validator/form/raffle-form.js";import"../../models/ui/validator/form/customer-review.js";import"../../models/ui/raffle-list/index.js";import{IkasStorefrontConfig as s}from"@ikas/storefront-config";import"../../analytics/analytics.js";import"../../analytics/head/index.js";import"./index.js";import"next/image.js";import"@ikas/storefront-model-functions";import"../link/index.js";import"../page-editor/loader/style.module.scss.js";import"../google-captcha/index.js";import"../../pages/home.js";import"../../pages/_slug_/index.js";import"../../pages/pages/_slug_.js";import"../../pages/checkout.js";import"../../pages/account/index.js";import"../../pages/account/addresses.js";import"../../pages/account/orders/index.js";import"../../pages/account/orders/_id_.js";import"../../pages/account/login.js";import"../../pages/account/register.js";import"../../pages/account/forgot-password.js";import"../../pages/account/recover-password.js";import"../../pages/cart.js";import"../../pages/editor.js";import"../../pages/account/favorite-products.js";import"../../pages/search.js";import"next/error.js";import"../../pages/blog/index.js";import"../../pages/blog/_slug_.js";import"../../pages/raffle/_slug_.js";import"../../pages/raffle/index.js";import"../../pages/account/raffles.js";import{IkasBaseStore as n}from"../../store/base.js";import"../../store/customer/index.js";import"../../store/cart/index.js";import"lodash/get";var d=o((function(o){var n=o.pageType,d=o.pageTitle,c=o.pageDescription,p=o.canonicals,u=o.disableIndex,g=o.pageSpecificData,j=o.merchantSettings,f=o.addOgpMetas,v=o.productReviewSummary,h=r(),x="undefined"!=typeof window,y="local"===process.env.NEXT_PUBLIC_ENV,b=h.asPath.split("?")[0].replace("/",""),k=s.getRoutings().filter((function(e){return e.id!==s.getStorefrontRoutingId()})),w=s.getCurrentRouting(),C=(null==w?void 0:w.path)?"/"+w.path:"",E=y?"http://localhost:3333":"https://"+s.getDomain();t.useEffect((function(){document.documentElement.lang=s.getCurrentLocale()}),[n,g]);var L=t.useMemo((function(){if(g&&g.href)return"".concat(E).concat(g.href)}),[g]),T=t.useMemo((function(){var e=[];if(f)if(e.push({property:"og:type",content:"website"}),e.push({property:"og:site_name",content:"https://"+s.getDomain()}),d&&e.push({property:"og:title",content:d}),c&&e.push({property:"og:description",content:c}),e.push({property:"og:url",content:L||(x?window.location.href:"")||"https://".concat(s.getDomain())}),g&&n===i.PRODUCT){var t=g.selectedVariant.mainImage;(null==t?void 0:t.image)&&e.push({property:"og:image",content:t.image.src})}else(null==j?void 0:j.logo)&&e.push({property:"og:image",content:j.logo.src});return e}),[d,g,L,c,j,f,j]),D=t.useMemo((function(){var t=[];if(j){var o={"@context":"https://schema.org","@type":"Website",url:"https://"+s.getDomain()},a=function(t){var o,a,r,i,n,d,m=(null==t?void 0:t.logo)?t.logo.src:void 0;return{"@context":"https://schema.org","@type":"Store",name:null==t?void 0:t.merchantName,logo:m,image:m,url:"https://"+s.getDomain(),telephone:null==t?void 0:t.phone,address:e(e({"@type":"PostalAddress",streetAddress:null===(o=t.address)||void 0===o?void 0:o.addressLine1,addressLocality:null===(r=null===(a=t.address)||void 0===a?void 0:a.city)||void 0===r?void 0:r.name},t.address&&t.address.state&&{addressRegion:t.address.state.code}),{postalCode:null===(i=t.address)||void 0===i?void 0:i.postalCode,addressCountry:null===(d=null===(n=t.address)||void 0===n?void 0:n.country)||void 0===d?void 0:d.code})}}(j);t.push(o),t.push(a)}if(g&&n===i.PRODUCT){var r=g,d=function(t,o){var a,r,i,n;try{var d="https://".concat(s.getDomain()).concat(t.href),m=t.selectedVariant;return e(e({"@context":"https://schema.org/","@type":"Product",name:t.name,description:null===(a=t.metaData)||void 0===a?void 0:a.description,image:null===(r=m.images)||void 0===r?void 0:r.map((function(e){return e.image?e.image.src:""})),productId:m.id,sku:m.sku,mpn:(null===(i=m.barcodeList)||void 0===i?void 0:i.length)?m.barcodeList[0]:"",brand:{"@type":"Brand",name:null===(n=t.brand)||void 0===n?void 0:n.name}},o&&{aggregateRating:{"@type":"AggregateRating",ratingValue:o.averageStar,reviewCount:o.totalReview}}),{offers:{"@type":"Offer",url:d,priceCurrency:m.price.currency||"TRY",price:m.price.finalPrice,priceValidUntil:"",itemCondition:"https://schema.org/NewCondition",availability:m.stock>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}})}catch(e){}}(r,v||null);if(d&&t.push(d),r.categories.length)(c=m(r.categories[0]))&&t.push(c)}if(g&&n===i.CATEGORY){var l=function(e){var t,o;try{return{"@context":"http://schema.org","@type":"CollectionPage",url:"https://".concat(s.getDomain()).concat(e.href),name:null===(t=e.metaData)||void 0===t?void 0:t.pageTitle,description:null===(o=e.metaData)||void 0===o?void 0:o.description,image:e.image?e.image.src:void 0}}catch(e){}}(g),c=m(g);l&&t.push(l),c&&t.push(c)}return t}),[g,j]),R=t.useMemo((function(){var e,t=null===(e=s.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===s.getCurrentLocale()&&e.pageType===n}));return t?l(g,n,t.titleTemplate||""):null}),[n,g]),_=t.useMemo((function(){var e,t=null===(e=s.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===s.getCurrentLocale()&&e.pageType===n}));return t?l(g,n,t.descriptionTemplate||""):null}),[n,g]);return t.createElement(a,null,t.createElement("title",null,d||R||""),t.createElement("meta",{name:"description",content:c||_||""}),k.map((function(e){return t.createElement("link",{key:e.id,rel:"alternate",hrefLang:e.locale,href:"".concat(E+(e.path?"/"+e.path:""),"/").concat(b)})})),!!w&&!!k.length&&t.createElement("link",{key:"current-routing-hreflang",rel:"alternate",hrefLang:w.locale,href:"".concat(E).concat(C,"/").concat(b)}),!!u&&t.createElement("meta",{name:"robots",content:"noindex"}),!!f&&T.map((function(e,o){return t.createElement("meta",{key:"".concat(e.content,"-").concat(o),property:e.property,content:e.content})})),!!p&&p.map((function(e,o){return t.createElement("link",{key:o+"url",rel:"canonical",href:"".concat(E).concat(C).concat(e)})})),t.createElement("link",{rel:"canonical",href:"".concat(E).concat(C,"/").concat(b)}),!!D.length&&D.map((function(e,o){return t.createElement("script",{key:o,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})})))}));function m(e){try{var t=n.getInstance(),o=e.categoryPathItems.map((function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:"https://"+s.getDomain()+e.href}}));return t.currentPageType===i.CATEGORY&&o.push({"@type":"ListItem",position:e.categoryPathItems.length+1,name:e.name,item:"https://"+s.getDomain()+e.href}),{"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:e.categoryPathItems.length?o:[{"@type":"ListItem",position:1,name:e.name,item:"https://"+s.getDomain()+e.href}]}}catch(e){}}function l(e,t,o){var a,r,s=o;try{switch(t){case i.PRODUCT:var n=e,d=n.name,m=(null===(a=n.brand)||void 0===a?void 0:a.name)||"",l=n.selectedVariant.sku||"",c=(null===(r=n.selectedVariant.barcodeList)||void 0===r?void 0:r.length)?n.selectedVariant.barcodeList[0]:"";s.includes("{{name}}")&&(s=s.replace("{{name}}",d)),s.includes("{{brand}}")&&(s=s.replace("{{brand}}",m)),s.includes("{{sku}}")&&(s=s.replace("{{sku}}",l)),s.includes("{{barcode}}")&&(s=s.replace("{{barcode}}",c));break;case i.BRAND:case i.CATEGORY:case i.BLOG_CATEGORY:var p=e.name||"";s.includes("{{name}}")&&(s=s.replace("{{name}}",p));break;case i.BLOG:var u=e.title;s.includes("{{name}}")&&(s=s.replace("{{name}}",u))}}catch(e){}return s.trimEnd()}export{d as IkasPageHead};
|
|
1
|
+
import{__assign as e}from'./../../ext/tslib/tslib.es6.js';import*as t from"react";import{observer as a}from"mobx-react-lite";import n from"next/head.js";import{useRouter as r}from"next/router";import{IkasThemeJsonPageType as o}from"@ikas/storefront-models";import"@ikas/localized-address";import{IkasStorefrontConfig as i}from"@ikas/storefront-config";import{IkasBaseStore as c}from"../../store/base/index.js";import{IkasProductFunctions as l,IkasProductVariantFunctions as s,IkasImageFunctions as u,IkasProductPriceFunctions as p,IkasCategoryFunctions as m,IkasCategoryPathItemFunctions as d,IkasBlogFunctions as g}from"@ikas/storefront-model-functions";var h=a((function(a){var c=a.pageType,d=a.pageTitle,h=a.pageDescription,y=a.canonicals,C=a.disableIndex,D=a.pageSpecificData,b=a.merchantSettings,E=a.addOgpMetas,S=a.productReviewSummary,L=r(),k="undefined"!=typeof window,T="local"===process.env.NEXT_PUBLIC_ENV,I=L.asPath.split("?")[0].replace("/","");I="/"===I.charAt(I.length-1)?I.slice(0,-1):I;var P=i.getCurrentRouting(),O=(null==P?void 0:P.path)?"/"+P.path:"",R=T?"http://localhost:3333":"https://"+i.getDomain();t.useEffect((function(){document.documentElement.lang=i.getCurrentLocale()}),[c,D]);var x=t.useMemo((function(){if(D&&D.href)return"".concat(R).concat(D.href)}),[D]),w=t.useMemo((function(){var e=[];if(E){if(e.push({property:"og:type",content:"website"}),e.push({property:"og:site_name",content:"https://"+i.getDomain()}),d&&e.push({property:"og:title",content:d}),h&&e.push({property:"og:description",content:h}),e.push({property:"og:url",content:x||(k?window.location.href:"")||"https://".concat(i.getDomain())}),D&&c===o.PRODUCT){var t=D,a=l.getSelectedVariant(t),n=s.getMainImage(a);(null==n?void 0:n.image)&&e.push({property:"og:image",content:u.getImageDefaultSrc(n.image)})}else(null==b?void 0:b.logo)&&e.push({property:"og:image",content:u.getImageDefaultSrc(b.logo)});if(D&&c===o.CATEGORY){var r=D;r.image&&e.push({property:"og:image",content:u.getImageDefaultSrc(r.image)})}if(D&&c===o.BRAND){var p=D;p.image&&e.push({property:"og:image",content:u.getImageDefaultSrc(p.image)})}}return e}),[d,D,x,h,b,E,b]),A=t.useMemo((function(){var t=[];if(b){var a={"@context":"https://schema.org","@type":"Website",url:"https://"+i.getDomain()},n=function(t){var a,n,r,o,c,l,s=(null==t?void 0:t.logo)?u.getImageDefaultSrc(t.logo):void 0;return{"@context":"https://schema.org","@type":"Store",name:null==t?void 0:t.merchantName,logo:s,image:s,url:"https://"+i.getDomain(),telephone:null==t?void 0:t.phone,address:e(e({"@type":"PostalAddress",streetAddress:null===(a=t.address)||void 0===a?void 0:a.addressLine1,addressLocality:null===(r=null===(n=t.address)||void 0===n?void 0:n.city)||void 0===r?void 0:r.name},t.address&&t.address.state&&{addressRegion:t.address.state.code}),{postalCode:null===(o=t.address)||void 0===o?void 0:o.postalCode,addressCountry:null===(l=null===(c=t.address)||void 0===c?void 0:c.country)||void 0===l?void 0:l.code})}}(b);t.push(a),t.push(n)}if(D&&c===o.PRODUCT){var r=D,s=function(t,a){var n,r,o,c;try{var s=l.getProductHref,m=l.getSelectedVariant,d=u.getImageDefaultSrc,g=p.getFinalPrice,h="https://".concat(i.getDomain()).concat(s(t)),f=m(t);return e(e({"@context":"https://schema.org/","@type":"Product",name:t.name,description:null===(n=t.metaData)||void 0===n?void 0:n.description,image:null===(r=f.images)||void 0===r?void 0:r.map((function(e){return e.image?d(e.image):""})),productId:f.id,sku:f.sku,mpn:(null===(o=f.barcodeList)||void 0===o?void 0:o.length)?f.barcodeList[0]:"",brand:{"@type":"Brand",name:null===(c=t.brand)||void 0===c?void 0:c.name}},a&&{aggregateRating:{"@type":"AggregateRating",ratingValue:a.averageStar,reviewCount:a.totalReview}}),{offers:{"@type":"Offer",url:h,priceCurrency:f.price.currency||"TRY",price:g(f.price),priceValidUntil:"",itemCondition:"https://schema.org/NewCondition",availability:f.stock>0?"https://schema.org/InStock":"https://schema.org/OutOfStock"}})}catch(e){}}(r,S||null);if(s&&t.push(s),r.categories.length)(h=f(r.categories[0]))&&t.push(h)}if(D&&c===o.CATEGORY){var d=function(e){var t,a;try{return{"@context":"http://schema.org","@type":"CollectionPage",url:"https://".concat(i.getDomain()).concat(m.getCategoryHref(e)),name:null===(t=e.metaData)||void 0===t?void 0:t.pageTitle,description:null===(a=e.metaData)||void 0===a?void 0:a.description,image:e.image?u.getImageDefaultSrc(e.image):void 0}}catch(e){}}(D),h=f(D);d&&t.push(d),h&&t.push(h)}if(D&&c===o.BLOG){var v=function(t){try{var a="https://".concat(i.getDomain()).concat(g.getBlogHref(t)),n=function(e){var t=new Date(e),a=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return"".concat(a,"-").concat(n,"-").concat(r)},r="".concat(t.writer.firstName," ").concat(t.writer.lastName),o=(new DOMParser).parseFromString(t.blogContent.content,"text/html").body.textContent;return e(e({"@context":"https://schema.org","@type":"BlogPosting",headline:t.title,image:t.image?u.getImageDefaultSrc(t.image):""},t.category&&{genre:t.category.name}),{url:a,datePublished:n(t.createdAt),dateCreated:n(t.createdAt),dateModified:n(t.updatedAt),description:t.shortDescription,articleBody:o,author:{"@type":"Person",name:r}})}catch(e){}}(D);v&&t.push(v)}return t}),[D,b]),M=t.useMemo((function(){var e,t=null===(e=i.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===i.getCurrentLocale()&&e.pageType===c}));return t?v(D,c,t.titleTemplate||""):null}),[c,D]),B=t.useMemo((function(){var e,t=null===(e=i.getMetaTemplates())||void 0===e?void 0:e.find((function(e){return e.locale===i.getCurrentLocale()&&e.pageType===c}));return t?v(D,c,t.descriptionTemplate||""):null}),[c,D]),N=t.useCallback((function(){var e=i.getCustom();return!!e&&!!e.isEPayKolayEnabled}),[]),G=[];return i.getRoutings().forEach((function(e){var t;(null===(t=e.countryCodes)||void 0===t?void 0:t.length)?e.countryCodes.forEach((function(t){G.push({routing:e,hrefLang:e.locale+"-"+t})})):G.push({routing:e,hrefLang:e.locale})})),t.createElement(n,null,t.createElement("title",null,d||M||""),t.createElement("meta",{name:"description",content:h||B||""}),c===o.CHECKOUT&&N()&&t.createElement("script",{type:"text/javascript",src:"https://cdn-epeykolay.mncdn.com/epay/containerServices.js"}),G.length>1&&G.map((function(e){return t.createElement("link",{key:e.routing.id+e.hrefLang,rel:"alternate",hrefLang:e.hrefLang,href:"".concat(R+(e.routing.path?"/"+e.routing.path:""),"/").concat(I)})})),!!C&&t.createElement("meta",{name:"robots",content:"noindex"}),!!E&&w.map((function(e,a){return t.createElement("meta",{key:"".concat(e.content,"-").concat(a),property:e.property,content:e.content})})),!!y&&y.map((function(e,a){return t.createElement("link",{key:a+"url",rel:"canonical",href:"".concat(R).concat(O).concat(e)})})),t.createElement("link",{rel:"canonical",href:"".concat(R).concat(O,"/").concat(I)}),!!A.length&&A.map((function(e,a){return t.createElement("script",{key:a,type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})})))}));function f(e){try{var t=e.categoryPathItems.map((function(e,t){return{"@type":"ListItem",position:t+1,name:e.name,item:"https://"+i.getDomain()+d.getCategoryPathItemHref(e)}}));return c.currentPageType===o.CATEGORY&&t.push({"@type":"ListItem",position:e.categoryPathItems.length+1,name:e.name,item:"https://"+i.getDomain()+m.getCategoryHref(e)}),{"@context":"http://schema.org","@type":"BreadcrumbList",itemListElement:e.categoryPathItems.length?t:[{"@type":"ListItem",position:1,name:e.name,item:"https://"+i.getDomain()+m.getCategoryHref(e)}]}}catch(e){}}function v(e,t,a){var n,r,i=a,c=l.getSelectedVariant;try{switch(t){case o.PRODUCT:var s=e,u=c(s),p=s.name,m=(null===(n=s.brand)||void 0===n?void 0:n.name)||"",d=u.sku||"",g=(null===(r=u.barcodeList)||void 0===r?void 0:r.length)?u.barcodeList[0]:"";i.includes("{{name}}")&&(i=i.replace("{{name}}",p)),i.includes("{{brand}}")&&(i=i.replace("{{brand}}",m)),i.includes("{{sku}}")&&(i=i.replace("{{sku}}",d)),i.includes("{{barcode}}")&&(i=i.replace("{{barcode}}",g));break;case o.BRAND:case o.CATEGORY:case o.BLOG_CATEGORY:var h=e.name||"";i.includes("{{name}}")&&(i=i.replace("{{name}}",h));break;case o.BLOG:var f=e.title;i.includes("{{name}}")&&(i=i.replace("{{name}}",f))}}catch(e){}return i.trimEnd()}export{h as IkasPageHead};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { IkasCustomerReviewSummary, IkasThemeJsonPageType
|
|
2
|
+
import { IkasSimplePageComponentPropValue } from "@ikas/storefront-providers";
|
|
3
|
+
import { IkasCustomerReviewSummary, IkasThemeJsonPageType } from "../../models/data";
|
|
4
4
|
import { IkasThemeJsonComponent } from "@ikas/storefront-models";
|
|
5
|
+
import { IkasThemeJsonCustomData } from "../../models/data/theme-json/custom-data";
|
|
6
|
+
import { IkasThemeJsonSettings } from "../../models/data/theme-json/settings";
|
|
5
7
|
export declare type IkasPageProps = {
|
|
6
8
|
propValues: IkasSimplePageComponentPropValue[];
|
|
7
9
|
themeJsonComponents: IkasThemeJsonComponent[];
|
|
@@ -20,4 +22,3 @@ export declare type IkasPageProps = {
|
|
|
20
22
|
productReviewSummary: IkasCustomerReviewSummary | null;
|
|
21
23
|
};
|
|
22
24
|
export declare const IkasPage: React.FC<IkasPageProps>;
|
|
23
|
-
export declare const renderComponent: (pageComponentPropValue: IkasPageComponentPropValue, settings: IkasThemeJsonSettings, index: number) => JSX.Element;
|