@zonos/elements 1.3.39 → 1.3.40
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-c7212410.js → cart-775440b7.js} +240 -7
- package/dist/cjs/{getBorderRadius-074b46ef.js → getBorderRadius-9ae7890c.js} +1 -1
- package/dist/cjs/{index-b071017b.js → index-ef8b2c76.js} +234 -167
- package/dist/cjs/index.cjs.js +10 -4
- package/dist/cjs/{isDarkColor-371a3b1a.js → isDarkColor-5f56770b.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/paypal-25c84e33.js +461 -0
- package/dist/cjs/{submitGtag-7a679d92.js → sendErrorLog-7818b288.js} +2 -19
- package/dist/cjs/zonos-address_8.cjs.entry.js +8 -8
- package/dist/cjs/zonos-badge_2.cjs.entry.js +2 -2
- package/dist/cjs/zonos-banner.cjs.entry.js +2 -2
- package/dist/cjs/zonos-button_3.cjs.entry.js +4 -4
- package/dist/cjs/zonos-card.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +73 -35
- package/dist/cjs/zonos-checkout.cjs.entry.js +43 -70
- package/dist/cjs/zonos-component.cjs.entry.js +1 -1
- package/dist/cjs/zonos-controller.cjs.entry.js +15 -15
- package/dist/cjs/zonos-country-flag.cjs.entry.js +5 -5
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +5 -5
- package/dist/cjs/zonos-elements.cjs.js +3 -3
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +5 -5
- package/dist/cjs/zonos-hello.cjs.entry.js +5 -5
- package/dist/cjs/zonos-input.cjs.entry.js +3 -3
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +5 -5
- package/dist/cjs/zonos-link.cjs.entry.js +1 -1
- package/dist/cjs/zonos-logo.cjs.entry.js +2 -2
- package/dist/cjs/{zonos-notification_2.cjs.entry.js → zonos-notification_3.cjs.entry.js} +59 -7
- package/dist/cjs/zonos-shipping-rich-radio.cjs.entry.js +3 -3
- package/dist/cjs/zonos-text.cjs.entry.js +2 -2
- package/dist/cjs/zonos-v-stack.cjs.entry.js +2 -2
- package/dist/cjs/{zonosStore-4c6c85da.js → zonosStore-b6c72408.js} +5 -1
- package/dist/collection/__tests__/build-utils/urlCheckOne.js +3 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-update-dialog.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +39 -8
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.css +7 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.js +37 -22
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.css +3 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +30 -60
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.css +1 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-shipping/zonos-shipping.css +1 -0
- package/dist/collection/components/main/zonos-controller.js +22 -8
- package/dist/collection/components/paypal/zonos-paypal-payment.css +37 -0
- package/dist/collection/components/paypal/zonos-paypal-payment.js +92 -0
- package/dist/collection/components/store/checkout/cart.js +26 -1
- package/dist/collection/components/store/checkout/paypal.js +219 -0
- package/dist/collection/components/store/checkout/stripe.js +16 -4
- 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/store/zonosStore.js +4 -0
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +2 -2
- package/dist/collection/components/stripe/zonos-link-authentication/zonos-link-authentication.js +1 -1
- package/dist/collection/components/stripe/zonos-payment/zonos-payment.js +2 -3
- package/dist/collection/components/utils/api/getZonosSettings.js +3 -3
- package/dist/collection/components/utils/api/paypalCaptureOrder.js +8 -0
- package/dist/collection/components/utils/api/paypalCreateOrder.js +8 -0
- package/dist/collection/components/utils/getContrastColor.js +6 -2
- package/dist/collection/components/utils/handleFetch.js +6 -1
- package/dist/collection/components/utils/isContrastColor.js +7 -0
- package/dist/collection/environment.js +4 -5
- package/dist/collection/scripts/_getZonosQaUrl.js +4 -0
- package/dist/collection/scripts/_zonosBase.js +2 -0
- package/dist/collection/styles/stripe/addressRuleStyle.js +6 -0
- package/dist/collection/types/generated/graphql.customer.types.js +35 -0
- package/dist/esm/{cart-eb75b113.js → cart-e9cd8286.js} +236 -8
- package/dist/esm/{getBorderRadius-947c24de.js → getBorderRadius-3c75c4c1.js} +1 -1
- package/dist/esm/{index-3b46f3c3.js → index-5a37ccde.js} +234 -167
- package/dist/esm/index.js +10 -4
- package/dist/esm/{isDarkColor-f8324c10.js → isDarkColor-3eb31a6d.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/paypal-da2b3db1.js +453 -0
- package/dist/esm/{submitGtag-0bc0baa0.js → sendErrorLog-2fcf78a2.js} +3 -19
- package/dist/esm/zonos-address_8.entry.js +8 -8
- package/dist/esm/zonos-badge_2.entry.js +2 -2
- package/dist/esm/zonos-banner.entry.js +2 -2
- package/dist/esm/zonos-button_3.entry.js +4 -4
- package/dist/esm/zonos-card.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +60 -22
- package/dist/esm/zonos-checkout.entry.js +34 -61
- package/dist/esm/zonos-component.entry.js +1 -1
- package/dist/esm/zonos-controller.entry.js +15 -15
- package/dist/esm/zonos-country-flag.entry.js +5 -5
- package/dist/esm/zonos-country-select_3.entry.js +5 -5
- package/dist/esm/zonos-elements.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +5 -5
- package/dist/esm/zonos-hello.entry.js +5 -5
- package/dist/esm/zonos-input.entry.js +3 -3
- package/dist/esm/zonos-language-select_2.entry.js +5 -5
- package/dist/esm/zonos-link.entry.js +1 -1
- package/dist/esm/zonos-logo.entry.js +2 -2
- package/dist/esm/{zonos-notification_2.entry.js → zonos-notification_3.entry.js} +60 -9
- package/dist/esm/zonos-shipping-rich-radio.entry.js +3 -3
- package/dist/esm/zonos-text.entry.js +2 -2
- package/dist/esm/zonos-v-stack.entry.js +2 -2
- package/dist/esm/{zonosStore-ba9e541e.js → zonosStore-425abc1b.js} +5 -1
- package/dist/esm-es5/cart-e9cd8286.js +1 -0
- package/dist/esm-es5/{getBorderRadius-947c24de.js → getBorderRadius-3c75c4c1.js} +1 -1
- package/dist/esm-es5/index-5a37ccde.js +2 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{isDarkColor-f8324c10.js → isDarkColor-3eb31a6d.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/paypal-da2b3db1.js +17 -0
- package/dist/esm-es5/sendErrorLog-2fcf78a2.js +1 -0
- package/dist/esm-es5/zonos-address_8.entry.js +1 -1
- package/dist/esm-es5/zonos-badge_2.entry.js +1 -1
- package/dist/esm-es5/zonos-banner.entry.js +1 -1
- package/dist/esm-es5/zonos-button_3.entry.js +1 -1
- package/dist/esm-es5/zonos-card.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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_3.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-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-link.entry.js +1 -1
- package/dist/esm-es5/zonos-logo.entry.js +1 -1
- package/dist/esm-es5/zonos-notification_3.entry.js +1 -0
- package/dist/esm-es5/zonos-shipping-rich-radio.entry.js +1 -1
- package/dist/esm-es5/zonos-text.entry.js +1 -1
- package/dist/esm-es5/zonos-v-stack.entry.js +1 -1
- package/dist/esm-es5/{zonosStore-ba9e541e.js → zonosStore-425abc1b.js} +1 -1
- package/dist/scripts/index.d.ts +91 -6
- package/dist/scripts/index.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.d.ts +2 -1
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout-payment/zonos-checkout-payment.d.ts +8 -4
- package/dist/types/components/checkout/zonos-checkout/zonos-checkout.d.ts +1 -20
- package/dist/types/components/main/zonos-controller.d.ts +6 -0
- package/dist/types/components/paypal/zonos-paypal-payment.d.ts +17 -0
- package/dist/types/components/store/checkout/cart.d.ts +19 -1
- package/dist/types/components/store/checkout/paypal.d.ts +28 -0
- package/dist/types/components/store/checkout/stripe.d.ts +10 -1
- 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/store/translationStore.d.ts +1 -1
- package/dist/types/components/store/zonosStore.d.ts +4 -0
- package/dist/types/components/utils/api/getZonosSettings.d.ts +2 -0
- package/dist/types/components/utils/api/paypalCaptureOrder.d.ts +10 -0
- package/dist/types/components/utils/api/paypalCreateOrder.d.ts +9 -0
- package/dist/types/components/utils/handleFetch.d.ts +4 -0
- package/dist/types/components/utils/isContrastColor.d.ts +4 -0
- package/dist/types/components.d.ts +50 -6
- package/dist/types/scripts/_zonosBase.d.ts +9 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/types/checkout/CheckoutConfig.d.ts +14 -1
- package/dist/types/types/generated/graphql.customer.types.d.ts +71 -11
- package/dist/types/types/generated/graphql.customer.types.ts +103 -11
- package/dist/zonos-elements/assets/RemoveIcon.svg +1 -1
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-ed333de6.system.entry.js → p-01bd2187.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f06bb776.system.entry.js → p-14b53e8f.system.entry.js} +1 -1
- package/dist/zonos-elements/p-15ecad81.entry.js +1 -0
- package/dist/zonos-elements/p-1b499bcc.system.js +1 -0
- package/dist/zonos-elements/{p-d2992457.system.entry.js → p-1daa3b1e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-085548f2.entry.js → p-1debb7b2.entry.js} +1 -1
- package/dist/zonos-elements/{p-9de374a7.system.entry.js → p-2bfb5e4b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-01304a58.system.entry.js → p-2c03ac78.system.entry.js} +1 -1
- package/dist/zonos-elements/p-3447ef24.system.js +17 -0
- package/dist/zonos-elements/{p-699a5376.entry.js → p-3496183d.entry.js} +1 -1
- package/dist/zonos-elements/{p-59f37de3.entry.js → p-36df9785.entry.js} +1 -1
- package/dist/zonos-elements/p-3996d025.system.js +1 -0
- package/dist/zonos-elements/p-3b6a7200.entry.js +1 -0
- package/dist/zonos-elements/p-3d98f422.system.entry.js +1 -0
- package/dist/zonos-elements/{p-31b3d26b.js → p-3da1bc42.js} +1 -1
- package/dist/zonos-elements/{p-a21ec316.system.entry.js → p-445fb353.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3541e6dd.entry.js → p-54101ed6.entry.js} +1 -1
- package/dist/zonos-elements/p-54971a77.system.js +1 -0
- package/dist/zonos-elements/{p-c0fcc0fa.system.entry.js → p-5a5d1a12.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c21802e9.entry.js → p-5e55dcbc.entry.js} +1 -1
- package/dist/zonos-elements/{p-71882ac9.system.entry.js → p-5f68f356.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-73ba4398.system.entry.js → p-61842b4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3523c3b4.entry.js → p-657be9e9.entry.js} +1 -1
- package/dist/zonos-elements/p-6897be29.entry.js +1 -0
- package/dist/zonos-elements/{p-3f5e2e5c.system.entry.js → p-6f39051c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-966ab4e7.system.entry.js → p-70b024ad.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-22882fd6.entry.js → p-71037fe5.entry.js} +1 -1
- package/dist/zonos-elements/p-7dd54a63.entry.js +1 -0
- package/dist/zonos-elements/{p-e3c014ae.entry.js → p-7f96d3b4.entry.js} +1 -1
- package/dist/zonos-elements/p-800db524.system.js +1 -0
- package/dist/zonos-elements/{p-9a1c0d02.js → p-890f5788.js} +1 -1
- package/dist/zonos-elements/{p-62ed4236.entry.js → p-8d149b99.entry.js} +1 -1
- package/dist/zonos-elements/p-916adba7.entry.js +1 -0
- package/dist/zonos-elements/{p-5821856c.js → p-92bebe7a.js} +1 -1
- package/dist/zonos-elements/p-94279862.system.js +1 -0
- package/dist/zonos-elements/{p-b903af96.system.entry.js → p-97dadd90.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e37440ad.system.js → p-b2007124.system.js} +1 -1
- package/dist/zonos-elements/p-b55b557a.system.js +2 -0
- package/dist/zonos-elements/{p-18b28104.entry.js → p-bfa5ec2b.entry.js} +1 -1
- package/dist/zonos-elements/p-c55a5fe4.system.entry.js +1 -0
- package/dist/zonos-elements/p-c5a5512a.system.entry.js +1 -0
- package/dist/zonos-elements/p-c87113fb.system.entry.js +1 -0
- package/dist/zonos-elements/p-ca58f16e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-6c3390b7.entry.js → p-d46fa40a.entry.js} +1 -1
- package/dist/zonos-elements/p-d6135575.js +1 -0
- package/dist/zonos-elements/p-d95cb86a.system.js +1 -0
- package/dist/zonos-elements/{p-d8c1eb99.entry.js → p-d9d5ee2f.entry.js} +1 -1
- package/dist/zonos-elements/{p-2a45c837.system.entry.js → p-da15b587.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8acdf43b.system.entry.js → p-dc6a17fe.system.entry.js} +1 -1
- package/dist/zonos-elements/p-dd61b7a0.js +2 -0
- package/dist/zonos-elements/p-e252d86f.entry.js +1 -0
- package/dist/zonos-elements/{p-da2e5289.system.entry.js → p-e6efc2e1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-63a27875.entry.js → p-efdc7748.entry.js} +1 -1
- package/dist/zonos-elements/{p-2aa72606.entry.js → p-f643035f.entry.js} +1 -1
- package/dist/zonos-elements/p-f98f7066.js +17 -0
- package/dist/zonos-elements/{p-9d29f3f4.system.entry.js → p-fa02dd07.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c3619b3d.entry.js → p-fa95c3dc.entry.js} +1 -1
- package/dist/zonos-elements/p-fb63bd03.js +1 -0
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/dist/zonos-elements/zonos-elements.js +1 -1
- package/loader/cdn.js +1 -2
- package/loader/index.cjs.js +1 -2
- package/loader/index.d.ts +3 -0
- package/loader/index.es2017.js +1 -2
- package/loader/index.js +1 -2
- package/package.json +12 -11
- package/dist/esm-es5/cart-eb75b113.js +0 -1
- package/dist/esm-es5/index-3b46f3c3.js +0 -2
- package/dist/esm-es5/submitGtag-0bc0baa0.js +0 -1
- package/dist/esm-es5/zonos-notification_2.entry.js +0 -1
- package/dist/zonos-elements/p-02405211.system.entry.js +0 -1
- package/dist/zonos-elements/p-0b538ed4.system.js +0 -1
- package/dist/zonos-elements/p-357322ea.system.entry.js +0 -1
- package/dist/zonos-elements/p-53acc999.js +0 -1
- package/dist/zonos-elements/p-548ac127.entry.js +0 -1
- package/dist/zonos-elements/p-5609876a.system.entry.js +0 -1
- package/dist/zonos-elements/p-6f9448bb.entry.js +0 -1
- package/dist/zonos-elements/p-70262120.system.js +0 -1
- package/dist/zonos-elements/p-878293fe.js +0 -1
- package/dist/zonos-elements/p-97d74f84.system.js +0 -1
- package/dist/zonos-elements/p-a393c1db.system.entry.js +0 -1
- package/dist/zonos-elements/p-a8b934c2.entry.js +0 -1
- package/dist/zonos-elements/p-a8cb25de.system.js +0 -1
- package/dist/zonos-elements/p-abe8ea12.system.js +0 -1
- package/dist/zonos-elements/p-ae04d3ff.entry.js +0 -1
- package/dist/zonos-elements/p-b684f8aa.system.entry.js +0 -1
- package/dist/zonos-elements/p-ce347974.js +0 -2
- package/dist/zonos-elements/p-d99232c5.system.js +0 -2
- package/dist/zonos-elements/p-e0bf9666.system.js +0 -1
- package/dist/zonos-elements/p-e1db1bc9.entry.js +0 -1
- package/dist/zonos-elements/p-e74ca4bc.entry.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
6
|
|
|
7
7
|
const zonosLinkCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:inline-block}:host a{padding-bottom:2px;color:var(--zonos-elements-primary);-webkit-box-shadow:none;box-shadow:none;text-decoration:none;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;overflow-wrap:break-word}:host a:link,:host a:visited{color:var(--zonos-elements-primary);-webkit-transition:all 150ms ease-in-out;transition:all 150ms ease-in-out}:host a:hover,:host a:active{color:var(--zonos-elements-primary);-webkit-box-shadow:0 1px 0 var(--zonos-elements-primary);box-shadow:0 1px 0 var(--zonos-elements-primary)}";
|
|
8
8
|
const ZonosLinkStyle0 = zonosLinkCss;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-b6c72408.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosLogoCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-inline-flexbox;display:inline-flex}:host img{-webkit-filter:var(--filter-color);filter:var(--filter-color);width:var(--width)}";
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-b6c72408.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-775440b7.js');
|
|
9
9
|
const logError = require('./logError-4e2f2020.js');
|
|
10
|
-
require('./
|
|
11
|
-
require('./
|
|
10
|
+
const paypal = require('./paypal-25c84e33.js');
|
|
11
|
+
require('./isDarkColor-5f56770b.js');
|
|
12
|
+
require('./getBorderRadius-9ae7890c.js');
|
|
12
13
|
|
|
13
14
|
const zonosNotificationCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}:host .zonos--notification-items{position:fixed;z-index:9999999999;bottom:24px;gap:8px;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}:host .zonos--notification-item{cursor:pointer;-webkit-transition:all 0.3s ease;transition:all 0.3s ease;padding:8px;border-radius:var(--border-radius, var(--zonos-elements-radius-6));opacity:0;-ms-flex-negative:0.0001;flex-shrink:0.0001;-webkit-transform:translateY(100%);transform:translateY(100%)}:host .zonos--notification-item+:host .zonos--notification-item{margin-top:8px}:host .zonos--notification-item.show{opacity:1;-webkit-transform:translateY(0);transform:translateY(0);-ms-flex-positive:1000;flex-grow:1000}:host .zonos--notification-item.success{background-color:var(--zonos-elements-green-700)}:host .zonos--notification-item.error{background-color:var(--zonos-elements-red-700)}:host .zonos--notification-item.warning{background-color:var(--zonos-elements-orange-700)}";
|
|
14
15
|
const ZonosNotificationStyle0 = zonosNotificationCss;
|
|
@@ -90,7 +91,7 @@ const ZonosPayment = class {
|
|
|
90
91
|
// Create and mount the Authentication Element in ${type} mode
|
|
91
92
|
const paymentElement = cart.stripeStore.stripePaymentElement ||
|
|
92
93
|
this.stripeElements.create('payment', {
|
|
93
|
-
layout: '
|
|
94
|
+
layout: 'accordion',
|
|
94
95
|
});
|
|
95
96
|
const paymentElementContainer = this.el.querySelector('.zonos--payment-component');
|
|
96
97
|
if (!paymentElementContainer) {
|
|
@@ -109,7 +110,7 @@ const ZonosPayment = class {
|
|
|
109
110
|
}
|
|
110
111
|
render() {
|
|
111
112
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
112
|
-
return (index.h(index.Host, { key: '
|
|
113
|
+
return (index.h(index.Host, { key: 'a6df9bab4826d7c4e4027bf6b7e58f176cb25ca1', class: "zonos--payment zonos--elements" }, this.titleText && (index.h("zonos-text", { key: 'a2f3d1288537a8e63c26bef9c87cae7f3a6f94fa', class: "zonos--title", type: "semiBoldLabel" }, this.titleText)), index.h("div", { key: '4e30103e4b6fa407450afc71474b663377233310', class: "zonos--payment-component" }), index.h("div", { key: '66a9798018fb25e86933a839014ed0d2ed16d8b3', class: "zonos--payment-paypal-container" })));
|
|
113
114
|
}
|
|
114
115
|
get el() { return index.getElement(this); }
|
|
115
116
|
static get watchers() { return {
|
|
@@ -119,5 +120,56 @@ const ZonosPayment = class {
|
|
|
119
120
|
};
|
|
120
121
|
ZonosPayment.style = ZonosPaymentStyle0;
|
|
121
122
|
|
|
123
|
+
const zonosPaypalPaymentCss = ".sc-zonos-paypal-payment-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-paypal-payment-h *.sc-zonos-paypal-payment{font-family:var(--font-family, Inter), Inter}.sc-zonos-paypal-payment-h img.sc-zonos-paypal-payment{max-width:100%}.sc-zonos-paypal-payment-h dl.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h dd.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h1.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h2.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h3.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h4.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h5.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h h6.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h hr.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h figure.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h p.sc-zonos-paypal-payment,.sc-zonos-paypal-payment-h pre.sc-zonos-paypal-payment{margin:0}.sc-zonos-paypal-payment-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-paypal-payment-h{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column}";
|
|
124
|
+
const ZonosPaypalPaymentStyle0 = zonosPaypalPaymentCss;
|
|
125
|
+
|
|
126
|
+
const ZonosPaypalPayment = class {
|
|
127
|
+
constructor(hostRef) {
|
|
128
|
+
index.registerInstance(this, hostRef);
|
|
129
|
+
this.paypalSessionDone = index.createEvent(this, "paypalSessionDone", 7);
|
|
130
|
+
this.paypalSessionFail = index.createEvent(this, "paypalSessionFail", 7);
|
|
131
|
+
}
|
|
132
|
+
async loadPaypal() {
|
|
133
|
+
if (!window.Zonos.paypal) {
|
|
134
|
+
logError.log('Paypal is not available');
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
// Init paypal store buttons
|
|
138
|
+
const paypalButtons = paypal.paypalStoreInitButtons({
|
|
139
|
+
onPaypalFail: () => {
|
|
140
|
+
logError.log('onPaypalFail');
|
|
141
|
+
this.paypalSessionFail.emit();
|
|
142
|
+
},
|
|
143
|
+
onPaypalSessionDone: ({ orderId }) => {
|
|
144
|
+
logError.log('onPaypalSessionDone', 'info', { orderId });
|
|
145
|
+
this.paypalSessionDone.emit({ orderId });
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
if (!(paypalButtons === null || paypalButtons === void 0 ? void 0 : paypalButtons.length)) {
|
|
149
|
+
logError.log('There are no paypal buttons available');
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
const container = this.el.querySelector('.zonos--payment-paypal-container');
|
|
153
|
+
if (!container) {
|
|
154
|
+
logError.log('Cannot find container element for paypal buttons');
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
// render paypal buttons
|
|
158
|
+
paypalButtons.forEach(async (paypalButton) => {
|
|
159
|
+
await paypalButton.render(container);
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
componentDidLoad() {
|
|
163
|
+
// @Watch doesn't get trigger on initial load
|
|
164
|
+
void this.loadPaypal();
|
|
165
|
+
}
|
|
166
|
+
render() {
|
|
167
|
+
return (index.h(index.Host, { key: '036a9d43da99e1c08293936d89ca5f97d5acdf10', class: "zonos--paypal-payment zonos--elements" }, index.h("div", { key: 'f38290dce670024e001d8219d2d8d1e9fde1f9e2', class: "zonos--payment-paypal-container" })));
|
|
168
|
+
}
|
|
169
|
+
get el() { return index.getElement(this); }
|
|
170
|
+
};
|
|
171
|
+
ZonosPaypalPayment.style = ZonosPaypalPaymentStyle0;
|
|
172
|
+
|
|
122
173
|
exports.zonos_notification = ZonosNotification;
|
|
123
174
|
exports.zonos_payment = ZonosPayment;
|
|
175
|
+
exports.zonos_paypal_payment = ZonosPaypalPayment;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-b6c72408.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const getBorderRadius = require('./getBorderRadius-
|
|
8
|
+
const getBorderRadius = require('./getBorderRadius-9ae7890c.js');
|
|
9
9
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
10
10
|
|
|
11
11
|
const zonosShippingRichRadioCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}:host input{margin:0;accent-color:var(--selected-border-color, var(--zonos-elements-blue-600))}:host .zonos--shipping-rich-radio-item{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;padding:16px;-ms-flex-align:center;align-items:center;gap:16px;cursor:pointer;border:1px solid var(--zonos-elements-gray-200)}:host .zonos--shipping-rich-radio-item:first-child{border-top-left-radius:var(--border-radius, var(--zonos-elements-radius-10));border-top-right-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:last-child{border-bottom-right-radius:var(--border-radius, var(--zonos-elements-radius-10));border-bottom-left-radius:var(--border-radius, var(--zonos-elements-radius-10))}:host .zonos--shipping-rich-radio-item:not(:last-child){border-bottom:none}:host .zonos--shipping-rich-radio-item.selected{outline:1px solid var(--selected-border-color, var(--zonos-elements-blue-600));outline-offset:-1px}:host .zonos--shipping-info{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex:1;flex:1}:host .zonos--shipping-detail{-ms-flex:1;flex:1}:host .zonos--sub-detail{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap}";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-b6c72408.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const isColorVariable = require('./isColorVariable-6f5a9608.js');
|
|
9
9
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const zonosStore = require('./zonosStore-
|
|
5
|
+
const index = require('./index-ef8b2c76.js');
|
|
6
|
+
const zonosStore = require('./zonosStore-b6c72408.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
|
|
9
9
|
const zonosVStackCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host .vstack{display:grid;grid-auto-columns:minmax(0, 1fr);grid-row-gap:var(--spacing, 24px);grid-auto-flow:row}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-ef8b2c76.js');
|
|
4
4
|
|
|
5
5
|
const appendToMap = (map, propName, value) => {
|
|
6
6
|
const items = map.get(propName);
|
|
@@ -2771,6 +2771,9 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
|
|
|
2771
2771
|
checkoutSettings: {
|
|
2772
2772
|
allowedCharacterSets: 'ALL',
|
|
2773
2773
|
analyticsProviders: [],
|
|
2774
|
+
externalPaymentMethods: [],
|
|
2775
|
+
externalServiceTokens: [],
|
|
2776
|
+
mode: 'TEST',
|
|
2774
2777
|
orderNotifications: {
|
|
2775
2778
|
abandonedCart: {
|
|
2776
2779
|
delay: 0,
|
|
@@ -2834,6 +2837,7 @@ const { dispose: zonosStoreDispose, reset, state: zonosStore, } = createStore(()
|
|
|
2834
2837
|
// toggle to know if the config has been loaded with graphql
|
|
2835
2838
|
stripeApiKey: '',
|
|
2836
2839
|
zonosApiKey: '',
|
|
2840
|
+
zonosMode: null,
|
|
2837
2841
|
}));
|
|
2838
2842
|
let savedZonosSettings = null;
|
|
2839
2843
|
/**
|
|
@@ -22,7 +22,9 @@ export const urlCheckOne = async ({ branch, filePath, packageVersion, }) => {
|
|
|
22
22
|
!excludeDomainPattern.includes(fullUrl) &&
|
|
23
23
|
!excludeFiles.some(file => filePath.includes(file))) {
|
|
24
24
|
// match: v1.2.3-alpha.0.qa.js.zonos.com | v1.2.3.qa.js.zonos.com | v1.qa.js.zonos.com
|
|
25
|
-
const versioned =
|
|
25
|
+
const versioned =
|
|
26
|
+
// @ts-ignore ts v5.5 requires target to be ES2017 to use group, but we run this in node and not in compiled version, so it should work with current target ES2017
|
|
27
|
+
/(v(?<major>\d+)(?<patch>\.\d+(\-alpha\.\d+)*)*)\.*(.*?js\.zonos\.com)/g.exec(fullUrl);
|
|
26
28
|
if (!versioned) {
|
|
27
29
|
throw new Error(`${filePath}: url in the file is not versioned for url "${fullUrl}"`);
|
|
28
30
|
}
|
|
@@ -43,13 +43,14 @@
|
|
|
43
43
|
"components/hello/zonos-hello-dialog/zonos-hello-dialog.js",
|
|
44
44
|
"components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js",
|
|
45
45
|
"components/main/zonos-controller.js",
|
|
46
|
+
"components/paypal/zonos-paypal-payment.js",
|
|
46
47
|
"components/stripe/zonos-address/zonos-address.js",
|
|
47
48
|
"components/stripe/zonos-link-authentication/zonos-link-authentication.js",
|
|
48
49
|
"components/stripe/zonos-payment/zonos-payment.js"
|
|
49
50
|
],
|
|
50
51
|
"compiler": {
|
|
51
52
|
"name": "@stencil/core",
|
|
52
|
-
"version": "4.
|
|
53
|
+
"version": "4.19.2",
|
|
53
54
|
"typescriptVersion": "5.4.5"
|
|
54
55
|
},
|
|
55
56
|
"collections": [],
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore } from "../../../store/checkout/cart";
|
|
3
|
-
import {
|
|
3
|
+
import { paypalStore, paypalStoreReset, } from "../../../store/checkout/paypal";
|
|
4
|
+
import { stripeStore, stripeStoreMessageBasedOnStatus, stripeStoreReset, stripeStoreRetrievePayment, } from "../../../store/checkout/stripe";
|
|
4
5
|
import { translate } from "../../../store/translationStore";
|
|
5
6
|
import { zonosStore } from "../../../store/zonosStore";
|
|
6
7
|
import { trackConversionEvent } from "../../../utils/api/trackConversionEvent";
|
|
@@ -102,7 +103,7 @@ export class ZonosCheckoutFinish {
|
|
|
102
103
|
this.notificationActionText = successPageActionText;
|
|
103
104
|
}
|
|
104
105
|
};
|
|
105
|
-
this.
|
|
106
|
+
this.checkStripePaymentStatus = async () => {
|
|
106
107
|
this.isLoading = true;
|
|
107
108
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
108
109
|
if (clientSecret || this.storybookForceStatus) {
|
|
@@ -115,8 +116,6 @@ export class ZonosCheckoutFinish {
|
|
|
115
116
|
this.notificationTitle = error
|
|
116
117
|
? translate('Payment failed')
|
|
117
118
|
: translate("You're all set!");
|
|
118
|
-
// override title if notification type is success
|
|
119
|
-
this.useOverrideSuccessNotification();
|
|
120
119
|
if (error) {
|
|
121
120
|
submitGtag('zonos-checkout-payment-fail');
|
|
122
121
|
}
|
|
@@ -132,6 +131,8 @@ export class ZonosCheckoutFinish {
|
|
|
132
131
|
}
|
|
133
132
|
// Attempt to pull the order details from the graph every second on 5 attempts. Only pull if checkoutSessionId is available
|
|
134
133
|
if (this.notificationType === 'success' && cartStore.checkoutSessionId) {
|
|
134
|
+
// override title if notification type is success
|
|
135
|
+
this.useOverrideSuccessNotification();
|
|
135
136
|
// wait this to finish before resetting store and checkout session id
|
|
136
137
|
await this.getPullOrder();
|
|
137
138
|
}
|
|
@@ -145,6 +146,31 @@ export class ZonosCheckoutFinish {
|
|
|
145
146
|
stripeStoreReset();
|
|
146
147
|
cartStore.checkoutSessionId = null;
|
|
147
148
|
};
|
|
149
|
+
this.checkPaypalPaymentStatus = async () => {
|
|
150
|
+
this.isLoading = true;
|
|
151
|
+
// render error message if there's an error
|
|
152
|
+
if (paypalStore.paypalErrorMessage) {
|
|
153
|
+
this.notificationType = 'error';
|
|
154
|
+
this.notificationTitle = translate('Payment failed');
|
|
155
|
+
this.notificationMessages = [paypalStore.paypalErrorMessage];
|
|
156
|
+
this.isLoading = false;
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
if (paypalStore.orderIdCreated) {
|
|
160
|
+
this.notificationType = 'success';
|
|
161
|
+
this.notificationTitle = translate("You're all set!");
|
|
162
|
+
this.notificationMessages =
|
|
163
|
+
stripeStoreMessageBasedOnStatus('succeeded').messages;
|
|
164
|
+
// override title if notification type is success
|
|
165
|
+
this.useOverrideSuccessNotification();
|
|
166
|
+
// wait this to finish before resetting store and checkout session id
|
|
167
|
+
await this.getPullOrder();
|
|
168
|
+
}
|
|
169
|
+
this.isLoading = false;
|
|
170
|
+
stripeStoreReset();
|
|
171
|
+
paypalStoreReset();
|
|
172
|
+
cartStore.checkoutSessionId = null;
|
|
173
|
+
};
|
|
148
174
|
this.closeClickHandler = () => {
|
|
149
175
|
this.closeClick.emit();
|
|
150
176
|
};
|
|
@@ -167,17 +193,22 @@ export class ZonosCheckoutFinish {
|
|
|
167
193
|
this.isLoading = false;
|
|
168
194
|
return;
|
|
169
195
|
}
|
|
170
|
-
|
|
196
|
+
if (paypalStore.orderIdCreated) {
|
|
197
|
+
void this.checkPaypalPaymentStatus();
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
void this.checkStripePaymentStatus();
|
|
201
|
+
}
|
|
171
202
|
}
|
|
172
203
|
render() {
|
|
173
204
|
var _a, _b;
|
|
174
205
|
const orderId = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.accountOrderNumber) || ((_b = this.order) === null || _b === void 0 ? void 0 : _b.id);
|
|
175
206
|
const isTestMode = getIsTestMode();
|
|
176
|
-
return (h(Host, { key: '
|
|
207
|
+
return (h(Host, { key: '4e00e5d3d8de136e4161fdea6afba86616748d66', class: "zonos--checkout-finish zonos--elements", style: {
|
|
177
208
|
'--border-radius': getBorderRadius({
|
|
178
209
|
overrideBorderStyle: this.borderRadius,
|
|
179
210
|
}),
|
|
180
|
-
} }, this.isLoading && (h("div", { key: '
|
|
211
|
+
} }, this.isLoading && (h("div", { key: '6b4f755402951c5fd0e5150ccd05542b85ca2121', class: "loading-wrapper" }, h("zonos-spinner", { key: 'a3e6b561c6796891b33d273b9729d0f8fab4a308' }))), !this.isLoading && (h("div", { key: '798bfa6f1ee9f7b682e0d7389654f5b3d1549ba6', class: "zonos--finish-details" }, h("div", { key: 'cd7a52c193aa3bb5ef2e49e6027bf0448de14046', class: "zonos--group" }, this.notificationType === 'success' ? (h("zonos-icon", { "aria-label": "Order success", content: SuccessIcon, iconColor: 'blue-800', size: 50 })) : (h("zonos-icon", { "aria-label": "Order failed", content: RemoveIcon, iconColor: 'red-800', size: 50 })), h("zonos-text", { key: 'b4c5751d55a3ef5d06e68a1065dc017b455a9d1f', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), orderId && (h("zonos-badge", { key: 'd8c13fb55fe83d1caf26efbd037da866b26af108', badgeColor: "transparent" }, orderId)), h("zonos-text", { key: '5ae6e0d1b42e7d0ab578229d8c9eebcd660b78db', textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), h("zonos-button", { key: '0a3447480fe0ddcff91579602621b9ee70ae2a64', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText)), isTestMode && cartStore.step === 'finish' && (h("div", { key: 'c3374a72c1e2d9350f152c7e2016463bf0a7f02e', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: '7d34001e6798162cbcb1d9ef8949d15617c64362', backgroundColor: "gray-0", buttonColor: "gray-1200", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: 'e217f0bde5d4b0df0220983a32ae8853469d1d23', onClick: () => this.redirectToUrl(`/orders/all`), size: "lg", variant: "primary" }, "View order in Dashboard")))))));
|
|
181
212
|
}
|
|
182
213
|
static get is() { return "zonos-checkout-finish"; }
|
|
183
214
|
static get encapsulation() { return "shadow"; }
|
|
@@ -228,7 +259,7 @@ export class ZonosCheckoutFinish {
|
|
|
228
259
|
"PaymentIntent": {
|
|
229
260
|
"location": "import",
|
|
230
261
|
"path": "@stripe/stripe-js",
|
|
231
|
-
"id": ""
|
|
262
|
+
"id": "node_modules::PaymentIntent"
|
|
232
263
|
}
|
|
233
264
|
}
|
|
234
265
|
},
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
display: flex;
|
|
48
48
|
flex-direction: column;
|
|
49
49
|
flex: 1;
|
|
50
|
+
overscroll-behavior: contain;
|
|
50
51
|
}
|
|
51
52
|
:host .zonos--group::-webkit-scrollbar {
|
|
52
53
|
width: 10px;
|
|
@@ -79,10 +80,15 @@
|
|
|
79
80
|
position: sticky;
|
|
80
81
|
display: flex;
|
|
81
82
|
justify-content: center;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: 12px;
|
|
82
85
|
bottom: 0;
|
|
83
|
-
|
|
86
|
+
padding-top: 12px;
|
|
84
87
|
background: var(--primary-color, var(--zonos-elements-gray-0));
|
|
85
88
|
}
|
|
89
|
+
:host .zonos--group-btn zonos-text {
|
|
90
|
+
text-align: center;
|
|
91
|
+
}
|
|
86
92
|
:host .zonos--group-btn zonos-button {
|
|
87
93
|
width: 100%;
|
|
88
94
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { cartStore } from "../../../store/checkout/cart";
|
|
3
|
+
import { paypalStore, paypalStoreHasPaypalEnabled, } from "../../../store/checkout/paypal";
|
|
3
4
|
import { stripeStore } from "../../../store/checkout/stripe";
|
|
4
5
|
import { translate } from "../../../store/translationStore";
|
|
5
6
|
import { getIsTestMode } from "../../../utils/checkout/getIsTestMode";
|
|
@@ -23,9 +24,9 @@ export class ZonosCheckoutPayment {
|
|
|
23
24
|
this.showErrorBanner = true;
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
|
-
this.continueClicked.emit();
|
|
27
27
|
// submit google tag when the form is complete
|
|
28
28
|
submitGtag('zonos-checkout-payment-info');
|
|
29
|
+
this.continueClicked.emit();
|
|
29
30
|
};
|
|
30
31
|
this.copyCardToClipboard = (cardNumber) => {
|
|
31
32
|
void navigator.clipboard.writeText(cardNumber);
|
|
@@ -35,7 +36,6 @@ export class ZonosCheckoutPayment {
|
|
|
35
36
|
type: 'success',
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
|
-
this.paymentError = false;
|
|
39
39
|
this.submitBtnType = undefined;
|
|
40
40
|
this.continueLoading = false;
|
|
41
41
|
this.submitBtnColor = undefined;
|
|
@@ -50,14 +50,17 @@ export class ZonosCheckoutPayment {
|
|
|
50
50
|
this.showErrorBanner = !this.handleValidate();
|
|
51
51
|
}
|
|
52
52
|
const isTestMode = getIsTestMode();
|
|
53
|
-
|
|
53
|
+
const hasPaypalEnabled = paypalStoreHasPaypalEnabled();
|
|
54
|
+
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')), this.showErrorBanner && (h("zonos-banner", { class: "zonos--error-banner", intent: "error" }, translate('Missing required fields. Make sure all fields are completed.'))), stripeStore.hasPaymentError && (h("zonos-banner", { class: "zonos--payment-error-banner", intent: "error" }, 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" }, h("zonos-button", { backgroundColor: this.submitBtnColor, loading: this.continueLoading, onClick: () => this.continueClickHandler(), size: "lg",
|
|
54
55
|
// use primary type when on mobile mode
|
|
55
56
|
variant: this.submitBtnType }, translate('Pay [orderTotal]', {
|
|
56
57
|
orderTotal: currencyFormat({
|
|
57
58
|
amount: cartStore.total,
|
|
58
59
|
currency: cartStore.currency,
|
|
59
60
|
}),
|
|
60
|
-
}))
|
|
61
|
+
})), hasPaypalEnabled && (h("zonos-text", { type: "smallHeader" }, translate('or'))), h("zonos-paypal-payment", { onPaypalSessionDone: ({ detail: { orderId } }) => {
|
|
62
|
+
this.paypalSessionDone.emit(orderId);
|
|
63
|
+
}, onPaypalSessionFail: () => this.paypalSessionFailed.emit() })), 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))))));
|
|
61
64
|
}
|
|
62
65
|
static get is() { return "zonos-checkout-payment"; }
|
|
63
66
|
static get encapsulation() { return "scoped"; }
|
|
@@ -73,24 +76,6 @@ export class ZonosCheckoutPayment {
|
|
|
73
76
|
}
|
|
74
77
|
static get properties() {
|
|
75
78
|
return {
|
|
76
|
-
"paymentError": {
|
|
77
|
-
"type": "boolean",
|
|
78
|
-
"mutable": false,
|
|
79
|
-
"complexType": {
|
|
80
|
-
"original": "boolean",
|
|
81
|
-
"resolved": "boolean",
|
|
82
|
-
"references": {}
|
|
83
|
-
},
|
|
84
|
-
"required": false,
|
|
85
|
-
"optional": false,
|
|
86
|
-
"docs": {
|
|
87
|
-
"tags": [],
|
|
88
|
-
"text": "Error occurred during payment"
|
|
89
|
-
},
|
|
90
|
-
"attribute": "payment-error",
|
|
91
|
-
"reflect": false,
|
|
92
|
-
"defaultValue": "false"
|
|
93
|
-
},
|
|
94
79
|
"submitBtnType": {
|
|
95
80
|
"type": "string",
|
|
96
81
|
"mutable": false,
|
|
@@ -171,6 +156,36 @@ export class ZonosCheckoutPayment {
|
|
|
171
156
|
"resolved": "void",
|
|
172
157
|
"references": {}
|
|
173
158
|
}
|
|
159
|
+
}, {
|
|
160
|
+
"method": "paypalSessionFailed",
|
|
161
|
+
"name": "paypalSessionFailed",
|
|
162
|
+
"bubbles": true,
|
|
163
|
+
"cancelable": true,
|
|
164
|
+
"composed": true,
|
|
165
|
+
"docs": {
|
|
166
|
+
"tags": [],
|
|
167
|
+
"text": "Event to emit when the paypal session failed"
|
|
168
|
+
},
|
|
169
|
+
"complexType": {
|
|
170
|
+
"original": "void",
|
|
171
|
+
"resolved": "void",
|
|
172
|
+
"references": {}
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
"method": "paypalSessionDone",
|
|
176
|
+
"name": "paypalSessionDone",
|
|
177
|
+
"bubbles": true,
|
|
178
|
+
"cancelable": true,
|
|
179
|
+
"composed": true,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Event to emit when the paypal session is done"
|
|
183
|
+
},
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "string",
|
|
186
|
+
"resolved": "string",
|
|
187
|
+
"references": {}
|
|
188
|
+
}
|
|
174
189
|
}];
|
|
175
190
|
}
|
|
176
191
|
}
|