@zonos/elements 1.3.232 → 1.3.234
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-bc615014.js → cart-22ced7cc.js} +33 -29
- package/dist/cjs/{shouldRenderTaxIdInput-9b8a8de1.js → containsNonLatinChars-2be5129b.js} +0 -23
- package/dist/cjs/{hasInclusivePrice-84145546.js → hasInclusivePrice-ca85cabd.js} +1 -1
- package/dist/cjs/index.cjs.js +11 -7
- package/dist/cjs/invoice-8fd4242c.js +151 -0
- package/dist/cjs/{renderFallback-c2576fbe.js → isCollectMobileTablet-7962c57f.js} +2 -11
- package/dist/cjs/isInvoiceMobileTablet-dde41e4e.js +15 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translationStore-08d3ff9c.js → localization-8ef6250a.js} +1059 -1
- package/dist/cjs/{paypal-1d6f1a71.js → paypal-4a086f84.js} +7 -8
- package/dist/cjs/placeTestOrder-f25d08ee.js +45 -0
- package/dist/cjs/{placeTestOrder-a5469e40.js → renderCheckoutCurrency-5494e45b.js} +2 -42
- package/dist/cjs/renderFallback-78b54537.js +12 -0
- package/dist/cjs/shouldRenderTaxIdInput-eda13ef8.js +25 -0
- package/dist/cjs/throttle-7dd64984.js +76 -0
- package/dist/cjs/{zonos-address_11.cjs.entry.js → zonos-address-display_9.cjs.entry.js} +62 -668
- package/dist/cjs/zonos-address_4.cjs.entry.js +715 -0
- package/dist/cjs/zonos-badge.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-banner_2.cjs.entry.js → zonos-banner.cjs.entry.js} +0 -40
- package/dist/cjs/zonos-button_3.cjs.entry.js +3 -3
- package/dist/cjs/{zonos-empty-state-payment_4.cjs.entry.js → zonos-card_5.cjs.entry.js} +44 -6
- package/dist/cjs/{zonos-cart-items_13.cjs.entry.js → zonos-cart-items_12.cjs.entry.js} +81 -94
- package/dist/cjs/zonos-checkout.cjs.entry.js +20 -21
- package/dist/cjs/zonos-collapse.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +5 -6
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +66 -65
- package/dist/cjs/zonos-collect.cjs.entry.js +25 -25
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +39 -10
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +10 -11
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +30 -31
- package/dist/cjs/zonos-hello.cjs.entry.js +7 -8
- package/dist/cjs/zonos-input.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +94 -0
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +686 -0
- package/dist/cjs/zonos-invoice.cjs.entry.js +466 -0
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -6
- package/dist/cjs/zonos-link.cjs.entry.js +24 -0
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/zonos-stripe-input.cjs.entry.js +5 -5
- package/dist/cjs/zonos-toggle.cjs.entry.js +2 -2
- package/dist/cjs/zonos-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-cart-subtotal/zonos-cart-subtotal.js +3 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-review/zonos-review.js +3 -1
- package/dist/collection/components/checkout/zonos-invoice/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/assets/empty-item.jpeg +0 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.css +72 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.js +87 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/RemoveIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/assets/SuccessIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.css +90 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.js +405 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/chevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/globe.svg +3 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/assets/zonosWordmark.svg +7 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.css +155 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.js +165 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronDownIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/assets/ChevronUpIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.css +117 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.js +175 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/CheckmarkLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/assets/RemoveLineIcon.svg +1 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.css +98 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.js +368 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.css +71 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.js +151 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.css +83 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.js +65 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.css +350 -0
- package/dist/collection/components/checkout/zonos-invoice/zonos-invoice.js +545 -0
- package/dist/collection/components/common/zonos-badge/zonos-badge.js +3 -3
- package/dist/collection/components/common/zonos-button/zonos-button.js +3 -3
- package/dist/collection/components/common/zonos-card/zonos-card.js +4 -4
- package/dist/collection/components/common/zonos-checkbox/zonos-checkbox.js +3 -3
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.js +3 -3
- package/dist/collection/components/common/zonos-collapse/zonos-collapse.js +2 -2
- package/dist/collection/components/common/zonos-confirm-dialog/zonos-confirm-dialog.js +3 -3
- package/dist/collection/components/common/zonos-country-select/zonos-country-select.js +3 -3
- package/dist/collection/components/common/zonos-custom-message/zonos-custom-message.js +2 -2
- package/dist/collection/components/common/zonos-dialog/zonos-dialog.js +3 -3
- package/dist/collection/components/common/zonos-h-stack/zonos-h-stack.js +2 -2
- package/dist/collection/components/common/zonos-input/zonos-input.js +4 -4
- package/dist/collection/components/common/zonos-language-select/zonos-language-select.js +2 -2
- package/dist/collection/components/common/zonos-link/zonos-link.js +1 -1
- package/dist/collection/components/common/zonos-loading-overlay/zonos-loading-overlay.js +1 -1
- package/dist/collection/components/common/zonos-logo/zonos-logo.js +2 -2
- package/dist/collection/components/common/zonos-rest-state/zonos-rest-state.js +3 -3
- package/dist/collection/components/common/zonos-select-dialog-header/zonos-select-dialog-header.js +2 -2
- package/dist/collection/components/common/zonos-skeleton/zonos-skeleton.js +1 -1
- package/dist/collection/components/common/zonos-stripe-input/zonos-stripe-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +5 -5
- package/dist/collection/components/common/zonos-stripe-select/zonos-stripe-select.js +5 -5
- package/dist/collection/components/common/zonos-toggle/zonos-toggle.js +2 -2
- package/dist/collection/components/common/zonos-tooltip/zonos-tooltip.js +2 -2
- package/dist/collection/components/common/zonos-v-stack/zonos-v-stack.js +2 -2
- package/dist/collection/components/common/zonos-virtual-scroll/zonos-virtual-scroll.js +2 -2
- package/dist/collection/components/component-template/zonos-component/zonos-component.js +1 -1
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +2 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog.js +4 -4
- package/dist/collection/components/main/zonos-controller.js +45 -4
- package/dist/collection/components/paypal/zonos-paypal-payment.js +1 -1
- package/dist/collection/components/store/checkout/invoice.js +148 -0
- package/dist/collection/components/store/checkout/stripe.js +8 -3
- package/dist/collection/components/store/translationStore/strings.arabic.js +9 -0
- package/dist/collection/components/store/translationStore/strings.base.js +9 -0
- package/dist/collection/components/store/translationStore/strings.chinese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.danish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.dutch.js +9 -0
- package/dist/collection/components/store/translationStore/strings.french.js +9 -0
- package/dist/collection/components/store/translationStore/strings.german.js +9 -0
- package/dist/collection/components/store/translationStore/strings.hebrew.js +9 -0
- package/dist/collection/components/store/translationStore/strings.indonesian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.italian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.japanese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.korean.js +9 -0
- package/dist/collection/components/store/translationStore/strings.norwegian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.polish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.portuguese.js +9 -0
- package/dist/collection/components/store/translationStore/strings.russian.js +9 -0
- package/dist/collection/components/store/translationStore/strings.spanish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.swedish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.turkish.js +9 -0
- package/dist/collection/components/store/translationStore/strings.vietnamese.js +9 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +8 -5
- package/dist/collection/components/stripe/zonos-custom-address/zonos-address-suggestions/zonos-address-suggestions.js +2 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +2 -2
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +1 -1
- package/dist/collection/components/utils/checkout/initInvoice.js +15 -0
- package/dist/collection/components/utils/checkout/isInvoiceMobileTablet.js +10 -0
- package/dist/collection/scripts/_zonosBase.js +4 -0
- package/dist/esm/{cart-14f305b3.js → cart-66aecbb3.js} +9 -5
- package/dist/esm/{shouldRenderTaxIdInput-8bc112bb.js → containsNonLatinChars-2d8810c3.js} +1 -23
- package/dist/esm/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
- package/dist/esm/index.js +11 -7
- package/dist/esm/invoice-c7452847.js +146 -0
- package/dist/esm/{renderFallback-dbf1e3ae.js → isCollectMobileTablet-921002b0.js} +3 -11
- package/dist/esm/isInvoiceMobileTablet-1f7b614e.js +12 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translationStore-690c4e04.js → localization-04b05867.js} +1041 -2
- package/dist/esm/{paypal-fded8844.js → paypal-56564874.js} +2 -3
- package/dist/esm/placeTestOrder-6b9eda9e.js +43 -0
- package/dist/esm/{placeTestOrder-2250f719.js → renderCheckoutCurrency-cb808110.js} +3 -42
- package/dist/esm/renderFallback-3f010b48.js +10 -0
- package/dist/esm/shouldRenderTaxIdInput-d45ceeb4.js +23 -0
- package/dist/esm/throttle-ce2432ab.js +74 -0
- package/dist/esm/{zonos-address_11.entry.js → zonos-address-display_9.entry.js} +32 -636
- package/dist/esm/zonos-address_4.entry.js +708 -0
- package/dist/esm/zonos-badge.entry.js +3 -3
- package/dist/esm/{zonos-banner_2.entry.js → zonos-banner.entry.js} +1 -40
- package/dist/esm/zonos-button_3.entry.js +3 -3
- package/dist/esm/{zonos-empty-state-payment_4.entry.js → zonos-card_5.entry.js} +44 -7
- package/dist/esm/{zonos-cart-items_13.entry.js → zonos-cart-items_12.entry.js} +21 -33
- package/dist/esm/zonos-checkout.entry.js +3 -4
- package/dist/esm/zonos-collapse.entry.js +2 -2
- package/dist/esm/zonos-collect-cart-items_3.entry.js +5 -6
- package/dist/esm/zonos-collect-finish_6.entry.js +7 -6
- package/dist/esm/zonos-collect.entry.js +5 -5
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +39 -10
- package/dist/esm/zonos-country-flag.entry.js +1 -2
- package/dist/esm/zonos-country-select_4.entry.js +10 -11
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +6 -7
- package/dist/esm/zonos-hello.entry.js +1 -2
- package/dist/esm/zonos-input.entry.js +4 -4
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +89 -0
- package/dist/esm/zonos-invoice-finish_5.entry.js +678 -0
- package/dist/esm/zonos-invoice.entry.js +462 -0
- package/dist/esm/zonos-language-select_2.entry.js +5 -6
- package/dist/esm/zonos-link.entry.js +20 -0
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/zonos-stripe-input.entry.js +5 -5
- package/dist/esm/zonos-toggle.entry.js +2 -2
- package/dist/esm/zonos-tooltip.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm-es5/cart-66aecbb3.js +1 -0
- package/dist/esm-es5/containsNonLatinChars-2d8810c3.js +1 -0
- package/dist/esm-es5/{hasInclusivePrice-0eda8ba9.js → hasInclusivePrice-2a1bf474.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/invoice-c7452847.js +1 -0
- package/dist/esm-es5/isCollectMobileTablet-921002b0.js +1 -0
- package/dist/esm-es5/isInvoiceMobileTablet-1f7b614e.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/localization-04b05867.js +1 -0
- package/dist/esm-es5/{paypal-fded8844.js → paypal-56564874.js} +1 -1
- package/dist/esm-es5/placeTestOrder-6b9eda9e.js +1 -0
- package/dist/esm-es5/renderCheckoutCurrency-cb808110.js +1 -0
- package/dist/esm-es5/renderFallback-3f010b48.js +1 -0
- package/dist/esm-es5/shouldRenderTaxIdInput-d45ceeb4.js +1 -0
- package/dist/esm-es5/throttle-ce2432ab.js +1 -0
- package/dist/esm-es5/zonos-address-display_9.entry.js +1 -0
- package/dist/esm-es5/zonos-address_4.entry.js +1 -0
- package/dist/esm-es5/zonos-badge.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -0
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.entry.js +1 -0
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -0
- 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-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-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 -0
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -0
- package/dist/esm-es5/zonos-invoice.entry.js +1 -0
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -0
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-stripe-input.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/scripts/index.d.ts +356 -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-invoice/zonos-invoice-cart-items/zonos-invoice-cart-items.d.ts +10 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-finish/zonos-invoice-finish.d.ts +50 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-footer/zonos-invoice-footer.d.ts +25 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-order-details/zonos-invoice-order-details.d.ts +28 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-payment/zonos-invoice-payment.d.ts +62 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-review/zonos-invoice-review.d.ts +22 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice-subtotal/zonos-invoice-subtotal.d.ts +7 -0
- package/dist/types/components/checkout/zonos-invoice/zonos-invoice.d.ts +86 -0
- package/dist/types/components/main/zonos-controller.d.ts +4 -0
- package/dist/types/components/store/checkout/invoice.d.ts +19 -0
- package/dist/types/components/store/translationStore/strings.arabic.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.base.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.chinese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.danish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.dutch.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.french.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.german.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.hebrew.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.indonesian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.italian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.japanese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.korean.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.norwegian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.polish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.portuguese.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.russian.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.spanish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.swedish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.turkish.d.ts +9 -0
- package/dist/types/components/store/translationStore/strings.vietnamese.d.ts +9 -0
- package/dist/types/components/utils/checkout/initInvoice.d.ts +1 -0
- package/dist/types/components/utils/checkout/isInvoiceMobileTablet.d.ts +4 -0
- package/dist/types/components.d.ts +351 -0
- package/dist/types/scripts/_zonosBase.d.ts +5 -0
- package/dist/types/types/checkout/api/CheckoutSession.d.ts +4 -0
- package/dist/types/types/checkout/api/PartyInfo.d.ts +21 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/p-00719e49.entry.js +1 -0
- package/dist/zonos-elements/p-01b0a2e2.js +1 -0
- package/dist/zonos-elements/p-01dada4e.js +1 -0
- package/dist/zonos-elements/p-0c64dbbb.js +1 -0
- package/dist/zonos-elements/p-0cd5bcb3.entry.js +1 -0
- package/dist/zonos-elements/p-0e82fcea.entry.js +1 -0
- package/dist/zonos-elements/p-10316d4d.system.entry.js +1 -0
- package/dist/zonos-elements/{p-0a90dd80.system.entry.js → p-121c60c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-bf9d889f.entry.js → p-14314ad3.entry.js} +1 -1
- package/dist/zonos-elements/p-170314a3.js +1 -0
- package/dist/zonos-elements/p-17a09191.entry.js +1 -0
- package/dist/zonos-elements/p-18bc6c7a.entry.js +1 -0
- package/dist/zonos-elements/{p-a25428eb.system.js → p-18d20206.system.js} +2 -2
- package/dist/zonos-elements/p-1a30fe18.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c7b658cb.entry.js → p-1c4d12f0.entry.js} +1 -1
- package/dist/zonos-elements/p-1f3549c6.js +1 -0
- package/dist/zonos-elements/p-2250e585.entry.js +1 -0
- package/dist/zonos-elements/p-248dd596.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5f398c28.entry.js → p-264690d7.entry.js} +1 -1
- package/dist/zonos-elements/p-2670438c.system.js +1 -0
- package/dist/zonos-elements/p-27f6930b.js +1 -0
- package/dist/zonos-elements/{p-eea0eb57.system.entry.js → p-2f869f2c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-30c661b3.system.entry.js +1 -0
- package/dist/zonos-elements/p-34bf7bbe.system.js +1 -0
- package/dist/zonos-elements/p-38913b2f.entry.js +1 -0
- package/dist/zonos-elements/p-3bec13dd.system.js +1 -0
- package/dist/zonos-elements/{p-00ec22b2.entry.js → p-43a22d85.entry.js} +1 -1
- package/dist/zonos-elements/p-44b50260.entry.js +1 -0
- package/dist/zonos-elements/p-48dc96f9.system.entry.js +1 -0
- package/dist/zonos-elements/p-4aa86184.system.entry.js +1 -0
- package/dist/zonos-elements/p-4d594c8e.system.js +1 -0
- package/dist/zonos-elements/p-4ffbb0d6.system.js +1 -0
- package/dist/zonos-elements/{p-452fb638.system.entry.js → p-5062dcf3.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c5cb2364.system.entry.js → p-57cee1b5.system.entry.js} +1 -1
- package/dist/zonos-elements/p-59a76f73.entry.js +1 -0
- package/dist/zonos-elements/{p-d556c6d1.system.entry.js → p-5afb9260.system.entry.js} +1 -1
- package/dist/zonos-elements/p-5e9b45f7.entry.js +1 -0
- package/dist/zonos-elements/{p-88ea9f82.entry.js → p-6626d240.entry.js} +1 -1
- package/dist/zonos-elements/p-6688473e.entry.js +1 -0
- package/dist/zonos-elements/p-6f23a26a.system.js +1 -0
- package/dist/zonos-elements/{p-82739127.js → p-73c737aa.js} +2 -2
- package/dist/zonos-elements/p-757d4c62.system.entry.js +1 -0
- package/dist/zonos-elements/p-7aa50ef2.entry.js +1 -0
- package/dist/zonos-elements/p-7e17667d.js +1 -0
- package/dist/zonos-elements/p-7e469c5c.entry.js +1 -0
- package/dist/zonos-elements/p-7f91617c.system.entry.js +1 -0
- package/dist/zonos-elements/p-81e3eb5b.js +1 -0
- package/dist/zonos-elements/p-82febf70.system.js +1 -0
- package/dist/zonos-elements/{p-770852bf.system.entry.js → p-836db369.system.entry.js} +1 -1
- package/dist/zonos-elements/p-83b3f824.system.entry.js +1 -0
- package/dist/zonos-elements/p-851011aa.system.entry.js +1 -0
- package/dist/zonos-elements/{p-936b54c1.entry.js → p-865536f0.entry.js} +1 -1
- package/dist/zonos-elements/{p-b1fd1ec2.system.entry.js → p-8792fef2.system.entry.js} +1 -1
- package/dist/zonos-elements/p-890bfc42.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c288c6da.system.entry.js → p-89a5e936.system.entry.js} +1 -1
- package/dist/zonos-elements/p-8af188f8.system.js +1 -0
- package/dist/zonos-elements/p-8d3a62fb.entry.js +1 -0
- package/dist/zonos-elements/{p-00ac999f.system.entry.js → p-8dc025c7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-944d00da.entry.js +1 -0
- package/dist/zonos-elements/p-9479f155.system.js +1 -0
- package/dist/zonos-elements/p-95dc475b.system.js +1 -0
- package/dist/zonos-elements/p-976afc17.system.js +1 -0
- package/dist/zonos-elements/p-97d56c21.system.entry.js +1 -0
- package/dist/zonos-elements/p-9b9bfb6d.entry.js +1 -0
- package/dist/zonos-elements/{p-55e2e4ed.entry.js → p-9f1bd9b8.entry.js} +1 -1
- package/dist/zonos-elements/p-9fa32fdf.js +1 -0
- package/dist/zonos-elements/p-a2a0bf4e.js +1 -0
- package/dist/zonos-elements/p-a610c24e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-9b8750f3.entry.js → p-aedd3911.entry.js} +1 -1
- package/dist/zonos-elements/{p-db628e49.system.entry.js → p-b5c31ca4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ba456282.system.entry.js +1 -0
- package/dist/zonos-elements/{p-31af91f0.entry.js → p-bd603c1a.entry.js} +1 -1
- package/dist/zonos-elements/p-c2442878.system.js +1 -1
- package/dist/zonos-elements/p-dc5fb21c.js +1 -0
- package/dist/zonos-elements/p-dc94d7eb.js +1 -0
- package/dist/zonos-elements/p-e5e64e16.system.js +1 -0
- package/dist/zonos-elements/{p-540cec7e.system.entry.js → p-e9e6bea7.system.entry.js} +1 -1
- package/dist/zonos-elements/p-eb9ee025.system.js +1 -0
- package/dist/zonos-elements/p-ed8ae947.system.entry.js +1 -0
- package/dist/zonos-elements/p-f1d9dd4e.entry.js +1 -0
- package/dist/zonos-elements/p-f3962950.system.entry.js +1 -0
- package/dist/zonos-elements/p-f4e976ae.entry.js +1 -0
- package/dist/zonos-elements/p-f513b231.entry.js +1 -0
- package/dist/zonos-elements/p-f64207fa.system.entry.js +1 -0
- package/dist/zonos-elements/{p-31975752.entry.js → p-fa322dc1.entry.js} +1 -1
- package/dist/zonos-elements/p-fb9fb873.system.entry.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/localization-39516612.js +0 -884
- package/dist/cjs/zonos-confirm-dialog_2.cjs.entry.js +0 -168
- package/dist/esm/localization-c5029ffc.js +0 -863
- package/dist/esm/zonos-confirm-dialog_2.entry.js +0 -163
- package/dist/esm-es5/cart-14f305b3.js +0 -1
- package/dist/esm-es5/localization-c5029ffc.js +0 -1
- package/dist/esm-es5/placeTestOrder-2250f719.js +0 -1
- package/dist/esm-es5/renderFallback-dbf1e3ae.js +0 -1
- package/dist/esm-es5/shouldRenderTaxIdInput-8bc112bb.js +0 -1
- package/dist/esm-es5/translationStore-690c4e04.js +0 -1
- package/dist/esm-es5/zonos-address_11.entry.js +0 -1
- package/dist/esm-es5/zonos-banner_2.entry.js +0 -1
- package/dist/esm-es5/zonos-cart-items_13.entry.js +0 -1
- package/dist/esm-es5/zonos-confirm-dialog_2.entry.js +0 -1
- package/dist/esm-es5/zonos-empty-state-payment_4.entry.js +0 -1
- package/dist/zonos-elements/p-03ff7b01.system.entry.js +0 -1
- package/dist/zonos-elements/p-100f6a88.system.entry.js +0 -1
- package/dist/zonos-elements/p-143d706b.entry.js +0 -1
- package/dist/zonos-elements/p-14d7489d.js +0 -1
- package/dist/zonos-elements/p-1d5aa016.system.js +0 -1
- package/dist/zonos-elements/p-1eae4987.entry.js +0 -1
- package/dist/zonos-elements/p-23b45714.system.entry.js +0 -1
- package/dist/zonos-elements/p-2557b96b.js +0 -1
- package/dist/zonos-elements/p-2ca8b037.entry.js +0 -1
- package/dist/zonos-elements/p-2dbcecf4.entry.js +0 -1
- package/dist/zonos-elements/p-30e835a8.entry.js +0 -1
- package/dist/zonos-elements/p-316f9052.system.entry.js +0 -1
- package/dist/zonos-elements/p-3185968f.entry.js +0 -1
- package/dist/zonos-elements/p-4e41143a.system.entry.js +0 -1
- package/dist/zonos-elements/p-52b87408.system.entry.js +0 -1
- package/dist/zonos-elements/p-561be3a2.system.js +0 -1
- package/dist/zonos-elements/p-5c680f72.js +0 -1
- package/dist/zonos-elements/p-5f77d19e.js +0 -1
- package/dist/zonos-elements/p-60469388.system.entry.js +0 -1
- package/dist/zonos-elements/p-652e80f0.system.js +0 -1
- package/dist/zonos-elements/p-74ca7739.entry.js +0 -1
- package/dist/zonos-elements/p-767a31a8.system.js +0 -1
- package/dist/zonos-elements/p-78a6e775.system.js +0 -1
- package/dist/zonos-elements/p-7c705c76.system.js +0 -1
- package/dist/zonos-elements/p-81ba2820.system.entry.js +0 -1
- package/dist/zonos-elements/p-8a23bbf5.js +0 -1
- package/dist/zonos-elements/p-905d2490.entry.js +0 -1
- package/dist/zonos-elements/p-93f2e1ee.system.entry.js +0 -1
- package/dist/zonos-elements/p-a0a4e43d.system.entry.js +0 -1
- package/dist/zonos-elements/p-a2819807.system.entry.js +0 -1
- package/dist/zonos-elements/p-a6e74856.entry.js +0 -1
- package/dist/zonos-elements/p-ae940a99.js +0 -1
- package/dist/zonos-elements/p-b7ea5f4f.system.entry.js +0 -1
- package/dist/zonos-elements/p-c1ecab92.entry.js +0 -1
- package/dist/zonos-elements/p-c50cc926.entry.js +0 -1
- package/dist/zonos-elements/p-cf765af3.system.js +0 -1
- package/dist/zonos-elements/p-e03e1a62.entry.js +0 -1
- package/dist/zonos-elements/p-e7874318.system.entry.js +0 -1
- package/dist/zonos-elements/p-e8949e7e.entry.js +0 -1
- package/dist/zonos-elements/p-ea0b5d10.system.js +0 -1
- package/dist/zonos-elements/p-eae3462c.entry.js +0 -1
- package/dist/zonos-elements/p-eeb1081e.js +0 -1
- package/dist/zonos-elements/p-f892595d.system.entry.js +0 -1
- package/dist/zonos-elements/p-fd3b46ee.entry.js +0 -1
|
@@ -6,6 +6,7 @@ import { zonosStore, zonosStoreFontFamily, zonosStoreInitSetting, } from "../sto
|
|
|
6
6
|
import { getZonosSettings } from "../utils/api/getZonosSettings";
|
|
7
7
|
import { initCheckout } from "../utils/checkout/initCheckout";
|
|
8
8
|
import { initCollect } from "../utils/checkout/initCollect";
|
|
9
|
+
import { initInvoice } from "../utils/checkout/initInvoice";
|
|
9
10
|
import { handleFetch } from "../utils/handleFetch";
|
|
10
11
|
import { initHello } from "../utils/hello/initHello";
|
|
11
12
|
import { CheckoutAddressService } from "../utils/iframe/CheckoutAddressService";
|
|
@@ -36,6 +37,18 @@ export class ZonosController {
|
|
|
36
37
|
void initCollect();
|
|
37
38
|
log('init Collect element');
|
|
38
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Method to initialize Collect element
|
|
42
|
+
*/
|
|
43
|
+
async initInvoiceElement(stripe) {
|
|
44
|
+
if (!stripe) {
|
|
45
|
+
log('Stripe is not loaded yet - cannot init Invoice element', 'warn');
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
stripeStore.stripe = stripe;
|
|
49
|
+
void initInvoice();
|
|
50
|
+
log('init Invoice element');
|
|
51
|
+
}
|
|
39
52
|
/**
|
|
40
53
|
* Init zonos notification
|
|
41
54
|
*/
|
|
@@ -108,7 +121,9 @@ export class ZonosController {
|
|
|
108
121
|
return;
|
|
109
122
|
}
|
|
110
123
|
// Skip injecting custom HTML for legacy checkout and collect
|
|
111
|
-
if (!window.Zonos.isLegacyCheckout ||
|
|
124
|
+
if (!window.Zonos.isLegacyCheckout ||
|
|
125
|
+
window.Zonos.isCollect ||
|
|
126
|
+
window.Zonos.isInvoice) {
|
|
112
127
|
log('=== Skip injecting custom HTML for hosted checkout', 'info');
|
|
113
128
|
return;
|
|
114
129
|
}
|
|
@@ -157,7 +172,7 @@ export class ZonosController {
|
|
|
157
172
|
// Don't allow to override subscription status
|
|
158
173
|
subscriptionStatus: undefined
|
|
159
174
|
});
|
|
160
|
-
if (window.Zonos.isCollect) {
|
|
175
|
+
if (window.Zonos.isCollect || window.Zonos.isInvoice) {
|
|
161
176
|
return Object.assign(Object.assign({}, this.config), { checkoutSettings: baseCheckoutConfig, helloSettings: Object.assign(Object.assign({}, this.config.helloSettings), {
|
|
162
177
|
// No need to show hello for collect
|
|
163
178
|
visibilityStatus: 'DISABLED'
|
|
@@ -235,7 +250,7 @@ export class ZonosController {
|
|
|
235
250
|
log('Checkout failed to load -- missing publishable key', 'warn');
|
|
236
251
|
return;
|
|
237
252
|
}
|
|
238
|
-
if (window.Zonos.isCollect) {
|
|
253
|
+
if (window.Zonos.isCollect || window.Zonos.isInvoice) {
|
|
239
254
|
// send publishable key out to load stripe
|
|
240
255
|
this.stripeInitEvent.emit({
|
|
241
256
|
publishableKey: publishableKey.token,
|
|
@@ -313,7 +328,7 @@ export class ZonosController {
|
|
|
313
328
|
zonosStore.organizationName = organizationName;
|
|
314
329
|
}
|
|
315
330
|
render() {
|
|
316
|
-
return h(Host, { key: '
|
|
331
|
+
return h(Host, { key: '8ac43cd7dc03d654f554022653f3e852876b954b', class: "zonos--elements" });
|
|
317
332
|
}
|
|
318
333
|
static get is() { return "zonos-controller"; }
|
|
319
334
|
static get encapsulation() { return "shadow"; }
|
|
@@ -460,6 +475,32 @@ export class ZonosController {
|
|
|
460
475
|
"tags": []
|
|
461
476
|
}
|
|
462
477
|
},
|
|
478
|
+
"initInvoiceElement": {
|
|
479
|
+
"complexType": {
|
|
480
|
+
"signature": "(stripe: Stripe) => Promise<void>",
|
|
481
|
+
"parameters": [{
|
|
482
|
+
"name": "stripe",
|
|
483
|
+
"type": "Stripe",
|
|
484
|
+
"docs": ""
|
|
485
|
+
}],
|
|
486
|
+
"references": {
|
|
487
|
+
"Promise": {
|
|
488
|
+
"location": "global",
|
|
489
|
+
"id": "global::Promise"
|
|
490
|
+
},
|
|
491
|
+
"Stripe": {
|
|
492
|
+
"location": "import",
|
|
493
|
+
"path": "@stripe/stripe-js",
|
|
494
|
+
"id": "node_modules::Stripe"
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"return": "Promise<void>"
|
|
498
|
+
},
|
|
499
|
+
"docs": {
|
|
500
|
+
"text": "Method to initialize Collect element",
|
|
501
|
+
"tags": []
|
|
502
|
+
}
|
|
503
|
+
},
|
|
463
504
|
"setupGoogleFont": {
|
|
464
505
|
"complexType": {
|
|
465
506
|
"signature": "(overrideFont?: string) => Promise<void>",
|
|
@@ -52,7 +52,7 @@ export class ZonosPaypalPayment {
|
|
|
52
52
|
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '503c2a2f4d6dd0d6c10468f4bbe915610cf7008e', class: "zonos--paypal-payment zonos--elements" }, h("div", { key: 'c1d2c15bf6f096c3666f9d4e8085c5fbe2c637a7', class: "zonos--payment-paypal-container" })));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "zonos-paypal-payment"; }
|
|
58
58
|
static get encapsulation() { return "scoped"; }
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { createStore } from "@stencil/store";
|
|
2
|
+
import { cartStore, cartStoreUpdateSelectedShippingOption, } from "./cart";
|
|
3
|
+
import { stripeStore, stripeStoreBuildAddressForPartyCreate, } from "./stripe";
|
|
4
|
+
import { storageStore } from "../storageStore";
|
|
5
|
+
import { zonosStore } from "../zonosStore";
|
|
6
|
+
import { handleFetch } from "../../utils/handleFetch";
|
|
7
|
+
import { allLogs } from "../../utils/logging/log";
|
|
8
|
+
import { logError } from "../../utils/logging/logError";
|
|
9
|
+
import { sendErrorLog } from "../../utils/logging/sendErrorLog";
|
|
10
|
+
const { reset: invoiceStoreReset, state: invoiceStore } = createStore(() => ({
|
|
11
|
+
amountTotalDue: null,
|
|
12
|
+
isFetchingPayorInfo: true,
|
|
13
|
+
landedCostShortId: null,
|
|
14
|
+
partyBillingId: null,
|
|
15
|
+
payorAddress: null,
|
|
16
|
+
}));
|
|
17
|
+
const invoiceStoreInitShippingInfo = async ({ landedCostId, retries = 5, }) => {
|
|
18
|
+
var _a, _b, _c;
|
|
19
|
+
invoiceStore.isFetchingPayorInfo = true;
|
|
20
|
+
const response = await handleFetch('/api/zonos-elements/invoice/get-payor-info-by-lc-id', {
|
|
21
|
+
body: {
|
|
22
|
+
landedCostId,
|
|
23
|
+
},
|
|
24
|
+
method: 'POST',
|
|
25
|
+
});
|
|
26
|
+
if (response.errors.length) {
|
|
27
|
+
if (retries > 0) {
|
|
28
|
+
// Wait for 1 second before retrying
|
|
29
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
30
|
+
// Keep retrying until we get the shipping address or we run out of retries
|
|
31
|
+
return invoiceStoreInitShippingInfo({
|
|
32
|
+
landedCostId,
|
|
33
|
+
retries: retries - 1,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
invoiceStore.landedCostShortId = ((_a = response.json) === null || _a === void 0 ? void 0 : _a.landedCostShortId) || null;
|
|
39
|
+
invoiceStore.isFetchingPayorInfo = false;
|
|
40
|
+
invoiceStore.payorAddress = ((_b = response.json) === null || _b === void 0 ? void 0 : _b.payor) || null;
|
|
41
|
+
const checkoutSessionSubtotals = (_c = cartStore.checkoutSession) === null || _c === void 0 ? void 0 : _c.subtotals;
|
|
42
|
+
invoiceStore.amountTotalDue = (checkoutSessionSubtotals === null || checkoutSessionSubtotals === void 0 ? void 0 : checkoutSessionSubtotals.items) || 0;
|
|
43
|
+
if (invoiceStore.amountTotalDue === 0) {
|
|
44
|
+
void sendErrorLog({
|
|
45
|
+
endpoint: 'INVOICE_NO_TOTAL_DUE',
|
|
46
|
+
errors: [],
|
|
47
|
+
metadata: {
|
|
48
|
+
landedCostId,
|
|
49
|
+
organizationId: zonosStore.organizationId,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const invoiceStoreAsyncAddressUpdate = async () => {
|
|
55
|
+
var _a, _b, _c, _d;
|
|
56
|
+
if (!((_a = stripeStore.stripeBillingAddressEventData) === null || _a === void 0 ? void 0 : _a.complete)) {
|
|
57
|
+
return {
|
|
58
|
+
partiesCreated: false,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const landedCostRootId = (_c = (_b = cartStore.checkoutSession) === null || _b === void 0 ? void 0 : _b.landedCost) === null || _c === void 0 ? void 0 : _c.rootId;
|
|
62
|
+
if (!landedCostRootId) {
|
|
63
|
+
// do nothing if we don't have selected landed cost
|
|
64
|
+
void sendErrorLog({
|
|
65
|
+
endpoint: 'PF_NO_SELECTED_LANDED_COST',
|
|
66
|
+
errors: ['No selected landed cost'],
|
|
67
|
+
metadata: {
|
|
68
|
+
allLogs,
|
|
69
|
+
cartId: window.Zonos.cartId,
|
|
70
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
return {
|
|
74
|
+
partiesCreated: false,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (!storageStore.checkoutSessionId) {
|
|
78
|
+
void sendErrorLog({
|
|
79
|
+
endpoint: 'INVOICE_NO_CHECKOUT_SESSION_ID',
|
|
80
|
+
errors: ['No checkout session id'],
|
|
81
|
+
metadata: {
|
|
82
|
+
allLogs,
|
|
83
|
+
cartId: window.Zonos.cartId,
|
|
84
|
+
landedCostRootId,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
return {
|
|
88
|
+
partiesCreated: false,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
const billingAddress = stripeStoreBuildAddressForPartyCreate({
|
|
92
|
+
address: stripeStore.stripeBillingAddressEventData.value.address,
|
|
93
|
+
firstName: stripeStore.stripeBillingAddressEventData.value.firstName,
|
|
94
|
+
lastName: stripeStore.stripeBillingAddressEventData.value.lastName,
|
|
95
|
+
name: stripeStore.stripeBillingAddressEventData.value.name,
|
|
96
|
+
phone: stripeStore.stripeBillingAddressEventData.value.phone,
|
|
97
|
+
});
|
|
98
|
+
const isE2ETest = new URLSearchParams(window.location.search).get('zonosE2ETest') === '1';
|
|
99
|
+
const { errors, json } = await handleFetch('/api/zonos-elements/create-billing-party', {
|
|
100
|
+
body: {
|
|
101
|
+
billingAddress,
|
|
102
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
103
|
+
companyName: stripeStore.companyName,
|
|
104
|
+
email: ((_d = stripeStore.stripeLinkEventData) === null || _d === void 0 ? void 0 : _d.value.email) || '',
|
|
105
|
+
isTest: isE2ETest,
|
|
106
|
+
rootId: landedCostRootId,
|
|
107
|
+
},
|
|
108
|
+
method: 'POST',
|
|
109
|
+
});
|
|
110
|
+
if (errors.length || !json) {
|
|
111
|
+
logError('Error occurs when creating billing party', JSON.stringify(errors, null, 2));
|
|
112
|
+
void sendErrorLog({
|
|
113
|
+
endpoint: 'INVOICE_BILLING_PARTY_CREATE_FAILED',
|
|
114
|
+
errors: ['[INVOICE] Failed to create billing party'],
|
|
115
|
+
metadata: {
|
|
116
|
+
allLogs,
|
|
117
|
+
cartId: window.Zonos.cartId,
|
|
118
|
+
checkoutSessionId: storageStore.checkoutSessionId,
|
|
119
|
+
errors,
|
|
120
|
+
json,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
return {
|
|
124
|
+
partiesCreated: false,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
invoiceStore.partyBillingId = json.billToPartyId;
|
|
128
|
+
return {
|
|
129
|
+
partiesCreated: true,
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
const invoiceStoreUpdateSelectedShippingOption = async (checkoutSession) => {
|
|
133
|
+
const landedCost = checkoutSession.landedCost;
|
|
134
|
+
if (!landedCost) {
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
// Convert the landed cost to the format that cartStore expects
|
|
138
|
+
cartStore.landedCostData = [
|
|
139
|
+
Object.assign(Object.assign({}, checkoutSession), { landedCost: Object.assign({}, landedCost), landedCostId: landedCost.id }),
|
|
140
|
+
];
|
|
141
|
+
return cartStoreUpdateSelectedShippingOption({
|
|
142
|
+
// No need to update checkout session again, we already called it when starting collect, only need to apply subtotals here to utilize the cart store
|
|
143
|
+
applySubtotalsOnly: true,
|
|
144
|
+
landedCostId: landedCost.id,
|
|
145
|
+
selectedShippingOption: landedCost.shipmentRating,
|
|
146
|
+
});
|
|
147
|
+
};
|
|
148
|
+
export { invoiceStore, invoiceStoreAsyncAddressUpdate, invoiceStoreInitShippingInfo, invoiceStoreReset, invoiceStoreUpdateSelectedShippingOption, };
|
|
@@ -94,7 +94,10 @@ const { onChange: stripeStoreOnChange, reset, state: stripeStore, } = createStor
|
|
|
94
94
|
const getStripeOptions = ({ clientSecret, overrideBorderRadius, overridePrimaryColor, overrideSecondaryColor, overrideTheme, paypalEnabled, }) => {
|
|
95
95
|
const primaryColor = overridePrimaryColor || zonosStore.appearance.colorPrimary;
|
|
96
96
|
const secondaryColor = overrideSecondaryColor || zonosStore.appearance.colorSecondary;
|
|
97
|
-
const
|
|
97
|
+
const isDark = window.Zonos.isCollect || window.Zonos.isInvoice
|
|
98
|
+
? zonosStore.appearance.theme === 'DARK'
|
|
99
|
+
: primaryColor && isDarkColor(primaryColor);
|
|
100
|
+
const themeBasedColor = isDark ? 'night' : 'flat';
|
|
98
101
|
// if overrideTheme is provided, use it. Otherwise, use theme based on primary color
|
|
99
102
|
const theme = overrideTheme === 'DARK' ? 'night' : 'flat';
|
|
100
103
|
const paypalPaymentType = paypalEnabled ? ['external_paypal'] : [];
|
|
@@ -630,6 +633,7 @@ const stripeStoreMessageBasedOnStatus = (status) => {
|
|
|
630
633
|
let messages = [];
|
|
631
634
|
let isError = true;
|
|
632
635
|
const isCollect = window.Zonos.isCollect;
|
|
636
|
+
const isInvoice = window.Zonos.isInvoice;
|
|
633
637
|
// Inspect the PaymentIntent `status` to indicate the status of the payment
|
|
634
638
|
// to your customer.
|
|
635
639
|
//
|
|
@@ -644,7 +648,7 @@ const stripeStoreMessageBasedOnStatus = (status) => {
|
|
|
644
648
|
'',
|
|
645
649
|
translate("We've sent an email confirmation of the order details for your review. And our team is carefully preparing your order so it arrives on time."),
|
|
646
650
|
];
|
|
647
|
-
if (isCollect) {
|
|
651
|
+
if (isCollect || isInvoice) {
|
|
648
652
|
messages = [
|
|
649
653
|
translate('Thank you for submitting your payment. We appreciate your prompt attention.'),
|
|
650
654
|
'',
|
|
@@ -852,7 +856,8 @@ export const getCheckoutSessionBody = () => {
|
|
|
852
856
|
cartId: window.Zonos.cartId,
|
|
853
857
|
currency: ((_a = cartStore.items.find(Boolean)) === null || _a === void 0 ? void 0 : _a.currencyCode) || '',
|
|
854
858
|
customerAuthenticationToken: cartStore.customerAuthenticationToken || undefined,
|
|
855
|
-
isCollect: window.Zonos.isCollect,
|
|
859
|
+
isCollect: !!window.Zonos.isCollect,
|
|
860
|
+
isInvoice: !!window.Zonos.isInvoice,
|
|
856
861
|
itemsAmount: total,
|
|
857
862
|
metadata: [
|
|
858
863
|
{
|
|
@@ -278,6 +278,9 @@ export const stringsArabic = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'جلسة غير صالحة',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'فاتورة:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'جزيرة',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsArabic = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'جارٍ معالجة الدفع. سنحدثك عند استلام الدفعة.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'إجمالي الدفع',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'رمز تخليص العملاء الشخصيين',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsArabic = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'دفع الرسوم والضرائب مقدمًا عند الدفع',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'سياسة الخصوصية',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'المتابعة مع الطلب',
|
|
439
448
|
},
|
|
@@ -279,6 +279,9 @@ export const stringsBase = {
|
|
|
279
279
|
'Invalid session': {
|
|
280
280
|
value: 'Invalid session',
|
|
281
281
|
},
|
|
282
|
+
'Invoice:': {
|
|
283
|
+
value: 'Invoice:',
|
|
284
|
+
},
|
|
282
285
|
Island: {
|
|
283
286
|
value: 'Island',
|
|
284
287
|
},
|
|
@@ -393,6 +396,9 @@ export const stringsBase = {
|
|
|
393
396
|
"Payment processing. We'll update you when payment is received.": {
|
|
394
397
|
value: "Payment processing. We'll update you when payment is received.",
|
|
395
398
|
},
|
|
399
|
+
'Payment total': {
|
|
400
|
+
value: 'Payment total',
|
|
401
|
+
},
|
|
396
402
|
'Personal Customers Clearance Code': {
|
|
397
403
|
value: 'Personal Customers Clearance Code',
|
|
398
404
|
},
|
|
@@ -435,6 +441,9 @@ export const stringsBase = {
|
|
|
435
441
|
'Prepay duties and taxes at checkout': {
|
|
436
442
|
value: 'Prepay duties and taxes at checkout',
|
|
437
443
|
},
|
|
444
|
+
'Privacy policy': {
|
|
445
|
+
value: 'Privacy policy',
|
|
446
|
+
},
|
|
438
447
|
'Proceed with order': {
|
|
439
448
|
value: 'Proceed with order',
|
|
440
449
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsChinese = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: '无效的会话',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: '发票:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: '岛',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsChinese = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: '付款处理中。付款收到后,我们将通知您。',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: '付款总额',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: '个人客户清关代码',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsChinese = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: '在结账时预付关税和税款',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: '隐私政策',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: '继续订单',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsDanish = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Ugyldig session',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Faktura:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Ø',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsDanish = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Behandler betaling. Vi opdaterer dig, når betalingen er modtaget.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Betaling i alt',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Personlige Kunders Toldkode',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsDanish = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'Betal told og skatter på forhånd ved kassen',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Privatlivspolitik',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'Fortsæt med ordren',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsDutch = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Ongeldige sessie',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Factuur:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Eiland',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsDutch = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Betaling verwerken. We brengen je op de hoogte wanneer de betaling is ontvangen.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Betalingstotaal',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Persoonlijke Klanten Invoercode',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsDutch = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'Heffingen en belastingen vooraf betalen bij het afrekenen',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Privacybeleid',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'Doorgaan met de bestelling',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsFrench = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Session invalide',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Facture:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Île',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsFrench = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Traitement du paiement en cours. Nous vous tiendrons informé dès réception du paiement.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Total du paiement',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Code de Dédouanement des Clients Personnels',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsFrench = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: "Payez les droits et taxes à l'avance lors du checkout",
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Politique de confidentialité',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'Procéder à la commande',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsGerman = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Ungültige Sitzung',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Rechnung:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Insel',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsGerman = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Zahlung wird verarbeitet. Wir informieren Sie, sobald die Zahlung eingegangen ist.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Zahlungssumme',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Zollabfertigungscode für Privatkunden',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsGerman = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'Zölle und Steuern im Voraus bezahlen',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Datenschutzrichtlinie',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'Mit der Bestellung fortfahren',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsHebrew = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'סשן לא חוקי',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'חשבונית:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'אי',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsHebrew = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'התשלום מעובד. נעדכן אותך כשהתשלום יתקבל.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'סך התשלום',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'קוד שחרור מכס ללקוחות פרטיים',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsHebrew = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'שלם מכסים ומסים מראש בעת התשלום',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'מדיניות פרטיות',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'המשך עם ההזמנה',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsIndonesian = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Sesi tidak valid',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Faktur:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Pulau',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsIndonesian = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Pemrosesan pembayaran. Kami akan memberi Anda pembaruan ketika pembayaran diterima.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Total pembayaran',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Kode Pembebasan Pelanggan Pribadi',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsIndonesian = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'Pembayaran bea masuk dan pajak di kasir',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Kebijakan privasi',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: 'Lanjutkan dengan pesanan',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsItalian = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: 'Sessione non valida',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: 'Fattura:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: 'Isola',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsItalian = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: 'Elaborazione pagamento in corso. Ti aggiorneremo quando il pagamento sarà ricevuto.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: 'Totale del pagamento',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: 'Codice di Sdoganamento per Clienti Personali',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsItalian = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: 'Paga dazi e tasse anticipatamente',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'Informativa sulla privacy',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: "Procedi con l'ordine",
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsJapanese = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: '無効なセッション',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: '請求書:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: '島',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsJapanese = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: '支払処理中です。入金が確認された際に更新いたします。',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: '支払い合計',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: '個人顧客通関コード',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsJapanese = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: ' checkout時に関税と税金を前払い',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: 'プライバシーポリシー',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: '注文を進める',
|
|
439
448
|
},
|
|
@@ -278,6 +278,9 @@ export const stringsKorean = {
|
|
|
278
278
|
'Invalid session': {
|
|
279
279
|
value: '유효하지 않은 세션',
|
|
280
280
|
},
|
|
281
|
+
'Invoice:': {
|
|
282
|
+
value: '송장:',
|
|
283
|
+
},
|
|
281
284
|
Island: {
|
|
282
285
|
value: '섬',
|
|
283
286
|
},
|
|
@@ -392,6 +395,9 @@ export const stringsKorean = {
|
|
|
392
395
|
"Payment processing. We'll update you when payment is received.": {
|
|
393
396
|
value: '결제 처리 중. 결제가 접수되면 알려드리겠습니다.',
|
|
394
397
|
},
|
|
398
|
+
'Payment total': {
|
|
399
|
+
value: '결제 총액',
|
|
400
|
+
},
|
|
395
401
|
'Personal Customers Clearance Code': {
|
|
396
402
|
value: '개인 고객 통관 코드',
|
|
397
403
|
},
|
|
@@ -434,6 +440,9 @@ export const stringsKorean = {
|
|
|
434
440
|
'Prepay duties and taxes at checkout': {
|
|
435
441
|
value: '체크아웃 시 관세와 세금 선불',
|
|
436
442
|
},
|
|
443
|
+
'Privacy policy': {
|
|
444
|
+
value: '개인정보 처리방침',
|
|
445
|
+
},
|
|
437
446
|
'Proceed with order': {
|
|
438
447
|
value: '주문 진행',
|
|
439
448
|
},
|