carbon-addons-iot-react 4.4.0 → 4.4.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.
- package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItemModal.js +1 -1
- package/es/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +1 -1
- package/es/components/ValueCard/Attribute.js +2 -1
- package/lib/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItemModal.js +1 -1
- package/lib/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +1 -1
- package/lib/components/ValueCard/Attribute.js +2 -1
- package/package.json +1 -1
- package/umd/carbon-addons-iot-react.js +4 -3
|
@@ -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, {
|
|
@@ -115,6 +115,7 @@ var Attribute = function Attribute(_ref) {
|
|
|
115
115
|
|
|
116
116
|
// Get translated label if shouldUseTranslatedLabels is true
|
|
117
117
|
var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
|
|
118
|
+
var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
|
|
118
119
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
119
120
|
className: classnames("".concat(BEM_BASE, "-wrapper"), _defineProperty(_defineProperty({}, "".concat(BEM_BASE, "-wrapper--vertical"), layout === CARD_LAYOUTS.VERTICAL), "".concat(BEM_BASE, "-wrapper--horizontal"), layout === CARD_LAYOUTS.HORIZONTAL)),
|
|
120
121
|
style: {
|
|
@@ -153,7 +154,7 @@ var Attribute = function Attribute(_ref) {
|
|
|
153
154
|
measurementUnitLabel: measurementUnitLabel,
|
|
154
155
|
onClick: onValueClick
|
|
155
156
|
}), /*#__PURE__*/React__default.createElement(UnitRenderer, {
|
|
156
|
-
unit:
|
|
157
|
+
unit: displayUnitLabel,
|
|
157
158
|
testId: "".concat(testId, "-unit")
|
|
158
159
|
})), !isNil(secondaryValue) ? /*#__PURE__*/React__default.createElement("div", {
|
|
159
160
|
"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, {
|
|
@@ -124,6 +124,7 @@ var Attribute = function Attribute(_ref) {
|
|
|
124
124
|
|
|
125
125
|
// Get translated label if shouldUseTranslatedLabels is true
|
|
126
126
|
var displayLabel = cardUtilityFunctions.getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
|
|
127
|
+
var displayUnitLabel = cardUtilityFunctions.getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
|
|
127
128
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
128
129
|
className: classnames__default.default("".concat(BEM_BASE, "-wrapper"), _defineProperty__default.default(_defineProperty__default.default({}, "".concat(BEM_BASE, "-wrapper--vertical"), layout === LayoutConstants.CARD_LAYOUTS.VERTICAL), "".concat(BEM_BASE, "-wrapper--horizontal"), layout === LayoutConstants.CARD_LAYOUTS.HORIZONTAL)),
|
|
129
130
|
style: {
|
|
@@ -162,7 +163,7 @@ var Attribute = function Attribute(_ref) {
|
|
|
162
163
|
measurementUnitLabel: measurementUnitLabel,
|
|
163
164
|
onClick: onValueClick
|
|
164
165
|
}), /*#__PURE__*/React__default.default.createElement(UnitRenderer, {
|
|
165
|
-
unit:
|
|
166
|
+
unit: displayUnitLabel,
|
|
166
167
|
testId: "".concat(testId, "-unit")
|
|
167
168
|
})), !isNil(secondaryValue) ? /*#__PURE__*/React__default.default.createElement("div", {
|
|
168
169
|
"data-testid": "".concat(testId, "-secondary-value"),
|
package/package.json
CHANGED
|
@@ -313030,6 +313030,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
313030
313030
|
|
|
313031
313031
|
// Get translated label if shouldUseTranslatedLabels is true
|
|
313032
313032
|
var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
|
|
313033
|
+
var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
|
|
313033
313034
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
313034
313035
|
className: classnames("".concat(BEM_BASE, "-wrapper"), _defineProperty$c(_defineProperty$c({}, "".concat(BEM_BASE, "-wrapper--vertical"), layout === CARD_LAYOUTS.VERTICAL), "".concat(BEM_BASE, "-wrapper--horizontal"), layout === CARD_LAYOUTS.HORIZONTAL)),
|
|
313035
313036
|
style: {
|
|
@@ -313068,7 +313069,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
313068
313069
|
measurementUnitLabel: measurementUnitLabel,
|
|
313069
313070
|
onClick: onValueClick
|
|
313070
313071
|
}), /*#__PURE__*/React$1.createElement(UnitRenderer$1, {
|
|
313071
|
-
unit:
|
|
313072
|
+
unit: displayUnitLabel,
|
|
313072
313073
|
testId: "".concat(testId, "-unit")
|
|
313073
313074
|
})), !isNil(secondaryValue) ? /*#__PURE__*/React$1.createElement("div", {
|
|
313074
313075
|
"data-testid": "".concat(testId, "-secondary-value"),
|
|
@@ -326904,7 +326905,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
326904
326905
|
description: evt.target.value
|
|
326905
326906
|
}));
|
|
326906
326907
|
},
|
|
326907
|
-
value: description
|
|
326908
|
+
value: getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
|
|
326908
326909
|
})), /*#__PURE__*/React$1.createElement("div", {
|
|
326909
326910
|
className: "".concat(baseClassName, "--input")
|
|
326910
326911
|
}, /*#__PURE__*/React$1.createElement(react.Dropdown, {
|
|
@@ -328808,7 +328809,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
328808
328809
|
unit: evt.target.value
|
|
328809
328810
|
}));
|
|
328810
328811
|
},
|
|
328811
|
-
value: editDataItem.unit
|
|
328812
|
+
value: getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
|
|
328812
328813
|
})), /*#__PURE__*/React$1.createElement("div", {
|
|
328813
328814
|
className: "".concat(baseClassName, "--input-group--item")
|
|
328814
328815
|
}, hasDecimalPlacesDropdown && /*#__PURE__*/React$1.createElement(react.Dropdown, {
|