carbon-addons-iot-react 5.9.2 → 5.10.0

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 +18 -3
  5. package/es/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +19 -2
  6. package/es/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +17 -1
  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 +38 -2
  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 +17 -2
  19. package/lib/components/CardEditor/CardEditForm/CardEditFormItems/DataSeriesFormItems/DataSeriesFormContent.js +19 -2
  20. package/lib/components/CardEditor/CardEditForm/CommonCardEditFormFields.js +17 -1
  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 +38 -2
  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 +226 -19
@@ -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,9 @@ ${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
+
296012
296051
  // Render threshold icon component
296013
296052
  var renderThresholdIcon = function renderThresholdIcon() {
296014
296053
  if (!(matchingThreshold !== null && matchingThreshold !== void 0 && matchingThreshold.icon)) return null;
@@ -296034,10 +296073,10 @@ ${formatRule(Codicon.menuSubmenu)}
296034
296073
  }, thresholdsIconPosition === 'label' && renderThresholdIcon(), tooltip ? /*#__PURE__*/React$1.createElement(Tooltip, {
296035
296074
  direction: "right",
296036
296075
  showIcon: false,
296037
- triggerText: label
296076
+ triggerText: displayLabel
296038
296077
  }, /*#__PURE__*/React$1.createElement("p", null, tooltip)) : /*#__PURE__*/React$1.createElement("span", {
296039
296078
  "data-testid": "".concat(testId, "-threshold-label")
296040
- }, label)), /*#__PURE__*/React$1.createElement("div", {
296079
+ }, displayLabel)), /*#__PURE__*/React$1.createElement("div", {
296041
296080
  className: "".concat(BEM_BASE)
296042
296081
  }, /*#__PURE__*/React$1.createElement(ValueRenderer$1, {
296043
296082
  value: value,
@@ -296228,6 +296267,31 @@ ${formatRule(Codicon.menuSubmenu)}
296228
296267
  },
296229
296268
  "required": false
296230
296269
  },
296270
+ "shouldUseTranslatedLabels": {
296271
+ "defaultValue": {
296272
+ "value": "false",
296273
+ "computed": false
296274
+ },
296275
+ "description": "whether to use translated labels in cards",
296276
+ "type": {
296277
+ "name": "bool"
296278
+ },
296279
+ "required": false
296280
+ },
296281
+ "i18n": {
296282
+ "defaultValue": {
296283
+ "value": "{}",
296284
+ "computed": false
296285
+ },
296286
+ "description": "",
296287
+ "type": {
296288
+ "name": "objectOf",
296289
+ "value": {
296290
+ "name": "any"
296291
+ }
296292
+ },
296293
+ "required": false
296294
+ },
296231
296295
  "testId": {
296232
296296
  "defaultValue": {
296233
296297
  "value": "'attribute'",
@@ -296365,7 +296429,7 @@ ${formatRule(Codicon.menuSubmenu)}
296365
296429
  };
296366
296430
  var Attribute$1 = Attribute;
296367
296431
 
296368
- var _excluded$q = ["id", "title", "content", "values", "layout", "dataState", "locale", "isEditable", "customFormatter", "formatter", "fontSize", "isNumberValueCompact", "testId", "onAttributeClick", "size"];
296432
+ var _excluded$q = ["id", "title", "content", "values", "layout", "dataState", "locale", "isEditable", "shouldUseTranslatedLabels", "customFormatter", "formatter", "fontSize", "isNumberValueCompact", "testId", "onAttributeClick", "size"];
296369
296433
  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
296434
  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
296435
  var propTypes$15 = _objectSpread$Y({
@@ -296373,7 +296437,9 @@ ${formatRule(Codicon.menuSubmenu)}
296373
296437
  title: PropTypes.string,
296374
296438
  layout: PropTypes.oneOf(['HORIZONTAL', 'VERTICAL']),
296375
296439
  locale: PropTypes.string,
296376
- isEditable: PropTypes.bool
296440
+ isEditable: PropTypes.bool,
296441
+ /** whether to use translated labels in cards */
296442
+ shouldUseTranslatedLabels: PropTypes.bool
296377
296443
  }, ValueContentPropTypes);
296378
296444
  var defaultProps$18 = {
296379
296445
  id: 'valueContent-id',
@@ -296381,6 +296447,7 @@ ${formatRule(Codicon.menuSubmenu)}
296381
296447
  layout: 'VERTICAL',
296382
296448
  locale: 'en',
296383
296449
  isEditable: false,
296450
+ shouldUseTranslatedLabels: false,
296384
296451
  dataState: null,
296385
296452
  values: null,
296386
296453
  fontSize: DEFAULT_FONT_SIZE,
@@ -296400,6 +296467,7 @@ ${formatRule(Codicon.menuSubmenu)}
296400
296467
  dataState = _ref.dataState,
296401
296468
  locale = _ref.locale,
296402
296469
  isEditable = _ref.isEditable,
296470
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
296403
296471
  customFormatter = _ref.customFormatter,
296404
296472
  formatter = _ref.formatter,
296405
296473
  fontSize = _ref.fontSize,
@@ -296420,6 +296488,8 @@ ${formatRule(Codicon.menuSubmenu)}
296420
296488
  locale: locale,
296421
296489
  isEditable: isEditable,
296422
296490
  title: title,
296491
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
296492
+ i18n: others.i18n,
296423
296493
  renderIconByName: others.renderIconByName,
296424
296494
  value: determineValue(attribute.dataSourceId, values, attribute.dataFilter),
296425
296495
  secondaryValue: attribute.secondaryValue && _objectSpread$Y(_objectSpread$Y({}, attribute.secondaryValue), {}, {
@@ -296510,6 +296580,17 @@ ${formatRule(Codicon.menuSubmenu)}
296510
296580
  },
296511
296581
  "required": false
296512
296582
  },
296583
+ "shouldUseTranslatedLabels": {
296584
+ "defaultValue": {
296585
+ "value": "false",
296586
+ "computed": false
296587
+ },
296588
+ "description": "whether to use translated labels in cards",
296589
+ "type": {
296590
+ "name": "bool"
296591
+ },
296592
+ "required": false
296593
+ },
296513
296594
  "dataState": {
296514
296595
  "defaultValue": {
296515
296596
  "value": "null",
@@ -296578,7 +296659,7 @@ ${formatRule(Codicon.menuSubmenu)}
296578
296659
  };
296579
296660
  var ValueContent$1 = ValueContent;
296580
296661
 
296581
- var _excluded$p = ["title", "content", "size", "values", "isEditable", "isResizable", "i18n", "dataState", "id", "locale", "customFormatter", "formatter", "children", "fontSize", "isNumberValueCompact", "testID", "testId", "onAttributeClick", "className"];
296662
+ var _excluded$p = ["title", "content", "size", "values", "isEditable", "isResizable", "i18n", "dataState", "id", "locale", "customFormatter", "formatter", "children", "fontSize", "isNumberValueCompact", "testID", "testId", "onAttributeClick", "className", "shouldUseTranslatedLabels"];
296582
296663
  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
296664
  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
296665
 
@@ -296608,6 +296689,7 @@ ${formatRule(Codicon.menuSubmenu)}
296608
296689
  testId = _ref.testId,
296609
296690
  onAttributeClick = _ref.onAttributeClick,
296610
296691
  className = _ref.className,
296692
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
296611
296693
  others = _objectWithoutProperties$3(_ref, _excluded$p);
296612
296694
  var availableActions = _objectSpread$X({
296613
296695
  expand: false
@@ -296632,6 +296714,7 @@ ${formatRule(Codicon.menuSubmenu)}
296632
296714
  isResizable: isResizable,
296633
296715
  resizeHandles: resizeHandles,
296634
296716
  i18n: i18n,
296717
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
296635
296718
  locale: locale,
296636
296719
  id: id,
296637
296720
  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 +296738,9 @@ ${formatRule(Codicon.menuSubmenu)}
296655
296738
  values: values,
296656
296739
  isEditable: isEditable,
296657
296740
  fontSize: fontSize,
296658
- isNumberValueCompact: isNumberValueCompact
296741
+ isNumberValueCompact: isNumberValueCompact,
296742
+ i18n: i18n,
296743
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels
296659
296744
  }, others)), resizeHandles);
296660
296745
  };
296661
296746
  ValueCard.propTypes = _objectSpread$X(_objectSpread$X({}, CardPropTypes), ValueContentPropTypes);
@@ -296672,7 +296757,8 @@ ${formatRule(Codicon.menuSubmenu)}
296672
296757
  isNumberValueCompact: false,
296673
296758
  // TODO: fix this default in V3, so that cards are unique not inherited from the base Card
296674
296759
  testId: 'Card',
296675
- onAttributeClick: null
296760
+ onAttributeClick: null,
296761
+ shouldUseTranslatedLabels: false
296676
296762
  };
