@zonos/elements 1.3.32 → 1.3.34-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.
Files changed (79) hide show
  1. package/dist/cjs/{cart-d07e8ea1.js → cart-42cc98d9.js} +2 -2
  2. package/dist/cjs/index.cjs.js +12 -5
  3. package/dist/cjs/{submitGtag-f1aeac3e.js → submitGtag-09f2e437.js} +1 -1
  4. package/dist/cjs/zonos-address_8.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-cart-items_12.cjs.entry.js +2 -2
  6. package/dist/cjs/zonos-checkout.cjs.entry.js +5 -3
  7. package/dist/cjs/zonos-controller.cjs.entry.js +3 -2
  8. package/dist/cjs/zonos-country-flag.cjs.entry.js +1 -1
  9. package/dist/cjs/zonos-country-select_3.cjs.entry.js +1 -1
  10. package/dist/cjs/zonos-hello-dialog.cjs.entry.js +1 -1
  11. package/dist/cjs/zonos-hello.cjs.entry.js +1 -1
  12. package/dist/cjs/zonos-language-select_2.cjs.entry.js +1 -1
  13. package/dist/cjs/zonos-notification_2.cjs.entry.js +1 -1
  14. package/dist/collection/components/checkout/zonos-checkout/zonos-checkout.js +3 -1
  15. package/dist/collection/components/main/zonos-controller.js +2 -1
  16. package/dist/collection/components/store/hello/localization.js +2 -2
  17. package/dist/collection/scripts/_zonosBase.js +8 -1
  18. package/dist/esm/{cart-a90aa9ae.js → cart-b9f15a63.js} +2 -2
  19. package/dist/esm/index.js +12 -5
  20. package/dist/esm/{submitGtag-849e2bc9.js → submitGtag-8b52cfdd.js} +1 -1
  21. package/dist/esm/zonos-address_8.entry.js +1 -1
  22. package/dist/esm/zonos-cart-items_12.entry.js +2 -2
  23. package/dist/esm/zonos-checkout.entry.js +5 -3
  24. package/dist/esm/zonos-controller.entry.js +3 -2
  25. package/dist/esm/zonos-country-flag.entry.js +1 -1
  26. package/dist/esm/zonos-country-select_3.entry.js +1 -1
  27. package/dist/esm/zonos-hello-dialog.entry.js +1 -1
  28. package/dist/esm/zonos-hello.entry.js +1 -1
  29. package/dist/esm/zonos-language-select_2.entry.js +1 -1
  30. package/dist/esm/zonos-notification_2.entry.js +1 -1
  31. package/dist/esm-es5/{cart-a90aa9ae.js → cart-b9f15a63.js} +1 -1
  32. package/dist/esm-es5/index.js +1 -1
  33. package/dist/esm-es5/{submitGtag-849e2bc9.js → submitGtag-8b52cfdd.js} +1 -1
  34. package/dist/esm-es5/zonos-address_8.entry.js +1 -1
  35. package/dist/esm-es5/zonos-cart-items_12.entry.js +1 -1
  36. package/dist/esm-es5/zonos-checkout.entry.js +1 -1
  37. package/dist/esm-es5/zonos-controller.entry.js +1 -1
  38. package/dist/esm-es5/zonos-country-flag.entry.js +1 -1
  39. package/dist/esm-es5/zonos-country-select_3.entry.js +1 -1
  40. package/dist/esm-es5/zonos-hello-dialog.entry.js +1 -1
  41. package/dist/esm-es5/zonos-hello.entry.js +1 -1
  42. package/dist/esm-es5/zonos-language-select_2.entry.js +1 -1
  43. package/dist/esm-es5/zonos-notification_2.entry.js +1 -1
  44. package/dist/scripts/index.d.ts +5 -0
  45. package/dist/scripts/index.js +1 -1
  46. package/dist/scripts/loadZonos.js +1 -1
  47. package/dist/scripts/zonos.js +1 -1
  48. package/dist/types/types/checkout/CheckoutConfig.d.ts +5 -0
  49. package/dist/zonos-elements/index.esm.js +1 -1
  50. package/dist/zonos-elements/p-09f89949.entry.js +1 -0
  51. package/dist/zonos-elements/p-0a07379c.system.js +1 -0
  52. package/dist/zonos-elements/{p-93e493ce.entry.js → p-0f58c8ab.entry.js} +1 -1
  53. package/dist/zonos-elements/{p-9d599745.entry.js → p-1a67d86d.entry.js} +1 -1
  54. package/dist/zonos-elements/{p-cc965417.entry.js → p-1b33ed3b.entry.js} +1 -1
  55. package/dist/zonos-elements/{p-21b61106.system.entry.js → p-210f3405.system.entry.js} +1 -1
  56. package/dist/zonos-elements/{p-672e80e5.system.entry.js → p-27538d28.system.entry.js} +1 -1
  57. package/dist/zonos-elements/{p-7a6dcfa2.entry.js → p-290bd010.entry.js} +1 -1
  58. package/dist/zonos-elements/{p-38a90e86.system.entry.js → p-3143bbf8.system.entry.js} +1 -1
  59. package/dist/zonos-elements/{p-41ef293d.js → p-3bc94271.js} +1 -1
  60. package/dist/zonos-elements/{p-8aadefbb.entry.js → p-4c49eb9b.entry.js} +1 -1
  61. package/dist/zonos-elements/{p-344ce057.entry.js → p-4ff5c708.entry.js} +1 -1
  62. package/dist/zonos-elements/{p-057380ad.system.js → p-679e42d8.system.js} +1 -1
  63. package/dist/zonos-elements/{p-e344cb12.entry.js → p-6a42fa2a.entry.js} +1 -1
  64. package/dist/zonos-elements/{p-1eab7a86.entry.js → p-6f51a7ee.entry.js} +1 -1
  65. package/dist/zonos-elements/{p-da787898.system.entry.js → p-7a3bf998.system.entry.js} +1 -1
  66. package/dist/zonos-elements/{p-b6c515e1.system.entry.js → p-829bac92.system.entry.js} +1 -1
  67. package/dist/zonos-elements/{p-6f04e132.entry.js → p-83e265cf.entry.js} +1 -1
  68. package/dist/zonos-elements/{p-16ab16f9.system.entry.js → p-9b525aaa.system.entry.js} +1 -1
  69. package/dist/zonos-elements/{p-af0d3ca0.system.entry.js → p-af5fc5f7.system.entry.js} +1 -1
  70. package/dist/zonos-elements/{p-2d6d0d57.js → p-b5f769ba.js} +1 -1
  71. package/dist/zonos-elements/{p-3ba86711.system.js → p-b65cc2cf.system.js} +1 -1
  72. package/dist/zonos-elements/{p-717faabd.system.entry.js → p-c84f90b9.system.entry.js} +1 -1
  73. package/dist/zonos-elements/p-e0bf9666.system.js +1 -1
  74. package/dist/zonos-elements/{p-85503e70.system.entry.js → p-f64ac752.system.entry.js} +1 -1
  75. package/dist/zonos-elements/{p-6de51a79.system.entry.js → p-fdf79bff.system.entry.js} +1 -1
  76. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  77. package/package.json +1 -1
  78. package/dist/zonos-elements/p-8b771620.entry.js +0 -1
  79. package/dist/zonos-elements/p-ca8fb99c.system.js +0 -1
