@zonos/elements 1.3.282 → 1.3.283
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-dc31b242.js → cart-a1c00090.js} +1 -1
- package/dist/cjs/{collect-463ab3d7.js → collect-e61eafca.js} +2 -2
- package/dist/cjs/{getMissingRequiredShippingFields-7cd21100.js → getMissingRequiredShippingFields-a6c4f625.js} +1 -1
- package/dist/cjs/{hasInclusivePrice-d14b9d71.js → hasInclusivePrice-e7b57e02.js} +1 -1
- package/dist/cjs/index.cjs.js +7 -7
- package/dist/cjs/{invoice-8c995041.js → invoice-ead45797.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{localization-491121ad.js → localization-783849c8.js} +2 -0
- package/dist/cjs/{paypal-2a4c374c.js → paypal-e1548f40.js} +2 -2
- package/dist/cjs/{placeTestOrder-a940a2e9.js → placeTestOrder-d99b1fe2.js} +2 -2
- package/dist/cjs/{renderCheckoutCurrency-ab39875a.js → renderCheckoutCurrency-c942fcba.js} +2 -2
- package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +94 -53
- package/dist/cjs/zonos-address-display_2.cjs.entry.js +12 -5
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +3 -3
- package/dist/cjs/zonos-card_5.cjs.entry.js +3 -3
- package/dist/cjs/zonos-cart-items_12.cjs.entry.js +7 -7
- package/dist/cjs/zonos-checkout.cjs.entry.js +3 -3
- package/dist/cjs/zonos-collect-cart-items_3.cjs.entry.js +2 -2
- package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +6 -6
- package/dist/cjs/zonos-collect.cjs.entry.js +4 -4
- package/dist/cjs/zonos-controller.cjs.entry.js +2 -2
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_4.cjs.entry.js +1 -1
- package/dist/cjs/zonos-elements.cjs.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +2 -2
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-invoice-cart-items_2.cjs.entry.js +4 -4
- package/dist/cjs/zonos-invoice-finish_5.cjs.entry.js +6 -6
- package/dist/cjs/zonos-invoice.cjs.entry.js +4 -4
- package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-policy-consent_2.cjs.entry.js +3 -3
- package/dist/collection/components/checkout/zonos-checkout/zonos-address-update-dialog/zonos-address-display/zonos-address-display.js +11 -4
- package/dist/collection/components/common/zonos-stripe-phone-input/zonos-stripe-phone-input.js +17 -5
- package/dist/collection/components/store/hello/localization.js +2 -0
- package/dist/collection/components/stripe/zonos-custom-address/zonos-custom-address.js +52 -48
- package/dist/collection/components/utils/checkout/getAddressCountryOptions.js +23 -0
- package/dist/esm/{cart-5282f6c1.js → cart-93c36159.js} +1 -1
- package/dist/esm/{collect-fdbab973.js → collect-42d4757a.js} +2 -2
- package/dist/esm/{getMissingRequiredShippingFields-bdeecbff.js → getMissingRequiredShippingFields-ebdccdcf.js} +1 -1
- package/dist/esm/{hasInclusivePrice-161e203f.js → hasInclusivePrice-4c12548f.js} +1 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/{invoice-cf6ad79e.js → invoice-71471339.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{localization-0953a048.js → localization-754e7e8b.js} +2 -0
- package/dist/esm/{paypal-7c82eac4.js → paypal-b1410e02.js} +2 -2
- package/dist/esm/{placeTestOrder-6a746207.js → placeTestOrder-4267cafd.js} +2 -2
- package/dist/esm/{renderCheckoutCurrency-44f897a1.js → renderCheckoutCurrency-9a81e41c.js} +2 -2
- package/dist/esm/zonos-address-completion-dialog_7.entry.js +94 -53
- package/dist/esm/zonos-address-display_2.entry.js +12 -5
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-airwallex-payment.entry.js +3 -3
- package/dist/esm/zonos-card_5.entry.js +3 -3
- package/dist/esm/zonos-cart-items_12.entry.js +7 -7
- package/dist/esm/zonos-checkout.entry.js +3 -3
- package/dist/esm/zonos-collect-cart-items_3.entry.js +2 -2
- package/dist/esm/zonos-collect-finish_6.entry.js +6 -6
- package/dist/esm/zonos-collect.entry.js +4 -4
- package/dist/esm/zonos-controller.entry.js +2 -2
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_4.entry.js +1 -1
- package/dist/esm/zonos-elements.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +2 -2
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-invoice-cart-items_2.entry.js +4 -4
- package/dist/esm/zonos-invoice-finish_5.entry.js +6 -6
- package/dist/esm/zonos-invoice.entry.js +4 -4
- package/dist/esm/zonos-language-select_2.entry.js +1 -1
- package/dist/esm/zonos-policy-consent_2.entry.js +3 -3
- package/dist/esm-es5/{cart-5282f6c1.js → cart-93c36159.js} +1 -1
- package/dist/esm-es5/{collect-fdbab973.js → collect-42d4757a.js} +1 -1
- package/dist/esm-es5/{getMissingRequiredShippingFields-bdeecbff.js → getMissingRequiredShippingFields-ebdccdcf.js} +1 -1
- package/dist/esm-es5/{hasInclusivePrice-161e203f.js → hasInclusivePrice-4c12548f.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{invoice-cf6ad79e.js → invoice-71471339.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{localization-0953a048.js → localization-754e7e8b.js} +1 -1
- package/dist/esm-es5/{paypal-7c82eac4.js → paypal-b1410e02.js} +1 -1
- package/dist/esm-es5/{placeTestOrder-6a746207.js → placeTestOrder-4267cafd.js} +1 -1
- package/dist/esm-es5/{renderCheckoutCurrency-44f897a1.js → renderCheckoutCurrency-9a81e41c.js} +1 -1
- package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
- package/dist/esm-es5/zonos-address-display_2.entry.js +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
- package/dist/esm-es5/zonos-card_5.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-collect-cart-items_3.entry.js +1 -1
- package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
- package/dist/esm-es5/zonos-collect.entry.js +1 -1
- package/dist/esm-es5/zonos-controller.entry.js +1 -1
- package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
- package/dist/esm-es5/zonos-country-select_4.entry.js +1 -1
- package/dist/esm-es5/zonos-elements.js +1 -1
- package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm-es5/zonos-hello.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-cart-items_2.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice-finish_5.entry.js +1 -1
- package/dist/esm-es5/zonos-invoice.entry.js +1 -1
- package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
- package/dist/esm-es5/zonos-policy-consent_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/common/zonos-stripe-phone-input/zonos-stripe-phone-input.d.ts +1 -0
- package/dist/types/components/store/hello/localization.d.ts +7 -0
- package/dist/types/components/stripe/zonos-custom-address/zonos-custom-address.d.ts +9 -13
- package/dist/types/components/utils/checkout/getAddressCountryOptions.d.ts +29 -0
- package/dist/zonos-elements/index.esm.js +1 -1
- package/dist/zonos-elements/{p-dfd83cff.entry.js → p-007ff76a.entry.js} +1 -1
- package/dist/zonos-elements/{p-1cf5e2ce.system.entry.js → p-065f3f66.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-543b25f9.entry.js → p-07c21940.entry.js} +1 -1
- package/dist/zonos-elements/{p-fb8dc23f.system.js → p-0d183f19.system.js} +1 -1
- package/dist/zonos-elements/{p-aa37f436.system.entry.js → p-1180a97c.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-5953208b.js → p-19bbf4b3.js} +1 -1
- package/dist/zonos-elements/{p-d06486ba.system.entry.js → p-1af510ea.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-646e6b47.system.entry.js → p-1cff471a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1d31b966.system.js → p-22f7120a.system.js} +1 -1
- package/dist/zonos-elements/{p-71fc8a22.js → p-2837bfd2.js} +1 -1
- package/dist/zonos-elements/p-29b60bf3.system.js +1 -1
- package/dist/zonos-elements/{p-f1aa60fd.system.entry.js → p-29ca1415.system.entry.js} +1 -1
- package/dist/zonos-elements/p-2aebcfa8.system.entry.js +1 -0
- package/dist/zonos-elements/p-33dd7dab.entry.js +1 -0
- package/dist/zonos-elements/{p-68631285.system.entry.js → p-342b062d.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-c8bc4ede.js → p-38881097.js} +1 -1
- package/dist/zonos-elements/{p-e6e3a303.entry.js → p-39399f67.entry.js} +1 -1
- package/dist/zonos-elements/{p-6f874ed9.entry.js → p-3d902845.entry.js} +1 -1
- package/dist/zonos-elements/{p-76e36d6d.entry.js → p-3dcb3794.entry.js} +1 -1
- package/dist/zonos-elements/p-4a5fa892.system.entry.js +1 -0
- package/dist/zonos-elements/{p-5d6b018c.system.entry.js → p-4a73906a.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-323279b8.entry.js → p-4b9c7803.entry.js} +1 -1
- package/dist/zonos-elements/{p-c12ca8fe.system.entry.js → p-4dba0e9b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ca9231a0.system.entry.js → p-58da55e6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-59824ac6.entry.js +1 -0
- package/dist/zonos-elements/{p-c8df5eee.system.entry.js → p-59e4e0b6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-cd3f7fd7.system.js → p-5fceef56.system.js} +1 -1
- package/dist/zonos-elements/{p-e57f862d.system.js → p-602de72d.system.js} +1 -1
- package/dist/zonos-elements/{p-a4eddf6c.system.js → p-6325ee77.system.js} +1 -1
- package/dist/zonos-elements/{p-c5bfe522.system.js → p-67251274.system.js} +1 -1
- package/dist/zonos-elements/{p-4417475f.entry.js → p-69871ab6.entry.js} +1 -1
- package/dist/zonos-elements/{p-1cf76dd3.entry.js → p-6be4c473.entry.js} +1 -1
- package/dist/zonos-elements/{p-0287f9cd.system.js → p-72280783.system.js} +1 -1
- package/dist/zonos-elements/{p-c121b2b8.entry.js → p-73d1a554.entry.js} +1 -1
- package/dist/zonos-elements/{p-c9e44c77.system.entry.js → p-76a75da9.system.entry.js} +1 -1
- package/dist/zonos-elements/p-76cdf517.js +1 -0
- package/dist/zonos-elements/p-8eaf1316.js +1 -0
- package/dist/zonos-elements/{p-56e9a29e.entry.js → p-944282af.entry.js} +1 -1
- package/dist/zonos-elements/{p-aa1f3060.system.entry.js → p-97f15546.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-10584546.entry.js → p-9ceb3d1c.entry.js} +1 -1
- package/dist/zonos-elements/{p-7c70e0c7.js → p-a2fe995b.js} +1 -1
- package/dist/zonos-elements/{p-b91a8f31.system.entry.js → p-aa7589de.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3642dd99.entry.js → p-b0482924.entry.js} +1 -1
- package/dist/zonos-elements/{p-28ee0860.system.js → p-b567448d.system.js} +1 -1
- package/dist/zonos-elements/{p-23eee868.entry.js → p-b7a03b08.entry.js} +1 -1
- package/dist/zonos-elements/{p-e101b0de.system.entry.js → p-c43130a7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-2394b186.system.js → p-c515bc23.system.js} +1 -1
- package/dist/zonos-elements/{p-30cfc9f4.entry.js → p-c8a48cce.entry.js} +1 -1
- package/dist/zonos-elements/{p-d2cb99ee.system.entry.js → p-cc35d5f8.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-ab61ef19.system.js → p-cd5638b2.system.js} +2 -2
- package/dist/zonos-elements/p-d68425ad.js +1 -0
- package/dist/zonos-elements/{p-0fb4e032.entry.js → p-d74eda59.entry.js} +1 -1
- package/dist/zonos-elements/{p-95042e71.entry.js → p-d93f4837.entry.js} +1 -1
- package/dist/zonos-elements/{p-d0767f88.entry.js → p-dcf8ab79.entry.js} +1 -1
- package/dist/zonos-elements/{p-f1298203.system.entry.js → p-e2057ab0.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-1977f4b5.js → p-e2b8936a.js} +1 -1
- package/dist/zonos-elements/{p-8fb15a6b.system.entry.js → p-e8159288.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-59518657.entry.js → p-e8bb4f3b.entry.js} +1 -1
- package/dist/zonos-elements/{p-fdd7ec44.system.entry.js → p-e99654c1.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-7ab15d20.js → p-f9f3155b.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-193fc2da.entry.js +0 -1
- package/dist/zonos-elements/p-3c62acbd.js +0 -1
- package/dist/zonos-elements/p-5987dea1.js +0 -1
- package/dist/zonos-elements/p-63b462dd.system.entry.js +0 -1
- package/dist/zonos-elements/p-8418aa07.entry.js +0 -1
- package/dist/zonos-elements/p-987b5d8f.js +0 -1
- package/dist/zonos-elements/p-ddd0e703.system.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { t as translate, s as storageStore, y as storageStoreOnChange, l as localizationStore } from './localization-
|
|
2
|
+
import { t as translate, s as storageStore, y as storageStoreOnChange, l as localizationStore } from './localization-754e7e8b.js';
|
|
3
3
|
import { z as zonosStore, f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
4
|
-
import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-
|
|
4
|
+
import { M as MIN_POSTAL_CODE_LENGTH } from './getMissingRequiredShippingFields-ebdccdcf.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
|
-
import { U as extractName, b as stripeStore, u as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-
|
|
6
|
+
import { U as extractName, b as stripeStore, u as stripeStorePrefetchLandedCost, t as trackConversionEvent } from './cart-93c36159.js';
|
|
7
7
|
import { R as RemoveIcon$1 } from './RemoveIcon-9dc5dd1a.js';
|
|
8
8
|
import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
9
9
|
import { g as getBorderRadius } from './getBorderRadius-dc982fe6.js';
|
|
@@ -496,6 +496,30 @@ const isValidZip = ({ countryFields, zip, }) => {
|
|
|
496
496
|
return countryFields.zipRequired && !!zip;
|
|
497
497
|
};
|
|
498
498
|
|
|
499
|
+
const hasCountries = (countries) => !!countries && Object.keys(countries).length > 0;
|
|
500
|
+
/**
|
|
501
|
+
* Builds the country options for an address form's country dropdown.
|
|
502
|
+
*
|
|
503
|
+
* Shipping addresses are restricted to the merchant's shipping zone, since we
|
|
504
|
+
* can only fulfill orders to those countries. Billing addresses are not — a
|
|
505
|
+
* shopper's card can be billed to any country, so restricting the billing
|
|
506
|
+
* country prevents them from checking out at all (05CHECK-915).
|
|
507
|
+
*
|
|
508
|
+
* When the full country list is unavailable we fall back to the shipping zone
|
|
509
|
+
* so the dropdown is never empty.
|
|
510
|
+
*/
|
|
511
|
+
const getAddressCountryOptions = ({ allCountries, shippingZoneCountries, type, }) => {
|
|
512
|
+
const countries = type === 'billing' && hasCountries(allCountries)
|
|
513
|
+
? allCountries
|
|
514
|
+
: shippingZoneCountries;
|
|
515
|
+
return Object.values(countries || {})
|
|
516
|
+
.map(country => ({
|
|
517
|
+
label: country.displayName,
|
|
518
|
+
value: country.code,
|
|
519
|
+
}))
|
|
520
|
+
.sort((a, b) => a.label.localeCompare(b.label));
|
|
521
|
+
};
|
|
522
|
+
|
|
499
523
|
const mergeAddress = ({ addresses, delimiter = ' ', }) => {
|
|
500
524
|
// Remove duplicate addresses
|
|
501
525
|
const addressSet = new Set(addresses.filter(Boolean));
|
|
@@ -560,14 +584,6 @@ const ZonosAddress = class {
|
|
|
560
584
|
* Whether to start google place suggestions
|
|
561
585
|
*/
|
|
562
586
|
this.startGooglePlaceSuggestions = false;
|
|
563
|
-
/**
|
|
564
|
-
* List of countries to show in the address element
|
|
565
|
-
*/
|
|
566
|
-
this.shipToCountries = null;
|
|
567
|
-
/**
|
|
568
|
-
* Shipping zones from localization
|
|
569
|
-
*/
|
|
570
|
-
this.shippingZones = null;
|
|
571
587
|
this.city = '';
|
|
572
588
|
this.country = '';
|
|
573
589
|
this.firstName = '';
|
|
@@ -607,6 +623,14 @@ const ZonosAddress = class {
|
|
|
607
623
|
* Google autocomplete overlay is conflict with our button, this is to adjust z index of the autocomplete
|
|
608
624
|
*/
|
|
609
625
|
this.isAutoCompleteAdjusted = false;
|
|
626
|
+
/**
|
|
627
|
+
* Memoized country options, keyed on the store references they derive from.
|
|
628
|
+
* `render()` runs on every keystroke, and rebuilding the list each time would
|
|
629
|
+
* re-sort ~244 countries and hand `zonos-stripe-select` a new array identity,
|
|
630
|
+
* re-rendering it needlessly. `@stencil/store` replaces these references
|
|
631
|
+
* wholesale rather than mutating them, so reference equality is a safe key.
|
|
632
|
+
*/
|
|
633
|
+
this.countryOptionsCache = null;
|
|
610
634
|
// Create a single throttled instance that persists
|
|
611
635
|
this.throttledGetAddressSuggestions = throttle_1(() => {
|
|
612
636
|
if (zonosStore.checkoutAddressService) {
|
|
@@ -758,6 +782,28 @@ const ZonosAddress = class {
|
|
|
758
782
|
this.onStoreCheckoutSessionIdChangedSubscription = storageStoreOnChange('checkoutSessionId', onCheckoutSessionIdChange);
|
|
759
783
|
};
|
|
760
784
|
}
|
|
785
|
+
getCountryOptions() {
|
|
786
|
+
const { allCountries, shippingZoneCountries } = localizationStore;
|
|
787
|
+
const cache = this.countryOptionsCache;
|
|
788
|
+
if (cache &&
|
|
789
|
+
cache.allCountries === allCountries &&
|
|
790
|
+
cache.shippingZoneCountries === shippingZoneCountries &&
|
|
791
|
+
cache.type === this.type) {
|
|
792
|
+
return cache.options;
|
|
793
|
+
}
|
|
794
|
+
const options = getAddressCountryOptions({
|
|
795
|
+
allCountries,
|
|
796
|
+
shippingZoneCountries,
|
|
797
|
+
type: this.type,
|
|
798
|
+
});
|
|
799
|
+
this.countryOptionsCache = {
|
|
800
|
+
allCountries,
|
|
801
|
+
options,
|
|
802
|
+
shippingZoneCountries,
|
|
803
|
+
type: this.type,
|
|
804
|
+
};
|
|
805
|
+
return options;
|
|
806
|
+
}
|
|
761
807
|
getStripeAddressInstance() {
|
|
762
808
|
if (this.type === 'billing') {
|
|
763
809
|
return {
|
|
@@ -1184,24 +1230,19 @@ const ZonosAddress = class {
|
|
|
1184
1230
|
this.initAddressSuggestions();
|
|
1185
1231
|
this.initDefaultCustomAddressForm();
|
|
1186
1232
|
}
|
|
1187
|
-
shippingZonesChanged() {
|
|
1188
|
-
this.shippingZones = localizationStore.shippingZoneCountries;
|
|
1189
|
-
this.shipToCountries = Object.values(this.shippingZones || {})
|
|
1190
|
-
.map(country => ({
|
|
1191
|
-
label: country.displayName,
|
|
1192
|
-
value: country.code,
|
|
1193
|
-
}))
|
|
1194
|
-
.sort((a, b) => {
|
|
1195
|
-
return a.label.localeCompare(b.label);
|
|
1196
|
-
});
|
|
1197
|
-
}
|
|
1198
1233
|
renderCustomAddressForm() {
|
|
1199
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r
|
|
1200
|
-
const
|
|
1234
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
1235
|
+
const _s = this.getCustomAddressErrors(), { showError } = _s, customAddressErrors = __rest(_s, ["showError"]);
|
|
1201
1236
|
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
1202
1237
|
const countryCode = stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country;
|
|
1203
|
-
|
|
1204
|
-
|
|
1238
|
+
/**
|
|
1239
|
+
* Billing addresses are not limited to the shipping zone: a shopper's card
|
|
1240
|
+
* can be billed to any country, so restricting it would block them from
|
|
1241
|
+
* checking out entirely (05CHECK-915).
|
|
1242
|
+
*/
|
|
1243
|
+
const countryOptions = this.getCountryOptions();
|
|
1244
|
+
const firstCountry = countryOptions[0];
|
|
1245
|
+
const stateOptions = Object.entries(((_a = this.countryField) === null || _a === void 0 ? void 0 : _a.regions) || {})
|
|
1205
1246
|
.map(([label, region]) => ({
|
|
1206
1247
|
label,
|
|
1207
1248
|
value: region.interpayCode,
|
|
@@ -1235,7 +1276,7 @@ const ZonosAddress = class {
|
|
|
1235
1276
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1236
1277
|
*/
|
|
1237
1278
|
this.lastName = event.detail;
|
|
1238
|
-
}, required: true }), h("zonos-stripe-select", { "aria-required": "true", autoComplete:
|
|
1279
|
+
}, required: true }), h("zonos-stripe-select", { "aria-required": "true", autoComplete: `${this.type} country`, class: "zonos--custom-address-form-input", name: `${this.type}-country`, onSelectChange: (event) => {
|
|
1239
1280
|
this.countryChanged(event.detail);
|
|
1240
1281
|
// revalidate the postal code since with empty value so it would reset the customAddressErrors
|
|
1241
1282
|
this.validate({
|
|
@@ -1264,9 +1305,9 @@ const ZonosAddress = class {
|
|
|
1264
1305
|
this.city = '';
|
|
1265
1306
|
this.state = '';
|
|
1266
1307
|
this.postalCode = '';
|
|
1267
|
-
}, options:
|
|
1308
|
+
}, options: countryOptions, required: true, selectLabel: translate('Country'), selectedValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country) ||
|
|
1268
1309
|
localizationStore.selectedCountryCode ||
|
|
1269
|
-
(firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), h("div", { class: "zonos--custom-address-form-line1-wrapper" }, h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete:
|
|
1310
|
+
(firstCountry === null || firstCountry === void 0 ? void 0 : firstCountry.value), title: `${this.type} country` }), h("div", { class: "zonos--custom-address-form-line1-wrapper" }, h("zonos-stripe-input", { "aria-autocomplete": "list", "aria-controls": "autocomplete-search", "aria-required": "true", autoComplete: `${this.type} address-line1`, class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.line1 : undefined, inputLabel: translate('Address line 1'), inputValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line1, name: "address-line1", onInputChange: (event) => {
|
|
1270
1311
|
this.validate({
|
|
1271
1312
|
type: this.type,
|
|
1272
1313
|
value: event.detail,
|
|
@@ -1297,9 +1338,9 @@ const ZonosAddress = class {
|
|
|
1297
1338
|
}, suggestions: this.addressSuggestions, type: this.type })), h("div", { "aria-label": "Additional address details", class: classes([
|
|
1298
1339
|
'zonos--custom-address-form-additional-fields',
|
|
1299
1340
|
countryCode && this.isAddressLine1Entered ? 'zonos--show' : '',
|
|
1300
|
-
]), role: "group" }, h("zonos-stripe-input", { "aria-required": "false", autoComplete:
|
|
1341
|
+
]), role: "group" }, h("zonos-stripe-input", { "aria-required": "false", autoComplete: `${this.type} address-line2`, class: "zonos--custom-address-form-input", inputLabel: translate(((_b = this.countryField) === null || _b === void 0 ? void 0 : _b.address2Label) || 'Address line 2'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.line2) || '', onInputChange: (event) => {
|
|
1301
1342
|
this.line2 = event.detail;
|
|
1302
|
-
} }), ((
|
|
1343
|
+
} }), ((_c = this.countryField) === null || _c === void 0 ? void 0 : _c.cityShow) && (h("zonos-stripe-input", { "aria-required": ((_d = this.countryField) === null || _d === void 0 ? void 0 : _d.cityRequired) ? 'true' : 'false', autoComplete: `${this.type} address-level2`, class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.city : undefined, inputLabel: translate(((_e = this.countryField) === null || _e === void 0 ? void 0 : _e.cityLabel) || 'City'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.city) || '', name: "locality", onInputChange: (event) => {
|
|
1303
1344
|
this.validate({
|
|
1304
1345
|
type: this.type,
|
|
1305
1346
|
value: event.detail,
|
|
@@ -1313,7 +1354,7 @@ const ZonosAddress = class {
|
|
|
1313
1354
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1314
1355
|
*/
|
|
1315
1356
|
this.city = event.detail;
|
|
1316
|
-
}, required: (
|
|
1357
|
+
}, required: (_f = this.countryField) === null || _f === void 0 ? void 0 : _f.cityRequired })), h("div", { class: "zonos--custom-address-form-state-zip-wrapper" }, ((_g = this.countryField) === null || _g === void 0 ? void 0 : _g.stateShow) && (h("zonos-stripe-select", { "aria-required": ((_h = this.countryField) === null || _h === void 0 ? void 0 : _h.stateRequired) ? 'true' : 'false', autoComplete: `${this.type} address-level1`, class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.state : undefined, isError: showError && !!customAddressErrors.state, name: `${this.type}-state`, onSelectChange: (event) => {
|
|
1317
1358
|
this.validate({
|
|
1318
1359
|
type: this.type,
|
|
1319
1360
|
value: event.detail,
|
|
@@ -1327,9 +1368,9 @@ const ZonosAddress = class {
|
|
|
1327
1368
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1328
1369
|
*/
|
|
1329
1370
|
this.state = event.detail;
|
|
1330
|
-
}, options: stateOptions, required: (
|
|
1371
|
+
}, options: stateOptions, required: (_j = this.countryField) === null || _j === void 0 ? void 0 : _j.stateRequired, selectLabel: translate(((_k = this.countryField) === null || _k === void 0 ? void 0 : _k.stateLabel) || 'State'), selectedValue: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.state, title: `${this.type} state` })), ((_l = this.countryField) === null || _l === void 0 ? void 0 : _l.zipShow) && (h("zonos-stripe-input", { "aria-describedby": ((_m = this.countryField) === null || _m === void 0 ? void 0 : _m.zipFormat)
|
|
1331
1372
|
? `zip-format-${this.type}`
|
|
1332
|
-
: undefined, "aria-required": ((
|
|
1373
|
+
: undefined, "aria-required": ((_o = this.countryField) === null || _o === void 0 ? void 0 : _o.zipRequired) ? 'true' : 'false', autoComplete: `${this.type} postal-code`, class: "zonos--custom-address-form-input", error: showError ? customAddressErrors.postalCode : undefined, inputLabel: translate(((_p = this.countryField) === null || _p === void 0 ? void 0 : _p.zipLabel) || 'Zip'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.postal_code) || '', name: "postalCode", onInputChange: (event) => {
|
|
1333
1374
|
this.validate({
|
|
1334
1375
|
type: this.type,
|
|
1335
1376
|
value: event.detail,
|
|
@@ -1343,7 +1384,7 @@ const ZonosAddress = class {
|
|
|
1343
1384
|
* Therefore, we must update the value after validation to ensure correct error state
|
|
1344
1385
|
*/
|
|
1345
1386
|
this.postalCode = event.detail;
|
|
1346
|
-
}, required: (
|
|
1387
|
+
}, required: (_q = this.countryField) === null || _q === void 0 ? void 0 : _q.zipRequired, title: `${this.type} zip code` }))), h("zonos-stripe-phone-input", { autoComplete: `${this.type} tel`, class: "zonos--custom-address-form-input", countryCode: stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.address.country, countryOptions: (_r = zonosStore.genericSettings) === null || _r === void 0 ? void 0 : _r.countryFields, error: showError ? customAddressErrors.phone : undefined, inputLabel: translate('Phone number'), inputValue: (stripeAddressEventData === null || stripeAddressEventData === void 0 ? void 0 : stripeAddressEventData.value.phone) || '', onInputValueChange: event => {
|
|
1347
1388
|
const { isEmpty, phoneNumber, valid, wrongFormat } = event.detail;
|
|
1348
1389
|
// Validate the phone number
|
|
1349
1390
|
this.validate({
|
|
@@ -1384,14 +1425,6 @@ const ZonosAddress = class {
|
|
|
1384
1425
|
}
|
|
1385
1426
|
componentDidLoad() {
|
|
1386
1427
|
const stripeAddressEventData = this.getStripeAddressInstance().stripeAddressEventData;
|
|
1387
|
-
this.shipToCountries = Object.values(localizationStore.shippingZoneCountries || {})
|
|
1388
|
-
.map(country => ({
|
|
1389
|
-
label: country.displayName,
|
|
1390
|
-
value: country.code,
|
|
1391
|
-
}))
|
|
1392
|
-
.sort((a, b) => {
|
|
1393
|
-
return a.label.localeCompare(b.label);
|
|
1394
|
-
});
|
|
1395
1428
|
this.isDirtyAddress =
|
|
1396
1429
|
!!stripeAddressEventData &&
|
|
1397
1430
|
stripeAddressEventData.value.address.line1.length > 0;
|
|
@@ -1404,7 +1437,6 @@ const ZonosAddress = class {
|
|
|
1404
1437
|
}
|
|
1405
1438
|
render() {
|
|
1406
1439
|
var _a;
|
|
1407
|
-
this.shippingZones = localizationStore.shippingZoneCountries;
|
|
1408
1440
|
this.addressService = zonosStore.checkoutAddressService;
|
|
1409
1441
|
if ((_a = stripeStore.stripeAddressEventData) === null || _a === void 0 ? void 0 : _a.complete) {
|
|
1410
1442
|
this.isAddressFilled = true;
|
|
@@ -1414,10 +1446,10 @@ const ZonosAddress = class {
|
|
|
1414
1446
|
this.country = localizationStore.selectedCountryCode;
|
|
1415
1447
|
}
|
|
1416
1448
|
// this component loads iframe from the stripe elements and puts here, so we don't need to do anything here
|
|
1417
|
-
return (h(Host, { key: '
|
|
1449
|
+
return (h(Host, { key: '5baf00df63a693613f493a84c906898080dcbfa2', class: classes([
|
|
1418
1450
|
'zonos--address zonos--elements',
|
|
1419
1451
|
`zonos--${this.type}-address`,
|
|
1420
|
-
]) }, h("zonos-text", { key: '
|
|
1452
|
+
]) }, h("zonos-text", { key: 'f5079e30a1eadceffaac7fef5aa5296b1f9f480b', class: "zonos--title", type: "semiBoldLabel" }, this.titleText), h("slot", { key: 'fcbd1bac9e06e91c9e4a229d63852df9fea08c58', name: "below-title" }), this.renderCompanyNameInput(), this.renderTaxIdInput(), this.renderShortAddressCodeInput(), this.renderCustomAddressForm()));
|
|
1421
1453
|
}
|
|
1422
1454
|
get el() { return getElement(this); }
|
|
1423
1455
|
static get watchers() { return {
|
|
@@ -1433,8 +1465,7 @@ const ZonosAddress = class {
|
|
|
1433
1465
|
"phone": ["formFieldsChanged"],
|
|
1434
1466
|
"postalCode": ["formFieldsChanged"],
|
|
1435
1467
|
"state": ["formFieldsChanged"],
|
|
1436
|
-
"addressService": ["shouldEnabledCustomAddressChanged"]
|
|
1437
|
-
"shippingZones": ["shippingZonesChanged"]
|
|
1468
|
+
"addressService": ["shouldEnabledCustomAddressChanged"]
|
|
1438
1469
|
}; }
|
|
1439
1470
|
};
|
|
1440
1471
|
ZonosAddress.style = ZonosCustomAddressStyle0;
|
|
@@ -7332,6 +7363,15 @@ const ZonosStripePhoneInput = class {
|
|
|
7332
7363
|
this.updatePhoneFormatter();
|
|
7333
7364
|
};
|
|
7334
7365
|
}
|
|
7366
|
+
onCountryCodeChange() {
|
|
7367
|
+
/**
|
|
7368
|
+
* Re-derive the dial code when the address country changes, otherwise a
|
|
7369
|
+
* shopper who changes country keeps the previous country's dial code — for
|
|
7370
|
+
* example a US billing address on a Mexico shipment would send a US phone
|
|
7371
|
+
* number prefixed with +52 (05CHECK-915).
|
|
7372
|
+
*/
|
|
7373
|
+
this.initPhoneNumberValue();
|
|
7374
|
+
}
|
|
7335
7375
|
onCountryOptionsChange() {
|
|
7336
7376
|
// Re-initialize the phone number value when the country options change
|
|
7337
7377
|
this.initPhoneNumberValue();
|
|
@@ -7411,27 +7451,28 @@ const ZonosStripePhoneInput = class {
|
|
|
7411
7451
|
.filter(Boolean)
|
|
7412
7452
|
.sort((a, b) => a.displayName.localeCompare(b.displayName))
|
|
7413
7453
|
: [];
|
|
7414
|
-
return (h(Host, { key: '
|
|
7454
|
+
return (h(Host, { key: '14478c1db0acc4651d9433f71fefa8bd18b28a61', class: classes([
|
|
7415
7455
|
'zonos--phone-input zonos--elements',
|
|
7416
7456
|
isDark && 'dark',
|
|
7417
|
-
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: '
|
|
7457
|
+
]), "data-theme": isDark ? 'DARK' : 'LIGHT', style: Object.assign({ '--zonos--border-radius': getBorderRadius(), '--zonos--font-family': zonosStoreFontFamily(), '--zonos--font-size': `${fontSize}px`, '--zonos--primary-color': secondaryColor }, (this.minWidth ? { '--zonos--min-width': this.minWidth } : {})) }, h("div", { key: 'cdc9f75fa9a8fd81ab565614729d33b3b54b1ba9', class: classes([
|
|
7418
7458
|
'zonos--label-wrapper',
|
|
7419
7459
|
this.disabled && 'disabled',
|
|
7420
7460
|
this.isFocused && 'focused',
|
|
7421
7461
|
hasContent && 'has-content',
|
|
7422
7462
|
this.error && 'has-error',
|
|
7423
7463
|
this.inputLabel && 'has-label',
|
|
7424
|
-
]) }, h("select", { key: '
|
|
7464
|
+
]) }, h("select", { key: 'a34d728be2b100874a2fb2a91e12b77988602b3a', class: "zonos--select", disabled: this.disabled, onBlur: this.handleBlur, onChange: this.handleCountryChange, onFocus: this.handleFocus }, countryOptionsList.map(option => {
|
|
7425
7465
|
var _a;
|
|
7426
7466
|
return (h("option", { key: option.countryCode, selected: option.countryCode === ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.countryCode), value: option.countryCode }, option.displayName, " (+", option.phoneCode, ")"));
|
|
7427
|
-
})), h("div", { key: '
|
|
7467
|
+
})), h("div", { key: 'c8d76a0a1e9ca245f03a853440a691e1bb478093', class: "zonos--input-group" }, h("div", { key: '51ccfb533bb4560061c63aaed368fb6488cf9d87', class: "zonos--select-wrapper" }, h("div", { key: 'cd50bc9c8f2fd407f47e5bfd3eba18a3f8fe721f', class: "zonos--country-select" }, h("div", { key: '05581057f31568b3d50b054e9c7fbbad5be7c27a', class: "zonos--country-select-content" }, this.selectedCountry && (h("div", { key: '04c5abdc6fdf7e71585896b426ec1ab00dc11f66', class: "zonos--country-select-selected" }, h("div", { key: '6750556068dbad185fadfba36268417974a43865', class: "zonos--country-flag-wrapper" }, h("zonos-country-flag", { key: 'a611a41490d68f2763ae43ad0fd5c0c498d16bfe', class: "zonos--country-flag", countryCode: this.selectedCountry.countryCode })), h("div", { key: 'eab8a6353cd865cffb1576f14fee6edd5dbd3383', class: "zonos--country-code" }, "+", this.selectedCountry.phoneCode))), h("div", { key: 'b3b4b8c407ed68305b467590921bc57925077acd', class: "zonos--select-chevron-wrapper" }, h("zonos-icon", { key: '7bc52fdcaf76bf6416d33442e844057b8d6e8121', "aria-label": "Expand collapsed section", class: "zonos--select-chevron", content: ChevronDownIcon$1, iconColor: "gray-800" }))))), h("div", { key: 'd0ad07b902ef0ff675a515c07ec6597c0d0b0aa2', class: classes([
|
|
7428
7468
|
'zonos--input-container',
|
|
7429
7469
|
this.inputLabel && 'has-label',
|
|
7430
7470
|
hasContent && 'has-content',
|
|
7431
|
-
]) }, h("input", Object.assign({ key: '
|
|
7471
|
+
]) }, h("input", Object.assign({ key: '5b12c7a228bf9736856c9ebf8ff7898cf0fc1889' }, this.inheritedAttributes, { autoComplete: this.autoComplete, class: "zonos--floated-input", disabled: this.disabled, id: this.inputId, onBlur: this.handleBlur, onFocus: this.handleFocus, onInput: this.handlePhoneChange, placeholder: ((_a = this.selectedCountry) === null || _a === void 0 ? void 0 : _a.phonePlaceholder) || '', ref: el => (this.inputRef = el), type: "tel" })), this.inputLabel && (h("div", { key: '04482f4bc210fb7ee6047972043f6b1942b25142', class: "zonos--floated-label" }, h("label", { key: '345c8e9d7ebc4aa8891c86a77a51f9bbd0088044', htmlFor: this.inputId }, this.inputLabel || translate('Phone number'))))))), this.error && (h("zonos-text", { key: 'cd8805f31cc6b2c9d6052f4c11190dba1f242945', textColor: "red-600" }, this.error))));
|
|
7432
7472
|
}
|
|
7433
7473
|
get el() { return getElement(this); }
|
|
7434
7474
|
static get watchers() { return {
|
|
7475
|
+
"countryCode": ["onCountryCodeChange"],
|
|
7435
7476
|
"countryOptions": ["onCountryOptionsChange"],
|
|
7436
7477
|
"selectedCountry": ["onSelectedCountryChange"],
|
|
7437
7478
|
"inputValue": ["onPhoneNumberChange"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, d as createEvent } from './index-cfd394c8.js';
|
|
2
|
-
import { t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { t as translate, l as localizationStore } from './localization-754e7e8b.js';
|
|
3
3
|
import { i as isTextContainsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
@@ -15,9 +15,16 @@ const ZonosAddressDisplay = class {
|
|
|
15
15
|
registerInstance(this, hostRef);
|
|
16
16
|
}
|
|
17
17
|
render() {
|
|
18
|
-
var _a;
|
|
18
|
+
var _a, _b;
|
|
19
19
|
const { city, country, email, line1, line2, name, phone, postal_code, state, } = this.currentAddress;
|
|
20
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Look the country up in the full country list first, since a billing
|
|
22
|
+
* address can be in a country the merchant does not ship to and would
|
|
23
|
+
* otherwise render without a country line (05CHECK-915). The shipping zone
|
|
24
|
+
* is a subset of all countries, so this is also correct for shipping.
|
|
25
|
+
*/
|
|
26
|
+
const displayCountry = ((_a = localizationStore.allCountries) === null || _a === void 0 ? void 0 : _a[country]) ||
|
|
27
|
+
((_b = localizationStore.shippingZoneCountries) === null || _b === void 0 ? void 0 : _b[country]);
|
|
21
28
|
const renderEnteredInfoText = ({ bold, content, }) => {
|
|
22
29
|
const textColor = isTextContainsNonLatinChars(content)
|
|
23
30
|
? 'red-600'
|
|
@@ -26,8 +33,8 @@ const ZonosAddressDisplay = class {
|
|
|
26
33
|
};
|
|
27
34
|
return (h(Host, { class: "zonos--address-form zonos--elements" }, h("div", { class: "zonos--title" }, h("zonos-text", { textColor: "gray-700", type: "smallHeader" }, this.addressType === 'shipping'
|
|
28
35
|
? translate('Shipping')
|
|
29
|
-
: translate('Billing'))), h("div", { class: "zonos--address-group" }, name && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })),
|
|
30
|
-
content:
|
|
36
|
+
: translate('Billing'))), h("div", { class: "zonos--address-group" }, name && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ bold: true, content: name }))), email && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: email }))), phone && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: phone }))), line1 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line1 }))), line2 && (h("div", { class: "zonos--address-line" }, renderEnteredInfoText({ content: line2 }))), h("div", { class: "zonos--address-line" }, city && renderEnteredInfoText({ content: city }), state && renderEnteredInfoText({ content: state }), postal_code && renderEnteredInfoText({ content: postal_code })), displayCountry && (h("div", { class: "zonos--address-line" }, h("zonos-country-flag", { class: "zonos--country-flag", countryCode: displayCountry.code }), ' ', renderEnteredInfoText({
|
|
37
|
+
content: displayCountry.displayName,
|
|
31
38
|
}))))));
|
|
32
39
|
}
|
|
33
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
2
|
import { t as throttle_1 } from './throttle-44bfb6b5.js';
|
|
3
|
-
import { U as extractName, b as stripeStore, t as trackConversionEvent, H as stripeStoreOnChange, u as stripeStorePrefetchLandedCost, d as cartStore } from './cart-
|
|
4
|
-
import { s as storageStore, z as getFallbackDefaultCountryCode, t as translate, y as storageStoreOnChange, l as localizationStore } from './localization-
|
|
3
|
+
import { U as extractName, b as stripeStore, t as trackConversionEvent, H as stripeStoreOnChange, u as stripeStorePrefetchLandedCost, d as cartStore } from './cart-93c36159.js';
|
|
4
|
+
import { s as storageStore, z as getFallbackDefaultCountryCode, t as translate, y as storageStoreOnChange, l as localizationStore } from './localization-754e7e8b.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
6
6
|
import { l as logError, i as isCheckoutMobile, s as sendErrorLog } from './handleFetch-a844cac1.js';
|
|
7
7
|
import { a as shouldRenderTaxIdInput, s as shouldRenderShortAddressCodeInput } from './shouldRenderTaxIdInput-ef7b5860.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-
|
|
3
|
-
import { d as cartStore } from './cart-
|
|
4
|
-
import { e as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { b as airwallexStore, c as collectStore, f as airwallexStoreInitSdk, l as createElement, m as airwallexStoreGetLocale, n as airwallexStoreOnChange } from './collect-42d4757a.js';
|
|
3
|
+
import { d as cartStore } from './cart-93c36159.js';
|
|
4
|
+
import { e as localizationStoreOnChange, t as translate, l as localizationStore } from './localization-754e7e8b.js';
|
|
5
5
|
import { z as zonosStore } from './zonosStore-b7d3f9b0.js';
|
|
6
6
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
@@ -2,10 +2,10 @@ import { r as registerInstance, h, a as Host, g as getElement, d as createEvent
|
|
|
2
2
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
4
|
import { g as getBorderRadius } from './getBorderRadius-dc982fe6.js';
|
|
5
|
-
import { b as stripeStore, t as trackConversionEvent } from './cart-
|
|
6
|
-
import { s as storageStore } from './localization-
|
|
5
|
+
import { b as stripeStore, t as trackConversionEvent } from './cart-93c36159.js';
|
|
6
|
+
import { s as storageStore } from './localization-754e7e8b.js';
|
|
7
7
|
import { l as logError } from './handleFetch-a844cac1.js';
|
|
8
|
-
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-
|
|
8
|
+
import { d as paypalStoreInitButtons, e as paypalStoreOnChange } from './paypal-b1410e02.js';
|
|
9
9
|
import { l as log } from './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-039ef212.js';
|
|
11
11
|
import './TaxId-63a14057.js';
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host, F as Fragment, d as createEvent, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore, M as cartStoreHasOneEligibleItem, N as isEuDapRemittance, b as stripeStore, O as stripeStoreApplyPromoCode, P as stripeStoreRemovePromoCode, F as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, Q as stripeStoreResetPromoCode, R as stripeStoreMessageBasedOnStatus, S as storeCreditStore, T as storeCreditStoreReset, z as storeCreditStoreCoversFullAmount, w as isPolicyConsentRequired, E as policyConsentStore, J as stripeStoreRecordPolicyConsent, v as cartStoreNextStep, U as extractName, V as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, W as getCountryField, X as stripeStoreAsyncAddressUpdate, L as cartStoreUpdateSelectedShippingOption, Y as cartStoreGetShippingTransitInfo, Z as cartStoreGetMethod, _ as sortServiceLevelOptionsByAmount } from './cart-
|
|
3
|
-
import { t as translate, l as localizationStore, s as storageStore, u as getExchangeRate, v as numberFormat, e as localizationStoreOnChange } from './localization-
|
|
4
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
2
|
+
import { d as cartStore, M as cartStoreHasOneEligibleItem, N as isEuDapRemittance, b as stripeStore, O as stripeStoreApplyPromoCode, P as stripeStoreRemovePromoCode, F as stripeStoreReset, c as stripeStoreRetrievePayment, t as trackConversionEvent, Q as stripeStoreResetPromoCode, R as stripeStoreMessageBasedOnStatus, S as storeCreditStore, T as storeCreditStoreReset, z as storeCreditStoreCoversFullAmount, w as isPolicyConsentRequired, E as policyConsentStore, J as stripeStoreRecordPolicyConsent, v as cartStoreNextStep, U as extractName, V as stripeStoreTranslateAddressToLatin, G as cartStoreOnChange, W as getCountryField, X as stripeStoreAsyncAddressUpdate, L as cartStoreUpdateSelectedShippingOption, Y as cartStoreGetShippingTransitInfo, Z as cartStoreGetMethod, _ as sortServiceLevelOptionsByAmount } from './cart-93c36159.js';
|
|
3
|
+
import { t as translate, l as localizationStore, s as storageStore, u as getExchangeRate, v as numberFormat, e as localizationStoreOnChange } from './localization-754e7e8b.js';
|
|
4
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-9a81e41c.js';
|
|
5
5
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-87d195f6.js';
|
|
6
6
|
import { c as classes } from './classes-0d95c529.js';
|
|
7
7
|
import { z as zonosStore, c as createStore, h as zonosStoreOnChange, g as getZonosStoreTheme, f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
8
|
-
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-
|
|
8
|
+
import { D as DUTY_KEY, T as TAXES_KEY, h as hasInclusivePrice } from './hasInclusivePrice-4c12548f.js';
|
|
9
9
|
import { i as isSameHostCheckoutLink } from './isSameHostCheckoutLink-c1b88ab7.js';
|
|
10
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-
|
|
10
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore } from './paypal-b1410e02.js';
|
|
11
11
|
import { h as handleFetch, s as sendErrorLog, j as jsonParse, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode, l as logError } from './handleFetch-a844cac1.js';
|
|
12
12
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
13
13
|
import { g as getBorderRadius } from './getBorderRadius-dc982fe6.js';
|
|
14
14
|
import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
15
15
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
16
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
16
|
+
import { p as placeTestOrder } from './placeTestOrder-4267cafd.js';
|
|
17
17
|
import { i as isDarkColor } from './isDarkColor-039ef212.js';
|
|
18
18
|
import { g as getContrastColor } from './getContrastColor-af895b60.js';
|
|
19
19
|
import { i as isColorVariable } from './isColorVariable-0a94004f.js';
|
|
20
20
|
import { u as updateCheckoutSessionAttributes } from './updateCheckoutSessionAttributes-e0a282d9.js';
|
|
21
|
-
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-
|
|
21
|
+
import { g as getMissingRequiredShippingFields } from './getMissingRequiredShippingFields-ebdccdcf.js';
|
|
22
22
|
import { c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
|
|
23
23
|
import { s as shouldRenderShortAddressCodeInput, a as shouldRenderTaxIdInput } from './shouldRenderTaxIdInput-ef7b5860.js';
|
|
24
24
|
import { e as euCountryCodes } from './TaxId-63a14057.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, F as Fragment, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as stripeStoreHandleInventoryCheck, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, q as stripeStoreCleanupDomesticShippingSession, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as isPolicyConsentRequired, x as stripeStoreUpdateCheckoutSessionBaseCurrency, y as storeCreditStoreApplyCredit, z as storeCreditStoreCoversFullAmount, A as validateCheckoutSession, B as storeCreditStoreCreateOrder, C as stripeStoreConfirmPayment, D as stripeStoreHandleInventoryRefund, E as policyConsentStore, F as stripeStoreReset, G as cartStoreOnChange, H as stripeStoreOnChange, I as storeCreditStoreGetEffectiveAmount } from './cart-
|
|
3
|
-
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
4
|
-
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, d as storageStoreSetEnabledVariantTestKeys, t as translate, e as localizationStoreOnChange, h as currencyFormat } from './localization-
|
|
2
|
+
import { s as stripeStoreGetDomesticShippingSession, a as stripeStoreSaveDomesticShippingSession, b as stripeStore, i as initStripeElements, c as stripeStoreRetrievePayment, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, p as policyConsentStoreReset, g as cartStoreResetTabItems, h as cartStoreClearCheckoutInterval, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, l as stripeStoreHandleInventoryCheck, m as cartStoreStartCheckoutInterval, t as trackConversionEvent, n as getCheckoutSessionBody, o as cartStoreUpdateToErrorState, q as stripeStoreCleanupDomesticShippingSession, r as cartStoreSetCheckoutSession, u as stripeStorePrefetchLandedCost, v as cartStoreNextStep, w as isPolicyConsentRequired, x as stripeStoreUpdateCheckoutSessionBaseCurrency, y as storeCreditStoreApplyCredit, z as storeCreditStoreCoversFullAmount, A as validateCheckoutSession, B as storeCreditStoreCreateOrder, C as stripeStoreConfirmPayment, D as stripeStoreHandleInventoryRefund, E as policyConsentStore, F as stripeStoreReset, G as cartStoreOnChange, H as stripeStoreOnChange, I as storeCreditStoreGetEffectiveAmount } from './cart-93c36159.js';
|
|
3
|
+
import { p as paypalStoreHasPaypalEnabled, s as submitAnalytics, a as paypalStore, b as paypalInitScript } from './paypal-b1410e02.js';
|
|
4
|
+
import { f as filterValidTests, a as fetchCheckoutId, b as fetchBigCommerceCheckout, i as isBigCommerceCustomerLoggedIn, l as localizationStore, c as localizationStoreUpdateSelectedCountryCode, g as getZCountryUrlParam, s as storageStore, V as VARIANT_TEST_KEY_EXPIRATION, d as storageStoreSetEnabledVariantTestKeys, t as translate, e as localizationStoreOnChange, h as currencyFormat } from './localization-754e7e8b.js';
|
|
5
5
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-b7d3f9b0.js';
|
|
6
6
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
7
7
|
import { h as handleFetch, g as getIsTestMode, j as jsonParse, l as logError, b as getAdditionalLogMetadata, s as sendErrorLog, a as getIsStagingMode, i as isCheckoutMobile } from './handleFetch-a844cac1.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as registerInstance, e as getAssetPath, h, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { d as cartStore } from './cart-
|
|
2
|
+
import { d as cartStore } from './cart-93c36159.js';
|
|
3
3
|
import { c as cleanHtmlMarkdown } from './cleanHtmlMarkdown-87d195f6.js';
|
|
4
4
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { s as styles } from './styles-6fc2fad9.js';
|
|
7
|
-
import './localization-
|
|
7
|
+
import './localization-754e7e8b.js';
|
|
8
8
|
import './handleFetch-a844cac1.js';
|
|
9
9
|
import './VarianceTest-572cecf5.js';
|
|
10
10
|
import './isDarkColor-039ef212.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, F as Fragment, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, k as airwallexStoreReset, c as collectStore, e as airwallexStoreIsPaidStatus } from './collect-
|
|
3
|
-
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, Q as stripeStoreResetPromoCode, F as stripeStoreReset, R as stripeStoreMessageBasedOnStatus, d as cartStore, v as cartStoreNextStep, G as cartStoreOnChange } from './cart-
|
|
4
|
-
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-
|
|
5
|
-
import { t as translate, s as storageStore, l as localizationStore, x as translationStoreOnChange } from './localization-
|
|
2
|
+
import { b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, j as airwallexStoreMessageBasedOnStatus, k as airwallexStoreReset, c as collectStore, e as airwallexStoreIsPaidStatus } from './collect-42d4757a.js';
|
|
3
|
+
import { b as stripeStore, c as stripeStoreRetrievePayment, t as trackConversionEvent, Q as stripeStoreResetPromoCode, F as stripeStoreReset, R as stripeStoreMessageBasedOnStatus, d as cartStore, v as cartStoreNextStep, G as cartStoreOnChange } from './cart-93c36159.js';
|
|
4
|
+
import { s as submitAnalytics, c as paypalStoreReset, a as paypalStore, b as paypalInitScript } from './paypal-b1410e02.js';
|
|
5
|
+
import { t as translate, s as storageStore, l as localizationStore, x as translationStoreOnChange } from './localization-754e7e8b.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-b7d3f9b0.js';
|
|
7
7
|
import { h as handleFetch, s as sendErrorLog, g as getIsTestMode, i as isCheckoutMobile, a as getIsStagingMode } from './handleFetch-a844cac1.js';
|
|
8
8
|
import { c as createCustomEvent } from './createCustomEvent-58159025.js';
|
|
@@ -11,8 +11,8 @@ import { l as log, b as allLogs } from './VarianceTest-572cecf5.js';
|
|
|
11
11
|
import { i as isCollectMobile, a as isCollectTablet } from './isCollectMobileTablet-111b0dd7.js';
|
|
12
12
|
import { c as classes } from './classes-0d95c529.js';
|
|
13
13
|
import { l as languages } from './ILanguage-cd6acb72.js';
|
|
14
|
-
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-
|
|
15
|
-
import { p as placeTestOrder } from './placeTestOrder-
|
|
14
|
+
import { r as renderCheckoutCurrency } from './renderCheckoutCurrency-9a81e41c.js';
|
|
15
|
+
import { p as placeTestOrder } from './placeTestOrder-4267cafd.js';
|
|
16
16
|
import { r as renderFallback } from './renderFallback-b250f4e9.js';
|
|
17
17
|
import './isDarkColor-039ef212.js';
|
|
18
18
|
import './TaxId-63a14057.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, F as Fragment } from './index-cfd394c8.js';
|
|
2
|
-
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-
|
|
3
|
-
import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, o as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, x as stripeStoreUpdateCheckoutSessionBaseCurrency, C as stripeStoreConfirmPayment, H as stripeStoreOnChange, F as stripeStoreReset, f as cartStoreReset } from './cart-
|
|
4
|
-
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-
|
|
5
|
-
import { s as storageStore, t as translate, e as localizationStoreOnChange, h as currencyFormat, l as localizationStore } from './localization-
|
|
2
|
+
import { c as collectStore, a as airwallexStoreSetFromSession, b as airwallexStore, d as airwallexStoreRetrievePaymentIntent, e as airwallexStoreIsPaidStatus, f as airwallexStoreInitSdk, g as collectStoreUpdateSelectedShippingOption, h as collectStoreInitShippingInfo, i as collectStoreAsyncAddressUpdate } from './collect-42d4757a.js';
|
|
3
|
+
import { b as stripeStore, i as initStripeElements, d as cartStore, c as stripeStoreRetrievePayment, o as cartStoreUpdateToErrorState, e as cartStoreUpdateItems, j as stripeStoreInitCheckoutSession, k as stripeStoreGetPaymentIntent, x as stripeStoreUpdateCheckoutSessionBaseCurrency, C as stripeStoreConfirmPayment, H as stripeStoreOnChange, F as stripeStoreReset, f as cartStoreReset } from './cart-93c36159.js';
|
|
4
|
+
import { p as paypalStoreHasPaypalEnabled, a as paypalStore } from './paypal-b1410e02.js';
|
|
5
|
+
import { s as storageStore, t as translate, e as localizationStoreOnChange, h as currencyFormat, l as localizationStore } from './localization-754e7e8b.js';
|
|
6
6
|
import { z as zonosStore } from './zonosStore-b7d3f9b0.js';
|
|
7
7
|
import { b as buildCartItemsByTempCart } from './buildCartItemsByTempCart-a117f75d.js';
|
|
8
8
|
import { h as handleFetch, s as sendErrorLog, l as logError, g as getIsTestMode } from './handleFetch-a844cac1.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, d as createEvent, h, a as Host } from './index-cfd394c8.js';
|
|
2
|
-
import { b as stripeStore } from './cart-
|
|
3
|
-
import { j as getOverridenZCountry, k as isValidSelector, m as initLocalizationStore, s as storageStore, c as localizationStoreUpdateSelectedCountryCode } from './localization-
|
|
2
|
+
import { b as stripeStore } from './cart-93c36159.js';
|
|
3
|
+
import { j as getOverridenZCountry, k as isValidSelector, m as initLocalizationStore, s as storageStore, c as localizationStoreUpdateSelectedCountryCode } from './localization-754e7e8b.js';
|
|
4
4
|
import { z as zonosStore, e as zonosStoreInitSetting, f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
5
5
|
import { g as getGenericSettingsOverride, i as iframeServices, a as injectPrivateIframe } from './getGenericSettingsOverride-0bc3e118.js';
|
|
6
6
|
import { h as handleFetch, l as logError } from './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { l as localizationStore } from './localization-
|
|
2
|
+
import { l as localizationStore } from './localization-754e7e8b.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
4
4
|
import { c as classes } from './classes-0d95c529.js';
|
|
5
5
|
import './handleFetch-a844cac1.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, a as Host, g as getElement } from './index-cfd394c8.js';
|
|
2
|
-
import { c as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-
|
|
2
|
+
import { c as localizationStoreUpdateSelectedCountryCode, t as translate, l as localizationStore } from './localization-754e7e8b.js';
|
|
3
3
|
import { f as zonosStoreFontFamily } from './zonosStore-b7d3f9b0.js';
|
|
4
4
|
import { f as formatStringWithLinks } from './formatStringWithLinks-0d48f183.js';
|
|
5
5
|
import { i as isDarkColor } from './isDarkColor-039ef212.js';
|