@zonos/elements 1.3.292 → 1.3.293

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 (44) hide show
  1. package/dist/cjs/{collect-Oeo5tjN5.js → collect-DnrvaXUI.js} +24 -4
  2. package/dist/cjs/index.cjs.js +30 -8
  3. package/dist/cjs/zonos-address-completion-dialog_7.cjs.entry.js +1 -1
  4. package/dist/cjs/zonos-airwallex-payment.cjs.entry.js +1 -1
  5. package/dist/cjs/zonos-collect-finish_6.cjs.entry.js +1 -1
  6. package/dist/cjs/zonos-collect.cjs.entry.js +1 -1
  7. package/dist/cjs/zonos-controller.cjs.entry.js +9 -0
  8. package/dist/collection/components/utils/checkout/injectDomesticElementHideStyle.js +9 -0
  9. package/dist/collection/scripts/_stripe.js +23 -1
  10. package/dist/esm/{collect-CdrR5OBy.js → collect-Eo4gtyql.js} +24 -4
  11. package/dist/esm/index.js +30 -8
  12. package/dist/esm/zonos-address-completion-dialog_7.entry.js +1 -1
  13. package/dist/esm/zonos-airwallex-payment.entry.js +1 -1
  14. package/dist/esm/zonos-collect-finish_6.entry.js +1 -1
  15. package/dist/esm/zonos-collect.entry.js +1 -1
  16. package/dist/esm/zonos-controller.entry.js +9 -0
  17. package/dist/esm-es5/{collect-CdrR5OBy.js → collect-Eo4gtyql.js} +4 -2
  18. package/dist/esm-es5/index.js +6 -6
  19. package/dist/esm-es5/zonos-address-completion-dialog_7.entry.js +1 -1
  20. package/dist/esm-es5/zonos-airwallex-payment.entry.js +1 -1
  21. package/dist/esm-es5/zonos-collect-finish_6.entry.js +1 -1
  22. package/dist/esm-es5/zonos-collect.entry.js +1 -1
  23. package/dist/esm-es5/zonos-controller.entry.js +6 -0
  24. package/dist/scripts/index.js +1 -1
  25. package/dist/scripts/loadZonos.js +1 -1
  26. package/dist/scripts/zonos.js +1 -1
  27. package/dist/zonos-elements/index.esm.js +1 -1
  28. package/dist/zonos-elements/{p-e0e9cff5.system.entry.js → p-06030d3b.system.entry.js} +6 -0
  29. package/dist/zonos-elements/{p-DzLNk-Pf.js → p-0mGRBGcf.js} +1 -1
  30. package/dist/zonos-elements/{p-552fbde1.system.entry.js → p-155ed3d3.system.entry.js} +6 -6
  31. package/dist/zonos-elements/{p-04bded81.system.entry.js → p-31043c2e.system.entry.js} +1 -1
  32. package/dist/zonos-elements/{p-938fc1e4.entry.js → p-3a2da031.entry.js} +1 -1
  33. package/dist/zonos-elements/{p-b2dd7f02.system.entry.js → p-5967a1c1.system.entry.js} +1 -1
  34. package/dist/zonos-elements/{p-c5bab786.entry.js → p-725e29bb.entry.js} +1 -1
  35. package/dist/zonos-elements/{p-c3646ae6.system.entry.js → p-7bd99479.system.entry.js} +3 -3
  36. package/dist/zonos-elements/p-Bu9WCfUC.system.js +1 -1
  37. package/dist/zonos-elements/{p-DNc279vN.system.js → p-CZD8WvyY.system.js} +33 -31
  38. package/dist/zonos-elements/{p-y7PFdTUN.system.js → p-D6qXIvFm.system.js} +52 -52
  39. package/dist/zonos-elements/{p-6e296228.entry.js → p-ad9ff14c.entry.js} +1 -1
  40. package/dist/zonos-elements/p-c9d5d8f1.entry.js +1 -0
  41. package/dist/zonos-elements/{p-550d4eea.entry.js → p-d8b312e5.entry.js} +1 -1
  42. package/dist/zonos-elements/zonos-elements.esm.js +1 -1
  43. package/package.json +6 -4
  44. package/dist/zonos-elements/p-82595838.entry.js +0 -1