296677
296763
  ValueCard.__docgenInfo = {
296678
296764
  "description": "This components responsibilities include:\nRendering the attribute groups\nDetermining the layout\ndetermines the data to render",
@@ -296755,6 +296841,13 @@ ${formatRule(Codicon.menuSubmenu)}
296755
296841
  "computed": false
296756
296842
  },
296757
296843
  "required": false
296844
+ },
296845
+ "shouldUseTranslatedLabels": {
296846
+ "defaultValue": {
296847
+ "value": "false",
296848
+ "computed": false
296849
+ },
296850
+ "required": false
296758
296851
  }
296759
296852
  },
296760
296853
  "composes": ["../../constants/CardPropTypes"]
@@ -310014,6 +310107,8 @@ ${formatRule(Codicon.menuSubmenu)}
310014
310107
  thisQuarterLabel: PropTypes.string,
310015
310108
  thisYearLabel: PropTypes.string
310016
310109
  }),
310110
+ /** whether to use translated labels in cards */
310111
+ shouldUseTranslatedLabels: PropTypes.bool,
310017
310112
  /** if provided, returns an array of strings which are the timeRanges to be allowed
310018
310113
  * on each card
310019
310114
  * getValidTimeRanges(card, selectedDataItems)
@@ -310047,6 +310142,7 @@ ${formatRule(Codicon.menuSubmenu)}
310047
310142
  thisQuarterLabel: 'This quarter',
310048
310143
  thisYearLabel: 'This year'
310049
310144
  },
310145
+ shouldUseTranslatedLabels: false,
310050
310146
  selectedDataItems: [],
310051
310147
  getValidTimeRanges: null,
310052
310148
  currentBreakpoint: 'xl',
@@ -310070,6 +310166,7 @@ ${formatRule(Codicon.menuSubmenu)}
310070
310166
  var cardConfig = _ref.cardConfig,
310071
310167
  _onChange = _ref.onChange,
310072
310168
  i18n = _ref.i18n,
310169
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
310073
310170
  getValidTimeRanges = _ref.getValidTimeRanges,
310074
310171
  currentBreakpoint = _ref.currentBreakpoint,
310075
310172
  selectedDataItems = _ref.selectedDataItems,
@@ -310100,7 +310197,7 @@ ${formatRule(Codicon.menuSubmenu)}
310100
310197
  title: evt.target.value
310101
310198
  }));
310102
310199
  },
310103
- value: title
310200
+ value: getTranslatedLabel(title, shouldUseTranslatedLabels, mergedI18n)
310104
310201
  })), /*#__PURE__*/React$1.createElement("div", {
310105
310202
  className: "".concat(baseClassName, "--input")
310106
310203
  }, /*#__PURE__*/React$1.createElement(react.TextArea, {
@@ -310393,6 +310490,17 @@ ${formatRule(Codicon.menuSubmenu)}
310393
310490
  },
310394
310491
  "required": false
310395
310492
  },
310493
+ "shouldUseTranslatedLabels": {
310494
+ "defaultValue": {
310495
+ "value": "false",
310496
+ "computed": false
310497
+ },
310498
+ "description": "whether to use translated labels in cards",
310499
+ "type": {
310500
+ "name": "bool"
310501
+ },
310502
+ "required": false
310503
+ },
310396
310504
  "selectedDataItems": {
310397
310505
  "defaultValue": {
310398
310506
  "value": "[]",
@@ -311675,6 +311783,8 @@ ${formatRule(Codicon.menuSubmenu)}
311675
311783
  primaryButtonLabelText: PropTypes.string,
311676
311784
  secondaryButtonLabelText: PropTypes.string
311677
311785
  }),
311786
+ /** whether to use translated labels in cards */
311787
+ shouldUseTranslatedLabels: PropTypes.bool,
311678
311788
  actions: DashboardEditorActionsPropTypes,
311679
311789
  /**
311680
311790
  * Used to override the default behaviour of handleDataItemEdit. if we dont pass any function then it uses handleDefaultDataItemEdit function by default
@@ -311728,6 +311838,7 @@ ${formatRule(Codicon.menuSubmenu)}
311728
311838
  secondaryButtonLabelText: 'Cancel',
311729
311839
  decimalPlacesLabel: 'Decimal places'
311730
311840
  },
311841
+ shouldUseTranslatedLabels: false,
311731
311842
  editDataSeries: [],
311732
311843
  showEditor: false,
311733
311844
  setShowEditor: null,
@@ -311798,6 +311909,7 @@ ${formatRule(Codicon.menuSubmenu)}
311798
311909
  availableDimensions = _ref.availableDimensions,
311799
311910
  onChange = _ref.onChange,
311800
311911
  i18n = _ref.i18n,
311912
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
311801
311913
  isLarge = _ref.isLarge,
311802
311914
  _ref$actions$dataSeri = _ref.actions.dataSeriesFormActions,
311803
311915
  hasAggregationsDropDown = _ref$actions$dataSeri.hasAggregationsDropDown,
@@ -311954,7 +312066,7 @@ ${formatRule(Codicon.menuSubmenu)}
311954
312066
  label: evt.target.value
311955
312067
  }));
311956
312068
  },
311957
- value: editDataItem.label,
312069
+ value: getTranslatedLabel(editDataItem.label, shouldUseTranslatedLabels, i18n),
311958
312070
  helperText: mergedI18n.dataItemEditorDataItemHelperText(mergedI18n.dataItemSource, editDataItem.dataItemId)
311959
312071
  })), hasColorDropdown &&
311960
312072
  /*#__PURE__*/
@@ -312099,7 +312211,7 @@ ${formatRule(Codicon.menuSubmenu)}
312099
312211
  },
312100
312212
  columnType: editDataItem.columnType || editDataItem.type
312101
312213
  }));
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]);
312214
+ }, [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
312215
  return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, showEditor && /*#__PURE__*/React$1.createElement("div", {
312104
312216
  className: "".concat(baseClassName, "--modal-wrapper")
312105
312217
  }, /*#__PURE__*/React$1.createElement(ComposedModal$1, {
@@ -312329,6 +312441,17 @@ ${formatRule(Codicon.menuSubmenu)}
312329
312441
  },
312330
312442
  "required": false
312331
312443
  },
312444
+ "shouldUseTranslatedLabels": {
312445
+ "defaultValue": {
312446
+ "value": "false",
312447
+ "computed": false
312448
+ },
312449
+ "description": "whether to use translated labels in cards",
312450
+ "type": {
312451
+ "name": "bool"
312452
+ },
312453
+ "required": false
312454
+ },
312332
312455
  "editDataSeries": {
312333
312456
  "defaultValue": {
312334
312457
  "value": "[]",
@@ -313286,6 +313409,8 @@ ${formatRule(Codicon.menuSubmenu)}
313286
313409
  incrementNumberText: PropTypes.string,
313287
313410
  decrementNumberText: PropTypes.string
313288
313411
  }),
313412
+ /** whether to use translated labels in cards */
313413
+ shouldUseTranslatedLabels: PropTypes.bool,
313289
313414
  translateWithId: PropTypes.func.isRequired,
313290
313415
  actions: DashboardEditorActionsPropTypes
313291
313416
  };
@@ -313319,6 +313444,7 @@ ${formatRule(Codicon.menuSubmenu)}
313319
313444
  incrementNumberText: 'Increment number',
313320
313445
  decrementNumberText: 'Decrement number'
313321
313446
  },
313447
+ shouldUseTranslatedLabels: false,
313322
313448
  getValidDataItems: null,
313323
313449
  dataItems: [],
313324
313450
  selectedDataItems: [],
@@ -313406,6 +313532,7 @@ ${formatRule(Codicon.menuSubmenu)}
313406
313532
  selectedTimeRange = _ref2.selectedTimeRange,
313407
313533
  availableDimensions = _ref2.availableDimensions,
313408
313534
  i18n = _ref2.i18n,
313535
+ shouldUseTranslatedLabels = _ref2.shouldUseTranslatedLabels,
313409
313536
  dataSeriesItemLinks = _ref2.dataSeriesItemLinks,
313410
313537
  translateWithId = _ref2.translateWithId,
313411
313538
  actions = _ref2.actions;
@@ -313551,7 +313678,7 @@ ${formatRule(Codicon.menuSubmenu)}
313551
313678
  return {
313552
313679
  id: dataItem.dataSourceId,
313553
313680
  content: {
313554
- value: dataItem.label || dataItem.dataItemId,
313681
+ value: getTranslatedLabel(dataItem.label || dataItem.dataItemId, shouldUseTranslatedLabels, i18n),
313555
313682
  icon: cardConfig.type === CARD_TYPES.TIMESERIES || cardConfig.type === CARD_TYPES.BAR ? /*#__PURE__*/React$1.createElement("div", {
313556
313683
  className: "".concat(baseClassName$3, "--data-item-list--item-color-icon"),
313557
313684
  style: {
@@ -313588,7 +313715,7 @@ ${formatRule(Codicon.menuSubmenu)}
313588
313715
  }
313589
313716
  };
313590
313717
  })) || [];
