@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/Table.js CHANGED
@@ -723,8 +723,8 @@ var editorConfig = [
723
723
  }
724
724
  ]
725
725
  ],
726
- // TODO(fkurniawan): fill in with proper editor components
727
726
  sparkline: [],
727
+ // Configure via columnFormat.sparklineNullValueDisplay
728
728
  string: [
729
729
  [
730
730
  __spreadValues({}, unitPositionConfig),
@@ -1201,7 +1201,7 @@ var Cover = styled_components_default.div`
1201
1201
  bottom: 0;
1202
1202
  `;
1203
1203
  var Blocker = styled_components_default.div.attrs({
1204
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
1204
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
1205
1205
  })`
1206
1206
  position: relative;
1207
1207
  width: 100%;
@@ -1282,7 +1282,7 @@ var withFixedSizeContainer = (Viz) => {
1282
1282
  FixSizeItem,
1283
1283
  {
1284
1284
  "data-test": "fix-size-item",
1285
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
1285
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
1286
1286
  width,
1287
1287
  height,
1288
1288
  backgroundColor
@@ -1378,6 +1378,7 @@ __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUti
1378
1378
  var numberUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
1379
1379
 
1380
1380
  // src/common/utils/dataUtils.ts
1381
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
1381
1382
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
1382
1383
  const dataLength = data.length;
1383
1384
  const downsampledIndices = [];
@@ -1494,9 +1495,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
1494
1495
  let xColumn = [];
1495
1496
  const yColumns = [];
1496
1497
  const canDownsample = !ds.data.fields.some((field, index) => {
1497
- var _a, _b;
1498
- const fieldName = (_a = field.name) != null ? _a : field;
1499
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
1498
+ var _a;
1499
+ const fieldName = getFieldName(field);
1500
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
1500
1501
  const column = ds.data.columns[index];
1501
1502
  let hasDisplayedColumnThatCantBeDownsampled = false;
1502
1503
  if (fieldName === xField) {
@@ -1849,6 +1850,16 @@ var triangleEventAnnotationRenderer = ({
1849
1850
  eventColor: eventWithColor.color
1850
1851
  });
1851
1852
  };
1853
+ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
1854
+ const rangeSelectEventHandler = eventHandlers.find(
1855
+ (eventHandler) => {
1856
+ var _a;
1857
+ return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
1858
+ }
1859
+ );
1860
+ const xAxisIsTime = xField === "_time";
1861
+ return !!rangeSelectEventHandler && xAxisIsTime;
1862
+ };
1852
1863
  var canvasSupportedTimeSeriesCharts = ["splunk.line"];
1853
1864
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
1854
1865
  return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
@@ -1869,17 +1880,34 @@ var filterChartDataFromInternalFields = (chartData) => {
1869
1880
  var convert2DArrayToNumbers = (arr) => {
1870
1881
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
1871
1882
  };
1872
- var SideLegendWidth = 75;
1873
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
1883
+ var parseAxisValue = (val) => {
1884
+ if (val === void 0 || val === null || val === "auto" || val === "") {
1885
+ return void 0;
1886
+ }
1887
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
1888
+ return Number.isNaN(num) ? void 0 : num;
1889
+ };
1890
+ var parseXAxisLineVisibility = (visibility) => {
1891
+ if (visibility === "hide") return false;
1892
+ if (visibility === "show") return true;
1893
+ return void 0;
1894
+ };
1874
1895
  var getLegend = (props) => {
1875
1896
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
1897
+ const { isSeriesCompare, legendTruncation } = props;
1898
+ const commonLegendProps = {
1899
+ center: true,
1900
+ fontSize: 12,
1901
+ largerTiles: true,
1902
+ hideSeriesValue: !isSeriesCompare,
1903
+ // Show values if in seriesCompare mode
1904
+ legendTruncation
1905
+ };
1876
1906
  switch (legendPlacement) {
1877
1907
  case "off":
1878
1908
  return false;
1879
1909
  case "left":
1880
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
1881
- width: SideLegendWidth
1882
- }, commonLegendProps));
1910
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
1883
1911
  case "bottom":
1884
1912
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
1885
1913
  wrap: true
@@ -1889,9 +1917,7 @@ var getLegend = (props) => {
1889
1917
  wrap: true
1890
1918
  }, commonLegendProps));
1891
1919
  default:
1892
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
1893
- width: SideLegendWidth
1894
- }, commonLegendProps));
1920
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
1895
1921
  }
1896
1922
  };
1897
1923
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -1926,22 +1952,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
1926
1952
  const end = axisTitle.slice(-halfChars);
1927
1953
  return `${start}...${end}`;
1928
1954
  };
1929
- var getFieldName = (field) => {
1955
+ var getFieldName2 = (field) => {
1930
1956
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
1931
1957
  return fieldName;
1932
1958
  };
1933
1959
  var getFieldNames = (fields) => {
1934
- return fields.map((field) => getFieldName(field));
1960
+ return fields.map((field) => getFieldName2(field));
1935
1961
  };
1936
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
1962
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
1937
1963
  const xConfig = { x: {} };
1938
1964
  xConfig.x.label = label;
1939
1965
  if (xAxisLabelVisibility === "hide") {
1940
1966
  xConfig.x.hideLabels = true;
1941
1967
  }
1968
+ if (xAxisLabelRotation !== void 0) {
1969
+ xConfig.x.labelRotation = xAxisLabelRotation;
1970
+ }
1942
1971
  return xConfig;
1943
1972
  };
1944
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
1973
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
1945
1974
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
1946
1975
  const yConfig = { y: {} };
1947
1976
  yConfig.y.label = label;
@@ -1949,34 +1978,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
1949
1978
  if (yAxisAbbreviation !== "none") {
1950
1979
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
1951
1980
  }
1952
- if (yAxisAbbreviation === "none") {
1953
- yConfig.y.width = 55;
1954
- } else {
1981
+ if (yAxisAbbreviation !== "none") {
1955
1982
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
1956
1983
  }
1957
1984
  if (yAxisLabelVisibility === "hide") {
1958
1985
  yConfig.y.hideLabels = true;
1959
1986
  }
1987
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
1988
+ yConfig.y.range = (u, dataMin, dataMax) => {
1989
+ const min2 = yAxisMin != null ? yAxisMin : dataMin;
1990
+ const max2 = yAxisMax != null ? yAxisMax : dataMax;
1991
+ return [min2, max2];
1992
+ };
1993
+ }
1960
1994
  return yConfig;
1961
1995
  };
1962
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
1996
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
1963
1997
  const y2Config = { y2: {} };
1964
1998
  const scaleType = axisScale != null ? axisScale : "linear";
1965
1999
  y2Config.y2.label = label;
1966
2000
  y2Config.y2.side = "right";
1967
- y2Config.y2.showGrid = false;
1968
2001
  y2Config.y2.type = scaleType;
1969
2002
  if (axisAbbreviation !== "none") {
1970
2003
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
2004
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
1971
2005
  } else if (roundAxisLabelsToInteger) {
1972
2006
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
1973
2007
  }
1974
2008
  if (y2AxisLabelVisibility === "hide") {
1975
2009
  y2Config.y2.hideLabels = true;
1976
2010
  }
2011
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
2012
+ y2Config.y2.range = (u, dataMin, dataMax) => {
2013
+ const min2 = y2AxisMin != null ? y2AxisMin : dataMin;
2014
+ const max2 = y2AxisMax != null ? y2AxisMax : dataMax;
2015
+ return [min2, max2];
2016
+ };
2017
+ }
1977
2018
  return y2Config;
1978
2019
  };
1979
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
2020
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
1980
2021
  const seriesConfig = {};
1981
2022
  let spanGaps;
1982
2023
  let replaceNullsWithZero;
@@ -2003,6 +2044,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2003
2044
  );
2004
2045
  if (shouldAssignToY2) {
2005
2046
  seriesConfig[field].overrides.scale = "y2";
2047
+ } else {
2048
+ seriesConfig[field].overrides.scale = "y";
2006
2049
  }
2007
2050
  }
2008
2051
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -2011,12 +2054,92 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
2011
2054
  if (markerDisplay !== void 0) {
2012
2055
  seriesConfig[field].markerDisplay = markerDisplay;
2013
2056
  }
2057
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
2058
+ if (fieldDashStyle) {
2059
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
2060
+ }
2061
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
2062
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
2063
+ if (fieldStepPosition && fieldStepPosition !== "off") {
2064
+ seriesConfig[field].stepPosition = fieldStepPosition;
2065
+ }
2014
2066
  if (replaceNullsWithZero !== void 0) {
2015
2067
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
2016
2068
  }
2017
2069
  });
2018
2070
  return seriesConfig;
2019
2071
  };
2072
+ var findRangeIndices = (xData, startValue, endValue) => {
2073
+ let startXIndex = -1;
2074
+ let endXIndex = -1;
2075
+ const xDataEpoch = xData.map((val) => {
2076
+ if (typeof val === "string") {
2077
+ return new Date(val).getTime() / 1e3;
2078
+ }
2079
+ return val;
2080
+ });
2081
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
2082
+ if (xDataEpoch[i] >= startValue) {
2083
+ startXIndex = i;
2084
+ break;
2085
+ }
2086
+ }
2087
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
2088
+ startXIndex = xDataEpoch.length - 1;
2089
+ }
2090
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
2091
+ if (xDataEpoch[i] <= endValue) {
2092
+ endXIndex = i;
2093
+ break;
2094
+ }
2095
+ }
2096
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
2097
+ endXIndex = 0;
2098
+ }
2099
+ return { startXIndex, endXIndex };
2100
+ };
2101
+
2102
+ // src/common/hooks/useTrellisEnabled.ts
2103
+ var useTrellisFeatureFlagOn = () => {
2104
+ const context = (0, react_exports.useContext)(FeatureFlagContext_default);
2105
+ return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
2106
+ };
2107
+ var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
2108
+ const trellisFeatureEnabled = useTrellisFeatureFlagOn();
2109
+ return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
2110
+ };
2111
+
2112
+ // src/common/components/TrellisTitle.tsx
2113
+ var TRELLIS_TITLE_HEIGHT = 28;
2114
+ var TrellisTitleText = styled_components_default.div`
2115
+ margin-left: 10px;
2116
+ margin-right: 10px;
2117
+ padding-top: 8px;
2118
+ text-overflow: ellipsis;
2119
+ white-space: nowrap;
2120
+ overflow: hidden;
2121
+ `;
2122
+ var TrellisTitleDiv = styled_components_default.div`
2123
+ height: ${TRELLIS_TITLE_HEIGHT}px;
2124
+ font-size: 14px;
2125
+ font-weight: 700;
2126
+ color: ${(props) => props.fontColor};
2127
+ background-color: ${(props) => props.backgroundColor};
2128
+ 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.
2129
+ `;
2130
+ var TrellisTitle = (props) => {
2131
+ const titleText = String(props.trellisKey).toString();
2132
+ return /* @__PURE__ */ react_exports.createElement(
2133
+ TrellisTitleDiv,
2134
+ {
2135
+ fontColor: props.fontColor,
2136
+ backgroundColor: props.backgroundColor,
2137
+ "data-test": "trellis-title",
2138
+ title: titleText
2139
+ },
2140
+ /* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
2141
+ );
2142
+ };
2020
2143
 
2021
2144
  // src/common/TimeSeriesChartWrapper.tsx
2022
2145
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -2027,38 +2150,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
2027
2150
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
2028
2151
  }
2029
2152
  `;
2030
- var handleClick = (chartEvent, onClick) => {
2153
+ var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
2154
+ const result = __spreadValues({}, payload);
2155
+ if (trellisSplitBy) {
2156
+ result["trellis.name"] = trellisSplitBy;
2157
+ }
2158
+ if (trellisKey) {
2159
+ result["trellis.value"] = trellisKey;
2160
+ }
2161
+ return result;
2162
+ };
2163
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
2164
+ if (!previousPayload) {
2165
+ return true;
2166
+ }
2167
+ if (currentPayload.index !== previousPayload.index) {
2168
+ return true;
2169
+ }
2170
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
2171
+ return true;
2172
+ }
2173
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
2174
+ return true;
2175
+ }
2176
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
2177
+ return true;
2178
+ }
2179
+ return false;
2180
+ };
2181
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
2031
2182
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
2032
2183
  name: chartEvent.seriesKey
