@alma/widgets 3.2.2 → 3.2.4

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.
@@ -1886,7 +1886,7 @@ var messagesDE = {
1886
1886
  "credit-features.total-credit-cost": "Davon Kreditkosten",
1887
1887
  "eligibility-modal.bullet-1": "Wählen Sie <strong>Alma</strong> beim Check-out. ",
1888
1888
  "eligibility-modal.bullet-2": "Lassen Sie sich führen und bestätigen Sie Ihre Zahlung in <strong>2 Minuten.</strong>",
1889
- "eligibility-modal.bullet-3": "</strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach Ihrem eigenen Tempo vor- oder zurückverlegen.",
1889
+ "eligibility-modal.bullet-3": "<strong>Verlieren Sie nicht die Kontrolle,</strong> indem Sie Ihre Fälligkeitstermine nach Ihrem eigenen Tempo vor- oder zurückverlegen.",
1890
1890
  "eligibility-modal.no-eligibility": "Ups, die Prüfung hat anscheinend nicht funktioniert.",
1891
1891
  "eligibility-modal.p1x-bullet-1": "Wählen Sie <strong>Alma - 1X</strong> beim Check-out.",
1892
1892
  "eligibility-modal.p1x-bullet-2": "Tragen Sie Ihre <strong>Kreditkarteninformationen ein.</strong>",
@@ -1896,11 +1896,12 @@ var messagesDE = {
1896
1896
  "installments.today": "Heute",
1897
1897
  "installments.total-amount": "Gesamtsumme",
1898
1898
  "installments.total-fees": "Davon Kosten",
1899
- "payment-plan-strings.day-abbreviation": "T{numberOfDeferredDays}",
1899
+ "payment-plan-strings.day-abbreviation": "T{deferredDays}",
1900
1900
  "payment-plan-strings.default-message": "Bezahlen Sie zinsfrei in mehreren Raten mit Alma.",
1901
1901
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
1902
1902
  "payment-plan-strings.ineligible-greater-than-max": "Bis zu {maxAmount}",
1903
1903
  "payment-plan-strings.ineligible-lower-than-min": "Ab {minAmount}",
1904
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
1904
1905
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dann {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1905
1906
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1906
1907
  "payment-plan-strings.no-fee": "(0% Finanzierung)",
@@ -1923,11 +1924,12 @@ var messagesEN = {
1923
1924
  "installments.today": "Today",
1924
1925
  "installments.total-amount": "Total",
1925
1926
  "installments.total-fees": "Of which costs (incl. VAT)",
1926
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
1927
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1927
1928
  "payment-plan-strings.default-message": "Pay in installments with Alma",
1928
- "payment-plan-strings.deferred": "{totalAmount} to be paid on {dueDate}",
1929
+ "payment-plan-strings.deferred": "{totalAmount} to pay the {dueDate}",
1929
1930
  "payment-plan-strings.ineligible-greater-than-max": "Until {maxAmount}",
1930
1931
  "payment-plan-strings.ineligible-lower-than-min": "From {minAmount}",
1932
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
1931
1933
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} then {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1932
1934
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1933
1935
  "payment-plan-strings.no-fee": "(free of charge)",
@@ -1950,11 +1952,12 @@ var messagesES = {
1950
1952
  "installments.today": "Hoy",
1951
1953
  "installments.total-amount": "Total",
1952
1954
  "installments.total-fees": "De los cuales, costes (IVA incluido)",
1953
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
1955
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
1954
1956
  "payment-plan-strings.default-message": "Pagar a plazos con Alma",
1955
1957
  "payment-plan-strings.deferred": "{totalAmount} a pagar el {dueDate}",
1956
1958
  "payment-plan-strings.ineligible-greater-than-max": "Hasta {maxAmount}",
1957
1959
  "payment-plan-strings.ineligible-lower-than-min": "Desde {minAmount}",
1960
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
1958
1961
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidad de {othersInstallmentAmount}} other {{firstInstallmentAmount} hoy, después {numberOfRemainingInstallments} mensualidades de {othersInstallmentAmount}}}",
1959
1962
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} plazos de {totalAmount}",
1960
1963
  "payment-plan-strings.no-fee": "(sin intereses)",
@@ -1977,11 +1980,12 @@ var messagesFR = {
1977
1980
  "installments.today": "Aujourd'hui",
1978
1981
  "installments.total-amount": "Total",
1979
1982
  "installments.total-fees": "Dont frais (TTC)",
1980
- "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
1983
+ "payment-plan-strings.day-abbreviation": "J{deferredDays}",
1981
1984
  "payment-plan-strings.default-message": "Payez en plusieurs fois avec Alma",
1982
1985
  "payment-plan-strings.deferred": "{totalAmount} à payer le {dueDate}",
1983
1986
  "payment-plan-strings.ineligible-greater-than-max": "Jusqu'à {maxAmount}",
1984
1987
  "payment-plan-strings.ineligible-lower-than-min": "À partir de {minAmount}",
1988
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
1985
1989
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1986
1990
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
1987
1991
  "payment-plan-strings.no-fee": "(sans frais)",
@@ -2004,11 +2008,12 @@ var messagesIT = {
2004
2008
  "installments.today": "Oggi",
2005
2009
  "installments.total-amount": "Totale",
2006
2010
  "installments.total-fees": "Di cui commissioni",
2007
- "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
2011
+ "payment-plan-strings.day-abbreviation": "G{deferredDays}",
2008
2012
  "payment-plan-strings.default-message": "Paga a rate con Alma, senza registrazione.",
2009
2013
  "payment-plan-strings.deferred": "{totalAmount} da pagare il {dueDate}",
2010
2014
  "payment-plan-strings.ineligible-greater-than-max": "Disponibile fino a {maxAmount}",
2011
2015
  "payment-plan-strings.ineligible-lower-than-min": "Pagamento rateale disponibile a partire da {minAmount}",
2016
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
2012
2017
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {Oggi paghi {firstInstallmentAmount} poi tra {numberOfRemainingInstallments} mese {othersInstallmentAmount}} other {Oggi paghi {firstInstallmentAmount} poi {numberOfRemainingInstallments} rate mensili di {othersInstallmentAmount}}}",
2013
2018
  "payment-plan-strings.multiple-installments-same-amount": "In {installmentsCount} rate mensili di {totalAmount}",
2014
2019
  "payment-plan-strings.no-fee": "(senza interessi)",
@@ -2031,11 +2036,12 @@ var messagesNL = {
2031
2036
  "installments.today": "Tegenwoordig",
2032
2037
  "installments.total-amount": "Totaal",
2033
2038
  "installments.total-fees": "Waarvan kosten (incl. BTW)",
2034
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
2039
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
2035
2040
  "payment-plan-strings.default-message": "Betaal in termijnen met Alma",
2036
2041
  "payment-plan-strings.deferred": "{totalAmount} te betalen op {dueDate}",
2037
2042
  "payment-plan-strings.ineligible-greater-than-max": "Tot {maxAmount}",
2038
2043
  "payment-plan-strings.ineligible-lower-than-min": "Van {minAmount}",
2044
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
2039
2045
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} dan {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
2040
2046
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
2041
2047
  "payment-plan-strings.no-fee": "(zonder kosten)",
@@ -2058,11 +2064,12 @@ var messagesPT = {
2058
2064
  "installments.today": "Hoje",
2059
2065
  "installments.total-amount": "Total",
2060
2066
  "installments.total-fees": "Dos quais custos (incl. IVA)",
2061
- "payment-plan-strings.day-abbreviation": "D{numberOfDeferredDays}",
2067
+ "payment-plan-strings.day-abbreviation": "D{deferredDays}",
2062
2068
  "payment-plan-strings.default-message": "Pague em prestações através da Alma",
2063
2069
  "payment-plan-strings.deferred": "{totalAmount} a pagar em {dueDate}",
2064
2070
  "payment-plan-strings.ineligible-greater-than-max": "Até {maxAmount}",
2065
2071
  "payment-plan-strings.ineligible-lower-than-min": "A partir de {minAmount}",
2072
+ "payment-plan-strings.month-abbreviation": "M{deferredMonths}",
2066
2073
  "payment-plan-strings.multiple-installments": "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} depois {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
2067
2074
  "payment-plan-strings.multiple-installments-same-amount": "{installmentsCount} x {totalAmount}",
2068
2075
  "payment-plan-strings.no-fee": "(sem encargos)",
@@ -2185,7 +2192,7 @@ var getPaymentPlanBoundaries = function getPaymentPlanBoundaries(plan, configPla
2185
2192
  return configPlan != null ? configPlan : {};
2186
2193
  };
2187
2194
 
2188
- var filterELigibility = function filterELigibility(eligibilities, configPlans) {
2195
+ var filterEligibility = function filterEligibility(eligibilities, configPlans) {
2189
2196
  // Remove P1X if no configuration is provided
2190
2197
  if (!configPlans) {
2191
2198
  return eligibilities.filter(function (plan) {
@@ -2259,7 +2266,7 @@ var useFetchEligibility = function useFetchEligibility(purchaseAmount, _ref, pla
2259
2266
  });
2260
2267
  }
2261
2268
  }, [status]);
2262
- return [filterELigibility(eligibility, plans), status];
2269
+ return [filterEligibility(eligibility, plans), status];
2263
2270
  };
2264
2271
 
2265
2272
  var s = {"container":"_GTTk7","total":"_34s2g","fees":"_W7qIA","creditCost":"_24KmE"};
@@ -2426,15 +2433,23 @@ var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
2426
2433
  var deferred_days = payment.deferred_days,
2427
2434
  deferred_months = payment.deferred_months,
2428
2435
  installmentsCount = payment.installments_count;
2429
- var deferredDaysCount = deferred_days + deferred_months * 30;
2430
2436
 
2431
- if (installmentsCount === 1 && deferredDaysCount > 0) {
2432
- // For now there is no distinction between deferred days and deferred months, it will be J+ anyway
2437
+ if (installmentsCount === 1 && deferred_days) {
2433
2438
  return /*#__PURE__*/React.createElement(FormattedMessage, {
2434
2439
  id: "payment-plan-strings.day-abbreviation",
2435
- defaultMessage: "J{numberOfDeferredDays}",
2440
+ defaultMessage: "J{deferredDays}",
2441
+ values: {
2442
+ deferredDays: "+" + deferred_days
2443
+ }
2444
+ });
2445
+ }
2446
+
2447
+ if (installmentsCount === 1 && deferred_months) {
2448
+ return /*#__PURE__*/React.createElement(FormattedMessage, {
2449
+ id: "payment-plan-strings.month-abbreviation",
2450
+ defaultMessage: "M{deferredMonths}",
2436
2451
  values: {
2437
- numberOfDeferredDays: deferredDaysCount > 0 ? "+" + deferredDaysCount : ''
2452
+ deferredMonths: "+" + deferred_months
2438
2453
  }
2439
2454
  });
2440
2455
  } else {