313591
- }, [cardConfig.type, handleEditButton, handleRemoveButton, mergedI18n.edit, mergedI18n.remove]);
313718
+ }, [cardConfig.type, handleEditButton, handleRemoveButton, i18n, mergedI18n.edit, mergedI18n.remove, shouldUseTranslatedLabels]);
313592
313719
  var dataItemListItems = React$1.useMemo(function () {
313593
313720
  return generateListItems(dataSection);
313594
313721
  }, [dataSection, generateListItems]);
@@ -313609,6 +313736,7 @@ ${formatRule(Codicon.menuSubmenu)}
313609
313736
  dataSection: dataSection,
313610
313737
  onChange: _onChange,
313611
313738
  i18n: mergedI18n,
313739
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
313612
313740
  actions: actions,
313613
313741
  options: {
313614
313742
  hasColorDropdown: type === CARD_TYPES.TIMESERIES || type === CARD_TYPES.BAR,
@@ -313930,6 +314058,17 @@ ${formatRule(Codicon.menuSubmenu)}
313930
314058
  },
313931
314059
  "required": false
313932
314060
  },
314061
+ "shouldUseTranslatedLabels": {
314062
+ "defaultValue": {
314063
+ "value": "false",
314064
+ "computed": false
314065
+ },
314066
+ "description": "whether to use translated labels in cards",
314067
+ "type": {
314068
+ "name": "bool"
314069
+ },
314070
+ "required": false
314071
+ },
313933
314072
  "getValidDataItems": {
313934
314073
  "defaultValue": {
313935
314074
  "value": "null",
@@ -319425,6 +319564,8 @@ ${formatRule(Codicon.menuSubmenu)}
319425
319564
  thisQuarterLabel: PropTypes.string,
319426
319565
  thisYearLabel: PropTypes.string
319427
319566
  }),
