carbon-addons-iot-react 5.10.0 → 5.10.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.
- package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItemModal.js +1 -1
- package/es/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +1 -1
- package/es/components/GaugeCard/GaugeCard.js +7 -5
- package/es/components/Table/Pagination.js +18 -4
- package/es/components/ToggleTip/index.js +4 -3
- 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/GaugeCard/GaugeCard.js +7 -5
- package/lib/components/Table/Pagination.js +18 -4
- package/lib/components/ToggleTip/index.js +4 -3
- package/lib/components/ValueCard/Attribute.js +2 -1
- package/package.json +1 -1
- package/umd/carbon-addons-iot-react.js +33 -15
|
@@ -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, {
|
|
@@ -24,7 +24,7 @@ import DataStateRenderer from '../Card/DataStateRenderer.js';
|
|
|
24
24
|
import { settings } from '../../constants/Settings.js';
|
|
25
25
|
import { getResizeHandles } from '../../utils/cardUtilityFunctions.js';
|
|
26
26
|
|
|
27
|
-
var _excluded = ["children", "id", "title", "tooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
27
|
+
var _excluded = ["children", "id", "title", "tooltip", "titleTextTooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
28
28
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
29
29
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
30
30
|
var iotPrefix = settings.iotPrefix;
|
|
@@ -80,9 +80,10 @@ var getColor = function getColor(gauge, value) {
|
|
|
80
80
|
var GaugeCard = function GaugeCard(_ref) {
|
|
81
81
|
var children = _ref.children,
|
|
82
82
|
id = _ref.id,
|
|
83
|
-
title = _ref.title
|
|
84
|
-
_ref.tooltip
|
|
85
|
-
|
|
83
|
+
title = _ref.title,
|
|
84
|
+
tooltip = _ref.tooltip,
|
|
85
|
+
titleTextTooltip = _ref.titleTextTooltip,
|
|
86
|
+
gauges = _ref.content.gauges,
|
|
86
87
|
values = _ref.values;
|
|
87
88
|
_ref.data;
|
|
88
89
|
var isLoading = _ref.isLoading,
|
|
@@ -126,7 +127,8 @@ var GaugeCard = function GaugeCard(_ref) {
|
|
|
126
127
|
,
|
|
127
128
|
testId: testID || testId
|
|
128
129
|
}, others, {
|
|
129
|
-
tooltip: "".concat(title),
|
|
130
|
+
tooltip: tooltip || (!titleTextTooltip ? "".concat(title) : undefined),
|
|
131
|
+
titleTextTooltip: titleTextTooltip,
|
|
130
132
|
isLoading: isLoading
|
|
131
133
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
132
134
|
className: classnames("".concat(iotPrefix, "--gauge-container"), className),
|
|
@@ -9,7 +9,7 @@ import classnames from 'classnames';
|
|
|
9
9
|
import { settings } from '../../constants/Settings.js';
|
|
10
10
|
import useSizeObserver from '../../hooks/useSizeObserver.js';
|
|
11
11
|
|
|
12
|
-
var _excluded = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size"];
|
|
12
|
+
var _excluded = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size", "maxPagesConditionalStyle"];
|
|
13
13
|
var iotPrefix = settings.iotPrefix;
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -24,6 +24,7 @@ var SizedPagination = function SizedPagination(_ref) {
|
|
|
24
24
|
disabled = _ref.disabled,
|
|
25
25
|
testId = _ref.testId,
|
|
26
26
|
size = _ref.size,
|
|
27
|
+
maxPagesConditionalStyle = _ref.maxPagesConditionalStyle,
|
|
27
28
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
var _useSizeObserver = useSizeObserver({
|
|
29
30
|
initialWidth: 500
|
|
@@ -36,7 +37,7 @@ var SizedPagination = function SizedPagination(_ref) {
|
|
|
36
37
|
size: size,
|
|
37
38
|
"data-testid": testId,
|
|
38
39
|
disabled: preventInteraction || disabled,
|
|
39
|
-
className: classnames(className, "".concat(iotPrefix, "--pagination"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix, "--pagination--compact"), width < 500), "".concat(iotPrefix, "--pagination--hide-goto-page"),
|
|
40
|
+
className: classnames(className, "".concat(iotPrefix, "--pagination"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(iotPrefix, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix, "--pagination--compact"), width < 500), "".concat(iotPrefix, "--pagination--hide-goto-page"), maxPagesConditionalStyle)),
|
|
40
41
|
style: {
|
|
41
42
|
'--pagination-text-display': width < 500 ? 'none' : 'flex'
|
|
42
43
|
}
|
|
@@ -49,14 +50,16 @@ SizedPagination.propTypes = {
|
|
|
49
50
|
preventInteraction: PropTypes.bool,
|
|
50
51
|
disabled: PropTypes.bool,
|
|
51
52
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
52
|
-
testId: PropTypes.string
|
|
53
|
+
testId: PropTypes.string,
|
|
54
|
+
maxPagesConditionalStyle: PropTypes.bool
|
|
53
55
|
};
|
|
54
56
|
SizedPagination.defaultProps = {
|
|
55
57
|
isItemPerPageHidden: false,
|
|
56
58
|
preventInteraction: false,
|
|
57
59
|
disabled: false,
|
|
58
60
|
testId: 'sized-pagination',
|
|
59
|
-
size: 'lg'
|
|
61
|
+
size: 'lg',
|
|
62
|
+
maxPagesConditionalStyle: false
|
|
60
63
|
};
|
|
61
64
|
SizedPagination.__docgenInfo = {
|
|
62
65
|
"description": "This pagination component hides the items per page selection dropdown if the isItemsPerPageHidden bit is true.\nIt also hides the Items per page and x of x items text if the total width of the pagination bar is less than 500 px.\nIn addition, it narrows padding between 608px and 500px due to overflow issue.",
|
|
@@ -127,6 +130,17 @@ SizedPagination.__docgenInfo = {
|
|
|
127
130
|
}]
|
|
128
131
|
},
|
|
129
132
|
"required": false
|
|
133
|
+
},
|
|
134
|
+
"maxPagesConditionalStyle": {
|
|
135
|
+
"defaultValue": {
|
|
136
|
+
"value": "false",
|
|
137
|
+
"computed": false
|
|
138
|
+
},
|
|
139
|
+
"description": "",
|
|
140
|
+
"type": {
|
|
141
|
+
"name": "bool"
|
|
142
|
+
},
|
|
143
|
+
"required": false
|
|
130
144
|
}
|
|
131
145
|
}
|
|
132
146
|
};
|
|
@@ -13,7 +13,7 @@ import { ToggletipLabel, Toggletip, ToggletipButton, ToggletipContent, Toggletip
|
|
|
13
13
|
import PropTypes from 'prop-types';
|
|
14
14
|
import { Information } from '@carbon/icons-react';
|
|
15
15
|
|
|
16
|
-
var _excluded = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef"];
|
|
16
|
+
var _excluded = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef", "triggerClassName"];
|
|
17
17
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
18
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
19
|
var ToggleTip = function ToggleTip(_ref) {
|
|
@@ -26,8 +26,9 @@ var ToggleTip = function ToggleTip(_ref) {
|
|
|
26
26
|
action = _ref.action,
|
|
27
27
|
useAutoPositioning = _ref.useAutoPositioning,
|
|
28
28
|
showIcon = _ref.showIcon,
|
|
29
|
-
toggleTipLabelRef = _ref.toggleTipLabelRef
|
|
30
|
-
|
|
29
|
+
toggleTipLabelRef = _ref.toggleTipLabelRef;
|
|
30
|
+
_ref.triggerClassName;
|
|
31
|
+
var other = _objectWithoutProperties(_ref, _excluded);
|
|
31
32
|
var newAlign;
|
|
32
33
|
// This function is to pass the old direction, align property to the new align property since The align and direction props have been merged into the align prop
|
|
33
34
|
if (direction === 'bottom' && align === 'center') {
|
|
@@ -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 ||
|
|
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, {
|
|
@@ -37,7 +37,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWith
|
|
|
37
37
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
38
38
|
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
39
39
|
|
|
40
|
-
var _excluded = ["children", "id", "title", "tooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
40
|
+
var _excluded = ["children", "id", "title", "tooltip", "titleTextTooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
41
41
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
42
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
43
43
|
var iotPrefix = Settings.settings.iotPrefix;
|
|
@@ -93,9 +93,10 @@ var getColor = function getColor(gauge, value) {
|
|
|
93
93
|
var GaugeCard = function GaugeCard(_ref) {
|
|
94
94
|
var children = _ref.children,
|
|
95
95
|
id = _ref.id,
|
|
96
|
-
title = _ref.title
|
|
97
|
-
_ref.tooltip
|
|
98
|
-
|
|
96
|
+
title = _ref.title,
|
|
97
|
+
tooltip = _ref.tooltip,
|
|
98
|
+
titleTextTooltip = _ref.titleTextTooltip,
|
|
99
|
+
gauges = _ref.content.gauges,
|
|
99
100
|
values = _ref.values;
|
|
100
101
|
_ref.data;
|
|
101
102
|
var isLoading = _ref.isLoading,
|
|
@@ -139,7 +140,8 @@ var GaugeCard = function GaugeCard(_ref) {
|
|
|
139
140
|
,
|
|
140
141
|
testId: testID || testId
|
|
141
142
|
}, others, {
|
|
142
|
-
tooltip: "".concat(title),
|
|
143
|
+
tooltip: tooltip || (!titleTextTooltip ? "".concat(title) : undefined),
|
|
144
|
+
titleTextTooltip: titleTextTooltip,
|
|
143
145
|
isLoading: isLoading
|
|
144
146
|
}), /*#__PURE__*/React__default.default.createElement("div", {
|
|
145
147
|
className: classnames__default.default("".concat(iotPrefix, "--gauge-container"), className),
|
|
@@ -21,7 +21,7 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
21
21
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
22
22
|
var classnames__default = /*#__PURE__*/_interopDefault(classnames);
|
|
23
23
|
|
|
24
|
-
var _excluded = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size"];
|
|
24
|
+
var _excluded = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size", "maxPagesConditionalStyle"];
|
|
25
25
|
var iotPrefix = Settings.settings.iotPrefix;
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -36,6 +36,7 @@ var SizedPagination = function SizedPagination(_ref) {
|
|
|
36
36
|
disabled = _ref.disabled,
|
|
37
37
|
testId = _ref.testId,
|
|
38
38
|
size = _ref.size,
|
|
39
|
+
maxPagesConditionalStyle = _ref.maxPagesConditionalStyle,
|
|
39
40
|
rest = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
40
41
|
var _useSizeObserver = useSizeObserver({
|
|
41
42
|
initialWidth: 500
|
|
@@ -48,7 +49,7 @@ var SizedPagination = function SizedPagination(_ref) {
|
|
|
48
49
|
size: size,
|
|
49
50
|
"data-testid": testId,
|
|
50
51
|
disabled: preventInteraction || disabled,
|
|
51
|
-
className: classnames__default.default(className, "".concat(iotPrefix, "--pagination"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix, "--pagination--compact"), width < 500), "".concat(iotPrefix, "--pagination--hide-goto-page"),
|
|
52
|
+
className: classnames__default.default(className, "".concat(iotPrefix, "--pagination"), _defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default(_defineProperty__default.default({}, "".concat(iotPrefix, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix, "--pagination--compact"), width < 500), "".concat(iotPrefix, "--pagination--hide-goto-page"), maxPagesConditionalStyle)),
|
|
52
53
|
style: {
|
|
53
54
|
'--pagination-text-display': width < 500 ? 'none' : 'flex'
|
|
54
55
|
}
|
|
@@ -61,14 +62,16 @@ SizedPagination.propTypes = {
|
|
|
61
62
|
preventInteraction: PropTypes__default.default.bool,
|
|
62
63
|
disabled: PropTypes__default.default.bool,
|
|
63
64
|
size: PropTypes__default.default.oneOf(['sm', 'md', 'lg']),
|
|
64
|
-
testId: PropTypes__default.default.string
|
|
65
|
+
testId: PropTypes__default.default.string,
|
|
66
|
+
maxPagesConditionalStyle: PropTypes__default.default.bool
|
|
65
67
|
};
|
|
66
68
|
SizedPagination.defaultProps = {
|
|
67
69
|
isItemPerPageHidden: false,
|
|
68
70
|
preventInteraction: false,
|
|
69
71
|
disabled: false,
|
|
70
72
|
testId: 'sized-pagination',
|
|
71
|
-
size: 'lg'
|
|
73
|
+
size: 'lg',
|
|
74
|
+
maxPagesConditionalStyle: false
|
|
72
75
|
};
|
|
73
76
|
SizedPagination.__docgenInfo = {
|
|
74
77
|
"description": "This pagination component hides the items per page selection dropdown if the isItemsPerPageHidden bit is true.\nIt also hides the Items per page and x of x items text if the total width of the pagination bar is less than 500 px.\nIn addition, it narrows padding between 608px and 500px due to overflow issue.",
|
|
@@ -139,6 +142,17 @@ SizedPagination.__docgenInfo = {
|
|
|
139
142
|
}]
|
|
140
143
|
},
|
|
141
144
|
"required": false
|
|
145
|
+
},
|
|
146
|
+
"maxPagesConditionalStyle": {
|
|
147
|
+
"defaultValue": {
|
|
148
|
+
"value": "false",
|
|
149
|
+
"computed": false
|
|
150
|
+
},
|
|
151
|
+
"description": "",
|
|
152
|
+
"type": {
|
|
153
|
+
"name": "bool"
|
|
154
|
+
},
|
|
155
|
+
"required": false
|
|
142
156
|
}
|
|
143
157
|
}
|
|
144
158
|
};
|
|
@@ -43,7 +43,7 @@ var _objectWithoutProperties__default = /*#__PURE__*/_interopDefault(_objectWith
|
|
|
43
43
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
44
44
|
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
45
45
|
|
|
46
|
-
var _excluded = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef"];
|
|
46
|
+
var _excluded = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef", "triggerClassName"];
|
|
47
47
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
48
48
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty__default.default(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
49
49
|
var ToggleTip = function ToggleTip(_ref) {
|
|
@@ -56,8 +56,9 @@ var ToggleTip = function ToggleTip(_ref) {
|
|
|
56
56
|
action = _ref.action,
|
|
57
57
|
useAutoPositioning = _ref.useAutoPositioning,
|
|
58
58
|
showIcon = _ref.showIcon,
|
|
59
|
-
toggleTipLabelRef = _ref.toggleTipLabelRef
|
|
60
|
-
|
|
59
|
+
toggleTipLabelRef = _ref.toggleTipLabelRef;
|
|
60
|
+
_ref.triggerClassName;
|
|
61
|
+
var other = _objectWithoutProperties__default.default(_ref, _excluded);
|
|
61
62
|
var newAlign;
|
|
62
63
|
// This function is to pass the old direction, align property to the new align property since The align and direction props have been merged into the align prop
|
|
63
64
|
if (direction === 'bottom' && align === 'center') {
|
|
@@ -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 ||
|
|
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
|
@@ -235502,7 +235502,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
235502
235502
|
};
|
|
235503
235503
|
var useDynamicOverflowMenuItems$1 = useDynamicOverflowMenuItems;
|
|
235504
235504
|
|
|
235505
|
-
var _excluded$U = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef"];
|
|
235505
|
+
var _excluded$U = ["triggerText", "triggerBtn", "direction", "align", "renderIcon", "content", "action", "useAutoPositioning", "showIcon", "toggleTipLabelRef", "triggerClassName"];
|
|
235506
235506
|
function ownKeys$1S(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
235507
235507
|
function _objectSpread$1Q(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1S(Object(t), !0).forEach(function (r) { _defineProperty$c(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1S(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
235508
235508
|
var ToggleTip = function ToggleTip(_ref) {
|
|
@@ -235515,8 +235515,9 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
235515
235515
|
action = _ref.action,
|
|
235516
235516
|
useAutoPositioning = _ref.useAutoPositioning,
|
|
235517
235517
|
showIcon = _ref.showIcon,
|
|
235518
|
-
toggleTipLabelRef = _ref.toggleTipLabelRef
|
|
235519
|
-
|
|
235518
|
+
toggleTipLabelRef = _ref.toggleTipLabelRef;
|
|
235519
|
+
_ref.triggerClassName;
|
|
235520
|
+
var other = _objectWithoutProperties$3(_ref, _excluded$U);
|
|
235520
235521
|
var newAlign;
|
|
235521
235522
|
// This function is to pass the old direction, align property to the new align property since The align and direction props have been merged into the align prop
|
|
235522
235523
|
if (direction === 'bottom' && align === 'center') {
|
|
@@ -244148,7 +244149,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
244148
244149
|
};
|
|
244149
244150
|
var TableBody$1 = TableBody;
|
|
244150
244151
|
|
|
244151
|
-
var _excluded$O = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size"];
|
|
244152
|
+
var _excluded$O = ["isItemPerPageHidden", "className", "preventInteraction", "disabled", "testId", "size", "maxPagesConditionalStyle"];
|
|
244152
244153
|
var iotPrefix$1W = settings.iotPrefix;
|
|
244153
244154
|
|
|
244154
244155
|
/**
|
|
@@ -244163,6 +244164,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
244163
244164
|
disabled = _ref.disabled,
|
|
244164
244165
|
testId = _ref.testId,
|
|
244165
244166
|
size = _ref.size,
|
|
244167
|
+
maxPagesConditionalStyle = _ref.maxPagesConditionalStyle,
|
|
244166
244168
|
rest = _objectWithoutProperties$3(_ref, _excluded$O);
|
|
244167
244169
|
var _useSizeObserver = useSizeObserver$1({
|
|
244168
244170
|
initialWidth: 500
|
|
@@ -244175,7 +244177,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
244175
244177
|
size: size,
|
|
244176
244178
|
"data-testid": testId,
|
|
244177
244179
|
disabled: preventInteraction || disabled,
|
|
244178
|
-
className: classnames(className, "".concat(iotPrefix$1W, "--pagination"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1W, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix$1W, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix$1W, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix$1W, "--pagination--compact"), width < 500), "".concat(iotPrefix$1W, "--pagination--hide-goto-page"),
|
|
244180
|
+
className: classnames(className, "".concat(iotPrefix$1W, "--pagination"), _defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c(_defineProperty$c({}, "".concat(iotPrefix$1W, "--pagination--hide-page"), isItemPerPageHidden), "".concat(iotPrefix$1W, "--pagination--hide-select"), preventInteraction), "".concat(iotPrefix$1W, "--pagination--narrow"), width > 500 && width < 608), "".concat(iotPrefix$1W, "--pagination--compact"), width < 500), "".concat(iotPrefix$1W, "--pagination--hide-goto-page"), maxPagesConditionalStyle)),
|
|
244179
244181
|
style: {
|
|
244180
244182
|
'--pagination-text-display': width < 500 ? 'none' : 'flex'
|
|
244181
244183
|
}
|
|
@@ -244188,14 +244190,16 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
244188
244190
|
preventInteraction: PropTypes.bool,
|
|
244189
244191
|
disabled: PropTypes.bool,
|
|
244190
244192
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
244191
|
-
testId: PropTypes.string
|
|
244193
|
+
testId: PropTypes.string,
|
|
244194
|
+
maxPagesConditionalStyle: PropTypes.bool
|
|
244192
244195
|
};
|
|
244193
244196
|
SizedPagination.defaultProps = {
|
|
244194
244197
|
isItemPerPageHidden: false,
|
|
244195
244198
|
preventInteraction: false,
|
|
244196
244199
|
disabled: false,
|
|
244197
244200
|
testId: 'sized-pagination',
|
|
244198
|
-
size: 'lg'
|
|
244201
|
+
size: 'lg',
|
|
244202
|
+
maxPagesConditionalStyle: false
|
|
244199
244203
|
};
|
|
244200
244204
|
SizedPagination.__docgenInfo = {
|
|
244201
244205
|
"description": "This pagination component hides the items per page selection dropdown if the isItemsPerPageHidden bit is true.\nIt also hides the Items per page and x of x items text if the total width of the pagination bar is less than 500 px.\nIn addition, it narrows padding between 608px and 500px due to overflow issue.",
|
|
@@ -244266,6 +244270,17 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
244266
244270
|
}]
|
|
244267
244271
|
},
|
|
244268
244272
|
"required": false
|
|
244273
|
+
},
|
|
244274
|
+
"maxPagesConditionalStyle": {
|
|
244275
|
+
"defaultValue": {
|
|
244276
|
+
"value": "false",
|
|
244277
|
+
"computed": false
|
|
244278
|
+
},
|
|
244279
|
+
"description": "",
|
|
244280
|
+
"type": {
|
|
244281
|
+
"name": "bool"
|
|
244282
|
+
},
|
|
244283
|
+
"required": false
|
|
244269
244284
|
}
|
|
244270
244285
|
}
|
|
244271
244286
|
};
|
|
@@ -296047,6 +296062,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
296047
296062
|
|
|
296048
296063
|
// Get translated label if shouldUseTranslatedLabels is true
|
|
296049
296064
|
var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
|
|
296065
|
+
var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
|
|
296050
296066
|
|
|
296051
296067
|
// Render threshold icon component
|
|
296052
296068
|
var renderThresholdIcon = function renderThresholdIcon() {
|
|
@@ -296096,7 +296112,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
296096
296112
|
}), /*#__PURE__*/React$1.createElement("div", {
|
|
296097
296113
|
className: "".concat(BEM_BASE, "-unit-with-icon")
|
|
296098
296114
|
}, thresholdsIconPosition === 'unit' && renderThresholdIcon(), /*#__PURE__*/React$1.createElement(UnitRenderer$1, {
|
|
296099
|
-
unit: measurementUnitLabel ||
|
|
296115
|
+
unit: measurementUnitLabel || displayUnitLabel,
|
|
296100
296116
|
testId: "".concat(testId, "-unit")
|
|
296101
296117
|
}))), !isNil(secondaryValue) ? /*#__PURE__*/React$1.createElement("div", {
|
|
296102
296118
|
"data-testid": "".concat(testId, "-secondary-value"),
|
|
@@ -306736,7 +306752,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
306736
306752
|
};
|
|
306737
306753
|
var ListCard$1 = ListCard;
|
|
306738
306754
|
|
|
306739
|
-
var _excluded$i = ["children", "id", "title", "tooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
306755
|
+
var _excluded$i = ["children", "id", "title", "tooltip", "titleTextTooltip", "content", "values", "data", "isLoading", "isResizable", "hasMoreData", "size", "className", "dataState", "testID", "testId", "padding"];
|
|
306740
306756
|
function ownKeys$N(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
306741
306757
|
function _objectSpread$N(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$N(Object(t), !0).forEach(function (r) { _defineProperty$c(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$N(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
306742
306758
|
var iotPrefix$S = settings.iotPrefix;
|
|
@@ -306792,9 +306808,10 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
306792
306808
|
var GaugeCard = function GaugeCard(_ref) {
|
|
306793
306809
|
var children = _ref.children,
|
|
306794
306810
|
id = _ref.id,
|
|
306795
|
-
title = _ref.title
|
|
306796
|
-
_ref.tooltip
|
|
306797
|
-
|
|
306811
|
+
title = _ref.title,
|
|
306812
|
+
tooltip = _ref.tooltip,
|
|
306813
|
+
titleTextTooltip = _ref.titleTextTooltip,
|
|
306814
|
+
gauges = _ref.content.gauges,
|
|
306798
306815
|
values = _ref.values;
|
|
306799
306816
|
_ref.data;
|
|
306800
306817
|
var isLoading = _ref.isLoading,
|
|
@@ -306838,7 +306855,8 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
306838
306855
|
,
|
|
306839
306856
|
testId: testID || testId
|
|
306840
306857
|
}, others, {
|
|
306841
|
-
tooltip: "".concat(title),
|
|
306858
|
+
tooltip: tooltip || (!titleTextTooltip ? "".concat(title) : undefined),
|
|
306859
|
+
titleTextTooltip: titleTextTooltip,
|
|
306842
306860
|
isLoading: isLoading
|
|
306843
306861
|
}), /*#__PURE__*/React$1.createElement("div", {
|
|
306844
306862
|
className: classnames("".concat(iotPrefix$S, "--gauge-container"), className),
|
|
@@ -310209,7 +310227,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
310209
310227
|
description: evt.target.value
|
|
310210
310228
|
}));
|
|
310211
310229
|
},
|
|
310212
|
-
value: description
|
|
310230
|
+
value: getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
|
|
310213
310231
|
})), /*#__PURE__*/React$1.createElement("div", {
|
|
310214
310232
|
className: "".concat(baseClassName, "--input")
|
|
310215
310233
|
}, /*#__PURE__*/React$1.createElement(react.Dropdown, {
|
|
@@ -312113,7 +312131,7 @@ ${formatRule(Codicon.menuSubmenu)}
|
|
|
312113
312131
|
unit: evt.target.value
|
|
312114
312132
|
}));
|
|
312115
312133
|
},
|
|
312116
|
-
value: editDataItem.unit
|
|
312134
|
+
value: getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
|
|
312117
312135
|
})), /*#__PURE__*/React$1.createElement("div", {
|
|
312118
312136
|
className: "".concat(baseClassName, "--input-group--item")
|
|
312119
312137
|
}, hasDecimalPlacesDropdown && /*#__PURE__*/React$1.createElement(react.Dropdown, {
|