@splunk/visualizations 27.5.0 → 28.0.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 (164) hide show
  1. package/Area.config.js +19 -21
  2. package/Area.config.js.map +3 -3
  3. package/Area.js +54 -32
  4. package/Area.js.map +3 -3
  5. package/Bar.config.js +18 -21
  6. package/Bar.config.js.map +3 -3
  7. package/Bar.js +48 -31
  8. package/Bar.js.map +3 -3
  9. package/Bubble.config.js +39 -44
  10. package/Bubble.config.js.map +4 -4
  11. package/Bubble.js +69 -51
  12. package/Bubble.js.map +4 -4
  13. package/CHANGELOG.external.md +35 -7
  14. package/ChoroplethSvg.config.js +47 -43
  15. package/ChoroplethSvg.config.js.map +4 -4
  16. package/ChoroplethSvg.js +72 -45
  17. package/ChoroplethSvg.js.map +4 -4
  18. package/Column.config.js +15 -20
  19. package/Column.config.js.map +3 -3
  20. package/Column.js +42 -29
  21. package/Column.js.map +3 -3
  22. package/Ellipse.config.js +16 -7
  23. package/Ellipse.config.js.map +2 -2
  24. package/Ellipse.js +45 -19
  25. package/Ellipse.js.map +2 -2
  26. package/Events.config.js +38 -27
  27. package/Events.config.js.map +4 -4
  28. package/Events.js +113 -97
  29. package/Events.js.map +4 -4
  30. package/FEATUREFLAGS.md +9 -9
  31. package/FillerGauge.config.js +20 -13
  32. package/FillerGauge.config.js.map +3 -3
  33. package/FillerGauge.js +76 -27
  34. package/FillerGauge.js.map +4 -4
  35. package/Image.config.js +5 -6
  36. package/Image.config.js.map +2 -2
  37. package/Image.js +29 -14
  38. package/Image.js.map +2 -2
  39. package/Line.config.js +15 -20
  40. package/Line.config.js.map +3 -3
  41. package/Line.js +50 -31
  42. package/Line.js.map +3 -3
  43. package/LinkGraph.config.js +39 -46
  44. package/LinkGraph.config.js.map +3 -3
  45. package/LinkGraph.js +70 -50
  46. package/LinkGraph.js.map +3 -3
  47. package/MIGRATION.md +169 -40
  48. package/Map.config.js +36 -13
  49. package/Map.config.js.map +4 -4
  50. package/Map.js +170 -105
  51. package/Map.js.map +4 -4
  52. package/Markdown.config.js +4 -5
  53. package/Markdown.config.js.map +2 -2
  54. package/Markdown.js +117 -72
  55. package/Markdown.js.map +3 -3
  56. package/MarkerGauge.config.js +14 -12
  57. package/MarkerGauge.config.js.map +3 -3
  58. package/MarkerGauge.js +107 -69
  59. package/MarkerGauge.js.map +4 -4
  60. package/ParallelCoordinates.config.js +14 -12
  61. package/ParallelCoordinates.config.js.map +3 -3
  62. package/ParallelCoordinates.js +113 -59
  63. package/ParallelCoordinates.js.map +3 -3
  64. package/Pie.config.js +51 -38
  65. package/Pie.config.js.map +4 -4
  66. package/Pie.js +109 -85
  67. package/Pie.js.map +4 -4
  68. package/Punchcard.config.js +36 -34
  69. package/Punchcard.config.js.map +4 -4
  70. package/Punchcard.js +153 -87
  71. package/Punchcard.js.map +4 -4
  72. package/README.internal.md +15 -15
  73. package/README.md +10 -10
  74. package/Rectangle.config.js +16 -7
  75. package/Rectangle.config.js.map +2 -2
  76. package/Rectangle.js +45 -19
  77. package/Rectangle.js.map +2 -2
  78. package/Sankey.config.js +69 -17
  79. package/Sankey.config.js.map +4 -4
  80. package/Sankey.js +178 -49
  81. package/Sankey.js.map +4 -4
  82. package/Scatter.config.js +37 -42
  83. package/Scatter.config.js.map +3 -3
  84. package/Scatter.js +70 -53
  85. package/Scatter.js.map +3 -3
  86. package/SingleValue.config.js +32 -18
  87. package/SingleValue.config.js.map +4 -4
  88. package/SingleValue.js +237 -93
  89. package/SingleValue.js.map +4 -4
  90. package/SingleValueBasic.js +1 -0
  91. package/SingleValueBasic.js.map +2 -2
  92. package/SingleValueIcon.config.js +22 -11
  93. package/SingleValueIcon.config.js.map +2 -2
  94. package/SingleValueIcon.js +84 -28
  95. package/SingleValueIcon.js.map +2 -2
  96. package/SingleValueRadial.config.js +34 -23
  97. package/SingleValueRadial.config.js.map +3 -3
  98. package/SingleValueRadial.js +89 -48
  99. package/SingleValueRadial.js.map +4 -4
  100. package/SparkLine.js +153 -49
  101. package/SparkLine.js.map +2 -2
  102. package/Table.config.js +71 -51
  103. package/Table.config.js.map +3 -3
  104. package/Table.js +282 -145
  105. package/Table.js.map +3 -3
  106. package/Timeline.config.js +36 -34
  107. package/Timeline.config.js.map +4 -4
  108. package/Timeline.js +67 -59
  109. package/Timeline.js.map +4 -4
  110. package/common/Charting.js +1 -0
  111. package/common/Charting.js.map +2 -2
  112. package/common/ChartingApi.js +1 -0
  113. package/common/ChartingApi.js.map +1 -1
  114. package/common/DocExampleWithVizSandbox.js +7 -2
  115. package/common/DocExampleWithVizSandbox.js.map +2 -2
  116. package/common/EventsDoc.js +31 -5
  117. package/common/EventsDoc.js.map +4 -4
  118. package/common/GaugeMajorTicks.js +4 -1
  119. package/common/GaugeMajorTicks.js.map +2 -2
  120. package/common/GaugeValueMarker.js +31 -3
  121. package/common/GaugeValueMarker.js.map +4 -4
  122. package/common/OptionsDoc.js +4 -1
  123. package/common/OptionsDoc.js.map +2 -2
  124. package/common/OverviewDoc.js +66 -50
  125. package/common/OverviewDoc.js.map +4 -4
  126. package/common/SplunkVisualization.js +1 -0
  127. package/common/SplunkVisualization.js.map +1 -1
  128. package/common/SplunkVisualizationApi.js +1 -0
  129. package/common/SplunkVisualizationApi.js.map +1 -1
  130. package/common/ThemedDefaults.js +67 -0
  131. package/common/ThemedDefaults.js.map +7 -0
  132. package/common/ThemesDoc.js +6 -9
  133. package/common/ThemesDoc.js.map +2 -2
  134. package/common/chartingUtils.js +1 -0
  135. package/common/chartingUtils.js.map +2 -2
  136. package/common/docUtils.js +6 -1
  137. package/common/docUtils.js.map +2 -2
  138. package/common/gaugeUtils.js +6 -1
  139. package/common/gaugeUtils.js.map +2 -2
  140. package/common/shapeUtils.js +6 -4
  141. package/common/shapeUtils.js.map +2 -2
  142. package/common/utils/configUtils.js +4 -5
  143. package/common/utils/configUtils.js.map +2 -2
  144. package/common/utils/dataUtils.js +1 -0
  145. package/common/utils/dataUtils.js.map +2 -2
  146. package/common/utils/featureFlagUtils.js +1 -0
  147. package/common/utils/featureFlagUtils.js.map +1 -1
  148. package/common/utils/hocUtils.js +1 -0
  149. package/common/utils/hocUtils.js.map +1 -1
  150. package/common/utils/mapUtils.js +35 -22
  151. package/common/utils/mapUtils.js.map +4 -4
  152. package/common/utils/singleValueUtils.js +8 -2
  153. package/common/utils/singleValueUtils.js.map +2 -2
  154. package/common/utils/styleUtils.js +1 -0
  155. package/common/utils/styleUtils.js.map +1 -1
  156. package/common/utils/testHelper.js +1 -0
  157. package/common/utils/testHelper.js.map +1 -1
  158. package/common/utils/trellisUtils.js +1 -0
  159. package/common/utils/trellisUtils.js.map +1 -1
  160. package/common/utils/urlUtils.js +1 -0
  161. package/common/utils/urlUtils.js.map +1 -1
  162. package/common/withDashboardViz.js +25 -8
  163. package/common/withDashboardViz.js.map +2 -2
  164. package/package.json +37 -35
package/SingleValue.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /* Copyright © 2020 Splunk Inc.
2
2
  SPLUNK CONFIDENTIAL – Use or disclosure of this material in whole or
3
3
  in part without a valid written license from Splunk Inc. is PROHIBITED. */
4
+ "use strict";
4
5
  var __create = Object.create;
5
6
  var __defProp = Object.defineProperty;
6
7
  var __defProps = Object.defineProperties;
@@ -299,8 +300,8 @@ var getTrendColor = ({
299
300
  if (Number.isNaN(Number(trendValue))) {
300
301
  return void 0;
301
302
  }
302
- const { defaultFontColor, defaultBlockFontColor, defaultBackgroundColor } = defaultColors;
303
- if (hasBackground(customizedBgColor) && !isIdenticalColor(customizedBgColor, defaultBackgroundColor) && !isIdenticalColor(customizedBgColor, defaultBlockFontColor)) {
303
+ const { defaultFontColor, defaultBlockFontColor, defaultBackgroundColor: defaultBackgroundColor2 } = defaultColors;
304
+ if (hasBackground(customizedBgColor) && !isIdenticalColor(customizedBgColor, defaultBackgroundColor2) && !isIdenticalColor(customizedBgColor, defaultBlockFontColor)) {
304
305
  return defaultBlockFontColor;
305
306
  }
306
307
  const isInvalidTrend = trendDisplay === "percent" && trendValue === parseFloat(majorValue);
@@ -657,11 +658,16 @@ var handleValueClickCallback = (ev, majorValue, majorValueField, trendValue, onV
657
658
  trendValue,
658
659
  value: majorValue,
659
660
  name: majorValueField
660
- }, trellisEnabled && { "trellis.name": trellisSplitBy, "trellis.value": trellisKey })
661
+ }, trellisEnabled && {
662
+ "trellis.name": trellisSplitBy,
663
+ "trellis.value": trellisKey
664
+ })
661
665
  }));
662
666
  var getTrendColorWithPercent = (options) => {
663
667
  const shouldUsePercentTrendColor = options.trendColor === "> trendValue | rangeValue(trendColorEditorConfig)" && options.trendDisplay === "percent";
664
- return shouldUsePercentTrendColor ? { trendColor: "> trendValuePercent | rangeValue(trendColorEditorConfig)" } : {};
668
+ return shouldUsePercentTrendColor ? {
669
+ trendColor: "> trendValuePercent | rangeValue(trendColorEditorConfig)"
670
+ } : {};
665
671
  };
666
672
 
667
673
  // esm-externals:@splunk/react-icons/enterprise/ArrowUp
@@ -962,6 +968,7 @@ var StyledTooltip = styled_components_default.div`
962
968
  padding: 3px 8px;
963
969
  font-size: 12px;
964
970
  `;
971
+ var preventDefault = (e) => e.preventDefault();
965
972
  var _SparkLine = class _SparkLine extends react_exports.Component {
966
973
  constructor(props, ...rest) {
967
974
  super(props, ...rest);
@@ -972,21 +979,99 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
972
979
  });
973
980
  this.state = {
974
981
  anchor: null,
975
- currentPointX: null,
976
- open: false,
977
- rectArea: null,
978
- tooltip: null
982
+ activeIndex: 0,
983
+ hoveredIndex: null,
984
+ componentIsFocused: false
979
985
  };
980
- this.titleId = (0, id_exports.createDOMID)();
986
+ this.titleId = (0, id_exports.createDOMID)("sparkline-title");
987
+ this.pointRefs = [];
988
+ this.containerRef = react_default.createRef();
989
+ this.handleKeyDown = this.handleKeyDown.bind(this);
990
+ this.handleMouseOver = this.handleMouseOver.bind(this);
991
+ this.handleMouseLeave = this.handleMouseLeave.bind(this);
992
+ this.handleFocus = this.handleFocus.bind(this);
993
+ this.handleBlur = this.handleBlur.bind(this);
994
+ }
995
+ handleFocus(event) {
996
+ const { target } = event;
997
+ const { pointIndex: pointIndexStr } = target.dataset || {};
998
+ const { activeIndex, componentIsFocused, hoveredIndex } = this.state;
999
+ if (pointIndexStr !== void 0) {
1000
+ const pointIndex = parseInt(pointIndexStr, 10);
1001
+ if (activeIndex !== pointIndex || !componentIsFocused || hoveredIndex !== null) {
1002
+ this.setState({
1003
+ activeIndex: pointIndex,
1004
+ hoveredIndex: null,
1005
+ componentIsFocused: true
1006
+ });
1007
+ }
1008
+ } else if (this.pointRefs.length > 0) {
1009
+ const indexToFocus = activeIndex ? Math.min(this.pointRefs.length - 1, activeIndex) : 0;
1010
+ this.pointRefs[indexToFocus].focus();
1011
+ }
1012
+ }
1013
+ handleBlur(event) {
1014
+ if (this.containerRef.current && !this.containerRef.current.contains(event.relatedTarget)) {
1015
+ this.setState({ componentIsFocused: false });
1016
+ }
1017
+ }
1018
+ handleKeyDown(event) {
1019
+ const { data } = this.props;
1020
+ const { activeIndex } = this.state;
1021
+ const numPoints = data.length;
1022
+ if (numPoints === 0) {
1023
+ return;
1024
+ }
1025
+ const allowedKeys = ["ArrowLeft", "ArrowRight", "Home", "End"];
1026
+ if (!allowedKeys.includes(event.key)) {
1027
+ return;
1028
+ }
1029
+ let newIndex = activeIndex;
1030
+ switch (event.key) {
1031
+ case "Home":
1032
+ newIndex = 0;
1033
+ break;
1034
+ case "End":
1035
+ newIndex = numPoints - 1;
1036
+ break;
1037
+ case "ArrowLeft":
1038
+ newIndex = Math.max(0, activeIndex - 1);
1039
+ break;
1040
+ case "ArrowRight":
1041
+ newIndex = Math.min(numPoints - 1, activeIndex + 1);
1042
+ break;
1043
+ default:
1044
+ return;
1045
+ }
1046
+ if (newIndex !== activeIndex) {
1047
+ event.preventDefault();
1048
+ if (this.pointRefs[newIndex]) {
1049
+ this.pointRefs[newIndex].focus();
1050
+ }
1051
+ }
1052
+ }
1053
+ handleMouseOver(event) {
1054
+ const pointIndexStr = event.target.dataset && event.target.dataset.pointIndex;
1055
+ if (pointIndexStr !== void 0) {
1056
+ const pointIndex = parseInt(pointIndexStr, 10);
1057
+ if (this.state.hoveredIndex !== pointIndex) {
1058
+ this.setState({ hoveredIndex: pointIndex });
1059
+ }
1060
+ }
1061
+ }
1062
+ handleMouseLeave() {
1063
+ if (this.state.hoveredIndex !== null) {
1064
+ this.setState({ hoveredIndex: null });
1065
+ }
981
1066
  }
982
1067
  getMax() {
983
1068
  const { data, acceptNull, yMax } = this.props;
984
- const dataMax = () => acceptNull ? (0, lodash_exports.max)(this.fillNull(data)) : (0, lodash_exports.max)(data);
1069
+ const dataMax = () => acceptNull ? (0, lodash_exports.max)(this.fillNull()) : (0, lodash_exports.max)(data);
985
1070
  return yMax !== void 0 ? yMax : dataMax();
986
1071
  }
987
1072
  getMin() {
988
1073
  const { data, acceptNull, yMin } = this.props;
989
- const dataMin = () => acceptNull ? (0, lodash_exports.min)(this.fillNull(data)) : (0, lodash_exports.min)(data);
1074
+ const dataMin = () => acceptNull ? (0, lodash_exports.min)(this.fillNull()) : (0, lodash_exports.min)(data);
990
1075
  return yMin !== void 0 ? yMin : dataMin();
991
1076
  }
992
1077
  /**
@@ -1066,15 +1151,14 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
1066
1151
  })).map((p) => [p.x, p.y]);
1067
1152
  }
1068
1153
  /**
1069
- * Renders rect area for helping figure out which is the nearest point so that
1070
- * render related cursor and tooltip.
1154
+ * Renders rect area for each datapoint for interactions and screen reader support
1071
1155
  * @param {Array} points - array of points coordination.
1072
1156
  * @param {Number} xMargin - margin of x axis.
1073
1157
  * @return {Array} array of svg rect objects
1074
1158
  * @private
1075
1159
  */
1076
1160
  renderRect(points, xMargin) {
1077
- const { data, height } = this.props;
1161
+ const { data, height, showTooltip } = this.props;
1078
1162
  const xUnit = this.getXUnit(xMargin);
1079
1163
  return points.map((p, i) => (
1080
1164
  /* eslint-disable react/no-array-index-key */
@@ -1082,20 +1166,20 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
1082
1166
  "rect",
1083
1167
  {
1084
1168
  key: `${i}_${p[0]}`,
1169
+ role: "img",
1170
+ "aria-label": `Value: ${data[i] === null ? "N/A" : data[i]}, point ${i + 1} of ${data.length}`,
1085
1171
  "data-test": `rect-${i}`,
1172
+ "data-point-index": i,
1173
+ tabIndex: showTooltip && this.state.activeIndex === i ? 0 : -1,
1174
+ ref: (el) => {
1175
+ this.pointRefs[i] = el;
1176
+ },
1086
1177
  x: p[0] - xUnit / 2 <= 0 ? 0 : p[0] - xUnit / 2,
1087
1178
  y: 0,
1088
1179
  width: i === 0 && data.length !== 1 ? xUnit / 2 : xUnit,
1089
1180
  height,
1090
1181
  style: { fillOpacity: 0 },
1091
- onMouseOver: (e) => {
1092
- this.setState({
1093
- open: data[i] !== null,
1094
- rectArea: data[i] === null ? null : e.target,
1095
- tooltip: data[i],
1096
- currentPointX: p[0]
1097
- });
1098
- }
1182
+ onMouseDown: preventDefault
1099
1183
  }
1100
1184
  )
1101
1185
  ));
@@ -1131,22 +1215,16 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
1131
1215
  }
1132
1216
  )));
1133
1217
  }
1134
- renderCursor() {
1135
- const {
1136
- cursorStroke,
1137
- cursorStrokeWidth,
1138
- cursorStrokeLinecap,
1139
- cursorStrokeDasharray,
1140
- height
1141
- } = this.props;
1142
- return this.state.rectArea !== null && /* @__PURE__ */ react_default.createElement(
1218
+ renderCursor(currentPointX, shouldRender) {
1219
+ const { cursorStroke, cursorStrokeWidth, cursorStrokeLinecap, cursorStrokeDasharray, height } = this.props;
1220
+ return shouldRender && /* @__PURE__ */ react_default.createElement(
1143
1221
  "line",
1144
1222
  {
1145
1223
  "data-test": "cursor",
1146
1224
  ref: this.handleCursorMount,
1147
- x1: this.state.currentPointX,
1225
+ x1: currentPointX,
1148
1226
  y1: 0,
1149
- x2: this.state.currentPointX,
1227
+ x2: currentPointX,
1150
1228
  y2: height,
1151
1229
  style: {
1152
1230
  stroke: cursorStroke,
@@ -1157,19 +1235,20 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
1157
1235
  }
1158
1236
  );
1159
1237
  }
1160
- renderTooltip() {
1161
- return this.state.anchor !== null && /* @__PURE__ */ react_default.createElement(
1238
+ renderTooltip(tooltipValue, isOpen) {
1239
+ const { anchor } = this.state;
1240
+ return /* @__PURE__ */ react_default.createElement(
1162
1241
  Popover_default,
1163
1242
  {
1164
1243
  "data-test": "tooltip",
1165
- open: this.state.open,
1166
- anchor: this.state.anchor,
1167
- "data-test-value": this.state.tooltip,
1244
+ open: isOpen,
1245
+ anchor,
1246
+ "data-test-value": tooltipValue,
1168
1247
  appearance: "inverted",
1169
1248
  defaultPlacement: "above",
1170
1249
  animation: false
1171
1250
  },
1172
- /* @__PURE__ */ react_default.createElement(StyledTooltip, null, this.state.anchor !== null ? this.state.tooltip : void 0)
1251
+ /* @__PURE__ */ react_default.createElement(StyledTooltip, null, tooltipValue)
1173
1252
  );
1174
1253
  }
1175
1254
  /**
@@ -1240,39 +1319,69 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
1240
1319
  width,
1241
1320
  title
1242
1321
  } = this.props;
1322
+ const { activeIndex, hoveredIndex, componentIsFocused } = this.state;
1243
1323
  if (data.length === 0) {
1244
1324
  return null;
1245
1325
  }
1326
+ if (this.pointRefs.length !== data.length) {
1327
+ this.pointRefs.length = data.length;
1328
+ }
1246
1329
  const xMargin = endDotRadius + endDotStrokeWidth / 2;
1247
1330
  const yMargin = Math.max(lineStrokeWidth / 2, endDotRadius + endDotStrokeWidth / 2);
1248
1331
  const points = this.dataToPoints(xMargin, yMargin);
1249
1332
  const dotsToShow = Math.max(showEndDot && 1, (0, lodash_exports.isFinite)(endDotCount) && endDotCount > 0 && endDotCount);
1333
+ let currentPointX = null;
1334
+ let tooltipValue = null;
1335
+ let showCursorAndTooltip = false;
1336
+ let interactiveProps = {};
1337
+ if (showTooltip) {
1338
+ const isHovered = hoveredIndex !== null;
1339
+ const shouldDisplayInteractiveElements = (isHovered || componentIsFocused) && data.length > 0;
1340
+ if (shouldDisplayInteractiveElements) {
1341
+ const displayIndex = isHovered ? hoveredIndex : activeIndex;
1342
+ if (displayIndex !== null && displayIndex >= 0 && data.length > displayIndex && points.length > displayIndex) {
1343
+ const displayPointCoords = points[displayIndex];
1344
+ if (displayPointCoords) {
1345
+ [currentPointX] = displayPointCoords;
1346
+ }
1347
+ tooltipValue = data[displayIndex];
1348
+ showCursorAndTooltip = currentPointX !== null;
1349
+ }
1350
+ }
1351
+ interactiveProps = {
1352
+ onKeyDown: this.handleKeyDown,
1353
+ onMouseOver: this.handleMouseOver,
1354
+ onMouseLeave: this.handleMouseLeave,
1355
+ onFocus: this.handleFocus,
1356
+ onBlur: this.handleBlur
1357
+ };
1358
+ }
1359
+ const ariaLabel = title || (0, i18n_exports._)("Source count over time sparkline trend");
1250
1360
  return /* @__PURE__ */ react_default.createElement(
1251
1361
  "div",
1252
- __spreadValues({
1362
+ __spreadValues(__spreadValues({
1253
1363
  "data-test": "line",
1254
1364
  "data-test-type": isArea ? "area" : "line",
1255
- onMouseOut: () => {
1256
- this.setState({
1257
- open: false,
1258
- anchor: null,
1259
- rectArea: null,
1260
- currentPointX: null
1261
- });
1262
- },
1263
- ref: elementRef
1264
- }, (0, lodash_exports.omit)(this.props, (0, lodash_exports.keys)(_SparkLine.propTypes))),
1365
+ role: "group",
1366
+ ref: (el) => {
1367
+ this.containerRef.current = el;
1368
+ if (typeof elementRef === "function") {
1369
+ elementRef(el);
1370
+ } else if (elementRef && typeof elementRef === "object") {
1371
+ elementRef.current = el;
1372
+ }
1373
+ }
1374
+ }, interactiveProps), (0, lodash_exports.omit)(this.props, (0, lodash_exports.keys)(_SparkLine.propTypes))),
1265
1375
  /* @__PURE__ */ react_default.createElement(
1266
1376
  StyledSvg,
1267
1377
  {
1268
1378
  height,
1269
1379
  width,
1270
- role: "img",
1271
1380
  "aria-labelledby": this.titleId,
1272
1381
  "data-test": "sparkline-svg"
1273
1382
  },
1274
- /* @__PURE__ */ react_default.createElement("title", { id: this.titleId, "data-test": "sparkline-title" }, title || (0, i18n_exports._)("Source count over time sparkline trend")),
1275
- /* @__PURE__ */ react_default.createElement("g", null, this.renderCursor(), this.renderPolyline(points), this.renderArea(points), dotsToShow ? this.renderEndDots(points, dotsToShow, xMargin) : null, showTooltip ? this.renderRect(points, xMargin) : null, showTooltip ? this.renderTooltip() : null)
1383
+ /* @__PURE__ */ react_default.createElement("title", { id: this.titleId, "data-test": "sparkline-title" }, ariaLabel),
1384
+ /* @__PURE__ */ react_default.createElement("g", null, showTooltip ? this.renderCursor(currentPointX, showCursorAndTooltip) : null, this.renderPolyline(points), this.renderArea(points), dotsToShow ? this.renderEndDots(points, dotsToShow, xMargin) : null, this.renderRect(points, xMargin), showTooltip ? this.renderTooltip(tooltipValue, showCursorAndTooltip) : null)
1276
1385
  )
1277
1386
  );
1278
1387
  }
@@ -1403,7 +1512,12 @@ var SingleValueSparkline = ({
1403
1512
  endDotStroke: (0, propUtils_exports.formatColor)(stroke),
1404
1513
  endDotFillColor: (0, propUtils_exports.formatColor)(stroke),
1405
1514
  acceptNull,
1406
- style: { flex: "0 0 auto", justifyContent: "center", display: "flex", alignItems: "flex-end" }
1515
+ style: {
1516
+ flex: "0 0 auto",
1517
+ justifyContent: "center",
1518
+ display: "flex",
1519
+ alignItems: "flex-end"
1520
+ }
1407
1521
  }
1408
1522
  );
1409
1523
  SingleValueSparkline.propTypes = {
@@ -1504,7 +1618,10 @@ var getSparklines = ({
1504
1618
  contentHeight,
1505
1619
  isSparklinePositionBelow
1506
1620
  });
1507
- const sparklineSegments = getSparklineSegments({ hasSparkline, sparklineHighlightSegments });
1621
+ const sparklineSegments = getSparklineSegments({
1622
+ hasSparkline,
1623
+ sparklineHighlightSegments
1624
+ });
1508
1625
  const endDots = getEndDots({ hasSparkline, sparklineHighlightDots });
1509
1626
  return {
1510
1627
  sparklineWidth,
@@ -1727,7 +1844,7 @@ var SingleValue = (_a) => {
1727
1844
  shouldSparklineAcceptNullData,
1728
1845
  onValueClick,
1729
1846
  defaultFontColor,
1730
- defaultBackgroundColor,
1847
+ defaultBackgroundColor: defaultBackgroundColor2,
1731
1848
  defaultBlockFontColor,
1732
1849
  sparklineSeverityColors = DEFAULT_SPARKLINE_SEVERITY_COLORS,
1733
1850
  sparklineAreaColor,
@@ -1739,7 +1856,7 @@ var SingleValue = (_a) => {
1739
1856
  } = props;
1740
1857
  const defaultColors = {
1741
1858
  defaultFontColor,
1742
- defaultBackgroundColor,
1859
+ defaultBackgroundColor: defaultBackgroundColor2,
1743
1860
  defaultBlockFontColor,
1744
1861
  sparklineSeverityColors
1745
1862
  };
@@ -1800,14 +1917,7 @@ var SingleValue = (_a) => {
1800
1917
  { key: "trendDisplay", value: "off" },
1801
1918
  { key: "unit", value: "" }
1802
1919
  ];
1803
- const {
1804
- majorText,
1805
- trendText,
1806
- majorTextFontSize,
1807
- trendTextFontSize,
1808
- majorValueTitle,
1809
- smallVizProps
1810
- } = computeSingleValueContent({
1920
+ const { majorText, trendText, majorTextFontSize, trendTextFontSize, majorValueTitle, smallVizProps } = computeSingleValueContent({
1811
1921
  majorValue,
1812
1922
  majorValueDisplay,
1813
1923
  trendValue,
@@ -1837,7 +1947,10 @@ var SingleValue = (_a) => {
1837
1947
  hasSparkline,
1838
1948
  isSparklinePositionBelow,
1839
1949
  majorTextFontSize,
1840
- underLabelHeight: getUnderLabelHeight({ underLabel, underLabelFontSize })
1950
+ underLabelHeight: getUnderLabelHeight({
1951
+ underLabel,
1952
+ underLabelFontSize
1953
+ })
1841
1954
  });
1842
1955
  const { sparklineWidth, sparklineHeight, sparklineSegments, endDots } = getSparklines({
1843
1956
  width: containerWidth,
@@ -2266,9 +2379,14 @@ var Item = styled_components_default.div.attrs(({ width }) => ({
2266
2379
  position: relative;
2267
2380
  background-color: ${(props) => (0, colorUtils_exports.isColor)(props.backgroundColor) && props.backgroundColor || props.theme.defaultBackgroundColor}};
2268
2381
  `;
2269
- var FixSizeItem = styled_components_default.div.attrs(({ width, height }) => ({
2270
- style: __spreadValues(__spreadValues({}, width && { width: (0, style_exports.toPx)(width) }), height && { height: (0, style_exports.toPx)(height) })
2271
- }))`
2382
+ var FixSizeItem = styled_components_default.div.attrs(
2383
+ ({
2384
+ width,
2385
+ height
2386
+ }) => ({
2387
+ style: __spreadValues(__spreadValues({}, width && { width: (0, style_exports.toPx)(width) }), height && { height: (0, style_exports.toPx)(height) })
2388
+ })
2389
+ )`
2272
2390
  position: relative;
2273
2391
  flex-direction: column;
2274
2392
  flex: 1;
@@ -2302,7 +2420,7 @@ var withFixedSizeContainer = (Viz) => {
2302
2420
  FixSizeItem,
2303
2421
  {
2304
2422
  "data-test": "fix-size-item",
2305
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064",
2423
+ "data-splunk-visualization-version": "28.0.0 - 0c5f07712",
2306
2424
  width,
2307
2425
  height,
2308
2426
  backgroundColor
@@ -2368,7 +2486,7 @@ var Cover = styled_components_default.div`
2368
2486
  bottom: 0;
2369
2487
  `;
2370
2488
  var Blocker = styled_components_default.div.attrs({
2371
- "data-splunk-visualization-version": "27.5.0 - 5cfbc7064"
2489
+ "data-splunk-visualization-version": "28.0.0 - 0c5f07712"
2372
2490
  })`
2373
2491
  position: relative;
2374
2492
  width: 100%;
@@ -2737,7 +2855,12 @@ var useGetXAndYFields = ({
2737
2855
  y2Fields: options.y2 ? "> y2 | getField()" : void 0,
2738
2856
  fieldTypes: "> primary | getType()"
2739
2857
  };
2740
- const { xField = "", yFields = [], y2Fields = [], fieldTypes } = Options_exports.Options.evaluate(
2858
+ const {
2859
+ xField = "",
2860
+ yFields = [],
2861
+ y2Fields = [],
2862
+ fieldTypes
2863
+ } = Options_exports.Options.evaluate(
2741
2864
  { options: optionsToEvaluate, context },
2742
2865
  dataSourcesWithOnlyOnePoint,
2743
2866
  () => {
@@ -3351,7 +3474,9 @@ var withDashboardViz = (opts) => {
3351
3474
  return result;
3352
3475
  }
3353
3476
  } catch (e) {
3354
- console.error(`unexpected error evaluating options: ${e.message}`);
3477
+ if (e instanceof Error) {
3478
+ console.error(`unexpected error evaluating options: ${e.message}`);
3479
+ }
3355
3480
  return {};
3356
3481
  }
3357
3482
  return {};
@@ -3410,7 +3535,11 @@ var withDashboardViz = (opts) => {
3410
3535
  if (ev && ev.payload) {
3411
3536
  payload = ev.payload;
3412
3537
  }
3413
- return onEventTrigger({ originalEvent: ev, payload, type: eventName });
3538
+ return onEventTrigger({
3539
+ originalEvent: ev,
3540
+ payload,
3541
+ type: eventName
3542
+ });
3414
3543
  };
3415
3544
  if (parentKeys) {
3416
3545
  for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
@@ -3725,11 +3854,9 @@ var StaticBackgroundColorEditor_default = StaticBackgroundColorEditor;
3725
3854
  // src/common/utils/configUtils.ts
3726
3855
  function enhanceConfig(vizConfig) {
3727
3856
  const enhancedConfig = __spreadValues({}, vizConfig);
3728
- enhancedConfig.editorConfig = vizConfig.editorConfig.map(
3729
- (config3) => {
3730
- return __spreadProps(__spreadValues({}, config3), { open: config3.open || false });
3731
- }
3732
- );
3857
+ enhancedConfig.editorConfig = vizConfig.editorConfig.map((config3) => {
3858
+ return __spreadProps(__spreadValues({}, config3), { open: config3.open || false });
3859
+ });
3733
3860
  return enhancedConfig;
3734
3861
  }
3735
3862
  function hasCompatibleContexts(vizContext, presetContext) {
@@ -3791,7 +3918,6 @@ var TrellisEditorConfig = [
3791
3918
  editorProps: {
3792
3919
  min: 1
3793
3920
  },
3794
- placeholder: (0, i18n_exports._)("Auto"),
3795
3921
  showEditor: isTrellisEnabled
3796
3922
  }
3797
3923
  ],
@@ -3860,6 +3986,15 @@ var TrellisBackgroundColorEditor = {
3860
3986
  showEditor: isTrellisEnabled
3861
3987
  };
3862
3988
 
3989
+ // src/common/ThemedDefaults.tsx
3990
+ var defaultBackgroundColor = (props) => pick_default2({
3991
+ enterprise: {
3992
+ dark: variables_default.black(props),
3993
+ light: variables_default.white(props)
3994
+ },
3995
+ prisma: variables_default.backgroundColorSection(props)
3996
+ })(props);
3997
+
3863
3998
  // src/SingleValue/config.ts
3864
3999
  var dataContract = {
3865
4000
  requiredDataSources: [
@@ -3960,13 +4095,7 @@ var themes = {
3960
4095
  enterprise: variables_default.white(props),
3961
4096
  prisma: variables_default.contentColorActive(props)
3962
4097
  })(props),
3963
- defaultBackgroundColor: (props) => pick_default2({
3964
- enterprise: {
3965
- dark: variables_default.black(props),
3966
- light: variables_default.backgroundColor(props)
3967
- },
3968
- prisma: variables_default.backgroundColorSidebar(props)
3969
- })(props),
4098
+ defaultBackgroundColor,
3970
4099
  defaultSparklineStrokeColor: (props) => pick_default2({
3971
4100
  enterprise: variables_default.textColor(props),
3972
4101
  prisma: variables_default.contentColorActive(props)
@@ -4146,7 +4275,12 @@ var editorConfig = [
4146
4275
  }
4147
4276
  })
4148
4277
  ],
4149
- [getDynamicMajorColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
4278
+ [
4279
+ getDynamicMajorColorEditor({
4280
+ defaultContext,
4281
+ defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig
4282
+ })
4283
+ ],
4150
4284
  [
4151
4285
  __spreadProps(__spreadValues({}, StaticTrendColorEditor_default), {
4152
4286
  editorProps: {
@@ -4154,7 +4288,12 @@ var editorConfig = [
4154
4288
  }
4155
4289
  })
4156
4290
  ],
4157
- [getDynamicTrendColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
4291
+ [
4292
+ getDynamicTrendColorEditor({
4293
+ defaultContext,
4294
+ defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig
4295
+ })
4296
+ ],
4158
4297
  [
4159
4298
  __spreadProps(__spreadValues({}, StaticBackgroundColorEditor_default), {
4160
4299
  editorProps: {
@@ -4169,7 +4308,12 @@ var editorConfig = [
4169
4308
  }
4170
4309
  })
4171
4310
  ],
4172
- [getDynamicBackgroundColorEditor({ defaultContext, defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig })],
4311
+ [
4312
+ getDynamicBackgroundColorEditor({
4313
+ defaultContext,
4314
+ defaultPalettesConfig: PresetPalettes_exports.defaultPalettesConfig
4315
+ })
4316
+ ],
4173
4317
  [
4174
4318
  {
4175
4319
  label: (0, i18n_exports._)("Major value size (px)"),
@@ -4178,7 +4322,6 @@ var editorConfig = [
4178
4322
  editorProps: {
4179
4323
  min: 1
4180
4324
  },
4181
- placeholder: (0, i18n_exports._)("Auto"),
4182
4325
  showEditor: ({ options }) => options.showValue || options.showValue === void 0
4183
4326
  },
4184
4327
  {
@@ -4188,7 +4331,6 @@ var editorConfig = [
4188
4331
  editorProps: {
4189
4332
  min: 1
4190
4333
  },
4191
- placeholder: (0, i18n_exports._)("Auto"),
4192
4334
  showEditor: ({ options }) => options.showValue || options.showValue === void 0,
4193
4335
  isDisabled: ({ options }) => options.trendDisplay === "off"
4194
4336
  }
@@ -4381,7 +4523,9 @@ var withTrellis = (Viz) => {
4381
4523
  const evaluated = Options_exports.Options.evaluate(
4382
4524
  {
4383
4525
  context: Viz.config.context,
4384
- options: { trellisBackgroundColor: mergedOptions.trellisBackgroundColor }
4526
+ options: {
4527
+ trellisBackgroundColor: mergedOptions.trellisBackgroundColor
4528
+ }
4385
4529
  },
4386
4530
  {},
4387
4531
  themeFunc