@odus/checkout 1.19.7 → 1.19.8

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.
@@ -1,6 +1,6 @@
1
- import { $ as e, A as t, B as n, C as r, E as i, F as a, I as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, S as ee, St as te, T as ne, U as re, V as g, W as ie, X as _, Y as ae, Z as oe, _ as se, _t as v, at as ce, b as y, bt as b, c as le, ct as ue, d as de, dt as x, et as fe, f as S, ft as C, g as w, gt as T, h as E, ht as D, i as pe, it as me, j as he, k as ge, l as _e, lt as O, mt as k, n as ve, nt as ye, o as be, ot as A, p as j, pt as M, q as N, r as xe, s as Se, st as P, t as Ce, tt as F, u as I, ut as we, vt as L, w as R, x as z, xt as Te, y as B, yt as V, z as H } from "./shared.js";
2
- import { t as U } from "./shared2.js";
3
- //#region libs/checkout/src/utils/focus/FocusManager.ts
1
+ import { $ as e, A as t, B as n, C as r, E as i, F as a, I as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, S as ee, St as te, T as ne, U as re, V as g, W as ie, X as _, Y as ae, Z as oe, _ as se, _t as v, at as ce, b as y, bt as b, c as le, ct as ue, d as de, dt as x, et as fe, f as S, ft as C, g as w, gt as T, h as E, ht as D, i as pe, it as me, j as he, k as ge, l as _e, lt as O, mt as k, n as ve, nt as ye, o as be, ot as A, p as j, pt as M, q as N, r as xe, s as Se, st as P, t as Ce, tt as F, u as I, ut as we, vt as L, w as R, x as z, xt as Te, y as B, yt as V, z as H } from "./shared2.js";
2
+ import { t as U } from "./shared3.js";
3
+ // libs/checkout/src/utils/focus/FocusManager.ts
4
4
  var Ee = class {
5
5
  focusSequence = [
6
6
  "cardNumber",
@@ -79,8 +79,7 @@ var Ee = class {
79
79
  }
80
80
  }
81
81
  };
82
- //#endregion
83
- //#region libs/checkout/src/utils/helpers/hasAddressConfiguration.util.ts
82
+ // libs/checkout/src/utils/helpers/hasAddressConfiguration.util.ts
84
83
  function De(e) {
85
84
  if (!e) return !1;
86
85
  let { billingFields: t, shippingFields: n } = e, r = t && Object.values(t).some((e) => e?.enabled), i = n && Object.values(n).some((e) => e?.enabled);
@@ -91,8 +90,7 @@ function W(e) {
91
90
  let { billingFields: t, shippingFields: n } = e, r = t?.firstName?.enabled && t?.lastName?.enabled, i = n?.firstName?.enabled && n?.lastName?.enabled;
92
91
  return !!(r || i);
93
92
  }
94
- //#endregion
95
- //#region libs/checkout/src/components/checkout/form/AddressSection.ts
93
+ // libs/checkout/src/components/checkout/form/AddressSection.ts
96
94
  var G = class extends z {
97
95
  inputs = /* @__PURE__ */ new Map();
98
96
  type;
@@ -677,8 +675,7 @@ function Pe(e, t) {
677
675
  let n = `buttonTexts.${e?.layout?.actionButton?.translationKey || q}`, r = t(n);
678
676
  return r === n ? t(`buttonTexts.${q}`) : r;
679
677
  }
680
- //#endregion
681
- //#region libs/checkout/src/components/checkout/form/FormComponentManager.ts
678
+ // libs/checkout/src/components/checkout/form/FormComponentManager.ts
682
679
  var Fe = class {
683
680
  formElement;
684
681
  focusManager;
@@ -1504,7 +1501,7 @@ var Q = (e) => ({
1504
1501
  this.vgsService === e && (console.error("Failed to load VGS Collect:", t), this.failCardCaptureClosed(D.INIT_FAILED));
1505
1502
  });
1506
1503
  }
1507
- this.componentManager.removePaymentMethods(), this.componentManager.updatePaymentDetails(e, t, r), (!i || !a) && this.failCardCaptureClosed(D.NO_TOKENIZATION_SESSION);
1504
+ this.componentManager.removePaymentMethods(), this.componentManager.updatePaymentDetails(e, t, r), i && a || this.failCardCaptureClosed(D.NO_TOKENIZATION_SESSION);
1508
1505
  let o = this.checkoutProfile.getState();
1509
1506
  if (o.checkoutProfile) {
1510
1507
  let { formData: e } = this._getFormStateData();
@@ -1795,8 +1792,6 @@ var Q = (e) => ({
1795
1792
  Object.assign(this._callbacks, e);
1796
1793
  }
1797
1794
  };
1798
- //#endregion
1799
- //#region libs/checkout/src/index.ts
1795
+ // libs/checkout/src/index.ts
1800
1796
  typeof globalThis < "u" && (globalThis.OdusCheckout = $);
1801
- //#endregion
1802
1797
  export { $ as OdusCheckout, a as deLocale, p as enLocale, d as esLocale, u as frLocale, he as itLocale, t as plLocale, ge as ptLocale, A as pushError, P as pushEvent, ue as pushLog, O as pushMeasurement, f as trLocale };
@@ -1,5 +1,5 @@
1
- import { $ as e, B as t, C as n, D as r, E as i, G as a, J as o, K as s, L as c, Q as l, R as u, S as ee, St as d, T as te, V as f, W as ne, X as p, Y as re, Z as ie, _ as ae, _t as m, a as oe, at as se, b as ce, bt as h, c as le, d as g, dt as _, et as v, f as y, gt as b, ht as x, i as ue, it as de, l as fe, lt as S, n as C, nt as w, o as pe, ot as T, p as E, pt as D, q as me, r as he, rt as ge, s as _e, st as O, t as ve, ut as ye, vt as k, xt as be, y as xe, yt as A, z as j } from "./shared.js";
2
- //#region libs/checkout/src/assets/styles/helperText.css?inline
1
+ import { $ as e, B as t, C as n, D as r, E as i, G as a, J as o, K as s, L as c, Q as l, R as u, S as ee, St as d, T as te, V as f, W as ne, X as p, Y as re, Z as ie, _ as ae, _t as m, a as oe, at as se, b as ce, bt as h, c as le, d as g, dt as _, et as v, f as y, gt as b, ht as x, i as ue, it as de, l as fe, lt as S, n as C, nt as w, o as pe, ot as T, p as E, pt as D, q as me, r as he, rt as ge, s as _e, st as O, t as ve, ut as ye, vt as k, xt as be, y as xe, yt as A, z as j } from "./shared2.js";
2
+ // libs/checkout/src/assets/styles/helperText.css?inline
3
3
  var M = ".form-helper-text-anchor{height:var(--odus-helper-text-space,4px);z-index:3;position:relative}.form-helper-text{color:#dc2727;font-family:var(--odus-font-family,inherit);font-size:12px;font-weight:500;line-height:var(--odus-helper-text-line-height,14px);background:var(--odus-color-background,#fff);pointer-events:none;transition:opacity .2s ease-in-out;display:block;position:absolute;top:2px;left:0;right:0}.form-helper-text-hidden{opacity:0;visibility:hidden}.form-helper-text-hint{color:var(--odus-color-muted,#6b7280);font-weight:400}", N = ".input-wrapper{box-sizing:border-box;flex-direction:column;align-items:stretch;width:100%;min-width:0;display:flex}.input-wrapper *{box-sizing:border-box}.form-input{opacity:1;font-size:var(--odus-input-font-size,16px);font-weight:var(--odus-input-font-weight,400);letter-spacing:var(--odus-input-letter-spacing,.02em);box-shadow:0 0 0 1px var(--odus-border-color,#e0e0e0), 0 2px 4px 0 #00000012, 0 1px 1.5px 0 #0000000d;background:var(--odus-color-background,#fff);padding:var(--odus-input-padding,8px 12px);line-height:var(--odus-input-line-height,1.5);z-index:0;box-sizing:border-box;border:none;outline:none;flex:1;width:100%;min-height:0;transition:box-shadow .1s ease-in,border-radius .2s ease-in}.form-input[name=cardNumber]{padding-right:100px}.form-input-error{box-shadow:0 0 0 1px var(--odus-color-error,#dc2727), 0 2px 4px 0 #00000012, 0 1px 1.5px 0 #0000000d}.form-input::placeholder{color:var(--odus-input-placeholder-color,#717173);opacity:var(--odus-input-placeholder-opacity,.3)}.form-input:focus{z-index:2;position:relative;box-shadow:0 0 0 1px #3297d3b3,0 1px 1px #00000012,0 0 0 4px #3297d34d}", P = ".input-label{font-family:var(--odus-font-family,inherit);font-size:var(--odus-label-font-size,14px);font-weight:var(--odus-label-font-weight,400);color:var(--odus-label-color,var(--odus-color-text,#1a1a1a));letter-spacing:var(--odus-label-letter-spacing,normal);line-height:var(--odus-label-line-height,1.4);margin-bottom:var(--odus-label-margin-bottom,6px)}", F = (e) => "adoptedStyleSheets" in e, Se = (e, t) => {
4
4
  let n = (e.nodeType === Node.DOCUMENT_NODE ? e : e.ownerDocument)?.defaultView?.CSSStyleSheet;
5
5
  if (!n) return null;
@@ -1460,7 +1460,7 @@ var Oe = class {
1460
1460
  });
1461
1461
  }
1462
1462
  _settleLoad() {
1463
- this._allElements().some((e) => e.isMounted && (e !== this._card || this._card.captureState !== "unsupported")) && (this._paymentState.cardCapture === "unsupported" || !this._card?.isMounted || this._cardFieldsReady) && (!this._phone?.isMounted || this._phone.isDrawn) && this._readiness.ready();
1463
+ !this._allElements().some((e) => e.isMounted && (e !== this._card || this._card.captureState !== "unsupported")) || this._paymentState.cardCapture !== "unsupported" && this._card?.isMounted && !this._cardFieldsReady || this._phone?.isMounted && !this._phone.isDrawn || this._readiness.ready();
1464
1464
  }
1465
1465
  _allElements() {
1466
1466
  return [
@@ -1569,5 +1569,4 @@ var Oe = class {
1569
1569
  return typeof n?.message == "string" && n.message ? n.message : a(n?.details) ?? t;
1570
1570
  }
1571
1571
  };
1572
- //#endregion
1573
1572
  export { z as AddressCityElement, V as AddressCountryElement, H as AddressFirstNameElement, U as AddressLastNameElement, W as AddressStateElement, G as AddressStreetElement, K as AddressZipCodeElement, q as ApplePayElement, R as BaseElement, Z as CardElement, Q as CardholderElement, je as EmailElement, Ne as ErrorElement, Ue as OdusElements, Ie as PayPalElement, $ as PhoneElement };
package/dist/loader.es.js CHANGED
@@ -1,5 +1,5 @@
1
- //#region libs/checkout/src/loader/loadOdus.ts
2
- var e = "https://js.odus.com", t = "1.19.7", n = {
1
+ // libs/checkout/src/loader/loadOdus.ts
2
+ var e = "https://js.odus.com", t = "1.19.8", n = {
3
3
  test: "https://sandbox-analytics.odus.com/collect",
4
4
  live: "https://analytics.odus.com/collect"
5
5
  }, r = {
@@ -86,5 +86,4 @@ function d(n, r = {}) {
86
86
  let a = r.version ? `${e}/r/${r.version}/${n}.js` : `${e}/${r.channel === "beta" ? i.beta : i.stable}/${n}.js?min=${t}`, s = `${a} ${r.integrity ?? ""}`, l = o.get(s);
87
87
  return l || (l = u(n, a, r), o.set(s, l), l.catch(() => o.delete(s))), l;
88
88
  }
89
- //#endregion
90
89
  export { a as OdusLoadError, e as RUNTIME_ORIGIN, d as loadOdus };