@@ -7046,7 +7046,7 @@ const addInternationalHideClass = () => {
7046
7046
  };
7047
7047
  const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
7048
7048
  var _a, _b;
7049
- logError.log('update selected country code');
7049
+ logError.log(`Updating selected country code to ${newSelectedCountryCode}`);
7050
7050
  const isFirstTime = !localizationStore.selectedCountryCode;
7051
7051
  localizationStore.selectedCountryCode = newSelectedCountryCode;
7052
7052
  const { selectedCountryCode, shippingZoneCountries } = localizationStore;
@@ -7055,7 +7055,7 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
7055
7055
  !!shippingZoneCountries[selectedCountryCode];
7056
7056
  // update shippable country
7057
7057
  localizationStore.isShippableCountry = !!isShippableCountry;
7058
- logError.log(`Is shippable country: ${localizationStore.isShippableCountry}`);
7058
+ logError.log(`${localizationStore.selectedCountryCode} is shippable country: ${localizationStore.isShippableCountry}`);
7059
7059
  addInternationalHideClass();
7060
7060
  if (!selectedCountryCode) {
7061
7061
  return;
@@ -249,9 +249,9 @@ const zonosLoadUrl = (() => {
249
249
  }
250
250
  return null;
251
251
  })();
252
- const ZONOS_URL = "https://v1.3.32.js.zonos.com";
253
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.32";
254
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.32";
252
+ const ZONOS_URL = "https://v1.3.34-alpha.0.js.zonos.com";
253
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.34-alpha.0";
254
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.34-alpha.0";
255
255
  const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