319567
+ /** whether to use translated labels in cards */
319568
+ shouldUseTranslatedLabels: PropTypes.bool,
319428
319569
  /** if provided, returns an array of strings which are the timeRanges to be allowed
319429
319570
  * on each card
319430
319571
  * getValidTimeRanges(card, selectedDataItems)
@@ -319461,6 +319602,7 @@ ${formatRule(Codicon.menuSubmenu)}
319461
319602
  var defaultProps$G = {
319462
319603
  cardConfig: {},
319463
319604
  i18n: {},
319605
+ shouldUseTranslatedLabels: false,
319464
319606
  getValidDataItems: null,
319465
319607
  getValidTimeRanges: null,
319466
319608
  dataItems: [],
@@ -319490,6 +319632,7 @@ ${formatRule(Codicon.menuSubmenu)}
319490
319632
  isSummaryDashboard = _ref.isSummaryDashboard,
319491
319633
  onChange = _ref.onChange,
319492
319634
  i18n = _ref.i18n,
319635
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
319493
319636
  dataItems = _ref.dataItems,
319494
319637
  getValidDataItems = _ref.getValidDataItems,
319495
319638
  getValidTimeRanges = _ref.getValidTimeRanges,
@@ -319524,6 +319667,7 @@ ${formatRule(Codicon.menuSubmenu)}
319524
319667
  ,
319525
319668
  onChange: onChange,
319526
319669
  i18n: mergedI18n,
319670
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
319527
319671
  getValidTimeRanges: getValidTimeRanges,
319528
319672
  currentBreakpoint: currentBreakpoint,
319529
319673
  selectedDataItems: selectedDataItems,
@@ -319570,6 +319714,7 @@ ${formatRule(Codicon.menuSubmenu)}
319570
319714
  getValidDataItems: getValidDataItems,
319571
319715
  availableDimensions: availableDimensions,
319572
319716
  i18n: mergedI18n,
319717
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
319573
319718
  dataSeriesItemLinks: dataSeriesItemLinks,
319574
319719
  translateWithId: handleTranslation,
319575
319720
  actions: actions
@@ -319808,6 +319953,17 @@ ${formatRule(Codicon.menuSubmenu)}
319808
319953
  },
319809
319954
  "required": false
319810
319955
  },
319956
+ "shouldUseTranslatedLabels": {
319957
+ "defaultValue": {
319958
+ "value": "false",
319959
+ "computed": false
319960
+ },
319961
+ "description": "whether to use translated labels in cards",
319962
+ "type": {
319963
+ "name": "bool"
319964
+ },
319965
+ "required": false
319966
+ },
319811
319967
  "getValidDataItems": {
319812
319968
  "defaultValue": {
319813
319969
  "value": "null",
@@ -321799,6 +321955,8 @@ ${formatRule(Codicon.menuSubmenu)}
321799
321955
  modalHelpText: PropTypes.string,
321800
321956
  modalIconDescription: PropTypes.string
321801
321957
  }),
321958
+ /** whether to use translated labels in cards */
321959
+ shouldUseTranslatedLabels: PropTypes.bool,
321802
321960
  /** if provided, returns an array of strings which are the dataItems to be allowed
321803
321961
  * on each card
321804
321962
  * getValidDataItems(card, selectedTimeRange)
@@ -321860,6 +322018,7 @@ ${formatRule(Codicon.menuSubmenu)}
321860
322018
  modalHelpText: 'The JSON definition for this card is provided below. You can modify this data directly to update the card configuration.',
321861
322019
  modalIconDescription: 'Close'
321862
322020
  },
322021
+ shouldUseTranslatedLabels: false,
321863
322022
  getValidDataItems: null,
321864
322023
  getValidTimeRanges: null,
321865
322024
  dataItems: [],
@@ -321881,6 +322040,7 @@ ${formatRule(Codicon.menuSubmenu)}
321881
322040
  availableDimensions = _ref.availableDimensions,
321882
322041
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
321883
322042
  onFetchDynamicDemoHotspots = _ref.onFetchDynamicDemoHotspots,
322043
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
321884
322044
  actions = _ref.actions;
321885
322045
  var mergedI18n = React$1.useMemo(function () {
321886
322046
  return _objectSpread$p(_objectSpread$p({}, defaultProps$z.i18n), i18n);
@@ -321897,6 +322057,7 @@ ${formatRule(Codicon.menuSubmenu)}
321897
322057
  onChange: onChange,
321898
322058
  isSummaryDashboard: isSummaryDashboard,
321899
322059
  i18n: mergedI18n,
322060
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
321900
322061
  dataItems: dataItems,
321901
322062
  availableDimensions: availableDimensions,
321902
322063
  getValidDataItems: getValidDataItems,
@@ -322044,6 +322205,17 @@ ${formatRule(Codicon.menuSubmenu)}
322044
322205
  },
322045
322206
  "required": false
322046
322207
  },
322208
+ "shouldUseTranslatedLabels": {
322209
+ "defaultValue": {
322210
+ "value": "false",
322211
+ "computed": false
322212
+ },
322213
+ "description": "whether to use translated labels in cards",
322214
+ "type": {
322215
+ "name": "bool"
322216
+ },
322217
+ "required": false
322218
+ },
322047
322219
  "getValidDataItems": {
322048
322220
  "defaultValue": {
322049
322221
  "value": "null",
@@ -322287,6 +322459,8 @@ ${formatRule(Codicon.menuSubmenu)}
322287
322459
  searchPlaceHolderText: PropTypes.string,
322288
322460
  editDataItems: PropTypes.string
322289
322461
  }),
322462
+ /** whether to use translated labels in cards */
322463
+ shouldUseTranslatedLabels: PropTypes.bool,
322290
322464
  currentBreakpoint: PropTypes.string,
322291
322465
  isSummaryDashboard: PropTypes.bool,
322292
322466
  /** Id that can be used for testing */
@@ -322320,6 +322494,7 @@ ${formatRule(Codicon.menuSubmenu)}
322320
322494
  modalHelpText: 'The JSON definition for this card is provided below. You can modify this data directly to update the card configuration.',
322321
322495
  modalIconDescription: 'Close'
322322
322496
  },
322497
+ shouldUseTranslatedLabels: false,
322323
322498
  getValidDimensions: null,
322324
322499
  getValidDataItems: null,
322325
322500
  getValidTimeRanges: null,
