@zonos/elements 1.3.14 → 1.3.15-alpha.0
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-5d196917.js → cart-b1c89065.js} +32 -8
- package/dist/cjs/{sendErrorLog-3e181984.js → sendErrorLog-f7172707.js} +1 -1
- package/dist/cjs/{submitGtag-44e3a996.js → submitGtag-219f4e54.js} +1 -1
- package/dist/cjs/zonos-address_4.cjs.entry.js +2 -2
- package/dist/cjs/zonos-card_2.cjs.entry.js +1 -1
- package/dist/cjs/zonos-cart-items_10.cjs.entry.js +4 -4
- package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
- package/dist/cjs/zonos-controller.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
- package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
- package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
- package/dist/cjs/zonos-payment.cjs.entry.js +1 -1
- package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
- package/dist/collection/components/common/zonos-checkout-progress-tabs/zonos-checkout-progress-tabs.css +3 -0
- package/dist/collection/components/store/checkout/cart.js +5 -10
- package/dist/collection/components/store/checkout/stripe.js +15 -8
- package/dist/components/stripe.js +32 -9
- package/dist/components/zonos-checkout-finish2.js +1 -1
- package/dist/components/zonos-checkout-progress-tabs2.js +1 -1
- package/dist/components/zonos-checkout.js +3 -1
- package/dist/components/zonos-controller.js +1 -1
- package/dist/components/zonos-hello-dialog2.js +1 -1
- package/dist/components/zonos-hello.js +1 -1
- package/dist/components/zonos-language-select2.js +1 -1
- package/dist/components/zonos-link-authentication2.js +1 -1
- package/dist/components/zonos-shipping2.js +1 -1
- package/dist/esm/{cart-515aac56.js → cart-1b0aaea9.js} +32 -9
- package/dist/esm/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
- package/dist/esm/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
- package/dist/esm/zonos-address_4.entry.js +2 -2
- package/dist/esm/zonos-card_2.entry.js +1 -1
- package/dist/esm/zonos-cart-items_10.entry.js +4 -4
- package/dist/esm/zonos-checkout.entry.js +5 -3
- package/dist/esm/zonos-controller.entry.js +1 -1
- package/dist/esm/zonos-country-flag.entry.js +1 -1
- package/dist/esm/zonos-country-select_3.entry.js +1 -1
- package/dist/esm/zonos-hello-dialog.entry.js +1 -1
- package/dist/esm/zonos-hello.entry.js +1 -1
- package/dist/esm/zonos-payment.entry.js +1 -1
- package/dist/esm-es5/{cart-515aac56.js → cart-1b0aaea9.js} +1 -1
- package/dist/esm-es5/{sendErrorLog-e4546d7b.js → sendErrorLog-4e7a8e6e.js} +1 -1
- package/dist/esm-es5/{submitGtag-6767c31f.js → submitGtag-ce1c25e6.js} +1 -1
- package/dist/esm-es5/zonos-address_4.entry.js +1 -1
- package/dist/esm-es5/zonos-card_2.entry.js +1 -1
- package/dist/esm-es5/zonos-cart-items_10.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_3.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-payment.entry.js +1 -1
- package/dist/scripts/loadZonos.js +1 -1
- package/dist/scripts/zonos.js +1 -1
- package/dist/scripts/zonosBase.js +1 -1
- package/dist/types/components/store/checkout/cart.d.ts +2 -2
- package/dist/zonos-elements/{p-a583e3c6.system.entry.js → p-30d04ce6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-4fbd0ce6.entry.js → p-3921d516.entry.js} +1 -1
- package/dist/zonos-elements/{p-05f749dc.system.entry.js → p-393a8412.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f48a613e.system.entry.js → p-4fbc3ea7.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-3e38990b.entry.js → p-5247c5ab.entry.js} +1 -1
- package/dist/zonos-elements/{p-816f1aee.js → p-659e81b2.js} +1 -1
- package/dist/zonos-elements/{p-bdd775f2.system.js → p-6847b4e8.system.js} +1 -1
- package/dist/zonos-elements/{p-ab06e5c8.system.entry.js → p-6a429588.system.entry.js} +1 -1
- package/dist/zonos-elements/p-6fd110c3.entry.js +1 -0
- package/dist/zonos-elements/p-78983c23.entry.js +1 -0
- package/dist/zonos-elements/{p-aa671fa6.entry.js → p-81df5a1b.entry.js} +1 -1
- package/dist/zonos-elements/{p-3b4225b2.entry.js → p-85c2b823.entry.js} +1 -1
- package/dist/zonos-elements/{p-2d404058.system.js → p-86867593.system.js} +1 -1
- package/dist/zonos-elements/{p-93698719.system.entry.js → p-8cfec6b6.system.entry.js} +1 -1
- package/dist/zonos-elements/p-94226f90.system.entry.js +1 -0
- package/dist/zonos-elements/{p-aa5e2f7c.system.entry.js → p-9ee65a0b.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-522294b9.system.entry.js → p-ac1bccb6.system.entry.js} +1 -1
- package/dist/zonos-elements/{p-f6bbff95.entry.js → p-ae707165.entry.js} +1 -1
- package/dist/zonos-elements/{p-7aef7d5d.system.entry.js → p-b5b09a07.system.entry.js} +1 -1
- package/dist/zonos-elements/p-b8e8330b.system.js +1 -1
- package/dist/zonos-elements/{p-d9aa8599.entry.js → p-c93c8ecc.entry.js} +1 -1
- package/dist/zonos-elements/{p-9da65d62.entry.js → p-d8c5b848.entry.js} +1 -1
- package/dist/zonos-elements/{p-3f713699.entry.js → p-def5023c.entry.js} +1 -1
- package/dist/zonos-elements/{p-8ec3995a.system.entry.js → p-e412387c.system.entry.js} +1 -1
- package/dist/zonos-elements/p-ef8affe4.js +1 -0
- package/dist/zonos-elements/{p-882ec68e.system.js → p-f28970e2.system.js} +1 -1
- package/dist/zonos-elements/{p-f0b4e58a.js → p-fe83fc20.js} +1 -1
- package/dist/zonos-elements/zonos-elements.esm.js +1 -1
- package/package.json +1 -1
- package/dist/zonos-elements/p-17ded5a1.system.entry.js +0 -1
- package/dist/zonos-elements/p-418c056d.entry.js +0 -1
- package/dist/zonos-elements/p-ca6cf075.js +0 -1
- package/dist/zonos-elements/p-e9a41fd8.entry.js +0 -1
|
@@ -5355,15 +5355,22 @@ const stripeStoreReset = () => {
|
|
|
5355
5355
|
* Purpose is to resend the request if the info used when fetching landed cost is different from the current info
|
|
5356
5356
|
*/
|
|
5357
5357
|
const isPrefetchInfoOutdated = () => {
|
|
5358
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5358
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5359
|
+
// Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
|
|
5360
|
+
const isTotalAmountChanged = cartStore.landedCostData &&
|
|
5361
|
+
((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
|
|
5362
|
+
cartStore.subtotal;
|
|
5363
|
+
const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
|
|
5364
|
+
JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
|
|
5365
|
+
const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
|
|
5366
|
+
JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
|
|
5363
5367
|
const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
|
|
5364
|
-
JSON.stringify((
|
|
5365
|
-
JSON.stringify((
|
|
5366
|
-
return isLinkDataDirty ||
|
|
5368
|
+
JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
|
|
5369
|
+
JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
|
|
5370
|
+
return (isLinkDataDirty ||
|
|
5371
|
+
isAddressDataDirty ||
|
|
5372
|
+
isBillingAddressDataDirty ||
|
|
5373
|
+
isTotalAmountChanged);
|
|
5367
5374
|
};
|
|
5368
5375
|
const stripeStorePrefetchLandedCost = async () => {
|
|
5369
5376
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -5804,6 +5811,17 @@ const cartStoreUpdateItems = async (items) => {
|
|
|
5804
5811
|
});
|
|
5805
5812
|
stripeStore.isFetchingSession = false;
|
|
5806
5813
|
};
|
|
5814
|
+
const cartStoreResetSelectedShippingOption = () => {
|
|
5815
|
+
cartStore.selectedShippingOption = null;
|
|
5816
|
+
cartStore.isSelectedShippingAboveDeminimis = false;
|
|
5817
|
+
cartStore.isSelectedShippingGuarantee = false;
|
|
5818
|
+
cartStore.selectedShippingOptionExpectedDate = '';
|
|
5819
|
+
cartStore.selectedShippingOptionTransitTime = '';
|
|
5820
|
+
cartStore.dutiesTaxFees = 0;
|
|
5821
|
+
cartStore.shipping = 0;
|
|
5822
|
+
// reset total to subtotal
|
|
5823
|
+
cartStore.total = cartStore.subtotal;
|
|
5824
|
+
};
|
|
5807
5825
|
const cartStoreNextStep = () => {
|
|
5808
5826
|
if (cartStore.step === 'customer-info') {
|
|
5809
5827
|
cartStore.step = 'shipping';
|
|
@@ -5819,11 +5837,17 @@ const cartStoreNextStep = () => {
|
|
|
5819
5837
|
cartStore.step = 'finish';
|
|
5820
5838
|
}
|
|
5821
5839
|
};
|
|
5840
|
+
const cartStoreResetTabItems = () => {
|
|
5841
|
+
cartStore.step = 'customer-info';
|
|
5842
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
5843
|
+
cartStoreResetSelectedShippingOption();
|
|
5844
|
+
};
|
|
5822
5845
|
|
|
5823
5846
|
exports.cartStore = cartStore;
|
|
5824
5847
|
exports.cartStoreGetShippingTransitInfo = cartStoreGetShippingTransitInfo;
|
|
5825
5848
|
exports.cartStoreNextStep = cartStoreNextStep;
|
|
5826
5849
|
exports.cartStoreReset = cartStoreReset;
|
|
5850
|
+
exports.cartStoreResetTabItems = cartStoreResetTabItems;
|
|
5827
5851
|
exports.cartStoreUpdateItems = cartStoreUpdateItems;
|
|
5828
5852
|
exports.cartStoreUpdateSelectedShippingOption = cartStoreUpdateSelectedShippingOption;
|
|
5829
5853
|
exports.cartStoreUpdateToErrorState = cartStoreUpdateToErrorState;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
8
|
+
const sendErrorLog = require('./sendErrorLog-f7172707.js');
|
|
9
9
|
const classes = require('./classes-b7918f56.js');
|
|
10
10
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
11
11
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
7
7
|
const classes = require('./classes-b7918f56.js');
|
|
8
|
-
const cart = require('./cart-
|
|
8
|
+
const cart = require('./cart-b1c89065.js');
|
|
9
9
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
10
10
|
require('./isDarkColor-f5473002.js');
|
|
11
11
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
8
|
+
const submitGtag = require('./submitGtag-219f4e54.js');
|
|
9
9
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
10
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
10
|
+
const sendErrorLog = require('./sendErrorLog-f7172707.js');
|
|
11
11
|
const classes = require('./classes-b7918f56.js');
|
|
12
12
|
const ILanguage = require('./ILanguage-d247b45b.js');
|
|
13
13
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -368,7 +368,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
368
368
|
</svg>
|
|
369
369
|
`;
|
|
370
370
|
|
|
371
|
-
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
371
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
372
372
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
373
373
|
|
|
374
374
|
const ZonosCheckoutProgressTabs = class {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
|
-
const submitGtag = require('./submitGtag-
|
|
9
|
-
const sendErrorLog = require('./sendErrorLog-
|
|
8
|
+
const submitGtag = require('./submitGtag-219f4e54.js');
|
|
9
|
+
const sendErrorLog = require('./sendErrorLog-f7172707.js');
|
|
10
10
|
const classes = require('./classes-b7918f56.js');
|
|
11
11
|
const getBorderRadius = require('./getBorderRadius-c8cc2bb3.js');
|
|
12
12
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -354,6 +354,8 @@ const ZonosCheckout = class {
|
|
|
354
354
|
}
|
|
355
355
|
// reset step to customer info
|
|
356
356
|
cart.cartStore.step = 'customer-info';
|
|
357
|
+
// reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
|
|
358
|
+
cart.cartStoreResetTabItems();
|
|
357
359
|
}
|
|
358
360
|
async buildCartAndInit() {
|
|
359
361
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
require('./isDarkColor-f5473002.js');
|
|
9
9
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
require('./isDarkColor-f5473002.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
9
9
|
const isDarkColor = require('./isDarkColor-f5473002.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
6
|
const zonosStore = require('./zonosStore-aee974e0.js');
|
|
7
|
-
const cart = require('./cart-
|
|
7
|
+
const cart = require('./cart-b1c89065.js');
|
|
8
8
|
const classes = require('./classes-b7918f56.js');
|
|
9
9
|
const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
|
|
10
10
|
require('./isDarkColor-f5473002.js');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-3b4816ef.js');
|
|
6
|
-
const cart = require('./cart-
|
|
6
|
+
const cart = require('./cart-b1c89065.js');
|
|
7
7
|
require('./zonosStore-aee974e0.js');
|
|
8
8
|
require('./isDarkColor-f5473002.js');
|
|
9
9
|
require('./getBorderRadius-c8cc2bb3.js');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Fragment, h, Host, } from "@stencil/core";
|
|
2
|
-
import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
2
|
+
import { cartStore, cartStoreNextStep, cartStoreReset, cartStoreResetTabItems, cartStoreUpdateItems, cartStoreUpdateToErrorState, } from "../../store/checkout/cart";
|
|
3
3
|
import { initStripeElements, stripeStore, stripeStoreCleanupDomesticShippingSession, stripeStoreConfirmPayment, stripeStoreInitCheckoutSession, stripeStorePrefetchLandedCost, stripeStoreReset, } from "../../store/checkout/stripe";
|
|
4
4
|
import { localizationStore } from "../../store/hello/localization";
|
|
5
5
|
import { translate } from "../../store/translationStore";
|
|
@@ -84,6 +84,8 @@ export class ZonosCheckout {
|
|
|
84
84
|
}
|
|
85
85
|
// reset step to customer info
|
|
86
86
|
cartStore.step = 'customer-info';
|
|
87
|
+
// reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
|
|
88
|
+
cartStoreResetTabItems();
|
|
87
89
|
}
|
|
88
90
|
async buildCartAndInit() {
|
|
89
91
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
@@ -221,14 +221,9 @@ const cartStoreNextStep = () => {
|
|
|
221
221
|
cartStore.step = 'finish';
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
else if (cartStore.step === 'shipping') {
|
|
229
|
-
cartStore.step = 'customer-info';
|
|
230
|
-
// reset selected shipping option
|
|
231
|
-
cartStoreResetSelectedShippingOption();
|
|
232
|
-
}
|
|
224
|
+
const cartStoreResetTabItems = () => {
|
|
225
|
+
cartStore.step = 'customer-info';
|
|
226
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
227
|
+
cartStoreResetSelectedShippingOption();
|
|
233
228
|
};
|
|
234
|
-
export { cartStore, cartStoreApplySubtotals, cartStoreGetShippingTransitInfo, cartStoreNextStep,
|
|
229
|
+
export { cartStore, cartStoreApplySubtotals, cartStoreGetShippingTransitInfo, cartStoreNextStep, cartStoreReCalculateTotal, cartStoreReset, cartStoreResetTabItems, cartStoreUpdateItems, cartStoreUpdateSelectedShippingOption, cartStoreUpdateToErrorState, };
|
|
@@ -123,15 +123,22 @@ const stripeStoreReset = () => {
|
|
|
123
123
|
* Purpose is to resend the request if the info used when fetching landed cost is different from the current info
|
|
124
124
|
*/
|
|
125
125
|
const isPrefetchInfoOutdated = () => {
|
|
126
|
-
var _a, _b, _c, _d, _e, _f;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
127
|
+
// Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
|
|
128
|
+
const isTotalAmountChanged = cartStore.landedCostData &&
|
|
129
|
+
((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
|
|
130
|
+
cartStore.subtotal;
|
|
131
|
+
const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
|
|
132
|
+
JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
|
|
133
|
+
const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
|
|
134
|
+
JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
|
|
131
135
|
const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
|
|
132
|
-
JSON.stringify((
|
|
133
|
-
JSON.stringify((
|
|
134
|
-
return isLinkDataDirty ||
|
|
136
|
+
JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
|
|
137
|
+
JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
|
|
138
|
+
return (isLinkDataDirty ||
|
|
139
|
+
isAddressDataDirty ||
|
|
140
|
+
isBillingAddressDataDirty ||
|
|
141
|
+
isTotalAmountChanged);
|
|
135
142
|
};
|
|
136
143
|
const stripeStorePrefetchLandedCost = async () => {
|
|
137
144
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -5278,6 +5278,17 @@ const cartStoreUpdateItems = async (items) => {
|
|
|
5278
5278
|
});
|
|
5279
5279
|
stripeStore.isFetchingSession = false;
|
|
5280
5280
|
};
|
|
5281
|
+
const cartStoreResetSelectedShippingOption = () => {
|
|
5282
|
+
cartStore.selectedShippingOption = null;
|
|
5283
|
+
cartStore.isSelectedShippingAboveDeminimis = false;
|
|
5284
|
+
cartStore.isSelectedShippingGuarantee = false;
|
|
5285
|
+
cartStore.selectedShippingOptionExpectedDate = '';
|
|
5286
|
+
cartStore.selectedShippingOptionTransitTime = '';
|
|
5287
|
+
cartStore.dutiesTaxFees = 0;
|
|
5288
|
+
cartStore.shipping = 0;
|
|
5289
|
+
// reset total to subtotal
|
|
5290
|
+
cartStore.total = cartStore.subtotal;
|
|
5291
|
+
};
|
|
5281
5292
|
const cartStoreNextStep = () => {
|
|
5282
5293
|
if (cartStore.step === 'customer-info') {
|
|
5283
5294
|
cartStore.step = 'shipping';
|
|
@@ -5293,6 +5304,11 @@ const cartStoreNextStep = () => {
|
|
|
5293
5304
|
cartStore.step = 'finish';
|
|
5294
5305
|
}
|
|
5295
5306
|
};
|
|
5307
|
+
const cartStoreResetTabItems = () => {
|
|
5308
|
+
cartStore.step = 'customer-info';
|
|
5309
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
5310
|
+
cartStoreResetSelectedShippingOption();
|
|
5311
|
+
};
|
|
5296
5312
|
|
|
5297
5313
|
const prepCalculateLandedCost = () => {
|
|
5298
5314
|
// maybe we don't need email now for prefetch the landed cost
|
|
@@ -5570,15 +5586,22 @@ const stripeStoreReset = () => {
|
|
|
5570
5586
|
* Purpose is to resend the request if the info used when fetching landed cost is different from the current info
|
|
5571
5587
|
*/
|
|
5572
5588
|
const isPrefetchInfoOutdated = () => {
|
|
5573
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5589
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5590
|
+
// Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
|
|
5591
|
+
const isTotalAmountChanged = cartStore.landedCostData &&
|
|
5592
|
+
((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
|
|
5593
|
+
cartStore.subtotal;
|
|
5594
|
+
const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
|
|
5595
|
+
JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
|
|
5596
|
+
const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
|
|
5597
|
+
JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
|
|
5578
5598
|
const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
|
|
5579
|
-
JSON.stringify((
|
|
5580
|
-
JSON.stringify((
|
|
5581
|
-
return isLinkDataDirty ||
|
|
5599
|
+
JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
|
|
5600
|
+
JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
|
|
5601
|
+
return (isLinkDataDirty ||
|
|
5602
|
+
isAddressDataDirty ||
|
|
5603
|
+
isBillingAddressDataDirty ||
|
|
5604
|
+
isTotalAmountChanged);
|
|
5582
5605
|
};
|
|
5583
5606
|
const stripeStorePrefetchLandedCost = async () => {
|
|
5584
5607
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -5818,4 +5841,4 @@ onChange('clientSecret', clientSecret => {
|
|
|
5818
5841
|
}
|
|
5819
5842
|
});
|
|
5820
5843
|
|
|
5821
|
-
export {
|
|
5844
|
+
export { initLocalizationStore as A, getZCountryUrlParam as B, setZCountryUrlParam as C, currencyDisplay as D, currencyConvertAndFormat as E, currencyConvert as F, currencyFormat as G, localizationStore as a, log as b, cartStore as c, stripeStoreGetDomesticShippingSession as d, localizationStoreUpdateSelectedCountryCode as e, stripeStoreCleanupDomesticShippingSession as f, stripeStoreSaveDomesticShippingSession as g, handleFetch as h, initStripeElements as i, cartStoreUpdateItems as j, cartStoreReset as k, logError as l, cartStoreResetTabItems as m, stripeStoreInitCheckoutSession as n, cartStoreUpdateToErrorState as o, stripeStorePrefetchLandedCost as p, cartStoreNextStep as q, stripeStoreConfirmPayment as r, stripeStore as s, translate as t, stripeStoreReset as u, stripeStoreRetrievePayment as v, localizationStoreUpdateSelectedLocale as w, cartStoreUpdateSelectedShippingOption as x, cartStoreGetShippingTransitInfo as y, isValidSelector as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleFetch,
|
|
2
|
+
import { h as handleFetch, u as stripeStoreReset, c as cartStore, s as stripeStore, v as stripeStoreRetrievePayment, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
5
5
|
import { g as getBorderRadius } from './getBorderRadius.js';
|
|
@@ -27,7 +27,7 @@ const TabCheckmark = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none
|
|
|
27
27
|
</svg>
|
|
28
28
|
`;
|
|
29
29
|
|
|
30
|
-
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
30
|
+
const zonosCheckoutProgressTabsCss = ":host{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}:host *{font-family:var(--font-family, Inter), Inter}:host img{max-width:100%}:host dl,:host dd,:host h1,:host h2,:host h3,:host h4,:host h5,:host h6,:host hr,:host figure,:host p,:host pre{margin:0}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}:host{margin-bottom:var(--amino-space-32)}:host .zonos--tab-wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:distribute;justify-content:space-around}:host .zonos--tab-index{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;font-size:13px;width:24px;height:24px;font-weight:bold}:host .zonos--tab-index .zonos--tab-index-label,:host .zonos--tab-index .zonos--tab-index-done-icon{position:absolute;top:0;width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out;transition:top 0.5s ease-in-out, opacity 0.5s ease-in-out}:host .zonos--tab-index .zonos--tab-index-done-icon{top:-50%;opacity:0}:host .zonos--tab-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;background:transparent;border:0;cursor:pointer}:host .zonos--tab-item:disabled{cursor:not-allowed}:host .zonos--tab-item.done .zonos--tab-index-done-icon{top:0;opacity:1}:host .zonos--tab-item.done .zonos--tab-index-label{opacity:0;top:50%}:host .zonos--tab-item.selected zonos-text{color:var(--color)}:host .zonos--tab-progress{width:100%;background-color:transparent;border-radius:10px;-webkit-box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);box-shadow:inset 0 0 5px rgba(0, 0, 0, 0.4);overflow:hidden;position:relative;padding:1px;height:8px}:host .zonos--tab-progress .zonos--progress-bar-fill{border-radius:10px;background-color:var(--color);height:100%;width:var(--progress-percent);-webkit-transition:width 0.5s ease-in-out;transition:width 0.5s ease-in-out}";
|
|
31
31
|
const ZonosCheckoutProgressTabsStyle0 = zonosCheckoutProgressTabsCss;
|
|
32
32
|
|
|
33
33
|
const ZonosCheckoutProgressTabs = /*@__PURE__*/ proxyCustomElement(class ZonosCheckoutProgressTabs extends HTMLElement {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, s as stripeStore,
|
|
2
|
+
import { a as localizationStore, b as log, d as stripeStoreGetDomesticShippingSession, e as localizationStoreUpdateSelectedCountryCode, f as stripeStoreCleanupDomesticShippingSession, l as logError, g as stripeStoreSaveDomesticShippingSession, i as initStripeElements, c as cartStore, j as cartStoreUpdateItems, k as cartStoreReset, m as cartStoreResetTabItems, s as stripeStore, n as stripeStoreInitCheckoutSession, o as cartStoreUpdateToErrorState, t as translate, p as stripeStorePrefetchLandedCost, q as cartStoreNextStep, r as stripeStoreConfirmPayment, u as stripeStoreReset } from './stripe.js';
|
|
3
3
|
import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
|
|
4
4
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
5
5
|
import { i as isCheckoutMobile } from './isCheckoutMobile.js';
|
|
@@ -381,6 +381,8 @@ const ZonosCheckout$1 = /*@__PURE__*/ proxyCustomElement(class ZonosCheckout ext
|
|
|
381
381
|
}
|
|
382
382
|
// reset step to customer info
|
|
383
383
|
cartStore.step = 'customer-info';
|
|
384
|
+
// reset the tab item, so that user needs to click on Continue button to re-quote the landed cost if needed.
|
|
385
|
+
cartStoreResetTabItems();
|
|
384
386
|
}
|
|
385
387
|
async buildCartAndInit() {
|
|
386
388
|
// if tempCartUUID is provided, use it instead of buildCartDetail
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { h as handleFetch, l as logError,
|
|
2
|
+
import { h as handleFetch, l as logError, z as isValidSelector, b as log, s as stripeStore, A as initLocalizationStore, e as localizationStoreUpdateSelectedCountryCode } from './stripe.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreInitSetting, a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './zonos-notification2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './zonos-text2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { G as currencyFormat, a as localizationStore, t as translate } from './stripe.js';
|
|
3
3
|
import { z as zonosStore } from './zonosStore.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { f as formatStringWithLinks, d as defineCustomElement$8 } from './zonos-custom-message2.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { _ as _root, e as _baseGetTag, i as isObjectLike_1, f as isObject_1, z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore.js';
|
|
3
|
-
import { h as handleFetch, l as logError, a as localizationStore,
|
|
3
|
+
import { h as handleFetch, l as logError, a as localizationStore, z as isValidSelector, t as translate, B as getZCountryUrlParam, C as setZCountryUrlParam, b as log, D as currencyDisplay, E as currencyConvertAndFormat, F as currencyConvert, G as currencyFormat } from './stripe.js';
|
|
4
4
|
import { c as classes } from './classes.js';
|
|
5
5
|
import { g as getHasMoreSpaceOnRight, d as defineCustomElement$9 } from './zonos-hello-dialog2.js';
|
|
6
6
|
import { d as defineCustomElement$f } from './zonos-banner2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { w as localizationStoreUpdateSelectedLocale, t as translate, a as localizationStore } from './stripe.js';
|
|
3
3
|
import { a as zonosStoreFontFamily } from './zonosStore.js';
|
|
4
4
|
import { l as languages } from './ILanguage.js';
|
|
5
5
|
import { d as defineCustomElement$6 } from './zonos-button2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { s as stripeStore, l as logError,
|
|
2
|
+
import { s as stripeStore, l as logError, p as stripeStorePrefetchLandedCost } from './stripe.js';
|
|
3
3
|
import { d as defineCustomElement$1 } from './zonos-text2.js';
|
|
4
4
|
|
|
5
5
|
const zonosLinkAuthenticationCss = ".sc-zonos-link-authentication-h{font-family:var(--font-family, Inter), Inter;display:block;white-space:normal}.sc-zonos-link-authentication-h *.sc-zonos-link-authentication{font-family:var(--font-family, Inter), Inter}.sc-zonos-link-authentication-h img.sc-zonos-link-authentication{max-width:100%}.sc-zonos-link-authentication-h dl.sc-zonos-link-authentication,.sc-zonos-link-authentication-h dd.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h1.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h2.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h3.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h4.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h5.sc-zonos-link-authentication,.sc-zonos-link-authentication-h h6.sc-zonos-link-authentication,.sc-zonos-link-authentication-h hr.sc-zonos-link-authentication,.sc-zonos-link-authentication-h figure.sc-zonos-link-authentication,.sc-zonos-link-authentication-h p.sc-zonos-link-authentication,.sc-zonos-link-authentication-h pre.sc-zonos-link-authentication{margin:0}.sc-zonos-link-authentication-h{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.sc-zonos-link-authentication-h .zonos--title.sc-zonos-link-authentication{margin-bottom:var(--amino-space-16)}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as cartStore,
|
|
2
|
+
import { c as cartStore, x as cartStoreUpdateSelectedShippingOption, y as cartStoreGetShippingTransitInfo, t as translate } from './stripe.js';
|
|
3
3
|
import { t as trackConversionEvent } from './trackConversionEvent.js';
|
|
4
4
|
import { f as formatCurrency } from './formatCurrency.js';
|
|
5
5
|
import { s as submitGtag } from './submitGtag.js';
|
|
@@ -5353,15 +5353,22 @@ const stripeStoreReset = () => {
|
|
|
5353
5353
|
* Purpose is to resend the request if the info used when fetching landed cost is different from the current info
|
|
5354
5354
|
*/
|
|
5355
5355
|
const isPrefetchInfoOutdated = () => {
|
|
5356
|
-
var _a, _b, _c, _d, _e, _f;
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5356
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
5357
|
+
// Mark the landed cost is outdated since the item total amount has changed (items total didn't match with the cart subtotal)
|
|
5358
|
+
const isTotalAmountChanged = cartStore.landedCostData &&
|
|
5359
|
+
((_a = cartStore.landedCostData.find(Boolean)) === null || _a === void 0 ? void 0 : _a.subtotals.items) !==
|
|
5360
|
+
cartStore.subtotal;
|
|
5361
|
+
const isLinkDataDirty = JSON.stringify((_b = stripeStore.stripeLinkUsedWhenFetchingLC) === null || _b === void 0 ? void 0 : _b.value) !==
|
|
5362
|
+
JSON.stringify((_c = stripeStore.stripeLinkEventData) === null || _c === void 0 ? void 0 : _c.value);
|
|
5363
|
+
const isAddressDataDirty = JSON.stringify((_d = stripeStore.stripeAddressUsedWhenFetchingLC) === null || _d === void 0 ? void 0 : _d.value) !==
|
|
5364
|
+
JSON.stringify((_e = stripeStore.stripeAddressEventData) === null || _e === void 0 ? void 0 : _e.value);
|
|
5361
5365
|
const isBillingAddressDataDirty = !stripeStore.stripeShippingSameAsBilling &&
|
|
5362
|
-
JSON.stringify((
|
|
5363
|
-
JSON.stringify((
|
|
5364
|
-
return isLinkDataDirty ||
|
|
5366
|
+
JSON.stringify((_f = stripeStore.stripeBillingAddressEventData) === null || _f === void 0 ? void 0 : _f.value) !==
|
|
5367
|
+
JSON.stringify((_g = stripeStore.stripeBillingAddressUsedWhenFetchingLC) === null || _g === void 0 ? void 0 : _g.value);
|
|
5368
|
+
return (isLinkDataDirty ||
|
|
5369
|
+
isAddressDataDirty ||
|
|
5370
|
+
isBillingAddressDataDirty ||
|
|
5371
|
+
isTotalAmountChanged);
|
|
5365
5372
|
};
|
|
5366
5373
|
const stripeStorePrefetchLandedCost = async () => {
|
|
5367
5374
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -5802,6 +5809,17 @@ const cartStoreUpdateItems = async (items) => {
|
|
|
5802
5809
|
});
|
|
5803
5810
|
stripeStore.isFetchingSession = false;
|
|
5804
5811
|
};
|
|
5812
|
+
const cartStoreResetSelectedShippingOption = () => {
|
|
5813
|
+
cartStore.selectedShippingOption = null;
|
|
5814
|
+
cartStore.isSelectedShippingAboveDeminimis = false;
|
|
5815
|
+
cartStore.isSelectedShippingGuarantee = false;
|
|
5816
|
+
cartStore.selectedShippingOptionExpectedDate = '';
|
|
5817
|
+
cartStore.selectedShippingOptionTransitTime = '';
|
|
5818
|
+
cartStore.dutiesTaxFees = 0;
|
|
5819
|
+
cartStore.shipping = 0;
|
|
5820
|
+
// reset total to subtotal
|
|
5821
|
+
cartStore.total = cartStore.subtotal;
|
|
5822
|
+
};
|
|
5805
5823
|
const cartStoreNextStep = () => {
|
|
5806
5824
|
if (cartStore.step === 'customer-info') {
|
|
5807
5825
|
cartStore.step = 'shipping';
|
|
@@ -5817,5 +5835,10 @@ const cartStoreNextStep = () => {
|
|
|
5817
5835
|
cartStore.step = 'finish';
|
|
5818
5836
|
}
|
|
5819
5837
|
};
|
|
5838
|
+
const cartStoreResetTabItems = () => {
|
|
5839
|
+
cartStore.step = 'customer-info';
|
|
5840
|
+
cartStore.tabItems = Object.assign(Object.assign({}, cartStore.tabItems), { 'customer-info': Object.assign(Object.assign({}, cartStore.tabItems['customer-info']), { isDone: false }), payment: Object.assign(Object.assign({}, cartStore.tabItems.payment), { isDone: false }), shipping: Object.assign(Object.assign({}, cartStore.tabItems.shipping), { isDone: false }) });
|
|
5841
|
+
cartStoreResetSelectedShippingOption();
|
|
5842
|
+
};
|
|
5820
5843
|
|
|
5821
|
-
export {
|
|
5844
|
+
export { currencyConvertAndFormat as A, currencyConvert as B, currencyFormat as C, stripeStoreRetrievePayment as D, cartStoreUpdateSelectedShippingOption as E, cartStoreGetShippingTransitInfo as F, localizationStoreUpdateSelectedLocale as G, log as a, localizationStoreUpdateSelectedCountryCode as b, stripeStoreCleanupDomesticShippingSession as c, logError as d, stripeStoreSaveDomesticShippingSession as e, cartStore as f, cartStoreUpdateItems as g, cartStoreReset as h, initStripeElements as i, cartStoreResetTabItems as j, stripeStore as k, localizationStore as l, stripeStoreInitCheckoutSession as m, cartStoreUpdateToErrorState as n, stripeStorePrefetchLandedCost as o, cartStoreNextStep as p, stripeStoreConfirmPayment as q, stripeStoreReset as r, stripeStoreGetDomesticShippingSession as s, translate as t, handleFetch as u, isValidSelector as v, initLocalizationStore as w, getZCountryUrlParam as x, setZCountryUrlParam as y, currencyDisplay as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as handleFetch, f as cartStore, l as localizationStore, a as log } from './cart-1b0aaea9.js';
|
|
2
2
|
import { z as zonosStore } from './zonosStore-f3eef64b.js';
|
|
3
3
|
|
|
4
4
|
const trackConversionEvent = async (eventName, metadata) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-0e31d804.js';
|
|
2
|
-
import {
|
|
2
|
+
import { k as stripeStore, d as logError, l as localizationStore, t as translate, o as stripeStorePrefetchLandedCost } from './cart-1b0aaea9.js';
|
|
3
3
|
import { z as zonosStore, d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
4
|
-
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-
|
|
4
|
+
import { s as sendErrorLog, i as isCheckoutMobile } from './sendErrorLog-4e7a8e6e.js';
|
|
5
5
|
import { c as classes } from './classes-0d95c529.js';
|
|
6
6
|
import { g as getBorderRadius } from './getBorderRadius-8129b0cb.js';
|
|
7
7
|
import { i as isDarkColor } from './isDarkColor-7a6d2d14.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-0e31d804.js';
|
|
2
2
|
import { d as zonosStoreFontFamily } from './zonosStore-f3eef64b.js';
|
|
3
3
|
import { c as classes } from './classes-0d95c529.js';
|
|
4
|
-
import {
|
|
4
|
+
import { G as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-1b0aaea9.js';
|
|
5
5
|
import { l as languages } from './ILanguage-97790bee.js';
|
|
6
6
|
import './isDarkColor-7a6d2d14.js';
|
|
7
7
|
import './getBorderRadius-8129b0cb.js';
|