@zonos/elements 1.3.214 → 1.3.216
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-e0b62259.js → cart-96520eab.js} +51 -22
- package/dist/cjs/{handleFetch-7cf3752e.js → handleFetch-b821ed5d.js} +2 -2
- package/dist/cjs/index.cjs.js +8 -8
- package/dist/cjs/{localization-91bcde0e.js → localization-e241e025.js} +1 -1
- package/dist/cjs/{paypal-93e5de01.js → paypal-97ac0999.js} +3 -3
- package/dist/cjs/{updateCheckoutSessionAttributes-047bc0cb.js → updateCheckoutSessionAttributes-5f794550.js} +1 -1
- package/dist/cjs/zonos-address_11.cjs.entry.js +25 -16
- package/dist/cjs/zonos-cart-items_14.cjs.entry.js +27 -19
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -5
- package/dist/cjs/zonos-controller.cjs.entry.js +3 -3
- package/dist/cjs/zonos-country-flag.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +25 -8
- package/dist/cjs/zonos-empty-state-payment_4.cjs.entry.js +4 -4
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +2 -2
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +2 -2
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-form/zonos-address-form.js +8 -7
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-finish/zonos-checkout-finish.js +6 -6
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/zonos-checkout-footer.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-customer-info/zonos-customer-info.js +6 -2
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIconDark.svg +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIconLight.svg +10 -0
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/zonos-hello-dialog-footer.js +5 -3
- package/dist/collection/components/store/checkout/stripe.js +6 -2
- package/dist/collection/components/stripe/zonos-address/zonos-address.js +9 -2
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +8 -4
- package/dist/collection/components/utils/api/prepCalculateLandedCost.js +13 -8
- package/dist/collection/components/utils/checkout/buildTranslateRequest.js +14 -10
- package/dist/collection/components/utils/extractName.js +17 -0
- package/dist/collection/components/utils/handleFetch.js +2 -2
- package/dist/esm/{cart-c3540cd7.js → cart-011aa510.js} +51 -23
- package/dist/esm/{handleFetch-dd74bbb1.js → handleFetch-bb221e63.js} +2 -2
- package/dist/esm/index.js +8 -8
- package/dist/esm/{localization-cf31c728.js → localization-b3bdf691.js} +1 -1
- package/dist/esm/{paypal-5963c1ab.js → paypal-8af04edf.js} +3 -3
- package/dist/esm/{updateCheckoutSessionAttributes-7babf0f2.js → updateCheckoutSessionAttributes-fa58ba66.js} +1 -1
- package/dist/esm/zonos-address_11.entry.js +25 -16
- package/dist/esm/zonos-cart-items_14.entry.js +27 -19
- package/dist/esm/zonos-checkout.entry.js +5 -5
- package/dist/esm/zonos-controller.entry.js +3 -3
- package/dist/esm/zonos-country-flag.entry.js +2 -2
- package/dist/esm/zonos-country-select_4.entry.js +25 -8
- package/dist/esm/zonos-empty-state-payment_4.entry.js +4 -4
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +2 -2
- package/dist/esm/zonos-language-select_2.entry.js +2 -2
- package/dist/esm-es5/cart-011aa510.js +1 -0
- package/dist/esm-es5/{handleFetch-dd74bbb1.js → handleFetch-bb221e63.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{localization-cf31c728.js → localization-b3bdf691.js} +1 -1
- package/dist/esm-es5/{paypal-5963c1ab.js → paypal-8af04edf.js} +1 -1
- package/dist/esm-es5/{updateCheckoutSessionAttributes-7babf0f2.js → updateCheckoutSessionAttributes-fa58ba66.js} +1 -1
- package/dist/esm-es5/zonos-address_11.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_14.entry.js +1 -1
- package/dist/esm-es5/zonos-checkout.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-empty-state-payment_4.entry.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-language-select_2.entry.js +1 -1
- 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/utils/extractName.d.ts +14 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-c34645cb.js → p-0627d793.js} +1 -1
- package/dist/zonos-elements/{p-6c69c5fa.system.entry.js → p-24043e4f.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-e72b61c1.system.entry.js → p-2fa8f2b8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-41ec9531.entry.js → p-3940f15d.entry.js} +1 -1
- package/dist/zonos-elements/p-48b2fbb7.entry.js +1 -0
- package/dist/zonos-elements/{p-ac784ab8.system.entry.js → p-4ec7abf7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-6e8354c1.system.entry.js → p-4f2994f9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-547babdd.entry.js +1 -0
- package/dist/zonos-elements/{p-4444bb4e.system.js → p-54fd7799.system.js} +1 -1
- package/dist/zonos-elements/{p-755cf8bc.system.js → p-56a2d942.system.js} +1 -1
- package/dist/zonos-elements/{p-b22fcbda.system.entry.js → p-573b0565.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-8d37bb03.entry.js → p-592cdd54.entry.js} +1 -1
- package/dist/zonos-elements/p-5a7130da.entry.js +1 -0
- package/dist/zonos-elements/p-62cb568d.system.entry.js +1 -0
- package/dist/zonos-elements/p-6cd4160d.system.js +1 -0
- package/dist/zonos-elements/{p-fb898c4f.system.js → p-801919e5.system.js} +1 -1
- package/dist/zonos-elements/p-8037d54c.entry.js +1 -0
- package/dist/zonos-elements/p-81b357f7.system.js +1 -1
- package/dist/zonos-elements/{p-1d0e40b7.entry.js → p-8cafb9a4.entry.js} +1 -1
- package/dist/zonos-elements/{p-a9b63cdb.system.js → p-9d717d8d.system.js} +1 -1
- package/dist/zonos-elements/{p-a1cd5572.system.entry.js → p-a3e6cf3e.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-a45a15a0.js → p-b6dfa589.js} +1 -1
- package/dist/zonos-elements/{p-137ee43a.system.entry.js → p-c4b7b1a4.system.entry.js} +1 -1
- package/dist/zonos-elements/p-cd62465e.system.entry.js +1 -0
- package/dist/zonos-elements/{p-c8433f89.js → p-da079b20.js} +1 -1
- package/dist/zonos-elements/p-db07e61c.entry.js +1 -0
- package/dist/zonos-elements/{p-2eec2d7c.js → p-e4d475c3.js} +1 -1
- package/dist/zonos-elements/p-ef76be6f.system.js +1 -0
- package/dist/zonos-elements/p-f04bad33.system.entry.js +1 -0
- package/dist/zonos-elements/p-f08d180a.js +1 -0
- package/dist/zonos-elements/{p-752220fe.entry.js → p-f1ba6a31.entry.js} +1 -1
- package/dist/zonos-elements/{p-6a157c84.entry.js → p-f530cb04.entry.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout-footer/assets/zonosIcon.svg +0 -5
- package/dist/collection/components/hello/zonos-hello-dialog/zonos-hello-dialog-footer/assets/zonosIcon.svg +0 -5
- package/dist/esm-es5/cart-c3540cd7.js +0 -1
- package/dist/zonos-elements/p-003f37f4.entry.js +0 -1
- package/dist/zonos-elements/p-0707379c.entry.js +0 -1
- package/dist/zonos-elements/p-0fd105fa.system.entry.js +0 -1
- package/dist/zonos-elements/p-236643d0.system.entry.js +0 -1
- package/dist/zonos-elements/p-2820aff2.system.js +0 -1
- package/dist/zonos-elements/p-299efbcf.system.entry.js +0 -1
- package/dist/zonos-elements/p-6d7e45f3.entry.js +0 -1
- package/dist/zonos-elements/p-9004bdda.entry.js +0 -1
- package/dist/zonos-elements/p-adbc4643.system.js +0 -1
- package/dist/zonos-elements/p-aeae5a7f.entry.js +0 -1
- package/dist/zonos-elements/p-f979a131.js +0 -1
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-e241e025.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-428965f4.js');
|
|
10
10
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
|
-
require('./handleFetch-
|
|
12
|
+
require('./handleFetch-b821ed5d.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -1905,10 +1905,27 @@ const Globe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" color
|
|
|
1905
1905
|
</svg>
|
|
1906
1906
|
`;
|
|
1907
1907
|
|
|
1908
|
-
const
|
|
1909
|
-
<path d="
|
|
1910
|
-
<path
|
|
1911
|
-
<path
|
|
1908
|
+
const ZonosIconDark = `<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1909
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>
|
|
1910
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>
|
|
1911
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>
|
|
1912
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>
|
|
1913
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>
|
|
1914
|
+
<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>
|
|
1915
|
+
<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>
|
|
1916
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>
|
|
1917
|
+
</svg>
|
|
1918
|
+
`;
|
|
1919
|
+
|
|
1920
|
+
const ZonosIconLight = `<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1921
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>
|
|
1922
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>
|
|
1923
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>
|
|
1924
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>
|
|
1925
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>
|
|
1926
|
+
<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>
|
|
1927
|
+
<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>
|
|
1928
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>
|
|
1912
1929
|
</svg>
|
|
1913
1930
|
`;
|
|
1914
1931
|
|
|
@@ -1935,9 +1952,9 @@ const ZonosHelloDialogFooter = class {
|
|
|
1935
1952
|
const language = (_b = ILanguage.languages.find(x => x.code === localization.localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
1936
1953
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
1937
1954
|
const mainColor = primaryColor && isDarkColor.isDarkColor(primaryColor) ? 'white' : 'black';
|
|
1938
|
-
return (index.h(index.Host, { key: '
|
|
1955
|
+
return (index.h(index.Host, { key: 'd202f2295a5a3182727f2166847ac56f5958b654', class: "zonos--elements" }, index.h("div", { key: 'b42f6b1339449c5c4cebc999f25c0fc02a6b6e85', class: "zonos--hello-dialog-footer", style: {
|
|
1939
1956
|
'--zonos--primary-color': primaryColor,
|
|
1940
|
-
} }, index.h("a", { key: '
|
|
1957
|
+
} }, index.h("a", { key: 'c6465111d747a9c4a5b067039df51a9dc8df1976', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, index.h("zonos-icon", { key: 'fedd91718e253a8332334bea848178f091ae1cea', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), index.h("div", { key: '9211d83b19f866ba87e171eeeb29690890ca9dcb', class: "zonos--hello-locale-wrapper" }, index.h("zonos-button", { key: 'c88ca108b05511ebcaa9f1761d01413e61af91a5', buttonColor: mainColor, icon: index.h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), index.h("zonos-button", { key: 'ff2386a7e4bfced9a9c8a2d62c21257c1052053e', buttonColor: mainColor, icon: index.h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localization.localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localization.localizationStore.selectedCountryCode)))));
|
|
1941
1958
|
}
|
|
1942
1959
|
get ele() { return index.getElement(this); }
|
|
1943
1960
|
};
|
|
@@ -6,10 +6,10 @@ const index = require('./index-1c710d00.js');
|
|
|
6
6
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
8
|
const getBorderRadius = require('./getBorderRadius-1b5e33cf.js');
|
|
9
|
-
const cart = require('./cart-
|
|
10
|
-
const localization = require('./localization-
|
|
11
|
-
const handleFetch = require('./handleFetch-
|
|
12
|
-
const paypal = require('./paypal-
|
|
9
|
+
const cart = require('./cart-96520eab.js');
|
|
10
|
+
const localization = require('./localization-e241e025.js');
|
|
11
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
12
|
+
const paypal = require('./paypal-97ac0999.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
require('./isDarkColor-428965f4.js');
|
|
15
15
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-e241e025.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
10
10
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
11
11
|
const TaxId = require('./TaxId-12acedde.js');
|
|
12
|
-
require('./handleFetch-
|
|
12
|
+
require('./handleFetch-b821ed5d.js');
|
|
13
13
|
require('./VarianceTest-0cb1e118.js');
|
|
14
14
|
|
|
15
15
|
const getHasMoreSpaceAbove = (ref) => {
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
6
|
const debounce = require('./debounce-465a4328.js');
|
|
7
|
-
const localization = require('./localization-
|
|
7
|
+
const localization = require('./localization-e241e025.js');
|
|
8
8
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
|
-
const handleFetch = require('./handleFetch-
|
|
10
|
+
const handleFetch = require('./handleFetch-b821ed5d.js');
|
|
11
11
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
12
12
|
require('./VarianceTest-0cb1e118.js');
|
|
13
13
|
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1c710d00.js');
|
|
6
|
-
const localization = require('./localization-
|
|
6
|
+
const localization = require('./localization-e241e025.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-f8ee56aa.js');
|
|
8
8
|
const ILanguage = require('./ILanguage-98b04442.js');
|
|
9
|
-
require('./handleFetch-
|
|
9
|
+
require('./handleFetch-b821ed5d.js');
|
|
10
10
|
require('./VarianceTest-0cb1e118.js');
|
|
11
11
|
|
|
12
12
|
const GreenCheckDuotoneIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host, } from "@stencil/core";
|
|
2
2
|
import { translate } from "../../../../store/translationStore";
|
|
3
3
|
import { isTextContainsNonLatinChars } from "../../../../utils/containsNonLatinChars";
|
|
4
|
+
import { extractName } from "../../../../utils/extractName";
|
|
4
5
|
export class ZonosAddressForm {
|
|
5
6
|
constructor() {
|
|
6
7
|
/**
|
|
@@ -23,18 +24,18 @@ export class ZonosAddressForm {
|
|
|
23
24
|
}
|
|
24
25
|
render() {
|
|
25
26
|
const { city, country, line1, line2, name, phone, postal_code, state } = this.localAddress;
|
|
26
|
-
const firstName =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return (h(Host, { key: '
|
|
27
|
+
const { firstName, lastName } = extractName({
|
|
28
|
+
name,
|
|
29
|
+
});
|
|
30
|
+
return (h(Host, { key: '22d085e462e69a4100a8cb1763367f53b933ed1d', class: "zonos--address-form zonos--elements" }, h("div", { key: '17d6c92370343ffbd1b4a85b3c49055a5a7f9d72', class: "zonos--title" }, h("zonos-text", { key: 'a4cb01bd8fed154567e0b7ade87777a1552ea815', textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
30
31
|
? translate('Shipping')
|
|
31
|
-
: translate('Billing'))), h("div", { key: '
|
|
32
|
+
: translate('Billing'))), h("div", { key: '4a1dddabc011e465d295b5c2994fda3a2531c96e', class: "zonos--address-group" }, h("div", { key: '60df882b5717b2f557a5051f492b2c838f938cd9', class: "zonos--contact" }, h("zonos-text", { key: '90b6613ccf1b2a445baae5f700f392d195924688', type: "label" }, translate('Contact')), h("zonos-input", { key: '125815769a366e113b61d5581578ef6ecbdffa79', class: "zonos--form-email", inputLabel: translate('Email'), inputValue: this.currentAddress.email, isDisabled: true }), h("div", { key: 'd0d331fb33f40243ce23824db5ba9551fd5636f8', class: "zonos--name zonos--address-row" }, h("zonos-input", { key: '46323db8f305e491215df03ef2092e76eec38355', class: "zonos--form-first-name", inputLabel: translate('First name'), inputValue: firstName, isError: isTextContainsNonLatinChars(firstName), onInputChange: e => this.onInputChange({
|
|
32
33
|
key: 'name',
|
|
33
34
|
value: `${e.detail} ${lastName}`,
|
|
34
|
-
}) }), h("zonos-input", { key: '
|
|
35
|
+
}) }), h("zonos-input", { key: '3c055ee2f1fcaf93ebcbd8f11ad6609cd33e9e14', class: "zonos--form-last-name", inputLabel: translate('Last name'), inputValue: lastName, isError: isTextContainsNonLatinChars(lastName), onInputChange: e => this.onInputChange({
|
|
35
36
|
key: 'name',
|
|
36
37
|
value: `${firstName} ${e.detail}`,
|
|
37
|
-
}) }))), h("div", { key: '
|
|
38
|
+
}) }))), h("div", { key: 'ce30f816d03b497eb4491d2554eb63c0aabf110c', class: "zonos--address" }, h("zonos-text", { key: '304867c5354ac55071c88944a63bba88ea3fb86f', type: "label" }, translate('Address')), h("zonos-input", { key: 'f0efe937603a38761643af1486b53359a19593e5', class: "zonos--form-country", inputLabel: translate('Country'), inputValue: country, isDisabled: true }), h("zonos-input", { key: '8360a4ae65c8963e886a3fb8322e0e539d121142', class: "zonos--form-line1", inputLabel: translate('Address line 1'), inputValue: line1, isError: isTextContainsNonLatinChars(line1), onInputChange: e => this.onInputChange({ key: 'line1', value: e.detail }) }), h("zonos-input", { key: '2c9374917b705c2c9306d3d4d7fc4b4043c2b73b', class: "zonos--form-line2", inputLabel: translate('Address line 2'), inputValue: line2, isError: isTextContainsNonLatinChars(line2), onInputChange: e => this.onInputChange({ key: 'line2', value: e.detail }) }), h("div", { key: 'fd067074070cadba3d895503f35c344ff817fec2', class: "zonos--address-row" }, h("zonos-input", { key: 'a565bee68e2498403df2801eb90005e8cb2d6f44', class: "zonos--form-city", inputLabel: translate('City'), inputValue: city, isError: isTextContainsNonLatinChars(city), onInputChange: e => this.onInputChange({ key: 'city', value: e.detail }) }), h("zonos-input", { key: '89bae75b691aacdd62b624f65eee303bfb3fc811', class: "zonos--form-state", inputLabel: translate('State/Province'), inputValue: state, isError: isTextContainsNonLatinChars(state), onInputChange: e => this.onInputChange({ key: 'state', value: e.detail }) })), h("zonos-input", { key: '9a851b9f449ed135859b7b828bf362168caf76fb', class: "zonos--form-postal-code", inputLabel: translate('Postal code'), inputValue: postal_code, isError: isTextContainsNonLatinChars(postal_code), onInputChange: e => this.onInputChange({ key: 'postal_code', value: e.detail }) }), h("zonos-input", { key: 'a51b8ba1e22d5a12eac9021abe83fdc20f8eb1a6', class: "zonos--form-phone", inputLabel: translate('Phone number'), inputValue: phone, onInputChange: e => this.onInputChange({ key: 'phone', value: e.detail }) })))));
|
|
38
39
|
}
|
|
39
40
|
static get is() { return "zonos-address-form"; }
|
|
40
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -243,7 +243,7 @@ export class ZonosCheckoutFinish {
|
|
|
243
243
|
this.checkStripePaymentStatus = async () => {
|
|
244
244
|
const clientSecret = new URLSearchParams(window.location.search).get('payment_intent_client_secret') || stripeStore.clientSecret;
|
|
245
245
|
if (clientSecret || this.storybookForceStatus) {
|
|
246
|
-
const { error, messages,
|
|
246
|
+
const { error, messages, status } = await stripeStoreRetrievePayment({
|
|
247
247
|
clientSecret,
|
|
248
248
|
storybookForceStatus: this.storybookForceStatus,
|
|
249
249
|
});
|
|
@@ -273,7 +273,7 @@ export class ZonosCheckoutFinish {
|
|
|
273
273
|
void sendErrorLog({
|
|
274
274
|
endpoint: 'Stripe payment failed',
|
|
275
275
|
errors: [
|
|
276
|
-
`Payment intent "${
|
|
276
|
+
`Payment intent "${clientSecret.split('_secret_')[0]}" status: ${status} - checkout session: ${storageStore.checkoutSessionId}`,
|
|
277
277
|
],
|
|
278
278
|
metadata: {
|
|
279
279
|
allLogs,
|
|
@@ -393,11 +393,11 @@ export class ZonosCheckoutFinish {
|
|
|
393
393
|
}
|
|
394
394
|
render() {
|
|
395
395
|
const isTestMode = getIsTestMode();
|
|
396
|
-
return (h(Host, { key: '
|
|
396
|
+
return (h(Host, { key: '7b18913d8ebe7be5cbe9ee7d520b643c342c409d', class: "zonos--checkout-finish zonos--elements", style: {
|
|
397
397
|
'--zonos--border-radius': getBorderRadius({
|
|
398
398
|
overrideBorderStyle: this.borderRadius,
|
|
399
399
|
}),
|
|
400
|
-
} }, !this.isLoading && (h("div", { key: '
|
|
400
|
+
} }, !this.isLoading && (h("div", { key: 'afb522b8b3b769817c00312fc9c14b4c032873ca', class: "zonos--finish-details" }, h("div", { key: 'c8cd43bc5269f7f252abaeb25dc98929f52b89bb', 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: '1a7ead411d64fc8edf2de0383049bfd60660a315', class: "zonos--title", type: "semiBoldSubheader" }, this.notificationTitle), h("zonos-text", { key: '0c63714bbefc4e9beb1d2cf7414e5774bab4eabe', class: "zonos--subtitle", textColor: "gray-600" }, this.notificationMessages.map(message => (h(Fragment, null, message, h("br", null))))), this.shouldRenderCloseButtonForRedirectBehavior() && (h("zonos-button", { key: '06304d9815e2199108dfcb3dade1494f17b76137',
|
|
401
401
|
// Only show loading spinner if it's not an error notification
|
|
402
402
|
loading: this.isWaitingToRedirect &&
|
|
403
403
|
this.notificationType !== 'error', onClick: () => {
|
|
@@ -409,9 +409,9 @@ export class ZonosCheckoutFinish {
|
|
|
409
409
|
}
|
|
410
410
|
this.closeClickHandler();
|
|
411
411
|
}, size: "md", variant: "primary" }, translate('Close'))), !window.Zonos.isLegacyCheckout &&
|
|
412
|
-
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '
|
|
412
|
+
this.shouldRenderKeepShoppingButton() && (h("zonos-button", { key: '9b809e21052fddb2149a2a1d0c22db4b10808403', onClick: () => this.closeClickHandler(), size: "md", variant: "primary" }, this.notificationActionText))), isTestMode &&
|
|
413
413
|
cartStore.step === 'finish' &&
|
|
414
|
-
this.notificationType === 'success' && (h("div", { key: '
|
|
414
|
+
this.notificationType === 'success' && (h("div", { key: '4a278c7c4270d265c61b6b36d20864c55e1b42f1', class: "zonos--finish-button-wrapper" }, h("zonos-button", { key: 'fd8a876a0c5b76edd3be2d9b28da9c3963aee714', backgroundColor: "gray-0", buttonColor: "gray-1000", onClick: () => this.closeClickHandler(), size: "lg", variant: "outline" }, "New test cart"), h("zonos-button", { key: '7882981c1fe01ab6f78d8f84bcfc9aab94bffb74', onClick: () => {
|
|
415
415
|
const isZonosDashboard = window.location.hostname.includes('dashboard.zonos.com');
|
|
416
416
|
this.redirectToUrl(isZonosDashboard
|
|
417
417
|
? '/orders/all'
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>
|
|
4
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>
|
|
6
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>
|
|
7
|
+
<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>
|
|
8
|
+
<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>
|
|
4
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>
|
|
6
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>
|
|
7
|
+
<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>
|
|
8
|
+
<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>
|
|
10
|
+
</svg>
|
|
@@ -6,7 +6,7 @@ import { languages } from "../../../../types/ILanguage";
|
|
|
6
6
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
7
7
|
import Globe from "./assets/globe.svg";
|
|
8
8
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
9
|
-
import
|
|
9
|
+
import ZonosIconDark from "./assets/zonosIconDark.svg";
|
|
10
10
|
export class ZonosCheckoutFooter {
|
|
11
11
|
constructor() {
|
|
12
12
|
/**
|
|
@@ -35,10 +35,10 @@ export class ZonosCheckoutFooter {
|
|
|
35
35
|
const languageLabel = (_a = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _a === void 0 ? void 0 : _a.label;
|
|
36
36
|
// reverse color when on desktop. With the coversheet backdrop, the color should be white
|
|
37
37
|
const colorDesktop = this.dataTheme === 'LIGHT' && !this.mobile ? 'gray-0' : 'gray-1000';
|
|
38
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: 'aa7fe5e0bb22626f590d93a6c8a52876523a2dfb', class: classes(['zonos--elements', this.isMobile && 'mobile']) }, h("div", { key: '5fb0fc90649a06e324935484d0c5c1dba31d792c', class: "zonos--checkout-footer" }, h("div", { key: 'e34ac7fda1d9a13830276313e4a36a7840497d7e', class: "zonos--checkout-locale-wrapper" }, h("zonos-button", { key: '775156c9f331715768b1bf9c36970d0c7da02fd2', buttonColor: colorDesktop, class: "zonos--checkout-footer-language-button", icon: h("zonos-icon", { "aria-label": "Language select", content: Globe, iconColor: colorDesktop }), onClick: () => this.toggleLanguageDialog(), variant: "subtle" }, languageLabel), h("div", { key: 'e2cc31362529661507811b9f5aa68586b3bf9ea5', class: classes([
|
|
39
39
|
'zonos--checkout-footer-dialog',
|
|
40
40
|
this.showLanguageDialog && 'zonos--checkout-footer-dialog-open',
|
|
41
|
-
]) }, h("zonos-language-select", { key: '
|
|
41
|
+
]) }, h("zonos-language-select", { key: 'ad43b0a6bb947a69ea970485ee8d9afb5c8d1adb', handleOnClose: () => this.toggleLanguageDialog() }))), h("div", { key: 'c652833a9ce05beb22b9530003863ac0e5e9f8ea', class: "zonos--checkout-footer-icon-wrapper" }, h("a", { key: 'f2f8fb4ef070fe6a59a8b787e9e3e6237c2cc395', href: "https://zonos.com/docs/legal/zonos-privacy-policy", target: "_blank" }, h("zonos-text", { key: '50b8962317bfc01bc7edbbe4c51f58476ca3c4ec', textColor: colorDesktop }, "Privacy policy")), h("div", { key: '7b4b70f7c0bd4ae5f385d6738f844a795261b9b9', class: "zonos--checkout-footer-logo" }, h("zonos-text", { key: '8a4279a6584a376cb10e8da6b33d8006ac896d5b', textColor: colorDesktop }, "Powered by"), h("a", { key: '523a822b1c5b80bcb1d5dde2a7d9fce5fe476d20', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: '19753e93a7820765cf208916f53adebdcdf05cf9', autoHeight: true, content: ZonosIconDark, size: 108 })))))));
|
|
42
42
|
}
|
|
43
43
|
static get is() { return "zonos-checkout-footer"; }
|
|
44
44
|
static get encapsulation() { return "shadow"; }
|
|
@@ -7,6 +7,7 @@ import { translate } from "../../../store/translationStore";
|
|
|
7
7
|
import { getZonosStoreTheme, zonosStore, zonosStoreOnChange, } from "../../../store/zonosStore";
|
|
8
8
|
import { updateCheckoutSessionAttributes } from "../../../utils/api/updateCheckoutSessionAttributes";
|
|
9
9
|
import { containsNonLatinChars } from "../../../utils/containsNonLatinChars";
|
|
10
|
+
import { extractName } from "../../../utils/extractName";
|
|
10
11
|
import { log } from "../../../utils/logging/log";
|
|
11
12
|
import { sendErrorLog } from "../../../utils/logging/sendErrorLog";
|
|
12
13
|
import { taxIdValidationResult } from "../../../utils/taxIdValidationResult";
|
|
@@ -105,11 +106,14 @@ export class ZonosCustomerInfo {
|
|
|
105
106
|
if (!stripeEventDataObj || !submitDataByKey) {
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
109
|
+
const { firstName, lastName } = extractName({
|
|
110
|
+
name: submitDataByKey.name,
|
|
111
|
+
});
|
|
108
112
|
const updateData = Object.assign(Object.assign({}, stripeEventDataObj), { complete: true, value: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value), { address: Object.assign(Object.assign({}, stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address), { city: submitDataByKey.city ||
|
|
109
113
|
(stripeEventDataObj === null || stripeEventDataObj === void 0 ? void 0 : stripeEventDataObj.value.address.city) ||
|
|
110
|
-
'', line1: submitDataByKey.line1, line2: submitDataByKey.line2, postal_code: submitDataByKey.postal_code, state: submitDataByKey.state }), firstName
|
|
114
|
+
'', line1: submitDataByKey.line1, line2: submitDataByKey.line2, postal_code: submitDataByKey.postal_code, state: submitDataByKey.state }), firstName,
|
|
111
115
|
// get all the names after
|
|
112
|
-
lastName
|
|
116
|
+
lastName, name: submitDataByKey.name }) });
|
|
113
117
|
// overwrite the address object with the new data
|
|
114
118
|
if (type === 'shippingAddress') {
|
|
115
119
|
stripeStore.stripeAddressEventData = updateData;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="white"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="white"/>
|
|
4
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="white"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="white"/>
|
|
6
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="white"/>
|
|
7
|
+
<path d="M8.8 58C8.8 31.9322 29.9322 10.8 56 10.8C82.0678 10.8 103.2 31.9322 103.2 58C103.2 74.868 94.3524 89.6734 81.0342 98.022C80.6447 98.2662 80.1318 98.123 79.9175 97.7162L78.7941 95.5842C78.5971 95.2104 78.7255 94.7484 79.0825 94.5224C91.1684 86.8682 99.2 73.374 99.2 58C99.2 45.1582 93.5931 33.6223 84.7029 25.7135L83.8042 24.914C83.1429 24.3257 82.1296 24.3861 81.5428 25.0488L76.655 30.5694C76.3787 30.8815 75.9095 30.9282 75.5707 30.6852C70.0598 26.7304 63.2996 24.4 56 24.4C37.4432 24.4 22.4 39.4432 22.4 58C22.4 70.9369 29.7121 82.1614 40.4157 87.7744L41.4783 88.3315C42.2607 88.7419 43.2277 88.4403 43.6381 87.6579L47.1029 81.0544C47.2912 80.6954 47.7178 80.5354 48.1006 80.6688C50.5764 81.5315 53.2355 82 56 82C69.2548 82 80 71.2548 80 58C80 44.7452 69.2548 34 56 34H54.8C53.9163 34 53.2 34.7163 53.2 35.6V43.2143C53.2 43.5965 52.9289 43.923 52.5577 44.014C46.267 45.5571 41.6 51.2335 41.6 58C41.6 62.3276 43.5125 66.2118 46.529 68.8473C49.059 71.0578 52.3762 72.4 56 72.4C63.9529 72.4 70.4 65.9529 70.4 58C70.4 51.2335 65.733 45.5571 59.4423 44.014C59.0711 43.923 58.8 43.5965 58.8 43.2143V40.7431C58.8 40.2532 59.2372 39.8772 59.7171 39.9756C68.0973 41.6948 74.4 49.1114 74.4 58C74.4 68.162 66.162 76.4 56 76.4C52.9185 76.4 50.0216 75.6447 47.4764 74.3116L46.4142 73.7552C45.6318 73.3454 44.6653 73.6471 44.255 74.4292L41.0133 80.6075C40.7934 81.0267 40.2589 81.165 39.8722 80.8921C32.6864 75.8202 28 67.4556 28 58C28 42.536 40.536 30 56 30C63.1489 30 69.6662 32.6755 74.6156 37.0841L75.5144 37.8846C76.1757 38.4736 77.1895 38.4135 77.7765 37.7505L82.4362 32.4876C82.745 32.1388 83.2861 32.1262 83.6026 32.4681C89.8104 39.1755 93.6 48.1438 93.6 58C93.6 72.4821 85.4133 85.0566 73.4023 91.3398C68.2018 94.0603 62.2848 95.6 56 95.6C39.9975 95.6 26.3233 85.602 20.8962 71.502L20.467 70.3868C20.1505 69.5646 19.229 69.1529 18.4054 69.4659L11.7892 71.9802C11.3597 72.1434 10.8807 71.9123 10.7497 71.4719C9.48157 67.2056 8.8 62.6844 8.8 58Z" fill="white"/>
|
|
8
|
+
<path d="M47.2 58C47.2 53.1399 51.1399 49.2 56 49.2C60.8601 49.2 64.8 53.1399 64.8 58C64.8 62.8601 60.8601 66.8 56 66.8C53.7822 66.8 51.7621 65.9832 50.2135 64.6302C48.3624 63.0129 47.2 60.6439 47.2 58Z" fill="white"/>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM73.8305 98.177C73.6343 97.8047 73.1837 97.6488 72.7961 97.8125C67.6303 99.9943 61.9532 101.2 56 101.2C38.8594 101.2 24.0562 91.2184 17.0752 76.7588C16.8924 76.3802 16.4515 76.1992 16.0585 76.3485L9.18358 78.9612C8.35959 79.2743 7.43754 78.862 7.12154 78.0391L6.69286 76.9227C4.43567 71.0446 3.2 64.6633 3.2 58C3.2 28.8394 26.8394 5.2 56 5.2C85.1606 5.2 108.8 28.8394 108.8 58C108.8 78.3323 97.3067 95.9756 80.4757 104.796L79.4152 105.352C78.6338 105.761 77.6683 105.461 77.257 104.68L73.8305 98.177Z" fill="white"/>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="408" height="112" viewBox="0 0 408 112" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M185.6 25.2H141.6C140.716 25.2 140 25.9164 140 26.8V36.4C140 37.2837 140.716 38 141.6 38H167.413C168.07 38 168.447 38.7478 168.056 39.2758L140.627 76.3519C140.22 76.9028 140 77.5699 140 78.2551V85.2001C140 86.0837 140.716 86.8 141.6 86.8H185.6C186.484 86.8 187.2 86.0837 187.2 85.2001V75.6C187.2 74.7164 186.484 74 185.6 74H159.787C159.13 74 158.753 73.2523 159.144 72.7243L186.573 35.6482C186.98 35.0973 187.2 34.4302 187.2 33.745V26.8C187.2 25.9164 186.484 25.2 185.6 25.2Z" fill="#0F1015"/>
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M212.8 24.8C203.08 24.8 195.2 32.6798 195.2 42.4V69.6C195.2 79.3203 203.08 87.2001 212.8 87.2001H224.8C234.52 87.2001 242.4 79.3203 242.4 69.6V42.4001C242.4 32.6798 234.52 24.8 224.8 24.8H212.8ZM212.8 37.6C210.149 37.6 208 39.7491 208 42.4001V69.6C208 72.251 210.149 74.4001 212.8 74.4001H224.8C227.451 74.4001 229.6 72.251 229.6 69.6V42.4C229.6 39.7491 227.451 37.6 224.8 37.6H212.8Z" fill="#0F1015"/>
|
|
4
|
+
<path d="M250.4 27.5223V85.3983C250.4 86.282 251.116 86.9983 252 86.9983H261.6C262.484 86.9983 263.2 86.282 263.2 85.3983V48.1873C263.2 46.3171 264.286 44.6172 265.983 43.8314L277.983 38.2759C281.164 36.8032 284.8 39.1263 284.8 42.6317V85.3983C284.8 86.282 285.516 86.9983 286.4 86.9983H296C296.884 86.9983 297.6 86.282 297.6 85.3983V42.6209C297.6 29.7687 284.272 21.2506 272.608 26.6484L264.318 30.4847C263.659 30.7898 262.877 30.6125 262.414 30.053L259.954 27.0817C259.346 26.3474 258.443 25.9223 257.489 25.9223H252C251.116 25.9223 250.4 26.6387 250.4 27.5223Z" fill="#0F1015"/>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M323.2 24.8C313.48 24.8 305.6 32.6798 305.6 42.4V69.6C305.6 79.3203 313.48 87.2001 323.2 87.2001H335.2C344.92 87.2001 352.8 79.3203 352.8 69.6V42.4001C352.8 32.6798 344.92 24.8 335.2 24.8H323.2ZM323.2 37.6C320.549 37.6 318.4 39.7491 318.4 42.4001V69.6C318.4 72.251 320.549 74.4001 323.2 74.4001H335.2C337.851 74.4001 340 72.251 340 69.6V42.4C340 39.7491 337.851 37.6 335.2 37.6H323.2Z" fill="#0F1015"/>
|
|
6
|
+
<path d="M378.101 25.2H391.708C400.706 25.2 408 32.4944 408 41.4925C408 42.2395 407.444 42.8696 406.703 42.9622L396.602 44.2249C395.857 44.3179 395.2 43.7376 395.2 42.9876C395.2 40.2331 392.967 38 390.212 38H378.921C375.982 38 373.6 40.3822 373.6 43.3207C373.6 45.8196 375.339 47.9818 377.78 48.5176L394.22 52.1264C402.267 53.8928 408 61.021 408 69.2593C408 78.9468 400.147 86.8 390.459 86.8H377.092C368.094 86.8 360.8 79.5057 360.8 70.5076C360.8 69.7606 361.356 69.1305 362.097 69.0379L372.198 67.7752C372.943 67.6822 373.6 68.2625 373.6 69.0125C373.6 71.767 375.833 74 378.588 74H390.014C392.878 74 395.2 71.6783 395.2 68.8143C395.2 66.4508 393.602 64.3863 391.314 63.794L373.765 59.2508C366.132 57.2745 360.8 50.3868 360.8 42.5015C360.8 32.9462 368.546 25.2 378.101 25.2Z" fill="#0F1015"/>
|
|
7
|
+
<path d="M8 58C8 31.4903 29.4903 10 56 10C82.5097 10 104 31.4903 104 58C104 75.468 94.6696 90.7597 80.7129 99.1582C80.3237 99.3924 79.8197 99.2468 79.6079 98.845L77.7391 95.2981C77.5396 94.9194 77.6741 94.4514 78.0396 94.2286C90.245 86.7878 98.4 73.3477 98.4 58C98.4 45.396 92.898 34.0746 84.1712 26.3112L83.8716 26.0447C83.2103 25.4564 82.197 25.5168 81.6102 26.1795L76.2698 32.2113C70.6911 27.8209 63.6496 25.2 56 25.2C37.8851 25.2 23.2 39.8851 23.2 58C23.2 70.6278 30.3366 81.5856 40.7873 87.0659L41.1415 87.2516C41.9239 87.6619 42.8909 87.3604 43.3013 86.578L46.7194 80.0634C46.9121 79.6961 47.353 79.5384 47.7406 79.6861C50.3082 80.6645 53.0932 81.2 56 81.2C68.813 81.2 79.2 70.813 79.2 58C79.2 45.187 68.813 34.8 56 34.8H55.6C54.7163 34.8 54 35.5163 54 36.4V43.8553C54 44.2521 53.7083 44.5864 53.3192 44.6641C47.092 45.909 42.4 51.4066 42.4 58C42.4 62.0871 44.2053 65.7548 47.0553 68.2449C49.4452 70.3329 52.5771 71.6 56 71.6C63.5111 71.6 69.6 65.5111 69.6 58C69.6 51.4066 64.908 45.909 58.6808 44.6641C58.2917 44.5864 58 44.2521 58 43.8553V39.79C58 39.3156 58.411 38.944 58.8801 39.0146C68.1177 40.4042 75.2 48.375 75.2 58C75.2 68.6039 66.6039 77.2 56 77.2C52.7862 77.2 49.7622 76.4119 47.1053 75.0203L46.7512 74.8348C45.9688 74.425 45.0023 74.7267 44.592 75.5088L41.3048 81.7738C41.0894 82.1844 40.5705 82.3272 40.1833 82.0723C32.3591 76.9208 27.2 68.0616 27.2 58C27.2 42.0942 40.0942 29.2 56 29.2C63.3526 29.2 70.0574 31.9526 75.1478 36.4867L75.4473 36.7535C76.1086 37.3425 77.1225 37.2824 77.7095 36.6194L82.416 31.3036C82.7202 30.96 83.251 30.9417 83.5705 31.2711C90.2759 38.1859 94.4 47.6103 94.4 58C94.4 72.7914 86.0375 85.6329 73.7731 92.0487C68.4609 94.8276 62.417 96.4 56 96.4C39.6557 96.4 25.6916 86.188 20.1496 71.7893L20.0065 71.4176C19.6901 70.5954 18.7685 70.1837 17.945 70.4967L11.2754 73.0313C10.8512 73.1925 10.3773 72.9691 10.24 72.5365C8.78535 67.9531 8 63.0699 8 58Z" fill="#0F1015"/>
|
|
8
|
+
<path d="M46.4 58C46.4 52.6981 50.6981 48.4 56 48.4C61.3019 48.4 65.6 52.6981 65.6 58C65.6 63.3019 61.3019 67.6 56 67.6C53.5814 67.6 51.376 66.7082 49.6871 65.2326C47.6696 63.4699 46.4 60.8844 46.4 58Z" fill="#0F1015"/>
|
|
9
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5314 80.7132C15.335 80.3641 14.9136 80.2069 14.5392 80.3492L7.33942 83.0853C6.51543 83.3984 5.59337 82.9861 5.27738 82.1632L3.70554 78.0698C1.30997 71.8314 0 65.0616 0 58C0 27.0721 25.0721 2 56 2C86.9279 2 112 27.0721 112 58C112 79.5691 99.8043 98.2795 81.9611 107.63L78.0725 109.668C77.291 110.078 76.3256 109.777 75.9143 108.997L72.3255 102.186C72.1387 101.831 71.7185 101.67 71.3402 101.803C66.5332 103.486 61.3687 104.4 56 104.4C38.6169 104.4 23.4779 94.8422 15.5314 80.7132ZM74.193 97.1488C73.9943 96.7717 73.5352 96.6173 73.1454 96.7898C67.9011 99.1111 62.0989 100.4 56 100.4C38.9222 100.4 24.2068 90.3041 17.4886 75.7611C17.3101 75.3745 16.8638 75.1867 16.4658 75.3379L9.64462 77.9301C8.82063 78.2433 7.89858 77.831 7.58258 77.008L7.43969 76.6359C5.21709 70.8479 4 64.5637 4 58C4 29.2812 27.2812 6 56 6C84.7188 6 108 29.2812 108 58C108 78.0231 96.6823 95.3996 80.1044 104.087L79.7509 104.273C78.9694 104.682 78.0039 104.382 77.5927 103.601L74.193 97.1488Z" fill="#0F1015"/>
|
|
10
|
+
</svg>
|
|
@@ -5,7 +5,9 @@ import { languages } from "../../../../types/ILanguage";
|
|
|
5
5
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
6
6
|
import Globe from "./assets/globe.svg";
|
|
7
7
|
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
8
|
-
import
|
|
8
|
+
import ZonosIconDark from "./assets/zonosIconDark.svg";
|
|
9
|
+
// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
|
|
10
|
+
import ZonosIconLight from "./assets/zonosIconLight.svg";
|
|
9
11
|
export class ZonosHelloDialogFooter {
|
|
10
12
|
constructor() {
|
|
11
13
|
/**
|
|
@@ -25,9 +27,9 @@ export class ZonosHelloDialogFooter {
|
|
|
25
27
|
const language = (_b = languages.find(x => x.code === localizationStore.selectedLocale)) === null || _b === void 0 ? void 0 : _b.translatedLabel;
|
|
26
28
|
// Only use gray-0 (white) when the background color is dark (apply inverted color if the element is using dark theme variable)
|
|
27
29
|
const mainColor = primaryColor && isDarkColor(primaryColor) ? 'white' : 'black';
|
|
28
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: 'd202f2295a5a3182727f2166847ac56f5958b654', class: "zonos--elements" }, h("div", { key: 'b42f6b1339449c5c4cebc999f25c0fc02a6b6e85', class: "zonos--hello-dialog-footer", style: {
|
|
29
31
|
'--zonos--primary-color': primaryColor,
|
|
30
|
-
} }, h("a", { key: '
|
|
32
|
+
} }, h("a", { key: 'c6465111d747a9c4a5b067039df51a9dc8df1976', href: "https://zonos.com", target: "_blank", title: "Zonos website" }, h("zonos-icon", { key: 'fedd91718e253a8332334bea848178f091ae1cea', "aria-label": "Zonos Logo", autoHeight: true, content: mainColor === 'black' ? ZonosIconLight : ZonosIconDark, iconColor: mainColor, size: 108 })), h("div", { key: '9211d83b19f866ba87e171eeeb29690890ca9dcb', class: "zonos--hello-locale-wrapper" }, h("zonos-button", { key: 'c88ca108b05511ebcaa9f1761d01413e61af91a5', buttonColor: mainColor, icon: h("zonos-icon", { "aria-label": "Open language select", content: Globe, iconColor: mainColor }), onClick: () => this.setShowLanguageSelect(true), variant: "subtle" }, language), h("zonos-button", { key: 'ff2386a7e4bfced9a9c8a2d62c21257c1052053e', buttonColor: mainColor, icon: h("zonos-country-flag", { "aria-label": "Open country select", class: "zonos--footer-country-flag", countryCode: localizationStore.selectedCountryCode }), onClick: () => this.setShowCountrySelect(true), variant: "subtle" }, localizationStore.selectedCountryCode)))));
|
|
31
33
|
}
|
|
32
34
|
static get is() { return "zonos-hello-dialog-footer"; }
|
|
33
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,6 +8,7 @@ import { calculateLandedCostNormalized } from "../../utils/api/calculateLandedCo
|
|
|
8
8
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
9
9
|
import { buildTranslateRequest } from "../../utils/checkout/buildTranslateRequest";
|
|
10
10
|
import { sortServiceLevelOptionsByAmount } from "../../utils/checkout/sortServiceLevelOptionsByAmount";
|
|
11
|
+
import { extractName } from "../../utils/extractName";
|
|
11
12
|
import { handleFetch } from "../../utils/handleFetch";
|
|
12
13
|
import { isDarkColor } from "../../utils/isDarkColor";
|
|
13
14
|
import { jsonParse } from "../../utils/jsonParse";
|
|
@@ -204,8 +205,11 @@ const checkIsAddressOutdatedForAsyncAddressUpdate = () => {
|
|
|
204
205
|
isCompanyNameDirty);
|
|
205
206
|
};
|
|
206
207
|
const buildAddressForPartyCreate = ({ address, firstName, lastName, name, phone, }) => {
|
|
207
|
-
const
|
|
208
|
-
|
|
208
|
+
const { firstName: _firstName, lastName: _lastName } = extractName({
|
|
209
|
+
firstName,
|
|
210
|
+
lastName,
|
|
211
|
+
name,
|
|
212
|
+
});
|
|
209
213
|
if (!_firstName || !_lastName) {
|
|
210
214
|
void sendErrorLog({
|
|
211
215
|
endpoint: 'PARTY_CREATE_NO_NAME_FOUND',
|
|
@@ -8,6 +8,7 @@ import { zonosStore } from "../../store/zonosStore";
|
|
|
8
8
|
import { trackConversionEvent } from "../../utils/api/trackConversionEvent";
|
|
9
9
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
10
10
|
import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
|
|
11
|
+
import { extractName } from "../../utils/extractName";
|
|
11
12
|
import { log } from "../../utils/logging/log";
|
|
12
13
|
import { logError } from "../../utils/logging/logError";
|
|
13
14
|
import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../types/checkout/Tax";
|
|
@@ -194,8 +195,14 @@ export class ZonosAddress {
|
|
|
194
195
|
}
|
|
195
196
|
}, 600);
|
|
196
197
|
}
|
|
198
|
+
const { firstName, lastName } = extractName({
|
|
199
|
+
firstName: eventValue.firstName,
|
|
200
|
+
lastName: eventValue.lastName,
|
|
201
|
+
name: eventValue.name,
|
|
202
|
+
});
|
|
197
203
|
this.updateAddressEventData({
|
|
198
|
-
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName
|
|
204
|
+
event: Object.assign(Object.assign({}, event), { elementMode: this.type, elementType: 'address', value: Object.assign(Object.assign({}, eventValue), { firstName,
|
|
205
|
+
lastName }) }),
|
|
199
206
|
type: this.type,
|
|
200
207
|
});
|
|
201
208
|
});
|
|
@@ -299,7 +306,7 @@ export class ZonosAddress {
|
|
|
299
306
|
this.isAddressFilled = true;
|
|
300
307
|
}
|
|
301
308
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
302
|
-
return (h(Host, { key: '
|
|
309
|
+
return (h(Host, { key: '13b9fdc214b7ffeacaa180f1ba0d49032b417b6f', class: "zonos--address zonos--elements" }, h("zonos-text", { key: '7a6ec3c462293e85926b0f379860d8d4edfe6120', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), h("div", { key: '36c094186e6ce2ce1d1c4e8f56823fd032b3ad9e', class: "zonos--address-component" })));
|
|
303
310
|
}
|
|
304
311
|
static get is() { return "zonos-address"; }
|
|
305
312
|
static get encapsulation() { return "scoped"; }
|
|
@@ -22,6 +22,7 @@ import { isValidZip } from "../../utils/checkout/form/isValidZip";
|
|
|
22
22
|
import { isCheckoutMobile } from "../../utils/checkout/isCheckoutMobile";
|
|
23
23
|
import { shouldRenderTaxIdInput } from "../../utils/checkout/shouldRenderTaxIdInput";
|
|
24
24
|
import { classes } from "../../utils/classes";
|
|
25
|
+
import { extractName } from "../../utils/extractName";
|
|
25
26
|
import { log } from "../../utils/logging/log";
|
|
26
27
|
import { mergeAddress } from "../../utils/mergeAddress";
|
|
27
28
|
import { countryRequireTaxId, shipToTaxIdLabels, } from "../../../types/checkout/Tax";
|
|
@@ -415,14 +416,17 @@ export class ZonosAddress {
|
|
|
415
416
|
// Use data from default address if it's available
|
|
416
417
|
const firstDefaultAddress = this.defaultAddress[0];
|
|
417
418
|
if (firstDefaultAddress) {
|
|
419
|
+
const { firstName, lastName } = extractName({
|
|
420
|
+
name: firstDefaultAddress.name,
|
|
421
|
+
});
|
|
418
422
|
const countryCode = firstDefaultAddress.address.country ||
|
|
419
423
|
localizationStore.selectedCountryCode ||
|
|
420
424
|
'US';
|
|
421
425
|
this.setFormValues({
|
|
422
426
|
city: firstDefaultAddress.address.city,
|
|
423
427
|
country: countryCode,
|
|
424
|
-
firstName
|
|
425
|
-
lastName
|
|
428
|
+
firstName,
|
|
429
|
+
lastName,
|
|
426
430
|
line1: firstDefaultAddress.address.line1,
|
|
427
431
|
line2: firstDefaultAddress.address.line2 || '',
|
|
428
432
|
phone: firstDefaultAddress.phone || '',
|
|
@@ -890,10 +894,10 @@ export class ZonosAddress {
|
|
|
890
894
|
this.country = localizationStore.selectedCountryCode;
|
|
891
895
|
}
|
|
892
896
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
893
|
-
return (h(Host, { key: '
|
|
897
|
+
return (h(Host, { key: '9e1d9e1ed3fca30876ba8310510873a5b10c6552', class: classes([
|
|
894
898
|
'zonos--address zonos--elements',
|
|
895
899
|
`zonos--${this.type}-address`,
|
|
896
|
-
]) }, h("zonos-text", { key: '
|
|
900
|
+
]) }, h("zonos-text", { key: '2356d42946b3ed93c4670fb876101a1371ac5c14', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderCustomAddressForm()));
|
|
897
901
|
}
|
|
898
902
|
static get is() { return "zonos-custom-address"; }
|
|
899
903
|
static get encapsulation() { return "scoped"; }
|