carbon-addons-iot-react 5.9.2 → 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.
Files changed (30) hide show
  1. package/es/components/Card/Card.js +18 -5
  2. package/es/components/CardEditor/CardEditForm/CardEditForm.js +16 -0
  3. package/es/components/CardEditor/CardEditForm/CardEditFormContent.js +17 -0
  4. package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItemModal.js +19 -4
  5. package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +19 -2
  6. package/es/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +18 -2
  7. package/es/components/CardEditor/CardEditor.js +16 -0
  8. package/es/components/DashboardEditor/DashboardEditor.js +19 -1
  9. package/es/components/DashboardEditor/DashboardEditorCardRenderer.js +4 -2
  10. package/es/components/ValueCard/Attribute.js +40 -3
  11. package/es/components/ValueCard/ValueCard.js +15 -3
  12. package/es/components/ValueCard/ValueContent.js +19 -2
  13. package/es/constants/CardPropTypes.js +2 -0
  14. package/es/utils/cardUtilityFunctions.js +16 -1
  15. package/lib/components/Card/Card.js +17 -4
  16. package/lib/components/CardEditor/CardEditForm/CardEditForm.js +16 -0
  17. package/lib/components/CardEditor/CardEditForm/CardEditFormContent.js +17 -0
  18. package/lib/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItemModal.js +18 -3
  19. package/lib/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +19 -2
  20. package/lib/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +18 -2
  21. package/lib/components/CardEditor/CardEditor.js +16 -0
  22. package/lib/components/DashboardEditor/DashboardEditor.js +19 -1
  23. package/lib/components/DashboardEditor/DashboardEditorCardRenderer.js +4 -2
  24. package/lib/components/ValueCard/Attribute.js +40 -3
  25. package/lib/components/ValueCard/ValueCard.js +15 -3
  26. package/lib/components/ValueCard/ValueContent.js +19 -2
  27. package/lib/constants/CardPropTypes.js +2 -0
  28. package/lib/utils/cardUtilityFunctions.js +16 -0
  29. package/package.json +1 -1
  30. package/umd/carbon-addons-iot-react.js +230 -22
@@ -264425,6 +264425,8 @@ ${formatRule(Codicon.menuSubmenu)}
264425
264425
  defaultFilterStringPlaceholdText: PropTypes.string,
264426
264426
  downloadIconDescription: PropTypes.string
264427
264427
  }),
264428
+ /** whether to use translated labels in cards */
264429
+ shouldUseTranslatedLabels: PropTypes.bool,
264428
264430
  cardVariables: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.func, PropTypes.number, PropTypes.bool])),
264429
264431
  /** default date format pattern that follows the dayjs formatting patterns */
264430
264432
  defaultDateFormatPattern: PropTypes.string
@@ -267064,6 +267066,20 @@ ${formatRule(Codicon.menuSubmenu)}
267064
267066
  })) || ((_card$content2 = card.content) === null || _card$content2 === void 0 ? void 0 : _card$content2.type) === BAR_CHART_TYPES.SIMPLE && ((_card$content3 = card.content) === null || _card$content3 === void 0 ? void 0 : _card$content3.timeDataSourceId) || ((_card$content4 = card.content) === null || _card$content4 === void 0 ? void 0 : _card$content4.type) === BAR_CHART_TYPES.STACKED && ((_card$content5 = card.content) === null || _card$content5 === void 0 ? void 0 : _card$content5.timeDataSourceId);
267065
267067
  };
267066
267068
 
267069
+ /**
267070
+ * Get translated label or title from i18n object, fallback to original if not found
267071
+ * @param {string} label - The label or title key to translate
267072
+ * @param {boolean} shouldUseTranslatedLabels - Flag to determine if translation should be used
267073
+ * @param {Object} i18n - The i18n object containing translations
267074
+ * @returns {string} - The translated label or original label if translation not found
267075
+ */
267076
+ var getTranslatedLabel = function getTranslatedLabel(label, shouldUseTranslatedLabels, i18n) {
267077
+ if (!isEmpty(label) && shouldUseTranslatedLabels && i18n && i18n[label]) {
267078
+ return i18n[label];
267079
+ }
267080
+ return label;
267081
+ };
267082
+
267067
267083
  var REPLACE = wellKnownSymbol('replace');
267068
267084
  var $TypeError = TypeError;
267069
267085
  var indexOf = functionUncurryThis(''.indexOf);
@@ -268368,7 +268384,7 @@ ${formatRule(Codicon.menuSubmenu)}
268368
268384
  };
268369
268385
 
268370
268386
  var _excluded$F = ["isSelected", "children", "dimensions", "id", "style", "className", "onScroll", "onMouseDown", "onMouseUp", "onTouchEnd", "onTouchStart", "onFocus", "onBlur", "tabIndex", "testID", "testId"],
268371
- _excluded2$4 = ["size", "children", "title", "subtitle", "hasTitleWrap", "layout", "isLoading", "isEmpty", "isEditable", "isExpanded", "isLazyLoading", "isResizable", "resizeHandles", "error", "hideHeader", "id", "tooltip", "titleTextTooltip", "timeRange", "timeRangeOptions", "onCardAction", "availableActions", "renderExpandIcon", "renderDateDropdownInPortal", "breakpoint", "i18n", "style", "className", "values", "testID", "testId", "contentClassName", "footerContent", "dateTimeMask", "extraActions", "padding", "overrides", "type", "data", "content", "extraHeaderContent"];
268387
+ _excluded2$4 = ["size", "children", "title", "subtitle", "hasTitleWrap", "layout", "isLoading", "isEmpty", "isEditable", "isExpanded", "isLazyLoading", "isResizable", "resizeHandles", "error", "hideHeader", "id", "tooltip", "titleTextTooltip", "timeRange", "timeRangeOptions", "onCardAction", "availableActions", "renderExpandIcon", "renderDateDropdownInPortal", "breakpoint", "i18n", "style", "className", "values", "testID", "testId", "contentClassName", "footerContent", "dateTimeMask", "extraActions", "padding", "overrides", "type", "data", "content", "extraHeaderContent", "shouldUseTranslatedLabels"];
268372
268388
  function ownKeys$1p(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; }
