@ranty/ranty-sdk 2.0.2-beta.4 → 2.0.2-beta.5

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.
@@ -8266,7 +8266,9 @@ Bs.isEnabled = !0;
8266
8266
  const _k = (t) => Te(void 0, null, function* () {
8267
8267
  if (!t.additional_info.platform)
8268
8268
  throw new Error("Platform is required");
8269
- const e = yield Bs.getSettingsCircuitBreaker(t.additional_info.platform);
8269
+ const e = yield Bs.getSettingsCircuitBreaker(
8270
+ t.additional_info.platform.toLowerCase()
8271
+ );
8270
8272
  Bs.currentSetting = e.map((n) => n)[0], Bs.validateInputs(t);
8271
8273
  });
8272
8274
  var Sk = "Logging", Ek = globalThis && globalThis.__values || function(t) {
@@ -25593,28 +25595,28 @@ let $n = class t extends nt {
25593
25595
  e && (window.location.href = e);
25594
25596
  }
25595
25597
  renderCardAvailable() {
25596
- return J`<card-home
25597
- class="clickeable"
25598
- image="https://ranty-sdk-js.naranjax.com/images/card.svg"
25599
- title="Tarjeta de crédito o débito"
25600
- subtitle="${this.manualInputDescription}"
25601
- ?hasPromotion="${this.hasManualInputPromotions}"
25602
- @click="${this._toggleShowPersonalDataForm}"
25603
- ></card-home>`;
25598
+ return this.isCardAvailable ? J`<card-home
25599
+ class="clickeable"
25600
+ image="https://ranty-sdk-js.naranjax.com/images/card.svg"
25601
+ title="Tarjeta de crédito o débito"
25602
+ subtitle="${this.manualInputDescription}"
25603
+ ?hasPromotion="${this.hasManualInputPromotions}"
25604
+ @click="${this._toggleShowPersonalDataForm}"
25605
+ ></card-home>` : J``;
25604
25606
  }
25605
25607
  renderWalletAvailable() {
25606
- return this._isMobileDevice() ? J`<card-home
25608
+ return this.isWalletAvailable ? this._isMobileDevice() ? J`<card-home
25609
+ class="clickeable"
25610
+ image="https://ranty-sdk-js.naranjax.com/images/building-bank.svg"
25611
+ titleImage="https://ranty-sdk-js.naranjax.com/tienda/nave-modo-tn.svg"
25612
+ subtitle="Para aprovechar todos los beneficios de tu banco."
25613
+ @click="${this._deepLinkModo}"
25614
+ ></card-home>` : J`<card-home
25607
25615
  class="clickeable"
25608
- image="https://ranty-sdk-js.naranjax.com/images/building-bank.svg"
25609
- titleImage="https://ranty-sdk-js.naranjax.com/tienda/nave-modo-tn.svg"
25610
- subtitle="Para aprovechar todos los beneficios de tu banco."
25611
- @click="${this._deepLinkModo}"
25612
- ></card-home>` : J`<card-home
25613
- class="clickeable"
25614
- subtitle="${this.walletDescription}"
25615
- ?hasPromotion="${this.hasWalletPromotions}"
25616
- @click="${this._handleCardClick}"
25617
- ></card-home>`;
25616
+ subtitle="${this.walletDescription}"
25617
+ ?hasPromotion="${this.hasWalletPromotions}"
25618
+ @click="${this._handleCardClick}"
25619
+ ></card-home>` : J``;
25618
25620
  }
25619
25621
  render() {
25620
25622
  return J`
@@ -32697,16 +32699,19 @@ let _n = class t extends nt {
32697
32699
  _getPaymentRequest() {
32698
32700
  return Te(this, null, function* () {
32699
32701
  try {
32700
- const n = (yield ic(this._payfacContextData.paymentRequest)).plans.cards, r = [...new Set(n.map((o) => o.name))];
32701
- this._statePaymentManualInput.cardsAccepted = r;
32702
- const i = this._payfacContextData.paymentRequest;
32703
- this._statePaymentManualInput.statePaymentRequest = i;
32704
- const s = W6(i);
32705
- if (s.error) {
32706
- this.stateStatus.title = s.message.title, this.stateStatus.subtitle = s.message.subtitle, this.stateStatus.icon = s.message.icon, this.stateStatus.showButton = s.message.showButton, this.stateStatus.status = s.status, this.createEvent("button-pushed", Ht.STATUS);
32702
+ const n = (yield ic(this._payfacContextData.paymentRequest)).plans.cards;
32703
+ if (n) {
32704
+ const s = [...new Set(n.map((o) => o.name))];
32705
+ this._statePaymentManualInput.cardsAccepted = s;
32706
+ }
32707
+ const r = this._payfacContextData.paymentRequest;
32708
+ this._statePaymentManualInput.statePaymentRequest = r;
32709
+ const i = W6(r);
32710
+ if (i.error) {
32711
+ this.stateStatus.title = i.message.title, this.stateStatus.subtitle = i.message.subtitle, this.stateStatus.icon = i.message.icon, this.stateStatus.showButton = i.message.showButton, this.stateStatus.status = i.status, this.createEvent("button-pushed", Ht.STATUS);
32707
32712
  return;
32708
32713
  }
32709
- yield this.validateCircuitBreaker(), yield this.getPromotions(), this._statePaymentManualInput.page = i !== null ? Ht.MANUAL_INPUT : Ht.CARD_LIST, this._statePaymentManualInput.statePaymentRequest = i, this.stateManualInputProps = Je({}, this.stateManualInputProps), this.createEvent("button-pushed", this._statePaymentManualInput.page), this.requestUpdate();
32714
+ yield this.validateCircuitBreaker(), yield this.getPromotions(), this._statePaymentManualInput.page = r !== null ? Ht.MANUAL_INPUT : Ht.CARD_LIST, this._statePaymentManualInput.statePaymentRequest = r, this.stateManualInputProps = Je({}, this.stateManualInputProps), this.createEvent("button-pushed", this._statePaymentManualInput.page), this.requestUpdate();
32710
32715
  } catch (e) {
32711
32716
  console.log(e);
32712
32717
  }
@@ -45695,7 +45700,7 @@ function(t) {
45695
45700
  */
45696
45701
  function(t) {
45697
45702
  function e() {
45698
- return (dt.canvg ? Promise.resolve(dt.canvg) : import("./index.es-22cec398.js")).catch(function(n) {
45703
+ return (dt.canvg ? Promise.resolve(dt.canvg) : import("./index.es-f2a52eb4.js")).catch(function(n) {
45699
45704
  return Promise.reject(new Error("Could not load canvg: " + n));
45700
45705
  }).then(function(n) {
45701
45706
  return n.default ? n.default : n;
@@ -1,4 +1,4 @@
1
- import { c as Ke, _ as za, g as _o } from "./index-48093e36.js";
1
+ import { c as Ke, _ as za, g as _o } from "./index-9798943e.js";
2
2
  import "lit";
3
3
  import "lit/decorators.js";
4
4
  import "lit-html";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as r, v as C, f as m, e as p, n as i, p as l, M as d, o as u, q as y, m as P, C as F, t as S, Q as c, j as M, a as O, d as I, D as k, l as x, E as f, u as H, b as L, F as v, k as A, Y as D, $ as g, N as E, P as w, K as h, w as B, T as N, U as Q, R, a0 as b, V as j, W as q, X as z, i as G, h as J, Z as K, S as T, x as U, s as V, y as W, z as X, B as Y, r as Z, G as $, H as _, I as aa, L as na, O as sa, J as ta } from "./index-48093e36.js";
1
+ import { A as r, v as C, f as m, e as p, n as i, p as l, M as d, o as u, q as y, m as P, C as F, t as S, Q as c, j as M, a as O, d as I, D as k, l as x, E as f, u as H, b as L, F as v, k as A, Y as D, $ as g, N as E, P as w, K as h, w as B, T as N, U as Q, R, a0 as b, V as j, W as q, X as z, i as G, h as J, Z as K, S as T, x as U, s as V, y as W, z as X, B as Y, r as Z, G as $, H as _, I as aa, L as na, O as sa, J as ta } from "./index-9798943e.js";
2
2
  import "lit";
3
3
  import "lit/decorators.js";
4
4
  import "lit-html";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "2.0.2-beta.4",
3
+ "version": "2.0.2-beta.5",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {