@splunk/visualizations 28.3.0 → 28.5.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 (285) hide show
  1. package/Area/Area.d.ts.map +1 -1
  2. package/Area.config.js +28 -8
  3. package/Area.config.js.map +2 -2
  4. package/Area.js +583 -120
  5. package/Area.js.map +3 -3
  6. package/Bar/Bar.d.ts.map +1 -1
  7. package/Bar.config.js +28 -8
  8. package/Bar.config.js.map +2 -2
  9. package/Bar.js +593 -120
  10. package/Bar.js.map +3 -3
  11. package/Bubble.config.js +4 -5
  12. package/Bubble.config.js.map +2 -2
  13. package/Bubble.js +554 -98
  14. package/Bubble.js.map +3 -3
  15. package/CHANGELOG.external.md +165 -0
  16. package/ChoroplethSvg/ChoroplethSvg.d.ts +4 -3
  17. package/ChoroplethSvg/ChoroplethSvg.d.ts.map +1 -1
  18. package/ChoroplethSvg.config.js +1 -3
  19. package/ChoroplethSvg.config.js.map +2 -2
  20. package/ChoroplethSvg.js +595 -111
  21. package/ChoroplethSvg.js.map +4 -4
  22. package/Column/Column.d.ts.map +1 -1
  23. package/Column.config.js +28 -8
  24. package/Column.config.js.map +2 -2
  25. package/Column.js +583 -120
  26. package/Column.js.map +3 -3
  27. package/Ellipse/config.d.ts.map +1 -1
  28. package/Ellipse.config.js +14 -5
  29. package/Ellipse.config.js.map +4 -4
  30. package/Ellipse.js +640 -159
  31. package/Ellipse.js.map +4 -4
  32. package/Events/PureEvents/PureEvents.d.ts.map +1 -1
  33. package/Events.js +668 -157
  34. package/Events.js.map +4 -4
  35. package/FillerGauge/FillerGauge.d.ts.map +1 -1
  36. package/FillerGauge/PureFillerGauge/FillerGauge.d.ts.map +1 -1
  37. package/FillerGauge.js +751 -169
  38. package/FillerGauge.js.map +4 -4
  39. package/Image/Image.d.ts.map +1 -1
  40. package/Image.js +620 -116
  41. package/Image.js.map +4 -4
  42. package/Line/Line.d.ts.map +1 -1
  43. package/Line/lineUtils.d.ts.map +1 -1
  44. package/Line/mockdata/LineData.d.ts +154 -0
  45. package/Line/mockdata/LineData.d.ts.map +1 -1
  46. package/Line.config.js +28 -8
  47. package/Line.config.js.map +2 -2
  48. package/Line.js +704 -122
  49. package/Line.js.map +3 -3
  50. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +5 -0
  51. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
  52. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
  53. package/LinkGraph/PureLinkGraph/components/Graph.d.ts +9 -1
  54. package/LinkGraph/PureLinkGraph/components/Graph.d.ts.map +1 -1
  55. package/LinkGraph/PureLinkGraph/components/GraphStyles.d.ts.map +1 -1
  56. package/LinkGraph/PureLinkGraph/components/Node.d.ts +1 -0
  57. package/LinkGraph/PureLinkGraph/components/Node.d.ts.map +1 -1
  58. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +1 -0
  59. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts.map +1 -1
  60. package/LinkGraph/PureLinkGraph/measurementUtils.d.ts +16 -0
  61. package/LinkGraph/PureLinkGraph/measurementUtils.d.ts.map +1 -0
  62. package/LinkGraph/PureLinkGraph/utils/iconLoader.d.ts.map +1 -1
  63. package/LinkGraph/config.d.ts.map +1 -1
  64. package/LinkGraph.config.js +15 -1
  65. package/LinkGraph.config.js.map +2 -2
  66. package/LinkGraph.js +1411 -662
  67. package/LinkGraph.js.map +4 -4
  68. package/Map/Map.d.ts +2 -2
  69. package/Map/Map.d.ts.map +1 -1
  70. package/Map/PureMap/BubbleLayer.d.ts +5 -0
  71. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  72. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  73. package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
  74. package/Map/PureMap/MapUtils.d.ts +2 -2
  75. package/Map/PureMap/MapUtils.d.ts.map +1 -1
  76. package/Map/PureMap/PureMap.d.ts.map +1 -1
  77. package/Map/PureMap/PureMapContainer.d.ts.map +1 -1
  78. package/Map/PureMap/Tooltip.d.ts.map +1 -1
  79. package/Map/config.d.ts.map +1 -1
  80. package/Map.config.js +0 -1
  81. package/Map.config.js.map +2 -2
  82. package/Map.js +831 -247
  83. package/Map.js.map +4 -4
  84. package/Markdown/Markdown.d.ts.map +1 -1
  85. package/Markdown/config.d.ts.map +1 -1
  86. package/Markdown.config.js +14 -5
  87. package/Markdown.config.js.map +4 -4
  88. package/Markdown.js +619 -109
  89. package/Markdown.js.map +4 -4
  90. package/MarkerGauge/MarkerGauge.d.ts +5 -1
  91. package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
  92. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +4 -0
  93. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
  94. package/MarkerGauge/config.d.ts.map +1 -1
  95. package/MarkerGauge.config.js +121 -3
  96. package/MarkerGauge.config.js.map +3 -3
  97. package/MarkerGauge.js +1535 -172
  98. package/MarkerGauge.js.map +4 -4
  99. package/NetworkGraph/NetworkGraph.d.ts +22 -0
  100. package/NetworkGraph/NetworkGraph.d.ts.map +1 -0
  101. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts +60 -0
  102. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -0
  103. package/NetworkGraph/PureNetworkGraph/components/Link.d.ts +19 -0
  104. package/NetworkGraph/PureNetworkGraph/components/Link.d.ts.map +1 -0
  105. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +29 -0
  106. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -0
  107. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +27 -0
  108. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -0
  109. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +12 -0
  110. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -0
  111. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +13 -0
  112. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -0
  113. package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts +140 -0
  114. package/NetworkGraph/PureNetworkGraph/mockdata/data.d.ts.map +1 -0
  115. package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts +89 -0
  116. package/NetworkGraph/PureNetworkGraph/mockdata/datasource.d.ts.map +1 -0
  117. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts +78 -0
  118. package/NetworkGraph/PureNetworkGraph/utils/dragUtils.d.ts.map +1 -0
  119. package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts +47 -0
  120. package/NetworkGraph/PureNetworkGraph/utils/forceLayout.d.ts.map +1 -0
  121. package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts +78 -0
  122. package/NetworkGraph/PureNetworkGraph/utils/iconLoader.d.ts.map +1 -0
  123. package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts +111 -0
  124. package/NetworkGraph/PureNetworkGraph/utils/networkGraphShared.d.ts.map +1 -0
  125. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +122 -0
  126. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -0
  127. package/NetworkGraph/config.d.ts +4 -0
  128. package/NetworkGraph/config.d.ts.map +1 -0
  129. package/NetworkGraph/index.d.ts +3 -0
  130. package/NetworkGraph/index.d.ts.map +1 -0
  131. package/NetworkGraph.config.js +938 -0
  132. package/NetworkGraph.config.js.map +7 -0
  133. package/NetworkGraph.js +7053 -0
  134. package/NetworkGraph.js.map +7 -0
  135. package/PERFORMANCE.md +23 -0
  136. package/ParallelCoordinates/ParallelCoordinates.d.ts +1 -46
  137. package/ParallelCoordinates/ParallelCoordinates.d.ts.map +1 -1
  138. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts +12 -58
  139. package/ParallelCoordinates/PureParallelCoordinates/PureParallelCoordinates.d.ts.map +1 -1
  140. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts +1 -0
  141. package/ParallelCoordinates/PureParallelCoordinates/src/ParallelCoordinatesChart.d.ts.map +1 -1
  142. package/ParallelCoordinates.js +664 -228
  143. package/ParallelCoordinates.js.map +4 -4
  144. package/Pie/Pie.d.ts.map +1 -1
  145. package/Pie/config.d.ts.map +1 -1
  146. package/Pie/pieUtils.d.ts +4 -0
  147. package/Pie/pieUtils.d.ts.map +1 -1
  148. package/Pie.config.js +16 -0
  149. package/Pie.config.js.map +2 -2
  150. package/Pie.js +610 -118
  151. package/Pie.js.map +3 -3
  152. package/Punchcard.js +579 -92
  153. package/Punchcard.js.map +4 -4
  154. package/Rectangle/config.d.ts.map +1 -1
  155. package/Rectangle.config.js +14 -5
  156. package/Rectangle.config.js.map +4 -4
  157. package/Rectangle.js +611 -130
  158. package/Rectangle.js.map +4 -4
  159. package/Sankey/PureSankey/PureSankey.d.ts +26 -72
  160. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  161. package/Sankey/PureSankey/SankeyLink.d.ts +3 -19
  162. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  163. package/Sankey/PureSankey/SankeyNode.d.ts +3 -20
  164. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  165. package/Sankey/PureSankey/SankeyTooltip.d.ts +3 -24
  166. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  167. package/Sankey.js +814 -429
  168. package/Sankey.js.map +4 -4
  169. package/Scatter/Scatter.d.ts.map +1 -1
  170. package/Scatter.config.js +168 -148
  171. package/Scatter.config.js.map +4 -4
  172. package/Scatter.js +733 -260
  173. package/Scatter.js.map +4 -4
  174. package/SingleValue/SingleValue.d.ts.map +1 -1
  175. package/SingleValue/config.d.ts.map +1 -1
  176. package/SingleValue.config.js +15 -2
  177. package/SingleValue.config.js.map +2 -2
  178. package/SingleValue.js +733 -229
  179. package/SingleValue.js.map +3 -3
  180. package/SingleValueBasic.js.map +1 -1
  181. package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
  182. package/SingleValueIcon/config.d.ts.map +1 -1
  183. package/SingleValueIcon.config.js +14 -6
  184. package/SingleValueIcon.config.js.map +4 -4
  185. package/SingleValueIcon.js +612 -182
  186. package/SingleValueIcon.js.map +4 -4
  187. package/SingleValueRadial/PureSingleValueRadial/GaugeGraph.d.ts.map +1 -1
  188. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
  189. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
  190. package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
  191. package/SingleValueRadial.config.js +0 -1
  192. package/SingleValueRadial.config.js.map +2 -2
  193. package/SingleValueRadial.js +594 -182
  194. package/SingleValueRadial.js.map +4 -4
  195. package/SparkLine.js +46 -8
  196. package/SparkLine.js.map +2 -2
  197. package/Table/PureTable.d.ts +10 -0
  198. package/Table/PureTable.d.ts.map +1 -1
  199. package/Table/Table.d.ts.map +1 -1
  200. package/Table/cells/SparklineCell.d.ts.map +1 -1
  201. package/Table/config.d.ts.map +1 -1
  202. package/Table/hooks.d.ts +6 -0
  203. package/Table/hooks.d.ts.map +1 -1
  204. package/Table.config.js +1 -1
  205. package/Table.config.js.map +2 -2
  206. package/Table.js +836 -253
  207. package/Table.js.map +4 -4
  208. package/Timeline/PureTimeline/PureTimeline.d.ts.map +1 -1
  209. package/Timeline/PureTimeline/src/CursorPlugin.d.ts.map +1 -1
  210. package/Timeline/PureTimeline/src/TimelineLegend.d.ts.map +1 -1
  211. package/Timeline/PureTimeline/src/TimelinePlugin.d.ts.map +1 -1
  212. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  213. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +2 -1
  214. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  215. package/Timeline/config.d.ts.map +1 -1
  216. package/Timeline.config.js +31 -12
  217. package/Timeline.config.js.map +4 -4
  218. package/Timeline.js +785 -247
  219. package/Timeline.js.map +4 -4
  220. package/common/Charting.d.ts +5 -0
  221. package/common/Charting.d.ts.map +1 -1
  222. package/common/Charting.js +12 -0
  223. package/common/Charting.js.map +2 -2
  224. package/common/GaugeMajorTicks.js +150 -13
  225. package/common/GaugeMajorTicks.js.map +4 -4
  226. package/common/GaugeValueMarker.js +84 -17
  227. package/common/GaugeValueMarker.js.map +4 -4
  228. package/common/OptionsDoc.js.map +1 -1
  229. package/common/OverviewDoc.d.ts.map +1 -1
  230. package/common/OverviewDoc.js +2 -2
  231. package/common/OverviewDoc.js.map +2 -2
  232. package/common/ThemesDoc.js +0 -1
  233. package/common/ThemesDoc.js.map +2 -2
  234. package/common/TimeSeriesChartWrapper.d.ts +24 -11
  235. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  236. package/common/TimeSeriesChartWrapper.js +617 -91
  237. package/common/TimeSeriesChartWrapper.js.map +4 -4
  238. package/common/chartingUtils.d.ts +52 -6
  239. package/common/chartingUtils.d.ts.map +1 -1
  240. package/common/chartingUtils.js +116 -17
  241. package/common/chartingUtils.js.map +3 -3
  242. package/common/editorConfig/AxesChartDataConfig.d.ts +3 -3
  243. package/common/editorConfig/AxesChartDataConfig.d.ts.map +1 -1
  244. package/common/editorConfig/AxesChartDataDisplay.d.ts +4 -0
  245. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  246. package/common/editorConfig/AxesChartLegend.d.ts.map +1 -1
  247. package/common/gaugeUtils.d.ts +37 -0
  248. package/common/gaugeUtils.d.ts.map +1 -1
  249. package/common/gaugeUtils.js +152 -2
  250. package/common/gaugeUtils.js.map +4 -4
  251. package/common/hocs/mockdata/trellisData.d.ts +119 -0
  252. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  253. package/common/hocs/withTrellis.d.ts.map +1 -1
  254. package/common/interfaces/DashboardVizProps.d.ts +0 -3
  255. package/common/interfaces/DashboardVizProps.d.ts.map +1 -1
  256. package/common/interfaces/DataSource.d.ts +1 -1
  257. package/common/interfaces/DataSource.d.ts.map +1 -1
  258. package/common/interfaces/Overview.d.ts +1 -0
  259. package/common/interfaces/Overview.d.ts.map +1 -1
  260. package/common/interfaces/VizConfig.d.ts +2 -1
  261. package/common/interfaces/VizConfig.d.ts.map +1 -1
  262. package/common/shapeUtils.js +5 -20
  263. package/common/shapeUtils.js.map +2 -2
  264. package/common/utils/dataUtils.d.ts.map +1 -1
  265. package/common/utils/dataUtils.js +5 -4
  266. package/common/utils/dataUtils.js.map +2 -2
  267. package/common/utils/mapUtils.js +16 -9
  268. package/common/utils/mapUtils.js.map +2 -2
  269. package/common/utils/singleValueUtils.js +17 -18
  270. package/common/utils/singleValueUtils.js.map +2 -2
  271. package/common/utils/textUtils.d.ts +20 -0
  272. package/common/utils/textUtils.d.ts.map +1 -0
  273. package/common/utils/textUtils.js +76 -0
  274. package/common/utils/textUtils.js.map +7 -0
  275. package/common/utils/trellisUtils.d.ts.map +1 -1
  276. package/common/utils/trellisUtils.js +16 -20
  277. package/common/utils/trellisUtils.js.map +2 -2
  278. package/common/withDashboardViz.d.ts.map +1 -1
  279. package/common/withDashboardViz.js +600 -92
  280. package/common/withDashboardViz.js.map +4 -4
  281. package/package.json +46 -39
  282. package/common/utils/styleUtils.d.ts +0 -2
  283. package/common/utils/styleUtils.d.ts.map +0 -1
  284. package/common/utils/styleUtils.js +0 -30
  285. package/common/utils/styleUtils.js.map +0 -7
package/Rectangle.js CHANGED
@@ -476,7 +476,7 @@ var Cover = styled_components_default.div`
476
476
  bottom: 0;
477
477
  `;
478
478
  var Blocker = styled_components_default.div.attrs({
479
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
479
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
480
480
  })`
481
481
  position: relative;
482
482
  width: 100%;
@@ -575,7 +575,7 @@ var withFixedSizeContainer = (Viz) => {
575
575
  FixSizeItem,
576
576
  {
577
577
  "data-test": "fix-size-item",
578
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
578
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
579
579
  width,
580
580
  height,
581
581
  backgroundColor
@@ -671,6 +671,7 @@ __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUti
671
671
  var numberUtils_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
672
672
 
673
673
  // src/common/utils/dataUtils.ts
674
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
674
675
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
675
676
  const dataLength = data.length;
676
677
  const downsampledIndices = [];
@@ -787,9 +788,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
787
788
  let xColumn = [];
788
789
  const yColumns = [];
789
790
  const canDownsample = !ds.data.fields.some((field, index) => {
790
- var _a, _b;
791
- const fieldName = (_a = field.name) != null ? _a : field;
792
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
791
+ var _a;
792
+ const fieldName = getFieldName(field);
793
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
793
794
  const column = ds.data.columns[index];
794
795
  let hasDisplayedColumnThatCantBeDownsampled = false;
795
796
  if (fieldName === xField) {
@@ -1142,6 +1143,16 @@ var triangleEventAnnotationRenderer = ({
1142
1143
  eventColor: eventWithColor.color
1143
1144
  });
1144
1145
  };
1146
+ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
1147
+ const rangeSelectEventHandler = eventHandlers.find(
1148
+ (eventHandler) => {
1149
+ var _a;
1150
+ return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
1151
+ }
1152
+ );
1153
+ const xAxisIsTime = xField === "_time";
1154
+ return !!rangeSelectEventHandler && xAxisIsTime;
1155
+ };
1145
1156
  var canvasSupportedTimeSeriesCharts = ["splunk.line"];
1146
1157
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
1147
1158
  return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
@@ -1162,17 +1173,34 @@ var filterChartDataFromInternalFields = (chartData) => {
1162
1173
  var convert2DArrayToNumbers = (arr) => {
1163
1174
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
1164
1175
  };
1165
- var SideLegendWidth = 75;
1166
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
1176
+ var parseAxisValue = (val) => {
1177
+ if (val === void 0 || val === null || val === "auto" || val === "") {
1178
+ return void 0;
1179
+ }
1180
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
1181
+ return Number.isNaN(num) ? void 0 : num;
1182
+ };
1183
+ var parseXAxisLineVisibility = (visibility) => {
1184
+ if (visibility === "hide") return false;
1185
+ if (visibility === "show") return true;
1186
+ return void 0;
1187
+ };
1167
1188
  var getLegend = (props) => {
1168
1189
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
1190
+ const { isSeriesCompare, legendTruncation } = props;
1191
+ const commonLegendProps = {
1192
+ center: true,
1193
+ fontSize: 12,
1194
+ largerTiles: true,
1195
+ hideSeriesValue: !isSeriesCompare,
1196
+ // Show values if in seriesCompare mode
1197
+ legendTruncation
1198
+ };
1169
1199
  switch (legendPlacement) {
1170
1200
  case "off":
1171
1201
  return false;
1172
1202
  case "left":
1173
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
1174
- width: SideLegendWidth
1175
- }, commonLegendProps));
1203
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
1176
1204
  case "bottom":
1177
1205
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
1178
1206
  wrap: true
@@ -1182,9 +1210,7 @@ var getLegend = (props) => {
1182
1210
  wrap: true
1183
1211
  }, commonLegendProps));
1184
1212
  default:
1185
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
1186
- width: SideLegendWidth
1187
- }, commonLegendProps));
1213
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
1188
1214
  }
1189
1215
  };
1190
1216
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -1219,22 +1245,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
1219
1245
  const end = axisTitle.slice(-halfChars);
1220
1246
  return `${start}...${end}`;
1221
1247
  };
1222
- var getFieldName = (field) => {
1248
+ var getFieldName2 = (field) => {
1223
1249
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
1224
1250
  return fieldName;
1225
1251
  };
1226
1252
  var getFieldNames = (fields) => {
1227
- return fields.map((field) => getFieldName(field));
1253
+ return fields.map((field) => getFieldName2(field));
1228
1254
  };
1229
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
1255
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
1230
1256
  const xConfig = { x: {} };
1231
1257
  xConfig.x.label = label;
1232
1258
  if (xAxisLabelVisibility === "hide") {
1233
1259
  xConfig.x.hideLabels = true;
1234
1260
  }
1261
+ if (xAxisLabelRotation !== void 0) {
1262
+ xConfig.x.labelRotation = xAxisLabelRotation;
1263
+ }
1235
1264
  return xConfig;
1236
1265
  };
1237
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
1266
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
1238
1267
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
1239
1268
  const yConfig = { y: {} };
1240
1269
  yConfig.y.label = label;
@@ -1242,34 +1271,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
1242
1271
  if (yAxisAbbreviation !== "none") {
1243
1272
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
1244
1273
  }
1245
- if (yAxisAbbreviation === "none") {
1246
- yConfig.y.width = 55;
1247
- } else {
1274
+ if (yAxisAbbreviation !== "none") {
1248
1275
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
1249
1276
  }
1250
1277
  if (yAxisLabelVisibility === "hide") {
1251
1278
  yConfig.y.hideLabels = true;
1252
1279
  }
1280
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
1281
+ yConfig.y.range = (u, dataMin, dataMax) => {
1282
+ const min = yAxisMin != null ? yAxisMin : dataMin;
1283
+ const max = yAxisMax != null ? yAxisMax : dataMax;
1284
+ return [min, max];
1285
+ };
1286
+ }
1253
1287
  return yConfig;
1254
1288
  };
1255
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
1289
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
1256
1290
  const y2Config = { y2: {} };
1257
1291
  const scaleType = axisScale != null ? axisScale : "linear";
1258
1292
  y2Config.y2.label = label;
1259
1293
  y2Config.y2.side = "right";
1260
- y2Config.y2.showGrid = false;
1261
1294
  y2Config.y2.type = scaleType;
1262
1295
  if (axisAbbreviation !== "none") {
1263
1296
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
1297
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
1264
1298
  } else if (roundAxisLabelsToInteger) {
1265
1299
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
1266
1300
  }
1267
1301
  if (y2AxisLabelVisibility === "hide") {
1268
1302
  y2Config.y2.hideLabels = true;
1269
1303
  }
1304
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
1305
+ y2Config.y2.range = (u, dataMin, dataMax) => {
1306
+ const min = y2AxisMin != null ? y2AxisMin : dataMin;
1307
+ const max = y2AxisMax != null ? y2AxisMax : dataMax;
1308
+ return [min, max];
1309
+ };
1310
+ }
1270
1311
  return y2Config;
1271
1312
  };
1272
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
1313
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
1273
1314
  const seriesConfig = {};
1274
1315
  let spanGaps;
1275
1316
  let replaceNullsWithZero;
@@ -1296,6 +1337,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
1296
1337
  );
1297
1338
  if (shouldAssignToY2) {
1298
1339
  seriesConfig[field].overrides.scale = "y2";
1340
+ } else {
1341
+ seriesConfig[field].overrides.scale = "y";
1299
1342
  }
1300
1343
  }
1301
1344
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -1304,12 +1347,101 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
1304
1347
  if (markerDisplay !== void 0) {
1305
1348
  seriesConfig[field].markerDisplay = markerDisplay;
1306
1349
  }
1350
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
1351
+ if (fieldDashStyle) {
1352
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
1353
+ }
1354
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
1355
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
1356
+ if (fieldStepPosition && fieldStepPosition !== "off") {
1357
+ seriesConfig[field].stepPosition = fieldStepPosition;
1358
+ }
1307
1359
  if (replaceNullsWithZero !== void 0) {
1308
1360
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
1309
1361
  }
1310
1362
  });
1311
1363
  return seriesConfig;
1312
1364
  };
1365
+ var findRangeIndices = (xData, startValue, endValue) => {
1366
+ let startXIndex = -1;
1367
+ let endXIndex = -1;
1368
+ const xDataEpoch = xData.map((val) => {
1369
+ if (typeof val === "string") {
1370
+ return new Date(val).getTime() / 1e3;
1371
+ }
1372
+ return val;
1373
+ });
1374
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
1375
+ if (xDataEpoch[i] >= startValue) {
1376
+ startXIndex = i;
1377
+ break;
1378
+ }
1379
+ }
1380
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
1381
+ startXIndex = xDataEpoch.length - 1;
1382
+ }
1383
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
1384
+ if (xDataEpoch[i] <= endValue) {
1385
+ endXIndex = i;
1386
+ break;
1387
+ }
1388
+ }
1389
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
1390
+ endXIndex = 0;
1391
+ }
1392
+ return { startXIndex, endXIndex };
1393
+ };
1394
+
1395
+ // esm-externals:@splunk/visualization-schemas
1396
+ var visualization_schemas_exports = {};
1397
+ __export(visualization_schemas_exports, {
1398
+ default: () => visualization_schemas_default
1399
+ });
1400
+ var defaultImport26 = __toESM(require("@splunk/visualization-schemas"));
1401
+ __reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
1402
+ var visualization_schemas_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
1403
+
1404
+ // src/common/hooks/useTrellisEnabled.ts
1405
+ var useTrellisFeatureFlagOn = () => {
1406
+ const context = (0, react_exports.useContext)(FeatureFlagContext_default);
1407
+ return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
1408
+ };
1409
+ var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
1410
+ const trellisFeatureEnabled = useTrellisFeatureFlagOn();
1411
+ return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
1412
+ };
1413
+
1414
+ // src/common/components/TrellisTitle.tsx
1415
+ var TRELLIS_TITLE_HEIGHT = 28;
1416
+ var TrellisTitleText = styled_components_default.div`
1417
+ margin-left: 10px;
1418
+ margin-right: 10px;
1419
+ padding-top: 8px;
1420
+ text-overflow: ellipsis;
1421
+ white-space: nowrap;
1422
+ overflow: hidden;
1423
+ `;
1424
+ var TrellisTitleDiv = styled_components_default.div`
1425
+ height: ${TRELLIS_TITLE_HEIGHT}px;
1426
+ font-size: 14px;
1427
+ font-weight: 700;
1428
+ color: ${(props) => props.fontColor};
1429
+ background-color: ${(props) => props.backgroundColor};
1430
+ box-shadow: 0 1px ${(props) => props.backgroundColor}; // this is added to avoid a 1px gap between title and viz divs that showed up intermittently because of pixel rounding error in chrome.
1431
+ `;
1432
+ var TrellisTitle = (props) => {
1433
+ const titleText = String(props.trellisKey).toString();
1434
+ return /* @__PURE__ */ react_exports.createElement(
1435
+ TrellisTitleDiv,
1436
+ {
1437
+ fontColor: props.fontColor,
1438
+ backgroundColor: props.backgroundColor,
1439
+ "data-test": "trellis-title",
1440
+ title: titleText
1441
+ },
1442
+ /* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
1443
+ );
1444
+ };
1313
1445
 
1314
1446
  // src/common/TimeSeriesChartWrapper.tsx
1315
1447
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -1320,38 +1452,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
1320
1452
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
1321
1453
  }
1322
1454
  `;