268373
268389
  function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1p(Object(t), !0).forEach(function (r) { _defineProperty$c(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1p(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
268374
268390
  var prefix$l = settings.prefix,
@@ -268584,7 +268600,8 @@ ${formatRule(Codicon.menuSubmenu)}
268584
268600
  overrides: undefined,
268585
268601
  type: null,
268586
268602
  data: null,
268587
- content: null
268603
+ content: null,
268604
+ shouldUseTranslatedLabels: false
268588
268605
  };
268589
268606
 
268590
268607
  /** Dumb component that renders the card basics */
@@ -268592,7 +268609,7 @@ ${formatRule(Codicon.menuSubmenu)}
268592
268609
  var _overrides$errorMessa, _overrides$errorMessa2, _overrides$errorMessa3;
268593
268610
  var size = props.size,
268594
268611
  children = props.children,
268595
- title = props.title,
268612
+ titleProp = props.title,
268596
268613
  subtitleProp = props.subtitle,
268597
268614
  hasTitleWrap = props.hasTitleWrap;
268598
268615
  props.layout;
@@ -268606,7 +268623,7 @@ ${formatRule(Codicon.menuSubmenu)}
268606
268623
  error = props.error,
268607
268624
  hideHeader = props.hideHeader,
268608
268625
  id = props.id,
268609
- tooltip = props.tooltip,
268626
+ tooltipProp = props.tooltip,
268610
268627
  titleTextTooltip = props.titleTextTooltip,
268611
268628
  timeRange = props.timeRange,
268612
268629
  timeRangeOptions = props.timeRangeOptions,
@@ -268631,8 +268648,13 @@ ${formatRule(Codicon.menuSubmenu)}
268631
268648
  data = props.data,
268632
268649
  content = props.content,
268633
268650
  extraHeaderContent = props.extraHeaderContent,
268651
+ shouldUseTranslatedLabels = props.shouldUseTranslatedLabels,
268634
268652
  others = _objectWithoutProperties$3(props, _excluded2$4);
268635
268653
 
268654
+ // Get translated title if shouldUseTranslatedLabels is true
268655
+ var title = getTranslatedLabel(titleProp, shouldUseTranslatedLabels, i18n);
268656
+ var tooltip = getTranslatedLabel(tooltipProp, shouldUseTranslatedLabels, i18n);
268657
+
268636
268658
  // TODO: remove once final version of range prop is supported
268637
268659
  React$1.useEffect(function () {
268638
268660
  if (typeof (availableActions === null || availableActions === void 0 ? void 0 : availableActions.range) === 'string') {
@@ -269120,6 +269142,13 @@ ${formatRule(Codicon.menuSubmenu)}
269120
269142
  "computed": false
269121
269143
  },
269122
269144
  "required": false
269145
+ },
269146
+ "shouldUseTranslatedLabels": {
269147
+ "defaultValue": {
269148
+ "value": "false",
269149
+ "computed": false
269150
+ },
269151
+ "required": false
269123
269152
  }
269124
269153
  },
269125
269154
  "composes": ["../../constants/CardPropTypes"]
@@ -295936,6 +295965,9 @@ ${formatRule(Codicon.menuSubmenu)}
295936
295965
  isEditable: PropTypes.bool,
295937
295966
  layout: PropTypes.oneOf(Object.values(CARD_LAYOUTS)),
295938
295967
  locale: PropTypes.string,
295968
+ /** whether to use translated labels in cards */
295969
+ shouldUseTranslatedLabels: PropTypes.bool,
295970
+ i18n: PropTypes.objectOf(PropTypes.any),
295939
295971
  renderIconByName: PropTypes.func,
295940
295972
  /** Optional trend information */
295941
295973
  secondaryValue: PropTypes.shape({
@@ -295964,6 +295996,8 @@ ${formatRule(Codicon.menuSubmenu)}
295964
295996
  customFormatter: null,
295965
295997
  formatter: null,
295966
295998
  isEditable: false,
295999
+ shouldUseTranslatedLabels: false,
296000
+ i18n: {},
295967
296001
  testId: 'attribute',
295968
296002
  onValueClick: null
295969
296003
  };
@@ -295990,6 +296024,8 @@ ${formatRule(Codicon.menuSubmenu)}
295990
296024
  isEditable = _ref.isEditable,
295991
296025
  layout = _ref.layout,
295992
296026
  locale = _ref.locale,
296027
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
296028
+ i18n = _ref.i18n,
295993
296029
  renderIconByName = _ref.renderIconByName,
295994
296030
  secondaryValue = _ref.secondaryValue,
295995
296031
  value = _ref.value,
@@ -296009,6 +296045,10 @@ ${formatRule(Codicon.menuSubmenu)}
296009
296045
  // need to reduce the width size to fit multiple attributes when card layout is horizontal
296010
296046
  var attributeWidthPercentage = layout === CARD_LAYOUTS.HORIZONTAL ? 100 / attributeCount : 100;
296011
296047
 
296048
+ // Get translated label if shouldUseTranslatedLabels is true
296049
+ var displayLabel = getTranslatedLabel(label, shouldUseTranslatedLabels, i18n);
296050
+ var displayUnitLabel = getTranslatedLabel(unit, shouldUseTranslatedLabels, i18n);
296051
+
296012
296052
  // Render threshold icon component
296013
296053
  var renderThresholdIcon = function renderThresholdIcon() {
296014
296054
  if (!(matchingThreshold !== null && matchingThreshold !== void 0 && matchingThreshold.icon)) return null;
@@ -296034,10 +296074,10 @@ ${formatRule(Codicon.menuSubmenu)}
296034
296074
  }, thresholdsIconPosition === 'label' && renderThresholdIcon(), tooltip ? /*#__PURE__*/React$1.createElement(Tooltip, {
296035
296075
  direction: "right",
296036
296076
  showIcon: false,
296037
- triggerText: label
296077
+ triggerText: displayLabel
296038
296078
  }, /*#__PURE__*/React$1.createElement("p", null, tooltip)) : /*#__PURE__*/React$1.createElement("span", {
296039
296079
  "data-testid": "".concat(testId, "-threshold-label")
296040
- }, label)), /*#__PURE__*/React$1.createElement("div", {
296080
+ }, displayLabel)), /*#__PURE__*/React$1.createElement("div", {
296041
296081
  className: "".concat(BEM_BASE)
296042
296082
  }, /*#__PURE__*/React$1.createElement(ValueRenderer$1, {
296043
296083
  value: value,
@@ -296057,7 +296097,7 @@ ${formatRule(Codicon.menuSubmenu)}
296057
296097
  }), /*#__PURE__*/React$1.createElement("div", {
296058
296098
  className: "".concat(BEM_BASE, "-unit-with-icon")
296059
296099
  }, thresholdsIconPosition === 'unit' && renderThresholdIcon(), /*#__PURE__*/React$1.createElement(UnitRenderer$1, {
296060
- unit: measurementUnitLabel || unit,
296100
+ unit: measurementUnitLabel || displayUnitLabel,
296061
296101
  testId: "".concat(testId, "-unit")
296062
296102
  }))), !isNil(secondaryValue) ? /*#__PURE__*/React$1.createElement("div", {
296063
296103
  "data-testid": "".concat(testId, "-secondary-value"),
@@ -296228,6 +296268,31 @@ ${formatRule(Codicon.menuSubmenu)}
296228
296268
  },
296229
296269
  "required": false
296230
296270
  },
296271
+ "shouldUseTranslatedLabels": {
296272
+ "defaultValue": {
296273
+ "value": "false",
296274
+ "computed": false
296275
+ },
296276
+ "description": "whether to use translated labels in cards",
296277
+ "type": {
296278
+ "name": "bool"
296279
+ },
296280
+ "required": false
296281
+ },
296282
+ "i18n": {
296283
+ "defaultValue": {
296284
+ "value": "{}",
296285
+ "computed": false
296286
+ },
296287
+ "description": "",
296288
+ "type": {
296289
+ "name": "objectOf",
296290
+ "value": {
296291
+ "name": "any"
296292
+ }
296293
+ },
296294
+ "required": false
296295
+ },
296231
296296
  "testId": {
296232
296297
  "defaultValue": {
296233
296298
  "value": "'attribute'",
@@ -296365,7 +296430,7 @@ ${formatRule(Codicon.menuSubmenu)}
296365
296430
  };
296366
296431
  var Attribute$1 = Attribute;
296367
296432
 
296368
- var _excluded$q = ["id", "title", "content", "values", "layout", "dataState", "locale", "isEditable", "customFormatter", "formatter", "fontSize", "isNumberValueCompact", "testId", "onAttributeClick", "size"];
296433
+ var _excluded$q = ["id", "title", "content", "values", "layout", "dataState", "locale", "isEditable", "shouldUseTranslatedLabels", "customFormatter", "formatter", "fontSize", "isNumberValueCompact", "testId", "onAttributeClick", "size"];
296369
296434
  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; }
296370
296435
  function _objectSpread$Y(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$c(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; }
296371
296436
  var propTypes$15 = _objectSpread$Y({
@@ -296373,7 +296438,9 @@ ${formatRule(Codicon.menuSubmenu)}
296373
296438
  title: PropTypes.string,
296374
296439
  layout: PropTypes.oneOf(['HORIZONTAL', 'VERTICAL']),
296375
296440
  locale: PropTypes.string,
296376
- isEditable: PropTypes.bool
296441
+ isEditable: PropTypes.bool,
296442
+ /** whether to use translated labels in cards */
296443
+ shouldUseTranslatedLabels: PropTypes.bool
296377
296444
  }, ValueContentPropTypes);
296378
296445
  var defaultProps$18 = {
296379
296446
  id: 'valueContent-id',
@@ -296381,6 +296448,7 @@ ${formatRule(Codicon.menuSubmenu)}
296381
296448
  layout: 'VERTICAL',
296382
296449
  locale: 'en',
296383
296450
  isEditable: false,
296451
+ shouldUseTranslatedLabels: false,
296384
296452
  dataState: null,
296385
296453
  values: null,
296386
296454
  fontSize: DEFAULT_FONT_SIZE,
@@ -296400,6 +296468,7 @@ ${formatRule(Codicon.menuSubmenu)}
296400
296468
  dataState = _ref.dataState,
296401
296469
  locale = _ref.locale,
296402
296470
  isEditable = _ref.isEditable,
296471
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
296403
296472
  customFormatter = _ref.customFormatter,
296404
296473
  formatter = _ref.formatter,
296405
296474
  fontSize = _ref.fontSize,
@@ -296420,6 +296489,8 @@ ${formatRule(Codicon.menuSubmenu)}
296420
296489
  locale: locale,
296421
296490
  isEditable: isEditable,
296422
296491
  title: title,
296492
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
296493
+ i18n: others.i18n,
296423
296494
  renderIconByName: others.renderIconByName,
296424
296495
  value: determineValue(attribute.dataSourceId, values, attribute.dataFilter),
296425
296496
  secondaryValue: attribute.secondaryValue && _objectSpread$Y(_objectSpread$Y({}, attribute.secondaryValue), {}, {
@@ -296510,6 +296581,17 @@ ${formatRule(Codicon.menuSubmenu)}
296510
296581
  },
296511
296582
  "required": false
296512
296583
  },
296584
+ "shouldUseTranslatedLabels": {
296585
+ "defaultValue": {
296586
+ "value": "false",
296587
+ "computed": false
296588
+ },
296589
+ "description": "whether to use translated labels in cards",
296590
+ "type": {
296591
+ "name": "bool"
296592
+ },
296593
+ "required": false
296594
+ },
296513
296595
  "dataState": {
296514
296596
  "defaultValue": {
296515
296597
  "value": "null",
@@ -296578,7 +296660,7 @@ ${formatRule(Codicon.menuSubmenu)}
296578
296660
  };
296579
296661
  var ValueContent$1 = ValueContent;
296580
296662
 
296581
- var _excluded$p = ["title", "content", "size", "values", "isEditable", "isResizable", "i18n", "dataState", "id", "locale", "customFormatter", "formatter", "children", "fontSize", "isNumberValueCompact", "testID", "testId", "onAttributeClick", "className"];
296663
+ var _excluded$p = ["title", "content", "size", "values", "isEditable", "isResizable", "i18n", "dataState", "id", "locale", "customFormatter", "formatter", "children", "fontSize", "isNumberValueCompact", "testID", "testId", "onAttributeClick", "className", "shouldUseTranslatedLabels"];
296582
296664
  function ownKeys$Z(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; }
296583
296665
  function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$Z(Object(t), !0).forEach(function (r) { _defineProperty$c(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$Z(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
296584
296666
 
@@ -296608,6 +296690,7 @@ ${formatRule(Codicon.menuSubmenu)}
296608
296690
  testId = _ref.testId,
296609
296691
  onAttributeClick = _ref.onAttributeClick,
296610
296692
  className = _ref.className,
296693
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
296611
296694
  others = _objectWithoutProperties$3(_ref, _excluded$p);
296612
296695
  var availableActions = _objectSpread$X({
296613
296696
  expand: false
@@ -296632,6 +296715,7 @@ ${formatRule(Codicon.menuSubmenu)}
296632
296715
  isResizable: isResizable,
296633
296716
  resizeHandles: resizeHandles,
296634
296717
  i18n: i18n,
296718
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
296635
296719
  locale: locale,
296636
296720
  id: id,
296637
296721
  className: classnames(className, _defineProperty$c(_defineProperty$c({}, "".concat(BASE_CLASS_NAME$2, "__horizontal"), layout === CARD_LAYOUTS.HORIZONTAL), "".concat(BASE_CLASS_NAME$2, "__vertical"), layout === CARD_LAYOUTS.VERTICAL))
@@ -296655,7 +296739,9 @@ ${formatRule(Codicon.menuSubmenu)}
296655
296739
  values: values,
296656
296740
  isEditable: isEditable,
296657
296741
  fontSize: fontSize,
296658
- isNumberValueCompact: isNumberValueCompact
296742
+ isNumberValueCompact: isNumberValueCompact,
296743
+ i18n: i18n,
296744
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels
296659
296745
  }, others)), resizeHandles);
296660
296746
  };
296661
296747
  ValueCard.propTypes = _objectSpread$X(_objectSpread$X({}, CardPropTypes), ValueContentPropTypes);
@@ -296672,7 +296758,8 @@ ${formatRule(Codicon.menuSubmenu)}
296672
296758
  isNumberValueCompact: false,
296673
296759
  // TODO: fix this default in V3, so that cards are unique not inherited from the base Card
296674
296760
  testId: 'Card',
296675
- onAttributeClick: null
296761
+ onAttributeClick: null,
296762
+ shouldUseTranslatedLabels: false
296676
296763
  };
296677
296764
  ValueCard.__docgenInfo = {
296678
296765
  "description": "This components responsibilities include:\nRendering the attribute groups\nDetermining the layout\ndetermines the data to render",
@@ -296755,6 +296842,13 @@ ${formatRule(Codicon.menuSubmenu)}
296755
296842
  "computed": false
296756
296843
  },
296757
296844
  "required": false
296845
+ },
296846
+ "shouldUseTranslatedLabels": {
296847
+ "defaultValue": {
296848
+ "value": "false",
296849
+ "computed": false
296850
+ },
296851
+ "required": false
296758
296852
  }
296759
296853
  },
296760
296854
  "composes": ["../../constants/CardPropTypes"]
@@ -310014,6 +310108,8 @@ ${formatRule(Codicon.menuSubmenu)}
310014
310108
  thisQuarterLabel: PropTypes.string,
310015
310109
  thisYearLabel: PropTypes.string
310016
310110
  }),
310111
+ /** whether to use translated labels in cards */
310112
+ shouldUseTranslatedLabels: PropTypes.bool,
310017
310113
  /** if provided, returns an array of strings which are the timeRanges to be allowed
310018
310114
  * on each card
310019
310115
  * getValidTimeRanges(card, selectedDataItems)
@@ -310047,6 +310143,7 @@ ${formatRule(Codicon.menuSubmenu)}
310047
310143
  thisQuarterLabel: 'This quarter',
310048
310144
  thisYearLabel: 'This year'
310049
310145
  },
310146
+ shouldUseTranslatedLabels: false,
310050
310147
  selectedDataItems: [],
310051
310148
  getValidTimeRanges: null,
310052
310149
  currentBreakpoint: 'xl',
@@ -310070,6 +310167,7 @@ ${formatRule(Codicon.menuSubmenu)}
310070
310167
  var cardConfig = _ref.cardConfig,
310071
310168
  _onChange = _ref.onChange,
310072
310169
  i18n = _ref.i18n,
310170
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
310073
310171
  getValidTimeRanges = _ref.getValidTimeRanges,
310074
310172
  currentBreakpoint = _ref.currentBreakpoint,
310075
310173
  selectedDataItems = _ref.selectedDataItems,
@@ -310100,7 +310198,7 @@ ${formatRule(Codicon.menuSubmenu)}
310100
310198
  title: evt.target.value
310101
310199
  }));
310102
310200
  },
310103
- value: title
310201
+ value: getTranslatedLabel(title, shouldUseTranslatedLabels, mergedI18n)
310104
310202
  })), /*#__PURE__*/React$1.createElement("div", {
310105
310203
  className: "".concat(baseClassName, "--input")
310106
310204
  }, /*#__PURE__*/React$1.createElement(react.TextArea, {
@@ -310112,7 +310210,7 @@ ${formatRule(Codicon.menuSubmenu)}
310112
310210
  description: evt.target.value
310113
310211
  }));
310114
310212
  },
