@zonos/elements 1.3.233 → 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} +75 -92
- 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-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} +15 -31
- 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-1bfae137.entry.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-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-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-84078c57.system.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-c0c458f7.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
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
+
import { cartStore, cartStoreNextStep, cartStoreOnChange, } from "../../../store/checkout/cart";
|
|
3
|
+
import { invoiceStore } from "../../../store/checkout/invoice";
|
|
4
|
+
import { paypalInitScript, paypalStore, } from "../../../store/checkout/paypal";
|
|
5
|
+
import { stripeStore } from "../../../store/checkout/stripe";
|
|
6
|
+
import { translate } from "../../../store/translationStore";
|
|
7
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
8
|
+
import { placeTestOrder } from "../../../utils/api/placeTestOrder";
|
|
9
|
+
import { getIsStagingMode } from "../../../utils/checkout/getIsStagingMode";
|
|
10
|
+
import { getIsTestMode } from "../../../utils/checkout/getIsTestMode";
|
|
11
|
+
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
12
|
+
import { log } from "../../../utils/logging/log";
|
|
13
|
+
import { submitGtag } from "../../../utils/submitGtag";
|
|
14
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
15
|
+
import CheckmarkLineIcon from "./assets/CheckmarkLineIcon.svg";
|
|
16
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
17
|
+
import RemoveLineIcon from "./assets/RemoveLineIcon.svg";
|
|
18
|
+
export class ZonosInvoicePayment {
|
|
19
|
+
constructor() {
|
|
20
|
+
this.storeUnsubscribeList = [];
|
|
21
|
+
/**
|
|
22
|
+
* Whether or not the continue button is loading
|
|
23
|
+
*/
|
|
24
|
+
this.continueLoading = false;
|
|
25
|
+
/**
|
|
26
|
+
* Show error banner when the form is not complete, and user clicks on `Submit` button
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
this.showErrorBanner = false;
|
|
30
|
+
/**
|
|
31
|
+
* Show payment error banner when the payment is failed
|
|
32
|
+
*/
|
|
33
|
+
this.hasStripePaymentError = false;
|
|
34
|
+
/**
|
|
35
|
+
* Error message when the staging order creation is failed
|
|
36
|
+
*/
|
|
37
|
+
this.stagingOrderCreateErrorMessage = '';
|
|
38
|
+
/**
|
|
39
|
+
* Internal state to handle continue loading
|
|
40
|
+
*/
|
|
41
|
+
this.internalContinueLoading = this.continueLoading;
|
|
42
|
+
this.handleValidate = () => {
|
|
43
|
+
var _a;
|
|
44
|
+
return !!((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.complete);
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* handler for continue button click
|
|
48
|
+
*/
|
|
49
|
+
this.continueClickHandler = async ({ currencyCode, }) => {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
if (!this.handleValidate()) {
|
|
52
|
+
// Attempt to get the value of the billing address element to validate the form
|
|
53
|
+
void ((_a = stripeStore.stripeBillingAddressElement) === null || _a === void 0 ? void 0 : _a.getValue());
|
|
54
|
+
this.showErrorBanner = true;
|
|
55
|
+
// Attempt to submit the form so the missing input error will be shown in Stripe
|
|
56
|
+
void ((_b = stripeStore.stripeElements) === null || _b === void 0 ? void 0 : _b.submit());
|
|
57
|
+
setTimeout(() => {
|
|
58
|
+
var _a;
|
|
59
|
+
(_a = this.ele.querySelector('zonos-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
60
|
+
behavior: 'smooth',
|
|
61
|
+
});
|
|
62
|
+
}, 10);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
stripeStore.checkoutSettlementCurrency = currencyCode;
|
|
66
|
+
// submit google tag when the form is complete
|
|
67
|
+
submitGtag('zonos-checkout-payment-info');
|
|
68
|
+
this.continueClicked.emit();
|
|
69
|
+
};
|
|
70
|
+
this.copyCardToClipboard = async (cardNumber) => {
|
|
71
|
+
try {
|
|
72
|
+
await navigator.clipboard.writeText(cardNumber);
|
|
73
|
+
}
|
|
74
|
+
catch (_a) {
|
|
75
|
+
// Copy happens in the iframe and it's not allowed to copy to the clipboard
|
|
76
|
+
const hiddenTextarea = document.createElement('textarea');
|
|
77
|
+
hiddenTextarea.style.position = 'fixed';
|
|
78
|
+
hiddenTextarea.style.left = '-1000px';
|
|
79
|
+
hiddenTextarea.style.top = '-1000px';
|
|
80
|
+
hiddenTextarea.style.width = '1px';
|
|
81
|
+
hiddenTextarea.style.height = '1px';
|
|
82
|
+
hiddenTextarea.value = cardNumber;
|
|
83
|
+
hiddenTextarea.id = 'zonos-copy-card-number';
|
|
84
|
+
document.body.appendChild(hiddenTextarea);
|
|
85
|
+
hiddenTextarea.select();
|
|
86
|
+
// Have to use deprecated method execCommand because it's the only way to copy to the clipboard in the iframe
|
|
87
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
88
|
+
document.execCommand('copy');
|
|
89
|
+
document.body.removeChild(hiddenTextarea);
|
|
90
|
+
}
|
|
91
|
+
window.Zonos.showNotification({
|
|
92
|
+
message: translate('Card number copied to clipboard'),
|
|
93
|
+
timeout: 4000,
|
|
94
|
+
type: 'success',
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
this.placeTestOrder = async () => {
|
|
98
|
+
this.internalContinueLoading = true;
|
|
99
|
+
const { errors } = await placeTestOrder();
|
|
100
|
+
if (errors.length) {
|
|
101
|
+
this.stagingOrderCreateErrorMessage =
|
|
102
|
+
errors[0] || 'Failed to create staging order. Please try again.';
|
|
103
|
+
this.internalContinueLoading = false;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.internalContinueLoading = false;
|
|
107
|
+
// continue to the next step
|
|
108
|
+
cartStoreNextStep();
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
continueLoadingWatcher() {
|
|
112
|
+
this.internalContinueLoading = this.continueLoading;
|
|
113
|
+
}
|
|
114
|
+
stripePaymentErrorWatcher() {
|
|
115
|
+
if (this.hasStripePaymentError) {
|
|
116
|
+
setTimeout(() => {
|
|
117
|
+
var _a;
|
|
118
|
+
// scroll to the top of the page when the payment error is shown
|
|
119
|
+
(_a = this.ele.querySelector('zonos-banner')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
|
|
120
|
+
behavior: 'smooth',
|
|
121
|
+
});
|
|
122
|
+
}, 50);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
componentWillLoad() {
|
|
126
|
+
this.storeUnsubscribeList = [
|
|
127
|
+
cartStoreOnChange('currency', () => {
|
|
128
|
+
// start init paypal with the presentment currency when landed cost is fetched
|
|
129
|
+
void paypalInitScript({
|
|
130
|
+
currency: cartStore.currency,
|
|
131
|
+
});
|
|
132
|
+
}),
|
|
133
|
+
];
|
|
134
|
+
// start init paypal with the presentment currency when landed cost is fetched
|
|
135
|
+
void paypalInitScript({
|
|
136
|
+
currency: cartStore.currency,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
disconnectedCallback() {
|
|
140
|
+
this.storeUnsubscribeList.forEach(unsubscribe => unsubscribe());
|
|
141
|
+
}
|
|
142
|
+
render() {
|
|
143
|
+
var _a;
|
|
144
|
+
this.hasStripePaymentError = stripeStore.hasPaymentError;
|
|
145
|
+
if (!stripeStore.stripeElements) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
if (!stripeStore.clientSecret) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
// start validate on typing after error banner is shown, and hide it if the form is complete
|
|
152
|
+
if (this.showErrorBanner) {
|
|
153
|
+
this.showErrorBanner = !this.handleValidate();
|
|
154
|
+
}
|
|
155
|
+
const isTestMode = getIsTestMode();
|
|
156
|
+
const isStagingMode = cartStore.isStagingMode || getIsStagingMode();
|
|
157
|
+
const isPaypalTabSelected = ((_a = stripeStore.stripePaymentEventData) === null || _a === void 0 ? void 0 : _a.value.type) === 'external_paypal';
|
|
158
|
+
const renderPayment = () => {
|
|
159
|
+
if (isStagingMode) {
|
|
160
|
+
// If in mobile, use the theme from the store since the UI is solely by theme
|
|
161
|
+
const theme = zonosStore.appearance.theme;
|
|
162
|
+
return (h(Fragment, null, this.stagingOrderCreateErrorMessage && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, this.stagingOrderCreateErrorMessage)), h("zonos-empty-state-payment", { emptyStateText: translate('No payment method needed for staging'), theme: theme }), h("div", { class: "zonos--group-btn" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.internalContinueLoading, onClick: () => {
|
|
163
|
+
void this.placeTestOrder();
|
|
164
|
+
}, size: "lg",
|
|
165
|
+
// use primary type when on mobile mode
|
|
166
|
+
variant: this.submitBtnType }, translate('Place test order')))));
|
|
167
|
+
}
|
|
168
|
+
if (stripeStore.isFetchingSession || invoiceStore.isFetchingPayorInfo) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return (h(Fragment, null, this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), this.hasStripePaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, stripeStore.customErrorMessage ||
|
|
172
|
+
translate("We couldn't complete your payment. Please verify the payment details and try again."))), paypalStore.paypalErrorMessage && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, paypalStore.paypalErrorMessage)), h("zonos-payment", null), h("div", { class: "zonos--group-btn" }, !isPaypalTabSelected && (h(Fragment, null, h("zonos-button", { backgroundColor: this.submitBtnColor, bold: true, isDisabled: this.continueLoading &&
|
|
173
|
+
stripeStore.checkoutSettlementCurrency === 'USD', loading: this.continueLoading &&
|
|
174
|
+
stripeStore.checkoutSettlementCurrency !== 'USD', onClick: async () => {
|
|
175
|
+
if (!cartStore.checkoutSession) {
|
|
176
|
+
log('Checkout session is not found');
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
await this.continueClickHandler({
|
|
180
|
+
currencyCode: cartStore.checkoutSession.subtotals
|
|
181
|
+
.presentmentCurrencyCode,
|
|
182
|
+
});
|
|
183
|
+
}, size: "lg",
|
|
184
|
+
// use primary type when on mobile mode
|
|
185
|
+
variant: this.submitBtnType }, translate('Pay [orderTotal]', {
|
|
186
|
+
orderTotal: renderCheckoutCurrency({
|
|
187
|
+
amount: invoiceStore.amountTotalDue || 0,
|
|
188
|
+
isForeign: true,
|
|
189
|
+
}),
|
|
190
|
+
})), stripeStore.shouldRenderPayInUsdButton && (h("zonos-button", { class: "zonos--pay-in-base-currency-btn", isDisabled: this.continueLoading &&
|
|
191
|
+
stripeStore.checkoutSettlementCurrency !== 'USD', loading: this.continueLoading &&
|
|
192
|
+
stripeStore.checkoutSettlementCurrency === 'USD', onClick: async () => {
|
|
193
|
+
await this.continueClickHandler({
|
|
194
|
+
currencyCode: 'USD',
|
|
195
|
+
});
|
|
196
|
+
}, size: "lg", variant: "subtle" }, translate('Click to pay in USD'))))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
|
|
197
|
+
this.paypalSessionDone.emit(orderId);
|
|
198
|
+
}, onPaypalSessionFail: () => this.paypalSessionFailed.emit(), style: {
|
|
199
|
+
display: isPaypalTabSelected ? 'block' : 'none',
|
|
200
|
+
} })), isTestMode && (h("zonos-card", { backgroundColor: "gray-100", borderRadius: 12, class: "zonos--test-cards" }, h("zonos-v-stack", { spacing: 16 }, h("div", null, h("zonos-text", { type: "semiBoldLabel" }, translate('Test cards')), h("zonos-text", { textColor: "gray-700" }, translate('Click to copy the card number. Use any future expiration date and three number CVC.'))), h("zonos-button", { icon: h("zonos-icon", { content: CheckmarkLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4242424242424242') }, translate('Success'), " (****4242)"), h("zonos-button", { icon: h("zonos-icon", { content: RemoveLineIcon }), justifyContent: "flex-start", onClick: () => this.copyCardToClipboard('4000000000000002') }, translate('Failure'), " (****0002)")), h("zonos-notification", null)))));
|
|
201
|
+
};
|
|
202
|
+
return (h(Host, { class: "zonos--checkout-payment zonos--elements" }, h("div", { class: "zonos--group" }, h("zonos-text", { class: "zonos--title", type: "semiBoldSubheader" }, translate('Payment method')), renderPayment())));
|
|
203
|
+
}
|
|
204
|
+
static get is() { return "zonos-invoice-payment"; }
|
|
205
|
+
static get encapsulation() { return "scoped"; }
|
|
206
|
+
static get originalStyleUrls() {
|
|
207
|
+
return {
|
|
208
|
+
"$": ["zonos-invoice-payment.scss"]
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
static get styleUrls() {
|
|
212
|
+
return {
|
|
213
|
+
"$": ["zonos-invoice-payment.css"]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
static get properties() {
|
|
217
|
+
return {
|
|
218
|
+
"submitBtnType": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"mutable": false,
|
|
221
|
+
"complexType": {
|
|
222
|
+
"original": "HTMLZonosButtonElement['variant']",
|
|
223
|
+
"resolved": "\"danger\" | \"outline\" | \"primary\" | \"standard\" | \"subtle\" | \"success\" | \"warning\" | undefined",
|
|
224
|
+
"references": {
|
|
225
|
+
"HTMLZonosButtonElement": {
|
|
226
|
+
"location": "global",
|
|
227
|
+
"id": "global::HTMLZonosButtonElement"
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": false,
|
|
232
|
+
"optional": true,
|
|
233
|
+
"docs": {
|
|
234
|
+
"tags": [],
|
|
235
|
+
"text": "Whether or not the checkout is in mobile mode"
|
|
236
|
+
},
|
|
237
|
+
"getter": false,
|
|
238
|
+
"setter": false,
|
|
239
|
+
"attribute": "submit-btn-type",
|
|
240
|
+
"reflect": false
|
|
241
|
+
},
|
|
242
|
+
"continueLoading": {
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "boolean",
|
|
247
|
+
"resolved": "boolean",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Whether or not the continue button is loading"
|
|
255
|
+
},
|
|
256
|
+
"getter": false,
|
|
257
|
+
"setter": false,
|
|
258
|
+
"attribute": "continue-loading",
|
|
259
|
+
"reflect": false,
|
|
260
|
+
"defaultValue": "false"
|
|
261
|
+
},
|
|
262
|
+
"submitBtnColor": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "string",
|
|
267
|
+
"resolved": "string | undefined",
|
|
268
|
+
"references": {}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": true,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": "Submit button main color"
|
|
275
|
+
},
|
|
276
|
+
"getter": false,
|
|
277
|
+
"setter": false,
|
|
278
|
+
"attribute": "submit-btn-color",
|
|
279
|
+
"reflect": false
|
|
280
|
+
},
|
|
281
|
+
"overridePrimaryColor": {
|
|
282
|
+
"type": "string",
|
|
283
|
+
"mutable": false,
|
|
284
|
+
"complexType": {
|
|
285
|
+
"original": "string",
|
|
286
|
+
"resolved": "string | undefined",
|
|
287
|
+
"references": {}
|
|
288
|
+
},
|
|
289
|
+
"required": false,
|
|
290
|
+
"optional": true,
|
|
291
|
+
"docs": {
|
|
292
|
+
"tags": [],
|
|
293
|
+
"text": "Primary color to override primary color from appearance primary color in setting."
|
|
294
|
+
},
|
|
295
|
+
"getter": false,
|
|
296
|
+
"setter": false,
|
|
297
|
+
"attribute": "override-primary-color",
|
|
298
|
+
"reflect": false
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
static get states() {
|
|
303
|
+
return {
|
|
304
|
+
"showErrorBanner": {},
|
|
305
|
+
"hasStripePaymentError": {},
|
|
306
|
+
"stagingOrderCreateErrorMessage": {},
|
|
307
|
+
"internalContinueLoading": {}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
static get events() {
|
|
311
|
+
return [{
|
|
312
|
+
"method": "continueClicked",
|
|
313
|
+
"name": "continueClicked",
|
|
314
|
+
"bubbles": true,
|
|
315
|
+
"cancelable": true,
|
|
316
|
+
"composed": true,
|
|
317
|
+
"docs": {
|
|
318
|
+
"tags": [],
|
|
319
|
+
"text": "Event to emit when the continue button is clicked"
|
|
320
|
+
},
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "void",
|
|
323
|
+
"resolved": "void",
|
|
324
|
+
"references": {}
|
|
325
|
+
}
|
|
326
|
+
}, {
|
|
327
|
+
"method": "paypalSessionFailed",
|
|
328
|
+
"name": "paypalSessionFailed",
|
|
329
|
+
"bubbles": true,
|
|
330
|
+
"cancelable": true,
|
|
331
|
+
"composed": true,
|
|
332
|
+
"docs": {
|
|
333
|
+
"tags": [],
|
|
334
|
+
"text": "Event to emit when the paypal session failed"
|
|
335
|
+
},
|
|
336
|
+
"complexType": {
|
|
337
|
+
"original": "void",
|
|
338
|
+
"resolved": "void",
|
|
339
|
+
"references": {}
|
|
340
|
+
}
|
|
341
|
+
}, {
|
|
342
|
+
"method": "paypalSessionDone",
|
|
343
|
+
"name": "paypalSessionDone",
|
|
344
|
+
"bubbles": true,
|
|
345
|
+
"cancelable": true,
|
|
346
|
+
"composed": true,
|
|
347
|
+
"docs": {
|
|
348
|
+
"tags": [],
|
|
349
|
+
"text": "Event to emit when the paypal session is done"
|
|
350
|
+
},
|
|
351
|
+
"complexType": {
|
|
352
|
+
"original": "string",
|
|
353
|
+
"resolved": "string",
|
|
354
|
+
"references": {}
|
|
355
|
+
}
|
|
356
|
+
}];
|
|
357
|
+
}
|
|
358
|
+
static get elementRef() { return "ele"; }
|
|
359
|
+
static get watchers() {
|
|
360
|
+
return [{
|
|
361
|
+
"propName": "continueLoading",
|
|
362
|
+
"methodName": "continueLoadingWatcher"
|
|
363
|
+
}, {
|
|
364
|
+
"propName": "hasStripePaymentError",
|
|
365
|
+
"methodName": "stripePaymentErrorWatcher"
|
|
366
|
+
}];
|
|
367
|
+
}
|
|
368
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
position: sticky;
|
|
36
|
+
top: 0;
|
|
37
|
+
background-color: var(--zonos-elements-gray-0);
|
|
38
|
+
z-index: 1;
|
|
39
|
+
}
|
|
40
|
+
:host .zonos--total-pay {
|
|
41
|
+
margin: 8px 0 24px;
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-grow: 1;
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: 48px;
|
|
47
|
+
}
|
|
48
|
+
:host .zonos--total-pay zonos-text {
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
}
|
|
51
|
+
:host .zonos--total-pay::after {
|
|
52
|
+
content: "";
|
|
53
|
+
position: relative;
|
|
54
|
+
height: 1px;
|
|
55
|
+
width: 100%;
|
|
56
|
+
background: var(--zonos-elements-gray-200);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host(.mobile),
|
|
60
|
+
:host(.tablet) {
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-direction: column;
|
|
63
|
+
gap: 8px;
|
|
64
|
+
padding: 4px 0;
|
|
65
|
+
background-color: transparent;
|
|
66
|
+
position: relative;
|
|
67
|
+
}
|
|
68
|
+
:host(.mobile) .zonos--total-pay,
|
|
69
|
+
:host(.tablet) .zonos--total-pay {
|
|
70
|
+
margin: 0;
|
|
71
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { invoiceStore } from "../../../store/checkout/invoice";
|
|
3
|
+
import { translate } from "../../../store/translationStore";
|
|
4
|
+
import { zonosStore } from "../../../store/zonosStore";
|
|
5
|
+
import { isInvoiceMobile, isInvoiceTablet, } from "../../../utils/checkout/isInvoiceMobileTablet";
|
|
6
|
+
import { renderCheckoutCurrency } from "../../../utils/checkout/renderCheckoutCurrency";
|
|
7
|
+
import { classes } from "../../../utils/classes";
|
|
8
|
+
import { renderFallback } from "../../../utils/renderFallback";
|
|
9
|
+
export class ZonosInvoiceReview {
|
|
10
|
+
constructor() {
|
|
11
|
+
/**
|
|
12
|
+
* Whether or not the component is being rendered with mobile styles
|
|
13
|
+
*/
|
|
14
|
+
this.mobile = false;
|
|
15
|
+
/**
|
|
16
|
+
* Whether or not the component is being rendered with tablet styles
|
|
17
|
+
*/
|
|
18
|
+
this.tablet = false;
|
|
19
|
+
/**
|
|
20
|
+
* Whether or not to show the collapse icon
|
|
21
|
+
* This is controled from the collapsed state of the zonos-collapse component
|
|
22
|
+
* to show the collapse icon
|
|
23
|
+
*/
|
|
24
|
+
this.collapsed = false;
|
|
25
|
+
this.isMobile = false;
|
|
26
|
+
this.isTablet = false;
|
|
27
|
+
this.isLoading = true;
|
|
28
|
+
}
|
|
29
|
+
handleWindowResize() {
|
|
30
|
+
this.isMobile = isInvoiceMobile(this.mobile);
|
|
31
|
+
this.isTablet = isInvoiceTablet(this.tablet);
|
|
32
|
+
}
|
|
33
|
+
componentWillLoad() {
|
|
34
|
+
this.handleWindowResize();
|
|
35
|
+
// Wait for the data to load
|
|
36
|
+
setTimeout(() => {
|
|
37
|
+
this.isLoading = false;
|
|
38
|
+
}, 1000);
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
const titleTextColor = this.isMobile ? 'gray-1000' : 'gray-800';
|
|
42
|
+
return (h(Host, { key: '60da23c47f39a94478f1eb83e003b788aab3b98c', class: classes([
|
|
43
|
+
'zonos--invoice-review zonos--elements',
|
|
44
|
+
this.isMobile && 'mobile',
|
|
45
|
+
this.isTablet && 'tablet',
|
|
46
|
+
]) }, h("div", { key: '70bbb1973ec1c7197da666ba30be6dc6a20bd386', class: "zonos--title" }, h("zonos-text", { key: '35ffffa411ccde7c702b5d5ac3f11d7a8d62916f', textColor: titleTextColor, type: 'semiBoldLabel' }, translate('Pay [organizationName]', {
|
|
47
|
+
organizationName: zonosStore.organizationName,
|
|
48
|
+
}))), h("div", { key: 'c965e47314d1c3178b1dd2e54e835c0b91966a81', class: "zonos--total-pay" }, renderFallback({
|
|
49
|
+
content: (h("zonos-text", { type: 'secondaryPageHeader' }, renderCheckoutCurrency({
|
|
50
|
+
amount: invoiceStore.amountTotalDue || 0,
|
|
51
|
+
isForeign: true,
|
|
52
|
+
}))),
|
|
53
|
+
isLoading: invoiceStore.isFetchingPayorInfo,
|
|
54
|
+
skeletonHeight: '36px',
|
|
55
|
+
skeletonWidth: '150px',
|
|
56
|
+
}))));
|
|
57
|
+
}
|
|
58
|
+
static get is() { return "zonos-invoice-review"; }
|
|
59
|
+
static get encapsulation() { return "shadow"; }
|
|
60
|
+
static get originalStyleUrls() {
|
|
61
|
+
return {
|
|
62
|
+
"$": ["zonos-invoice-review.scss"]
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
static get styleUrls() {
|
|
66
|
+
return {
|
|
67
|
+
"$": ["zonos-invoice-review.css"]
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static get assetsDirs() { return ["assets"]; }
|
|
71
|
+
static get properties() {
|
|
72
|
+
return {
|
|
73
|
+
"mobile": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"mutable": false,
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "boolean",
|
|
78
|
+
"resolved": "boolean",
|
|
79
|
+
"references": {}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": false,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Whether or not the component is being rendered with mobile styles"
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false,
|
|
89
|
+
"attribute": "mobile",
|
|
90
|
+
"reflect": false,
|
|
91
|
+
"defaultValue": "false"
|
|
92
|
+
},
|
|
93
|
+
"tablet": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"mutable": false,
|
|
96
|
+
"complexType": {
|
|
97
|
+
"original": "boolean",
|
|
98
|
+
"resolved": "boolean",
|
|
99
|
+
"references": {}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Whether or not the component is being rendered with tablet styles"
|
|
106
|
+
},
|
|
107
|
+
"getter": false,
|
|
108
|
+
"setter": false,
|
|
109
|
+
"attribute": "tablet",
|
|
110
|
+
"reflect": false,
|
|
111
|
+
"defaultValue": "false"
|
|
112
|
+
},
|
|
113
|
+
"collapsed": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"mutable": false,
|
|
116
|
+
"complexType": {
|
|
117
|
+
"original": "boolean",
|
|
118
|
+
"resolved": "boolean",
|
|
119
|
+
"references": {}
|
|
120
|
+
},
|
|
121
|
+
"required": false,
|
|
122
|
+
"optional": false,
|
|
123
|
+
"docs": {
|
|
124
|
+
"tags": [],
|
|
125
|
+
"text": "Whether or not to show the collapse icon\nThis is controled from the collapsed state of the zonos-collapse component\nto show the collapse icon"
|
|
126
|
+
},
|
|
127
|
+
"getter": false,
|
|
128
|
+
"setter": false,
|
|
129
|
+
"attribute": "collapsed",
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"defaultValue": "false"
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
static get states() {
|
|
136
|
+
return {
|
|
137
|
+
"isMobile": {},
|
|
138
|
+
"isTablet": {},
|
|
139
|
+
"isLoading": {}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
static get listeners() {
|
|
143
|
+
return [{
|
|
144
|
+
"name": "resize",
|
|
145
|
+
"method": "handleWindowResize",
|
|
146
|
+
"target": "window",
|
|
147
|
+
"capture": false,
|
|
148
|
+
"passive": true
|
|
149
|
+
}];
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
3
|
+
display: block;
|
|
4
|
+
white-space: normal;
|
|
5
|
+
}
|
|
6
|
+
:host * {
|
|
7
|
+
font-family: var(--zonos--font-family, Inter), Inter;
|
|
8
|
+
}
|
|
9
|
+
:host img {
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
}
|
|
12
|
+
:host dl,
|
|
13
|
+
:host dd,
|
|
14
|
+
:host h1,
|
|
15
|
+
:host h2,
|
|
16
|
+
:host h3,
|
|
17
|
+
:host h4,
|
|
18
|
+
:host h5,
|
|
19
|
+
:host h6,
|
|
20
|
+
:host hr,
|
|
21
|
+
:host figure,
|
|
22
|
+
:host p,
|
|
23
|
+
:host pre {
|
|
24
|
+
margin: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* All sets of variable are here */
|
|
28
|
+
/* smooth font rendering */
|
|
29
|
+
:host {
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
-webkit-font-smoothing: antialiased;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host {
|
|
35
|
+
position: sticky;
|
|
36
|
+
bottom: 60px;
|
|
37
|
+
}
|
|
38
|
+
:host .zonos--invoice-table {
|
|
39
|
+
width: 100%;
|
|
40
|
+
border: none;
|
|
41
|
+
border-collapse: collapse;
|
|
42
|
+
overflow: auto;
|
|
43
|
+
font-size: var(--zonos-elements-font-size-base);
|
|
44
|
+
}
|
|
45
|
+
:host .zonos--invoice-table .zonos--column {
|
|
46
|
+
padding: 8px 8px;
|
|
47
|
+
vertical-align: top;
|
|
48
|
+
}
|
|
49
|
+
:host .zonos--invoice-table .zonos--column:last-child {
|
|
50
|
+
text-align: right;
|
|
51
|
+
padding-right: 0;
|
|
52
|
+
}
|
|
53
|
+
:host .zonos--invoice-table .zonos--column:first-child {
|
|
54
|
+
width: 60px;
|
|
55
|
+
max-width: 100px;
|
|
56
|
+
}
|
|
57
|
+
:host .zonos--title-with-icon {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: 8px;
|
|
61
|
+
}
|
|
62
|
+
:host .zonos--invoice-subtotal-price {
|
|
63
|
+
text-align: right;
|
|
64
|
+
}
|
|
65
|
+
:host .zonos--invoice-subtotal-price zonos-text {
|
|
66
|
+
white-space: nowrap;
|
|
67
|
+
}
|
|
68
|
+
:host .zonos--invoice-total .zonos--column {
|
|
69
|
+
padding: 16px 0;
|
|
70
|
+
}
|
|
71
|
+
:host .zonos--invoice-total .zonos--invoice-subtotal-title,
|
|
72
|
+
:host .zonos--invoice-total .zonos--invoice-subtotal-price {
|
|
73
|
+
border-top: 1px solid var(--zonos-elements-gray-200);
|
|
74
|
+
}
|
|
75
|
+
:host .zonos--invoice-subtotal-price zonos-text,
|
|
76
|
+
:host .zonos--invoice-pay-total zonos-text {
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host(.mobile) {
|
|
81
|
+
position: relative;
|
|
82
|
+
bottom: 0;
|
|
83
|
+
}
|