@odus/checkout 1.16.1 → 1.17.0-beta.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/phone.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as e, _ as t, b as n, h as r, m as i, p as a } from "./shared.js";
1
+ import { V as e, g as t, h as n, m as r, v as i, x as a } from "./shared.js";
2
2
  import { t as o } from "./shared2.js";
3
3
  //#region libs/checkout/src/utils/dom/restoreCursorAfterFormat.util.ts
4
4
  var s = (e, t, n) => {
@@ -10458,29 +10458,29 @@ function xi() {
10458
10458
  var X = (e) => {
10459
10459
  let t = e.toUpperCase().split("").map((e) => 127397 + e.charCodeAt(0));
10460
10460
  return String.fromCodePoint(...t);
10461
- }, Si = (n, r) => {
10462
- let i = Object.values(e);
10463
- return (n?.length ? i.filter((e) => n.includes(e.toUpperCase())) : i).map((e) => {
10461
+ }, Si = (t, n) => {
10462
+ let r = Object.values(e);
10463
+ return (t?.length ? r.filter((e) => t.includes(e.toUpperCase())) : r).map((e) => {
10464
10464
  try {
10465
- let n = bi(e);
10465
+ let t = bi(e);
10466
10466
  return {
10467
10467
  code: e.toUpperCase(),
10468
- name: t(e, r),
10469
- dialCode: `+${n}`,
10468
+ name: i(e, n),
10469
+ dialCode: `+${t}`,
10470
10470
  flag: X(e)
10471
10471
  };
10472
10472
  } catch {
10473
10473
  return null;
10474
10474
  }
10475
- }).filter((e) => e !== null).sort((e, t) => e.name.localeCompare(t.name, r));
10475
+ }).filter((e) => e !== null).sort((e, t) => e.name.localeCompare(t.name, n));
10476
10476
  }, Ci = (e) => {
10477
10477
  try {
10478
- let n = e.toUpperCase(), r = bi(n);
10478
+ let t = e.toUpperCase(), n = bi(t);
10479
10479
  return {
10480
- code: n,
10481
- name: t(n),
10482
- dialCode: `+${r}`,
10483
- flag: X(n)
10480
+ code: t,
10481
+ name: i(t),
10482
+ dialCode: `+${n}`,
10483
+ flag: X(t)
10484
10484
  };
10485
10485
  } catch {
10486
10486
  return null;
@@ -10777,19 +10777,19 @@ var X = (e) => {
10777
10777
  } catch {
10778
10778
  return Infinity;
10779
10779
  }
10780
- }, Oi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" aria-hidden=\"true\"><path d=\"M2 3.5L5 6.5L8 3.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", ki = class extends n {
10780
+ }, Oi = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" aria-hidden=\"true\"><path d=\"M2 3.5L5 6.5L8 3.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>", ki = class extends a {
10781
10781
  _flagDisplay;
10782
10782
  _selectElement;
10783
10783
  _locale;
10784
10784
  constructor(e) {
10785
10785
  super("div", ["country-select-wrapper"]);
10786
- let { countries: t, selectedCode: r, locale: i, styles: a, ariaLabel: o, onChange: s } = e;
10787
- this._locale = i, this._flagDisplay = new n("span", ["country-flag"]), this._flagDisplay.setText(X(r)), this._selectElement = new n("select", ["country-select"]), this._selectElement.setAttribute("aria-label", o);
10786
+ let { countries: t, selectedCode: n, locale: r, styles: i, ariaLabel: o, onChange: s } = e;
10787
+ this._locale = r, this._flagDisplay = new a("span", ["country-flag"]), this._flagDisplay.setText(X(n)), this._selectElement = new a("select", ["country-select"]), this._selectElement.setAttribute("aria-label", o);
10788
10788
  let c = this._selectElement.getElement();
10789
- c.style.fontFamily = `"${a.fontFamily}", sans-serif`, c.style.color = a.textColor, c.style.fontSize = `${a.fontSize}px`, this._buildOptions(t, r), this._selectElement.addEventListener("change", (e) => {
10789
+ c.style.fontFamily = `"${i.fontFamily}", sans-serif`, c.style.color = i.textColor, c.style.fontSize = `${i.fontSize}px`, this._buildOptions(t, n), this._selectElement.addEventListener("change", (e) => {
10790
10790
  s(e.target.value);
10791
10791
  });
10792
- let l = new n("span", ["country-chevron"]);
10792
+ let l = new a("span", ["country-chevron"]);
10793
10793
  l.getElement().innerHTML = Oi, this.appendChild(this._flagDisplay), this.appendChild(l), this.appendChild(this._selectElement);
10794
10794
  }
10795
10795
  setCountry(e) {
@@ -10813,7 +10813,7 @@ var X = (e) => {
10813
10813
  }), n.appendChild(i);
10814
10814
  });
10815
10815
  }
10816
- }, Ai = class extends n {
10816
+ }, Ai = class extends a {
10817
10817
  _countrySelector;
10818
10818
  _inputElement;
10819
10819
  _countryCodeInput;
@@ -10827,21 +10827,21 @@ var X = (e) => {
10827
10827
  _customPlaceholder;
10828
10828
  constructor(e) {
10829
10829
  super("div", ["input-wrapper", "phone-number-field-wrapper"]);
10830
- let { value: t, onChange: a, onBlur: o, onTab: s, checkoutProfile: c, translationFunc: l, defaultCountry: u, allowedCountries: d, locale: f, label: p, placeholder: m } = e;
10831
- this._onChange = a, this._onBlur = o, this._translationFunc = l, this._customPlaceholder = m, this._currentCountryCode = u?.toUpperCase() || "US", this._buildLabel(c, l, p), this._containerElement = this._buildContainer(c), this._countrySelector = this._buildCountrySelector(d, f, c, l), this._containerElement.appendChild(this._countrySelector), this._countryCodeInput = i.createInput("hidden", [], {
10830
+ let { value: r, onChange: i, onBlur: o, onTab: s, checkoutProfile: c, translationFunc: l, defaultCountry: u, allowedCountries: d, locale: f, label: p, placeholder: m } = e;
10831
+ this._onChange = i, this._onBlur = o, this._translationFunc = l, this._customPlaceholder = m, this._currentCountryCode = u?.toUpperCase() || "US", this._buildLabel(c, l, p), this._containerElement = this._buildContainer(c), this._countrySelector = this._buildCountrySelector(d, f, c, l), this._containerElement.appendChild(this._countrySelector), this._countryCodeInput = n.createInput("hidden", [], {
10832
10832
  name: "phoneCountryCode",
10833
10833
  value: this._currentCountryCode
10834
10834
  }), this.appendChild(this._countryCodeInput);
10835
- let h = this._currentCountryCode, { inputElement: g, initialValue: _ } = this._buildInput(c, t, s);
10836
- this._inputElement = g, _ !== t && (this._inputElement.getElement().value = _), this._currentCountryCode !== h && this._syncCountryCodeInput(this._currentCountryCode);
10837
- let v = new n("div", ["phone-input-wrapper"]);
10838
- v.appendChild(this._inputElement), this._containerElement.appendChild(v), this.appendChild(this._containerElement), this._helperText = new r({
10835
+ let h = this._currentCountryCode, { inputElement: g, initialValue: _ } = this._buildInput(c, r, s);
10836
+ this._inputElement = g, _ !== r && (this._inputElement.getElement().value = _), this._currentCountryCode !== h && this._syncCountryCodeInput(this._currentCountryCode);
10837
+ let v = new a("div", ["phone-input-wrapper"]);
10838
+ v.appendChild(this._inputElement), this._containerElement.appendChild(v), this.appendChild(this._containerElement), this._helperText = new t({
10839
10839
  text: e.errorMsg || "",
10840
10840
  visible: e.error
10841
10841
  }), this.appendChild(this._helperText), e.error && this._containerElement.addClass("error");
10842
10842
  }
10843
10843
  _buildLabel(e, t, n) {
10844
- let r = new a({
10844
+ let i = new r({
10845
10845
  styles: {
10846
10846
  color: e.styles.textColor,
10847
10847
  fontSize: e.styles.fontSize
@@ -10849,11 +10849,11 @@ var X = (e) => {
10849
10849
  label: n ?? t("phoneNumber"),
10850
10850
  id: "phoneNumber"
10851
10851
  });
10852
- this.appendChild(r);
10852
+ this.appendChild(i);
10853
10853
  }
10854
10854
  _buildContainer(e) {
10855
- let t = new n("div", ["phone-number-field-container"]), r = t.getElement();
10856
- return r.style.borderRadius = `${e.styles.borderRadius}px`, r.style.setProperty("--phone-border-radius", `${e.styles.borderRadius}px`), t;
10855
+ let t = new a("div", ["phone-number-field-container"]), n = t.getElement();
10856
+ return n.style.borderRadius = `${e.styles.borderRadius}px`, n.style.setProperty("--phone-border-radius", `${e.styles.borderRadius}px`), t;
10857
10857
  }
10858
10858
  _buildCountrySelector(e, t, n, r) {
10859
10859
  return new ki({
@@ -10871,17 +10871,17 @@ var X = (e) => {
10871
10871
  }
10872
10872
  });
10873
10873
  }
10874
- _buildInput(e, t, n) {
10875
- let r = t;
10874
+ _buildInput(e, t, r) {
10875
+ let i = t;
10876
10876
  if (t && t.startsWith("+")) {
10877
10877
  let e = Q(t);
10878
- e && (this._currentCountryCode = e.countryCode, this._countrySelector.setCountry(e.countryCode), r = Z(t, e.countryCode));
10878
+ e && (this._currentCountryCode = e.countryCode, this._countrySelector.setCountry(e.countryCode), i = Z(t, e.countryCode));
10879
10879
  }
10880
- let a = i.createInput("tel", ["form-input"], {
10880
+ let a = n.createInput("tel", ["form-input"], {
10881
10881
  id: "phoneNumber",
10882
10882
  name: "phoneNumber",
10883
10883
  placeholder: this._customPlaceholder ?? $(this._currentCountryCode),
10884
- value: r,
10884
+ value: i,
10885
10885
  autocomplete: "tel",
10886
10886
  maxlength: "30"
10887
10887
  }), o = a.getElement();
@@ -10891,12 +10891,12 @@ var X = (e) => {
10891
10891
  this._containerElement.addClass("focused");
10892
10892
  }), a.addEventListener("blur", (e) => {
10893
10893
  this._containerElement.removeClass("focused"), this._validateInput(this._inputElement.getElement().value, !0), this._onBlur(e);
10894
- }), n && a.addEventListener("keydown", (e) => {
10894
+ }), r && a.addEventListener("keydown", (e) => {
10895
10895
  let t = e;
10896
- t.key === "Tab" && !t.shiftKey && (t.preventDefault(), n());
10896
+ t.key === "Tab" && !t.shiftKey && (t.preventDefault(), r());
10897
10897
  }), {
10898
10898
  inputElement: a,
10899
- initialValue: r
10899
+ initialValue: i
10900
10900
  };
10901
10901
  }
10902
10902
  _handleInput(e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Checkout.service.d.ts","sourceRoot":"","sources":["../../../src/services/checkout/Checkout.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,MAAM,0CAA0C,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAmD7D,cAAM,QAAQ;IACZ,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,C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OAAO,CAAC,UAAU,CAAoB;IACtC,OAAO,CAAC,YAAY,CAAgB;IACpC,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,WAAW,CAAsB;IACzC,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAA2B;IAC5C,OAAO,CAAC,mBAAmB,CAAK;gBAEpB,MAAM,EAAE,cAAc;IAoDlC,OAAO,CAAC,cAAc;IA4Bf,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAkEhC,OAAO,IAAI,IAAI;IAwBtB;;;;;;OAMG;YACW,YAAY;IAmF1B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IA6C7B,OAAO,CAAC,wBAAwB;IAWhC,OAAO,CAAC,gBAAgB;IASjB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IASnC,UAAU,IAAI,IAAI;IASlB,MAAM,CAAC,KAAK,EAAE;QAAE,UAAU,CAAC,EAAE,UAAU,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAmB3D,gBAAgB,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAsIT,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAAG,IAAI;CAGjE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/dist/shared.js CHANGED
@@ -2037,7 +2037,7 @@ var ir = function(e) {
2037
2037
  url: t,
2038
2038
  app: {
2039
2039
  name: "odus-checkout",
2040
- version: "1.16.1",
2040
+ version: "1.17.0-beta.0",
2041
2041
  environment: e.environment === "test" ? "sandbox" : "production"
2042
2042
  },
2043
2043
  isolate: !0,
@@ -5254,6 +5254,6 @@ var mo = (e) => e.replace(/([A-Z])/g, " $1").trim(), ho = Object.fromEntries(Obj
5254
5254
  setMessage(e) {
5255
5255
  return this.messageComponent.setText(e), this;
5256
5256
  }
5257
- };
5257
+ }, Vo = (e) => e.latestTransaction ? e.latestTransaction.status : e.status === "succeeded" ? "authorized" : void 0;
5258
5258
  //#endregion
5259
- export { Ci as $, Ra as A, fa as B, Qa as C, Ha as D, Wa as E, Ma as F, Xi as G, ra as H, Ea as I, ki as J, Hi as K, xa as L, Ia as M, Fa as N, Va as O, Na as P, Si as Q, ya as R, io as S, Ya as T, ea as U, la as V, $i as W, Di as X, Ei as Y, Oi as Z, bo as _, p as _t, No as a, mi as at, Q as b, Ao as c, C as ct, Eo as d, c as dt, yi as et, To as f, n as ft, xo as g, o as gt, So as h, i as ht, Fo as i, hi as it, La as j, za as k, $ as l, T as lt, Co as m, r as mt, zo as n, pi as nt, Mo as o, D as ot, wo as p, u as pt, Vi as q, Lo as r, Z as rt, jo as s, w as st, Bo as t, fi as tt, Oo as u, x as ut, co as v, s as vt, Xa as w, so as x, po as y, ba as z };
5259
+ export { Si as $, za as A, ba as B, io as C, Wa as D, Ya as E, Na as F, $i as G, la as H, Ma as I, Vi as J, Xi as K, Ea as L, La as M, Ia as N, Ha as O, Fa as P, Oi as Q, xa as R, so as S, Xa as T, ra as U, fa as V, ea as W, Ei as X, ki as Y, Di as Z, xo as _, o as _t, Fo as a, hi as at, po as b, jo as c, w as ct, Oo as d, x as dt, Ci as et, Eo as f, c as ft, So as g, i as gt, Co as h, r as ht, Lo as i, Z as it, Ra as j, Va as k, Ao as l, C as lt, wo as m, u as mt, Bo as n, fi as nt, No as o, mi as ot, To as p, n as pt, Hi as q, zo as r, pi as rt, Mo as s, D as st, Vo as t, yi as tt, $ as u, T as ut, bo as v, p as vt, Qa as w, Q as x, co as y, s as yt, ya as z };
@@ -25,7 +25,8 @@ export interface Payment {
25
25
  statementDescriptor: string;
26
26
  paymentMethod: PaymentMethod;
27
27
  latestMessage?: string;
28
- latestTransaction: Transaction;
28
+ /** `null` on a zero-amount payment the API settled without a processor. */
29
+ latestTransaction: Transaction | null;
29
30
  action: Action;
30
31
  checkoutKey: string;
31
32
  transactions: Transaction[];
@@ -1 +1 @@
1
- {"version":3,"file":"Payment.type.d.ts","sourceRoot":"","sources":["../../../src/types/payment/Payment.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,SAAS,EAAE,UAAU,GAAG,MAAM,CAAC;IAC/B,aAAa,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,WAAW,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,UAAU,IAAI;IACZ,SAAS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AAED,UAAU,MAAM;IACd,WAAW,EAAE,MAAM,CAAC;IAEpB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC"}
@@ -0,0 +1,12 @@
1
+ import { Payment } from '../../types/payment/Payment.type';
2
+ import { PaymentResult } from '../../types/payment/PaymentResult.type';
3
+ /**
4
+ * The outcome of an authorization, read from the payment's latest transaction.
5
+ *
6
+ * A payment can succeed without one: the API settles a zero-amount payment it
7
+ * has nothing to verify without ever calling a processor. That payment is
8
+ * reported as authorized rather than read through a missing transaction, which
9
+ * used to throw and leave the shopper on a sheet that never finished.
10
+ */
11
+ export declare const readPaymentResult: (payment: Payment) => PaymentResult | undefined;
12
+ //# sourceMappingURL=paymentResult.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paymentResult.util.d.ts","sourceRoot":"","sources":["../../../src/utils/helpers/paymentResult.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAE5E;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,GAC5B,SAAS,OAAO,KACf,aAAa,GAAG,SAMlB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odus/checkout",
3
- "version": "1.16.1",
3
+ "version": "1.17.0-beta.0",
4
4
  "displayName": "ODUS Checkout SDK",
5
5
  "keywords": [
6
6
  "odus",