310115
- value: description
310213
+ value: getTranslatedLabel(description, shouldUseTranslatedLabels, mergedI18n)
310116
310214
  })), /*#__PURE__*/React$1.createElement("div", {
310117
310215
  className: "".concat(baseClassName, "--input")
310118
310216
  }, /*#__PURE__*/React$1.createElement(react.Dropdown, {
@@ -310393,6 +310491,17 @@ ${formatRule(Codicon.menuSubmenu)}
310393
310491
  },
310394
310492
  "required": false
310395
310493
  },
310494
+ "shouldUseTranslatedLabels": {
310495
+ "defaultValue": {
310496
+ "value": "false",
310497
+ "computed": false
310498
+ },
310499
+ "description": "whether to use translated labels in cards",
310500
+ "type": {
310501
+ "name": "bool"
310502
+ },
310503
+ "required": false
310504
+ },
310396
310505
  "selectedDataItems": {
310397
310506
  "defaultValue": {
310398
310507
  "value": "[]",
@@ -311675,6 +311784,8 @@ ${formatRule(Codicon.menuSubmenu)}
311675
311784
  primaryButtonLabelText: PropTypes.string,
311676
311785
  secondaryButtonLabelText: PropTypes.string
311677
311786
  }),
311787
+ /** whether to use translated labels in cards */
311788
+ shouldUseTranslatedLabels: PropTypes.bool,
311678
311789
  actions: DashboardEditorActionsPropTypes,
311679
311790
  /**
311680
311791
  * Used to override the default behaviour of handleDataItemEdit. if we dont pass any function then it uses handleDefaultDataItemEdit function by default
@@ -311728,6 +311839,7 @@ ${formatRule(Codicon.menuSubmenu)}
311728
311839
  secondaryButtonLabelText: 'Cancel',
311729
311840
  decimalPlacesLabel: 'Decimal places'
311730
311841
  },
311842
+ shouldUseTranslatedLabels: false,
311731
311843
  editDataSeries: [],
311732
311844
  showEditor: false,
311733
311845
  setShowEditor: null,
@@ -311798,6 +311910,7 @@ ${formatRule(Codicon.menuSubmenu)}
311798
311910
  availableDimensions = _ref.availableDimensions,
311799
311911
  onChange = _ref.onChange,
311800
311912
  i18n = _ref.i18n,
311913
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
311801
311914
  isLarge = _ref.isLarge,
311802
311915
  _ref$actions$dataSeri = _ref.actions.dataSeriesFormActions,
311803
311916
  hasAggregationsDropDown = _ref$actions$dataSeri.hasAggregationsDropDown,
@@ -311954,7 +312067,7 @@ ${formatRule(Codicon.menuSubmenu)}
311954
312067
  label: evt.target.value
311955
312068
  }));
311956
312069
  },
311957
- value: editDataItem.label,
312070
+ value: getTranslatedLabel(editDataItem.label, shouldUseTranslatedLabels, i18n),
311958
312071
  helperText: mergedI18n.dataItemEditorDataItemHelperText(mergedI18n.dataItemSource, editDataItem.dataItemId)
311959
312072
  })), hasColorDropdown &&
311960
312073
  /*#__PURE__*/
@@ -312001,7 +312114,7 @@ ${formatRule(Codicon.menuSubmenu)}
312001
312114
  unit: evt.target.value
312002
312115
  }));
