@zonos/elements 1.3.266 → 1.3.268
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/dist/cjs/{cart-efc42379.js → cart-af7c024e.js} +129 -4
- package/dist/cjs/{debounce-606d1801.js → debounce-7990f5ea.js} +1 -1
- package/dist/cjs/{getBorderRadius-a91911e7.js → getBorderRadius-fc683d94.js} +1 -1
- package/dist/cjs/{getContrastColor-ce80dbe7.js → getContrastColor-d5134ef3.js} +2 -2
- package/dist/cjs/{hasInclusivePrice-400be1b2.js → hasInclusivePrice-0fa6e022.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-9e4d479f.js → invoice-c2e3f232.js} +3 -3
- package/dist/cjs/{isCollectMobileTablet-630fcf87.js → isCollectMobileTablet-6014787b.js} +3 -3
- package/dist/cjs/{isContrastColor-a02c4889.js → isContrastColor-76592c92.js} +1 -1
- package/dist/cjs/{isDarkColor-e317bb06.js → isDarkColor-5d6ca405.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-4b17c530.js → localization-f897bc45.js} +472 -1
- package/dist/cjs/{paypal-3bb55914.js → paypal-6756a0da.js} +60 -18
- package/dist/cjs/{placeTestOrder-313cbd78.js → placeTestOrder-a4874e51.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-e0436f1c.js → renderCheckoutCurrency-584d50fe.js} +2 -2
- package/dist/cjs/{submitGtag-07a3b09e.js → submitGtag-4906b161.js} +1 -1
- package/dist/cjs/{throttle-8aebac7d.js → throttle-02c2e917.js} +2 -2
- package/dist/cjs/{updateCheckoutSessionAttributes-a9a97194.js → updateCheckoutSessionAttributes-47d73942.js} +1 -1
- package/dist/cjs/zonos-address-display_8.cjs.entry.js +7 -7
- package/dist/cjs/zonos-address_4.cjs.entry.js +7 -7
- package/dist/cjs/zonos-badge.cjs.entry.js +1 -1
- package/dist/cjs/zonos-banner.cjs.entry.js +1 -1
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +8 -8
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +94 -27
- package/dist/cjs/zonos-checkbox_2.cjs.entry.js +3 -3
- package/dist/cjs/zonos-checkout.cjs.entry.js +112 -85
- package/dist/cjs/zonos-collapse.cjs.entry.js +1 -1
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +11 -11
- package/dist/cjs/zonos-collect.cjs.entry.js +9 -9
- package/dist/cjs/zonos-controller.cjs.entry.js +126 -7
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +3 -3
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +3 -3
- package/dist/cjs/zonos-hello.cjs.entry.js +3 -3
- package/dist/cjs/zonos-input.cjs.entry.js +2 -2
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +7 -7
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +11 -11
- package/dist/cjs/zonos-invoice.cjs.entry.js +9 -9
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-logo.cjs.entry.js +1 -1
- package/dist/cjs/{zonos-store-credit.cjs.entry.js → zonos-policy-consent_2.cjs.entry.js} +91 -6
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +5 -5
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +1 -1
- package/dist/cjs/zonos-v-stack.cjs.entry.js +1 -1
- package/dist/cjs/{zonosStore-0662b95f.js → zonosStore-45a87908.js} +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +7 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +66 -12
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +103 -75
- package/dist/collection/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.css +93 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.js +93 -0
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +1 -1
- package/dist/collection/components/main/zonos-controller.js +6 -2
- package/dist/collection/components/store/checkout/paypal.js +57 -14
- package/dist/collection/components/store/checkout/policyConsent.js +58 -0
- package/dist/collection/components/store/checkout/stripe.js +66 -0
- package/dist/collection/components/store/hello/localization.js +6 -0
- package/dist/collection/components/store/translationStore/strings.arabic.js +21 -0
- package/dist/collection/components/store/translationStore/strings.base.js +21 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +21 -0
- package/dist/collection/components/store/translationStore/strings.french.js +21 -0
- package/dist/collection/components/store/translationStore/strings.german.js +21 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +21 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +21 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +21 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +21 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +21 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +21 -0
- package/dist/collection/components/store/zonosStore.js +1 -0
- package/dist/collection/components/utils/checkout/injectDomesticElementHideStyle.js +116 -0
- package/dist/collection/types/generated/graphql.internal.types.js +351 -73
- package/dist/collection/utils/toggleBigcommerceNativeCurrencySelector.js +48 -0
- package/dist/esm/{cart-62c166fc.js → cart-68c16805.js} +125 -5
- package/dist/esm/{debounce-ab526ca0.js → debounce-58e4ff3e.js} +1 -1
- package/dist/esm/{getBorderRadius-98c64be8.js → getBorderRadius-d23f47a6.js} +1 -1
- package/dist/esm/{getContrastColor-0aa643c1.js → getContrastColor-f0bd5b65.js} +2 -2
- package/dist/esm/{hasInclusivePrice-a73f64b7.js → hasInclusivePrice-f1ca1610.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-fa4ff6fb.js → invoice-d0eadc6a.js} +3 -3
- package/dist/esm/{isCollectMobileTablet-5f50ec81.js → isCollectMobileTablet-11ade63f.js} +3 -3
- package/dist/esm/{isContrastColor-6bad285e.js → isContrastColor-fbddacb6.js} +1 -1
- package/dist/esm/{isDarkColor-0a8453e7.js → isDarkColor-566f04c5.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-d2631105.js → localization-8e81b696.js} +472 -1
- package/dist/esm/{paypal-424d040d.js → paypal-e32877e9.js} +60 -18
- package/dist/esm/{placeTestOrder-cf237d95.js → placeTestOrder-4cf429d7.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-513ead96.js → renderCheckoutCurrency-9459b8a3.js} +2 -2
- package/dist/esm/{submitGtag-ae9d5d91.js → submitGtag-c7ea1f2a.js} +1 -1
- package/dist/esm/{throttle-882b1f47.js → throttle-f09d0659.js} +2 -2
- package/dist/esm/{updateCheckoutSessionAttributes-da7fdd37.js → updateCheckoutSessionAttributes-40e301a4.js} +1 -1
- package/dist/esm/zonos-address-display_8.entry.js +7 -7
- package/dist/esm/zonos-address_4.entry.js +7 -7
- package/dist/esm/zonos-badge.entry.js +1 -1
- package/dist/esm/zonos-banner.entry.js +1 -1
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +8 -8
- package/dist/esm/zonos-cart-items_12.entry.js +94 -27
- package/dist/esm/zonos-checkbox_2.entry.js +3 -3
- package/dist/esm/zonos-checkout.entry.js +112 -85
- package/dist/esm/zonos-collapse.entry.js +1 -1
- package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -5
- package/dist/esm/zonos-collect-finish_6.entry.js +11 -11
- package/dist/esm/zonos-collect.entry.js +9 -9
- package/dist/esm/zonos-controller.entry.js +126 -7
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +3 -3
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +3 -3
- package/dist/esm/zonos-hello.entry.js +3 -3
- package/dist/esm/zonos-input.entry.js +2 -2
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +7 -7
- package/dist/esm/zonos-invoice-finish_5.entry.js +11 -11
- package/dist/esm/zonos-invoice.entry.js +9 -9
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm/zonos-logo.entry.js +1 -1
- package/dist/esm/{zonos-store-credit.entry.js → zonos-policy-consent_2.entry.js} +91 -7
- package/dist/esm/zonos-shipping-rich-radio.entry.js +5 -5
- package/dist/esm/zonos-stripe-input.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +1 -1
- package/dist/esm/zonos-v-stack.entry.js +1 -1
- package/dist/esm/{zonosStore-9662b071.js → zonosStore-8e19daff.js} +1 -0
- package/dist/esm-es5/cart-68c16805.js +1 -0
- package/dist/esm-es5/{debounce-ab526ca0.js → debounce-58e4ff3e.js} +1 -1
- package/dist/esm-es5/{getBorderRadius-98c64be8.js → getBorderRadius-d23f47a6.js} +1 -1
- package/dist/esm-es5/{getContrastColor-0aa643c1.js → getContrastColor-f0bd5b65.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-a73f64b7.js → hasInclusivePrice-f1ca1610.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-fa4ff6fb.js → invoice-d0eadc6a.js} +1 -1
- package/dist/esm-es5/{isCollectMobileTablet-5f50ec81.js → isCollectMobileTablet-11ade63f.js} +1 -1
- package/dist/esm-es5/{isContrastColor-6bad285e.js → isContrastColor-fbddacb6.js} +1 -1
- package/dist/esm-es5/{isDarkColor-0a8453e7.js → isDarkColor-566f04c5.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-8e81b696.js +1 -0
- package/dist/esm-es5/{paypal-424d040d.js → paypal-e32877e9.js} +2 -2
- package/dist/esm-es5/{placeTestOrder-cf237d95.js → placeTestOrder-4cf429d7.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-513ead96.js → renderCheckoutCurrency-9459b8a3.js} +1 -1
- package/dist/esm-es5/{submitGtag-ae9d5d91.js → submitGtag-c7ea1f2a.js} +1 -1
- package/dist/esm-es5/throttle-f09d0659.js +1 -0
- package/dist/esm-es5/{updateCheckoutSessionAttributes-da7fdd37.js → updateCheckoutSessionAttributes-40e301a4.js} +1 -1
- package/dist/esm-es5/zonos-address-display_8.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkbox_2.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.entry.js +1 -1
- package/dist/esm-es5/zonos-collapse.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-input.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_2.entry.js +1 -0
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-9662b071.js → zonosStore-8e19daff.js} +1 -1
- package/dist/scripts/index.d.ts +105 -11
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-policy-consent/zonos-policy-consent.d.ts +3 -0
- package/dist/types/components/store/checkout/policyConsent.d.ts +41 -0
- package/dist/types/components/store/checkout/stripe.d.ts +13 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +21 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +21 -0
- package/dist/types/components/utils/checkout/injectDomesticElementHideStyle.d.ts +18 -0
- package/dist/types/components.d.ts +13 -0
- package/dist/types/scripts/cart/_setupCartDataWithSettings.d.ts +29 -11
- package/dist/types/types/checkout/CheckoutConfig.d.ts +32 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +501 -119
- package/dist/types/types/generated/graphql.internal.types.ts +561 -154
- package/dist/types/types/utils/ZonosSettings.d.ts +9 -0
- package/dist/types/utils/toggleBigcommerceNativeCurrencySelector.d.ts +17 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-7b640194.entry.js → p-000b895a.entry.js} +1 -1
- package/dist/zonos-elements/p-01913da8.js +1 -0
- package/dist/zonos-elements/{p-bbbbae9a.system.entry.js → p-06e7fe2a.system.entry.js} +1 -1
- package/dist/zonos-elements/p-0803ad10.js +1 -0
- package/dist/zonos-elements/{p-79e5a629.system.entry.js → p-0e36a7cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8cd0a098.system.entry.js → p-108b5307.system.entry.js} +1 -1
- package/dist/zonos-elements/p-11439d12.entry.js +1 -0
- package/dist/zonos-elements/{p-b6df4cc2.system.entry.js → p-134c5010.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ea88f7f5.system.entry.js → p-1376e67f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-14d6542f.system.js +1 -0
- package/dist/zonos-elements/p-17be8409.entry.js +1 -0
- package/dist/zonos-elements/{p-a75baf3e.js → p-17e3cd62.js} +1 -1
- package/dist/zonos-elements/{p-0207c91e.system.js → p-18af6aaa.system.js} +1 -1
- package/dist/zonos-elements/p-1eef8c23.system.js +1 -0
- package/dist/zonos-elements/p-24091606.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6b6cfc59.system.entry.js → p-26ae4ee7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-71fb6126.entry.js → p-2afecda7.entry.js} +1 -1
- package/dist/zonos-elements/p-2ccd20c0.system.js +1 -0
- package/dist/zonos-elements/{p-d28be518.js → p-33d4be28.js} +1 -1
- package/dist/zonos-elements/{p-26c85188.entry.js → p-344a1fee.entry.js} +1 -1
- package/dist/zonos-elements/{p-f1bbad73.entry.js → p-38311c16.entry.js} +1 -1
- package/dist/zonos-elements/p-3b28fc76.js +1 -0
- package/dist/zonos-elements/{p-db3b101a.js → p-3dc3596b.js} +1 -1
- package/dist/zonos-elements/{p-3689821f.system.js → p-3e7ee89d.system.js} +1 -1
- package/dist/zonos-elements/{p-2b30beea.system.js → p-44b279cc.system.js} +1 -1
- package/dist/zonos-elements/{p-4d433020.system.entry.js → p-48805ed6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab0b23f2.js → p-4df08fc4.js} +1 -1
- package/dist/zonos-elements/p-4fe3d5e0.system.js +18 -0
- package/dist/zonos-elements/{p-227ef22f.entry.js → p-50362897.entry.js} +1 -1
- package/dist/zonos-elements/p-52bd7be3.system.js +1 -0
- package/dist/zonos-elements/{p-deaf0e38.system.entry.js → p-536cbab5.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-305e2dd8.system.js → p-53a59935.system.js} +1 -1
- package/dist/zonos-elements/{p-27513bfe.system.entry.js → p-593764cf.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-01384124.system.js → p-5b05b461.system.js} +1 -1
- package/dist/zonos-elements/{p-a49ba3ae.system.entry.js → p-5b4e5608.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1bf9a1b9.system.js → p-5d65be06.system.js} +1 -1
- package/dist/zonos-elements/{p-bce7bfcc.system.entry.js → p-5e18d92b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1957af5a.system.entry.js → p-5f92db80.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5fa2395d.system.js +1 -0
- package/dist/zonos-elements/{p-2431f95c.entry.js → p-620a9013.entry.js} +1 -1
- package/dist/zonos-elements/p-623fc89a.system.entry.js +1 -0
- package/dist/zonos-elements/p-64e8f05d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-2a6be4a5.entry.js → p-658ab5e2.entry.js} +1 -1
- package/dist/zonos-elements/{p-bb77b580.entry.js → p-673407b8.entry.js} +1 -1
- package/dist/zonos-elements/{p-6ab742d9.system.entry.js → p-69089a6f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f76d5249.entry.js → p-6f41c193.entry.js} +1 -1
- package/dist/zonos-elements/{p-f3cfd8fa.js → p-701d9a7c.js} +1 -1
- package/dist/zonos-elements/{p-02d812c8.entry.js → p-7166df08.entry.js} +1 -1
- package/dist/zonos-elements/p-72960738.js +1 -0
- package/dist/zonos-elements/p-72c3756a.js +1 -0
- package/dist/zonos-elements/{p-5ae695a3.entry.js → p-7628569a.entry.js} +1 -1
- package/dist/zonos-elements/p-774de1ec.system.js +1 -0
- package/dist/zonos-elements/{p-27061873.entry.js → p-777d396e.entry.js} +1 -1
- package/dist/zonos-elements/{p-ce44c942.system.js → p-7a220941.system.js} +1 -1
- package/dist/zonos-elements/{p-46071125.entry.js → p-7aca66cd.entry.js} +1 -1
- package/dist/zonos-elements/p-7cf8e1f0.js +1 -0
- package/dist/zonos-elements/{p-eb99a625.system.js → p-7d9d2407.system.js} +1 -1
- package/dist/zonos-elements/{p-889e5db0.entry.js → p-7fef8558.entry.js} +1 -1
- package/dist/zonos-elements/{p-7003d093.system.entry.js → p-80df7e0b.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8116d3ba.entry.js +1 -0
- package/dist/zonos-elements/{p-648f3ada.entry.js → p-889a44fc.entry.js} +1 -1
- package/dist/zonos-elements/{p-4c89d04a.js → p-896fb969.js} +1 -1
- package/dist/zonos-elements/{p-0ea16658.system.entry.js → p-8ddc21f1.system.entry.js} +1 -1
- package/dist/zonos-elements/p-90d22087.system.js +1 -0
- package/dist/zonos-elements/{p-7c101a92.system.entry.js → p-95b460e9.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-08934304.system.entry.js → p-95f3bbad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7677c45a.entry.js → p-97da66f2.entry.js} +1 -1
- package/dist/zonos-elements/{p-55fb4ea3.system.entry.js → p-98bea13e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ba9e2612.system.entry.js → p-990d1495.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9f5fb332.js +1 -0
- package/dist/zonos-elements/{p-6b682a6b.system.entry.js → p-a0ee01dd.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ac8cfdc0.js +1 -0
- package/dist/zonos-elements/{p-7b74e5f2.system.entry.js → p-af12a1b7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-b4b23475.entry.js → p-b35a0b1e.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf5c3dd7.system.entry.js → p-b59fc3fa.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b71ef46e.js +17 -0
- package/dist/zonos-elements/{p-d63e18a8.entry.js → p-b93b66c2.entry.js} +1 -1
- package/dist/zonos-elements/p-b9a615bc.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6a195559.system.js → p-bc919de1.system.js} +1 -1
- package/dist/zonos-elements/{p-72efa5b7.system.entry.js → p-bc9a30a1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-665bfd4f.entry.js → p-c1463da7.entry.js} +1 -1
- package/dist/zonos-elements/{p-03e95598.entry.js → p-c3459f4a.entry.js} +1 -1
- package/dist/zonos-elements/{p-781cc8de.system.entry.js → p-c7ca3e98.system.entry.js} +1 -1
- package/dist/zonos-elements/p-c91fade3.entry.js +1 -0
- package/dist/zonos-elements/{p-79f3c227.system.entry.js → p-c92a5ae5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cd34ecf2.js +1 -0
- package/dist/zonos-elements/{p-28e2ac3b.entry.js → p-dae881f2.entry.js} +1 -1
- package/dist/zonos-elements/{p-9b660cd3.js → p-dcafbd4e.js} +1 -1
- package/dist/zonos-elements/{p-8571f3ce.entry.js → p-df55536b.entry.js} +1 -1
- package/dist/zonos-elements/{p-acf42bc1.entry.js → p-e3d6f9b4.entry.js} +1 -1
- package/dist/zonos-elements/{p-928291e5.entry.js → p-e548b8ec.entry.js} +1 -1
- package/dist/zonos-elements/{p-5e6f85f0.system.js → p-f053975e.system.js} +1 -1
- package/dist/zonos-elements/{p-72187e00.entry.js → p-fc5007e0.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.css +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/cart-62c166fc.js +0 -1
- package/dist/esm-es5/localization-d2631105.js +0 -1
- package/dist/esm-es5/throttle-882b1f47.js +0 -1
- package/dist/esm-es5/zonos-store-credit.entry.js +0 -1
- package/dist/zonos-elements/p-06c4d422.system.js +0 -1
- package/dist/zonos-elements/p-0efd2d5a.js +0 -1
- package/dist/zonos-elements/p-1a470353.entry.js +0 -1
- package/dist/zonos-elements/p-1d6f3ab9.js +0 -1
- package/dist/zonos-elements/p-209d7728.system.entry.js +0 -1
- package/dist/zonos-elements/p-27eeaf56.system.js +0 -1
- package/dist/zonos-elements/p-367a72bc.js +0 -1
- package/dist/zonos-elements/p-37207963.system.js +0 -1
- package/dist/zonos-elements/p-40284821.system.js +0 -1
- package/dist/zonos-elements/p-40a45837.system.entry.js +0 -1
- package/dist/zonos-elements/p-4495f149.system.entry.js +0 -1
- package/dist/zonos-elements/p-456a600b.entry.js +0 -1
- package/dist/zonos-elements/p-4980facb.js +0 -1
- package/dist/zonos-elements/p-5e10d4ff.system.entry.js +0 -1
- package/dist/zonos-elements/p-61d73d69.js +0 -1
- package/dist/zonos-elements/p-6d81901a.js +0 -1
- package/dist/zonos-elements/p-8ccd6d3f.js +0 -1
- package/dist/zonos-elements/p-9aaa1d80.entry.js +0 -1
- package/dist/zonos-elements/p-a371f770.system.js +0 -1
- package/dist/zonos-elements/p-a9425900.system.js +0 -18
- package/dist/zonos-elements/p-b2d276e1.js +0 -1
- package/dist/zonos-elements/p-c7047a1c.js +0 -1
- package/dist/zonos-elements/p-cd88efdb.js +0 -17
- package/dist/zonos-elements/p-daeb57cb.entry.js +0 -1
- package/dist/zonos-elements/p-e3292be8.system.js +0 -1
- package/dist/zonos-elements/p-e5dfccd8.system.js +0 -1
|
@@ -281,6 +281,12 @@ export const stringsSpanish = {
|
|
|
281
281
|
'Hide non-prepaid options': {
|
|
282
282
|
value: 'Ocultar opciones no prepagadas',
|
|
283
283
|
},
|
|
284
|
+
"I agree to [merchantName]'s [policies]": {
|
|
285
|
+
value: 'Acepto los [policies] de [merchantName]',
|
|
286
|
+
},
|
|
287
|
+
'I agree to the [policies]': {
|
|
288
|
+
value: 'Acepto [policies]',
|
|
289
|
+
},
|
|
284
290
|
"If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request.": {
|
|
285
291
|
value: 'Si seleccionas FedEx Ground como tu opción de envío, necesitarás completar un Acuerdo de Agencia General (GAA) después de realizar tu pedido. Este formulario permite a FedEx despachar tu paquete a través de la aduana canadiense en tu nombre. FedEx se pondrá en contacto contigo directamente, generalmente por correo electrónico o teléfono, con instrucciones sobre cómo completar el GAA. Para evitar retrasos o la devolución de tu paquete, responde rápidamente a su solicitud.',
|
|
286
292
|
},
|
|
@@ -497,6 +503,9 @@ export const stringsSpanish = {
|
|
|
497
503
|
'RFC number': {
|
|
498
504
|
value: 'Número RFC',
|
|
499
505
|
},
|
|
506
|
+
'Refund policy': {
|
|
507
|
+
value: 'Política de reembolso',
|
|
508
|
+
},
|
|
500
509
|
Region: {
|
|
501
510
|
value: 'Región',
|
|
502
511
|
},
|
|
@@ -551,6 +560,9 @@ export const stringsSpanish = {
|
|
|
551
560
|
'Shipping method': {
|
|
552
561
|
value: 'Método de envío',
|
|
553
562
|
},
|
|
563
|
+
'Shipping policy': {
|
|
564
|
+
value: 'Política de envío',
|
|
565
|
+
},
|
|
554
566
|
'Shopping cart expired': {
|
|
555
567
|
value: 'Carrito de compras caducado',
|
|
556
568
|
},
|
|
@@ -638,6 +650,9 @@ export const stringsSpanish = {
|
|
|
638
650
|
'Taxes, duties, and fees included': {
|
|
639
651
|
value: 'Impuestos, aranceles y tarifas incluidos',
|
|
640
652
|
},
|
|
653
|
+
'Terms and conditions': {
|
|
654
|
+
value: 'Términos y condiciones',
|
|
655
|
+
},
|
|
641
656
|
'Test cards': {
|
|
642
657
|
value: 'Tarjetas de prueba',
|
|
643
658
|
},
|
|
@@ -725,6 +740,9 @@ export const stringsSpanish = {
|
|
|
725
740
|
Village: {
|
|
726
741
|
value: 'Pueblo',
|
|
727
742
|
},
|
|
743
|
+
'Warranty policy': {
|
|
744
|
+
value: 'Política de garantía',
|
|
745
|
+
},
|
|
728
746
|
"We couldn't complete your payment. Please verify the payment details and try again.": {
|
|
729
747
|
value: 'No pudimos completar su pago. Por favor verifique los datos de pago y vuelva a intentarlo.',
|
|
730
748
|
},
|
|
@@ -755,6 +773,9 @@ export const stringsSpanish = {
|
|
|
755
773
|
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
756
774
|
value: 'Puede incurrir en tarifas adicionales del transportista si no paga por adelantado.',
|
|
757
775
|
},
|
|
776
|
+
'You must accept the policies to place this order': {
|
|
777
|
+
value: 'Debe aceptar las políticas para realizar este pedido',
|
|
778
|
+
},
|
|
758
779
|
"You will be redirected back to the merchant's site in a few seconds.": {
|
|
759
780
|
value: 'Serás redirigido de nuevo al sitio del comerciante en unos segundos.',
|
|
760
781
|
},
|
|
@@ -281,6 +281,12 @@ export const stringsSwedish = {
|
|
|
281
281
|
'Hide non-prepaid options': {
|
|
282
282
|
value: 'Dölj icke-förbetalda alternativ',
|
|
283
283
|
},
|
|
284
|
+
"I agree to [merchantName]'s [policies]": {
|
|
285
|
+
value: 'Jag godkänner [merchantName]s [policies]',
|
|
286
|
+
},
|
|
287
|
+
'I agree to the [policies]': {
|
|
288
|
+
value: 'Jag godkänner [policies]',
|
|
289
|
+
},
|
|
284
290
|
"If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request.": {
|
|
285
291
|
value: 'Om du väljer FedEx Ground som ditt fraktalternativ måste du fylla i ett General Agency Agreement (GAA) efter att du har lagt din beställning. Detta formulär tillåter FedEx att tullklarera ditt paket genom kanadensisk tull å dina vägnar. FedEx kommer att kontakta dig direkt – vanligtvis via e-post eller telefon – med instruktioner om hur du slutför GAA. För att undvika förseningar eller retur av ditt paket, vänligen svara snabbt på deras begäran.',
|
|
286
292
|
},
|
|
@@ -497,6 +503,9 @@ export const stringsSwedish = {
|
|
|
497
503
|
'RFC number': {
|
|
498
504
|
value: 'RFC-nummer',
|
|
499
505
|
},
|
|
506
|
+
'Refund policy': {
|
|
507
|
+
value: 'Återbetalningspolicy',
|
|
508
|
+
},
|
|
500
509
|
Region: {
|
|
501
510
|
value: 'Region',
|
|
502
511
|
},
|
|
@@ -551,6 +560,9 @@ export const stringsSwedish = {
|
|
|
551
560
|
'Shipping method': {
|
|
552
561
|
value: 'Fraktmetod',
|
|
553
562
|
},
|
|
563
|
+
'Shipping policy': {
|
|
564
|
+
value: 'Leveranspolicy',
|
|
565
|
+
},
|
|
554
566
|
'Shopping cart expired': {
|
|
555
567
|
value: 'Kundvagn har gått ut',
|
|
556
568
|
},
|
|
@@ -638,6 +650,9 @@ export const stringsSwedish = {
|
|
|
638
650
|
'Taxes, duties, and fees included': {
|
|
639
651
|
value: 'Skatter, tullar och avgifter ingår',
|
|
640
652
|
},
|
|
653
|
+
'Terms and conditions': {
|
|
654
|
+
value: 'Villkor',
|
|
655
|
+
},
|
|
641
656
|
'Test cards': {
|
|
642
657
|
value: 'Testkort',
|
|
643
658
|
},
|
|
@@ -725,6 +740,9 @@ export const stringsSwedish = {
|
|
|
725
740
|
Village: {
|
|
726
741
|
value: 'By',
|
|
727
742
|
},
|
|
743
|
+
'Warranty policy': {
|
|
744
|
+
value: 'Garantipolicy',
|
|
745
|
+
},
|
|
728
746
|
"We couldn't complete your payment. Please verify the payment details and try again.": {
|
|
729
747
|
value: 'Vi kunde inte slutföra din betalning. Vänligen verifiera betalningsuppgifterna och försök igen.',
|
|
730
748
|
},
|
|
@@ -755,6 +773,9 @@ export const stringsSwedish = {
|
|
|
755
773
|
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
756
774
|
value: 'Du kan få extra avgifter från fraktbolaget om du inte förbetalar.',
|
|
757
775
|
},
|
|
776
|
+
'You must accept the policies to place this order': {
|
|
777
|
+
value: 'Du måste acceptera policyerna för att lägga denna beställning',
|
|
778
|
+
},
|
|
758
779
|
"You will be redirected back to the merchant's site in a few seconds.": {
|
|
759
780
|
value: 'Du kommer att omdirigeras tillbaka till handlarens webbplats om några sekunder.',
|
|
760
781
|
},
|
|
@@ -281,6 +281,12 @@ export const stringsTurkish = {
|
|
|
281
281
|
'Hide non-prepaid options': {
|
|
282
282
|
value: 'Ön ödemesiz seçenekleri gizle',
|
|
283
283
|
},
|
|
284
|
+
"I agree to [merchantName]'s [policies]": {
|
|
285
|
+
value: '[merchantName] [policies] kabul ediyorum',
|
|
286
|
+
},
|
|
287
|
+
'I agree to the [policies]': {
|
|
288
|
+
value: '[policies] kabul ediyorum',
|
|
289
|
+
},
|
|
284
290
|
"If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request.": {
|
|
285
291
|
value: "FedEx Ground'u nakliye seçeneğiniz olarak seçerseniz, siparişinizi verdikten sonra bir Genel Ajans Anlaşması (GAA) tamamlamanız gerekecektir. Bu form, FedEx'in adınıza Kanada gümrüğünden paketinizi geçirmesine olanak tanır. FedEx, GAA'yı nasıl tamamlayacağınız konusunda talimatlarla genellikle e-posta veya telefon yoluyla doğrudan sizinle iletişime geçecektir. Gecikmeleri veya paketinizin iadesini önlemek için taleplerine hızlıca yanıt verin.",
|
|
286
292
|
},
|
|
@@ -497,6 +503,9 @@ export const stringsTurkish = {
|
|
|
497
503
|
'RFC number': {
|
|
498
504
|
value: 'RFC numarası',
|
|
499
505
|
},
|
|
506
|
+
'Refund policy': {
|
|
507
|
+
value: 'İade politikası',
|
|
508
|
+
},
|
|
500
509
|
Region: {
|
|
501
510
|
value: 'Bölge',
|
|
502
511
|
},
|
|
@@ -551,6 +560,9 @@ export const stringsTurkish = {
|
|
|
551
560
|
'Shipping method': {
|
|
552
561
|
value: 'Kargo yöntemi',
|
|
553
562
|
},
|
|
563
|
+
'Shipping policy': {
|
|
564
|
+
value: 'Kargo politikası',
|
|
565
|
+
},
|
|
554
566
|
'Shopping cart expired': {
|
|
555
567
|
value: 'Alışveriş sepeti süresi doldu',
|
|
556
568
|
},
|
|
@@ -638,6 +650,9 @@ export const stringsTurkish = {
|
|
|
638
650
|
'Taxes, duties, and fees included': {
|
|
639
651
|
value: 'Vergiler, harçlar ve ücretler dahildir',
|
|
640
652
|
},
|
|
653
|
+
'Terms and conditions': {
|
|
654
|
+
value: 'Şartlar ve koşullar',
|
|
655
|
+
},
|
|
641
656
|
'Test cards': {
|
|
642
657
|
value: 'Test kartları',
|
|
643
658
|
},
|
|
@@ -725,6 +740,9 @@ export const stringsTurkish = {
|
|
|
725
740
|
Village: {
|
|
726
741
|
value: 'Köy',
|
|
727
742
|
},
|
|
743
|
+
'Warranty policy': {
|
|
744
|
+
value: 'Garanti politikası',
|
|
745
|
+
},
|
|
728
746
|
"We couldn't complete your payment. Please verify the payment details and try again.": {
|
|
729
747
|
value: 'Ödemenizi tamamlayamadık. Lütfen ödeme bilgilerinizi kontrol edip tekrar deneyin.',
|
|
730
748
|
},
|
|
@@ -755,6 +773,9 @@ export const stringsTurkish = {
|
|
|
755
773
|
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
756
774
|
value: 'Ön ödeme yapmazsanız, nakliye şirketinden ek ücretler alabilirsiniz.',
|
|
757
775
|
},
|
|
776
|
+
'You must accept the policies to place this order': {
|
|
777
|
+
value: 'Bu siparişi vermek için politikaları kabul etmelisiniz',
|
|
778
|
+
},
|
|
758
779
|
"You will be redirected back to the merchant's site in a few seconds.": {
|
|
759
780
|
value: 'Birkaç saniye içinde satıcının sitesine geri yönlendirileceksiniz.',
|
|
760
781
|
},
|
|
@@ -281,6 +281,12 @@ export const stringsVietnamese = {
|
|
|
281
281
|
'Hide non-prepaid options': {
|
|
282
282
|
value: 'Ẩn các tùy chọn chưa trả trước',
|
|
283
283
|
},
|
|
284
|
+
"I agree to [merchantName]'s [policies]": {
|
|
285
|
+
value: 'Tôi đồng ý với [policies] của [merchantName]',
|
|
286
|
+
},
|
|
287
|
+
'I agree to the [policies]': {
|
|
288
|
+
value: 'Tôi đồng ý với [policies]',
|
|
289
|
+
},
|
|
284
290
|
"If you select FedEx Ground as your shipping option, you'll need to complete a General Agency Agreement (GAA) after placing your order. This form allows FedEx to clear your package through Canadian customs on your behalf. FedEx will contact you directly—usually by email or phone—with instructions on how to complete the GAA. To avoid delays or the return of your package, please respond promptly to their request.": {
|
|
285
291
|
value: 'Nếu bạn chọn FedEx Ground làm tùy chọn vận chuyển của mình, bạn sẽ cần hoàn thành Thỏa thuận Đại lý Chung (GAA) sau khi đặt hàng. Biểu mẫu này cho phép FedEx thông quan gói hàng của bạn qua hải quan Canada thay mặt bạn. FedEx sẽ liên hệ trực tiếp với bạn - thường qua email hoặc điện thoại - với hướng dẫn về cách hoàn thành GAA. Để tránh sự chậm trễ hoặc trả lại gói hàng của bạn, vui lòng trả lời nhanh chóng yêu cầu của họ.',
|
|
286
292
|
},
|
|
@@ -497,6 +503,9 @@ export const stringsVietnamese = {
|
|
|
497
503
|
'RFC number': {
|
|
498
504
|
value: 'Số RFC',
|
|
499
505
|
},
|
|
506
|
+
'Refund policy': {
|
|
507
|
+
value: 'Chính sách hoàn tiền',
|
|
508
|
+
},
|
|
500
509
|
Region: {
|
|
501
510
|
value: 'Khu vực',
|
|
502
511
|
},
|
|
@@ -551,6 +560,9 @@ export const stringsVietnamese = {
|
|
|
551
560
|
'Shipping method': {
|
|
552
561
|
value: 'Phương thức vận chuyển',
|
|
553
562
|
},
|
|
563
|
+
'Shipping policy': {
|
|
564
|
+
value: 'Chính sách vận chuyển',
|
|
565
|
+
},
|
|
554
566
|
'Shopping cart expired': {
|
|
555
567
|
value: 'Giỏ hàng đã hết hạn',
|
|
556
568
|
},
|
|
@@ -638,6 +650,9 @@ export const stringsVietnamese = {
|
|
|
638
650
|
'Taxes, duties, and fees included': {
|
|
639
651
|
value: 'Thuế, phí và lệ phí đã bao gồm',
|
|
640
652
|
},
|
|
653
|
+
'Terms and conditions': {
|
|
654
|
+
value: 'Điều khoản và điều kiện',
|
|
655
|
+
},
|
|
641
656
|
'Test cards': {
|
|
642
657
|
value: 'Thẻ kiểm tra',
|
|
643
658
|
},
|
|
@@ -725,6 +740,9 @@ export const stringsVietnamese = {
|
|
|
725
740
|
Village: {
|
|
726
741
|
value: 'Làng',
|
|
727
742
|
},
|
|
743
|
+
'Warranty policy': {
|
|
744
|
+
value: 'Chính sách bảo hành',
|
|
745
|
+
},
|
|
728
746
|
"We couldn't complete your payment. Please verify the payment details and try again.": {
|
|
729
747
|
value: 'Chúng tôi không thể hoàn tất thanh toán của bạn. Vui lòng xác minh thông tin thanh toán và thử lại.',
|
|
730
748
|
},
|
|
@@ -755,6 +773,9 @@ export const stringsVietnamese = {
|
|
|
755
773
|
'You may incur additional fees from the shipping carrier by not prepaying.': {
|
|
756
774
|
value: 'Bạn có thể phải chịu thêm phí từ nhà vận chuyển nếu không trả trước.',
|
|
757
775
|
},
|
|
776
|
+
'You must accept the policies to place this order': {
|
|
777
|
+
value: 'Bạn phải chấp nhận các chính sách để đặt đơn hàng này',
|
|
778
|
+
},
|
|
758
779
|
"You will be redirected back to the merchant's site in a few seconds.": {
|
|
759
780
|
value: 'Bạn sẽ được chuyển hướng trở lại trang web của người bán trong vài giây.',
|
|
760
781
|
},
|
|
@@ -20,6 +20,7 @@ const { dispose: zonosStoreDispose, onChange: zonosStoreOnChange, reset, state:
|
|
|
20
20
|
defaultCartExpiration: 3600,
|
|
21
21
|
externalPaymentMethods: [],
|
|
22
22
|
externalServiceTokens: [],
|
|
23
|
+
merchantPolicyLinks: null,
|
|
23
24
|
mode: 'TEST',
|
|
24
25
|
orderNotifications: {
|
|
25
26
|
abandonedCart: {
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { log } from "../logging/log";
|
|
2
|
+
const STYLE_ID = 'zonos-domestic-element-hide-style';
|
|
3
|
+
/**
|
|
4
|
+
* Probe whether the host parser understands `:is(...)`. Real browsers do
|
|
5
|
+
* (Chrome 88+, Firefox 78+, Safari 14+); older environments and some test
|
|
6
|
+
* runtimes don't. When supported, we wrap the merchant selector in a single
|
|
7
|
+
* `:is(...)` so a single `body.z-intl ` ancestor scopes the whole group.
|
|
8
|
+
* When not supported, we distribute the prefix across each top-level
|
|
9
|
+
* comma-separated piece instead — so the rule still applies in that
|
|
10
|
+
* environment.
|
|
11
|
+
*/
|
|
12
|
+
const supportsIsSelector = typeof document !== 'undefined' &&
|
|
13
|
+
(() => {
|
|
14
|
+
try {
|
|
15
|
+
document.querySelector(':is(.zonos-is-probe)');
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
catch (_a) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
/**
|
|
23
|
+
* Split a CSS selector string on top-level commas. Commas inside parentheses
|
|
24
|
+
* (`:not(.a, .b)`, `:nth-child(2n+1)`) or attribute brackets
|
|
25
|
+
* (`[data-foo=","]`) are preserved as part of the piece.
|
|
26
|
+
*/
|
|
27
|
+
const splitTopLevelCommas = (input) => {
|
|
28
|
+
const parts = [];
|
|
29
|
+
let parenDepth = 0;
|
|
30
|
+
let bracketDepth = 0;
|
|
31
|
+
let current = '';
|
|
32
|
+
for (let i = 0; i < input.length; i++) {
|
|
33
|
+
const char = input[i];
|
|
34
|
+
if (char === '(') {
|
|
35
|
+
parenDepth++;
|
|
36
|
+
}
|
|
37
|
+
else if (char === ')') {
|
|
38
|
+
parenDepth--;
|
|
39
|
+
}
|
|
40
|
+
else if (char === '[') {
|
|
41
|
+
bracketDepth++;
|
|
42
|
+
}
|
|
43
|
+
else if (char === ']') {
|
|
44
|
+
bracketDepth--;
|
|
45
|
+
}
|
|
46
|
+
if (char === ',' && parenDepth === 0 && bracketDepth === 0) {
|
|
47
|
+
const trimmed = current.trim();
|
|
48
|
+
if (trimmed) {
|
|
49
|
+
parts.push(trimmed);
|
|
50
|
+
}
|
|
51
|
+
current = '';
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
current += char;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const trimmed = current.trim();
|
|
58
|
+
if (trimmed) {
|
|
59
|
+
parts.push(trimmed);
|
|
60
|
+
}
|
|
61
|
+
return parts;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Build the fully-scoped selector that will land in the injected `<style>`
|
|
65
|
+
* tag. Exported so tests can exercise both branches of the `:is()`-support
|
|
66
|
+
* fallback without having to mock the module-level probe.
|
|
67
|
+
*/
|
|
68
|
+
export const buildDomesticHideSelector = ({ merchantSelector, supportsIs, }) => {
|
|
69
|
+
if (supportsIs) {
|
|
70
|
+
return `body.z-intl :is(${merchantSelector})`;
|
|
71
|
+
}
|
|
72
|
+
// Fallback: distribute the `body.z-intl ` ancestor prefix across each
|
|
73
|
+
// top-level comma-separated piece. Parentheses/brackets are respected,
|
|
74
|
+
// so pseudo-classes that take selector lists (`:not(.a, .b)`) and
|
|
75
|
+
// attribute selectors that contain commas stay intact.
|
|
76
|
+
return splitTopLevelCommas(merchantSelector)
|
|
77
|
+
.map(part => `body.z-intl ${part}`)
|
|
78
|
+
.join(', ');
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Inject a `<style>` tag that hides storefront elements matching the
|
|
82
|
+
* merchant-configured `checkoutSettings.domesticElementSelector`, scoped to
|
|
83
|
+
* `body.z-intl` so the rule only takes effect when the shopper is in a
|
|
84
|
+
* shipping zone (Hello sets the body class). The exact selector we emit is
|
|
85
|
+
* also the selector we validate — see [[buildDomesticHideSelector]] for the
|
|
86
|
+
* `:is()`-support branching.
|
|
87
|
+
*/
|
|
88
|
+
export const injectDomesticElementHideStyle = (domesticElementSelector) => {
|
|
89
|
+
if (typeof document === 'undefined' || !domesticElementSelector) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const fullSelector = buildDomesticHideSelector({
|
|
93
|
+
merchantSelector: domesticElementSelector,
|
|
94
|
+
supportsIs: supportsIsSelector,
|
|
95
|
+
});
|
|
96
|
+
// The browser's own parser is the source of truth — `document.querySelector`
|
|
97
|
+
// throws `DOMException(SyntaxError)` for syntactically invalid selectors.
|
|
98
|
+
// Validating the exact string we're about to emit catches both malformed
|
|
99
|
+
// input and payloads that close `:is(` early to escape the wrapper.
|
|
100
|
+
try {
|
|
101
|
+
document.querySelector(fullSelector);
|
|
102
|
+
}
|
|
103
|
+
catch (_a) {
|
|
104
|
+
log(`Skip domesticElementSelector injection: "${domesticElementSelector}" produced an invalid CSS selector ("${fullSelector}")`, 'warn');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
// Already injected — settings can re-emit on hot reload during dev.
|
|
108
|
+
if (document.getElementById(STYLE_ID)) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
const style = document.createElement('style');
|
|
112
|
+
style.id = STYLE_ID;
|
|
113
|
+
style.textContent = `${fullSelector} { display: none !important; }`;
|
|
114
|
+
(document.head || document.body).appendChild(style);
|
|
115
|
+
log('Zonos domestic element hide style injected');
|
|
116
|
+
};
|