@ikas/storefront 6.1.0-beta.40 → 6.1.0-beta.400
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 +8 -3
- package/build/analytics/analytics.js +1 -1
- package/build/analytics/events.d.ts +4 -1
- package/build/analytics/events.js +1 -1
- package/build/analytics/facebookPixel.d.ts +13 -0
- package/build/analytics/facebookPixel.js +1 -1
- package/build/analytics/googleAnalytics.d.ts +3 -2
- package/build/analytics/googleAnalytics.js +1 -1
- package/build/analytics/googleTagManager.d.ts +5 -3
- package/build/analytics/googleTagManager.js +1 -1
- package/build/analytics/head/index.d.ts +17 -2
- package/build/analytics/head/index.js +1 -1
- package/build/analytics/ikasV3.d.ts +2 -1
- package/build/analytics/ikasV3.js +1 -1
- package/build/analytics/openAiPixel.d.ts +31 -0
- package/build/analytics/openAiPixel.js +1 -0
- package/build/components/checkout/components/address-form/index.js +1 -1
- package/build/components/checkout/components/address-form/model.d.ts +5 -0
- package/build/components/checkout/components/address-form/model.js +1 -1
- package/build/components/checkout/components/adyen/index.js +1 -1
- package/build/components/checkout/components/button/index.d.ts +1 -0
- package/build/components/checkout/components/button/index.js +1 -1
- package/build/components/checkout/components/button/style.module.scss.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/index.js +1 -1
- package/build/components/checkout/components/cart-summary/cart-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/cart-summary/index.d.ts +3 -1
- package/build/components/checkout/components/cart-summary/index.js +1 -1
- package/build/components/checkout/components/cart-summary/loyalty/icons.d.ts +4 -0
- package/build/components/checkout/components/cart-summary/loyalty/icons.js +1 -0
- package/build/components/checkout/components/cart-summary/loyalty/index.d.ts +21 -0
- package/build/components/checkout/components/cart-summary/loyalty/index.js +1 -0
- package/build/components/checkout/components/cart-summary/loyalty/style.module.scss.js +1 -0
- package/build/components/checkout/components/cart-summary/style.module.scss.js +1 -1
- package/build/components/checkout/components/checkbox/index.d.ts +1 -0
- package/build/components/checkout/components/checkbox/index.js +1 -1
- package/build/components/checkout/components/checkout-load-failed/index.d.ts +14 -0
- package/build/components/checkout/components/checkout-load-failed/index.js +1 -0
- package/build/components/checkout/components/checkout-load-failed/style.module.scss.js +1 -0
- package/build/components/checkout/components/credit-card-form/model.js +1 -1
- package/build/components/checkout/components/customer-addresses/index.d.ts +1 -0
- package/build/components/checkout/components/customer-addresses/index.js +1 -1
- package/build/components/checkout/components/customer-addresses/model.js +1 -1
- package/build/components/checkout/components/error/stock-error/index.js +1 -1
- package/build/components/checkout/components/form-item/index.js +1 -1
- package/build/components/checkout/components/form-item/model.d.ts +5 -3
- package/build/components/checkout/components/form-item/model.js +1 -1
- package/build/components/checkout/components/form-item/style.module.scss.js +1 -1
- package/build/components/checkout/components/hepsipay/index.d.ts +9 -0
- package/build/components/checkout/components/hepsipay/index.js +1 -0
- package/build/components/checkout/components/input-with-button/style.module.scss.js +1 -1
- package/build/components/checkout/components/iyzico/index.d.ts +8 -0
- package/build/components/checkout/components/iyzico/index.js +1 -0
- package/build/components/checkout/components/master-pass/credit-card-form/index.js +1 -1
- package/build/components/checkout/components/modal/index.d.ts +1 -0
- package/build/components/checkout/components/modal/index.js +1 -1
- package/build/components/checkout/components/modal/style.module.scss.js +1 -1
- package/build/components/checkout/components/offer-product/index.js +1 -1
- package/build/components/checkout/components/offer-product/style.module.scss.js +1 -1
- package/build/components/checkout/components/phone-number-input/index.d.ts +3 -1
- package/build/components/checkout/components/phone-number-input/index.js +1 -1
- 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.d.ts +5 -0
- package/build/components/checkout/components/quick-registration/model.js +1 -1
- package/build/components/checkout/components/quick-registration/verification-sent.d.ts +7 -0
- package/build/components/checkout/components/quick-registration/verification-sent.js +1 -0
- package/build/components/checkout/components/secure-card-form/index.d.ts +17 -0
- package/build/components/checkout/components/secure-card-form/index.js +1 -0
- package/build/components/checkout/components/secure-card-form/masterpass-bridge-model.d.ts +33 -0
- package/build/components/checkout/components/secure-card-form/masterpass-bridge-model.js +1 -0
- package/build/components/checkout/components/secure-card-form/model.d.ts +73 -0
- package/build/components/checkout/components/secure-card-form/model.js +1 -0
- package/build/components/checkout/components/secure-card-form/protocol.d.ts +240 -0
- package/build/components/checkout/components/secure-card-form/protocol.js +1 -0
- package/build/components/checkout/components/secure-card-form/style.module.scss.js +1 -0
- package/build/components/checkout/components/select-box/index.d.ts +3 -0
- package/build/components/checkout/components/select-box/index.js +1 -1
- package/build/components/checkout/components/step-container/index.d.ts +5 -0
- package/build/components/checkout/components/step-container/index.js +1 -1
- package/build/components/checkout/components/step-container/style.module.scss.js +1 -1
- package/build/components/checkout/components/stripe/checkout-form.js +1 -1
- package/build/components/checkout/components/stripe-express/index.d.ts +7 -0
- package/build/components/checkout/components/stripe-express/index.js +1 -0
- package/build/components/checkout/components/stripe-express/style.module.scss.js +1 -0
- package/build/components/checkout/components/svg/coupon-code-tag.d.ts +6 -0
- package/build/components/checkout/components/svg/coupon-code-tag.js +1 -0
- package/build/components/checkout/components/svg/credit-balance.d.ts +6 -0
- package/build/components/checkout/components/svg/credit-balance.js +1 -0
- package/build/components/checkout/components/svg/gift-cart-tag.d.ts +6 -0
- package/build/components/checkout/components/svg/gift-cart-tag.js +1 -0
- package/build/components/checkout/components/svg/gift-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/gift-loyalty.js +1 -0
- package/build/components/checkout/components/svg/info.d.ts +6 -0
- package/build/components/checkout/components/svg/info.js +1 -0
- package/build/components/checkout/components/svg/package-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/package-loyalty.js +1 -0
- package/build/components/checkout/components/svg/percentage-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/percentage-loyalty.js +1 -0
- package/build/components/checkout/components/svg/refresh.d.ts +6 -0
- package/build/components/checkout/components/svg/refresh.js +1 -0
- package/build/components/checkout/components/svg/star-loyalty.d.ts +6 -0
- package/build/components/checkout/components/svg/star-loyalty.js +1 -0
- package/build/components/checkout/components/svg/store-credit-tag.d.ts +6 -0
- package/build/components/checkout/components/svg/store-credit-tag.js +1 -0
- package/build/components/checkout/components/svg/subscription.d.ts +6 -0
- package/build/components/checkout/components/svg/subscription.js +1 -0
- package/build/components/checkout/components/tkpay/index.d.ts +8 -0
- package/build/components/checkout/components/tkpay/index.js +1 -0
- package/build/components/checkout/components/toggle/index.d.ts +2 -0
- package/build/components/checkout/components/toggle/index.js +1 -1
- package/build/components/checkout/components/toggle/style.module.scss.js +1 -1
- package/build/components/checkout/index.d.ts +2 -0
- package/build/components/checkout/index.js +1 -1
- package/build/components/checkout/model.d.ts +232 -8
- package/build/components/checkout/model.js +1 -1
- package/build/components/checkout/modelMasterPass.d.ts +6 -2
- 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-info/style.module.scss.js +1 -0
- 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/payment-gateways/miles-smiles/header.d.ts +4 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/header.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.d.ts +14 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/index.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.d.ts +13 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/login-required.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/miles-smiles-logo.d.ts +7 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/miles-smiles-logo.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/miles-smiles/style.module.scss.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/index.d.ts +10 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/index.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/saved-cards/style.module.scss.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.d.ts +7 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/index.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/store-credit/style.module.scss.js +1 -0
- package/build/components/checkout/steps/step-payment/payment-gateways/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/image/index.d.ts +1 -0
- package/build/components/image/index.js +1 -1
- package/build/components/index.d.ts +3 -0
- package/build/components/page/head.js +1 -1
- package/build/components/page/index.d.ts +1 -1
- package/build/components/page/index.js +1 -1
- package/build/components/page/widgets/common.d.ts +2 -0
- package/build/components/page/widgets/common.js +1 -0
- package/build/components/page/widgets/loyaltyWidget.d.ts +13 -0
- package/build/components/page/widgets/loyaltyWidget.js +1 -0
- package/build/components/page/widgets/popupWidget.d.ts +16 -0
- package/build/components/page/widgets/popupWidget.js +1 -0
- package/build/components/page-editor/ThemeComponentEditor.js +1 -1
- package/build/components/page-editor/model.d.ts +2 -0
- package/build/components/page-editor/model.js +1 -1
- package/build/components/pay-with-ikas/index.d.ts +9 -0
- package/build/components/pay-with-ikas/index.js +1 -0
- package/build/components/paypal-express-checkout/index.d.ts +9 -0
- package/build/components/paypal-express-checkout/index.js +1 -0
- package/build/components/plain-image/index.d.ts +13 -0
- package/build/components/plain-image/index.js +1 -0
- package/build/ext/@ikas/fe-api-client/build/config/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/formatIncompletePhoneNumber.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/es6/getCountries.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/getCountries.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/getCountryCallingCode.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/isSupportedCountry.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/libphonenumber-js/min/exports/parsePhoneNumber.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/ObserverComponent.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/observer.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/useObserver.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/assertEnvironment.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/observerBatching.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/observerFinalizationRegistry.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/ext/mobx-react-lite/es/utils/printDebugValue.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/button-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/checkbox-item-view/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/phone-input-item-view/get-countries.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/form-element-renderer/phone-input-item-view/index.js +1 -0
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-column-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/image-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/product-list-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/components/social-element-renderer/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/helpers/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/image-column/index.js +1 -1
- package/build/ext/@ikas/popup-renderer/build/popup-renderer/models/modal/step/elements/product/index.js +1 -1
- package/build/hooks/useCustomerReviews.d.ts +2 -0
- package/build/hooks/useCustomerReviews.js +1 -1
- package/build/hooks/useDimension.js +1 -1
- package/build/hooks/useStore.js +1 -1
- package/build/index.js +1 -1
- package/build/models/data/cart/index.d.ts +2 -1
- package/build/models/data/cart/index.js +1 -1
- package/build/models/data/checkout-settings/address-field-restriction/index.d.ts +10 -0
- package/build/models/data/checkout-settings/address-field-restriction/index.js +1 -0
- package/build/models/data/checkout-settings/index.d.ts +3 -0
- package/build/models/data/checkout-settings/index.js +1 -1
- package/build/models/data/customer/address/ikas-localized-customer-address.d.ts +1 -0
- package/build/models/data/customer/address/ikas-localized-customer-address.js +1 -1
- package/build/models/data/customer/review/index.d.ts +4 -1
- package/build/models/data/customer/review/index.js +1 -1
- package/build/models/data/index.d.ts +6 -0
- package/build/models/data/order/address/ikas-localized-order-address.d.ts +1 -0
- package/build/models/data/order/address/ikas-localized-order-address.js +1 -1
- package/build/models/data/order/adjustment/index.d.ts +3 -1
- package/build/models/data/order/adjustment/index.js +1 -1
- package/build/models/data/order/gift-card-line/index.d.ts +2 -1
- package/build/models/data/order/gift-card-line/index.js +1 -1
- package/build/models/data/order/index.d.ts +21 -2
- package/build/models/data/order/index.js +1 -1
- package/build/models/data/order/line-item/bundle-product-settings/index.d.ts +9 -0
- package/build/models/data/order/line-item/bundle-product-settings/index.js +1 -0
- package/build/models/data/order/line-item/index.d.ts +9 -1
- package/build/models/data/order/line-item/index.js +1 -1
- package/build/models/data/order/line-item/order-line-item-subscription-plan/index.d.ts +8 -0
- package/build/models/data/order/line-item/order-line-item-subscription-plan/index.js +1 -0
- package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-discount/index.d.ts +6 -0
- package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-discount/index.js +1 -0
- package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-period/index.d.ts +14 -0
- package/build/models/data/order/line-item/order-line-item-subscription-plan/order-line-item-subscription-plan-period/index.js +1 -0
- package/build/models/data/order/loyalty-line/index.d.ts +9 -0
- package/build/models/data/order/loyalty-line/index.js +1 -0
- package/build/models/data/order/order-transaction-with-prices/index.d.ts +1 -0
- package/build/models/data/order/order-transaction-with-prices/index.js +1 -1
- package/build/models/data/order/refund/reason/index.d.ts +8 -0
- package/build/models/data/order/refund/reason/index.js +1 -0
- package/build/models/data/order/refund/reason/translation/index.d.ts +6 -0
- package/build/models/data/order/refund/reason/translation/index.js +1 -0
- package/build/models/data/order/refund/refundable-line/index.d.ts +10 -0
- package/build/models/data/order/refund/refundable-line/index.js +1 -0
- package/build/models/data/order/refund/refundable-lines/index.d.ts +10 -0
- package/build/models/data/order/refund/refundable-lines/index.js +1 -0
- package/build/models/data/order/refund/settings/index.d.ts +1 -0
- package/build/models/data/order/refund/settings/index.js +1 -1
- package/build/models/data/order/refund/settings/translation/index.d.ts +6 -0
- package/build/models/data/order/refund/settings/translation/index.js +1 -0
- package/build/models/data/payment-gateway/index.d.ts +1 -0
- package/build/models/data/payment-gateway/index.js +1 -1
- package/build/models/data/product/campaign-offer/index.d.ts +2 -0
- package/build/models/data/product/campaign-offer/index.js +1 -1
- package/build/models/data/product/filter/index.d.ts +2 -0
- package/build/models/data/product/filter/index.js +1 -1
- package/build/models/data/product/index.d.ts +10 -0
- package/build/models/data/product/index.js +1 -1
- package/build/models/data/product/translations/index.d.ts +7 -0
- package/build/models/data/product/translations/index.js +1 -0
- package/build/models/data/product/variant/bundle-settings/bundle-product/index.js +1 -1
- package/build/models/data/product/variant/index.d.ts +3 -0
- package/build/models/data/product/variant/index.js +1 -1
- package/build/models/data/product/variant/subscription-plan/index.d.ts +12 -0
- package/build/models/data/product/variant/subscription-plan/index.js +1 -0
- package/build/models/data/product/variant/subscription-plan/product-subscription-plan-discount/index.d.ts +6 -0
- package/build/models/data/product/variant/subscription-plan/product-subscription-plan-period/index.d.ts +23 -0
- package/build/models/data/product/variant/subscription-plan/product-subscription-plan-period/index.js +1 -0
- package/build/models/data/store-credit-balance/index.d.ts +26 -0
- package/build/models/data/store-credit-balance/index.js +1 -0
- package/build/models/data/storefront/index.d.ts +1 -0
- package/build/models/data/storefront/index.js +1 -1
- package/build/models/data/storefront-popup/index.d.ts +1 -0
- package/build/models/data/storefront-popup/index.js +1 -1
- package/build/models/data/storefront-popup/storefront-popup-display-filter/index.d.ts +4 -7
- package/build/models/data/storefront-popup/storefront-popup-display-filter/index.js +1 -1
- package/build/models/data/theme-json/component/prop/index.d.ts +1 -0
- package/build/models/data/theme-json/component/prop/index.js +1 -1
- package/build/models/data/theme-json/custom-data/index.d.ts +1 -0
- package/build/models/data/theme-json/custom-data/index.js +1 -1
- package/build/models/data/theme-json/index.js +1 -1
- package/build/models/ui/blog-category-list/index.js +1 -1
- package/build/models/ui/blog-list/index.d.ts +10 -1
- package/build/models/ui/blog-list/index.js +1 -1
- package/build/models/ui/brand-list/index.js +1 -1
- package/build/models/ui/category-list/index.js +1 -1
- package/build/models/ui/customer-review-list/index.d.ts +8 -0
- package/build/models/ui/customer-review-list/index.js +1 -1
- package/build/models/ui/customer-review-summary-list/index.js +1 -1
- package/build/models/ui/product-list/index.d.ts +25 -2
- package/build/models/ui/product-list/index.js +1 -1
- package/build/models/ui/raffle-list/index.js +1 -1
- 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/ikas-address.js +1 -1
- package/build/models/ui/validator/form/login.d.ts +20 -6
- package/build/models/ui/validator/form/login.js +1 -1
- package/build/models/ui/validator/form/register.d.ts +15 -6
- package/build/models/ui/validator/form/register.js +1 -1
- package/build/page-data-init/index.d.ts +22 -0
- package/build/page-data-init/index.js +1 -1
- package/build/pages/checkout.js +1 -1
- package/build/store/blog/index.js +1 -1
- package/build/store/brand/index.js +1 -1
- package/build/store/cart/api.d.ts +3 -1
- package/build/store/cart/api.js +1 -1
- package/build/store/cart/index.d.ts +28 -2
- package/build/store/cart/index.js +1 -1
- package/build/store/category/index.js +1 -1
- package/build/store/checkout/index.d.ts +10 -1
- package/build/store/checkout/index.js +1 -1
- package/build/store/customer/api.d.ts +37 -13
- package/build/store/customer/api.js +1 -1
- package/build/store/customer/index.d.ts +100 -9
- package/build/store/customer/index.js +1 -1
- package/build/store/html-meta-data/index.js +1 -1
- package/build/store/index.d.ts +2 -0
- package/build/store/location/index.js +1 -1
- package/build/store/product/index.d.ts +2 -1
- package/build/store/product/index.js +1 -1
- package/build/utils/helper.d.ts +2 -0
- package/build/utils/helper.js +1 -1
- package/build/utils/miles-smiles.d.ts +19 -0
- package/build/utils/miles-smiles.js +1 -0
- package/package.json +18 -16
- package/build/components/popup/index.d.ts +0 -2
- package/build/components/popup/index.js +0 -1
- package/build/components/popup/renderer/index.d.ts +0 -8
- package/build/components/popup/renderer/index.js +0 -1
- package/build/components/popup/renderer/model.d.ts +0 -24
- package/build/components/popup/renderer/model.js +0 -1
- package/build/components/popup/utils/index.d.ts +0 -13
- package/build/components/popup/utils/index.js +0 -1
- package/build/store/storefront-popup/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{CheckoutStep as n}from"../../model.js";import{Button as a}from"../button/index.js";import i from"./select/index.js";import o from"../svg/cross.js";import{useTranslation as r}from"../../../../utils/i18n.js";import c from"./style.module.scss.js";import{IkasAmountType as s}from"@ikas/storefront-models";import"@ikas/storefront-config";import{formatCurrency as
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{CheckoutStep as n}from"../../model.js";import{Button as a}from"../button/index.js";import i from"./select/index.js";import o from"../svg/cross.js";import{useTranslation as r}from"../../../../utils/i18n.js";import c from"./style.module.scss.js";import{IkasAmountType as s}from"@ikas/storefront-models";import{IkasStorefrontConfig as l}from"@ikas/storefront-config";import{formatCurrency as u}from"../../../../utils/currency.js";var d=function(t){var a,i,o=t.seconds,s=t.onFinish,l=t.campaignOffer,u=t.vm,d=t.isPopupClosed,m=t.step,p=r().t,v=e.useState(o),g=v[0],C=v[1];e.useEffect((function(){C(o)}),[o]),e.useEffect((function(){var e=setInterval((function(){g>0?C(g-1):(clearInterval(e),s())}),1e3);return function(){return clearInterval(e)}}),[g]);var S=l.offer.countdownMinutes&&(m!==n.SUCCESS?!!(null===(a=u.customizationProps)||void 0===a?void 0:a.campaignOfferCountdownStyleIsLine):!!(null===(i=u.customizationProps)||void 0===i?void 0:i.campaignOfferCountdownStyleIsLineSuccessPage))||d;return e.createElement("div",{className:S?c.CountdownContainerIsLine:c.CountdownContainer},e.createElement("div",{className:c.CountdownTextMain},!S&&e.createElement("span",{className:c.CountdownText},p("checkout-page:timeRemaining")),e.createElement("span",{className:c.CountdownTime},f(g))))},f=function(e){var t=Math.floor(e/60/60),n=Math.floor(e/60)-60*t,a=e%60;return 0!==t?t.toString().padStart(2,"0")+":":n.toString().padStart(2,"0")+":"+a.toString().padStart(2,"0")},m=t((function(t){var f,m,p,v,g,C,S,h=t.vm,E=t.campaignOffer,O=t.index,P=t.activeIndex,I=t.offersLength,V=t.handleNext,w=t.handlePrev,N=t.setActiveIndex,y=t.isPopupShow,B=t.closePopup,M=t.showPopup,j=t.isPopupClosed,k=t.desktopMiddlePhase,T=t.step,A=r().t,x=E.product,D=T!==n.SUCCESS?!!(null===(f=h.customizationProps)||void 0===f?void 0:f.campaignOfferIsSmallDesign)&&y:!!(null===(m=h.customizationProps)||void 0===m?void 0:m.showCampaignIsBiggerImage)&&T===n.SUCCESS,L=e.useRef(null),z=e.useRef(null),b=e.useRef(null),R=e.useState(0),U=R[0],F=R[1],H=["0ead1005-b19c-4680-8ab7-a8a1cca3244e","ec27eadf-1953-4c71-9680-f213332694a2"].includes(l.getStorefrontId()||"");e.useEffect((function(){var e,t,a,i,o,r,c,s;if(void 0!==typeof window){var l=.8*window.innerHeight,u=0,d=0,f=0;L.current&&(u=null===(t=null===(e=L.current)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.height),z.current&&(d=null===(i=null===(a=z.current)||void 0===a?void 0:a.getBoundingClientRect())||void 0===i?void 0:i.height),b.current&&(f=null===(r=null===(o=b.current)||void 0===o?void 0:o.getBoundingClientRect())||void 0===r?void 0:r.height);var m=(T===n.SUCCESS?null===(c=h.customizationProps)||void 0===c?void 0:c.campaignOfferCountdownStyleIsLineSuccessPage:null===(s=h.customizationProps)||void 0===s?void 0:s.campaignOfferCountdownStyleIsLine)?25:70,p=navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)?20:0;F(l-u-d-f-p-m)}}),[y]);var X=e.useState(null),q=X[0],G=X[1],J=e.useState(null),K=J[0],Q=J[1],W=e.useMemo((function(){var e,t,n,a,i,o,r,c=null===(e=x.selectedVariant.images)||void 0===e?void 0:e.filter((function(e){return!e.isVideo}));return(null===(t=x.selectedVariant.mainImage)||void 0===t?void 0:t.isVideo)&&(null==c?void 0:c.length)?null===(n=c[0].image)||void 0===n?void 0:n.thumbnailSrc:D||k?null===(i=null===(a=x.selectedVariant.mainImage)||void 0===a?void 0:a.image)||void 0===i?void 0:i.getSrc(360):null===(r=null===(o=x.selectedVariant.mainImage)||void 0===o?void 0:o.image)||void 0===r?void 0:r.thumbnailSrc}),[x.selectedVariant,D,k]),Y=function(e){N(0),h.updateCartCampaignOffer({accepted:e,cartId:h.checkout.id,campaignOfferId:E.campaignOffer.campaignOfferId,campaignOfferProductId:E.offer.id,productId:E.offer.productId,variantId:x.selectedVariant.id})},Z=function(){Y(!1)},$=function(){Y(!0)},_=e.useMemo((function(){if(!E.offer.countdownMinutes||!E.campaignOffer.offerStartDate)return 0;var e=Math.round(((new Date).getTime()-new Date(E.campaignOffer.offerStartDate).getTime())/1e3);return e>60*E.offer.countdownMinutes?(Z(),0):60*E.offer.countdownMinutes-e}),[E]),ee=function(e,t){var n=null;x.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))}));var a=x.variants.find((function(t){return t.id===e})),i=!!a&&!!a.variantValues&&!!a.variantValues.length&&a.variantValues[t];i&&x.selectVariantValue(i,!0),x.displayedVariantTypes.forEach((function(t){t.displayedVariantValues.forEach((function(t){t.variant.id===e&&(n=t.variantValue)}))})),n?x.selectVariantValue(n,!0):ee(e,t+1)},te=E.offer.countdownMinutes&&(T!==n.SUCCESS?!!(null===(p=h.customizationProps)||void 0===p?void 0:p.campaignOfferCountdownStyleIsLine):!!(null===(v=h.customizationProps)||void 0===v?void 0:v.campaignOfferCountdownStyleIsLineSuccessPage))||j&&E.offer.countdownMinutes;return e.createElement("div",{style:{transform:"translateX(-".concat(100*P,"%)")},className:[c.Container,O===P?c.ActiveOffer:"",y?c.PopupContainer:"",k?c.PopupContainerDesktop:"",T===n.SUCCESS?c.Border:""].join(" ")},E.offer.countdownMinutes&&(T!==n.SUCCESS?!(null===(g=h.customizationProps)||void 0===g?void 0:g.campaignOfferCountdownStyleIsLine):!(null===(C=h.customizationProps)||void 0===C?void 0:C.campaignOfferCountdownStyleIsLineSuccessPage))&&!j&&e.createElement(d,{seconds:_,onFinish:Z,vm:h,campaignOffer:E,step:T}),e.createElement("div",{onTouchStart:function(e){Q(null),G(e.targetTouches[0].clientX)},onTouchMove:function(e){return Q(e.targetTouches[0].clientX)},onTouchEnd:function(){if(q&&K&&I>1){var e=q-K,t=e>50;(t||e<-50)&&(t?V():w())}},className:[c.ContentContainer,I>1?c.ContentContainerItems:"",j?I>1?c.ContentContainerPopup:c.ContentContainerPopupItems:""].join(" ")},!!y&&e.createElement("div",{className:c.RejectButton,onClick:function(){return B&&B()}},e.createElement(o,null)),e.createElement("div",{ref:L,className:[c.HeaderMain,D&&!j?c.IsBigProductImage:"",te?c.IsLineCountDown:"",j?c.MobileSmallHeader:""].join(" ")},e.createElement("div",{className:c.Header},e.createElement("div",{className:c.Title},E.offer.title),!!E.offer.description&&!j&&e.createElement("div",{className:c.Description},E.offer.description)),te&&e.createElement(d,{seconds:_,onFinish:Z,vm:h,campaignOffer:E,isPopupClosed:j,step:T})),e.createElement("div",{className:[c.ProductContainer,D&&!j?c.IsLineProductContainer:""].join(" ")},e.createElement("div",{style:y?{width:U,height:U}:{},className:[c.ImageContainer,D&&!j?c.BigImage:"",j?c.SmallImage:"",k?c.BiggerImage:""].join(" ")},e.createElement("img",{className:c.Image,src:W})),e.createElement("div",{ref:z,className:c.ProductDetails},e.createElement("div",{className:c.ProductName},x.name),x.hasVariant&&1===x.variants.length&&e.createElement("div",{className:c.VariantName},x.selectedVariant.variantValues.map((function(e){return e.name})).join(", ")),!(null===(S=h.customizationProps)||void 0===S?void 0:S.showCampaignHideDiscountBadge)&&x.selectedVariant.hasDiscount&&e.createElement("span",{className:c.DiscountBadge},E.offer.discountType===s.RATIO?"%".concat(x.selectedVariant.discountPercentage):u(E.offer.discountAmount||0,x.selectedVariant.price.currency||"",x.selectedVariant.price.currencySymbol||"")," ",A("checkout-page:discount")),e.createElement("div",{className:c.ProductPriceMain},x.selectedVariant.hasDiscount&&e.createElement("span",{className:c.Discount},x.selectedVariant.formattedSellPrice," "),e.createElement("span",{className:c.ProductPrice},E.offer.discountType===s.AMOUNT?u(x.selectedVariant.price.sellPrice-(E.offer.discountAmount||0),x.selectedVariant.price.currency||"",x.selectedVariant.price.currencySymbol||""):x.selectedVariant.formattedFinalPrice)),!j&&x.variants.length>1&&e.createElement("div",{className:c.Actions},x.variants.length>1&&e.createElement(i,{value:x.selectedVariant.id,onSelectChange:function(e){ee(e,0)},options:x.variants.map((function(e){return{label:e.variantValues.map((function(e){return e.name})).join(", "),value:e.id}}))})),!!j&&e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:"",c.PopupOfferButton].join(" "),text:A("checkout-page:actions.acceptOffer"),onClick:function(){x.hasVariant&&x.variants.length>1?M&&M():$()}}),!!k&&e.createElement("div",{className:[c.OfferActionsMain,D?c.OfferActionsMainBigImage:"",c.OfferActionsMainMiddlePhase].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:A("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:""].join(" "),text:e.createElement("div",null,e.createElement("span",null,A("checkout-page:actions.acceptOffer")),e.createElement("span",null),e.createElement("span",null,x.selectedVariant.price.formattedFinalPrice)),onClick:$})))),!(j||k)&&e.createElement("div",{ref:b,className:[c.OfferActionsMain,D?c.OfferActionsMainBigImage:""].join(" ")},e.createElement(a,{classes:c.OfferButton,isLine:!0,text:A("checkout-page:actions.rejectOffer"),onClick:Z}),e.createElement(a,{classes:[c.OfferButton,D?c.OfferAcceptButton:"",H?c.ProteinOceanOfferButton:""].join(" "),text:A("checkout-page:actions.acceptOffer"),onClick:$}))))}));export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var e={Container:"style-module_Container__-EKYc",Border:"style-module_Border__DqZgC",ActiveOffer:"style-module_ActiveOffer__JZyW-",CountdownContainer:"style-module_CountdownContainer__bc-5v",CountdownContainerIsLine:"style-module_CountdownContainerIsLine__YtdAv",CountdownTextMain:"style-module_CountdownTextMain__S9Rrn",CountdownText:"style-module_CountdownText__Hd-3I",CountdownTime:"style-module_CountdownTime__a2aRF",ContentContainer:"style-module_ContentContainer__tC3zO",HeaderMain:"style-module_HeaderMain__-tiUy",Header:"style-module_Header__J2wyt",IsLineCountDown:"style-module_IsLineCountDown__xgFDT",IsBigProductImage:"style-module_IsBigProductImage__YdAgY",IsLineProductContainer:"style-module_IsLineProductContainer__3Nkqr",Title:"style-module_Title__4T394",Description:"style-module_Description__GPKR-",RejectButton:"style-module_RejectButton__3SwP8",ProductContainer:"style-module_ProductContainer__9qr9n",ImageContainer:"style-module_ImageContainer__gxlXU",PlaceHolderProductContainer:"style-module_PlaceHolderProductContainer__XVvyr",BigImage:"style-module_BigImage__n1DH9",SmallImage:"style-module_SmallImage__42qY-",BiggerImage:"style-module_BiggerImage__2M7Dw",Image:"style-module_Image__gDla7",ProductDetails:"style-module_ProductDetails__a-gJx",ProductName:"style-module_ProductName__yTmJx",VariantName:"style-module_VariantName__DF1mY",Brand:"style-module_Brand__UxK7C",ProductPriceMain:"style-module_ProductPriceMain__IJHv-",ProductPrice:"style-module_ProductPrice__U6Lhy",Discount:"style-module_Discount__tjllJ",Actions:"style-module_Actions__XZsJD",DiscountBadge:"style-module_DiscountBadge__deWxZ",ContentContainerItems:"style-module_ContentContainerItems__SIB05",OfferActionsMain:"style-module_OfferActionsMain__9axsN",OfferActionsMainMiddlePhase:"style-module_OfferActionsMainMiddlePhase__7VryS",OfferButton:"style-module_OfferButton__pkhNI",OfferActionsMainBigImage:"style-module_OfferActionsMainBigImage__qCPQB",MobileSmallHeader:"style-module_MobileSmallHeader__zrlIx",ContentContainerPopup:"style-module_ContentContainerPopup__Pburr",ContentContainerPopupItems:"style-module_ContentContainerPopupItems__7Azct",PopupOfferButton:"style-module_PopupOfferButton__-9ljg",PopupContainer:"style-module_PopupContainer__sL4sY",PopupContainerDesktop:"style-module_PopupContainerDesktop__c13p-"};n(".style-module_Container__-EKYc {\n margin: 32px 0 48px 0;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n flex-shrink: 0;\n width: 100%;\n transition: 0.5s ease;\n background-color: var(--checkout-campaign-container-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc {\n margin: 0;\n border-radius: 0;\n border: unset;\n border-bottom: 1px solid var(--checkout-border-color);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc.style-module_Border__DqZgC {\n border-top: 1px solid var(--checkout-border-color);\n }\n}\n\n.style-module_ActiveOffer__JZyW- {\n position: relative;\n opacity: 1;\n}\n\n.style-module_CountdownContainer__bc-5v {\n display: flex;\n justify-content: center;\n padding: 12px 16px;\n border-radius: 8px 8px 0 0;\n background-color: var(--checkout-campaign-countdown-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CountdownContainer__bc-5v {\n border-radius: 0;\n }\n}\n\n.style-module_CountdownContainerIsLine__YtdAv {\n display: flex;\n justify-content: center;\n padding: 4px 12px;\n border-radius: 8px;\n background-color: var(--checkout-campaign-countdown-bg-color);\n height: 32px;\n}\n\n.style-module_CountdownTextMain__S9Rrn {\n gap: 6px;\n display: flex;\n}\n\n.style-module_CountdownText__Hd-3I {\n color: var(--checkout-campaign-countdown-text-color);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_CountdownTime__a2aRF {\n color: var(--checkout-campaign-countdown-time-color);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n}\n\n.style-module_ContentContainer__tC3zO {\n padding: 24px;\n width: 100%;\n position: relative;\n}\n\n.style-module_HeaderMain__-tiUy {\n display: flex;\n flex-direction: column;\n margin-bottom: 16px;\n}\n\n.style-module_Header__J2wyt {\n display: flex;\n flex-direction: column;\n}\n\n.style-module_IsLineCountDown__xgFDT {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_IsLineCountDown__xgFDT .style-module_Header__J2wyt {\n width: 75%;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsBigProductImage__YdAgY {\n flex-direction: column;\n justify-content: center;\n text-align: center;\n row-gap: 16px;\n align-items: center;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsLineProductContainer__3Nkqr {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 256px;\n margin: 0 auto;\n row-gap: 12px;\n }\n}\n\n.style-module_Title__4T394 {\n font-size: 20px;\n color: var(--checkout-campaign-title-color);\n font-weight: 500;\n line-height: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Title__4T394 {\n font-size: 18px;\n line-height: 26px;\n }\n}\n\n.style-module_Description__GPKR- {\n color: var(--checkout-campaign-description-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_RejectButton__3SwP8 {\n height: 35px;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 16px;\n top: 10px;\n cursor: pointer;\n position: absolute;\n}\n\n.style-module_ProductContainer__9qr9n {\n display: flex;\n}\n\n.style-module_ImageContainer__gxlXU {\n height: 80px;\n width: 80px;\n position: relative;\n background-color: #fff;\n margin-right: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n.style-module_ImageContainer__gxlXU svg {\n width: 40px;\n height: 40px;\n}\n\n.style-module_PlaceHolderProductContainer__XVvyr {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.style-module_BigImage__n1DH9 {\n height: 152px;\n width: 152px;\n margin-right: 16px;\n}\n.style-module_BigImage__n1DH9 svg {\n width: 80px;\n height: 80px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_BigImage__n1DH9 {\n height: 256px;\n width: 256px;\n margin-right: 0;\n }\n}\n\n.style-module_SmallImage__42qY- {\n height: 52px;\n width: 52px;\n}\n\n.style-module_BiggerImage__2M7Dw {\n height: 320px;\n width: 320px;\n}\n\n.style-module_Image__gDla7 {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.style-module_ProductDetails__a-gJx {\n flex: 1;\n width: 100%;\n position: relative;\n}\n\n.style-module_ProductName__yTmJx {\n margin-bottom: 4px;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_VariantName__DF1mY {\n margin-bottom: 4px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_Brand__UxK7C {\n margin-bottom: 2px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_ProductPriceMain__IJHv- {\n gap: 6px;\n display: flex;\n}\n\n.style-module_ProductPrice__U6Lhy {\n font-size: 16px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n line-height: 24px;\n}\n\n.style-module_Discount__tjllJ {\n font-size: 16px;\n font-weight: 400;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n line-height: 24px;\n}\n\n.style-module_Actions__XZsJD {\n display: flex;\n margin-top: 16px;\n width: 100%;\n}\n\n.style-module_DiscountBadge__deWxZ {\n color: var(--checkout-campaign-discount-percentage-color);\n background-color: var(--checkout-campaign-discount-percentage-bg-color);\n display: flex;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n width: max-content;\n margin-bottom: 4px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_DiscountBadge__deWxZ {\n font-size: 12px;\n }\n}\n\n.style-module_ContentContainerItems__SIB05 {\n position: relative;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_ContentContainerItems__SIB05 {\n padding-bottom: 60px;\n }\n}\n\n.style-module_OfferActionsMain__9axsN {\n display: flex;\n gap: 12px;\n margin-top: 24px;\n}\n\n.style-module_OfferActionsMainMiddlePhase__7VryS {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 24px;\n flex-direction: column-reverse;\n position: absolute;\n bottom: 0;\n width: 100%;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span:nth-child(2) {\n background-color: rgb(255, 255, 255);\n width: 2px;\n height: 2px;\n display: flex;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span {\n font-weight: 500;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_OfferActionsMainBigImage__qCPQB {\n display: flex;\n flex-direction: column;\n flex-direction: column-reverse;\n }\n}\n\n.style-module_OfferButton__pkhNI {\n font-weight: 500 !important;\n width: 100%;\n height: 52px !important;\n font-size: 16px;\n}\n\n.style-module_MobileSmallHeader__zrlIx {\n margin-bottom: 10px;\n}\n.style-module_MobileSmallHeader__zrlIx .style-module_Header__J2wyt .style-module_Title__4T394 {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_ContentContainerPopup__Pburr {\n padding: 16px;\n padding-bottom: 60px;\n}\n.style-module_ContentContainerPopup__Pburr .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_ContentContainerPopupItems__7Azct {\n padding: 16px;\n}\n.style-module_ContentContainerPopupItems__7Azct .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_PopupOfferButton__-9ljg {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 40%;\n font-size: 12px;\n height: 44px !important;\n}\n\n.style-module_PopupContainer__sL4sY {\n border-bottom: unset;\n}\n.style-module_PopupContainer__sL4sY .style-module_ContentContainer__tC3zO {\n padding-bottom: 16px;\n}\n\n.style-module_PopupContainerDesktop__c13p- {\n border: 1px solid var(--checkout-border-color);\n}");export{e as default};
|
|
1
|
+
import n from'./../../../../ext/style-inject/dist/style-inject.es.js';var e={Container:"style-module_Container__-EKYc",Border:"style-module_Border__DqZgC",ActiveOffer:"style-module_ActiveOffer__JZyW-",CountdownContainer:"style-module_CountdownContainer__bc-5v",CountdownContainerIsLine:"style-module_CountdownContainerIsLine__YtdAv",CountdownTextMain:"style-module_CountdownTextMain__S9Rrn",CountdownText:"style-module_CountdownText__Hd-3I",CountdownTime:"style-module_CountdownTime__a2aRF",ContentContainer:"style-module_ContentContainer__tC3zO",HeaderMain:"style-module_HeaderMain__-tiUy",Header:"style-module_Header__J2wyt",IsLineCountDown:"style-module_IsLineCountDown__xgFDT",IsBigProductImage:"style-module_IsBigProductImage__YdAgY",IsLineProductContainer:"style-module_IsLineProductContainer__3Nkqr",Title:"style-module_Title__4T394",Description:"style-module_Description__GPKR-",RejectButton:"style-module_RejectButton__3SwP8",ProductContainer:"style-module_ProductContainer__9qr9n",ImageContainer:"style-module_ImageContainer__gxlXU",PlaceHolderProductContainer:"style-module_PlaceHolderProductContainer__XVvyr",BigImage:"style-module_BigImage__n1DH9",SmallImage:"style-module_SmallImage__42qY-",BiggerImage:"style-module_BiggerImage__2M7Dw",Image:"style-module_Image__gDla7",ProductDetails:"style-module_ProductDetails__a-gJx",ProductName:"style-module_ProductName__yTmJx",VariantName:"style-module_VariantName__DF1mY",Brand:"style-module_Brand__UxK7C",ProductPriceMain:"style-module_ProductPriceMain__IJHv-",ProductPrice:"style-module_ProductPrice__U6Lhy",Discount:"style-module_Discount__tjllJ",Actions:"style-module_Actions__XZsJD",DiscountBadge:"style-module_DiscountBadge__deWxZ",ContentContainerItems:"style-module_ContentContainerItems__SIB05",OfferActionsMain:"style-module_OfferActionsMain__9axsN",OfferActionsMainMiddlePhase:"style-module_OfferActionsMainMiddlePhase__7VryS",OfferButton:"style-module_OfferButton__pkhNI",OfferActionsMainBigImage:"style-module_OfferActionsMainBigImage__qCPQB",ProteinOceanOfferButton:"style-module_ProteinOceanOfferButton__ypr7i",MobileSmallHeader:"style-module_MobileSmallHeader__zrlIx",ContentContainerPopup:"style-module_ContentContainerPopup__Pburr",ContentContainerPopupItems:"style-module_ContentContainerPopupItems__7Azct",PopupOfferButton:"style-module_PopupOfferButton__-9ljg",PopupContainer:"style-module_PopupContainer__sL4sY",PopupContainerDesktop:"style-module_PopupContainerDesktop__c13p-"};n(".style-module_Container__-EKYc {\n margin: 32px 0 48px 0;\n border: 1px solid var(--checkout-border-color);\n border-radius: 8px;\n flex-shrink: 0;\n width: 100%;\n transition: 0.5s ease;\n background-color: var(--checkout-campaign-container-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc {\n margin: 0;\n border-radius: 0;\n border: unset;\n border-bottom: 1px solid var(--checkout-border-color);\n }\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Container__-EKYc.style-module_Border__DqZgC {\n border-top: 1px solid var(--checkout-border-color);\n }\n}\n\n.style-module_ActiveOffer__JZyW- {\n position: relative;\n opacity: 1;\n}\n\n.style-module_CountdownContainer__bc-5v {\n display: flex;\n justify-content: center;\n padding: 12px 16px;\n border-radius: 8px 8px 0 0;\n background-color: var(--checkout-campaign-countdown-bg-color);\n}\n@media only screen and (max-width: 1000px) {\n .style-module_CountdownContainer__bc-5v {\n border-radius: 0;\n }\n}\n\n.style-module_CountdownContainerIsLine__YtdAv {\n display: flex;\n justify-content: center;\n padding: 4px 12px;\n border-radius: 8px;\n background-color: var(--checkout-campaign-countdown-bg-color);\n height: 32px;\n}\n\n.style-module_CountdownTextMain__S9Rrn {\n gap: 6px;\n display: flex;\n}\n\n.style-module_CountdownText__Hd-3I {\n color: var(--checkout-campaign-countdown-text-color);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_CountdownTime__a2aRF {\n color: var(--checkout-campaign-countdown-time-color);\n font-size: 16px;\n font-weight: 700;\n line-height: 24px;\n}\n\n.style-module_ContentContainer__tC3zO {\n padding: 24px;\n width: 100%;\n position: relative;\n}\n\n.style-module_HeaderMain__-tiUy {\n display: flex;\n flex-direction: column;\n margin-bottom: 16px;\n}\n\n.style-module_Header__J2wyt {\n display: flex;\n flex-direction: column;\n}\n\n.style-module_IsLineCountDown__xgFDT {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.style-module_IsLineCountDown__xgFDT .style-module_Header__J2wyt {\n width: 75%;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsBigProductImage__YdAgY {\n flex-direction: column;\n justify-content: center;\n text-align: center;\n row-gap: 16px;\n align-items: center;\n }\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_IsLineProductContainer__3Nkqr {\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 256px;\n margin: 0 auto;\n row-gap: 12px;\n }\n}\n\n.style-module_Title__4T394 {\n font-size: 20px;\n color: var(--checkout-campaign-title-color);\n font-weight: 500;\n line-height: 32px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_Title__4T394 {\n font-size: 18px;\n line-height: 26px;\n }\n}\n\n.style-module_Description__GPKR- {\n color: var(--checkout-campaign-description-color);\n font-size: 16px;\n font-weight: 400;\n line-height: 24px;\n}\n\n.style-module_RejectButton__3SwP8 {\n height: 35px;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n right: 16px;\n top: 10px;\n cursor: pointer;\n position: absolute;\n}\n\n.style-module_ProductContainer__9qr9n {\n display: flex;\n}\n\n.style-module_ImageContainer__gxlXU {\n height: 80px;\n width: 80px;\n position: relative;\n background-color: #fff;\n margin-right: 12px;\n border-radius: 8px;\n border: 1px solid var(--checkout-border-color);\n}\n.style-module_ImageContainer__gxlXU svg {\n width: 40px;\n height: 40px;\n}\n\n.style-module_PlaceHolderProductContainer__XVvyr {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.style-module_BigImage__n1DH9 {\n height: 152px;\n width: 152px;\n margin-right: 16px;\n}\n.style-module_BigImage__n1DH9 svg {\n width: 80px;\n height: 80px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_BigImage__n1DH9 {\n height: 256px;\n width: 256px;\n margin-right: 0;\n }\n}\n\n.style-module_SmallImage__42qY- {\n height: 52px;\n width: 52px;\n}\n\n.style-module_BiggerImage__2M7Dw {\n height: 320px;\n width: 320px;\n}\n\n.style-module_Image__gDla7 {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: 8px;\n}\n\n.style-module_ProductDetails__a-gJx {\n flex: 1;\n width: 100%;\n position: relative;\n}\n\n.style-module_ProductName__yTmJx {\n margin-bottom: 4px;\n font-size: 16px;\n color: var(--checkout-primary-text-color);\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_VariantName__DF1mY {\n margin-bottom: 4px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_Brand__UxK7C {\n margin-bottom: 2px;\n font-size: 14px;\n color: var(--checkout-primary-text-color);\n line-height: 20px;\n}\n\n.style-module_ProductPriceMain__IJHv- {\n gap: 6px;\n display: flex;\n}\n\n.style-module_ProductPrice__U6Lhy {\n font-size: 16px;\n font-weight: 500;\n color: var(--checkout-primary-text-color);\n line-height: 24px;\n}\n\n.style-module_Discount__tjllJ {\n font-size: 16px;\n font-weight: 400;\n color: var(--checkout-secondary-text-color);\n text-decoration: line-through;\n line-height: 24px;\n}\n\n.style-module_Actions__XZsJD {\n display: flex;\n margin-top: 16px;\n width: 100%;\n}\n\n.style-module_DiscountBadge__deWxZ {\n color: var(--checkout-campaign-discount-percentage-color);\n background-color: var(--checkout-campaign-discount-percentage-bg-color);\n display: flex;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 14px;\n font-weight: 700;\n line-height: 20px;\n width: max-content;\n margin-bottom: 4px;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_DiscountBadge__deWxZ {\n font-size: 12px;\n }\n}\n\n.style-module_ContentContainerItems__SIB05 {\n position: relative;\n}\n@media only screen and (max-width: 1000px) {\n .style-module_ContentContainerItems__SIB05 {\n padding-bottom: 60px;\n }\n}\n\n.style-module_OfferActionsMain__9axsN {\n display: flex;\n gap: 12px;\n margin-top: 24px;\n}\n\n.style-module_OfferActionsMainMiddlePhase__7VryS {\n display: flex;\n flex-direction: column;\n gap: 12px;\n margin-top: 24px;\n flex-direction: column-reverse;\n position: absolute;\n bottom: 0;\n width: 100%;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span:nth-child(2) {\n background-color: rgb(255, 255, 255);\n width: 2px;\n height: 2px;\n display: flex;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n}\n.style-module_OfferActionsMainMiddlePhase__7VryS .style-module_OfferButton__pkhNI div span {\n font-weight: 500;\n}\n\n@media only screen and (max-width: 1000px) {\n .style-module_OfferActionsMainBigImage__qCPQB {\n display: flex;\n flex-direction: column;\n flex-direction: column-reverse;\n }\n}\n\n.style-module_OfferButton__pkhNI {\n font-weight: 500 !important;\n width: 100%;\n height: 52px !important;\n font-size: 16px;\n}\n\n.style-module_ProteinOceanOfferButton__ypr7i {\n font-weight: 600 !important;\n}\n\n.style-module_MobileSmallHeader__zrlIx {\n margin-bottom: 10px;\n}\n.style-module_MobileSmallHeader__zrlIx .style-module_Header__J2wyt .style-module_Title__4T394 {\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n}\n\n.style-module_ContentContainerPopup__Pburr {\n padding: 16px;\n padding-bottom: 60px;\n}\n.style-module_ContentContainerPopup__Pburr .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_ContentContainerPopupItems__7Azct {\n padding: 16px;\n}\n.style-module_ContentContainerPopupItems__7Azct .style-module_ProductContainer__9qr9n .style-module_ProductDetails__a-gJx {\n position: relative;\n}\n\n.style-module_PopupOfferButton__-9ljg {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 40%;\n font-size: 12px;\n height: 44px !important;\n}\n\n.style-module_PopupContainer__sL4sY {\n border-bottom: unset;\n}\n.style-module_PopupContainer__sL4sY .style-module_ContentContainer__tC3zO {\n padding-bottom: 16px;\n}\n\n.style-module_PopupContainerDesktop__c13p- {\n border: 1px solid var(--checkout-border-color);\n}");export{e as default};
|
|
@@ -5,6 +5,8 @@ declare type Props = {
|
|
|
5
5
|
placeholder: string | undefined;
|
|
6
6
|
value: string;
|
|
7
7
|
onChange: (value: string) => void;
|
|
8
|
+
name?: string;
|
|
9
|
+
autoComplete?: string;
|
|
8
10
|
};
|
|
9
|
-
export declare const PhoneNumberInput: React.
|
|
11
|
+
export declare const PhoneNumberInput: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<Props & React.RefAttributes<HTMLInputElement>, keyof Props | "key"> & React.RefAttributes<HTMLInputElement>>>;
|
|
10
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as r}from"mobx-react-lite";import n,{
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import*as a from"react";import{observer as r}from"mobx-react-lite";import n,{formatIncompletePhoneNumber as l,getCountryCallingCode as o,isSupportedCountry as c,parseIncompletePhoneNumber as u}from"libphonenumber-js";import s from"./get-countries.js";import i from"./style.module.scss.js";var m=function(e,t){var a=n(e),r=n(e,t),c=a||r,s=(null==c?void 0:c.country)||t,i=o(s),m=u(e),v=e.trimStart().startsWith("+"),f=m.startsWith(i),d=e;if(!m||v||f)v||!f||e.includes("+")||(d="+".concat(m));else{var p=m.replace(/^0+/,"");d="+".concat(i).concat(p)}return{formatted:l(d,s),country:s}},v=r(a.forwardRef((function(r,l){var v=r.defaultCountry,f=r.disabled,d=void 0!==f&&f,p=r.placeholder,g=r.value,y=r.onChange,b=r.name,h=r.autoComplete,E=void 0===h?"tel":h,N=a.useState([]),S=N[0],C=N[1],F=a.useState(v||"TR"),j=F[0],R=F[1],w=a.useState(""),x=w[0],I=w[1];a.useEffect((function(){T();var e=function(e,t){if("KK"===e&&(e="TR"),c(e)||(e="US"),t){var a=n(t);if(null==a?void 0:a.country)return a.country}return e}(v||j||"TR",g);if(g){var t=m(g,e),a=t.formatted,r=t.country;I(a),R(r)}else K(e),R(e)}),[v]);var T=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,s()];case 1:return e=t.sent(),C(e),[2]}}))}))},k=function(e){var t=m(e.target.value,j),a=t.formatted,r=t.country;R(r),I(a),y(a?u(a):e.target.value)},K=function(e){var t=o(e);I("+".concat(t))};return a.createElement(a.Fragment,null,a.createElement("div",{className:i.SelectFlag},a.createElement("div",{className:i.FlagContainer},a.createElement("div",{className:i.Flag},a.createElement("img",{className:i.FlagImage,alt:j,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(j,".svg")}),a.createElement("div",{className:i.Arrow})),a.createElement("select",{className:i.Select,value:j,onInput:function(e){if(e.target.value){var t=e.target.value;R(t),K(t)}},disabled:d},S.map((function(e){return a.createElement("option",{key:e.value,value:e.value},e.label)}))))),a.createElement("input",{ref:l,id:b,name:b,type:"tel",autoComplete:E,className:i.Input,value:x,onChange:k,onBlur:function(e){var t=u(x);u(e.target.value)!==t&&k(e)},placeholder:p,disabled:d}))})));export{v as PhoneNumberInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../utils/i18n.js";import
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{Button as o}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../utils/i18n.js";import r from"../svg/success-circle.js";import c from"./style.module.scss.js";var a=t((function(t){var a=t.vm,m=i().t;return e.createElement("div",{className:c.Container},e.createElement("div",{className:c.TitleContainer},e.createElement(r,{className:c.Icon}),e.createElement("div",{className:c.CompletedTitle},m("checkout-page:quickRegistration.completedTitle"))),e.createElement("div",{className:c.SubTitle},m("checkout-page:quickRegistration.completedSubtitle")),e.createElement(o,{href:a.getGoToLoginHref(),text:m("checkout-page:actions.login"),style:{width:"100%",marginTop:32}}))}));export{a as QuickRegistrationCompleted};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as r}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import{FormItem as r}from"../form-item/index.js";import{FormItemType as o,FormItemInputType as i}from"../form-item/model.js";import{Button as a}from"../button/index.js";import"@ikas/storefront-config";import{useTranslation as s}from"../../../../utils/i18n.js";import m from"../notification-box/index.js";import{QuickRegistrationCompleted as n}from"./completed.js";import{QuickRegistrationVerificationSent as c}from"./verification-sent.js";import{QuickRegistrationViewModel as l}from"./model.js";import p from"./style.module.scss.js";var u=t((function(t){var u=t.vm,d=s().t,g=e.useMemo((function(){return new l(u,d)}),[]);return u.checkout.customer?g.isRegisteredCustomer?e.createElement(n,{vm:u}):g.isVerificationEmailSent?e.createElement(c,{vm:u}):e.createElement("div",{className:p.Container},e.createElement("div",{className:p.Title},d("checkout-page:quickRegistration.title")),e.createElement("div",{className:p.SubTitle},d("checkout-page:quickRegistration.subtitle")),e.createElement("div",{className:p.EmailContainer},e.createElement("div",{className:p.Label},d("checkout-page:quickRegistration.accountEmail"),":"),e.createElement("div",{className:p.Email},u.checkout.customer.email)),e.createElement(r,{name:"password",type:o.TEXT,inputType:i.PASSWORD,label:d("checkout-page:password"),value:g.password,onChange:g.onPasswordChange,hasError:!!g.passwordErrorMessage,errorText:g.passwordErrorMessage}),!!g.errorMessage&&e.createElement("div",{style:{marginTop:16}},e.createElement(m,{type:"error",content:g.errorMessage,onClose:g.clearErrorMessage,ignoreScroll:!0})),e.createElement(a,{style:{width:"100%",marginTop:16},text:d("checkout-page:actions.signup"),isLoading:g.isLoading,onClick:g.onSubmit})):null}));export{u as QuickRegistration};
|
|
@@ -6,14 +6,19 @@ export declare class QuickRegistrationViewModel {
|
|
|
6
6
|
private validator;
|
|
7
7
|
private _isLoading;
|
|
8
8
|
private _isRegisteredCustomer;
|
|
9
|
+
private _isVerificationEmailSent;
|
|
10
|
+
private _errorMessage;
|
|
9
11
|
t: TFunction;
|
|
10
12
|
constructor(vm: CheckoutViewModel, t: TFunction);
|
|
11
13
|
get password(): string;
|
|
12
14
|
get isLoading(): boolean;
|
|
13
15
|
get isRegisteredCustomer(): boolean;
|
|
16
|
+
get isVerificationEmailSent(): boolean;
|
|
17
|
+
get errorMessage(): string | null;
|
|
14
18
|
get hasError(): boolean;
|
|
15
19
|
get passwordErrorMessage(): string | undefined;
|
|
16
20
|
onPasswordChange: (value: string) => void;
|
|
21
|
+
clearErrorMessage: () => void;
|
|
17
22
|
validateAll: () => Promise<boolean>;
|
|
18
23
|
onSubmit: () => Promise<void>;
|
|
19
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o,observable as
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as o,observable as r}from"mobx";import{IkasRegisterError as i}from"@ikas/storefront-api";import"../../../../models/data/blog/category/index.js";import"../../../../models/data/blog/content/index.js";import"../../../../models/data/blog/meta-data/index.js";import"../../../../models/data/blog/tag/index.js";import"../../../../models/data/blog/index.js";import"../../../../models/data/brand/index.js";import"@ikas/storefront-models";import"../../../../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-settings/index.js";import"../../../../models/data/city/index.js";import"../../../../models/data/country/index.js";import"../../../../models/data/customer/address/region/index.js";import"../../../../models/data/customer/address/index.js";import"../../../../models/data/customer/address/ikas-localized-customer-address.js";import"../../../../models/data/customer/attribute/index.js";import"../../../../models/data/customer/review/summary/index.js";import"../../../../models/data/customer/review/index.js";import"../../../../models/data/customer/index.js";import"../../../../models/data/customer-form-data-input/index.js";import"../../../../models/data/district/index.js";import"../../../../models/data/favorite-product/index.js";import"../../../../models/data/filter-category/index.js";import"../../../../models/data/html-meta-data/index.js";import"../../../../models/data/image/index.js";import"../../../../models/data/order/address/region/index.js";import"../../../../models/data/order/address/index.js";import"../../../../models/data/order/line-item/option/value/index.js";import"../../../../models/data/order/line-item/variant/value/index.js";import"../../../../models/data/order/line-item/variant/index.js";import"../../../../models/data/order/line-item/index.js";import"../../../../models/data/order/order-transaction-with-prices/index.js";import"../../../../models/data/order/package/index.js";import"../../../../models/data/order/transaction/index.js";import"../../../../models/data/order/index.js";import"../../../../models/data/payment-gateway/index.js";import"../../../../models/data/product/attribute-value/index.js";import"../../../../models/data/product/filter/index.js";import"../../../../models/data/product/campaign-offer/index.js";import"../../../../models/data/product/option-set/option/index.js";import"../../../../models/data/product/option-set/index.js";import"../../../../models/data/product/stock-location/index.js";import"../../../../models/data/product/variant/price/index.js";import"../../../../models/data/product/variant/index.js";import"../../../../models/data/variant-type/index.js";import"../../../../models/data/product/index.js";import"../../../../models/data/raffle/index.js";import"../../../../models/data/shipping-zone/state/city/district/region/index.js";import"../../../../models/data/state/index.js";import"../../../../models/data/storefront-popup/storefront-popup-display-settings/index.js";import"../../../../models/data/storefront-popup/storefront-popup-page-filter/index.js";import"../../../../models/data/storefront-popup/index.js";import"../../../../models/data/theme-json/index.js";import"../../../../models/data/theme-json/component/index.js";import"../../../../models/data/theme-json/custom-data/index.js";import"../../../../models/data/variant-type/variant-value/index.js";import"@ikas/localized-address";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{Validator as s}from"../../../../models/ui/validator/index.js";import{RequiredRule as a,MinRule as d}from"../../../../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";var m=function(){function m(m,n){var l=this;this.model={password:""},this._isLoading=!1,this._isRegisteredCustomer=!1,this._isVerificationEmailSent=!1,this._errorMessage=null,this.onPasswordChange=function(e){l.model.password=e,l._errorMessage=null},this.clearErrorMessage=function(){l._errorMessage=null},this.validateAll=function(){return l.validator.validateAll()},this.onSubmit=function(){return e(l,void 0,void 0,(function(){var e,o;return t(this,(function(t){switch(t.label){case 0:return[4,this.validateAll()];case 1:if(t.sent()||this._isLoading)return[3,6];this._isLoading=!0,this._errorMessage=null,t.label=2;case 2:return t.trys.push([2,4,5,6]),[4,this.vm.registerCustomer(this.password)];case 3:return(null==(e=t.sent())?void 0:e.isSuccess)?(this._isRegisteredCustomer=!0,[2]):(o=(null==e?void 0:e.errorCodes)||[]).includes(i.EMAIL_IS_NOT_VERIFIED)?(this._isVerificationEmailSent=!0,[2]):o.includes(i.CUSTOMER_EMAIL_ALREADY_EXISTS)?(this._errorMessage=this.t("checkout-page:quickRegistration.errorEmailAlreadyExists"),[2]):(this._errorMessage=this.t("checkout-page:quickRegistration.errorGeneric"),[3,6]);case 4:return t.sent(),this._errorMessage=this.t("checkout-page:quickRegistration.errorGeneric"),[3,6];case 5:return this._isLoading=!1,[7];case 6:return[2]}}))}))},o(this,{model:r}),this.vm=m,this.t=n,this.validator=new s(this.model,[new a({fieldKey:"password",valuePath:"password",message:n("checkout-page:passwordRequiredError")}),new d({fieldKey:"password",valuePath:"password",minValue:6,message:n("checkout-page:passwordMinError",{value:6})})])}return Object.defineProperty(m.prototype,"password",{get:function(){return this.model.password},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isLoading",{get:function(){return this._isLoading},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isRegisteredCustomer",{get:function(){return this._isRegisteredCustomer},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"isVerificationEmailSent",{get:function(){return this._isVerificationEmailSent},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"errorMessage",{get:function(){return this._errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"passwordErrorMessage",{get:function(){return this.validator.results.password.errorMessage},enumerable:!1,configurable:!0}),m}();export{m as QuickRegistrationViewModel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{observer as t}from"mobx-react-lite";import"@ikas/storefront-config";import{useTranslation as i}from"../../../../utils/i18n.js";import a from"../svg/success-circle.js";import c from"./style.module.scss.js";var m=t((function(t){var m,o=t.vm,r=i().t;return e.createElement("div",{className:c.Container},e.createElement("div",{className:c.TitleContainer},e.createElement(a,{className:c.Icon}),e.createElement("div",{className:c.CompletedTitle},r("checkout-page:quickRegistration.verificationSentTitle"))),e.createElement("div",{className:c.SubTitle},r("checkout-page:quickRegistration.verificationSentSubtitle")),!!(null===(m=o.checkout.customer)||void 0===m?void 0:m.email)&&e.createElement("div",{className:c.EmailContainer,style:{marginBottom:0}},e.createElement("div",{className:c.Label},r("checkout-page:quickRegistration.accountEmail"),":"),e.createElement("div",{className:c.Email},o.checkout.customer.email)))}));export{m as QuickRegistrationVerificationSent};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import CheckoutViewModel from "../../model";
|
|
3
|
+
import { SecureCardFrameMode } from "./protocol";
|
|
4
|
+
declare type Props = {
|
|
5
|
+
vm: CheckoutViewModel;
|
|
6
|
+
/** "cvv": only the CVC of the selected PayTR saved card. */
|
|
7
|
+
mode?: SecureCardFrameMode;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Card inputs rendered inside a cross-origin iframe. Scripts on the
|
|
11
|
+
* storefront page (theme, merchant scripts, tag managers) cannot read what
|
|
12
|
+
* is typed here; the checkout only receives validity, BIN and brand, and the
|
|
13
|
+
* frame sends the sale itself. In card mode the frame also runs the
|
|
14
|
+
* MasterPass SDK. Only one SecureCardForm is mounted at a time.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SecureCardForm: React.FC<Props>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";import{observer as r}from"mobx-react-lite";import{createTranslationInputData as t,useTranslation as a}from"../../../../utils/i18n.js";import{IkasStorefrontConfig as o}from"@ikas/storefront-config";import{SECURE_CARD_THEME_KEYS as n}from"./protocol.js";import c from"./style.module.scss.js";var l=["VISA","MASTER_CARD","AMERICAN_EXPRESS","TROY"],i=r((function(r){var n,i,u=r.vm,d=r.mode,f=void 0===d?"card":d,v=a().t,E=u.secureCard,p=e.useRef(null),h=e.useState((function(){return E.getFrameSrc(f)}))[0],k="cvv"===f,b=e.useMemo((function(){return{cardNumber:v("checkout-page:cardNumber"),cardNumberError:v("checkout-page:cardNumberError"),cardHolderName:v("checkout-page:cardHolderName"),cardHolderNameError:v("checkout-page:cardHolderError"),expirationDate:v("checkout-page:cardExpiry"),expirationDateError:v("checkout-page:cardExpiryError"),cvv:v("checkout-page:cardCVC"),cvvError:v("checkout-page:cardCVCError"),cvvTooltip:v(k?"checkout-page:savedCards.cvvTooltip":"checkout-page:cardCVCTooltip")}}),[v,k]),g=k?null===(n=u.selectedSavedCard)||void 0===n?void 0:n.cardAssociation:null===(i=u.installmentInfo)||void 0===i?void 0:i.cardAssociation,S=g&&l.includes(g)?g:null,N=e.useMemo((function(){var e,r,a=null===(r=null===(e=o.getTranslations()["checkout-page"])||void 0===e?void 0:e.masterPass)||void 0===r?void 0:r.creditCardForm;return t(null==a?void 0:a.checkboxLabel).map((function(e){return"{{ link }}"===e.value?{text:(null==a?void 0:a.checkboxLabelLink)||"MasterPass",isLink:!0}:{text:e.isVariable?"Masterpass":e.value,isLink:!1}}))}),[]),C=!k&&u.isPaymentGatewayHasMasterPass?u.masterPassSavePhoneNumber:null,y=e.useMemo((function(){return null!==C?{labelParts:N,phoneNumber:C}:null}),[N,C]);e.useEffect((function(){if(p.current){var e={theme:m(),labels:b,showErrors:u.isErrorsVisible,masterPassEnabled:!k&&u.hasMasterPassGateway,cardBrand:S,masterPass:y};return E.connect(p.current,e,f)}}),[]),e.useEffect((function(){E.update({masterPass:y})}),[y]),e.useEffect((function(){E.update({labels:b})}),[b]),e.useEffect((function(){E.update({showErrors:u.isErrorsVisible})}),[u.isErrorsVisible]),e.useEffect((function(){E.update({cardBrand:S})}),[S]);var P=E.isReady;return e.createElement("div",{className:c.SecureCardForm,"aria-busy":!P},e.createElement("iframe",{ref:p,src:h,title:v(k?"checkout-page:cardCVC":"checkout-page:cardNumber"),scrolling:"no",referrerPolicy:"no-referrer",className:[c.Frame,P?"":c.FrameHidden].join(" "),style:{height:E.height}}),e.createElement(s,{isHidden:P,mode:f}))})),s=function(r){var t=r.isHidden,a=r.mode;return e.createElement("div",{className:[c.Skeleton,t?c.SkeletonHidden:""].join(" "),"aria-hidden":"true"},"cvv"===a?e.createElement(d,null):e.createElement(u,null))},u=function(){return e.createElement(e.Fragment,null,e.createElement("div",{className:c.SkeletonRow},e.createElement(d,null)),e.createElement("div",{className:c.SkeletonRow},e.createElement(d,null)),e.createElement("div",{className:c.SkeletonGrid},e.createElement(d,null),e.createElement(d,null)))},d=function(){return e.createElement("div",{className:c.SkeletonInput},e.createElement("div",{className:c.SkeletonLabel}))};function m(){var e=getComputedStyle(document.documentElement),r=getComputedStyle(document.body),t={fontFamily:r.fontFamily,fontSize:r.fontSize};return n.forEach((function(r){var a=e.getPropertyValue(r).trim();a&&(t[r]=a)})),t}export{i as SecureCardForm};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MFS, MFS_CB_TYPE } from "../../modelMasterPass";
|
|
2
|
+
import SecureCardViewModel from "./model";
|
|
3
|
+
/** Response codes produced by the card frame itself rather than by MasterPass. */
|
|
4
|
+
export declare const SECURE_MASTERPASS_ERROR_PREFIX = "IKAS_SECURE_";
|
|
5
|
+
/**
|
|
6
|
+
* Drop-in replacement for `window.MFS` used by MasterPassModel when secure
|
|
7
|
+
* card fields are on. Every call is forwarded to the card iframe, where the
|
|
8
|
+
* real SDK runs, so the SDK's in-memory state (the OTP token) and the card
|
|
9
|
+
* data stay on the secure origin.
|
|
10
|
+
*/
|
|
11
|
+
export default class MasterPassBridgeViewModel implements MFS {
|
|
12
|
+
private secureCard;
|
|
13
|
+
private clientId;
|
|
14
|
+
private pending;
|
|
15
|
+
constructor(secureCard: SecureCardViewModel);
|
|
16
|
+
/** Clears the card and the "save card to MasterPass" consent in the frame. */
|
|
17
|
+
resetFrame: () => void;
|
|
18
|
+
setClientId: (clientId: string) => void;
|
|
19
|
+
/** The API address is fixed inside the frame. */
|
|
20
|
+
setAddress: (_address: string) => void;
|
|
21
|
+
/** The OTP token stays inside the frame; resendOtp uses it there. */
|
|
22
|
+
getLastToken: () => string;
|
|
23
|
+
checkMasterPass: (formData: FormData, cb: MFS_CB_TYPE) => void;
|
|
24
|
+
register: (formData: FormData, cb: MFS_CB_TYPE) => void;
|
|
25
|
+
linkCardToClient: (formData: FormData, cb: MFS_CB_TYPE) => void;
|
|
26
|
+
validateTransaction: (formData: FormData, cb: MFS_CB_TYPE) => void;
|
|
27
|
+
deleteCard: (formData: FormData, cb: MFS_CB_TYPE) => void;
|
|
28
|
+
listCards: (phoneNumber: string, token: string, cb: MFS_CB_TYPE) => void;
|
|
29
|
+
resendOtp: (_token: string, language: string, cb: MFS_CB_TYPE) => void;
|
|
30
|
+
private call;
|
|
31
|
+
private handleMessage;
|
|
32
|
+
private fail;
|
|
33
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from'./../../../../ext/tslib/tslib.es6.js';import e from"./model.js";var s=["rtaPan","expiryDate","cvc","cvv"],n="IKAS_SECURE_",a=function(){function n(e){var s=this;this.clientId="",this.pending=new Map,this.resetFrame=function(){s.secureCard.reset()},this.setClientId=function(t){s.clientId=t},this.setAddress=function(t){},this.getLastToken=function(){return""},this.checkMasterPass=function(t,e){return s.call("checkMasterPass",t,e)},this.register=function(t,e){return s.call("register",t,e)},this.linkCardToClient=function(t,e){return s.call("linkCardToClient",t,e)},this.validateTransaction=function(t,e){return s.call("validateTransaction",t,e)},this.deleteCard=function(t,e){return s.call("deleteCard",t,e)},this.listCards=function(t,e,n){return s.call("listCards",{msisdn:t,token:e},n)},this.resendOtp=function(t,e,n){return s.call("resendOtp",{sendSmsLanguage:e},n)},this.handleMessage=function(e){var n=s.pending.get(e.requestId);if(n)if(clearTimeout(n.timer),s.pending.delete(e.requestId),e.ok){var a=e.response;n.callback(e.status,t(t({},a),{transactionId:a.transactionId||"",accountStatus:a.accountStatus,url3D:a.url3D||"",cards:a.cards||[]}))}else s.fail(n.callback,e.errorCode)},this.secureCard=e,e.setMasterPassListener(this.handleMessage)}return n.prototype.call=function(t,n,a){var r=this,i={},c=function(t,e){"string"!=typeof t||s.includes(e)||(i[e]=t)};n instanceof FormData?n.forEach(c):Object.keys(n).forEach((function(t){return c(n[t],t)}));var l=e.createId(),o=setTimeout((function(){r.pending.delete(l),r.fail(a,"TIMEOUT")}),6e4);this.pending.set(l,{callback:a,timer:o}),this.secureCard.postMasterPassCall({type:"masterPassCall",requestId:l,method:t,clientId:this.clientId,params:i})||(clearTimeout(o),this.pending.delete(l),this.fail(a,"SDK_UNAVAILABLE"))},n.prototype.fail=function(t,e){t(0,{responseCode:"IKAS_SECURE_"+e,transactionId:"",accountStatus:void 0,url3D:"",cards:[]})},n}();export{n as SECURE_MASTERPASS_ERROR_PREFIX,a as default};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { MasterPassFrameMessage, MasterPassParentMessage, SecureCardBrand, SecureCardFieldsState, SecureCardFrameMode, SecureCardGraphQLError, SecureCardLabels, SecureCardMasterPassConfig, SecureCardSaleErrorCode, SecureCardSaleInput, SecureCardSaleResponse, SecureCardTheme } from "./protocol";
|
|
2
|
+
export declare type SecureCardSaleResult = {
|
|
3
|
+
ok: true;
|
|
4
|
+
data: SecureCardSaleResponse | null;
|
|
5
|
+
errors: SecureCardGraphQLError[];
|
|
6
|
+
} | {
|
|
7
|
+
ok: false;
|
|
8
|
+
errorCode: SecureCardSaleErrorCode;
|
|
9
|
+
};
|
|
10
|
+
declare type FrameConfig = {
|
|
11
|
+
theme: SecureCardTheme;
|
|
12
|
+
labels: SecureCardLabels;
|
|
13
|
+
showErrors: boolean;
|
|
14
|
+
masterPassEnabled: boolean;
|
|
15
|
+
cardBrand: SecureCardBrand | null;
|
|
16
|
+
masterPass: SecureCardMasterPassConfig | null;
|
|
17
|
+
};
|
|
18
|
+
declare type Callbacks = {
|
|
19
|
+
onBinChange: (bin: string | null) => void;
|
|
20
|
+
onMasterPassConsentChange: (checked: boolean) => void;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Parent-side counterpart of the secure card fields iframe. Holds only what
|
|
24
|
+
* the iframe is allowed to share (validity, BIN, brand, transaction result);
|
|
25
|
+
* raw card data never reaches this class.
|
|
26
|
+
*/
|
|
27
|
+
export default class SecureCardViewModel {
|
|
28
|
+
fields: SecureCardFieldsState | null;
|
|
29
|
+
isValid: boolean;
|
|
30
|
+
isReady: boolean;
|
|
31
|
+
bin: string | null;
|
|
32
|
+
brand: SecureCardBrand;
|
|
33
|
+
height: number;
|
|
34
|
+
/** Mode of the mounted frame; MasterPass only runs in the card form. */
|
|
35
|
+
mode: SecureCardFrameMode;
|
|
36
|
+
/** Shopper ticked "save card to MasterPass" inside the card frame. */
|
|
37
|
+
masterPassConsent: boolean;
|
|
38
|
+
channelId: string;
|
|
39
|
+
private frameWindow;
|
|
40
|
+
private config;
|
|
41
|
+
private pending;
|
|
42
|
+
private callbacks;
|
|
43
|
+
private readyListeners;
|
|
44
|
+
private masterPassListener;
|
|
45
|
+
constructor(callbacks: Callbacks);
|
|
46
|
+
/** Base URL of the secure card fields app, e.g. https://secure-card.ikas.com */
|
|
47
|
+
static get baseUrl(): string | undefined;
|
|
48
|
+
static get isEnabled(): boolean;
|
|
49
|
+
static createId(): string;
|
|
50
|
+
get frameOrigin(): string;
|
|
51
|
+
getFrameSrc(mode: SecureCardFrameMode): string;
|
|
52
|
+
/**
|
|
53
|
+
* Only one frame is mounted at a time: the card form, or the CVC of a
|
|
54
|
+
* PayTR saved card (`mode`).
|
|
55
|
+
*/
|
|
56
|
+
connect: (iframe: HTMLIFrameElement, config: FrameConfig, mode: SecureCardFrameMode) => () => void;
|
|
57
|
+
update: (partial: Partial<FrameConfig>) => void;
|
|
58
|
+
reset: () => void;
|
|
59
|
+
/** Called every time the frame (re)loads and is ready for messages. */
|
|
60
|
+
onReady: (listener: () => void) => void;
|
|
61
|
+
setMasterPassListener: (listener: (message: MasterPassFrameMessage) => void) => void;
|
|
62
|
+
/** Returns false when the frame is not ready to take the call. */
|
|
63
|
+
postMasterPassCall: (message: MasterPassParentMessage) => boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Sends the sale from the frame, which adds the card the shopper typed.
|
|
66
|
+
* Uses the same API headers and customer token as the page's own requests.
|
|
67
|
+
*/
|
|
68
|
+
submitSale: (input: SecureCardSaleInput) => Promise<SecureCardSaleResult>;
|
|
69
|
+
private post;
|
|
70
|
+
private setBin;
|
|
71
|
+
private onMessage;
|
|
72
|
+
}
|
|
73
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from'./../../../../ext/tslib/tslib.es6.js';import{makeAutoObservable as i}from"mobx";import'./../../../../ext/@ikas/fe-api-client/build/utils/api.js';import'./../../../../ext/axios/index.js';import t from'./../../../../ext/@ikas/fe-api-client/build/config/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{createEnvelope as n,SECURE_CARD_API_HEADER_NAMES as s,isEnvelope as r}from"./protocol.js";var a=function(){function a(n){var o=this;this.fields=null,this.isValid=!1,this.isReady=!1,this.bin=null,this.brand="UNKNOWN",this.height=216,this.mode="card",this.masterPassConsent=!1,this.channelId=a.createId(),this.frameWindow=null,this.config=null,this.pending=new Map,this.readyListeners=[],this.masterPassListener=null,this.connect=function(e,i,t){return o.frameWindow=e.contentWindow,o.config=i,o.mode=t,o.fields=null,o.isValid=!1,o.height="cvv"===t?60:216,window.addEventListener("message",o.onMessage),function(){window.removeEventListener("message",o.onMessage),o.frameWindow=null,o.isReady=!1,o.pending.forEach((function(e){clearTimeout(e.timer),e.resolve({ok:!1,errorCode:"TIMEOUT"})})),o.pending.clear()}},this.update=function(i){o.config&&(o.config=e(e({},o.config),i),o.isReady&&o.post(e({type:"update"},i)))},this.reset=function(){o.fields=null,o.isValid=!1,o.setBin(null),o.brand="UNKNOWN",o.isReady&&o.post({type:"reset"})},this.onReady=function(e){o.readyListeners.push(e)},this.setMasterPassListener=function(e){o.masterPassListener=e},this.postMasterPassCall=function(e){return!!o.isReady&&(o.post(e),!0)},this.submitSale=function(e){if(!o.isReady)return Promise.resolve({ok:!1,errorCode:"NETWORK_ERROR"});var i={};s.forEach((function(e){var n,s=null===(n=t.HEADERS)||void 0===n?void 0:n[e];"string"==typeof s&&s&&(i[e]=s)}));var n={input:JSON.parse(JSON.stringify(e)),headers:i,token:t.TOKEN||null},r=a.createId();return new Promise((function(e){var i=setTimeout((function(){o.pending.delete(r),e({ok:!1,errorCode:"TIMEOUT"})}),12e4);o.pending.set(r,{resolve:e,timer:i}),o.post({type:"submitSale",requestId:r,request:n})}))},this.onMessage=function(i){var t;if(i.origin===o.frameOrigin&&o.frameWindow&&i.source===o.frameWindow&&r(i.data,o.channelId)){var n=i.data.payload;switch(n.type){case"ready":o.isReady=!0,o.config&&o.post(e({type:"init"},o.config)),o.readyListeners.forEach((function(e){return e()}));break;case"change":o.fields=n.fields,o.isValid=!!n.isValid,o.brand=n.brand,o.setBin("string"==typeof n.bin&&/^\d{8}$/.test(n.bin)?n.bin:null);break;case"masterPassConsent":o.masterPassConsent=!!n.checked,o.callbacks.onMasterPassConsentChange(o.masterPassConsent);break;case"resize":"number"==typeof n.height&&n.height>0&&(o.height=Math.min(Math.ceil(n.height),1e3));break;case"saleResult":var s=o.pending.get(n.requestId);if(!s)return;clearTimeout(s.timer),o.pending.delete(n.requestId),s.resolve(n.ok?{ok:!0,data:n.data,errors:Array.isArray(n.errors)?n.errors:[]}:{ok:!1,errorCode:n.errorCode});break;case"masterPassResult":null===(t=o.masterPassListener)||void 0===t||t.call(o,n)}}},this.callbacks=n,i(this,{frameWindow:!1,config:!1,pending:!1,callbacks:!1,readyListeners:!1,masterPassListener:!1})}return Object.defineProperty(a,"baseUrl",{get:function(){return process.env.NEXT_PUBLIC_SECURE_CARD_FIELDS_URL||void 0},enumerable:!1,configurable:!0}),Object.defineProperty(a,"isEnabled",{get:function(){return!!a.baseUrl},enumerable:!1,configurable:!0}),a.createId=function(){var e=new Uint8Array(16);return globalThis.crypto.getRandomValues(e),Array.from(e,(function(e){return e.toString(16).padStart(2,"0")})).join("")},Object.defineProperty(a.prototype,"frameOrigin",{get:function(){return new URL(a.baseUrl).origin},enumerable:!1,configurable:!0}),a.prototype.getFrameSrc=function(e){var i=new URL("frame",function(e){return e.endsWith("/")?e:e+"/"}(a.baseUrl));return i.searchParams.set("parentOrigin",window.location.origin),i.searchParams.set("channel",this.channelId),"card"!==e&&i.searchParams.set("mode",e),i.toString()},a.prototype.post=function(e){var i;null===(i=this.frameWindow)||void 0===i||i.postMessage(n(this.channelId,e),this.frameOrigin)},a.prototype.setBin=function(e){e!==this.bin&&(this.bin=e,this.callbacks.onBinChange(e))},a}();export{a as default};
|