2033
2184
  });
2034
2185
  delete payload.seriesKey;
2035
2186
  if (chartEvent.rowContext) {
2036
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
2037
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
2038
- });
2187
+ Object.assign(
2188
+ payload,
2189
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
2190
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
2191
+ return acc;
2192
+ }, {})
2193
+ );
2039
2194
  }
2195
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2040
2196
  if (onClick) {
2041
2197
  onClick({
2042
2198
  type: "point.click",
2043
2199
  originalEvent: chartEvent,
2044
- payload
2200
+ payload: updatedPayload
2045
2201
  });
2046
2202
  }
2047
2203
  };
2048
- var handleLegendClick = (chartEvent, onClick) => {
2204
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
2049
2205
  const payload = {
2050
2206
  name: chartEvent
2051
2207
  };
2208
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2052
2209
  if (onClick) {
2053
2210
  onClick({
2054
2211
  type: "legend.click",
2055
2212
  originalEvent: chartEvent,
2056
- payload
2213
+ payload: updatedPayload
2214
+ });
2215
+ }
2216
+ };
2217
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
2218
+ var _a;
2219
+ if (!rangeEvent) {
2220
+ return;
2221
+ }
2222
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
2223
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
2224
+ const payload = {
2225
+ startXIndex,
2226
+ startXValue: rangeEvent.start,
2227
+ endXIndex,
2228
+ endXValue: rangeEvent.end
2229
+ };
2230
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2231
+ if (onSelect) {
2232
+ onSelect({
2233
+ type: "range.selectBeforeZoom",
2234
+ originalEvent: rangeEvent,
2235
+ payload: updatedPayload
2236
+ });
2237
+ }
2238
+ };
2239
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
2240
+ var _a;
2241
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
2242
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
2243
+ const payload = {
2244
+ startXIndex,
2245
+ startXValue: rangeEvent.start,
2246
+ endXIndex,
2247
+ endXValue: rangeEvent.end
2248
+ };
2249
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2250
+ if (onSelect) {
2251
+ onSelect({
2252
+ type: "range.select",
2253
+ originalEvent: rangeEvent,
2254
+ payload: updatedPayload
2057
2255
  });
2058
2256
  }
2059
2257
  };
2258
+ var parseArrayOption = (value) => {
2259
+ if (Array.isArray(value)) {
2260
+ return value;
2261
+ }
2262
+ if (value) {
2263
+ return JSON.parse(value);
2264
+ }
2265
+ return void 0;
2266
+ };
2060
2267
  var TimeSeriesChartWrapper = (props) => {
2061
- const {
2268
+ var _b, _c, _d;
2269
+ const _a = props, {
2062
2270
  width,
2063
2271
  height,
2064
2272
  chartData,
@@ -2071,12 +2279,57 @@ var TimeSeriesChartWrapper = (props) => {
2071
2279
  markerDisplay,
2072
2280
  onClick,
2073
2281
  onPointMouseOver,
2074
- onPointMouseOut
2075
- } = props;
2076
- const {
2282
+ onPointMouseOut,
2283
+ onSelect,
2284
+ splitByLayout,
2285
+ trellisKey,
2286
+ trellisSplitBy,
2077
2287
  backgroundColor,
2288
+ defaultFontColor,
2289
+ additionalTooltipValues,
2290
+ xAxisLineVisibility: xAxisLineVisibility,
2291
+ yAxisLineVisibility,
2292
+ y2AxisLineVisibility,
2293
+ showYAxisWithZero: showYAxisWithZeroFromProps,
2294
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
2295
+ } = _a, otherOptions = __objRest(_a, [
2296
+ "width",
2297
+ "height",
2298
+ "chartData",
2299
+ "options",
2300
+ "userLocale",
2301
+ "annotationX",
2302
+ "annotationLabel",
2303
+ "annotationColor",
2304
+ "legendDisplay",
2305
+ "markerDisplay",
2306
+ "onClick",
2307
+ "onPointMouseOver",
2308
+ "onPointMouseOut",
2309
+ "onSelect",
2310
+ "splitByLayout",
2311
+ "trellisKey",
2312
+ "trellisSplitBy",
2313
+ "backgroundColor",
2314
+ "defaultFontColor",
2315
+ "additionalTooltipValues",
2316
+ // Extract axis line visibility options from props
2317
+ "xAxisLineVisibility",
2318
+ "yAxisLineVisibility",
2319
+ "y2AxisLineVisibility",
2320
+ // Extract showYAxisWithZero directly from props for accelerated render mode
2321
+ "showYAxisWithZero",
2322
+ "showY2AxisWithZero"
2323
+ ]);
2324
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
2325
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
2326
+ const {
2327
+ backgroundColor: bgColorFromOptions,
2078
2328
  seriesColors: seriesColorsStr,
2079
2329
  fieldColors,
2330
+ legendLabels: legendLabelsStr,
2331
+ legendMode,
2332
+ legendTruncation,
2080
2333
  "axisTitleX.text": xAxisTitleText,
2081
2334
  "axisTitleY.text": yAxisTitleText,
2082
2335
  "axisTitleY2.text": y2AxisTitleText,
@@ -2084,8 +2337,12 @@ var TimeSeriesChartWrapper = (props) => {
2084
2337
  "axisTitleY.visibility": yAxisTitleVisibility,
2085
2338
  "axisTitleY2.visibility": y2AxisTitleVisibility,
2086
2339
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
2340
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
2341
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
2087
2342
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
2343
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
2088
2344
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
2345
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
2089
2346
  "axisY.abbreviation": yAxisAbbreviation,
2090
2347
  "axisY.scale": yAxisScale,
2091
2348
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -2095,10 +2352,73 @@ var TimeSeriesChartWrapper = (props) => {
2095
2352
  "axisLabelsY2.integerUnits": y2IntegerUnits,
2096
2353
  "chart.overlayFields": overlayFieldsStr,
2097
2354
  "chart.nullValueMode": nullValueMode,
2098
- lineWidth
2355
+ "chart.showDataLabels": showDataLabels,
2356
+ lineWidth,
2357
+ lineDashStyle,
2358
+ fieldDashStyles: lineDashStylesByFieldStr,
2359
+ stepPosition,
2360
+ fieldStepPositions: stepPositionsByFieldStr,
2361
+ yAxisMin: yAxisMinRaw,
2362
+ yAxisMax: yAxisMaxRaw,
2363
+ y2AxisMin: y2AxisMinRaw,
2364
+ y2AxisMax: y2AxisMaxRaw,
2365
+ showXMajorGridLines,
2366
+ showYMajorGridLines,
2367
+ showY2MajorGridLines,
2368
+ showYMinorGridLines,
2369
+ showY2MinorGridLines,
2370
+ showLineSmoothing,
2371
+ xAxisMajorTickVisibility,
2372
+ xAxisMajorTickSize,
2373
+ yAxisMajorTickVisibility,
2374
+ y2AxisMajorTickVisibility,
2375
+ yAxisMajorTickSize,
2376
+ y2AxisMajorTickSize,
2377
+ yAxisMajorTickInterval,
2378
+ y2AxisMajorTickInterval,
2379
+ yAxisMinorTickVisibility,
2380
+ y2AxisMinorTickVisibility,
2381
+ yAxisMinorTickSize,
2382
+ y2AxisMinorTickSize,
2383
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
2384
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
2099
2385
  } = options;
2386
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
2387
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
2388
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
2389
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
2390
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
2391
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
2392
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
2393
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
2394
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
2395
+ const showYAxisLine = yAxisLineVisibility === "show";
2396
+ const showY2AxisLine = y2AxisLineVisibility === "show";
2397
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
2398
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
2399
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
2400
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
2401
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
2402
+ if (simpleXMLValue) return Number(simpleXMLValue);
2403
+ if (canvasValue) return Number(canvasValue);
2404
+ return void 0;
2405
+ };
2406
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
2407
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
2408
+ y2AxisMajorUnitFromSimpleXML,
2409
+ y2AxisMajorTickInterval
2410
+ );
2411
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
2412
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
2413
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
2414
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
2415
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
2100
2416
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
2101
2417
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
2418
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
2419
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
2420
+ const legendLabels = parseArrayOption(legendLabelsStr);
2421
+ const bgColor = backgroundColor || bgColorFromOptions;
2102
2422
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
2103
2423
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
2104
2424
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -2109,31 +2429,64 @@ var TimeSeriesChartWrapper = (props) => {
2109
2429
  fields: chartData.fields,
2110
2430
  columns: chartData.seriesList
2111
2431
  });
2112
- const xField = getFieldName(filteredChartData.fields[0]);
2432
+ const xField = getFieldName2(filteredChartData.fields[0]);
2113
2433
  const yFields = getFieldNames(
2114
2434
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
2115
2435
  );
2116
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
2117
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
2436
+ const y2Fields = (0, react_exports.useMemo)(
2437
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
2438
+ [y2FieldsStr]
2439
+ );
2440
+ const overlayFields = (0, react_exports.useMemo)(
2441
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
2442
+ [overlayFieldsStr]
2443
+ );
2118
2444
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
2119
2445
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
2120
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
2446
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
2447
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
2121
2448
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
2122
2449
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
2123
2450
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
2124
2451
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
2125
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
2126
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
2127
- let y2ScaleConfig = {};
2128
- if (y2Enabled) {
2129
- y2ScaleConfig = getY2ScaleConfig(
2130
- y2AxisTitle,
2131
- y2AxisAbbreviation,
2132
- y2AxisScale,
2133
- y2IntegerUnits,
2134
- y2AxisLabelVisibility
2135
- );
2136
- }
2452
+ const xScaleConfig = (0, react_exports.useMemo)(
2453
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
2454
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
2455
+ );
2456
+ const yScaleConfig = (0, react_exports.useMemo)(
2457
+ () => getYScaleConfig(
2458
+ yAxisTitle,
2459
+ yAxisAbbreviation,
2460
+ yAxisScale,
2461
+ yAxisLabelVisibility,
2462
+ yAxisMin,
2463
+ yAxisMax
2464
+ ),
2465
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
2466
+ );
2467
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
2468
+ if (y2Enabled) {
2469
+ return getY2ScaleConfig(
2470
+ y2AxisTitle,
2471
+ y2AxisAbbreviation,
2472
+ y2AxisScale,
2473
+ y2IntegerUnits,
2474
+ y2AxisLabelVisibility,
2475
+ y2AxisMin,
2476
+ y2AxisMax
2477
+ );
2478
+ }
2479
+ return {};
2480
+ }, [
2481
+ y2Enabled,
2482
+ y2AxisTitle,
2483
+ y2AxisAbbreviation,
2484
+ y2AxisScale,
2485
+ y2IntegerUnits,
2486
+ y2AxisLabelVisibility,
2487
+ y2AxisMin,
2488
+ y2AxisMax
2489
+ ]);
2137
2490
  const uplotContainerElement = (0, react_exports.useRef)(null);
2138
2491
  const seriesDataFormatted = [
2139
2492
  filteredChartData.columns[0],
@@ -2149,9 +2502,25 @@ var TimeSeriesChartWrapper = (props) => {
2149
2502
  overlayFields,
2150
2503
  y2Enabled,
2151
2504
  nullValueMode,
2152
- markerDisplay
2505
+ markerDisplay,
2506
+ lineDashStyle,
2507
+ lineDashStylesByField,
2508
+ stepPosition,
2509
+ stepPositionsByField
2153
2510
  ),
2154
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
2511
+ [
2512
+ yFields,
2513
+ y2Fields,
2514
+ lineWidth,
2515
+ overlayFields,
2516
+ y2Enabled,
2517
+ nullValueMode,
2518
+ markerDisplay,
2519
+ lineDashStyle,
2520
+ lineDashStylesByField,
2521
+ stepPosition,
2522
+ stepPositionsByField
2523
+ ]
2155
2524
  );
2156
2525
  const chartingEventAnnotations = (0, react_exports.useMemo)(
2157
2526
  () => getAnnotationsForCanvas({
@@ -2165,25 +2534,59 @@ var TimeSeriesChartWrapper = (props) => {
2165
2534
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
2166
2535
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
2167
2536
  );
2168
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
2537
+ const isSeriesCompare = legendMode === "seriesCompare";
2538
+ const legend = (0, react_exports.useMemo)(
2539
+ () => getLegend({
2540
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
2541
+ isSeriesCompare,
2542
+ legendTruncation
2543
+ }),
2544
+ [legendDisplay, isSeriesCompare, legendTruncation]
2545
+ );
2169
2546
  const handleChartClick = react_exports.useCallback(
2170
2547
  (event) => {
2171
2548
  if (onClick) {
2172
- handleClick(event, onClick);
2549
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
2173
2550
  }
2174
2551
  },
2175
- [onClick]
2552
+ [onClick, trellisKey, trellisSplitBy]
2176
2553
  );
2177
2554
  const handleChartLegendClick = react_exports.useCallback(
2178
2555
  (event) => {
2179
2556
  if (onClick) {
2180
- handleLegendClick(event, onClick);
2557
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
2558
+ }
2559
+ },
2560
+ [onClick, trellisKey, trellisSplitBy]
2561
+ );
2562
+ const handleChartRangeSelection = react_exports.useCallback(
2563
+ (range2) => {
2564
+ if (onSelect) {
2565
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
2566
+ }
2567
+ },
2568
+ [onSelect, chartData, trellisKey, trellisSplitBy]
2569
+ );
2570
+ const handleChartRangeZoom = react_exports.useCallback(
2571
+ (range2) => {
2572
+ if (onSelect) {
2573
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
2181
2574
  }
2182
2575
  },
2183
- [onClick]
2576
+ [onSelect, chartData, trellisKey, trellisSplitBy]
2577
+ );
2578
+ const xFieldToUse = xFieldFromProps || xField;
2579
+ const enableSearchZoom = react_exports.useMemo(
2580
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
2581
+ [eventHandlers, xFieldToUse]
2184
2582
  );
2185
2583
  const lastPayloadRef = react_exports.useRef(null);
2186
2584
  const lastOriginalEventRef = react_exports.useRef(null);
2585
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
2586
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
2587
+ react_exports.useEffect(() => {
2588
+ additionalTooltipValuesRef.current = additionalTooltipValues;
2589
+ }, [additionalTooltipValues]);
2187
2590
  const handleChartCrosshairChange = react_exports.useCallback(
2188
2591
  (event) => {
2189
2592
  if (onPointMouseOver || onPointMouseOut) {
@@ -2195,6 +2598,7 @@ var TimeSeriesChartWrapper = (props) => {
2195
2598
  payload: lastPayloadRef.current
2196
2599
  });
2197
2600
  }
2601
+ previousMouseoverPayloadRef.current = null;
2198
2602
  return;
2199
2603
  }
2200
2604
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -2202,25 +2606,36 @@ var TimeSeriesChartWrapper = (props) => {
2202
2606
  });
2203
2607
  delete payload.seriesKey;
2204
2608
  if (event.rowContext) {
2205
- Object.keys(event.rowContext).forEach((fieldName) => {
2206
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
2207
- });
2609
+ Object.assign(
2610
+ payload,
2611
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
2612
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
2613
+ return acc;
2614
+ }, {})
2615
+ );
2616
+ }
2617
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
2618
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
2619
+ return;
2208
2620
  }
