@alma/widgets 3.0.3 → 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 = {}));
@@ -2034,7 +2039,11 @@ var messagesPT = {
2034
2039
  };
2035
2040
 
2036
2041
  var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2037
- switch (locale) {
2042
+ // A CMS plugin can add LCID format like : 'fr-FR' instead of 'fr'.
2043
+ // Instead of specifying all possibilities we just remove the last part of the string.
2044
+ var merchantLocale = locale.slice(0, 2);
2045
+
2046
+ switch (merchantLocale) {
2038
2047
  case Locale.fr:
2039
2048
  return messagesFR;
2040
2049
 
@@ -2051,8 +2060,6 @@ var getTranslationsByLocale = function getTranslationsByLocale(locale) {
2051
2060
  return messagesPT;
2052
2061
 
2053
2062
  case Locale.nl:
2054
- case Locale['nl-BE']:
2055
- case Locale['nl-NL']:
2056
2063
  return messagesNL;
2057
2064
 
2058
2065
  case Locale.en:
@@ -2249,7 +2256,7 @@ var TotalBlock = function TotalBlock(_ref) {
2249
2256
  return /*#__PURE__*/React.createElement("div", {
2250
2257
  className: cx(s.container, STATIC_CUSTOMISATION_CLASSES.summary),
2251
2258
  "data-testid": "modal-summary"
2252
- }, /*#__PURE__*/React.createElement("h3", {
2259
+ }, /*#__PURE__*/React.createElement("div", {
2253
2260
  className: cx(s.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
2254
2261
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2255
2262
  tagName: "div",