312003
312116
  },
312004
- value: editDataItem.unit
312117
+ value: getTranslatedLabel(editDataItem.unit, shouldUseTranslatedLabels, i18n)
312005
312118
  })), /*#__PURE__*/React$1.createElement("div", {
312006
312119
  className: "".concat(baseClassName, "--input-group--item")
312007
312120
  }, hasDecimalPlacesDropdown && /*#__PURE__*/React$1.createElement(react.Dropdown, {
@@ -312099,7 +312212,7 @@ ${formatRule(Codicon.menuSubmenu)}
312099
312212
  },
312100
312213
  columnType: editDataItem.columnType || editDataItem.type
312101
312214
  }));
312102
- }, [availableDimensions, availableDimensionsItems, availableGrains, baseClassName, cardConfig, editDataItem, handleTranslation, hasAggregationsDropDown, hasColorDropdown, hasDataFilterDropdown, hasDecimalPlacesDropdown, hasGrainsDropDown, hasThresholds, hasTooltip, hasUnit, id, initialAggregation, initialGrain, isSummaryDashboard, isTimeBasedCard$1, mergedI18n, selectedDimensionFilter, setEditDataItem, type]);
312215
+ }, [availableDimensions, availableDimensionsItems, availableGrains, baseClassName, cardConfig, editDataItem, handleTranslation, hasAggregationsDropDown, hasColorDropdown, hasDataFilterDropdown, hasDecimalPlacesDropdown, hasGrainsDropDown, hasThresholds, hasTooltip, hasUnit, i18n, id, initialAggregation, initialGrain, isSummaryDashboard, isTimeBasedCard$1, mergedI18n, selectedDimensionFilter, setEditDataItem, shouldUseTranslatedLabels, type]);
312103
312216
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, showEditor && /*#__PURE__*/React$1.createElement("div", {
312104
312217
  className: "".concat(baseClassName, "--modal-wrapper")
312105
312218
  }, /*#__PURE__*/React$1.createElement(ComposedModal$1, {
@@ -312329,6 +312442,17 @@ ${formatRule(Codicon.menuSubmenu)}
312329
312442
  },
312330
312443
  "required": false
312331
312444
  },
312445
+ "shouldUseTranslatedLabels": {
312446
+ "defaultValue": {
312447
+ "value": "false",
312448
+ "computed": false
312449
+ },
312450
+ "description": "whether to use translated labels in cards",
312451
+ "type": {
312452
+ "name": "bool"
312453
+ },
312454
+ "required": false
312455
+ },
312332
312456
  "editDataSeries": {
312333
312457
  "defaultValue": {
312334
312458
  "value": "[]",
@@ -313286,6 +313410,8 @@ ${formatRule(Codicon.menuSubmenu)}
313286
313410
  incrementNumberText: PropTypes.string,
313287
313411
  decrementNumberText: PropTypes.string
313288
313412
  }),
313413
+ /** whether to use translated labels in cards */
313414
+ shouldUseTranslatedLabels: PropTypes.bool,
313289
313415
  translateWithId: PropTypes.func.isRequired,
313290
313416
  actions: DashboardEditorActionsPropTypes
313291
313417
  };