2209
- lastPayloadRef.current = payload;
2621
+ lastPayloadRef.current = updatedPayload;
2210
2622
  lastOriginalEventRef.current = event;
2623
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
2211
2624
  if (onPointMouseOver) {
2212
2625
  onPointMouseOver({
2213
2626
  type: "point.mouseover",
2214
2627
  originalEvent: event,
2215
- payload
2628
+ payload: updatedPayload
2216
2629
  });
2217
2630
  }
2218
2631
  }
2219
2632
  },
2220
- [onPointMouseOver, onPointMouseOut]
2633
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
2221
2634
  );
2222
- const memoizedChart = (0, react_exports.useMemo)(
2223
- () => /* @__PURE__ */ react_exports.createElement(
2635
+ 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}`;
2636
+ const memoizedChart = (0, react_exports.useMemo)(() => {
2637
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
2638
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
2224
2639
  visualization_canvas_exports.TimeSeriesChart,
2225
2640
  {
2226
2641
  data: chartData,
@@ -2230,49 +2645,121 @@ var TimeSeriesChartWrapper = (props) => {
2230
2645
  seriesColorsByField,
2231
2646
  seriesConfig: seriesOverrides,
2232
2647
  legend,
2648
+ legendLabels,
2649
+ legendTruncation,
2650
+ isSeriesCompare: legendMode === "seriesCompare",
2651
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
2233
2652
  scaleConfig,
2234
2653
  timestampFormat: "expanded",
2235
2654
  onCrosshairClick: onClick ? handleChartClick : void 0,
2236
2655
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
2237
2656
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
2657
+ onRangeSelection: handleChartRangeSelection,
2658
+ onRangeZoom: computedOnRangeZoom,
2659
+ serverSideZoom: enableSearchZoom,
2238
2660
  userLocale,
2239
2661
  events: chartingEventAnnotations,
2240
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
2662
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
2663
+ additionalTooltipValuesRef,
2664
+ showXMajorGridLines,
2665
+ showYMajorGridLines,
2666
+ showY2MajorGridLines,
2667
+ showYMinorGridLines,
2668
+ showY2MinorGridLines,
2669
+ showLineSmoothing,
2670
+ dataValuesDisplay,
2671
+ showXMajorTicks,
2672
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
2673
+ showYMajorTicks,
2674
+ showY2MajorTicks,
2675
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
2676
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
2677
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
2678
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
2679
+ showYMinorTicks,
2680
+ showY2MinorTicks,
2681
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
2682
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
2683
+ showYAxisWithZero,
2684
+ showY2AxisWithZero,
2685
+ showXAxisLine,
2686
+ showYAxisLine,
2687
+ showY2AxisLine,
2688
+ xAxisMaxLabelParts
2241
2689
  }
2242
- ),
2243
- [
2244
- chartData,
2245
- containerWidth,
2246
- containerHeight,
2247
- seriesColors,
2248
- seriesColorsByField,
2249
- seriesOverrides,
2250
- legend,
2251
- scaleConfig,
2252
- userLocale,
2253
- chartingEventAnnotations,
2254
- onClick,
2255
- handleChartClick,
2256
- onPointMouseOver,
2257
- onPointMouseOut,
2258
- handleChartCrosshairChange,
2259
- handleChartLegendClick
2260
- ]
2261
- );
2690
+ ));
2691
+ }, [
2692
+ onSelect,
2693
+ handleChartRangeZoom,
2694
+ dataKey,
2695
+ chartData,
2696
+ containerWidth,
2697
+ containerHeight,
2698
+ seriesColors,
2699
+ seriesColorsByField,
2700
+ seriesOverrides,
2701
+ legend,
2702
+ legendLabels,
2703
+ legendTruncation,
2704
+ scaleConfig,
2705
+ onClick,
2706
+ handleChartClick,
2707
+ onPointMouseOver,
2708
+ onPointMouseOut,
2709
+ handleChartCrosshairChange,
2710
+ handleChartLegendClick,
2711
+ handleChartRangeSelection,
2712
+ enableSearchZoom,
2713
+ userLocale,
2714
+ chartingEventAnnotations,
2715
+ showXMajorGridLines,
2716
+ showYMajorGridLines,
2717
+ showY2MajorGridLines,
2718
+ showYMinorGridLines,
2719
+ showY2MinorGridLines,
2720
+ showLineSmoothing,
2721
+ dataValuesDisplay,
2722
+ showXMajorTicks,
2723
+ xAxisMajorTickSizeNum,
2724
+ showYMajorTicks,
2725
+ showY2MajorTicks,
2726
+ yAxisMajorTickSizeNum,
2727
+ y2AxisMajorTickSizeNum,
2728
+ yAxisMajorTickIntervalNum,
2729
+ y2AxisMajorTickIntervalNum,
2730
+ showYMinorTicks,
2731
+ showY2MinorTicks,
2732
+ yAxisMinorTickSizeNum,
2733
+ y2AxisMinorTickSizeNum,
2734
+ showYAxisWithZero,
2735
+ showY2AxisWithZero,
2736
+ showXAxisLine,
2737
+ showYAxisLine,
2738
+ showY2AxisLine,
2739
+ legendMode,
2740
+ xAxisMaxLabelParts
2741
+ ]);
2262
2742
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
2263
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
2264
- }, [backgroundColor, memoizedChart]);
2265
- return /* @__PURE__ */ react_exports.createElement(
2743
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
2744
+ }, [bgColor, memoizedChart]);
2745
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
2746
+ TrellisTitle,
2747
+ {
2748
+ trellisKey,
2749
+ backgroundColor: bgColor,
2750
+ fontColor: defaultFontColor
2751
+ }
2752
+ ), /* @__PURE__ */ react_exports.createElement(
2266
2753
  TimeSeriesChartContainer,
2267
2754
  {
2268
- height,
2755
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
2269
2756
  width,
2270
2757
  ref: uplotContainerElement,
2271
2758
  "data-test": "timeseries-chart-wrapper"
2272
2759
  },
2273
2760
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
2274
2761
  memoizedVisualization
2275
- );
2762
+ ));
2276
2763
  };
2277
2764
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
2278
2765
 
@@ -2754,10 +3241,6 @@ var getColumnFormatColor = (columnFormat, currentColumn, currentRow, field) => {
2754
3241
  );
2755
3242
  if (isArray2(colors) && (0, colorUtils_exports.isColor)(colors[currentRow])) {
2756
3243
  color = colors[currentRow];
2757
- } else if (typeof colors !== "undefined") {
2758
- console.warn(
2759
- `columnFormat.${currentColumn.columnId}.${field} should be an array containing valid colors. ${JSON.stringify(colors)} provided`
2760
- );
2761
3244
  }
2762
3245
  return color;
2763
3246
  };
@@ -2773,6 +3256,19 @@ var getColumnFormatSparklineColor = (columnFormat, currentColumn, currentRow) =>
2773
3256
  var getColumnFormatSparklineAreaColor = (columnFormat, currentColumn, currentRow) => {
2774
3257
  return getColumnFormatColor(columnFormat, currentColumn, currentRow, "sparklineAreaColors");
2775
3258
  };
3259
+ var validSparklineNullValueDisplayOptions = ["gaps", "zero", "connect"];
3260
+ var getColumnFormatSparklineNullValueDisplay = (columnFormat, currentColumn) => {
3261
+ const nullValueDisplay = getAttributeFromColumnFormat(
3262
+ "sparklineNullValueDisplay",
3263
+ columnFormat,
3264
+ currentColumn.columnId,
3265
+ currentColumn.value
3266
+ );
3267
+ if (typeof nullValueDisplay === "string" && validSparklineNullValueDisplayOptions.includes(nullValueDisplay)) {
3268
+ return nullValueDisplay;
3269
+ }
3270
+ return void 0;
3271
+ };
2776
3272
  var getColumnFormatHeaderAlign = (columnFormat, columnId, columnValue) => {
2777
3273
  let headerAlign;
2778
3274
  const alignOption = getAttributeFromColumnFormat("headerAlign", columnFormat, columnId, columnValue);
@@ -2856,12 +3352,28 @@ var getTableFormatRowColor = (tableFormat, currentCol, currentRow) => {
2856
3352
  var getTableFormatRowBgColor = (tableFormat, currentCol, currentRow) => {
2857
3353
  return getTableFormatColor(tableFormat, currentCol, currentRow, "rowBackgroundColors");
2858
3354
  };
3355
+ var getThemeRowBgColor = (themeFunc, currentRow) => {
3356
+ if (!themeFunc) return void 0;
3357
+ const themeVar = (currentRow + 1) % 2 === 0 ? "rowBackgroundColorEven" : "rowBackgroundColorOdd";
3358
+ return themeFunc(themeVar);
3359
+ };
3360
+ var getThemeRowColor = (themeFunc) => {
3361
+ if (!themeFunc) return void 0;
3362
+ return themeFunc("textColor");
3363
+ };
2859
3364
  var getTableFormatSparklineColor = (tableFormat, currentCol, currentRow) => {
2860
3365
  return getTableFormatColor(tableFormat, currentCol, currentRow, "sparklineColors");
2861
3366
  };
2862
3367
  var getTableFormatSparklineAreaColor = (tableFormat, currentCol, currentRow) => {
2863
3368
  return getTableFormatColor(tableFormat, currentCol, currentRow, "sparklineAreaColors");
2864
3369
  };
3370
+ var getTableFormatSparklineNullValueDisplay = (tableFormat) => {
3371
+ const nullValueDisplay = (0, lodash_exports.get)(tableFormat, "sparklineNullValueDisplay");
3372
+ if (typeof nullValueDisplay === "string" && validSparklineNullValueDisplayOptions.includes(nullValueDisplay)) {
3373
+ return nullValueDisplay;
3374
+ }
3375
+ return void 0;
3376
+ };
2865
3377
  var getTableFormatData = (tableFormat, currentCol, currentRow) => {
2866
3378
  const data = (0, lodash_exports.get)(tableFormat, "data");
2867
3379
  let datum;
@@ -2911,7 +3423,10 @@ var useTable = (tableArgs = {}) => {
2911
3423
  tableFormat = {},
2912
3424
  columnFormat = {},
2913
3425
  paginationOffset = 0,
2914
- count = 0
3426
+ count = 0,
3427
+ showFooterTotals = false,
3428
+ showFooterPercentages = false,
3429
+ themeFunc
2915
3430
  } = tableArgs;
2916
3431
  const longestColumnLength = Math.max(...table.map((column) => column.length));
2917
3432
  if (showRowNumbers) {
@@ -3005,7 +3520,8 @@ var useTable = (tableArgs = {}) => {
3005
3520
  tableFormat: tfmt,
3006
3521
  columnIds: cids,
3007
3522
  showInternalFields: showInternal,
3008
- longestColumnLength: len
3523
+ longestColumnLength: len,
3524
+ themeFunc: themeFn
3009
3525
  } = args;
3010
3526
  for (let r = 0; r < len; r += 1) {
3011
3527
  const row = { key: `row-${r}`, index: r, cells: [] };
@@ -3018,20 +3534,16 @@ var useTable = (tableArgs = {}) => {
3018
3534
  ""
3019
3535
  );
3020
3536
  const rawValue = column[r];
3021
- const rowBackgroundColor = getColumnFormatRowBgColor(cfmt, currentHeader, r) || getTableFormatRowBgColor(tfmt, i, r) || void 0;
3022
- const rowColor = getColumnFormatRowColor(cfmt, currentHeader, r) || getTableFormatRowColor(tfmt, i, r) || void 0;
3537
+ const rowBackgroundColor = getColumnFormatRowBgColor(cfmt, currentHeader, r) || getTableFormatRowBgColor(tfmt, i, r) || getThemeRowBgColor(themeFn, r);
3538
+ const rowColor = getColumnFormatRowColor(cfmt, currentHeader, r) || getTableFormatRowColor(tfmt, i, r) || getThemeRowColor(themeFn);
3023
3539
  const align = getColumnFormatAlign(cfmt, currentHeader, r) || getTableFormatAlign(tfmt, i, r) || "left";
3024
3540
  const cellType = getColumnFormatCellType(cfmt, currentHeader, r) || getTableFormatCellType(tfmt, i, r) || "TextCell";
3025
3541
  const sparklineColor = getColumnFormatSparklineColor(cfmt, currentHeader, r) || getTableFormatSparklineColor(tfmt, i, r) || void 0;
3026
3542
  const sparklineAreaColor = getColumnFormatSparklineAreaColor(cfmt, currentHeader, r) || getTableFormatSparklineAreaColor(tfmt, i, r) || void 0;
3027
3543
  const sparklineType = getColumnFormatSparklineType(cfmt, currentHeader, r) || getTableFormatSparklineType(tfmt, i, r) || "area";
3544
+ const sparklineNullValueDisplay = getColumnFormatSparklineNullValueDisplay(cfmt, currentHeader) || getTableFormatSparklineNullValueDisplay(tfmt) || "gaps";
3028
3545
  const key = generateKey(value, `${r}-${i}`);
3029
- const textOverflowType = getTextOverflowType(
3030
- cfmt,
3031
- cids[i],
3032
- tfmt,
3033
- currentHeader.value
3034
- );
3546
+ const textOverflowType = getTextOverflowType(cfmt, cids[i], tfmt, currentHeader.value);
3035
3547
  const textOverflowStyle = getOverflowStyles({
3036
3548
  textOverflow: textOverflowType
3037
3549
  });
@@ -3047,6 +3559,7 @@ var useTable = (tableArgs = {}) => {
3047
3559
  sparklineColor,
3048
3560
  sparklineAreaColor,
3049
3561
  sparklineType,
3562
+ sparklineNullValueDisplay,
3050
3563
  header: currentHeader.value,
3051
3564
  style: __spreadValues({
3052
3565
  backgroundColor: rowBackgroundColor,
@@ -3066,24 +3579,20 @@ var useTable = (tableArgs = {}) => {
3066
3579
  tableFormat,
3067
3580
  columnIds,
3068
3581
  showInternalFields,
3069
- longestColumnLength
3582
+ longestColumnLength,
3583
+ themeFunc
3070
3584
  });
3071
- const { showFooterTotals = false, showFooterPercentages = false } = tableArgs;
3072
3585
  const resolveByField = (fieldId, displayName, map) => {
3073
3586
  if (!map) return void 0;
3074
- if (Object.prototype.hasOwnProperty.call(map, fieldId)) return map[fieldId];
3075
- if (Object.prototype.hasOwnProperty.call(map, displayName)) return map[displayName];
3587
+ if (Object.hasOwn(map, fieldId)) return map[fieldId];
3588
+ if (Object.hasOwn(map, displayName)) return map[displayName];
3076
3589
  return void 0;
3077
3590
  };
3078
3591
  const computeDerivedAlign = (colMeta, colIdx, alignOverrides) => {
3079
3592
  const fieldId = colMeta.columnId;
3080
3593
  const label = colMeta.value;
3081
3594
  const alignOverride = resolveByField(fieldId, label, alignOverrides);
3082
- return alignOverride || getColumnFormatAlign(
3083
- columnFormat,
3084
- colMeta,
3085
- Math.max(0, longestColumnLength - 1)
3086
- ) || getTableFormatAlign(tableFormat, colIdx, Math.max(0, longestColumnLength - 1)) || "right";
3595
+ return alignOverride || getColumnFormatAlign(columnFormat, colMeta, Math.max(0, longestColumnLength - 1)) || getTableFormatAlign(tableFormat, colIdx, Math.max(0, longestColumnLength - 1)) || "right";
3087
3596
  };
3088
3597
  const buildFooterRow = (key, styleExtras, rowIndexBase) => {
3089
3598
  const idx = rowIndexBase + tableFooter.rows.length;
@@ -3222,6 +3731,8 @@ var StyledSvg = styled_components_default.svg`
3222
3731
  var StyledTooltip = styled_components_default.div`
3223
3732
  padding: 3px 8px;
3224
3733
  font-size: 12px;
3734
+ text-align: center;
3735
+ min-width: 20px;
3225
3736
  `;
3226
3737
  var preventDefault = (e) => e.preventDefault();
3227
3738
  var _SparkLine = class _SparkLine extends react_exports.Component {
@@ -3358,16 +3869,19 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3358
3869
  * @method getSegmentSets
3359
3870
  * @param {Array} data
3360
3871
  * @param {Array} points
3361
- * @returns {Array} List of datapoint sets used for drawing lines
3872
+ * @returns {Object} Object containing lines (arrays of points for polylines) and isolatedPoints (single points surrounded by nulls)
3362
3873
  */
3363
3874
  getSegmentSets(data, points) {
3364
3875
  const { acceptNull } = this.props;
3365
3876
  const lines = [];
3877
+ const isolatedPoints = [];
3366
3878
  let currentLine = [];
3367
3879
  for (const [idx, p] of data.entries()) {
3368
3880
  if (!acceptNull && (0, lodash_exports.isNull)(p)) {
3369
3881
  if (currentLine.length > 1) {
3370
3882
  lines.push(currentLine);
3883
+ } else if (currentLine.length === 1) {
3884
+ isolatedPoints.push(currentLine[0]);
3371
3885
  }
3372
3886
  currentLine = [];
3373
3887
  } else {
@@ -3376,8 +3890,10 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3376
3890
  }
3377
3891
  if (currentLine.length > 1) {
3378
3892
  lines.push(currentLine);
3893
+ } else if (currentLine.length === 1) {
3894
+ isolatedPoints.push(currentLine[0]);
3379
3895
  }
3380
- return lines;
3896
+ return { lines, isolatedPoints };
3381
3897
  }
3382
3898
  /**
3383
3899
  * Utility for fill null value with number 0.
@@ -3445,8 +3961,8 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3445
3961
  if (!isArea || points.length === 0) {
3446
3962
  return null;
3447
3963
  }
3448
- let segments = this.getSegmentSets(data, points);
3449
- segments = segments.map(
3964
+ const { lines } = this.getSegmentSets(data, points);
3965
+ const segments = lines.map(
3450
3966
  (s) => s.concat([
3451
3967
  [s.at(-1)[0], height],
3452
3968
  // down to bottom of graph
@@ -3492,6 +4008,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3492
4008
  }
3493
4009
  renderTooltip(tooltipValue, isOpen) {
3494
4010
  const { anchor } = this.state;
4011
+ const displayValue = tooltipValue === null ? "-" : tooltipValue;
3495
4012
  return /* @__PURE__ */ react_default.createElement(
3496
4013
  Popover_default,
3497
4014
  {
@@ -3503,7 +4020,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3503
4020
  defaultPlacement: "above",
3504
4021
  animation: false
3505
4022
  },
3506
- /* @__PURE__ */ react_default.createElement(StyledTooltip, null, tooltipValue)
4023
+ /* @__PURE__ */ react_default.createElement(StyledTooltip, null, displayValue)
3507
4024
  );
3508
4025
  }
3509
4026
  /**
@@ -3533,16 +4050,46 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3533
4050
  }
3534
4051
  )));
3535
4052
  }
4053
+ /**
4054
+ * Renders circles for isolated points (single data points surrounded by nulls)
4055
+ * These would otherwise be invisible since a line requires at least 2 points
4056
+ * @method renderIsolatedPoints
4057
+ * @param {Array} isolatedPoints - Array of [x, y] coordinates for isolated points
4058
+ * @returns {Object} SVG Group of circles
4059
+ */
4060
+ renderIsolatedPoints(isolatedPoints) {
4061
+ const { lineColor, lineStrokeWidth } = this.props;
4062
+ if (!isolatedPoints || isolatedPoints.length === 0) {
4063
+ return null;
4064
+ }
4065
+ const radius = lineStrokeWidth + 0.5;
4066
+ return /* @__PURE__ */ react_default.createElement("g", { "data-test": "isolated-points" }, isolatedPoints.map((point) => /* @__PURE__ */ react_default.createElement(
4067
+ "circle",
4068
+ {
4069
+ key: `isolated-${point[0]}-${point[1]}`,
4070
+ "data-test": "isolated-point",
4071
+ cx: point[0],
4072
+ cy: point[1],
4073
+ r: radius,
4074
+ style: {
4075
+ fill: lineColor
4076
+ }
4077
+ }
4078
+ )));
4079
+ }
3536
4080
  /**
3537
4081
  * Renders the line(s) above the area graph
3538
4082
  * @method renderPolyline
3539
4083
  * @param {Array} points
3540
- * @returns {Object} SVG Group of polylines
4084
+ * @returns {Object} SVG Group of polylines and isolated points
3541
4085
  */
3542
4086
  renderPolyline(points) {
3543
4087
  const { data, lineColor, lineLength, lineStrokeWidth } = this.props;
3544
4088
  const linePoints = (0, lodash_exports.isFinite)(lineLength) && lineLength > 0 ? lineLength : points.length;
3545
- const lines = this.getSegmentSets(data.slice(-linePoints), points.slice(-linePoints));
4089
+ const { lines, isolatedPoints } = this.getSegmentSets(
4090
+ data.slice(-linePoints),
4091
+ points.slice(-linePoints)
4092
+ );
3546
4093
  return /* @__PURE__ */ react_default.createElement("g", { "data-test": "sparkline" }, lines.map((lineData) => /* @__PURE__ */ react_default.createElement(
3547
4094
  "polyline",
3548
4095
  {
@@ -3557,7 +4104,7 @@ var _SparkLine = class _SparkLine extends react_exports.Component {
3557
4104
  },
3558
4105
  points: lineData.join(" ")
3559
4106
  }
3560
- )));
4107
+ )), this.renderIsolatedPoints(isolatedPoints));
3561
4108
  }
