@zonos/elements 1.3.142 → 1.3.144
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/{CheckoutConfig-eaaf62a1.js → CheckoutConfig-d25d548d.js} +13 -3
- package/dist/cjs/TaxId-4632639d.js +29 -0
- package/dist/cjs/{cart-199b0751.js → cart-2398abd4.js} +547 -42
- package/dist/cjs/{createCustomEvent-3e982e57.js → createCustomEvent-7b6fad95.js} +0 -3
- package/dist/cjs/{getBorderRadius-f97c99ad.js → getBorderRadius-7d0772bf.js} +1 -1
- package/dist/cjs/{handleFetch-864d3c53.js → handleFetch-3673a0c2.js} +30 -1
- package/dist/cjs/{index-b678ce0c.js → index-2f90486e.js} +209 -157
- package/dist/cjs/index.cjs.js +15 -11
- package/dist/cjs/{isDarkColor-434d71dd.js → isDarkColor-2acf30d1.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{paypal-4f1ee604.js → paypal-7ed9dfb7.js} +4 -4
- package/dist/cjs/{zonos-address_7.cjs.entry.js → zonos-address_8.cjs.entry.js} +143 -10
- package/dist/cjs/zonos-badge.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_13.cjs.entry.js +151 -32
- package/dist/cjs/zonos-checkout.cjs.entry.js +36 -16
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-component.cjs.entry.js +2 -2
- package/dist/cjs/zonos-controller.cjs.entry.js +8 -8
- package/dist/cjs/zonos-country-flag.cjs.entry.js +6 -6
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -10
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/{zonos-notification_3.cjs.entry.js → zonos-empty-state-payment_4.cjs.entry.js} +87 -9
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +10 -10
- package/dist/cjs/zonos-hello.cjs.entry.js +6 -6
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +6 -6
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-toggle.cjs.entry.js +4 -4
- package/dist/cjs/zonos-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/zonos-v-stack.cjs.entry.js +4 -4
- package/dist/cjs/{zonosStore-8971eb65.js → zonosStore-46809186.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +5 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.js +24 -4
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-restricted-items/zonos-cart-restricted-items.js +2 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +34 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +109 -18
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateDarkIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/assets/PaymentEmptyStateLightIcon.svg +22 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.css +51 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.js +90 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +62 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +32 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +4 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.js +6 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +18 -2
- package/dist/collection/components/common/zonos-banner/zonos-banner.js +4 -0
- package/dist/collection/components/common/zonos-button/zonos-button.js +30 -0
- package/dist/collection/components/common/zonos-card/zonos-card.js +20 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +14 -0
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +4 -0
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +4 -0
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +22 -0
- package/dist/collection/components/common/zonos-country-flag/zonos-country-flag.js +4 -0
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +2 -0
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +4 -0
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +26 -0
- package/dist/collection/components/common/zonos-icon/zonos-icon.js +8 -0
- package/dist/collection/components/common/zonos-input/zonos-input.js +12 -0
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -0
- package/dist/collection/components/common/zonos-link/zonos-link.js +8 -0
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +4 -0
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +6 -0
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +4 -0
- package/dist/collection/components/common/zonos-shipping-rich-radio/zonos-shipping-rich-radio.js +11 -1
- package/dist/collection/components/common/zonos-spinner/zonos-spinner.js +4 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.css +162 -0
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +264 -0
- package/dist/collection/components/common/zonos-text/zonos-text.js +8 -0
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +6 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +6 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +4 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +12 -4
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +7 -1
- package/dist/collection/components/hello/zonos-hello/zonos-hello.js +7 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +9 -3
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +17 -5
- package/dist/collection/components/main/zonos-controller.js +7 -3
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/cart.js +3 -0
- package/dist/collection/components/store/checkout/stripe.js +121 -40
- 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/stripe/zonos-address/zonos-address.js +7 -1
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +84 -3
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +3 -1
- package/dist/collection/components/utils/api/getCheckoutSession.js +1 -1
- package/dist/collection/components/utils/api/placeTestOrder.js +40 -0
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +2 -0
- package/dist/collection/components/utils/checkout/getIsStagingMode.js +1 -0
- package/dist/collection/components/utils/checkout/getIsTestMode.js +5 -1
- package/dist/collection/components/utils/handleFetch.js +22 -1
- package/dist/collection/components/utils/validateEmailValue.js +4 -0
- package/dist/collection/scripts/_getTempCartById.js +2 -2
- package/dist/collection/scripts/_getWithTestPublicCredential.js +5 -2
- package/dist/collection/scripts/cart/_getIsValidCartId.js +11 -0
- package/dist/collection/types/checkout/TaxId.js +24 -0
- package/dist/collection/types/checkout/api/PlaceTestOrder.js +1 -0
- package/dist/collection/types/generated/graphql.internal.types.js +64 -0
- package/dist/collection/types/index.js +2 -0
- package/dist/esm/{CheckoutConfig-262008fe.js → CheckoutConfig-573bd959.js} +13 -3
- package/dist/esm/TaxId-915ef042.js +26 -0
- package/dist/esm/{cart-cf87ec6f.js → cart-3427ee25.js} +547 -42
- package/dist/esm/{createCustomEvent-31a792d3.js → createCustomEvent-58159025.js} +1 -3
- package/dist/esm/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm/{handleFetch-badf4543.js → handleFetch-b4633675.js} +29 -2
- package/dist/esm/{index-986b5ff2.js → index-d82f06f2.js} +209 -157
- package/dist/esm/index.js +14 -12
- package/dist/esm/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{paypal-b7124cc4.js → paypal-4e2f9753.js} +4 -4
- package/dist/esm/{zonos-address_7.entry.js → zonos-address_8.entry.js} +143 -11
- package/dist/esm/zonos-badge.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_13.entry.js +149 -30
- package/dist/esm/zonos-checkout.entry.js +34 -14
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-component.entry.js +2 -2
- package/dist/esm/zonos-controller.entry.js +8 -8
- package/dist/esm/zonos-country-flag.entry.js +6 -6
- package/dist/esm/zonos-country-select_4.entry.js +10 -10
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/{zonos-notification_3.entry.js → zonos-empty-state-payment_4.entry.js} +87 -10
- package/dist/esm/zonos-hello-dialog.entry.js +10 -10
- package/dist/esm/zonos-hello.entry.js +6 -6
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +6 -6
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-toggle.entry.js +4 -4
- package/dist/esm/zonos-tooltip.entry.js +3 -3
- package/dist/esm/zonos-v-stack.entry.js +4 -4
- package/dist/esm/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/esm-es5/CheckoutConfig-573bd959.js +1 -0
- package/dist/esm-es5/TaxId-915ef042.js +1 -0
- package/dist/esm-es5/cart-3427ee25.js +1 -0
- package/dist/esm-es5/createCustomEvent-58159025.js +1 -0
- package/dist/esm-es5/{getBorderRadius-4aca63d4.js → getBorderRadius-b32d4218.js} +1 -1
- package/dist/esm-es5/handleFetch-b4633675.js +1 -0
- package/dist/esm-es5/index-d82f06f2.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-4915739f.js → isDarkColor-10f38df6.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{paypal-b7124cc4.js → paypal-4e2f9753.js} +1 -1
- package/dist/esm-es5/zonos-address_8.entry.js +1 -0
- 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.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_13.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-component.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-empty-state-payment_4.entry.js +1 -0
- 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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-toggle.entry.js +1 -1
- package/dist/esm-es5/zonos-tooltip.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-708637e7.js → zonosStore-44efd080.js} +1 -1
- package/dist/scripts/index.d.ts +170 -0
- 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-checkout-finish/zonos-checkout-finish.d.ts +1 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +18 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-empty-state-payment/zonos-empty-state-payment.d.ts +13 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +10 -0
- package/dist/types/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.d.ts +5 -0
- package/dist/types/components/common/zonos-stripe-input/zonos-stripe-input.d.ts +46 -0
- package/dist/types/components/store/checkout/cart.d.ts +5 -0
- package/dist/types/components/store/checkout/stripe.d.ts +16 -2
- 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/stripe/zonos-link-authentication/zonos-link-authentication.d.ts +6 -0
- package/dist/types/components/utils/api/placeTestOrder.d.ts +7 -0
- package/dist/types/components/utils/checkout/getIsStagingMode.d.ts +1 -0
- package/dist/types/components/utils/checkout/getIsTestMode.d.ts +1 -1
- package/dist/types/components/utils/validateEmailValue.d.ts +1 -0
- package/dist/types/components.d.ts +161 -0
- package/dist/types/types/checkout/TaxId.d.ts +20 -0
- package/dist/types/types/checkout/api/CalculateLandedCost.d.ts +8 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +8 -2
- package/dist/types/types/checkout/api/PlaceTestOrder.d.ts +7 -0
- package/dist/types/types/generated/graphql.internal.types.d.ts +144 -109
- package/dist/types/types/generated/graphql.internal.types.ts +180 -99
- package/dist/types/types/index.d.ts +2 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-68d79b58.entry.js → p-00136c20.entry.js} +1 -1
- package/dist/zonos-elements/{p-d381288e.entry.js → p-0028d158.entry.js} +1 -1
- package/dist/zonos-elements/{p-72256333.entry.js → p-05013308.entry.js} +1 -1
- package/dist/zonos-elements/{p-c1b098de.system.js → p-0e6a3cd2.system.js} +1 -1
- package/dist/zonos-elements/{p-c0164a3c.system.js → p-12546668.system.js} +1 -1
- package/dist/zonos-elements/p-12a6b7bd.system.js +1 -0
- package/dist/zonos-elements/p-1423ebbe.js +1 -0
- package/dist/zonos-elements/p-18e5b741.system.js +1 -0
- package/dist/zonos-elements/p-2deae669.entry.js +1 -0
- package/dist/zonos-elements/{p-36dfc7ac.system.js → p-32912caf.system.js} +1 -1
- package/dist/zonos-elements/{p-fc4658a6.entry.js → p-36f97fd9.entry.js} +1 -1
- package/dist/zonos-elements/{p-983f23a1.system.entry.js → p-3a213429.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e6554a6f.system.entry.js → p-3aa4841a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a13d5957.system.entry.js → p-3d221556.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-381874b0.system.entry.js → p-41e26cc4.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d514c1d.system.entry.js → p-463e44b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-46f6e5e9.system.js +1 -0
- package/dist/zonos-elements/{p-6271e108.js → p-485d89a4.js} +1 -1
- package/dist/zonos-elements/p-48bca3d4.system.entry.js +1 -0
- package/dist/zonos-elements/p-4caffd96.system.js +2 -0
- package/dist/zonos-elements/{p-0920500d.entry.js → p-50896f89.entry.js} +1 -1
- package/dist/zonos-elements/{p-2e152517.system.entry.js → p-515e3606.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5834c218.system.js +1 -0
- package/dist/zonos-elements/p-595f5dd2.js +1 -0
- package/dist/zonos-elements/p-5bd927f2.js +1 -0
- package/dist/zonos-elements/{p-2761ad55.system.entry.js → p-619c07c6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2b8cddb7.entry.js → p-69f84611.entry.js} +1 -1
- package/dist/zonos-elements/{p-766dd01f.js → p-6c578d26.js} +1 -1
- package/dist/zonos-elements/{p-28295342.entry.js → p-709c7e9e.entry.js} +1 -1
- package/dist/zonos-elements/{p-0197a9bf.system.entry.js → p-7140439f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-7302a081.system.entry.js +1 -0
- package/dist/zonos-elements/p-7e47f6cf.entry.js +1 -0
- package/dist/zonos-elements/{p-44dd4269.entry.js → p-7f288336.entry.js} +1 -1
- package/dist/zonos-elements/{p-0e54432c.system.entry.js → p-81084be5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-81a5dd5c.js +1 -0
- package/dist/zonos-elements/p-84e5fc0b.entry.js +1 -0
- package/dist/zonos-elements/{p-33e1d25e.system.entry.js → p-86e825f0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-0b5f4ca7.system.entry.js → p-91fc6c24.system.entry.js} +1 -1
- package/dist/zonos-elements/p-9951462e.entry.js +1 -0
- package/dist/zonos-elements/{p-a2bce31d.system.entry.js → p-9cf018c8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-232963d3.system.entry.js → p-9e05e259.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6b490b0a.system.entry.js → p-a8cf3542.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ab68ad11.js +2 -0
- package/dist/zonos-elements/{p-4b685549.js → p-b0616716.js} +1 -1
- package/dist/zonos-elements/{p-1e3ea4ae.entry.js → p-b12fbc07.entry.js} +1 -1
- package/dist/zonos-elements/{p-d198421b.system.entry.js → p-b2292b70.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-58a09715.entry.js → p-b262b93e.entry.js} +1 -1
- package/dist/zonos-elements/{p-545c05ce.entry.js → p-b288c2ed.entry.js} +1 -1
- package/dist/zonos-elements/p-b3882a73.system.js +1 -0
- package/dist/zonos-elements/{p-9306a835.entry.js → p-b5c360af.entry.js} +1 -1
- package/dist/zonos-elements/{p-2cfc00b8.system.entry.js → p-b6bbdb59.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f295030e.system.entry.js → p-bb92882d.system.entry.js} +1 -1
- package/dist/zonos-elements/p-bf37ccc7.system.js +1 -0
- package/dist/zonos-elements/{p-21b538ea.system.js → p-c015be06.system.js} +1 -1
- package/dist/zonos-elements/p-c8b0bc02.system.entry.js +1 -0
- package/dist/zonos-elements/{p-39cac2c1.entry.js → p-cbd5d932.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c5c0a85.entry.js → p-cdfca133.entry.js} +1 -1
- package/dist/zonos-elements/{p-675f60b4.entry.js → p-d2f2c685.entry.js} +1 -1
- package/dist/zonos-elements/{p-2c19f5e2.entry.js → p-d6061c79.entry.js} +1 -1
- package/dist/zonos-elements/p-da6a29e4.system.entry.js +1 -0
- package/dist/zonos-elements/{p-65069140.entry.js → p-db3f381d.entry.js} +1 -1
- package/dist/zonos-elements/{p-9dec2b74.entry.js → p-de221545.entry.js} +1 -1
- package/dist/zonos-elements/{p-2949faf3.entry.js → p-e01ccb27.entry.js} +1 -1
- package/dist/zonos-elements/{p-b0174a8f.js → p-e02fd9ae.js} +1 -1
- package/dist/zonos-elements/{p-3cf30d83.entry.js → p-e2f1fa53.entry.js} +1 -1
- package/dist/zonos-elements/{p-ebdd9b64.system.entry.js → p-e8c70c7d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a8bd492d.system.entry.js → p-ea35b237.system.entry.js} +1 -1
- package/dist/zonos-elements/p-f0c8150e.js +1 -0
- package/dist/zonos-elements/p-f3b0a097.system.js +1 -0
- package/dist/zonos-elements/{p-d5a3851d.system.entry.js → p-fc4ebe6b.system.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/package.json +9 -8
- package/dist/esm-es5/CheckoutConfig-262008fe.js +0 -1
- package/dist/esm-es5/cart-cf87ec6f.js +0 -1
- package/dist/esm-es5/createCustomEvent-31a792d3.js +0 -1
- package/dist/esm-es5/handleFetch-badf4543.js +0 -1
- package/dist/esm-es5/index-986b5ff2.js +0 -2
- package/dist/esm-es5/zonos-address_7.entry.js +0 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +0 -1
- package/dist/zonos-elements/p-076388d3.entry.js +0 -1
- package/dist/zonos-elements/p-0cda2818.system.js +0 -1
- package/dist/zonos-elements/p-0d2cf216.entry.js +0 -1
- package/dist/zonos-elements/p-1460f917.js +0 -1
- package/dist/zonos-elements/p-272052bd.system.entry.js +0 -1
- package/dist/zonos-elements/p-3cb4468f.system.entry.js +0 -1
- package/dist/zonos-elements/p-3d82e70e.js +0 -1
- package/dist/zonos-elements/p-64372f93.system.js +0 -1
- package/dist/zonos-elements/p-673b4402.system.entry.js +0 -1
- package/dist/zonos-elements/p-680d3694.js +0 -2
- package/dist/zonos-elements/p-7b999a40.js +0 -1
- package/dist/zonos-elements/p-7c643376.system.js +0 -1
- package/dist/zonos-elements/p-866bb93e.system.js +0 -1
- package/dist/zonos-elements/p-8c487480.entry.js +0 -1
- package/dist/zonos-elements/p-9b720cf4.entry.js +0 -1
- package/dist/zonos-elements/p-a5b294d7.js +0 -1
- package/dist/zonos-elements/p-b50667b6.system.js +0 -2
- package/dist/zonos-elements/p-bfcfd29b.system.js +0 -1
- package/dist/zonos-elements/p-ded984d9.system.entry.js +0 -1
- package/dist/zonos-elements/p-e9964a5a.system.js +0 -1
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const getIsTestMode = () => { var _a; return (_a = window.Zonos.zonosApiKey) === null || _a === void 0 ? void 0 : _a.includes('test'); };
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Strongly typed custom event creation for all available events in zonos-checkout project
|
|
5
3
|
*/
|
|
@@ -10,4 +8,4 @@ const createCustomEvent = (eventName, detail) => {
|
|
|
10
8
|
});
|
|
11
9
|
};
|
|
12
10
|
|
|
13
|
-
export { createCustomEvent as c
|
|
11
|
+
export { createCustomEvent as c };
|
|
@@ -83,6 +83,14 @@ const logError = (message, ...rest) => {
|
|
|
83
83
|
log(message, 'error', ...rest);
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
const getIsStagingMode = () => window.location.search.includes('zonosStagingMode=1');
|
|
87
|
+
|
|
88
|
+
const getIsTestMode = () => {
|
|
89
|
+
var _a;
|
|
90
|
+
return ((_a = window.Zonos.zonosApiKey) === null || _a === void 0 ? void 0 : _a.includes('test')) ||
|
|
91
|
+
window.location.search.includes('zonosTestMode=1');
|
|
92
|
+
};
|
|
93
|
+
|
|
86
94
|
const fallbackApiType = ['cloudflare', 'vercel'];
|
|
87
95
|
const MAIN_BASE_API_TYPE = fallbackApiType[0];
|
|
88
96
|
const fallbackApiList = {
|
|
@@ -269,6 +277,23 @@ const handleRequest = async ({ basePathType, options, path, }) => {
|
|
|
269
277
|
response,
|
|
270
278
|
shouldThrow: true,
|
|
271
279
|
});
|
|
280
|
+
// Parse and access "errors" from the response if possible
|
|
281
|
+
if (data && 'errors' in data && Array.isArray(data.errors)) {
|
|
282
|
+
const errors = data.errors;
|
|
283
|
+
const mappedErrors = errors.map(error => {
|
|
284
|
+
if (typeof error === 'string') {
|
|
285
|
+
return { message: error, type: status };
|
|
286
|
+
}
|
|
287
|
+
return error;
|
|
288
|
+
});
|
|
289
|
+
return {
|
|
290
|
+
baseUrl,
|
|
291
|
+
errors: mappedErrors,
|
|
292
|
+
json: null,
|
|
293
|
+
response,
|
|
294
|
+
zonosMode,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
272
297
|
const message = JSON.stringify(data);
|
|
273
298
|
return {
|
|
274
299
|
baseUrl,
|
|
@@ -345,7 +370,9 @@ const handleFetch = async (path, _opts) => {
|
|
|
345
370
|
const body = opts.body ? JSON.stringify(opts.body) : undefined;
|
|
346
371
|
const method = opts.method || 'GET';
|
|
347
372
|
// headers content type
|
|
348
|
-
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey || 'Empty credential token from zonos-elements' }, opts.headers);
|
|
373
|
+
const headers = Object.assign({ 'Content-Type': 'application/json', 'Zonos-Is-BigCommerce': window.Zonos.isBigCommerce.toString(), 'Zonos-Referer': window.location.hostname, 'Zonos-Staging-Mode': getIsStagingMode() ? '1' : undefined, 'Zonos-Test-Mode': getIsTestMode() ? '1' : undefined, 'Zonos-Version': window.Zonos.version, credentialtoken: window.Zonos.zonosApiKey || 'Empty credential token from zonos-elements' }, opts.headers);
|
|
374
|
+
// filter all underfined headers
|
|
375
|
+
Object.keys(headers).forEach(key => headers[key] === undefined && delete headers[key]);
|
|
349
376
|
const options = Object.assign(Object.assign({}, opts), { body: method === 'GET' ? undefined : body, headers,
|
|
350
377
|
method });
|
|
351
378
|
// This is for testing fallback API, set fallback API type to start with
|
|
@@ -358,4 +385,4 @@ const handleFetch = async (path, _opts) => {
|
|
|
358
385
|
});
|
|
359
386
|
};
|
|
360
387
|
|
|
361
|
-
export {
|
|
388
|
+
export { getIsStagingMode as a, logError as b, getElapsedTime as c, allLogs as d, fallbackApiList as f, getIsTestMode as g, handleFetch as h, jsonParse as j, log as l, sendErrorLog as s };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const NAMESPACE = 'zonos-elements';
|
|
2
|
-
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable:
|
|
2
|
+
const BUILD = /* zonos-elements */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: true, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: true, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
@@ -207,20 +207,6 @@ var unwrapErr = (result) => {
|
|
|
207
207
|
throw result.value;
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
|
-
var createTime = (fnName, tagName = "") => {
|
|
211
|
-
{
|
|
212
|
-
return () => {
|
|
213
|
-
return;
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
var uniqueTime = (key, measureText) => {
|
|
218
|
-
{
|
|
219
|
-
return () => {
|
|
220
|
-
return;
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
210
|
var h = (nodeName, vnodeData, ...children) => {
|
|
225
211
|
let child = null;
|
|
226
212
|
let key = null;
|
|
@@ -322,135 +308,6 @@ var convertToPrivate = (node) => {
|
|
|
322
308
|
vnode.$name$ = node.vname;
|
|
323
309
|
return vnode;
|
|
324
310
|
};
|
|
325
|
-
var parsePropertyValue = (propValue, propType) => {
|
|
326
|
-
if (propValue != null && !isComplexType(propValue)) {
|
|
327
|
-
if (propType & 4 /* Boolean */) {
|
|
328
|
-
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
329
|
-
}
|
|
330
|
-
if (propType & 2 /* Number */) {
|
|
331
|
-
return parseFloat(propValue);
|
|
332
|
-
}
|
|
333
|
-
if (propType & 1 /* String */) {
|
|
334
|
-
return String(propValue);
|
|
335
|
-
}
|
|
336
|
-
return propValue;
|
|
337
|
-
}
|
|
338
|
-
return propValue;
|
|
339
|
-
};
|
|
340
|
-
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
341
|
-
|
|
342
|
-
// src/runtime/event-emitter.ts
|
|
343
|
-
var createEvent = (ref, name, flags) => {
|
|
344
|
-
const elm = getElement(ref);
|
|
345
|
-
return {
|
|
346
|
-
emit: (detail) => {
|
|
347
|
-
return emitEvent(elm, name, {
|
|
348
|
-
bubbles: !!(flags & 4 /* Bubbles */),
|
|
349
|
-
composed: !!(flags & 2 /* Composed */),
|
|
350
|
-
cancelable: !!(flags & 1 /* Cancellable */),
|
|
351
|
-
detail
|
|
352
|
-
});
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
};
|
|
356
|
-
var emitEvent = (elm, name, opts) => {
|
|
357
|
-
const ev = plt.ce(name, opts);
|
|
358
|
-
elm.dispatchEvent(ev);
|
|
359
|
-
return ev;
|
|
360
|
-
};
|
|
361
|
-
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
362
|
-
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
363
|
-
let style = styles.get(scopeId2);
|
|
364
|
-
if (supportsConstructableStylesheets && allowCS) {
|
|
365
|
-
style = style || new CSSStyleSheet();
|
|
366
|
-
if (typeof style === "string") {
|
|
367
|
-
style = cssText;
|
|
368
|
-
} else {
|
|
369
|
-
style.replaceSync(cssText);
|
|
370
|
-
}
|
|
371
|
-
} else {
|
|
372
|
-
style = cssText;
|
|
373
|
-
}
|
|
374
|
-
styles.set(scopeId2, style);
|
|
375
|
-
};
|
|
376
|
-
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
377
|
-
var _a;
|
|
378
|
-
const scopeId2 = getScopeId(cmpMeta);
|
|
379
|
-
const style = styles.get(scopeId2);
|
|
380
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
381
|
-
if (style) {
|
|
382
|
-
if (typeof style === "string") {
|
|
383
|
-
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
384
|
-
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
385
|
-
let styleElm;
|
|
386
|
-
if (!appliedStyles) {
|
|
387
|
-
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
388
|
-
}
|
|
389
|
-
if (!appliedStyles.has(scopeId2)) {
|
|
390
|
-
{
|
|
391
|
-
styleElm = doc.createElement("style");
|
|
392
|
-
styleElm.innerHTML = style;
|
|
393
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
394
|
-
if (nonce != null) {
|
|
395
|
-
styleElm.setAttribute("nonce", nonce);
|
|
396
|
-
}
|
|
397
|
-
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
398
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
399
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
400
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
401
|
-
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
402
|
-
} else if ("host" in styleContainerNode) {
|
|
403
|
-
if (supportsConstructableStylesheets) {
|
|
404
|
-
const stylesheet = new CSSStyleSheet();
|
|
405
|
-
stylesheet.replaceSync(style);
|
|
406
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
407
|
-
} else {
|
|
408
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
409
|
-
if (existingStyleContainer) {
|
|
410
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
411
|
-
} else {
|
|
412
|
-
styleContainerNode.prepend(styleElm);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
} else {
|
|
416
|
-
styleContainerNode.append(styleElm);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
420
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
424
|
-
styleElm.innerHTML += SLOT_FB_CSS;
|
|
425
|
-
}
|
|
426
|
-
if (appliedStyles) {
|
|
427
|
-
appliedStyles.add(scopeId2);
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
431
|
-
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return scopeId2;
|
|
435
|
-
};
|
|
436
|
-
var attachStyles = (hostRef) => {
|
|
437
|
-
const cmpMeta = hostRef.$cmpMeta$;
|
|
438
|
-
const elm = hostRef.$hostElement$;
|
|
439
|
-
const flags = cmpMeta.$flags$;
|
|
440
|
-
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
441
|
-
const scopeId2 = addStyle(
|
|
442
|
-
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
443
|
-
cmpMeta);
|
|
444
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
445
|
-
elm["s-sc"] = scopeId2;
|
|
446
|
-
elm.classList.add(scopeId2 + "-h");
|
|
447
|
-
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
448
|
-
elm.classList.add(scopeId2 + "-s");
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
endAttachStyles();
|
|
452
|
-
};
|
|
453
|
-
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
454
311
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
455
312
|
if (oldValue !== newValue) {
|
|
456
313
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -459,6 +316,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
459
316
|
const classList = elm.classList;
|
|
460
317
|
const oldClasses = parseClassList(oldValue);
|
|
461
318
|
const newClasses = parseClassList(newValue);
|
|
319
|
+
if (elm["s-si"] && newClasses.indexOf(elm["s-si"]) < 0) {
|
|
320
|
+
newClasses.push(elm["s-si"]);
|
|
321
|
+
}
|
|
462
322
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
463
323
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
464
324
|
} else if (memberName === "style") {
|
|
@@ -812,7 +672,7 @@ var updateElementScopeIds = (element, parent, iterateChildNodes = false) => {
|
|
|
812
672
|
if (scopeIds.size) {
|
|
813
673
|
(_a = element.classList) == null ? void 0 : _a.add(...element["s-scs"] = Array.from(scopeIds));
|
|
814
674
|
if (element["s-ol"] || iterateChildNodes) {
|
|
815
|
-
for (const childNode of Array.from(element.childNodes)) {
|
|
675
|
+
for (const childNode of Array.from(element.__childNodes || element.childNodes)) {
|
|
816
676
|
updateElementScopeIds(childNode, element, true);
|
|
817
677
|
}
|
|
818
678
|
}
|
|
@@ -842,6 +702,149 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
842
702
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
843
703
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
844
704
|
};
|
|
705
|
+
var createTime = (fnName, tagName = "") => {
|
|
706
|
+
{
|
|
707
|
+
return () => {
|
|
708
|
+
return;
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
};
|
|
712
|
+
var uniqueTime = (key, measureText) => {
|
|
713
|
+
{
|
|
714
|
+
return () => {
|
|
715
|
+
return;
|
|
716
|
+
};
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
var parsePropertyValue = (propValue, propType) => {
|
|
720
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
721
|
+
if (propType & 4 /* Boolean */) {
|
|
722
|
+
return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
723
|
+
}
|
|
724
|
+
if (propType & 2 /* Number */) {
|
|
725
|
+
return parseFloat(propValue);
|
|
726
|
+
}
|
|
727
|
+
if (propType & 1 /* String */) {
|
|
728
|
+
return String(propValue);
|
|
729
|
+
}
|
|
730
|
+
return propValue;
|
|
731
|
+
}
|
|
732
|
+
return propValue;
|
|
733
|
+
};
|
|
734
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
735
|
+
|
|
736
|
+
// src/runtime/event-emitter.ts
|
|
737
|
+
var createEvent = (ref, name, flags) => {
|
|
738
|
+
const elm = getElement(ref);
|
|
739
|
+
return {
|
|
740
|
+
emit: (detail) => {
|
|
741
|
+
return emitEvent(elm, name, {
|
|
742
|
+
bubbles: !!(flags & 4 /* Bubbles */),
|
|
743
|
+
composed: !!(flags & 2 /* Composed */),
|
|
744
|
+
cancelable: !!(flags & 1 /* Cancellable */),
|
|
745
|
+
detail
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
var emitEvent = (elm, name, opts) => {
|
|
751
|
+
const ev = plt.ce(name, opts);
|
|
752
|
+
elm.dispatchEvent(ev);
|
|
753
|
+
return ev;
|
|
754
|
+
};
|
|
755
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
756
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
757
|
+
let style = styles.get(scopeId2);
|
|
758
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
759
|
+
style = style || new CSSStyleSheet();
|
|
760
|
+
if (typeof style === "string") {
|
|
761
|
+
style = cssText;
|
|
762
|
+
} else {
|
|
763
|
+
style.replaceSync(cssText);
|
|
764
|
+
}
|
|
765
|
+
} else {
|
|
766
|
+
style = cssText;
|
|
767
|
+
}
|
|
768
|
+
styles.set(scopeId2, style);
|
|
769
|
+
};
|
|
770
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
771
|
+
var _a;
|
|
772
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
773
|
+
const style = styles.get(scopeId2);
|
|
774
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
775
|
+
if (style) {
|
|
776
|
+
if (typeof style === "string") {
|
|
777
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
778
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
779
|
+
let styleElm;
|
|
780
|
+
if (!appliedStyles) {
|
|
781
|
+
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
782
|
+
}
|
|
783
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
784
|
+
{
|
|
785
|
+
styleElm = doc.createElement("style");
|
|
786
|
+
styleElm.innerHTML = style;
|
|
787
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
788
|
+
if (nonce != null) {
|
|
789
|
+
styleElm.setAttribute("nonce", nonce);
|
|
790
|
+
}
|
|
791
|
+
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
792
|
+
if (styleContainerNode.nodeName === "HEAD") {
|
|
793
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
794
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
795
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
796
|
+
} else if ("host" in styleContainerNode) {
|
|
797
|
+
if (supportsConstructableStylesheets) {
|
|
798
|
+
const stylesheet = new CSSStyleSheet();
|
|
799
|
+
stylesheet.replaceSync(style);
|
|
800
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
801
|
+
} else {
|
|
802
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
803
|
+
if (existingStyleContainer) {
|
|
804
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
805
|
+
} else {
|
|
806
|
+
styleContainerNode.prepend(styleElm);
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
} else {
|
|
810
|
+
styleContainerNode.append(styleElm);
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
814
|
+
styleContainerNode.insertBefore(styleElm, null);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
818
|
+
styleElm.innerHTML += SLOT_FB_CSS;
|
|
819
|
+
}
|
|
820
|
+
if (appliedStyles) {
|
|
821
|
+
appliedStyles.add(scopeId2);
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
825
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
return scopeId2;
|
|
829
|
+
};
|
|
830
|
+
var attachStyles = (hostRef) => {
|
|
831
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
832
|
+
const elm = hostRef.$hostElement$;
|
|
833
|
+
const flags = cmpMeta.$flags$;
|
|
834
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
835
|
+
const scopeId2 = addStyle(
|
|
836
|
+
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
837
|
+
cmpMeta);
|
|
838
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
839
|
+
elm["s-sc"] = scopeId2;
|
|
840
|
+
elm.classList.add(scopeId2 + "-h");
|
|
841
|
+
if (flags & 2 /* scopedCssEncapsulation */) {
|
|
842
|
+
elm.classList.add(scopeId2 + "-s");
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
endAttachStyles();
|
|
846
|
+
};
|
|
847
|
+
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
845
848
|
|
|
846
849
|
// src/runtime/update-component.ts
|
|
847
850
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -1067,16 +1070,62 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1067
1070
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1068
1071
|
members.map(([memberName, [memberFlags]]) => {
|
|
1069
1072
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1073
|
+
if ((memberFlags & 2048 /* Getter */) === 0) {
|
|
1074
|
+
Object.defineProperty(prototype, memberName, {
|
|
1075
|
+
get() {
|
|
1076
|
+
return getValue(this, memberName);
|
|
1077
|
+
},
|
|
1078
|
+
set(newValue) {
|
|
1079
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1080
|
+
},
|
|
1081
|
+
configurable: true,
|
|
1082
|
+
enumerable: true
|
|
1083
|
+
});
|
|
1084
|
+
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 2048 /* Getter */) {
|
|
1085
|
+
{
|
|
1086
|
+
Object.defineProperty(prototype, memberName, {
|
|
1087
|
+
get() {
|
|
1088
|
+
const ref = getHostRef(this);
|
|
1089
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1090
|
+
if (!instance) return;
|
|
1091
|
+
return instance[memberName];
|
|
1092
|
+
},
|
|
1093
|
+
configurable: true,
|
|
1094
|
+
enumerable: true
|
|
1095
|
+
});
|
|
1096
|
+
}
|
|
1097
|
+
if (memberFlags & 4096 /* Setter */) {
|
|
1098
|
+
const origSetter = Object.getOwnPropertyDescriptor(prototype, memberName).set;
|
|
1099
|
+
Object.defineProperty(prototype, memberName, {
|
|
1100
|
+
set(newValue) {
|
|
1101
|
+
const ref = getHostRef(this);
|
|
1102
|
+
if (origSetter) {
|
|
1103
|
+
const currentValue = ref.$hostElement$[memberName];
|
|
1104
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1105
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1106
|
+
}
|
|
1107
|
+
origSetter.apply(this, [parsePropertyValue(newValue, cmpMeta.$members$[memberName][0])]);
|
|
1108
|
+
setValue(this, memberName, ref.$hostElement$[memberName], cmpMeta);
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
if (!ref) return;
|
|
1112
|
+
const setterSetVal = () => {
|
|
1113
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1114
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1115
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1116
|
+
}
|
|
1117
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, cmpMeta.$members$[memberName][0]);
|
|
1118
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1119
|
+
};
|
|
1120
|
+
if (ref.$lazyInstance$) {
|
|
1121
|
+
setterSetVal();
|
|
1122
|
+
} else {
|
|
1123
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
});
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1080
1129
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
|
1081
1130
|
Object.defineProperty(prototype, memberName, {
|
|
1082
1131
|
value(...args) {
|
|
@@ -1116,7 +1165,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1116
1165
|
}
|
|
1117
1166
|
return;
|
|
1118
1167
|
}
|
|
1119
|
-
|
|
1168
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1169
|
+
if (!propDesc.get || !!propDesc.set) {
|
|
1170
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1171
|
+
}
|
|
1120
1172
|
});
|
|
1121
1173
|
};
|
|
1122
1174
|
Cstr.observedAttributes = Array.from(
|
package/dist/esm/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { l as log, h as handleFetch,
|
|
2
|
-
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-
|
|
3
|
-
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-
|
|
1
|
+
import { g as getIsTestMode, a as getIsStagingMode, l as log, h as handleFetch, b as logError } from './handleFetch-b4633675.js';
|
|
2
|
+
import { s as setupCartData, c as checkoutHiddenBtnSelector } from './CheckoutConfig-573bd959.js';
|
|
3
|
+
export { c as checkoutHiddenBtnSelector, d as domesticRedirectedBtnSelector } from './CheckoutConfig-573bd959.js';
|
|
4
|
+
export { c as countryRequireTaxId, s as shipToTaxIdLabels } from './TaxId-915ef042.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Get the load version and url based on the loadScriptSrc and version
|
|
@@ -57,9 +58,10 @@ const getNextFallbackUrl = (currentCdnType) => {
|
|
|
57
58
|
* Attempt to get test public credential to window.Zonos.zonosApiKey if needed
|
|
58
59
|
*/
|
|
59
60
|
const getWithTestPublicCredential = async () => {
|
|
60
|
-
const isTestMode =
|
|
61
|
+
const isTestMode = getIsTestMode();
|
|
62
|
+
const isStagingMode = getIsStagingMode();
|
|
61
63
|
// Do nothing if the test mode is not enabled or the public credential
|
|
62
|
-
if (!isTestMode || !window.Zonos.zonosApiKey) {
|
|
64
|
+
if ((!isTestMode && !isStagingMode) || !window.Zonos.zonosApiKey) {
|
|
63
65
|
return null;
|
|
64
66
|
}
|
|
65
67
|
log('[ZONOS - loadZonos] Attempt test public credential', 'info');
|
|
@@ -124,7 +126,7 @@ const getZonosQaUrl = () => {
|
|
|
124
126
|
return null;
|
|
125
127
|
}
|
|
126
128
|
const qaUrl = extractZonosQaUrl(window.location.href);
|
|
127
|
-
const cdnUrl = "https://v1.3.
|
|
129
|
+
const cdnUrl = "https://v1.3.144.js.zonos.com";
|
|
128
130
|
// when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
|
|
129
131
|
if (!qaUrl &&
|
|
130
132
|
(cdnUrl.includes('test.') ||
|
|
@@ -308,10 +310,10 @@ const zonosLoadUrl = (() => {
|
|
|
308
310
|
}
|
|
309
311
|
return null;
|
|
310
312
|
})();
|
|
311
|
-
const ZONOS_URL = "https://v1.3.
|
|
312
|
-
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.
|
|
313
|
-
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.
|
|
314
|
-
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.
|
|
313
|
+
const ZONOS_URL = "https://v1.3.144.js.zonos.com";
|
|
314
|
+
const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.144";
|
|
315
|
+
const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.144";
|
|
316
|
+
const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.144";
|
|
315
317
|
const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
|
|
316
318
|
const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
|
|
317
319
|
class Zonos {
|
|
@@ -325,7 +327,7 @@ Zonos.zonosConversionTest = typeof window !== 'undefined' &&
|
|
|
325
327
|
!!window.location.search.match(/\?.*(&*)zonosConversionTest/);
|
|
326
328
|
Zonos._paypalMockResponse = null;
|
|
327
329
|
Zonos.isBigCommerce = false;
|
|
328
|
-
Zonos.releaseDate = "
|
|
330
|
+
Zonos.releaseDate = "1735934720716";
|
|
329
331
|
Zonos.isLegacyCheckout = false;
|
|
330
332
|
Zonos.domain = typeof window !== 'undefined'
|
|
331
333
|
? // domain that embeds the iframe
|
|
@@ -341,7 +343,7 @@ Zonos.showBaseForeign = typeof window !== 'undefined' &&
|
|
|
341
343
|
Zonos.isNpm = true;
|
|
342
344
|
Zonos.zonosQaUrl = null;
|
|
343
345
|
Zonos.zonosQaUrlApi = null;
|
|
344
|
-
Zonos.version = `v${"1.3.
|
|
346
|
+
Zonos.version = `v${"1.3.144"}`;
|
|
345
347
|
Zonos.modeAlerted = false;
|
|
346
348
|
Zonos.cartData = null;
|
|
347
349
|
Zonos.paypal = null;
|