@@ -313319,6 +313445,7 @@ ${formatRule(Codicon.menuSubmenu)}
313319
313445
  incrementNumberText: 'Increment number',
313320
313446
  decrementNumberText: 'Decrement number'
313321
313447
  },
313448
+ shouldUseTranslatedLabels: false,
313322
313449
  getValidDataItems: null,
313323
313450
  dataItems: [],
313324
313451
  selectedDataItems: [],
@@ -313406,6 +313533,7 @@ ${formatRule(Codicon.menuSubmenu)}
313406
313533
  selectedTimeRange = _ref2.selectedTimeRange,
313407
313534
  availableDimensions = _ref2.availableDimensions,
313408
313535
  i18n = _ref2.i18n,
313536
+ shouldUseTranslatedLabels = _ref2.shouldUseTranslatedLabels,
313409
313537
  dataSeriesItemLinks = _ref2.dataSeriesItemLinks,
313410
313538
  translateWithId = _ref2.translateWithId,
313411
313539
  actions = _ref2.actions;
@@ -313551,7 +313679,7 @@ ${formatRule(Codicon.menuSubmenu)}
313551
313679
  return {
313552
313680
  id: dataItem.dataSourceId,
313553
313681
  content: {
313554
- value: dataItem.label || dataItem.dataItemId,
313682
+ value: getTranslatedLabel(dataItem.label || dataItem.dataItemId, shouldUseTranslatedLabels, i18n),
313555
313683
  icon: cardConfig.type === CARD_TYPES.TIMESERIES || cardConfig.type === CARD_TYPES.BAR ? /*#__PURE__*/React$1.createElement("div", {
313556
313684
  className: "".concat(baseClassName$3, "--data-item-list--item-color-icon"),
313557
313685
  style: {
@@ -313588,7 +313716,7 @@ ${formatRule(Codicon.menuSubmenu)}
313588
313716
  }
313589
313717
  };
313590
313718
  })) || [];