@@ -2047,7 +2047,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
2047
2047
  var e = new Error(message);
2048
2048
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
2049
2049
  };
2050
- var version = "1.35.0";
2050
+ var version = "1.35.1";
2051
2051
  var packageJson = {
2052
2052
  version: version};
2053
2053
 
@@ -2146,7 +2146,8 @@ var SDK_URL_MAPPING = {
2146
2146
  payments: '/assets/elements.bundle.min.js',
2147
2147
  sca: '/hosted-sca/sdk/v1/index.js',
2148
2148
  taxForm: '/widgets/taxForm/sdk/v1/index.js',
2149
- billing: '/widgets/checkout/sdk/v1/index.js'
2149
+ billing: '/widgets/checkout/sdk/v1/index.js',
2150
+ balance: '/widgets/embedded-balance/sdk/v1/index.js'
2150
2151
  };
2151
2152
  var ELEMENT_TO_SDK = {
2152
2153
  // legacy
@@ -2180,7 +2181,16 @@ var ELEMENT_TO_SDK = {
2180
2181
  scaManagement: 'sca',
2181
2182
  taxForm: 'taxForm',
2182
2183
  // billing elements
2183
- embeddedCheckout: 'billing'
2184
+ embeddedCheckout: 'billing',
2185
+ // balance elements
2186
+ balanceOverview: 'balance',
2187
+ balanceDetail: 'balance',
2188
+ balanceActivities: 'balance',
2189
+ balanceActivityDetails: 'balance',
2190
+ balanceHistoryChart: 'balance',
2191
+ balanceInfo: 'balance',
2192
+ balanceScheduledTransactions: 'balance',
2193
+ balanceList: 'balance'
2184
2194
  };
2185
2195
  var ELEMENT_GROUP_TO_ELEMENT = {
2186
2196
  payments: [
@@ -2209,7 +2219,17 @@ var ELEMENT_GROUP_TO_ELEMENT = {
2209
2219
  'lendingRfi',
2210
2220
  'mrmRfi',
2211
2221
  ],
2212
- billing: ['embeddedCheckout']
2222
+ billing: ['embeddedCheckout'],
2223
+ balance: [
2224
+ 'balanceOverview',
2225
+ 'balanceDetail',
2226
+ 'balanceActivities',
2227
+ 'balanceHistoryChart',
2228
+ 'balanceInfo',
2229
+ 'balanceScheduledTransactions',
2230
+ 'balanceList',
2231
+ 'balanceActivityDetails',
2232
+ ]
2213
2233
  };
2214
2234
  var SDK_DEPENDENCIES = {
2215
2235
  billing: ['payments']
@@ -131,7 +131,7 @@ const getZonosQaUrl = () => {
131
131
  return null;
132
132
  }
133
133
  const qaUrl = extractZonosQaUrl(window.location.href);
134
- const cdnUrl = "https://v1.3.292.js.zonos.com";
134
+ const cdnUrl = "https://v1.3.293.js.zonos.com";
135
135
  // when the qaUrl is not set and the built URL is from the test domain, use the test domain for testing
136
136
  if (!qaUrl &&
137
137
  (cdnUrl.includes('test.') ||
@@ -185,8 +185,10 @@ const getZonosQaUrl = () => {
185
185
 
186
186
  /* eslint-disable no-console */
187
187
  /** Loading stripe script extracted from stripe.js repository */
188
+ const STRIPE_API_VERSION = '2025-02-24.acacia';
188
189
  const V3_URL = 'https://js.stripe.com/v3';
189
190
  const V3_URL_REGEX = /^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/;
191
+ const V3_VERSION = 3;
190
192
  const EXISTING_SCRIPT_MESSAGE = 'loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used';
191
193
  const zonosStripeFindScript = () => {
192
194
  const scripts = document.querySelectorAll(`script[src^="${V3_URL}"]`);
@@ -264,11 +266,31 @@ const registerWrapper = (stripe, startTime) => {
264
266
  }
265
267
  stripe._registerWrapper({ name: 'stripe-js', startTime });
266
268
  };
269
+ const getStripeVersion = (stripeConstructor) => {
270
+ if (!('version' in stripeConstructor)) {
271
+ return;
272
+ }
273
+ const { version } = stripeConstructor;
274
+ return typeof version === 'number' || typeof version === 'string'
275
+ ? version
276
+ : undefined;
277
+ };
267
278
  const initStripe = (maybeStripe, args, startTime) => {
268
279
  if (maybeStripe === null) {
269
280
  return null;
270
281
  }
271
- const stripe = maybeStripe.apply(undefined, args);
282
+ const [publishableKey, callerOptions] = args;
283
+ const options = Object.assign({}, callerOptions);
284
+ const stripeVersion = getStripeVersion(maybeStripe);
285
+ const isNamedRelease = typeof stripeVersion === 'string' &&
286
+ stripeVersion !== V3_VERSION.toString();
287
+ if (isNamedRelease) {
288
+ delete options.apiVersion;
289
+ }
290
+ else {
291
+ options.apiVersion = STRIPE_API_VERSION;
292
+ }
293
+ const stripe = maybeStripe(publishableKey, options);
272
294
  registerWrapper(stripe, startTime);
273
295
  return stripe;
274
296
  };
@@ -394,10 +416,10 @@ const zonosLoadUrl = (() => {
394
416
  return null;
395
417
  })();
396
418
  const startLoadTime = Date.now();
397
- const ZONOS_URL = "https://v1.3.292.js.zonos.com";
398
- const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.292";
399
- const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.292";
400
- const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.292";
419
+ const ZONOS_URL = "https://v1.3.293.js.zonos.com";
420
+ const JS_DELIVR_ZONOS_URL = zonosLoadUrl || "https://cdn.jsdelivr.net/npm/@zonos/elements@1.3.293";
421
+ const UNPKG_ZONOS_URL = "https://unpkg.com/@zonos/elements@1.3.293";
422
+ const CDNJS_ZONOS_URL = "https://cdnjs.cloudflare.com/ajax/libs/zonos-elements/1.3.293";
401
423
  const GOOGLE_FONT_URL = 'https://fonts.googleapis.com';
402
424
  const GOOGLE_FONT_REGEX = /^https:\/\/fonts\.googleapis\.com/;
403
425
  class Zonos {
@@ -415,7 +437,7 @@ Zonos.iframeLogType = typeof window !== 'undefined'
415
437
  ? new URLSearchParams(window.location.search).get('iframeLogType')
416
438
  : null;
417
439
  Zonos.isBigCommerce = false;
418
- Zonos.releaseDate = "1791222618677";
440
+ Zonos.releaseDate = "1792077383128";
419
441
  Zonos.isLegacyCheckout = false;
420
442
  Zonos.googleAnalyticId = null;
421
443
  Zonos.googleAnalyticReady = false;
@@ -440,7 +462,7 @@ Zonos.isNpm = true;
440
462
  Zonos.zonosQaUrl = null;
441
463
  Zonos.zonosQaUrlApi = null;
442
464
  Zonos.trackEventLogs = [];
443
- Zonos.version = `v${"1.3.292"}`;
465
+ Zonos.version = `v${"1.3.293"}`;
444
466
  Zonos.modeAlerted = false;
445
467
  Zonos.cartData = null;
446
468
  Zonos.paypal = null;