carbon-addons-iot-react 5.10.0 → 5.10.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.
@@ -457,7 +457,7 @@ var DataSeriesFormItemModal = function DataSeriesFormItemModal(_ref) {
457
457
  unit: evt.target.value
458
458
  }));
459
459
  },
460
- value: editDataItem.unit
460
+ value: getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
461
461
  })), /*#__PURE__*/React__default.createElement("div", {
462
462
  className: "".concat(baseClassName, "--input-group--item")
463
463
  }, hasDecimalPlacesDropdown && /*#__PURE__*/React__default.createElement(Dropdown, {
@@ -178,7 +178,7 @@ var CommonCardEditFormFields = function CommonCardEditFormFields(_ref) {
178
178
  description: evt.target.value
179
179
  }));
180
180
  },
181
- value: description
181
+ value: getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
182
182
  })), /*#__PURE__*/React__default.createElement("div", {
183
183
  className: "".concat(baseClassName, "--input")
184
184
  }, /*#__PURE__*/React__default.createElement(Dropdown, {
@@ -122,6 +122,7 @@ var Attribute = function Attribute(_ref) {
122
122
 
123
123
  // Get translated label if shouldUseTranslatedLabels is true
124
124
  var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
125
+ var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
125
126
 
126
127
  // Render threshold icon component
127
128
  var renderThresholdIcon = function renderThresholdIcon() {
@@ -171,7 +172,7 @@ var Attribute = function Attribute(_ref) {
171
172
  }), /*#__PURE__*/React__default.createElement("div", {
172
173
  className: "".concat(BEM_BASE, "-unit-with-icon")
173
174
  }, thresholdsIconPosition === 'unit' && renderThresholdIcon(), /*#__PURE__*/React__default.createElement(UnitRenderer, {
174
- unit: measurementUnitLabel || unit,
175
+ unit: measurementUnitLabel || displayUnitLabel,
175
176
  testId: "".concat(testId, "-unit")
176
177
  }))), !isNil(secondaryValue) ? /*#__PURE__*/React__default.createElement("div", {
177
178
  "data-testid": "".concat(testId, "-secondary-value"),
@@ -466,7 +466,7 @@ var DataSeriesFormItemModal = function DataSeriesFormItemModal(_ref) {
466
466
  unit: evt.target.value
467
467
  }));
468
468
  },
469
- value: editDataItem.unit
469
+ value: cardUtilityFunctions.getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
470
470
  })), /*#__PURE__*/React__default.default.createElement("div", {
471
471
  className: "".concat(baseClassName, "--input-group--item")
472
472
  }, hasDecimalPlacesDropdown && /*#__PURE__*/React__default.default.createElement(react.Dropdown, {
@@ -188,7 +188,7 @@ var CommonCardEditFormFields = function CommonCardEditFormFields(_ref) {
188
188
  description: evt.target.value
189
189
  }));
190
190
  },
191
- value: description
191
+ value: cardUtilityFunctions.getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
192
192
  })), /*#__PURE__*/React__default.default.createElement("div", {
193
193
  className: "".concat(baseClassName, "--input")
194
194
  }, /*#__PURE__*/React__default.default.createElement(react.Dropdown, {
@@ -131,6 +131,7 @@ var Attribute = function Attribute(_ref) {
131
131
 
132
132
  // Get translated label if shouldUseTranslatedLabels is true
133
133
  var displayLabel = cardUtilityFunctions.getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
134
+ var displayUnitLabel = cardUtilityFunctions.getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
134
135
 
135
136
  // Render threshold icon component
136
137
  var renderThresholdIcon = function renderThresholdIcon() {
@@ -180,7 +181,7 @@ var Attribute = function Attribute(_ref) {
180
181
  }), /*#__PURE__*/React__default.default.createElement("div", {
181
182
  className: "".concat(BEM_BASE, "-unit-with-icon")
182
183
  }, thresholdsIconPosition === 'unit' && renderThresholdIcon(), /*#__PURE__*/React__default.default.createElement(UnitRenderer, {
183
- unit: measurementUnitLabel || unit,
184
+ unit: measurementUnitLabel || displayUnitLabel,
184
185
  testId: "".concat(testId, "-unit")
185
186
  }))), !isNil(secondaryValue) ? /*#__PURE__*/React__default.default.createElement("div", {
186
187
  "data-testid": "".concat(testId, "-secondary-value"),
package/package.json CHANGED
@@ -353,7 +353,7 @@
353
353
  "whatwg-fetch": "^3.0.0"
354
354
  },
355
355
  "sideEffects": false,
356
- "version": "5.10.0",
356
+ "version": "5.10.1",
357
357
  "resolutions": {
358
358
  "chokidar": "3.3.1",
359
359
  "react-grid-layout": "1.2.2",
@@ -296047,6 +296047,7 @@ ${formatRule(Codicon.menuSubmenu)}
296047
296047
 
296048
296048
  // Get translated label if shouldUseTranslatedLabels is true
296049
296049
  var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
296050
+ var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
296050
296051
 
296051
296052
  // Render threshold icon component
296052
296053
  var renderThresholdIcon = function renderThresholdIcon() {
@@ -296096,7 +296097,7 @@ ${formatRule(Codicon.menuSubmenu)}
296096
296097
  }), /*#__PURE__*/React$1.createElement("div", {
296097
296098
  className: "".concat(BEM_BASE, "-unit-with-icon")
296098
296099
  }, thresholdsIconPosition === 'unit' && renderThresholdIcon(), /*#__PURE__*/React$1.createElement(UnitRenderer$1, {
296099
- unit: measurementUnitLabel || unit,
296100
+ unit: measurementUnitLabel || displayUnitLabel,
296100
296101
  testId: "".concat(testId, "-unit")
296101
296102
  }))), !isNil(secondaryValue) ? /*#__PURE__*/React$1.createElement("div", {
296102
296103
  "data-testid": "".concat(testId, "-secondary-value"),
@@ -310209,7 +310210,7 @@ ${formatRule(Codicon.menuSubmenu)}
310209
310210
  description: evt.target.value
310210
310211
  }));
310211
310212
  },
310212
- value: description
310213
+ value: getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
310213
310214
  })), /*#__PURE__*/React$1.createElement("div", {
310214
310215
  className: "".concat(baseClassName, "--input")
310215
310216
  }, /*#__PURE__*/React$1.createElement(react.Dropdown, {
@@ -312113,7 +312114,7 @@ ${formatRule(Codicon.menuSubmenu)}
312113
312114
  unit: evt.target.value
312114
312115
  }));
312115
312116
  },
312116
- value: editDataItem.unit
312117
+ value: getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
312117
312118
  })), /*#__PURE__*/React$1.createElement("div", {
312118
312119
  className: "".concat(baseClassName, "--input-group--item")
312119
312120
  }, hasDecimalPlacesDropdown && /*#__PURE__*/React$1.createElement(react.Dropdown, {