@alma/widgets 3.0.2 → 3.0.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.
@@ -1526,12 +1526,17 @@ var Locale;
1526
1526
 
1527
1527
  (function (Locale) {
1528
1528
  Locale["en"] = "en";
1529
+ Locale["fr-FR"] = "fr-FR";
1529
1530
  Locale["fr"] = "fr";
1531
+ Locale["de-DE"] = "de-DE";
1530
1532
  Locale["de"] = "de";
1531
1533
  Locale["it"] = "it";
1534
+ Locale["it-IT"] = "it-IT";
1532
1535
  Locale["es"] = "es";
1533
- Locale["nl"] = "nl";
1536
+ Locale["es-ES"] = "es-ES";
1534
1537
  Locale["pt"] = "pt";
1538
+ Locale["pt-PT"] = "pt-PT";
1539
+ Locale["nl"] = "nl";
1535
1540
  Locale["nl-NL"] = "nl-NL";
1536
1541
  Locale["nl-BE"] = "nl-BE";
1537
1542
  })(Locale || (Locale = {}));
@@ -2014,7 +2019,11 @@ var messagesPT = {
2014
2019
  };
2015
2020
 
2016
2021
  const getTranslationsByLocale = locale => {
2017
- switch (locale) {
2022
+ // A CMS plugin can add LCID format like : 'fr-FR' instead of 'fr'.
2023
+ // Instead of specifying all possibilities we just remove the last part of the string.
2024
+ const merchantLocale = locale.slice(0, 2);
2025
+
2026
+ switch (merchantLocale) {
2018
2027
  case Locale.fr:
2019
2028
  return messagesFR;
2020
2029
 
@@ -2031,8 +2040,6 @@ const getTranslationsByLocale = locale => {
2031
2040
  return messagesPT;
2032
2041
 
2033
2042
  case Locale.nl:
2034
- case Locale['nl-BE']:
2035
- case Locale['nl-NL']:
2036
2043
  return messagesNL;
2037
2044
 
2038
2045
  case Locale.en:
@@ -2210,7 +2217,7 @@ const TotalBlock = ({
2210
2217
  return /*#__PURE__*/React.createElement("div", {
2211
2218
  className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
2212
2219
  "data-testid": "modal-summary"
2213
- }, /*#__PURE__*/React.createElement("h3", {
2220
+ }, /*#__PURE__*/React.createElement("div", {
2214
2221
  className: cx(s.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
2215
2222
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2216
2223
  tagName: "div",
@@ -2507,7 +2514,7 @@ const Installment = ({
2507
2514
  [s$4.bold]: index === 0
2508
2515
  })
2509
2516
  }, /*#__PURE__*/React.createElement(FormattedNumber, {
2510
- value: installment.purchase_amount / 100,
2517
+ value: installment.total_amount / 100,
2511
2518
  style: "currency",
2512
2519
  currency: "EUR"
2513
2520
  })));