3562
4109
  getInteractionState({ data, points, showTooltip, activeIndex, hoveredIndex, componentIsFocused }) {
3563
4110
  if (!showTooltip) {
@@ -3767,7 +4314,24 @@ var SparkLine_default = SparkLine;
3767
4314
  // src/Table/cells/SparklineCell.tsx
3768
4315
  var paddingLeftRight = 5;
3769
4316
  var paddingTopBottom = 3;
3770
- var parseSparklineData = (data) => (Array.isArray(data) ? data : [data]).map((d) => Number(d.toString())).map((d) => isNaN(d) ? null : d);
4317
+ var parseSparklineData = (data) => (Array.isArray(data) ? data : [data]).map((d) => {
4318
+ var _a;
4319
+ const str = (_a = d == null ? void 0 : d.toString()) != null ? _a : "";
4320
+ if (str.trim() === "") {
4321
+ return null;
4322
+ }
4323
+ const num = Number(str);
4324
+ return Number.isNaN(num) ? null : num;
4325
+ });
4326
+ var processDataForNullDisplay = (data, nullValueDisplay) => {
4327
+ if (nullValueDisplay === "connect") {
4328
+ return data.filter((d) => d !== null);
4329
+ }
4330
+ return data;
4331
+ };
4332
+ var getAcceptNull = (nullValueDisplay) => {
4333
+ return nullValueDisplay === "zero";
4334
+ };
3771
4335
  var noop6 = () => void 0;
3772
4336
  var svgStyle = { height: 0 };
3773
4337
  var dummySVG = /* @__PURE__ */ react_exports.createElement("svg", { style: svgStyle });
@@ -3778,10 +4342,15 @@ var SparklineCell = ({
3778
4342
  }) => {
3779
4343
  const [cellEl, setEl] = react_exports.useState();
3780
4344
  const [height, setHeight] = react_exports.useState();
3781
- let data = react_exports.useMemo(() => parseSparklineData(cell.value), [cell.value]);
4345
+ const nullValueDisplay = cell.sparklineNullValueDisplay || "gaps";
4346
+ let data = react_exports.useMemo(() => {
4347
+ const parsed = parseSparklineData(cell.value);
4348
+ return processDataForNullDisplay(parsed, nullValueDisplay);
4349
+ }, [cell.value, nullValueDisplay]);
3782
4350
  if (cell.value[0] === "##__SPARKLINE__##") {
3783
4351
  data = data.slice(1);
3784
4352
  }
4353
+ const acceptNull = getAcceptNull(nullValueDisplay);
3785
4354
  react_exports.useLayoutEffect(() => {
3786
4355
  setHeight((cellEl == null ? void 0 : cellEl.offsetHeight) || 20);
3787
4356
  }, [cellEl]);
@@ -3808,9 +4377,9 @@ var SparklineCell = ({
3808
4377
  Table_default.Cell,
3809
4378
  {
3810
4379
  style: cellStyle,
3811
- align: cell.align,
4380
+ align: "left",
3812
4381
  elementRef: setEl,
3813
- "data-test-align-value": cell.align,
4382
+ "data-test-align-value": "left",
3814
4383
  "data-test-cell-type": "SparklineCell",
3815
4384
  "data-row-index": cell.rowIndex,
3816
4385
  "data-col-index": cell.columnIndex,
@@ -3824,7 +4393,7 @@ var SparklineCell = ({
3824
4393
  width: (cellEl == null ? void 0 : cellEl.offsetWidth) - paddingLeftRight * 2,
3825
4394
  height: height - paddingTopBottom * 2,
3826
4395
  isArea: cell.sparklineType === "area",
3827
- acceptNull: true,
4396
+ acceptNull,
3828
4397
  lineColor: cell.sparklineColor,
3829
4398
  fillColor: cell.sparklineAreaColor
3830
4399
  }
@@ -3833,9 +4402,13 @@ var SparklineCell = ({
3833
4402
  };
3834
4403
  SparklineCell.displayName = "SparklineCell";
3835
4404
 
4405
+ // src/common/utils/textUtils.ts
4406
+ var VIZ_FONT_FAMILY = "'Splunk Platform Sans', 'Splunk Data Sans', Roboto, Droid, 'Helvetica Neue', Helvetica, Arial, sans-serif";
4407
+
3836
4408
  // src/Table/PureTable.tsx
3837
4409
  var MINIMUM_COLUMN_SIZE = 60;
3838
4410
  var INITIAL_UNSET_COLUMN_WIDTH = 90;
4411
+ var COMPACT_PAGINATOR_WIDTH_THRESHOLD = 350;
3839
4412
  var NonVisibleTableHead = styled_components_default(Table_default.Head)`
3840
4413
  pointer-events: none;
3841
4414
  & [data-test='head-cell'] > div {
@@ -3881,11 +4454,6 @@ var VizTableContainer = styled_components_default.div`
3881
4454
  overflow: hidden !important;
3882
4455
  height: 100%;
3883
4456
 
3884
- td,
3885
- * > td:hover {
3886
- color: ${({ isCellClickable }) => isCellClickable ? variables_default.linkColor : variables_default.textColor};
3887
- }
3888
-
3889
4457
  /* footer totals row styling */
3890
4458
  tr[data-test='footer-row-totals'] td[data-test='cell'] {
3891
4459
  color: ${variables_default.contentColorActive} !important;
@@ -3927,7 +4495,6 @@ var SUITableContainer = styled_components_default.div`
3927
4495
  margin-bottom: ${PAGINATOR_SPACING}px;
3928
4496
  `};
3929
4497
 
3930
- /* TODO: Replace unsupported hacky style overrides */
3931
4498
  ${({ headerStyle }) => headerStyle && headerStyle.backgroundColor && styled_components_exports.css`
3932
4499
  & [data-test='head-cell'] {
3933
4500
  background-color: ${headerStyle.backgroundColor};
@@ -4029,7 +4596,7 @@ var HeadCell = (_a) => {
4029
4596
  return /* @__PURE__ */ react_exports.createElement(TableHeadCell, __spreadValues({ elementRef: cellRef, textOverflowType }, props), value);
4030
4597
  };
4031
4598
  var fontMap = {
4032
- proportional: "Splunk Platform Sans",
4599
+ proportional: VIZ_FONT_FAMILY,
4033
4600
  monospace: "Splunk Platform Mono"
4034
4601
  };
4035
4602
  var fontSizeMap = {
@@ -4044,7 +4611,23 @@ var rowHeightMap = {
4044
4611
  default: "20px",
4045
4612
  large: "24px"
4046
4613
  };
4047
- var tableInnerStyle = { height: "100%" };
4614
+ var getUseMouseOverEffect = (props, header) => {
4615
+ if (!props.hasEventHandlers || props.mode === "edit") {
4616
+ return false;
4617
+ }
4618
+ const eventHandlers = props.eventHandlers || [];
4619
+ if (eventHandlers.length === 0) {
4620
+ return true;
4621
+ }
4622
+ return eventHandlers.some((handler) => {
4623
+ var _a;
4624
+ const handlerFields = (_a = handler.options) == null ? void 0 : _a.fields;
4625
+ if (!(handlerFields == null ? void 0 : handlerFields.length)) {
4626
+ return true;
4627
+ }
4628
+ return handlerFields.includes(header);
4629
+ });
4630
+ };
4048
4631
  var PureTable = (props) => {
4049
4632
  const _a = props, {
4050
4633
  count,
@@ -4189,10 +4772,8 @@ var PureTable = (props) => {
4189
4772
  const fontMapped = fontMap[font] || fontMap.proportional;
4190
4773
  const fontSizeMapped = fontSizeMap[fontSize] || fontSizeMap.default;
4191
4774
  const rowHeightMapped = rowHeightMap[fontSize] || rowHeightMap.default;
4192
- const tableOuterStyle = react_exports.useMemo(
4193
- () => ({ height: "100%", cursor: onCellClick ? "pointer" : "unset" }),
4194
- [onCellClick]
4195
- );
4775
+ const tableInnerStyle = { height: "100%" };
4776
+ const tableOuterStyle = { height: "100%" };
4196
4777
  const visibleHeaderCells = tableHeader.cells.filter((c) => c.showCell);
4197
4778
  const numberOfFixedHeaders = visibleHeaderCells.filter(({ value }) => {
4198
4779
  var _a2, _b2;
@@ -4228,113 +4809,125 @@ var PureTable = (props) => {
4228
4809
  })
4229
4810
  ));
4230
4811
  };
4231
- return /* @__PURE__ */ react_exports.createElement(
4232
- VizTableContainer,
4812
+ return /* @__PURE__ */ react_exports.createElement(VizTableContainer, { backgroundColor, ref: containerRef, "data-test": "table-container" }, /* @__PURE__ */ react_exports.createElement(
4813
+ SUITableContainer,
4233
4814
  {
4234
- isCellClickable: Boolean(onCellClick),
4235
- backgroundColor,
4236
- ref: containerRef,
4237
- "data-test": "table-container"
4815
+ ref: containerRefInner,
4816
+ width,
4817
+ height,
4818
+ isPaging,
4819
+ headerStyle: tableHeader.style,
4820
+ font: fontMapped,
4821
+ fontSize: fontSizeMapped,
4822
+ lineHeight: rowHeightMapped,
4823
+ isFullyFixed
4238
4824
  },
4239
4825
  /* @__PURE__ */ react_exports.createElement(
4240
- SUITableContainer,
4826
+ Table_default,
4241
4827
  {
4242
- ref: containerRefInner,
4243
- width,
4244
- height,
4245
- isPaging,
4246
- headerStyle: tableHeader.style,
4247
- font: fontMapped,
4248
- fontSize: fontSizeMapped,
4249
- lineHeight: rowHeightMapped,
4250
- isFullyFixed
4828
+ resizableFillLayout: true,
4829
+ headType: isHeaderHidden ? void 0 : "inline",
4830
+ innerStyle: tableInnerStyle,
4831
+ outerStyle: tableOuterStyle,
4832
+ onClick: tableCellClickHandler,
4833
+ onKeyDown: onCellClick ? handleKeyDown : lodash_exports.noop,
4834
+ onKeyUp: handleKeyUp,
4835
+ onRequestResizeColumn: handleResizeColumn
4251
4836
  },
4252
- /* @__PURE__ */ react_exports.createElement(
4253
- Table_default,
4254
- {
4255
- resizableFillLayout: true,
4256
- headType: isHeaderHidden ? void 0 : "inline",
4257
- innerStyle: tableInnerStyle,
4258
- outerStyle: tableOuterStyle,
4259
- onClick: tableCellClickHandler,
4260
- onKeyDown: onCellClick ? handleKeyDown : lodash_exports.noop,
4261
- onKeyUp: handleKeyUp,
4262
- onRequestResizeColumn: handleResizeColumn
4263
- },
4264
- /* @__PURE__ */ react_exports.createElement(TableHead, null, visibleHeaderCells.map(
4265
- (_d) => {
4266
- var _e = _d, {
4837
+ /* @__PURE__ */ react_exports.createElement(TableHead, null, visibleHeaderCells.map(
4838
+ (_d) => {
4839
+ var _e = _d, {
4840
+ key,
4841
+ value,
4842
+ sortKey,
4843
+ style,
4844
+ align,
4845
+ textOverflowType
4846
+ } = _e, rest = __objRest(_e, [
4847
+ "key",
4848
+ "value",
4849
+ "sortKey",
4850
+ "style",
4851
+ "align",
4852
+ "textOverflowType"
4853
+ ]);
4854
+ var _a2, _b2;
4855
+ return /* @__PURE__ */ react_exports.createElement(
4856
+ HeadCell,
4857
+ __spreadProps(__spreadValues({}, __spreadValues({ sortKey }, rest)), {
4858
+ align,
4859
+ "data-test-align-value": align,
4860
+ "data-test-text-overflow-value": textOverflowType,
4267
4861
  key,
4862
+ columnId: value,
4863
+ sortDir: sortKey === currentSortKey ? currentSortDir : "none",
4864
+ width: (_b2 = (_a2 = columns[value]) == null ? void 0 : _a2.width) != null ? _b2 : INITIAL_UNSET_COLUMN_WIDTH,
4865
+ onMouseDown: handleEventHeadCellMouseDown,
4268
4866
  value,
4269
- sortKey,
4270
- style,
4271
- align,
4272
- textOverflowType
4273
- } = _e, rest = __objRest(_e, [
4274
- "key",
4275
- "value",
4276
- "sortKey",
4277
- "style",
4278
- "align",
4279
- "textOverflowType"
4280
- ]);
4281
- var _a2, _b2;
4282
- return /* @__PURE__ */ react_exports.createElement(
4283
- HeadCell,
4284
- __spreadProps(__spreadValues({}, __spreadValues({ sortKey }, rest)), {
4285
- align,
4286
- "data-test-align-value": align,
4287
- "data-test-text-overflow-value": textOverflowType,
4288
- key,
4289
- columnId: value,
4290
- sortDir: sortKey === currentSortKey ? currentSortDir : "none",
4291
- width: (_b2 = (_a2 = columns[value]) == null ? void 0 : _a2.width) != null ? _b2 : INITIAL_UNSET_COLUMN_WIDTH,
4292
- onMouseDown: handleEventHeadCellMouseDown,
4293
- value,
4294
- onSort: showRowNumbers && value === "#" || isHeaderHidden ? null : onSortToUse,
4295
- resizable: !isHeaderHidden,
4296
- style: showRowNumbers && value === "#" ? __spreadProps(__spreadValues({}, style), { cursor: "auto" }) : style,
4297
- textOverflowType,
4298
- headerVisibility
4299
- })
4300
- );
4301
- }
4302
- )),
4303
- /* @__PURE__ */ react_exports.createElement(Table_default.Body, null, tableBody.rows.map(
4304
- (row) => /* @__PURE__ */ react_exports.createElement(Table_default.Row, { key: row.key }, row.cells.filter((c) => c.showCell).map((cell) => {
4305
- var _a2, _b2;
4306
- return /* @__PURE__ */ react_exports.createElement(SwitchTableCell, { key: cell.key, type: cell.cellType }, /* @__PURE__ */ react_exports.createElement(
4307
- TextCell,
4308
- {
4309
- cell,
4310
- useMouseOverEffect: !!onCellClick
4311
- }
4312
- ), /* @__PURE__ */ react_exports.createElement(
4313
- SparklineCell,
4314
- {
4315
- cell,
4316
- useMouseOverEffect: !!onCellClick,
4317
- width: (_b2 = (_a2 = columns[cell.header]) == null ? void 0 : _a2.width) != null ? _b2 : "auto"
4318
- }
4319
- ), /* @__PURE__ */ react_exports.createElement(
4320
- ArrayCell,
4321
- {
4322
- cell,
4323
- useMouseOverEffect: !!onCellClick
4324
- }
4325
- ));
4326
- }))
4327
- ), tableFooter && showFooterTotals && renderFooterRow("footer-totals", "footer-row-totals"), tableFooter && showFooterPercentages && renderFooterRow("footer-percentages", "footer-row-percentages"))
4328
- )
4329
- ),
4330
- isPaging ? /* @__PURE__ */ react_exports.createElement(PaginatorContainer, null, /* @__PURE__ */ react_exports.createElement(
4331
- Paginator_default,
4332
- __spreadValues({
4333
- totalPages: paginatorProps.totalPages,
4334
- onChange: paginatorOnChange
4335
- }, paginatorProps)
4336
- )) : null
4337
- );
4867
+ onSort: showRowNumbers && value === "#" || isHeaderHidden ? null : onSortToUse,
4868
+ resizable: !isHeaderHidden,
4869
+ style: showRowNumbers && value === "#" ? __spreadProps(__spreadValues({}, style), { cursor: "auto" }) : style,
4870
+ textOverflowType,
4871
+ headerVisibility
4872
+ })
4873
+ );
4874
+ }
4875
+ )),
4876
+ /* @__PURE__ */ react_exports.createElement(Table_default.Body, null, tableBody.rows.map(
4877
+ (row) => /* @__PURE__ */ react_exports.createElement(Table_default.Row, { key: row.key }, row.cells.filter((c) => c.showCell).map((cell) => {
4878
+ var _a2, _b2;
4879
+ return /* @__PURE__ */ react_exports.createElement(SwitchTableCell, { key: cell.key, type: cell.cellType }, /* @__PURE__ */ react_exports.createElement(
4880
+ TextCell,
4881
+ {
4882
+ cell,
4883
+ useMouseOverEffect: getUseMouseOverEffect(
4884
+ props,
4885
+ cell.header
4886
+ )
4887
+ }
4888
+ ), /* @__PURE__ */ react_exports.createElement(
4889
+ SparklineCell,
4890
+ {
4891
+ cell,
4892
+ useMouseOverEffect: getUseMouseOverEffect(
4893
+ props,
4894
+ cell.header
4895
+ ),
4896
+ width: (_b2 = (_a2 = columns[cell.header]) == null ? void 0 : _a2.width) != null ? _b2 : "auto"
4897
+ }
4898
+ ), /* @__PURE__ */ react_exports.createElement(
4899
+ ArrayCell,
4900
+ {
4901
+ cell,
4902
+ useMouseOverEffect: getUseMouseOverEffect(
4903
+ props,
4904
+ cell.header
4905
+ )
4906
+ }
4907
+ ));
4908
+ }))
4909
+ ), tableFooter && showFooterTotals && renderFooterRow("footer-totals", "footer-row-totals"), tableFooter && showFooterPercentages && renderFooterRow("footer-percentages", "footer-row-percentages"))
4910
+ )
4911
+ ), isPaging ? /* @__PURE__ */ react_exports.createElement(PaginatorContainer, null, width < COMPACT_PAGINATOR_WIDTH_THRESHOLD ? /* @__PURE__ */ react_exports.createElement(
4912
+ Paginator_default.Compact,
4913
+ {
4914
+ current: paginatorProps.current,
4915
+ totalPages: paginatorProps.totalPages,
4916
+ renderLabel: false,
4917
+ onChange: (e, { direction }) => {
4918
+ const newPage = direction === "next" ? paginatorProps.current + 1 : paginatorProps.current - 1;
4919
+ paginatorOnChange(e, {
4920
+ page: newPage
4921
+ });
4922
+ }
4923
+ }
4924
+ ) : /* @__PURE__ */ react_exports.createElement(
4925
+ Paginator_default,
4926
+ __spreadValues({
4927
+ totalPages: paginatorProps.totalPages,
4928
+ onChange: paginatorOnChange
4929
+ }, paginatorProps)
4930
+ )) : null);
4338
4931
  };
4339
4932
  var cellDataType = prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number, prop_types_exports.arrayOf(prop_types_exports.oneOfType([prop_types_exports.string, prop_types_exports.number]))]);
4340
4933
  PureTable.propTypes = {
@@ -4425,24 +5018,14 @@ var computeVizProps = (_a) => {
4425
5018
  vizProps.headersMetadata = (_g = (_f = (_e = vizProps.dataSources) == null ? void 0 : _e.primary) == null ? void 0 : _f.data) == null ? void 0 : _g.fields;
4426
5019
  if (vizProps.columnFormat) {
4427
5020
  const columns = vizProps.columnFormat;
4428
- const themeRowBackgroundColorOdd = vizProps.themeFunc("rowBackgroundColorOdd");
4429
- const themeRowBackgroundColorEven = vizProps.themeFunc("rowBackgroundColorEven");
4430
- const themeTextColor = vizProps.themeFunc("textColor");
4431
5021
  Object.entries(columns).forEach(([columnKey, columnProperties]) => {
4432
5022
  let rowBackgroundColors;
4433
5023
  let rowColors;
4434
5024
  if (columnProperties.rowBackgroundColors) {
4435
- rowBackgroundColors = (0, colorUtils_exports.sanitizeArrayOfColors)(columnProperties.rowBackgroundColors).map(
4436
- (color, i) => (
4437
- // using (i + 1) % 2 because 'odd' refers to row number, so index 0 -> row 1 -> odd colored
4438
- color || ((i + 1) % 2 === 0 ? themeRowBackgroundColorEven : themeRowBackgroundColorOdd)
4439
- )
4440
- );
5025
+ rowBackgroundColors = (0, colorUtils_exports.sanitizeArrayOfColors)(columnProperties.rowBackgroundColors);
4441
5026
  }
4442
5027
  if (columnProperties.rowColors) {
4443
- rowColors = (0, colorUtils_exports.sanitizeArrayOfColors)(columnProperties.rowColors).map(
4444
- (color) => color || themeTextColor
4445
- );
5028
+ rowColors = (0, colorUtils_exports.sanitizeArrayOfColors)(columnProperties.rowColors);
4446
5029
  }
4447
5030
  vizProps.columnFormat[columnKey] = __spreadValues(__spreadValues(__spreadValues({}, vizProps.columnFormat[columnKey]), columnProperties.rowBackgroundColors && {
4448
5031
  rowBackgroundColors