@@ -322465,6 +322640,7 @@ ${formatRule(Codicon.menuSubmenu)}
322465
322640
  onRenderCardEditForm = _ref.onRenderCardEditForm,
322466
322641
  icons = _ref.icons,
322467
322642
  i18n = _ref.i18n,
322643
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
322468
322644
  currentBreakpoint = _ref.currentBreakpoint,
322469
322645
  testId = _ref.testId,
322470
322646
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
@@ -322530,6 +322706,7 @@ ${formatRule(Codicon.menuSubmenu)}
322530
322706
  getValidTimeRanges: getValidTimeRanges,
322531
322707
  availableDimensions: availableDimensions,
322532
322708
  i18n: mergedI18n,
322709
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
322533
322710
  currentBreakpoint: currentBreakpoint,
322534
322711
  dataSeriesItemLinks: dataSeriesItemLinks,
322535
322712
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -322695,6 +322872,17 @@ ${formatRule(Codicon.menuSubmenu)}
322695
322872
  },
322696
322873
  "required": false
322697
322874
  },
322875
+ "shouldUseTranslatedLabels": {
322876
+ "defaultValue": {
322877
+ "value": "false",
322878
+ "computed": false
322879
+ },
322880
+ "description": "whether to use translated labels in cards",
322881
+ "type": {
322882
+ "name": "bool"
322883
+ },
322884
+ "required": false
322885
+ },
322698
322886
  "getValidDimensions": {
322699
322887
  "defaultValue": {
322700
322888
  "value": "null",
@@ -323618,7 +323806,7 @@ ${formatRule(Codicon.menuSubmenu)}
323618
323806
  var DashboardEditorDefaultCardRenderer$1 = DashboardEditorDefaultCardRenderer;
323619
323807
 
323620
323808
  var _excluded$c = ["style", "children"],
323621
- _excluded2 = ["isSelected", "availableDimensions", "i18n", "onRemove", "onDuplicate", "onCardChange", "setSelectedCardId", "renderIconByName", "onShowImageGallery", "onValidateUploadedImage", "baseClassName", "renderCardPreview", "style"];
323809
+ _excluded2 = ["isSelected", "availableDimensions", "i18n", "onRemove", "onDuplicate", "onCardChange", "setSelectedCardId", "renderIconByName", "onShowImageGallery", "onValidateUploadedImage", "baseClassName", "renderCardPreview", "style", "shouldUseTranslatedLabels"];
323622
323810
  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
323811
  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
323812
 
@@ -323690,6 +323878,7 @@ ${formatRule(Codicon.menuSubmenu)}
323690
323878
  baseClassName = _ref2.baseClassName,
323691
323879
  renderCardPreview = _ref2.renderCardPreview,
323692
323880
  style = _ref2.style,
323881
+ shouldUseTranslatedLabels = _ref2.shouldUseTranslatedLabels,
323693
323882
  cardConfig = _objectWithoutProperties$3(_ref2, _excluded2);
323694
323883
  // We have to keep track of our dynamic hotspots here
323695
323884
  var _useState5 = React$1.useState([]),
@@ -323723,6 +323912,7 @@ ${formatRule(Codicon.menuSubmenu)}
323723
323912
  key: cardConfig.id,
323724
323913
  tooltip: cardConfig.description,
323725
323914
  i18n: i18n,
323915
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
323726
323916
  availableActions: availableActions,
323727
323917
  onCardAction: handleOnCardAction,
323728
323918
  renderIconByName: renderIconByName,
@@ -323735,7 +323925,7 @@ ${formatRule(Codicon.menuSubmenu)}
323735
323925
  onBrowseClick: cardConfig.type === CARD_TYPES.IMAGE && isNil((_cardConfig$content = cardConfig.content) === null || _cardConfig$content === void 0 ? void 0 : _cardConfig$content.src) ? onShowImageGallery : undefined,
323736
323926
  validateUploadedImage: cardConfig.type === CARD_TYPES.IMAGE ? onValidateUploadedImage : undefined
323737
323927
  });