256
256
  const INTER_FONT_URL = 'https://rsms.me';
257
257
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
@@ -271,7 +271,7 @@ Zonos.isBigCommerce = false;
271
271
  */
272
272
  Zonos.isNpm = true;
273
273
  Zonos.zonosQaUrl = null;
274
- Zonos.version = `v${"1.3.32"}`;
274
+ Zonos.version = `v${"1.3.34-alpha.0"}`;
275
275
  Zonos.modeAlerted = false;
276
276
  Zonos.tempCartData = null;
277
277
  Zonos.getCurrentTimestamp = () => new Date().getTime();
@@ -330,7 +330,12 @@ Zonos.updateOrganizationName = (organizationName) => {
330
330
  var _b;
331
331
  void ((_b = _a.zonosController) === null || _b === void 0 ? void 0 : _b.updateOrganizationName(organizationName));
332
332
  };
333
- Zonos.disablePlaceOrderButtons = ({ autoEnable = true, disable, placeOrderButtonSelector, }) => {
333
+ Zonos.disablePlaceOrderButtons = ({ autoEnable = true, config, disable, placeOrderButtonSelector, }) => {
334
+ var _b;
335
+ // if disablePlaceOrderButtonActivation is true, do nothing
336
+ if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.disablePlaceOrderButtonActivation) {
337
+ return;
338
+ }
334
339
  // if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
335
340
  if (placeOrderButtonSelector) {
336
341
  const placeOrderButton = document.querySelectorAll(placeOrderButtonSelector);
@@ -381,12 +386,14 @@ Zonos.injectController = ({ config, zonosApiKey, }) => {
381
386
  if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
382
387
  const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
383
388
  _a.disablePlaceOrderButtons({
389
+ config,
384
390
  disable: true,
385
391
  placeOrderButtonSelector,
386
392
  });
387
393
  // create a mutation observer to see if any new elements that match our selector is added to the DOM
388
394
  const observer = new MutationObserver(() => {
389
395
  _a.disablePlaceOrderButtons({
396
+ config,
390
397
  disable: true,
391
398
  placeOrderButtonSelector,
392
399
  });
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cart = require('./cart-d07e8ea1.js');
3
+ const cart = require('./cart-42cc98d9.js');
4
4
  const zonosStore = require('./zonosStore-4c6c85da.js');
5
5
  const logError = require('./logError-4e2f2020.js');
6
6
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
8
8
  const logError = require('./logError-4e2f2020.js');
9
9
  const containsNonLatinChars = require('./containsNonLatinChars-2be5129b.js');
@@ -3,10 +3,10 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
8
  const zonosStore = require('./zonosStore-4c6c85da.js');
9
- const submitGtag = require('./submitGtag-f1aeac3e.js');
9
+ const submitGtag = require('./submitGtag-09f2e437.js');
10
10
  const getBorderRadius = require('./getBorderRadius-074b46ef.js');
11
11
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
12
12
  const ILanguage = require('./ILanguage-98b04442.js');
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
- const submitGtag = require('./submitGtag-f1aeac3e.js');
8
+ const submitGtag = require('./submitGtag-09f2e437.js');
9
9
  const isCheckoutMobile = require('./isCheckoutMobile-f491ca7c.js');
10
10
  const logError = require('./logError-4e2f2020.js');
11
11
  const classes = require('./classes-b7918f56.js');
@@ -493,7 +493,9 @@ const ZonosCheckout = class {
493
493
  });
494
494
  }
495
495
  });
496
- button.removeAttribute('disabled');
496
+ if (!zonosStore.zonosStore.checkoutSettings.disablePlaceOrderButtonActivation) {
497
+ button.removeAttribute('disabled');
498
+ }
497
499
  button.setAttribute('data-zonos-checkout-attached', 'true');
498
500
  // if this button is the hidden button, trigger the click event
499
501
  if (button.matches(this.domesticRedirectedBtnSelector)) {
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
8
  const logError = require('./logError-4e2f2020.js');
9
9
  require('./isDarkColor-371a3b1a.js');
@@ -281,6 +281,7 @@ const ZonosController = class {
281
281
  * Override country code for storybook
282
282
  */
283
283
  async overrideCountry(countryCode) {
284
+ logError.log(`Override country code to ${countryCode}`);
284
285
  void cart.localizationStoreUpdateSelectedCountryCode(countryCode);
285
286
  }
286
287
  /**
@@ -296,7 +297,7 @@ const ZonosController = class {
296
297
  zonosStore.zonosStore.organizationName = organizationName;
297
298
  }
298
299
  render() {
299
- return index.h(index.Host, { key: 'c98dfffe6973da6ae6ad1fef367ed84b3eb3dc0c', class: "zonos--elements" });
300
+ return index.h(index.Host, { key: 'd7af0426a1f93b8ec8b37ef73babe045bc2a7624', class: "zonos--elements" });
300
301
  }
301
302
  };
302
303
  ZonosController.style = ZonosControllerStyle0;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  require('./logError-4e2f2020.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
8
  const formatStringWithLinks = require('./formatStringWithLinks-52341fc7.js');
9
9
  const isDarkColor = require('./isDarkColor-371a3b1a.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.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-b071017b.js');
6
6
  const zonosStore = require('./zonosStore-4c6c85da.js');
7
- const cart = require('./cart-d07e8ea1.js');
7
+ const cart = require('./cart-42cc98d9.js');
8
8
  const classes = require('./classes-b7918f56.js');
9
9
  const logError = require('./logError-4e2f2020.js');
10
10
  const getHasMoreSpaceOnRight = require('./getHasMoreSpaceOnRight-4c94667f.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b071017b.js');
6
- const cart = require('./cart-d07e8ea1.js');
6
+ const cart = require('./cart-42cc98d9.js');
7
7
  const zonosStore = require('./zonosStore-4c6c85da.js');
8
8
  const ILanguage = require('./ILanguage-98b04442.js');
9
9
  require('./logError-4e2f2020.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b071017b.js');
6
6
  const zonosStore = require('./zonosStore-4c6c85da.js');
7
7
  const classes = require('./classes-b7918f56.js');
8
- const cart = require('./cart-d07e8ea1.js');
8
+ const cart = require('./cart-42cc98d9.js');
9
9
  const logError = require('./logError-4e2f2020.js');
10
10
  require('./isDarkColor-371a3b1a.js');
11
11
  require('./getBorderRadius-074b46ef.js');
@@ -224,7 +224,9 @@ export class ZonosCheckout {
224
224
  });
225
225
  }
226
226
  });
227
- button.removeAttribute('disabled');
227
+ if (!zonosStore.checkoutSettings.disablePlaceOrderButtonActivation) {
228
+ button.removeAttribute('disabled');
229
+ }
228
230
  button.setAttribute('data-zonos-checkout-attached', 'true');
229
231
  // if this button is the hidden button, trigger the click event
230
232
  if (button.matches(this.domesticRedirectedBtnSelector)) {
@@ -163,6 +163,7 @@ export class ZonosController {
163
163
  * Override country code for storybook
164
164
  */
165
165
  async overrideCountry(countryCode) {
166
+ log(`Override country code to ${countryCode}`);
166
167
  void localizationStoreUpdateSelectedCountryCode(countryCode);
167
168
  }
168
169
  /**
@@ -178,7 +179,7 @@ export class ZonosController {
178
179
  zonosStore.organizationName = organizationName;
179
180
  }
180
181
  render() {
181
- return h(Host, { key: 'c98dfffe6973da6ae6ad1fef367ed84b3eb3dc0c', class: "zonos--elements" });
182
+ return h(Host, { key: 'd7af0426a1f93b8ec8b37ef73babe045bc2a7624', class: "zonos--elements" });
182
183
  }
183
184
  static get is() { return "zonos-controller"; }
184
185
  static get encapsulation() { return "shadow"; }
@@ -99,7 +99,7 @@ const addInternationalHideClass = () => {
99
99
  };
100
100
  const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
101
101
  var _a, _b;
102
- log('update selected country code');
102
+ log(`Updating selected country code to ${newSelectedCountryCode}`);
103
103
  const isFirstTime = !localizationStore.selectedCountryCode;
104
104
  localizationStore.selectedCountryCode = newSelectedCountryCode;
105
105
  const { selectedCountryCode, shippingZoneCountries } = localizationStore;
@@ -108,7 +108,7 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
108
108
  !!shippingZoneCountries[selectedCountryCode];
109
109
  // update shippable country
110
110
  localizationStore.isShippableCountry = !!isShippableCountry;
111
- log(`Is shippable country: ${localizationStore.isShippableCountry}`);
111
+ log(`${localizationStore.selectedCountryCode} is shippable country: ${localizationStore.isShippableCountry}`);
112
112
  addInternationalHideClass();
113
113
  if (!selectedCountryCode) {
114
114
  return;
@@ -102,7 +102,12 @@ Zonos.updateOrganizationName = (organizationName) => {
102
102
  var _b;
103
103
  void ((_b = _a.zonosController) === null || _b === void 0 ? void 0 : _b.updateOrganizationName(organizationName));
104
104
  };
105
- Zonos.disablePlaceOrderButtons = ({ autoEnable = true, disable, placeOrderButtonSelector, }) => {
105
+ Zonos.disablePlaceOrderButtons = ({ autoEnable = true, config, disable, placeOrderButtonSelector, }) => {
106
+ var _b;
107
+ // if disablePlaceOrderButtonActivation is true, do nothing
108
+ if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.disablePlaceOrderButtonActivation) {
109
+ return;
110
+ }
106
111
  // if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
107
112
  if (placeOrderButtonSelector) {
108
113
  const placeOrderButton = document.querySelectorAll(placeOrderButtonSelector);
@@ -153,12 +158,14 @@ Zonos.injectController = ({ config, zonosApiKey, }) => {
153
158
  if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
154
159
  const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
155
160
  _a.disablePlaceOrderButtons({
161
+ config,
156
162
  disable: true,
157
163
  placeOrderButtonSelector,
158
164
  });
159
165
  // create a mutation observer to see if any new elements that match our selector is added to the DOM
160
166
  const observer = new MutationObserver(() => {
161
167
  _a.disablePlaceOrderButtons({
168
+ config,
162
169
  disable: true,
163
170
  placeOrderButtonSelector,
164
171
  });
@@ -7044,7 +7044,7 @@ const addInternationalHideClass = () => {
7044
7044
  };
7045
7045
  const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
7046
7046
  var _a, _b;
7047
- log('update selected country code');
7047
+ log(`Updating selected country code to ${newSelectedCountryCode}`);
7048
7048
  const isFirstTime = !localizationStore.selectedCountryCode;
7049
7049
  localizationStore.selectedCountryCode = newSelectedCountryCode;
7050
7050
  const { selectedCountryCode, shippingZoneCountries } = localizationStore;
@@ -7053,7 +7053,7 @@ const localizationStoreUpdateSelectedCountryCode = (newSelectedCountryCode) => {
7053
7053
  !!shippingZoneCountries[selectedCountryCode];
7054
7054
  // update shippable country
7055
7055
  localizationStore.isShippableCountry = !!isShippableCountry;
7056
- log(`Is shippable country: ${localizationStore.isShippableCountry}`);
7056
+ log(`${localizationStore.selectedCountryCode} is shippable country: ${localizationStore.isShippableCountry}`);
7057
7057
  addInternationalHideClass();
7058
7058
  if (!selectedCountryCode) {
7059
7059
  return;
package/dist/esm/index.js CHANGED
@@ -245,9 +245,9 @@ const zonosLoadUrl = (() => {
245
245
  }
246
246
  return null;
247
247
  })();
248
- const ZONOS_URL = "https://v1.3.32.js.zonos.com";
249
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.32";
250
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.32";
248
+ const ZONOS_URL = "https://v1.3.34-alpha.0.js.zonos.com";
249
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.34-alpha.0";
250
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.34-alpha.0";
251
251
  const MAIN_LOAD_CDN_TYPE = 'jsdelivr';
252
252
  const INTER_FONT_URL = 'https://rsms.me';
253
253
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
@@ -267,7 +267,7 @@ Zonos.isBigCommerce = false;
267
267
  */
268
268
  Zonos.isNpm = true;
269
269
  Zonos.zonosQaUrl = null;
270
- Zonos.version = `v${"1.3.32"}`;
270
+ Zonos.version = `v${"1.3.34-alpha.0"}`;
271
271
  Zonos.modeAlerted = false;
272
272
  Zonos.tempCartData = null;
273
273
  Zonos.getCurrentTimestamp = () => new Date().getTime();
@@ -326,7 +326,12 @@ Zonos.updateOrganizationName = (organizationName) => {
326
326
  var _b;
327
327
  void ((_b = _a.zonosController) === null || _b === void 0 ? void 0 : _b.updateOrganizationName(organizationName));
328
328
  };
329
- Zonos.disablePlaceOrderButtons = ({ autoEnable = true, disable, placeOrderButtonSelector, }) => {
329
+ Zonos.disablePlaceOrderButtons = ({ autoEnable = true, config, disable, placeOrderButtonSelector, }) => {
330
+ var _b;
331
+ // if disablePlaceOrderButtonActivation is true, do nothing
332
+ if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.disablePlaceOrderButtonActivation) {
333
+ return;
334
+ }
330
335
  // if placeOrderAnchor is passed in the config for checkoutSettings, disable the place order button until zonos is initialized
331
336
  if (placeOrderButtonSelector) {
332
337
  const placeOrderButton = document.querySelectorAll(placeOrderButtonSelector);
@@ -377,12 +382,14 @@ Zonos.injectController = ({ config, zonosApiKey, }) => {
377
382
  if ((_b = config.checkoutSettings) === null || _b === void 0 ? void 0 : _b.placeOrderButtonSelector) {
378
383
  const placeOrderButtonSelector = config.checkoutSettings.placeOrderButtonSelector;
379
384
  _a.disablePlaceOrderButtons({
385
+ config,
380
386
  disable: true,
381
387
  placeOrderButtonSelector,
382
388
  });
383
389
  // create a mutation observer to see if any new elements that match our selector is added to the DOM
384
390
  const observer = new MutationObserver(() => {
385
391
  _a.disablePlaceOrderButtons({
392
+ config,
386
393
  disable: true,
387
394
  placeOrderButtonSelector,
388
395
  });
@@ -1,4 +1,4 @@
1
- import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-a90aa9ae.js';
1
+ import { r as handleFetch, d as cartStore, l as localizationStore } from './cart-b9f15a63.js';
2
2
  import { z as zonosStore } from './zonosStore-ba9e541e.js';
3
3
  import { l as log } from './logError-c456c092.js';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, d as getElement } from './index-3b46f3c3.js';
2
- import { h as stripeStore, l as localizationStore, t as translate } from './cart-a90aa9ae.js';
2
+ import { h as stripeStore, l as localizationStore, t as translate } from './cart-b9f15a63.js';
3
3
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
4
4
  import { a as logError } from './logError-c456c092.js';
5
5
  import { i as isTextContainsNonLatinChars, c as containsNonLatinChars } from './containsNonLatinChars-2d8810c3.js';
@@ -1,8 +1,8 @@
1
1
  import { r as registerInstance, a as getAssetPath, h, H as Host, F as Fragment, c as createEvent, d as getElement } from './index-3b46f3c3.js';
2
- import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-a90aa9ae.js';
2
+ import { d as cartStore, B as currencyFormat, C as cartStoreHasOneEligibleItem, t as translate, r as handleFetch, p as stripeStoreReset, h as stripeStore, D as stripeStoreRetrievePayment, l as localizationStore, E as stripeStoreTranslateAddressToLatin, F as cartStoreUpdateSelectedShippingOption, G as cartStoreGetShippingTransitInfo } from './cart-b9f15a63.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
4
  import { z as zonosStore, g as getZonosStoreTheme, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
5
- import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent, g as getIsTestMode } from './submitGtag-849e2bc9.js';
5
+ import { t as trackConversionEvent, s as sendErrorLog, a as submitGtag, c as createCustomEvent, g as getIsTestMode } from './submitGtag-8b52cfdd.js';
6
6
  import { g as getBorderRadius } from './getBorderRadius-947c24de.js';
7
7
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
8
8
  import { l as languages } from './ILanguage-cd6acb72.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, F as Fragment } from './index-3b46f3c3.js';
2
- import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-a90aa9ae.js';
2
+ import { l as localizationStore, s as stripeStoreGetDomesticShippingSession, a as localizationStoreUpdateSelectedCountryCode, b as stripeStoreCleanupDomesticShippingSession, c as stripeStoreSaveDomesticShippingSession, i as initStripeElements, d as cartStore, e as cartStoreUpdateItems, f as cartStoreReset, g as cartStoreResetTabItems, h as stripeStore, j as stripeStoreInitCheckoutSession, k as cartStoreUpdateToErrorState, t as translate, m as stripeStorePrefetchLandedCost, n as cartStoreNextStep, o as stripeStoreConfirmPayment, p as stripeStoreReset, q as localizationStoreOnUpdate } from './cart-b9f15a63.js';
3
3
  import { z as zonosStore, g as getZonosStoreTheme, m as mergeConfig } from './zonosStore-ba9e541e.js';
4
- import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent, g as getIsTestMode } from './submitGtag-849e2bc9.js';
4
+ import { c as createCustomEvent, s as sendErrorLog, a as submitGtag, t as trackConversionEvent, g as getIsTestMode } from './submitGtag-8b52cfdd.js';
5
5
  import { i as isCheckoutMobile } from './isCheckoutMobile-8846dccb.js';
6
6
  import { l as log, a as logError } from './logError-c456c092.js';
7
7
  import { c as classes } from './classes-0d95c529.js';
@@ -489,7 +489,9 @@ const ZonosCheckout = class {
489
489
  });
490
490
  }
491
491
  });
492
- button.removeAttribute('disabled');
492
+ if (!zonosStore.checkoutSettings.disablePlaceOrderButtonActivation) {
493
+ button.removeAttribute('disabled');
494
+ }
493
495
  button.setAttribute('data-zonos-checkout-attached', 'true');
494
496
  // if this button is the hidden button, trigger the click event
495
497
  if (button.matches(this.domesticRedirectedBtnSelector)) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
2
- import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-a90aa9ae.js';
2
+ import { r as handleFetch, u as isValidSelector, h as stripeStore, v as initLocalizationStore, a as localizationStoreUpdateSelectedCountryCode } from './cart-b9f15a63.js';
3
3
  import { z as zonosStore, b as zonosStoreInitSetting, d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
4
4
  import { a as logError, l as log } from './logError-c456c092.js';
5
5
  import './isDarkColor-f8324c10.js';
@@ -277,6 +277,7 @@ const ZonosController = class {
277
277
  * Override country code for storybook
278
278
  */
279
279
  async overrideCountry(countryCode) {
280
+ log(`Override country code to ${countryCode}`);
280
281
  void localizationStoreUpdateSelectedCountryCode(countryCode);
281
282
  }
282
283
  /**
@@ -292,7 +293,7 @@ const ZonosController = class {
292
293
  zonosStore.organizationName = organizationName;
293
294
  }
294
295
  render() {
295
- return h(Host, { key: 'c98dfffe6973da6ae6ad1fef367ed84b3eb3dc0c', class: "zonos--elements" });
296
+ return h(Host, { key: 'd7af0426a1f93b8ec8b37ef73babe045bc2a7624', class: "zonos--elements" });
296
297
  }
297
298
  };
298
299
  ZonosController.style = ZonosControllerStyle0;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
2
- import { l as localizationStore } from './cart-a90aa9ae.js';
2
+ import { l as localizationStore } from './cart-b9f15a63.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import './logError-c456c092.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
2
- import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-a90aa9ae.js';
2
+ import { a as localizationStoreUpdateSelectedCountryCode, l as localizationStore } from './cart-b9f15a63.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
4
4
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
5
5
  import { i as isDarkColor } from './isDarkColor-f8324c10.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-3b46f3c3.js';
2
- import { l as localizationStore, B as currencyFormat, t as translate } from './cart-a90aa9ae.js';
2
+ import { l as localizationStore, B as currencyFormat, t as translate } from './cart-b9f15a63.js';
3
3
  import { z as zonosStore } from './zonosStore-ba9e541e.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { f as formatStringWithLinks } from './formatStringWithLinks-9e819405.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
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-ba9e541e.js';
3
- import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-a90aa9ae.js';
3
+ import { r as handleFetch, l as localizationStore, u as isValidSelector, t as translate, w as getZCountryUrlParam, x as setZCountryUrlParam, y as currencyDisplay, z as currencyConvertAndFormat, A as currencyConvert, B as currencyFormat } from './cart-b9f15a63.js';
4
4
  import { c as classes } from './classes-0d95c529.js';
5
5
  import { a as logError, l as log } from './logError-c456c092.js';
6
6
  import { g as getHasMoreSpaceOnRight } from './getHasMoreSpaceOnRight-70eb913a.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, H as Host } from './index-3b46f3c3.js';
2
- import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-a90aa9ae.js';
2
+ import { H as localizationStoreUpdateSelectedLocale, t as translate, l as localizationStore } from './cart-b9f15a63.js';
3
3
  import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
4
4
  import { l as languages } from './ILanguage-cd6acb72.js';
5
5
  import './logError-c456c092.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, h, H as Host, d as getElement } from './index-3b46f3c3.js';
2
2
  import { d as zonosStoreFontFamily } from './zonosStore-ba9e541e.js';
3
3
  import { c as classes } from './classes-0d95c529.js';
4
- import { h as stripeStore } from './cart-a90aa9ae.js';
4
+ import { h as stripeStore } from './cart-b9f15a63.js';
5
5
  import { a as logError } from './logError-c456c092.js';
6
6
  import './isDarkColor-f8324c10.js';
7
7
  import './getBorderRadius-947c24de.js';