1323
- var handleClick = (chartEvent, onClick) => {
1455
+ var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
1456
+ const result = __spreadValues({}, payload);
1457
+ if (trellisSplitBy) {
1458
+ result["trellis.name"] = trellisSplitBy;
1459
+ }
1460
+ if (trellisKey) {
1461
+ result["trellis.value"] = trellisKey;
1462
+ }
1463
+ return result;
1464
+ };
1465
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
1466
+ if (!previousPayload) {
1467
+ return true;
1468
+ }
1469
+ if (currentPayload.index !== previousPayload.index) {
1470
+ return true;
1471
+ }
1472
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
1473
+ return true;
1474
+ }
1475
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
1476
+ return true;
1477
+ }
1478
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
1479
+ return true;
1480
+ }
1481
+ return false;
1482
+ };
1483
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
1324
1484
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
1325
1485
  name: chartEvent.seriesKey
1326
1486
  });
1327
1487
  delete payload.seriesKey;
1328
1488
  if (chartEvent.rowContext) {
1329
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
1330
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
1331
- });
1489
+ Object.assign(
1490
+ payload,
1491
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
1492
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
1493
+ return acc;
1494
+ }, {})
1495
+ );
1332
1496
  }
1497
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1333
1498
  if (onClick) {
1334
1499
  onClick({
1335
1500
  type: "point.click",
1336
1501
  originalEvent: chartEvent,
1337
- payload
1502
+ payload: updatedPayload
1338
1503
  });
1339
1504
  }
1340
1505
  };
1341
- var handleLegendClick = (chartEvent, onClick) => {
1506
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
1342
1507
  const payload = {
1343
1508
  name: chartEvent
1344
1509
  };
1510
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1345
1511
  if (onClick) {
1346
1512
  onClick({
1347
1513
  type: "legend.click",
1348
1514
  originalEvent: chartEvent,
1349
- payload
1515
+ payload: updatedPayload
1516
+ });
1517
+ }
1518
+ };
1519
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
1520
+ var _a;
1521
+ if (!rangeEvent) {
1522
+ return;
1523
+ }
1524
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
1525
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
1526
+ const payload = {
1527
+ startXIndex,
1528
+ startXValue: rangeEvent.start,
1529
+ endXIndex,
1530
+ endXValue: rangeEvent.end
1531
+ };
1532
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1533
+ if (onSelect) {
1534
+ onSelect({
1535
+ type: "range.selectBeforeZoom",
1536
+ originalEvent: rangeEvent,
1537
+ payload: updatedPayload
1538
+ });
1539
+ }
1540
+ };
1541
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
1542
+ var _a;
1543
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
1544
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
1545
+ const payload = {
1546
+ startXIndex,
1547
+ startXValue: rangeEvent.start,
1548
+ endXIndex,
1549
+ endXValue: rangeEvent.end
1550
+ };
1551
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1552
+ if (onSelect) {
1553
+ onSelect({
1554
+ type: "range.select",
1555
+ originalEvent: rangeEvent,
1556
+ payload: updatedPayload
1350
1557
  });
1351
1558
  }
1352
1559
  };
1560
+ var parseArrayOption = (value) => {
1561
+ if (Array.isArray(value)) {
1562
+ return value;
1563
+ }
1564
+ if (value) {
1565
+ return JSON.parse(value);
1566
+ }
1567
+ return void 0;
1568
+ };
1353
1569
  var TimeSeriesChartWrapper = (props) => {
1354
- const {
1570
+ var _b, _c, _d;
1571
+ const _a = props, {
1355
1572
  width,
1356
1573
  height,
1357
1574
  chartData,
@@ -1364,12 +1581,57 @@ var TimeSeriesChartWrapper = (props) => {
1364
1581
  markerDisplay,
1365
1582
  onClick,
1366
1583
  onPointMouseOver,
1367
- onPointMouseOut
1368
- } = props;
1369
- const {
1584
+ onPointMouseOut,
1585
+ onSelect,
1586
+ splitByLayout,
1587
+ trellisKey,
1588
+ trellisSplitBy,
1370
1589
  backgroundColor,
1590
+ defaultFontColor,
1591
+ additionalTooltipValues,
1592
+ xAxisLineVisibility: xAxisLineVisibility,
1593
+ yAxisLineVisibility,
1594
+ y2AxisLineVisibility,
1595
+ showYAxisWithZero: showYAxisWithZeroFromProps,
1596
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
1597
+ } = _a, otherOptions = __objRest(_a, [
1598
+ "width",
1599
+ "height",
1600
+ "chartData",
1601
+ "options",
1602
+ "userLocale",
1603
+ "annotationX",
1604
+ "annotationLabel",
1605
+ "annotationColor",
1606
+ "legendDisplay",
1607
+ "markerDisplay",
1608
+ "onClick",
1609
+ "onPointMouseOver",
1610
+ "onPointMouseOut",
1611
+ "onSelect",
1612
+ "splitByLayout",
1613
+ "trellisKey",
1614
+ "trellisSplitBy",
1615
+ "backgroundColor",
1616
+ "defaultFontColor",
1617
+ "additionalTooltipValues",
1618
+ // Extract axis line visibility options from props
1619
+ "xAxisLineVisibility",
1620
+ "yAxisLineVisibility",
1621
+ "y2AxisLineVisibility",
1622
+ // Extract showYAxisWithZero directly from props for accelerated render mode
1623
+ "showYAxisWithZero",
1624
+ "showY2AxisWithZero"
1625
+ ]);
1626
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
1627
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
1628
+ const {
1629
+ backgroundColor: bgColorFromOptions,
1371
1630
  seriesColors: seriesColorsStr,
1372
1631
  fieldColors,
1632
+ legendLabels: legendLabelsStr,
1633
+ legendMode,
1634
+ legendTruncation,
1373
1635
  "axisTitleX.text": xAxisTitleText,
1374
1636
  "axisTitleY.text": yAxisTitleText,
1375
1637
  "axisTitleY2.text": y2AxisTitleText,
@@ -1377,8 +1639,12 @@ var TimeSeriesChartWrapper = (props) => {
1377
1639
  "axisTitleY.visibility": yAxisTitleVisibility,
1378
1640
  "axisTitleY2.visibility": y2AxisTitleVisibility,
1379
1641
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
1642
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
1643
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
1380
1644
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
1645
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
1381
1646
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
1647
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
1382
1648
  "axisY.abbreviation": yAxisAbbreviation,
1383
1649
  "axisY.scale": yAxisScale,
1384
1650
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -1388,10 +1654,73 @@ var TimeSeriesChartWrapper = (props) => {
1388
1654
  "axisLabelsY2.integerUnits": y2IntegerUnits,
1389
1655
  "chart.overlayFields": overlayFieldsStr,
1390
1656
  "chart.nullValueMode": nullValueMode,
1391
- lineWidth
1657
+ "chart.showDataLabels": showDataLabels,
1658
+ lineWidth,
1659
+ lineDashStyle,
1660
+ fieldDashStyles: lineDashStylesByFieldStr,
1661
+ stepPosition,
1662
+ fieldStepPositions: stepPositionsByFieldStr,
1663
+ yAxisMin: yAxisMinRaw,
1664
+ yAxisMax: yAxisMaxRaw,
1665
+ y2AxisMin: y2AxisMinRaw,
1666
+ y2AxisMax: y2AxisMaxRaw,
1667
+ showXMajorGridLines,
1668
+ showYMajorGridLines,
1669
+ showY2MajorGridLines,
1670
+ showYMinorGridLines,
1671
+ showY2MinorGridLines,
1672
+ showLineSmoothing,
1673
+ xAxisMajorTickVisibility,
1674
+ xAxisMajorTickSize,
1675
+ yAxisMajorTickVisibility,
1676
+ y2AxisMajorTickVisibility,
1677
+ yAxisMajorTickSize,
1678
+ y2AxisMajorTickSize,
1679
+ yAxisMajorTickInterval,
1680
+ y2AxisMajorTickInterval,
1681
+ yAxisMinorTickVisibility,
1682
+ y2AxisMinorTickVisibility,
1683
+ yAxisMinorTickSize,
1684
+ y2AxisMinorTickSize,
1685
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
1686
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
1392
1687
  } = options;
1688
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
1689
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
1690
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
1691
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
1692
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
1693
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
1694
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
1695
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
1696
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
1697
+ const showYAxisLine = yAxisLineVisibility === "show";
1698
+ const showY2AxisLine = y2AxisLineVisibility === "show";
1699
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
1700
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
1701
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
1702
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
1703
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
1704
+ if (simpleXMLValue) return Number(simpleXMLValue);
1705
+ if (canvasValue) return Number(canvasValue);
1706
+ return void 0;
1707
+ };
1708
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
1709
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
1710
+ y2AxisMajorUnitFromSimpleXML,
1711
+ y2AxisMajorTickInterval
1712
+ );
1713
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
1714
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
1715
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
1716
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
1717
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
1393
1718
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
1394
1719
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
1720
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
1721
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
1722
+ const legendLabels = parseArrayOption(legendLabelsStr);
1723
+ const bgColor = backgroundColor || bgColorFromOptions;
1395
1724
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
1396
1725
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
1397
1726
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -1402,31 +1731,64 @@ var TimeSeriesChartWrapper = (props) => {
1402
1731
  fields: chartData.fields,
1403
1732
  columns: chartData.seriesList
1404
1733
  });
1405
- const xField = getFieldName(filteredChartData.fields[0]);
1734
+ const xField = getFieldName2(filteredChartData.fields[0]);
1406
1735
  const yFields = getFieldNames(
1407
1736
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
1408
1737
  );
1409
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
1410
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
1738
+ const y2Fields = (0, react_exports.useMemo)(
1739
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
1740
+ [y2FieldsStr]
1741
+ );
1742
+ const overlayFields = (0, react_exports.useMemo)(
1743
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
1744
+ [overlayFieldsStr]
1745
+ );
1411
1746
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
1412
1747
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
1413
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
1748
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
1749
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
1414
1750
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
1415
1751
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
1416
1752
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
1417
1753
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
1418
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
1419
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
1420
- let y2ScaleConfig = {};
1421
- if (y2Enabled) {
1422
- y2ScaleConfig = getY2ScaleConfig(
1423
- y2AxisTitle,
1424
- y2AxisAbbreviation,
1425
- y2AxisScale,
1426
- y2IntegerUnits,
1427
- y2AxisLabelVisibility
1428
- );
1429
- }
1754
+ const xScaleConfig = (0, react_exports.useMemo)(
1755
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
1756
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
1757
+ );
1758
+ const yScaleConfig = (0, react_exports.useMemo)(
1759
+ () => getYScaleConfig(
1760
+ yAxisTitle,
1761
+ yAxisAbbreviation,
1762
+ yAxisScale,
1763
+ yAxisLabelVisibility,
1764
+ yAxisMin,
1765
+ yAxisMax
1766
+ ),
1767
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
1768
+ );
1769
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
1770
+ if (y2Enabled) {
1771
+ return getY2ScaleConfig(
1772
+ y2AxisTitle,
1773
+ y2AxisAbbreviation,
1774
+ y2AxisScale,
1775
+ y2IntegerUnits,
1776
+ y2AxisLabelVisibility,
1777
+ y2AxisMin,
1778
+ y2AxisMax
1779
+ );
1780
+ }
1781
+ return {};
1782
+ }, [
1783
+ y2Enabled,
1784
+ y2AxisTitle,
1785
+ y2AxisAbbreviation,
1786
+ y2AxisScale,
1787
+ y2IntegerUnits,
1788
+ y2AxisLabelVisibility,
1789
+ y2AxisMin,
1790
+ y2AxisMax
1791
+ ]);
1430
1792
  const uplotContainerElement = (0, react_exports.useRef)(null);
1431
1793
  const seriesDataFormatted = [
1432
1794
  filteredChartData.columns[0],
@@ -1442,9 +1804,25 @@ var TimeSeriesChartWrapper = (props) => {
1442
1804
  overlayFields,
1443
1805
  y2Enabled,
1444
1806
  nullValueMode,
1445
- markerDisplay
1807
+ markerDisplay,
1808
+ lineDashStyle,
1809
+ lineDashStylesByField,
1810
+ stepPosition,
1811
+ stepPositionsByField
1446
1812
  ),
1447
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
1813
+ [
1814
+ yFields,
1815
+ y2Fields,
1816
+ lineWidth,
1817
+ overlayFields,
1818
+ y2Enabled,
1819
+ nullValueMode,
1820
+ markerDisplay,
1821
+ lineDashStyle,
1822
+ lineDashStylesByField,
1823
+ stepPosition,
1824
+ stepPositionsByField
1825
+ ]
1448
1826
  );
1449
1827
  const chartingEventAnnotations = (0, react_exports.useMemo)(
1450
1828
  () => getAnnotationsForCanvas({
@@ -1458,25 +1836,59 @@ var TimeSeriesChartWrapper = (props) => {
1458
1836
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
1459
1837
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
1460
1838
  );
1461
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
1839
+ const isSeriesCompare = legendMode === "seriesCompare";
1840
+ const legend = (0, react_exports.useMemo)(
1841
+ () => getLegend({
1842
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
1843
+ isSeriesCompare,
1844
+ legendTruncation
1845
+ }),
1846
+ [legendDisplay, isSeriesCompare, legendTruncation]
1847
+ );
1462
1848
  const handleChartClick = react_exports.useCallback(
1463
1849
  (event) => {
1464
1850
  if (onClick) {
1465
- handleClick(event, onClick);
1851
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
1466
1852
  }
1467
1853
  },
1468
- [onClick]
1854
+ [onClick, trellisKey, trellisSplitBy]
1469
1855
  );
1470
1856
  const handleChartLegendClick = react_exports.useCallback(
1471
1857
  (event) => {
1472
1858
  if (onClick) {
1473
- handleLegendClick(event, onClick);
1859
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
1860
+ }
1861
+ },
1862
+ [onClick, trellisKey, trellisSplitBy]
1863
+ );
1864
+ const handleChartRangeSelection = react_exports.useCallback(
1865
+ (range2) => {
1866
+ if (onSelect) {
1867
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
1868
+ }
1869
+ },
1870
+ [onSelect, chartData, trellisKey, trellisSplitBy]
1871
+ );
1872
+ const handleChartRangeZoom = react_exports.useCallback(
1873
+ (range2) => {
1874
+ if (onSelect) {
1875
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
1474
1876
  }
1475
1877
  },
1476
- [onClick]
1878
+ [onSelect, chartData, trellisKey, trellisSplitBy]
1879
+ );
1880
+ const xFieldToUse = xFieldFromProps || xField;
1881
+ const enableSearchZoom = react_exports.useMemo(
1882
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
1883
+ [eventHandlers, xFieldToUse]
1477
1884
  );
1478
1885
  const lastPayloadRef = react_exports.useRef(null);
1479
1886
  const lastOriginalEventRef = react_exports.useRef(null);
1887
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
1888
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
1889
+ react_exports.useEffect(() => {
1890
+ additionalTooltipValuesRef.current = additionalTooltipValues;
1891
+ }, [additionalTooltipValues]);
1480
1892
  const handleChartCrosshairChange = react_exports.useCallback(
1481
1893
  (event) => {
1482
1894
  if (onPointMouseOver || onPointMouseOut) {
@@ -1488,6 +1900,7 @@ var TimeSeriesChartWrapper = (props) => {
1488
1900
  payload: lastPayloadRef.current
1489
1901
  });
1490
1902
  }
1903
+ previousMouseoverPayloadRef.current = null;
1491
1904
  return;
1492
1905
  }
1493
1906
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -1495,25 +1908,36 @@ var TimeSeriesChartWrapper = (props) => {
1495
1908
  });
1496
1909
  delete payload.seriesKey;
1497
1910
  if (event.rowContext) {
1498
- Object.keys(event.rowContext).forEach((fieldName) => {
1499
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
1500
- });
1911
+ Object.assign(
1912
+ payload,
1913
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
1914
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
1915
+ return acc;
1916
+ }, {})
1917
+ );
1918
+ }
1919
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
1920
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
1921
+ return;
1501
1922
  }
1502
- lastPayloadRef.current = payload;
1923
+ lastPayloadRef.current = updatedPayload;
1503
1924
  lastOriginalEventRef.current = event;
1925
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
1504
1926
  if (onPointMouseOver) {
1505
1927
  onPointMouseOver({
1506
1928
  type: "point.mouseover",
1507
1929
  originalEvent: event,
1508
- payload
1930
+ payload: updatedPayload
1509
1931
  });
1510
1932
  }
1511
1933
  }
1512
1934
  },
1513
- [onPointMouseOver, onPointMouseOut]
1935
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
1514
1936
  );
1515
- const memoizedChart = (0, react_exports.useMemo)(
1516
- () => /* @__PURE__ */ react_exports.createElement(
1937
+ const dataKey = `${(_b = chartData.columns[0]) == null ? void 0 : _b[0]}-${(_c = chartData.columns[0]) == null ? void 0 : _c[chartData.columns[0].length - 1]}-${(_d = chartData.columns[0]) == null ? void 0 : _d.length}`;
1938
+ const memoizedChart = (0, react_exports.useMemo)(() => {
1939
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
1940
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
1517
1941
  visualization_canvas_exports.TimeSeriesChart,
1518
1942
  {
1519
1943
  data: chartData,
@@ -1523,49 +1947,121 @@ var TimeSeriesChartWrapper = (props) => {
1523
1947
  seriesColorsByField,
1524
1948
  seriesConfig: seriesOverrides,
1525
1949
  legend,
1950
+ legendLabels,
1951
+ legendTruncation,
1952
+ isSeriesCompare: legendMode === "seriesCompare",
1953
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
1526
1954
  scaleConfig,
1527
1955
  timestampFormat: "expanded",
1528
1956
  onCrosshairClick: onClick ? handleChartClick : void 0,
1529
1957
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
1530
1958
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
1959
+ onRangeSelection: handleChartRangeSelection,
1960
+ onRangeZoom: computedOnRangeZoom,
1961
+ serverSideZoom: enableSearchZoom,
1531
1962
  userLocale,
1532
1963
  events: chartingEventAnnotations,
1533
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
1964
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
1965
+ additionalTooltipValuesRef,
1966
+ showXMajorGridLines,
1967
+ showYMajorGridLines,
1968
+ showY2MajorGridLines,
1969
+ showYMinorGridLines,
1970
+ showY2MinorGridLines,
1971
+ showLineSmoothing,
1972
+ dataValuesDisplay,
1973
+ showXMajorTicks,
1974
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
1975
+ showYMajorTicks,
1976
+ showY2MajorTicks,
1977
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
1978
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
1979
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
1980
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
1981
+ showYMinorTicks,
1982
+ showY2MinorTicks,
1983
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
1984
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
1985
+ showYAxisWithZero,
1986
+ showY2AxisWithZero,
1987
+ showXAxisLine,
1988
+ showYAxisLine,
1989
+ showY2AxisLine,
1990
+ xAxisMaxLabelParts
1534
1991
  }
1535
- ),
1536
- [
1537
- chartData,
1538
- containerWidth,
1539
- containerHeight,
1540
- seriesColors,
1541
- seriesColorsByField,
1542
- seriesOverrides,
1543
- legend,
1544
- scaleConfig,
1545
- userLocale,
1546
- chartingEventAnnotations,
1547
- onClick,
1548
- handleChartClick,
1549
- onPointMouseOver,
1550
- onPointMouseOut,
1551
- handleChartCrosshairChange,
1552
- handleChartLegendClick
1553
- ]
1554
- );
1992
+ ));
1993
+ }, [
1994
+ onSelect,
1995
+ handleChartRangeZoom,
1996
+ dataKey,
1997
+ chartData,
1998
+ containerWidth,
1999
+ containerHeight,
2000
+ seriesColors,
2001
+ seriesColorsByField,
2002
+ seriesOverrides,
2003
+ legend,
2004
+ legendLabels,
2005
+ legendTruncation,
2006
+ scaleConfig,
2007
+ onClick,
2008
+ handleChartClick,
2009
+ onPointMouseOver,
2010
+ onPointMouseOut,
2011
+ handleChartCrosshairChange,
2012
+ handleChartLegendClick,
2013
+ handleChartRangeSelection,
2014
+ enableSearchZoom,
2015
+ userLocale,
2016
+ chartingEventAnnotations,
2017
+ showXMajorGridLines,
2018
+ showYMajorGridLines,
2019
+ showY2MajorGridLines,
2020
+ showYMinorGridLines,
2021
+ showY2MinorGridLines,
2022
+ showLineSmoothing,
2023
+ dataValuesDisplay,
2024
+ showXMajorTicks,
2025
+ xAxisMajorTickSizeNum,
2026
+ showYMajorTicks,
2027
+ showY2MajorTicks,
2028
+ yAxisMajorTickSizeNum,
2029
+ y2AxisMajorTickSizeNum,
2030
+ yAxisMajorTickIntervalNum,
2031
+ y2AxisMajorTickIntervalNum,
2032
+ showYMinorTicks,
2033
+ showY2MinorTicks,
2034
+ yAxisMinorTickSizeNum,
2035
+ y2AxisMinorTickSizeNum,
2036
+ showYAxisWithZero,
2037
+ showY2AxisWithZero,
2038
+ showXAxisLine,
2039
+ showYAxisLine,
2040
+ showY2AxisLine,
2041
+ legendMode,
2042
+ xAxisMaxLabelParts
2043
+ ]);
1555
2044
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
1556
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
1557
- }, [backgroundColor, memoizedChart]);
1558
- return /* @__PURE__ */ react_exports.createElement(
2045
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
2046
+ }, [bgColor, memoizedChart]);
2047
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
2048
+ TrellisTitle,
2049
+ {
2050
+ trellisKey,
2051
+ backgroundColor: bgColor,
2052
+ fontColor: defaultFontColor
2053
+ }
2054
+ ), /* @__PURE__ */ react_exports.createElement(
1559
2055
  TimeSeriesChartContainer,
1560
2056
  {
1561
- height,
2057
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
1562
2058
  width,
1563
2059
  ref: uplotContainerElement,
1564
2060
  "data-test": "timeseries-chart-wrapper"
1565
2061
  },
1566
2062
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
1567
2063
  memoizedVisualization
1568
- );
2064
+ ));
1569
2065
  };
1570
2066
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
1571
2067
 
@@ -1855,15 +2351,6 @@ var withDashboardViz = (opts) => {
1855
2351
  };
1856
2352
  var withDashboardViz_default = withDashboardViz;
1857
2353
 
1858
- // esm-externals:@splunk/visualization-schemas
1859
- var visualization_schemas_exports = {};
1860
- __export(visualization_schemas_exports, {
1861
- default: () => visualization_schemas_default
1862
- });
1863
- var defaultImport26 = __toESM(require("@splunk/visualization-schemas"));
1864
- __reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
1865
- var visualization_schemas_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
1866
-
1867
2354
  // esm-externals:@splunk/visualization-color-palettes/editors/PresetPalettes
1868
2355
  var PresetPalettes_exports = {};
1869
2356
  __export(PresetPalettes_exports, {
@@ -1882,14 +2369,23 @@ var defaultImport28 = __toESM(require("@splunk/themes"));
1882
2369
  __reExport(themes_exports, require("@splunk/themes"));
1883
2370
  var themes_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
1884
2371
 
2372
+ // esm-externals:@splunk/react-icons/Square
2373
+ var Square_exports = {};
2374
+ __export(Square_exports, {
2375
+ default: () => Square_default
2376
+ });
2377
+ var defaultImport29 = __toESM(require("@splunk/react-icons/Square"));
2378
+ __reExport(Square_exports, require("@splunk/react-icons/Square"));
2379
+ var Square_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
2380
+
1885
2381
  // esm-externals:@splunk/visualizations-shared/configUtils
1886
2382
  var configUtils_exports = {};
1887
2383
  __export(configUtils_exports, {
1888
2384
  default: () => configUtils_default
1889
2385
  });
1890
- var defaultImport29 = __toESM(require("@splunk/visualizations-shared/configUtils"));
2386
+ var defaultImport30 = __toESM(require("@splunk/visualizations-shared/configUtils"));
1891
2387
  __reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
1892
- var configUtils_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
2388
+ var configUtils_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
1893
2389
 
1894
2390
  // src/common/utils/configUtils.ts
1895
2391
  function enhanceConfig(vizConfig) {
@@ -2287,7 +2783,7 @@ var config = {
2287
2783
  /**
2288
2784
  * viz icon
2289
2785
  */
2290
- icon: null,
2786
+ icon: Square_default,
2291
2787
  dataContract,
2292
2788
  size,
2293
2789
  defaultContext,
@@ -2309,27 +2805,27 @@ var pick_exports = {};
2309
2805
  __export(pick_exports, {
2310
2806
  default: () => pick_default
2311
2807
  });
2312
- var defaultImport30 = __toESM(require("@splunk/themes/pick"));
2808
+ var defaultImport31 = __toESM(require("@splunk/themes/pick"));
2313
2809
  __reExport(pick_exports, require("@splunk/themes/pick"));
2314
- var pick_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
2810
+ var pick_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
2315
2811
 
2316
2812
  // esm-externals:@splunk/visualizations-shared/propUtils
2317
2813
  var propUtils_exports = {};
2318
2814
  __export(propUtils_exports, {
2319
2815
  default: () => propUtils_default
2320
2816
  });
2321
- var defaultImport31 = __toESM(require("@splunk/visualizations-shared/propUtils"));
2817
+ var defaultImport32 = __toESM(require("@splunk/visualizations-shared/propUtils"));
2322
2818
  __reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
2323
- var propUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
2819
+ var propUtils_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
2324
2820
 
2325
2821
  // esm-externals:@splunk/react-ui/ScreenReaderContent
2326
2822
  var ScreenReaderContent_exports = {};
2327
2823
  __export(ScreenReaderContent_exports, {
2328
2824
  default: () => ScreenReaderContent_default
2329
2825
  });
2330
- var defaultImport32 = __toESM(require("@splunk/react-ui/ScreenReaderContent"));
2826
+ var defaultImport33 = __toESM(require("@splunk/react-ui/ScreenReaderContent"));
2331
2827
  __reExport(ScreenReaderContent_exports, require("@splunk/react-ui/ScreenReaderContent"));
2332
- var ScreenReaderContent_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
2828
+ var ScreenReaderContent_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
2333
2829
 
2334
2830
  // src/common/shapeUtils.tsx
2335
2831
  var shapeOptionsMapping = {
@@ -2357,7 +2853,7 @@ var getStyledShape = (shape4) => styled_components_default(shape4)`
2357
2853
  `;
2358
2854
  function ClickableShape({ children, onClick, shape: shape4 }) {
2359
2855
  const descriptionId = (0, react_exports.useMemo)(() => (0, id_exports.createDOMID)("clickable-svg-description"), []);
2360
- return /* @__PURE__ */ react_default.createElement(StyledDiv, null, /* @__PURE__ */ react_default.createElement(ScreenReaderContent_default, { id: descriptionId }, (0, i18n_exports._)("Click to trigger interaction")), /* @__PURE__ */ react_default.createElement(
2856
+ return /* @__PURE__ */ react_default.createElement(react_default.Fragment, null, /* @__PURE__ */ react_default.createElement(ScreenReaderContent_default, { id: descriptionId }, (0, i18n_exports._)("Click to trigger interaction")), /* @__PURE__ */ react_default.createElement(
2361
2857
  StyledButton,
2362
2858
  {
2363
2859
  onClick,
@@ -2368,16 +2864,7 @@ function ClickableShape({ children, onClick, shape: shape4 }) {
2368
2864
  children
2369
2865
  ));
2370
2866
  }
2371
- var StyledDiv = styled_components_default.div`
2372
- display: inline-grid;
2373
- grid-template: 1fr / 1fr;
2374
-
2375
- & > * {
2376
- grid-row-start: 1;
2377
- grid-column-start: 1;
2378
- }
2379
- `;
2380
- var StyledButton = styled_components_default.button`
2867
+ var StyledButton = styled_components_default.button.attrs({ type: "button" })`
2381
2868
  padding: 0;
2382
2869
  border: 0;
2383
2870
  background: transparent;
@@ -2386,21 +2873,15 @@ var StyledButton = styled_components_default.button`
2386
2873
  outline: none;
2387
2874
  ${(props) => props.shape === "rect" ? styled_components_exports.css`
2388
2875
  box-shadow: ${variables_default.focusShadow};
2389
- ` : (
2390
- // clip-path would clip the shadow for ellipse, so we use drop-shadow filters to simulate it
2391
- styled_components_exports.css`
2392
- svg:has(+ &) > ellipse {
2876
+ ` : styled_components_exports.css`
2877
+ & > svg > ellipse {
2393
2878
  filter: drop-shadow(2px 0px 1px ${variables_default.focusColor})
2394
2879
  drop-shadow(-2px 0px 1px ${variables_default.focusColor})
2395
2880
  drop-shadow(0px 2px 1px ${variables_default.focusColor})
2396
2881
  drop-shadow(0px -2px 1px ${variables_default.focusColor});
2397
2882
  }
2398
- `
2399
- )}
2883
+ `}
2400
2884
  }
2401
- ${(props) => props.shape === "ellipse" && `
2402
- clip-path: ellipse(50% 50% at 50% 50%);
2403
- `}
2404
2885
  `;
2405
2886
 
2406
2887
  // src/Rectangle/Rectangle.tsx