323738
- }, [baseClassName, cardConfig, handleOnCardAction, handleOnCardKeyDown, handleOnCardMouseDown, i18n, isSelected, onShowImageGallery, onValidateUploadedImage, renderIconByName, style]);
323928
+ }, [baseClassName, cardConfig, handleOnCardAction, handleOnCardKeyDown, handleOnCardMouseDown, i18n, isSelected, onShowImageGallery, onValidateUploadedImage, renderIconByName, shouldUseTranslatedLabels, style]);
323739
323929
  React$1.useEffect(function () {
323740
323930
  var _cardProps$values;
323741
323931
  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 +324243,8 @@ ${formatRule(Codicon.menuSubmenu)}
324053
324243
  abbreviateNumbersTooltip: PropTypes.string,
324054
324244
  editDataItems: PropTypes.string
324055
324245
  }),
324246
+ /** whether to use translated labels in cards */
324247
+ shouldUseTranslatedLabels: PropTypes.bool,
324056
324248
  /** locale data */
324057
324249
  locale: PropTypes.string,
324058
324250
  /** optional link href's for each card type that will appear in a tooltip */
@@ -324143,6 +324335,7 @@ ${formatRule(Codicon.menuSubmenu)}
324143
324335
  saveTitleButton: 'Save title',
324144
324336
  editDataItems: 'Edit data items'
324145
324337
  },
324338
+ shouldUseTranslatedLabels: false,
324146
324339
  locale: 'en',
324147
324340
  dataSeriesItemLinks: null,
324148
324341
  onFetchDynamicDemoHotspots: function onFetchDynamicDemoHotspots() {
@@ -324212,6 +324405,7 @@ ${formatRule(Codicon.menuSubmenu)}
324212
324405
  isSummaryDashboard = _ref.isSummaryDashboard,
324213
324406
  isLoading = _ref.isLoading,
324214
324407
  i18n = _ref.i18n,
324408
+ shouldUseTranslatedLabels = _ref.shouldUseTranslatedLabels,
324215
324409
  locale = _ref.locale,
324216
324410
  dataSeriesItemLinks = _ref.dataSeriesItemLinks,
324217
324411
  isTitleEditable = _ref.isTitleEditable,
@@ -324468,7 +324662,7 @@ ${formatRule(Codicon.menuSubmenu)}
324468
324662
  className: classnames("".concat(baseClassName$1, "--content"), _defineProperty$c({}, "".concat(baseClassName$1, "__overflow"), selectedBreakpointIndex !== LAYOUTS.FIT_TO_SCREEN.index)),
324469
324663
  ref: scrollContainerRef
324470
324664
  }, renderHeader ? renderHeader() : /*#__PURE__*/React$1.createElement(DashboardEditorHeader$1, {
324471
- title: (dashboardJson === null || dashboardJson === void 0 ? void 0 : dashboardJson.title) || title,
324665
+ title: getTranslatedLabel(dashboardJson === null || dashboardJson === void 0 ? void 0 : dashboardJson.title, shouldUseTranslatedLabels, i18n) || title,
324472
324666
  breadcrumbs: headerBreadcrumbs,
324473
324667
  onImport: onImport,
324474
324668
  onExport: function onExport() {
@@ -324552,6 +324746,7 @@ ${formatRule(Codicon.menuSubmenu)}
324552
324746
  key: cardConfig.id,
324553
324747
  isResizable: isCardResizable,
324554
324748
  i18n: mergedI18n,
324749
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
324555
324750
  isSelected: isSelected,
324556
324751
  availableDimensions: availableDimensions,
324557
324752
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -324596,6 +324791,7 @@ ${formatRule(Codicon.menuSubmenu)}
324596
324791
  getValidDimensions: getValidDimensions,
324597
324792
  availableDimensions: availableDimensions,
324598
324793
  i18n: mergedI18n,
324794
+ shouldUseTranslatedLabels: shouldUseTranslatedLabels,
324599
324795
  currentBreakpoint: currentBreakpoint,
324600
324796
  dataSeriesItemLinks: dataSeriesItemLinks,
324601
324797
  onFetchDynamicDemoHotspots: onFetchDynamicDemoHotspots,
@@ -325518,6 +325714,17 @@ ${formatRule(Codicon.menuSubmenu)}
325518
325714
  },
325519
325715
  "required": false
325520
325716
  },
325717
+ "shouldUseTranslatedLabels": {
325718
+ "defaultValue": {
325719
+ "value": "false",
325720
+ "computed": false
325721
+ },
325722
+ "description": "whether to use translated labels in cards",
325723
+ "type": {
325724
+ "name": "bool"
325725
+ },
325726
+ "required": false
325727
+ },
325521
325728
  "locale": {
325522
325729
  "defaultValue": {
325523
325730
  "value": "'en'",