@ranty/ranty-sdk 2.18.0-beta.11 → 2.18.0-beta.12

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.
@@ -916,7 +916,8 @@ function oe(t) {
916
916
  */
917
917
  var G0;
918
918
  ((G0 = window.HTMLSlotElement) === null || G0 === void 0 ? void 0 : G0.prototype.assignedElements) != null;
919
- const lE = "@nx-ranty/ranty-sdk", dE = "2.18.0-beta.11", cE = "Ranty sdk", AE = "dist/index.js", uE = {
919
+ var Le = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.CLICK_TO_PAY = "CLICK_TO_PAY", t.CARD_ON_FILE = "CARD_ON_FILE", t.ACCOUNT_TO_ACCOUNT = "ACCOUNT_TO_ACCOUNT", t.ACCOUNT_TO_ACCOUNT_FEEDBACK = "ACCOUNT_TO_ACCOUNT_FEEDBACK", t))(Le || {});
920
+ const lE = "@ranty/ranty-sdk", dE = "2.18.0-beta.12", cE = "Ranty sdk", AE = "dist/index.js", uE = {
920
921
  ".": "./dist/index.js"
921
922
  }, pE = "types/index.d.ts", gE = [
922
923
  "dist",
@@ -1026,6 +1027,9 @@ let pd = class t extends qe {
1026
1027
  constructor() {
1027
1028
  super(...arguments), this.image = "https://ranty-sdk-js.naranjax.com/images/nave-logo.png", this.icon = "https://ranty-sdk-js.naranjax.com/images/popup.svg", this.enableVersion = "", this.mode = "default";
1028
1029
  }
1030
+ get textFooter() {
1031
+ return this.mode === Le.CARD_ON_FILE.toLowerCase() ? "Procesado y almacenado por" : "Procesado por";
1032
+ }
1029
1033
  firstUpdated(e) {
1030
1034
  return we(this, null, function* () {
1031
1035
  ur(t.prototype, this, "firstUpdated").call(this, e), this.enableVersion = BE.version;
@@ -1037,7 +1041,7 @@ let pd = class t extends qe {
1037
1041
  ${this.enableVersion ? P`<p class="version">Versión: ${this.enableVersion}</p>` : ""}
1038
1042
  <div class="footer-container">
1039
1043
  <a class="footer-link" href="https://navenegocios.ar/home" target="_blank">
1040
- <span class="footer-text">Procesado por</span>
1044
+ <span class="footer-text">${this.textFooter}</span>
1041
1045
  <img alt="nave" src=${this.image} class="footer-icon" />
1042
1046
  <img alt="nave" src=${this.icon} />
1043
1047
  </a>
@@ -9360,10 +9364,10 @@ function fU(t, e, r, s) {
9360
9364
  }
9361
9365
  var Ou = qF(fU);
9362
9366
  hI(hl(), "DD_LOGS", Ou);
9363
- const yU = "@nx-ranty/ranty-sdk", vU = "2.18.0-beta.11", bU = 2, wU = !0, xU = {
9367
+ const yU = "@ranty/ranty-sdk", vU = "2.18.0-beta.12", bU = 2, wU = !0, xU = {
9364
9368
  "": {
9365
- name: "@nx-ranty/ranty-sdk",
9366
- version: "2.18.0-beta.11",
9369
+ name: "@ranty/ranty-sdk",
9370
+ version: "2.18.0-beta.12",
9367
9371
  license: "ISC",
9368
9372
  dependencies: {
9369
9373
  "@datadog/browser-logs": "^5.7.0",
@@ -46609,9 +46613,7 @@ let TU = Hy;
46609
46613
  const eo = (t, e) => we(void 0, null, function* () {
46610
46614
  const { order_id: r, platform: s } = t.additional_info;
46611
46615
  return (yield TU.getInstallmentPlans(r, t.id, s, e)).response.data;
46612
- }), PU = (t, e, r) => (pe.info("getInstallmentFromCard", { tag: "GET_INSTALLMENT_PLANS_FROM_CARD" }), (t == null ? void 0 : t.cards.find((n) => n.type === r && n.name === e)).installment_plans);
46613
- var Le = /* @__PURE__ */ ((t) => (t.DEFAULT = "DEFAULT", t.CLICK_TO_PAY = "CLICK_TO_PAY", t.CARD_ON_FILE = "CARD_ON_FILE", t.ACCOUNT_TO_ACCOUNT = "ACCOUNT_TO_ACCOUNT", t.ACCOUNT_TO_ACCOUNT_FEEDBACK = "ACCOUNT_TO_ACCOUNT_FEEDBACK", t))(Le || {});
46614
- const yd = class extends EventTarget {
46616
+ }), PU = (t, e, r) => (pe.info("getInstallmentFromCard", { tag: "GET_INSTALLMENT_PLANS_FROM_CARD" }), (t == null ? void 0 : t.cards.find((n) => n.type === r && n.name === e)).installment_plans), yd = class extends EventTarget {
46615
46617
  static convertTime(e, r) {
46616
46618
  return r === "seconds" ? e * 1e3 : e * 60 * 1e3;
46617
46619
  }
@@ -61479,7 +61481,7 @@ const PO = `@import"normalize.css";form{margin:inherit}.clickeable{cursor:pointe
61479
61481
  o.appendChild(a);
61480
61482
  }
61481
61483
  }
61482
- }, P3 = "validations-scof", Bb = (t) => ({ validate: (e) => /^[a-zA-Z\s]+$/.test(e), errorMessage: t }), Cb = (t) => ({ validate: (e) => !/^\s+$/.test(e), errorMessage: t }), Ms = (t) => ({
61484
+ }, P3 = "validations-scof", Bb = (t) => ({ validate: (e) => /^[a-záéíóúüñA-ZÁÉÍÓÚÜÑ\s]*$/.test(e), errorMessage: t }), Cb = (t) => ({ validate: (e) => !/^\s+$/.test(e), errorMessage: t }), Ms = (t) => ({
61483
61485
  validate: (e) => e.trim() !== "",
61484
61486
  errorMessage: t
61485
61487
  }), Eb = (t = "Revisá el email, está incompleto.") => ({
@@ -63505,7 +63507,7 @@ let xi = class extends qe {
63505
63507
  payment_request_id: (e = this.stateScof.statePaymentRequest) == null ? void 0 : e.id,
63506
63508
  payment_request_status: this.statusMessage,
63507
63509
  card_name: t.transactions[0].payment_method ? t.transactions[0].payment_method.name : "no_card_name",
63508
- card_type: t.transactions[0].payment_method.card_type ? t.transactions[0].payment_method.card_type : "no_card_type",
63510
+ card_type: t.transactions[0].payment_method ? t.transactions[0].payment_method.card_type : "no_card_type",
63509
63511
  payment_type: t.payment_type
63510
63512
  }
63511
63513
  }), Qt.setEndPaymentTime());
@@ -64100,7 +64102,6 @@ let bn = class extends qe {
64100
64102
  name="creditNumber"
64101
64103
  label="Número de tarjeta"
64102
64104
  .maxlength="${19}"
64103
- autocomplete="cc-number"
64104
64105
  .validationRules="${[
64105
64106
  Ms("Tenés que completar el número de la tarjeta."),
64106
64107
  Vn(16, "Revisá el número de la tarjeta, está incompleto.", !0),
@@ -64139,7 +64140,6 @@ let bn = class extends qe {
64139
64140
  id="expired"
64140
64141
  .maxlength="${5}"
64141
64142
  label="Vencimiento"
64142
- autocomplete="cc-csc"
64143
64143
  .validationRules="${[
64144
64144
  Ms("Tenés que completar el vencimiento."),
64145
64145
  LO(),
@@ -64155,7 +64155,6 @@ let bn = class extends qe {
64155
64155
  id="cvv"
64156
64156
  .maxlength="${3}"
64157
64157
  label="Código de seguridad"
64158
- autocomplete="cc-csc"
64159
64158
  .validationRules="${[
64160
64159
  Ms("Tenés que completar el código."),
64161
64160
  Vn(3, "Revisá el código."),
@@ -64515,6 +64514,10 @@ let qo = class extends qe {
64515
64514
  var t, e, r;
64516
64515
  return (t = this.getBuyer) != null && t.doc_number && ((e = this.getBuyer) == null ? void 0 : e.doc_number.length) >= 6 ? (r = this.getBuyer) == null ? void 0 : r.doc_number : "";
64517
64516
  }
64517
+ get name() {
64518
+ var t, e;
64519
+ return (t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name.replace(/[^a-záéíóúüñA-ZÁÉÍÓÚÜÑ\s]/g, "") : "";
64520
+ }
64518
64521
  firstUpdated(t) {
64519
64522
  var e;
64520
64523
  super.firstUpdated(t), pe.info("firstUpdated", {
@@ -64599,7 +64602,7 @@ let qo = class extends qe {
64599
64602
  }), this.isValidForm = e, this.holder.doc_type = this.isDni ? "DNI" : "PASAPORTE";
64600
64603
  }
64601
64604
  renderHTML() {
64602
- var t, e, r, s;
64605
+ var t, e;
64603
64606
  return P`
64604
64607
  <form @input="${this.validateForm}">
64605
64608
  <scof-input
@@ -64612,14 +64615,14 @@ let qo = class extends qe {
64612
64615
  Bb("El nombre solo puede contener letras y espacios."),
64613
64616
  Cb("El nombre no puede estar en blanco.")
64614
64617
  ]}"
64615
- .value="${(t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name : ""}"
64618
+ .value="${this.name}"
64616
64619
  ></scof-input>
64617
64620
  <scof-input
64618
64621
  name="user_email"
64619
64622
  label="Email"
64620
64623
  type="email"
64621
64624
  .validationRules="${[Ms("Tenés que completar el mail."), Eb()]}"
64622
- .value="${(r = this.getBuyer) != null && r.user_email ? (s = this.getBuyer) == null ? void 0 : s.user_email : ""}"
64625
+ .value="${(t = this.getBuyer) != null && t.user_email ? (e = this.getBuyer) == null ? void 0 : e.user_email : ""}"
64623
64626
  ></scof-input>
64624
64627
 
64625
64628
  <div class="panel-id-selection">
@@ -65665,7 +65668,7 @@ let Ho = class extends qe {
65665
65668
  payment_request_id: (e = this._statePaymentManualInput.statePaymentRequest) == null ? void 0 : e.id,
65666
65669
  payment_request_status: this.statusMessage,
65667
65670
  card_name: t.transactions[0].payment_method ? t.transactions[0].payment_method.name : "no_card_name",
65668
- card_type: t.transactions[0].payment_method.card_type ? t.transactions[0].payment_method.card_type : "no_card_type",
65671
+ card_type: t.transactions[0].payment_method ? t.transactions[0].payment_method.card_type : "no_card_type",
65669
65672
  payment_type: t.payment_type
65670
65673
  }
65671
65674
  }), Qt.setEndPaymentTime());
@@ -65880,26 +65883,6 @@ let wn = class extends qe {
65880
65883
  constructor() {
65881
65884
  super(...arguments), this.cardDefault = "https://ranty-sdk-js.naranjax.com/images/card.svg", this.iconRight = this.cardDefault, this.isLoading = !1, this.isValidForm = !1, this.isRecieveData = !1, this.bin = null, this.cardFormValue = {};
65882
65885
  }
65883
- connectedCallback() {
65884
- super.connectedCallback(), this.insertHiddenInputsForAutofill();
65885
- }
65886
- insertHiddenInputsForAutofill() {
65887
- var d, l, c;
65888
- if (!navigator.userAgent.match(/iPhone|iPad/i))
65889
- return;
65890
- const t = document.createElement("form");
65891
- t.style.position = "absolute", t.style.top = "-9999px", t.style.opacity = "0", t.style.pointerEvents = "none", t.innerHTML = `
65892
- <input type="text" id="hiddenCreditNumber" autocomplete="cc-number">
65893
- <input type="text" id="hiddenDateExpired" autocomplete="cc-exp">
65894
- <input type="password" id="hiddenCvv" autocomplete="cc-csc">
65895
- `, document.body.appendChild(t);
65896
- const e = document.getElementById("hiddenCreditNumber"), r = document.getElementById("hiddenDateExpired"), s = document.getElementById("hiddenCvv"), n = (d = this.shadowRoot) == null ? void 0 : d.querySelector('input[name="creditNumber"]'), i = (l = this.shadowRoot) == null ? void 0 : l.querySelector('input[name="dateExpired"]'), o = (c = this.shadowRoot) == null ? void 0 : c.querySelector('input[name="cvv"]'), a = () => {
65897
- e.value && n && (n.value = e.value, n.dispatchEvent(new Event("input", { bubbles: !0 }))), r.value && i && (i.value = r.value, i.dispatchEvent(new Event("input", { bubbles: !0 }))), s.value && o && (o.value = s.value, o.dispatchEvent(new Event("input", { bubbles: !0 }))), t.remove();
65898
- };
65899
- document.addEventListener("visibilitychange", () => {
65900
- document.visibilityState === "visible" && a();
65901
- }), e.addEventListener("input", a), e.addEventListener("change", a), r.addEventListener("input", a), r.addEventListener("change", a), s.addEventListener("input", a), s.addEventListener("change", a);
65902
- }
65903
65886
  updated(t) {
65904
65887
  super.updated(t), this._statePaymentManualInput && this._statePaymentManualInput.statePaymentRequest;
65905
65888
  }
@@ -65989,7 +65972,6 @@ let wn = class extends qe {
65989
65972
  label="Número de tarjeta"
65990
65973
  inputmode="numeric"
65991
65974
  .maxlength="${19}"
65992
- autocomplete="cc-number"
65993
65975
  .validationRules="${[
65994
65976
  Vc("Tenés que completar el número de la tarjeta."),
65995
65977
  Kc(16, "Revisá el número de la tarjeta, está incompleto.", !0),
@@ -66015,7 +65997,6 @@ let wn = class extends qe {
66015
65997
  inputmode="numeric"
66016
65998
  .maxlength="${5}"
66017
65999
  label="Vencimiento"
66018
- autocomplete="cc-exp"
66019
66000
  .validationRules="${[
66020
66001
  Vc("Tenés que completar el vencimiento."),
66021
66002
  w4(),
@@ -66032,7 +66013,6 @@ let wn = class extends qe {
66032
66013
  inputmode="numeric"
66033
66014
  .maxlength="${3}"
66034
66015
  label="Código de seguridad"
66035
- autocomplete="cc-csc"
66036
66016
  .validationRules="${[
66037
66017
  Vc("Tenés que completar el código."),
66038
66018
  Kc(3, "Revisá el código."),
@@ -66135,6 +66115,10 @@ let so = class extends qe {
66135
66115
  var t, e, r;
66136
66116
  return (t = this.getBuyer) != null && t.doc_number && ((e = this.getBuyer) == null ? void 0 : e.doc_number.length) >= 6 ? (r = this.getBuyer) == null ? void 0 : r.doc_number : "";
66137
66117
  }
66118
+ get name() {
66119
+ var t, e;
66120
+ return (t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name.replace(/[^a-záéíóúüñA-ZÁÉÍÓÚÜÑ\s]/g, "") : "";
66121
+ }
66138
66122
  firstUpdated(t) {
66139
66123
  var e;
66140
66124
  super.firstUpdated(t), this._statePaymentManualInput.isCardPresent || this._getinstallment(), (e = this._statePaymentManualInput.statePaymentRequest.buyer) != null && e.doc_type && (this.isDni = this._statePaymentManualInput.statePaymentRequest.buyer.doc_type === "DNI", this.requestUpdate()), this.forceValidation(["name", "user_email", "doc_number"]), this.validateForm();
@@ -66228,7 +66212,7 @@ let so = class extends qe {
66228
66212
  }), this.isValidForm = e, this.holder.doc_type = this.isDni ? "DNI" : "PASAPORTE";
66229
66213
  }
66230
66214
  renderHTML() {
66231
- var t, e, r, s;
66215
+ var t, e;
66232
66216
  return P`
66233
66217
  <form @input="${this.validateForm}">
66234
66218
  <scof-input
@@ -66241,14 +66225,14 @@ let so = class extends qe {
66241
66225
  Bb("El nombre solo puede contener letras y espacios."),
66242
66226
  Cb("El nombre no puede estar en blanco.")
66243
66227
  ]}"
66244
- .value="${(t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name : ""}"
66228
+ .value="${this.name}"
66245
66229
  ></scof-input>
66246
66230
  <scof-input
66247
66231
  name="user_email"
66248
66232
  label="Email"
66249
66233
  type="email"
66250
66234
  .validationRules="${[Ms("Tenés que completar el mail."), Eb()]}"
66251
- .value="${(r = this.getBuyer) != null && r.user_email ? (s = this.getBuyer) == null ? void 0 : s.user_email : ""}"
66235
+ .value="${(t = this.getBuyer) != null && t.user_email ? (e = this.getBuyer) == null ? void 0 : e.user_email : ""}"
66252
66236
  ></scof-input>
66253
66237
 
66254
66238
  <div class="panel-id-selection">
@@ -80157,7 +80141,7 @@ function(t) {
80157
80141
  */
80158
80142
  function(t) {
80159
80143
  function e() {
80160
- return (gt.canvg ? Promise.resolve(gt.canvg) : import("./index.es-d94dbc2c.js")).catch(function(r) {
80144
+ return (gt.canvg ? Promise.resolve(gt.canvg) : import("./index.es-c2774112.js")).catch(function(r) {
80161
80145
  return Promise.reject(new Error("Could not load canvg: " + r));
80162
80146
  }).then(function(r) {
80163
80147
  return r.default ? r.default : r;
@@ -81851,7 +81835,7 @@ let xn = class extends qe {
81851
81835
  <div class="cards">${this.getBrandCardAccepted()}</div>
81852
81836
  </div>
81853
81837
  </div>
81854
- <form @input="${this.validateForm}" autocomplete="on">
81838
+ <form @input="${this.validateForm}">
81855
81839
  <div class="credit-info">
81856
81840
  <scof-input
81857
81841
  class="credit-number"
@@ -81861,7 +81845,6 @@ let xn = class extends qe {
81861
81845
  label="Número de tarjeta"
81862
81846
  inputmode="numeric"
81863
81847
  .maxlength="${19}"
81864
- autocomplete="cc-number"
81865
81848
  .validationRules="${[
81866
81849
  Vc("Tenés que completar el número de la tarjeta."),
81867
81850
  Kc(16, "Revisá el número de la tarjeta, está incompleto."),
@@ -81887,7 +81870,6 @@ let xn = class extends qe {
81887
81870
  inputmode="numeric"
81888
81871
  .maxlength="${5}"
81889
81872
  label="Vencimiento"
81890
- autocomplete="cc-csc"
81891
81873
  .validationRules="${[
81892
81874
  Vc("Tenés que completar el vencimiento."),
81893
81875
  w4(),
@@ -81904,7 +81886,6 @@ let xn = class extends qe {
81904
81886
  inputmode="numeric"
81905
81887
  .maxlength="${3}"
81906
81888
  label="Código de seguridad"
81907
- autocomplete="cc-csc"
81908
81889
  .validationRules="${[
81909
81890
  Vc("Tenés que completar el código."),
81910
81891
  Kc(3, "Revisá el código."),
@@ -82007,6 +81988,10 @@ let io = class extends qe {
82007
81988
  var t, e, r;
82008
81989
  return (t = this.getBuyer) != null && t.doc_number && ((e = this.getBuyer) == null ? void 0 : e.doc_number.length) >= 6 ? (r = this.getBuyer) == null ? void 0 : r.doc_number : "";
82009
81990
  }
81991
+ get name() {
81992
+ var t, e;
81993
+ return (t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name.replace(/[^a-záéíóúüñA-ZÁÉÍÓÚÜÑ\s]/g, "") : "";
81994
+ }
82010
81995
  firstUpdated(t) {
82011
81996
  var e;
82012
81997
  super.firstUpdated(t), this.state.isCardPresent || this.getinstallment(), (e = this.state.statePaymentRequest.buyer) != null && e.doc_type && (this.isDni = this.state.statePaymentRequest.buyer.doc_type === "DNI", this.requestUpdate()), this.forceValidation(["name", "user_email", "doc_number"]), this.validateForm();
@@ -82098,7 +82083,7 @@ let io = class extends qe {
82098
82083
  }), this.isValidForm = e, this.holder.doc_type = this.isDni ? "DNI" : "PASAPORTE";
82099
82084
  }
82100
82085
  renderHTML() {
82101
- var t, e, r, s;
82086
+ var t, e;
82102
82087
  return P`
82103
82088
  <form @input="${this.validateForm}">
82104
82089
  <scof-input
@@ -82111,14 +82096,14 @@ let io = class extends qe {
82111
82096
  Bb("El nombre solo puede contener letras y espacios."),
82112
82097
  Cb("El nombre no puede estar en blanco.")
82113
82098
  ]}"
82114
- .value="${(t = this.getBuyer) != null && t.name ? (e = this.getBuyer) == null ? void 0 : e.name : ""}"
82099
+ .value="${this.name}"
82115
82100
  ></scof-input>
82116
82101
  <scof-input
82117
82102
  name="user_email"
82118
82103
  label="Email"
82119
82104
  type="email"
82120
82105
  .validationRules="${[Ms("Tenés que completar el mail."), Eb()]}"
82121
- .value="${(r = this.getBuyer) != null && r.user_email ? (s = this.getBuyer) == null ? void 0 : s.user_email : ""}"
82106
+ .value="${(t = this.getBuyer) != null && t.user_email ? (e = this.getBuyer) == null ? void 0 : e.user_email : ""}"
82122
82107
  ></scof-input>
82123
82108
 
82124
82109
  <div class="panel-id-selection">
@@ -1,4 +1,4 @@
1
- import { c as Ke, _ as za, g as _o } from "./index-8c489189.js";
1
+ import { c as Ke, _ as za, g as _o } from "./index-8321a5a2.js";
2
2
  var vt = function(a) {
3
3
  return a && a.Math === Math && a;
4
4
  }, V = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ad as n, ac as e, a5 as t, ag as o, ae as r, af as C, a6 as m, a3 as p, ab as A, aa as d, a4 as i, a7 as l, a8 as u, a9 as y, A as c, w as F, f as S, e as P, n as M, p as O, Q as k, o as I, q as H, m as f, r as x, C as L, u as g, T as v, j as D, a as b, d as E, D as w, l as Q, E as h, v as B, b as N, F as R, k as j, $ as q, a1 as z, N as G, P as J, M as K, x as T, V as U, W as V, U as W, a2 as X, X as Y, Y as Z, Z as $, i as _, h as aa, a0 as sa, S as na, y as ea, t as ta, z as oa, B as ra, G as Ca, s as ma, K as pa, H as Aa, I as da, J as ia, O as la, R as ua, L as ya } from "./index-8c489189.js";
1
+ import { ad as n, ac as e, a5 as t, ag as o, ae as r, af as C, a6 as m, a3 as p, ab as A, aa as d, a4 as i, a7 as l, a8 as u, a9 as y, A as c, w as F, f as S, e as P, n as M, p as O, Q as k, o as I, q as H, m as f, r as x, C as L, u as g, T as v, j as D, a as b, d as E, D as w, l as Q, E as h, v as B, b as N, F as R, k as j, $ as q, a1 as z, N as G, P as J, M as K, x as T, V as U, W as V, U as W, a2 as X, X as Y, Y as Z, Z as $, i as _, h as aa, a0 as sa, S as na, y as ea, t as ta, z as oa, B as ra, G as Ca, s as ma, K as pa, H as Aa, I as da, J as ia, O as la, R as ua, L as ya } from "./index-8321a5a2.js";
2
2
  export {
3
3
  n as A2AAccountDetails,
4
4
  e as A2AAccountList,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "2.18.0-beta.11",
3
+ "version": "2.18.0-beta.12",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {