@alma/widgets 2.9.0 → 2.11.1

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.
@@ -1534,6 +1534,7 @@ var Locale;
1534
1534
  Locale["it"] = "it";
1535
1535
  Locale["es"] = "es";
1536
1536
  Locale["nl"] = "nl";
1537
+ Locale["pt"] = "pt";
1537
1538
  Locale["nl-NL"] = "nl-NL";
1538
1539
  Locale["nl-BE"] = "nl-BE";
1539
1540
  })(Locale || (Locale = {}));
@@ -1547,6 +1548,7 @@ function priceFromCents(cents) {
1547
1548
  function formatCents(cents) {
1548
1549
  return String(priceFromCents(cents)).replace('.', ',');
1549
1550
  }
1551
+ var desktopWidth = 800;
1550
1552
 
1551
1553
  /* eslint-disable */
1552
1554
 
@@ -1991,7 +1993,7 @@ var messagesIT = {
1991
1993
  var messagesNL = {
1992
1994
  "eligibility-modal.bullet-1": "Kies <strong>Alma</strong> bij het afrekenen.",
1993
1995
  "eligibility-modal.bullet-2": "Vul de <strong>gevraagde informatie</strong> in.",
1994
- "eligibility-modal.bullet-3": "Onmiddelijke validatie van uw betaling ",
1996
+ "eligibility-modal.bullet-3": "Onmiddellijke validatie van uw betaling ",
1995
1997
  "eligibility-modal.cost": "Waarvan kosten",
1996
1998
  "eligibility-modal.credit-commitment": "Een lening bindt je en moet worden terugbetaald. Ga na of u kunt terugbetalen voordat u zich vastlegt.",
1997
1999
  "eligibility-modal.credit-cost": "Waarvan kosten van krediet",
@@ -2011,6 +2013,29 @@ var messagesNL = {
2011
2013
  "payment-plan-strings.no-fee": "(gratis)"
2012
2014
  };
2013
2015
 
2016
+ var messagesPT = {
2017
+ "eligibility-modal.bullet-1": "Escolha a <strong>Alma</strong> no checkout.",
2018
+ "eligibility-modal.bullet-2": "Preencha os <strong>dados</strong> solicitados.",
2019
+ "eligibility-modal.bullet-3": "Validação do seu pagamento <strong>imediata</strong>!",
2020
+ "eligibility-modal.cost": "Incluindo encargos",
2021
+ "eligibility-modal.credit-commitment": "Um crédito é um compromisso e deve ser reembolsado. Verifique a sua capacidade de pagar antes de se comprometer.",
2022
+ "eligibility-modal.credit-cost": "Incluindo custo do crédito",
2023
+ "eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
2024
+ "eligibility-modal.no-eligibility": "Ups, parece que a simulação não funcionou.",
2025
+ "eligibility-modal.title": "<highlighted>Pague em prestações</highlighted> com cartão bancário através da Alma.",
2026
+ "eligibility-modal.title-deferred": "<highlighted>Pague em prestações</highlighted> ou mais tarde com cartão bancário através da Alma.",
2027
+ "eligibility-modal.total": "Total",
2028
+ "installments.today": "Hoje",
2029
+ "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
2030
+ "payment-plan-strings.default-message": "Pague em prestações através da Alma",
2031
+ "payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
2032
+ "payment-plan-strings.ineligible-greater-than-max": "Até {maxAmount}",
2033
+ "payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
2034
+ "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
2035
+ "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
2036
+ "payment-plan-strings.no-fee": "(sem encargos)"
2037
+ };
2038
+
2014
2039
  var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2015
2040
  switch (locale) {
2016
2041
  case Locale.fr:
@@ -2025,6 +2050,9 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2025
2050
  case Locale.de:
2026
2051
  return messagesDE;
2027
2052
 
2053
+ case Locale.pt:
2054
+ return messagesPT;
2055
+
2028
2056
  case Locale.nl:
2029
2057
  case Locale['nl-BE']:
2030
2058
  case Locale['nl-NL']:
@@ -2441,11 +2469,11 @@ var s$3 = {"schedule":"_MPKjS","scheduleLine":"_1A7Qv","total":"_14Ejo","summary
2441
2469
 
2442
2470
  var Schedule = function Schedule(_ref) {
2443
2471
  var currentPlan = _ref.currentPlan;
2444
- var total = currentPlan && priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
2445
- var creditCost = currentPlan ? priceFromCents(currentPlan.customer_total_cost_amount) : 0;
2472
+ var total = priceFromCents(currentPlan.purchase_amount + currentPlan.customer_total_cost_amount);
2473
+ var creditCost = priceFromCents(currentPlan.customer_total_cost_amount);
2446
2474
  var TAEG = (currentPlan == null ? void 0 : currentPlan.annual_interest_rate) && currentPlan.annual_interest_rate / 10000;
2447
- var customerFees = priceFromCents(currentPlan ? currentPlan.customer_total_cost_amount : 0);
2448
- var isCredit = currentPlan && currentPlan.installments_count > 4;
2475
+ var customerFees = priceFromCents(currentPlan.customer_total_cost_amount);
2476
+ var isCredit = currentPlan.installments_count > 4;
2449
2477
  var intl = reactIntl.useIntl();
2450
2478
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
2451
2479
  className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
@@ -2864,7 +2892,7 @@ var EligibilityModal = function EligibilityModal(_ref) {
2864
2892
  setCurrentPlanIndex = _useState[1];
2865
2893
 
2866
2894
  var isBigScreen = reactResponsive.useMediaQuery({
2867
- minWidth: 800
2895
+ minWidth: desktopWidth
2868
2896
  });
2869
2897
  var ModalComponent = isBigScreen ? DesktopModal : MobileModal;
2870
2898
  var eligiblePlans = eligibilityPlans.filter(function (plan) {