313591
- }, [cardConfig.type, handleEditButton, handleRemoveButton, mergedI18n.edit, mergedI18n.remove]);
313719
+ }, [cardConfig.type, handleEditButton, handleRemoveButton, i18n, mergedI18n.edit, mergedI18n.remove, shouldUseTranslatedLabels]);
313592
313720
  var dataItemListItems = React$1.useMemo(function () {
313593
313721
  return generateListItems(dataSection);
313594
313722
  }, [dataSection, generateListItems]);
@@ -313609,6 +313737,7 @@ ${formatRule(Codicon.menuSubmenu)}
313609
313737
  dataSection: dataSection,
313610
313738
  onChange: _onChange,
313611
313739
  i18n: mergedI18n,
313740
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
313612
313741
  actions: actions,
313613
313742
  options: {
313614
313743
  hasColorDropdown: type === CARD_TYPES.TIMESERIES || type === CARD_TYPES.BAR,
@@ -313930,6 +314059,17 @@ ${formatRule(Codicon.menuSubmenu)}
313930
314059
  },
313931
314060
  "required": false
313932
314061
  },
314062
+ "shouldUseTranslatedLabels": {
314063
+ "defaultValue": {
314064
+ "value": "false",
314065
+ "computed": false
314066
+ },
314067
+ "description": "whether to use translated labels in cards",
314068
+ "type": {
314069
+ "name": "bool"
314070
+ },
314071
+ "required": false
314072
+ },
313933
314073
  "getValidDataItems": {
313934
314074
  "defaultValue": {
313935
314075
  "value": "null",
@@ -319425,6 +319565,8 @@ ${formatRule(Codicon.menuSubmenu)}
319425
319565
  thisQuarterLabel: PropTypes.string,
319426
319566
  thisYearLabel: PropTypes.string
319427
319567
  }),
319568
+ /** whether to use translated labels in cards */
319569
+ shouldUseTranslatedLabels: PropTypes.bool,
319428
319570
  /** if provided, returns an array of strings which are the timeRanges to be allowed
319429
319571
  * on each card
319430
319572
  * getValidTimeRanges(card, selectedDataItems)
@@ -319461,6 +319603,7 @@ ${formatRule(Codicon.menuSubmenu)}
319461
319603
  var defaultProps$G = {
319462
319604
  cardConfig: {},
319463
319605
  i18n: {},
319606
+ shouldUseTranslatedLabels: false,
319464
319607
  getValidDataItems: null,
319465
319608
  getValidTimeRanges: null,
319466
319609
  dataItems: [],
@@ -319490,6 +319633,7 @@ ${formatRule(Codicon.menuSubmenu)}
319490
319633
  isSummaryDashboard = _ref.isSummaryDashboard,
319491
319634
  onChange = _ref.onChange,
319492
319635
  i18n = _ref.i18n,
319636
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
319493
319637
  dataItems = _ref.dataItems,
319494
319638
  getValidDataItems = _ref.getValidDataItems,
319495
319639
  getValidTimeRanges = _ref.getValidTimeRanges,
@@ -319524,6 +319668,7 @@ ${formatRule(Codicon.menuSubmenu)}
319524
319668
  ,
319525
319669
  onChange: onChange,
319526
319670
  i18n: mergedI18n,
319671
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
319527
319672
  getValidTimeRanges: getValidTimeRanges,
319528
319673
  currentBreakpoint: currentBreakpoint,
319529
319674
  selectedDataItems: selectedDataItems,
@@ -319570,6 +319715,7 @@ ${formatRule(Codicon.menuSubmenu)}
319570
319715
  getValidDataItems: getValidDataItems,
319571
319716
  availableDimensions: availableDimensions,
319572
319717
  i18n: mergedI18n,
319718
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
319573
319719
  dataSeriesItemLinks: dataSeriesItemLinks,
319574
319720
  translateWithId: handleTranslation,
319575
319721
  actions: actions
@@ -319808,6 +319954,17 @@ ${formatRule(Codicon.menuSubmenu)}
319808
319954
  },
319809
319955
  "required": false
319810
319956
  },
319957
+ "shouldUseTranslatedLabels": {
319958
+ "defaultValue": {
319959
+ "value": "false",
319960
+ "computed": false
319961
+ },
319962
+ "description": "whether to use translated labels in cards",
319963
+ "type": {
319964
+ "name": "bool"
319965
+ },
319966
+ "required": false
319967
+ },
319811
319968
  "getValidDataItems": {
319812
319969
  "defaultValue": {
319813
319970
  "value": "null",
@@ -321799,6 +321956,8 @@ ${formatRule(Codicon.menuSubmenu)}
321799
321956
  modalHelpText: PropTypes.string,
321800
321957
  modalIconDescription: PropTypes.string
321801
321958
  }),
321959
+ /** whether to use translated labels in cards */
321960
+ shouldUseTranslatedLabels: PropTypes.bool,
321802
321961
  /** if provided, returns an array of strings which are the dataItems to be allowed
321803
321962
  * on each card
321804
321963
  * getValidDataItems(card, selectedTimeRange)
@@ -321860,6 +322019,7 @@ ${formatRule(Codicon.menuSubmenu)}
321860
322019
  modalHelpText: 'The JSON definition for this card is provided below. You can modify this data directly to update the card configuration.',
321861
322020
  modalIconDescription: 'Close'
321862
322021
  },
322022
+ shouldUseTranslatedLabels: false,
321863
322023
  getValidDataItems: null,
321864
322024
  getValidTimeRanges: null,
321865
322025
  dataItems: [],
@@ -321881,6 +322041,7 @@ ${formatRule(Codicon.menuSubmenu)}
321881
322041
  availableDimensions = _ref.availableDimensions,
321882
322042
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
321883
322043
  onFetchDynamicDemoHotspots = _ref.onFetchDynamicDemoHotspots,
322044
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
321884
322045
  actions = _ref.actions;
321885
322046
  var mergedI18n = React$1.useMemo(function () {
321886
322047
  return _objectSpread$p(_objectSpread$p({}, defaultProps$z.i18n), i18n);
@@ -321897,6 +322058,7 @@ ${formatRule(Codicon.menuSubmenu)}
321897
322058
  onChange: onChange,
321898
322059
  isSummaryDashboard: isSummaryDashboard,
321899
322060
  i18n: mergedI18n,
322061
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
321900
322062
  dataItems: dataItems,
321901
322063
  availableDimensions: availableDimensions,
321902
322064
  getValidDataItems: getValidDataItems,
@@ -322044,6 +322206,17 @@ ${formatRule(Codicon.menuSubmenu)}
322044
322206
  },
322045
322207
  "required": false
322046
322208
  },
322209
+ "shouldUseTranslatedLabels": {
322210
+ "defaultValue": {
322211
+ "value": "false",
322212
+ "computed": false
322213
+ },
322214
+ "description": "whether to use translated labels in cards",
322215
+ "type": {
322216
+ "name": "bool"
322217
+ },
322218
+ "required": false
322219
+ },
322047
322220
  "getValidDataItems": {
322048
322221
  "defaultValue": {
322049
322222
  "value": "null",
@@ -322287,6 +322460,8 @@ ${formatRule(Codicon.menuSubmenu)}
322287
322460
  searchPlaceHolderText: PropTypes.string,
322288
322461
  editDataItems: PropTypes.string
322289
322462
  }),
322463
+ /** whether to use translated labels in cards */
322464
+ shouldUseTranslatedLabels: PropTypes.bool,
322290
322465
  currentBreakpoint: PropTypes.string,
322291
322466
  isSummaryDashboard: PropTypes.bool,
322292
322467
  /** Id that can be used for testing */
@@ -322320,6 +322495,7 @@ ${formatRule(Codicon.menuSubmenu)}
322320
322495
  modalHelpText: 'The JSON definition for this card is provided below. You can modify this data directly to update the card configuration.',
322321
322496
  modalIconDescription: 'Close'
322322
322497
  },
322498
+ shouldUseTranslatedLabels: false,
322323
322499
  getValidDimensions: null,
322324
322500
  getValidDataItems: null,
322325
322501
  getValidTimeRanges: null,
@@ -322465,6 +322641,7 @@ ${formatRule(Codicon.menuSubmenu)}
322465
322641
  onRenderCardEditForm = _ref.onRenderCardEditForm,
322466
322642
  icons = _ref.icons,
322467
322643
  i18n = _ref.i18n,
322644
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
322468
322645
  currentBreakpoint = _ref.currentBreakpoint,
322469
322646
  testId = _ref.testId,
322470
322647
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
@@ -322530,6 +322707,7 @@ ${formatRule(Codicon.menuSubmenu)}
322530
322707
  getValidTimeRanges: getValidTimeRanges,
322531
322708
  availableDimensions: availableDimensions,
322532
322709
  i18n: mergedI18n,
322710
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
322533
322711
  currentBreakpoint: currentBreakpoint,
322534
322712
  dataSeriesItemLinks: dataSeriesItemLinks,
322535
322713
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -322695,6 +322873,17 @@ ${formatRule(Codicon.menuSubmenu)}
322695
322873
  },
322696
322874
  "required": false
322697
322875
  },
