@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.
@@ -18,7 +18,6 @@
18
18
  --soft-green: #e2f3e1;
19
19
  --alma-red: #f00;
20
20
  --soft-red: #ffecec;
21
- --background: #fefefe;
22
21
  --off-white: #f9f9f9;
23
22
  --light-gray: #d4d4d4;
24
23
  --dark-gray: #8c8c8c;
@@ -1529,12 +1529,17 @@ var Locale;
1529
1529
 
1530
1530
  (function (Locale) {
1531
1531
  Locale["en"] = "en";
1532
+ Locale["fr-FR"] = "fr-FR";
1532
1533
  Locale["fr"] = "fr";
1534
+ Locale["de-DE"] = "de-DE";
1533
1535
  Locale["de"] = "de";
1534
1536
  Locale["it"] = "it";
1537
+ Locale["it-IT"] = "it-IT";
1535
1538
  Locale["es"] = "es";
1536
- Locale["nl"] = "nl";
1539
+ Locale["es-ES"] = "es-ES";
1537
1540
  Locale["pt"] = "pt";
1541
+ Locale["pt-PT"] = "pt-PT";
1542
+ Locale["nl"] = "nl";
1538
1543
  Locale["nl-NL"] = "nl-NL";
1539
1544
  Locale["nl-BE"] = "nl-BE";
1540
1545
  })(Locale || (Locale = {}));
@@ -2037,7 +2042,11 @@ var messagesPT = {
2037
2042
  };
2038
2043
 
2039
2044
  var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2040
- switch (locale) {
2045
+ // A CMS plugin can add LCID format like : 'fr-FR' instead of 'fr'.
2046
+ // Instead of specifying all possibilities we just remove the last part of the string.
2047
+ var merchantLocale = locale.slice(0, 2);
2048
+
2049
+ switch (merchantLocale) {
2041
2050
  case Locale.fr:
2042
2051
  return messagesFR;
2043
2052
 
@@ -2054,8 +2063,6 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2054
2063
  return messagesPT;
2055
2064
 
2056
2065
  case Locale.nl:
2057
- case Locale['nl-BE']:
2058
- case Locale['nl-NL']:
2059
2066
  return messagesNL;
2060
2067
 
2061
2068
  case Locale.en:
@@ -2252,7 +2259,7 @@ var TotalBlock = function TotalBlock(_ref) {
2252
2259
  return /*#__PURE__*/React__default.createElement("div", {
2253
2260
  className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
2254
2261
  "data-testid": "modal-summary"
2255
- }, /*#__PURE__*/React__default.createElement("h3", {
2262
+ }, /*#__PURE__*/React__default.createElement("div", {
2256
2263
  className: cx(s.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
2257
2264
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
2258
2265
  tagName: "div",
@@ -2553,7 +2560,7 @@ var Installment = function Installment(_ref) {
2553
2560
  })), /*#__PURE__*/React__default.createElement("div", {
2554
2561
  className: cx((_cx2 = {}, _cx2[s$4.bold] = index === 0, _cx2))
2555
2562
  }, /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
2556
- value: installment.purchase_amount / 100,
2563
+ value: installment.total_amount / 100,
2557
2564
  style: "currency",
2558
2565
  currency: "EUR"
2559
2566
  })));