@zonos/elements 1.3.14-alpha.0 → 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 +2 -4
- 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/collection/components/utils/hello/initHello.js +1 -3
- package/dist/collection/types/generated/graphql.customer.types.js +42 -0
- package/dist/collection/types/generated/graphql.frontend.types.js +5 -0
- 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 +2 -4
- 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 +2 -4
- 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/types/types/generated/graphql.customer.types.d.ts +94 -0
- package/dist/types/types/generated/graphql.customer.types.ts +174 -0
- package/dist/types/types/generated/graphql.frontend.types.d.ts +10 -0
- package/dist/types/types/generated/graphql.frontend.types.ts +20 -0
- 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-ac1bccb6.system.entry.js +1 -0
- package/dist/zonos-elements/{p-1744bddb.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-4029034e.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');
|
|
@@ -89,9 +89,7 @@ const initHello = async (helloSettings) => {
|
|
|
89
89
|
position: 'bottom-right',
|
|
90
90
|
});
|
|
91
91
|
// default to mobile anchor if anchorElementSelector is not provided, so for bigcommerce, we don't need to manually add a anchor every time we onboard a new store
|
|
92
|
-
const helloAnchor =
|
|
93
|
-
? anchorElementSelector || mobileHelloAnchor
|
|
94
|
-
: anchorElementSelector;
|
|
92
|
+
const helloAnchor = anchorElementSelector || mobileHelloAnchor;
|
|
95
93
|
// check if checkout button anchor selector user pass in is valid to setup hello
|
|
96
94
|
if (!helloAnchor || !cart.isValidSelector(helloAnchor)) {
|
|
97
95
|
cart.logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
|
|
@@ -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;
|
|
@@ -51,9 +51,7 @@ export const initHello = async (helloSettings) => {
|
|
|
51
51
|
position: 'bottom-right',
|
|
52
52
|
});
|
|
53
53
|
// default to mobile anchor if anchorElementSelector is not provided, so for bigcommerce, we don't need to manually add a anchor every time we onboard a new store
|
|
54
|
-
const helloAnchor =
|
|
55
|
-
? anchorElementSelector || mobileHelloAnchor
|
|
56
|
-
: anchorElementSelector;
|
|
54
|
+
const helloAnchor = anchorElementSelector || mobileHelloAnchor;
|
|
57
55
|
// check if checkout button anchor selector user pass in is valid to setup hello
|
|
58
56
|
if (!helloAnchor || !isValidSelector(helloAnchor)) {
|
|
59
57
|
logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
|
|
@@ -139,6 +139,10 @@ export const carrierApiRatingSpecialServiceType = {
|
|
|
139
139
|
SignatureOption: 'SIGNATURE_OPTION',
|
|
140
140
|
SundayDelivery: 'SUNDAY_DELIVERY',
|
|
141
141
|
};
|
|
142
|
+
export const carrierApiSupportType = {
|
|
143
|
+
Supported: 'SUPPORTED',
|
|
144
|
+
Unsupported: 'UNSUPPORTED',
|
|
145
|
+
};
|
|
142
146
|
export const carrierCode = {
|
|
143
147
|
Apc: 'APC',
|
|
144
148
|
Dhl: 'DHL',
|
|
@@ -1076,6 +1080,7 @@ export const emailTemplateStatus = {
|
|
|
1076
1080
|
export const emailTemplateType = {
|
|
1077
1081
|
AbandonedCart: 'ABANDONED_CART',
|
|
1078
1082
|
CatalogExport: 'CATALOG_EXPORT',
|
|
1083
|
+
ManualClassificationExport: 'MANUAL_CLASSIFICATION_EXPORT',
|
|
1079
1084
|
OrderCanceled: 'ORDER_CANCELED',
|
|
1080
1085
|
OrderConfirmation: 'ORDER_CONFIRMATION',
|
|
1081
1086
|
OrderReceipt: 'ORDER_RECEIPT',
|
|
@@ -1193,6 +1198,25 @@ export const imageSlot = {
|
|
|
1193
1198
|
Image_4: 'IMAGE_4',
|
|
1194
1199
|
Image_5: 'IMAGE_5',
|
|
1195
1200
|
};
|
|
1201
|
+
export const inclusivePriceCalculateJobStatus = {
|
|
1202
|
+
Completed: 'COMPLETED',
|
|
1203
|
+
Failed: 'FAILED',
|
|
1204
|
+
InProgress: 'IN_PROGRESS',
|
|
1205
|
+
};
|
|
1206
|
+
export const inclusivePriceCalculateJobType = {
|
|
1207
|
+
All: 'ALL',
|
|
1208
|
+
CatalogItem: 'CATALOG_ITEM',
|
|
1209
|
+
Country: 'COUNTRY',
|
|
1210
|
+
};
|
|
1211
|
+
export const inclusivePriceCatalogValidationJobCompletionStatus = {
|
|
1212
|
+
Archived: 'ARCHIVED',
|
|
1213
|
+
Completed: 'COMPLETED',
|
|
1214
|
+
InProgress: 'IN_PROGRESS',
|
|
1215
|
+
};
|
|
1216
|
+
export const inclusivePriceCatalogValidationJobComplianceStatus = {
|
|
1217
|
+
Compliant: 'COMPLIANT',
|
|
1218
|
+
NonCompliant: 'NON_COMPLIANT',
|
|
1219
|
+
};
|
|
1196
1220
|
export const inclusivePriceHistoryCsvJobStatus = {
|
|
1197
1221
|
Error: 'ERROR',
|
|
1198
1222
|
Processed: 'PROCESSED',
|
|
@@ -2082,8 +2106,26 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
2082
2106
|
ZonosSettings(variables, requestHeaders) {
|
|
2083
2107
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'ZonosSettings', 'query');
|
|
2084
2108
|
},
|
|
2109
|
+
addTrackingNumber(variables, requestHeaders) {
|
|
2110
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'addTrackingNumber', 'mutation');
|
|
2111
|
+
},
|
|
2112
|
+
createWebhook(variables, requestHeaders) {
|
|
2113
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'createWebhook', 'mutation');
|
|
2114
|
+
},
|
|
2115
|
+
deleteWebhook(variables, requestHeaders) {
|
|
2116
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'deleteWebhook', 'mutation');
|
|
2117
|
+
},
|
|
2085
2118
|
getCheckoutPlaceOrderButtonSelector(variables, requestHeaders) {
|
|
2086
2119
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getCheckoutPlaceOrderButtonSelector', 'query');
|
|
2087
2120
|
},
|
|
2121
|
+
getWebhooks(variables, requestHeaders) {
|
|
2122
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'getWebhooks', 'query');
|
|
2123
|
+
},
|
|
2124
|
+
removeTrackingNumber(variables, requestHeaders) {
|
|
2125
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'removeTrackingNumber', 'mutation');
|
|
2126
|
+
},
|
|
2127
|
+
updateWebhook(variables, requestHeaders) {
|
|
2128
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'updateWebhook', 'mutation');
|
|
2129
|
+
},
|
|
2088
2130
|
};
|
|
2089
2131
|
}
|
|
@@ -13,6 +13,7 @@ export const featureAspectKeyEnum = {
|
|
|
13
13
|
ComConsolidation: 'com_consolidation',
|
|
14
14
|
DashboardCheckout_2Settings: 'dashboard_checkout_2_settings',
|
|
15
15
|
DashboardHello_2Settings: 'dashboard_hello_2_settings',
|
|
16
|
+
DashboardNewLabelUi: 'dashboard_new_label_ui',
|
|
16
17
|
DashboardOrderApprove: 'dashboard_order_approve',
|
|
17
18
|
DashboardOrderApproveNoCapture: 'dashboard_order_approve_no_capture',
|
|
18
19
|
Dashboard_909Settings: 'dashboard_909_settings',
|
|
@@ -30,6 +31,7 @@ export const featureAudienceNameEnum = {
|
|
|
30
31
|
AccountsReceivable: 'accounts_receivable',
|
|
31
32
|
CheckoutSales: 'checkout_sales',
|
|
32
33
|
CustomerSuccess: 'customer_success',
|
|
34
|
+
DashboardLabelBetaMerchant: 'dashboard_label_beta_merchant',
|
|
33
35
|
Designer: 'designer',
|
|
34
36
|
DocsContributor: 'docs_contributor',
|
|
35
37
|
Executive: 'executive',
|
|
@@ -494,6 +496,9 @@ export function getSdk(client, withWrapper = defaultWrapper) {
|
|
|
494
496
|
UpsertBigCommerceSettings(variables, requestHeaders) {
|
|
495
497
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'UpsertBigCommerceSettings', 'mutation');
|
|
496
498
|
},
|
|
499
|
+
cleanupTestErrors(variables, requestHeaders) {
|
|
500
|
+
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cleanupTestErrors', 'mutation');
|
|
501
|
+
},
|
|
497
502
|
cleanupTestZonosElementSetting(variables, requestHeaders) {
|
|
498
503
|
return withWrapper(wrappedRequestHeaders => client.request('', variables, Object.assign(Object.assign({}, requestHeaders), wrappedRequestHeaders)), 'cleanupTestZonosElementSetting', 'mutation');
|
|
499
504
|
},
|
|
@@ -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';
|
|
@@ -85,9 +85,7 @@ const initHello = async (helloSettings) => {
|
|
|
85
85
|
position: 'bottom-right',
|
|
86
86
|
});
|
|
87
87
|
// default to mobile anchor if anchorElementSelector is not provided, so for bigcommerce, we don't need to manually add a anchor every time we onboard a new store
|
|
88
|
-
const helloAnchor =
|
|
89
|
-
? anchorElementSelector || mobileHelloAnchor
|
|
90
|
-
: anchorElementSelector;
|
|
88
|
+
const helloAnchor = anchorElementSelector || mobileHelloAnchor;
|
|
91
89
|
// check if checkout button anchor selector user pass in is valid to setup hello
|
|
92
90
|
if (!helloAnchor || !isValidSelector(helloAnchor)) {
|
|
93
91
|
logError(`Selector anchorElementSelector "${helloSettings.anchorElementSelector}" is not a valid selector.`);
|
|
@@ -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)}";
|