322876
+ "shouldUseTranslatedLabels": {
322877
+ "defaultValue": {
322878
+ "value": "false",
322879
+ "computed": false
322880
+ },
322881
+ "description": "whether to use translated labels in cards",
322882
+ "type": {
322883
+ "name": "bool"
322884
+ },
322885
+ "required": false
322886
+ },
322698
322887
  "getValidDimensions": {
322699
322888
  "defaultValue": {
322700
322889
  "value": "null",
@@ -323618,7 +323807,7 @@ ${formatRule(Codicon.menuSubmenu)}
323618
323807
  var DashboardEditorDefaultCardRenderer$1 = DashboardEditorDefaultCardRenderer;
323619
323808
 
323620
323809
  var _excluded$c = ["style", "children"],
323621
- _excluded2 = ["isSelected", "availableDimensions", "i18n", "onRemove", "onDuplicate", "onCardChange", "setSelectedCardId", "renderIconByName", "onShowImageGallery", "onValidateUploadedImage", "baseClassName", "renderCardPreview", "style"];
323810
+ _excluded2 = ["isSelected", "availableDimensions", "i18n", "onRemove", "onDuplicate", "onCardChange", "setSelectedCardId", "renderIconByName", "onShowImageGallery", "onValidateUploadedImage", "baseClassName", "renderCardPreview", "style", "shouldUseTranslatedLabels"];
323622
323811
  function ownKeys$m(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; }
323623
323812
  function _objectSpread$m(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$m(Object(t), !0).forEach(function (r) { _defineProperty$c(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$m(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
323624
323813
 
@@ -323690,6 +323879,7 @@ ${formatRule(Codicon.menuSubmenu)}
323690
323879
  baseClassName = _ref2.baseClassName,
323691
323880
  renderCardPreview = _ref2.renderCardPreview,
323692
323881
  style = _ref2.style,
323882
+ shouldUseTranslatedLabels = _ref2.shouldUseTranslatedLabels,
323693
323883
  cardConfig = _objectWithoutProperties$3(_ref2, _excluded2);
323694
323884
  // We have to keep track of our dynamic hotspots here
323695
323885
  var _useState5 = React$1.useState([]),
@@ -323723,6 +323913,7 @@ ${formatRule(Codicon.menuSubmenu)}
323723
323913
  key: cardConfig.id,
323724
323914
  tooltip: cardConfig.description,
323725
323915
  i18n: i18n,
323916
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
323726
323917
  availableActions: availableActions,
323727
323918
  onCardAction: handleOnCardAction,
323728
323919
  renderIconByName: renderIconByName,
@@ -323735,7 +323926,7 @@ ${formatRule(Codicon.menuSubmenu)}
323735
323926
  onBrowseClick: cardConfig.type === CARD_TYPES.IMAGE && isNil((_cardConfig$content = cardConfig.content) === null || _cardConfig$content === void 0 ? void 0 : _cardConfig$content.src) ? onShowImageGallery : undefined,
323736
323927
  validateUploadedImage: cardConfig.type === CARD_TYPES.IMAGE ? onValidateUploadedImage : undefined
323737
323928
  });
323738
- }, [baseClassName, cardConfig, handleOnCardAction, handleOnCardKeyDown, handleOnCardMouseDown, i18n, isSelected, onShowImageGallery, onValidateUploadedImage, renderIconByName, style]);
323929
+ }, [baseClassName, cardConfig, handleOnCardAction, handleOnCardKeyDown, handleOnCardMouseDown, i18n, isSelected, onShowImageGallery, onValidateUploadedImage, renderIconByName, shouldUseTranslatedLabels, style]);
323739
323930
  React$1.useEffect(function () {
323740
323931
  var _cardProps$values;
323741
323932
  var originalDynamicHotspot = (_cardProps$values = cardProps.values) === null || _cardProps$values === void 0 || (_cardProps$values = _cardProps$values.hotspots) === null || _cardProps$values === void 0 ? void 0 : _cardProps$values.find(function (hotspot) {
@@ -324053,6 +324244,8 @@ ${formatRule(Codicon.menuSubmenu)}
324053
324244
  abbreviateNumbersTooltip: PropTypes.string,
324054
324245
  editDataItems: PropTypes.string
324055
324246
  }),
324247
+ /** whether to use translated labels in cards */
324248
+ shouldUseTranslatedLabels: PropTypes.bool,
324056
324249
  /** locale data */
324057
324250
  locale: PropTypes.string,
324058
324251
  /** optional link href's for each card type that will appear in a tooltip */
@@ -324143,6 +324336,7 @@ ${formatRule(Codicon.menuSubmenu)}
324143
324336
  saveTitleButton: 'Save title',
324144
324337
  editDataItems: 'Edit data items'
324145
324338
  },
324339
+ shouldUseTranslatedLabels: false,
324146
324340
  locale: 'en',
324147
324341
  dataSeriesItemLinks: null,
324148
324342
  onFetchDynamicDemoHotspots: function onFetchDynamicDemoHotspots() {
@@ -324212,6 +324406,7 @@ ${formatRule(Codicon.menuSubmenu)}
324212
324406
  isSummaryDashboard = _ref.isSummaryDashboard,
324213
324407
  isLoading = _ref.isLoading,
324214
324408
  i18n = _ref.i18n,
324409
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
324215
324410
  locale = _ref.locale,
324216
324411
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
324217
324412
  isTitleEditable = _ref.isTitleEditable,
@@ -324468,7 +324663,7 @@ ${formatRule(Codicon.menuSubmenu)}
324468
324663
  className: classnames("".concat(baseClassName$1, "--content"), _defineProperty$c({}, "".concat(baseClassName$1, "__overflow"), selectedBreakpointIndex !== LAYOUTS.FIT_TO_SCREEN.index)),
324469
324664
  ref: scrollContainerRef
324470
324665
  }, renderHeader ? renderHeader() : /*#__PURE__*/React$1.createElement(DashboardEditorHeader$1, {
324471
- title: (dashboardJson === null || dashboardJson === void 0 ? void 0 : dashboardJson.title) || title,
324666
+ title: getTranslatedLabel(dashboardJson === null || dashboardJson === void 0 ? void 0 : dashboardJson.title, shouldUseTranslatedLabels, i18n) || title,
324472
324667
  breadcrumbs: headerBreadcrumbs,
324473
324668
  onImport: onImport,
324474
324669
  onExport: function onExport() {
@@ -324552,6 +324747,7 @@ ${formatRule(Codicon.menuSubmenu)}
324552
324747
  key: cardConfig.id,
324553
324748
  isResizable: isCardResizable,
324554
324749
  i18n: mergedI18n,
324750
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
324555
324751
  isSelected: isSelected,
324556
324752
  availableDimensions: availableDimensions,
324557
324753
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -324596,6 +324792,7 @@ ${formatRule(Codicon.menuSubmenu)}
324596
324792
  getValidDimensions: getValidDimensions,
324597
324793
  availableDimensions: availableDimensions,
324598
324794
  i18n: mergedI18n,
324795
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
324599
324796
  currentBreakpoint: currentBreakpoint,
324600
324797
  dataSeriesItemLinks: dataSeriesItemLinks,
324601
324798
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -325518,6 +325715,17 @@ ${formatRule(Codicon.menuSubmenu)}
325518
325715
  },
325519
325716
  "required": false
325520
325717
  },
325718
+ "shouldUseTranslatedLabels": {
325719
+ "defaultValue": {
325720
+ "value": "false",
325721
+ "computed": false
325722
+ },
325723
+ "description": "whether to use translated labels in cards",
325724
+ "type": {
325725
+ "name": "bool"
325726
+ },
325727
+ "required": false
325728
+ },
325521
325729
  "locale": {
325522
325730
  "defaultValue": {
325523
325731
  "value": "'en'",