@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/Map.js CHANGED
@@ -59,6 +59,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
59
59
  mod
60
60
  ));
61
61
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
62
+ var __async = (__this, __arguments, generator) => {
63
+ return new Promise((resolve, reject) => {
64
+ var fulfilled = (value) => {
65
+ try {
66
+ step(generator.next(value));
67
+ } catch (e) {
68
+ reject(e);
69
+ }
70
+ };
71
+ var rejected = (value) => {
72
+ try {
73
+ step(generator.throw(value));
74
+ } catch (e) {
75
+ reject(e);
76
+ }
77
+ };
78
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
79
+ step((generator = generator.apply(__this, __arguments)).next());
80
+ });
81
+ };
62
82
 
63
83
  // src/Map/index.ts
64
84
  var Map_exports = {};
@@ -207,113 +227,68 @@ var defaultImport15 = __toESM(require("maplibre-gl/dist/maplibre-gl.css"));
207
227
  __reExport(maplibre_gl_exports2, require("maplibre-gl/dist/maplibre-gl.css"));
208
228
  var maplibre_gl_default2 = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
209
229
 
210
- // src/Map/PureMap/PureMapContainer.tsx
211
- var PureMapContainer = styled_components_default.div.attrs({
212
- "data-test": "puremap-container"
213
- })`
214
- ${maplibre_gl_default2}
215
- overflow: hidden;
216
- position: relative;
217
- z-index: 0;
218
- background-color: ${(props) => props.backgroundColor};
219
- ${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
220
-
221
- // keep zoom control on top of cooperative gesture layer
222
- .maplibregl-cooperative-gesture-screen {
223
- z-index: 0;
224
- }
230
+ // esm-externals:@splunk/visualizations-shared/iconUtils
231
+ var iconUtils_exports = {};
232
+ __export(iconUtils_exports, {
233
+ default: () => iconUtils_default
234
+ });
235
+ var defaultImport16 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
236
+ __reExport(iconUtils_exports, require("@splunk/visualizations-shared/iconUtils"));
237
+ var iconUtils_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
225
238
 
226
- // overwrite maplibregl zoom control styles
227
- .maplibregl-ctrl-top-left {
228
- display: ${(props) => props.showZoomControls ? "block" : "none"};
229
- position: absolute;
230
- top: 12px;
231
- left: 16px;
232
- .maplibregl-ctrl-group {
233
- width: 40px !important;
234
- height: 87px !important;
235
- border-radius: 4px;
236
- margin: 8px 0px;
237
- background-color: ${(props) => props.controlBackgroundColor};
238
- box-shadow:
239
- 0px 26px 103px rgba(0, 0, 0, 0.64),
240
- 0px 11px 18px rgba(0, 0, 0, 0.32),
241
- 0px 3px 6px rgba(0, 0, 0, 0.3);
242
- & button {
243
- width: 40px;
244
- height: 43px;
245
- border-top: 0;
246
- }
247
- .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
248
- background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 1C9 0.447715 8.55229 0 8 0C7.44772 0 7 0.447715 7 1V7H1C0.447715 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55229 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55229 16 8C16 7.44772 15.5523 7 15 7H9V1Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
249
- }
239
+ // esm-externals:@splunk/visualizations-shared/RemoteIcon
240
+ var RemoteIcon_exports = {};
241
+ __export(RemoteIcon_exports, {
242
+ default: () => RemoteIcon_default
243
+ });
244
+ var defaultImport17 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
245
+ __reExport(RemoteIcon_exports, require("@splunk/visualizations-shared/RemoteIcon"));
246
+ var RemoteIcon_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
250
247
 
251
- .maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
252
- background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="14" height="3" viewBox="0 0 14 3" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.99707C0 1.44479 0.447715 0.99707 1 0.99707H13C13.5523 0.99707 14 1.44479 14 1.99707C14 2.54936 13.5523 2.99707 13 2.99707H1C0.447715 2.99707 0 2.54936 0 1.99707Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
253
- }
254
- }
255
- }
248
+ // esm-externals:@splunk/visualization-context/FeatureFlagContext
249
+ var FeatureFlagContext_exports = {};
250
+ __export(FeatureFlagContext_exports, {
251
+ default: () => FeatureFlagContext_default
252
+ });
253
+ var defaultImport18 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
254
+ __reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
255
+ var FeatureFlagContext_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
256
256
 
257
- // overwrite maplibregl scale styles
258
- .maplibregl-ctrl-bottom-left {
259
- display: ${(props) => props.showScale ? "block" : "none"};
260
- position: absolute;
261
- z-index: 0;
262
- bottom: 16px;
263
- left: 12px;
264
- width: 86px;
265
- height: 29px;
266
- border-radius: 4px;
267
- margin: 0;
268
- background-color: ${(props) => props.controlBackgroundColor};
269
- box-shadow:
270
- 0px 26px 103px rgba(0, 0, 0, 0.13),
271
- 0px 11px 18px rgba(0, 0, 0, 0.06),
272
- 0px 3px 6px rgba(0, 0, 0, 0.06);
273
- .maplibregl-ctrl-scale {
274
- background-color: ${(props) => props.controlBackgroundColor};
275
- color: ${(props) => props.controlForegroundColor};
276
- border: 2px solid ${(props) => props.controlForegroundColor};
277
- border-top: 0;
278
- border-left: 0;
279
- border-right: 0;
280
- padding: 0;
281
- margin: 6px 8px 8px 8px;
282
- line-height: 13px;
283
- letter-spacing: 0.02em;
284
- font-family: sans-serif;
285
- font-size: 10px;
286
- }
287
- }
288
- `;
289
- var PureMapContainer_default = PureMapContainer;
257
+ // esm-externals:@splunk/ui-utils/id
258
+ var id_exports = {};
259
+ __export(id_exports, {
260
+ default: () => id_default
261
+ });
262
+ var defaultImport19 = __toESM(require("@splunk/ui-utils/id"));
263
+ __reExport(id_exports, require("@splunk/ui-utils/id"));
264
+ var id_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
290
265
 
291
266
  // esm-externals:d3-scale
292
267
  var d3_scale_exports = {};
293
268
  __export(d3_scale_exports, {
294
269
  default: () => d3_scale_default
295
270
  });
296
- var defaultImport16 = __toESM(require("d3-scale"));
271
+ var defaultImport20 = __toESM(require("d3-scale"));
297
272
  __reExport(d3_scale_exports, require("d3-scale"));
298
- var d3_scale_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
273
+ var d3_scale_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
299
274
 
300
275
  // esm-externals:@splunk/visualization-color-palettes
301
276
  var visualization_color_palettes_exports = {};
302
277
  __export(visualization_color_palettes_exports, {
303
278
  default: () => visualization_color_palettes_default
304
279
  });
305
- var defaultImport17 = __toESM(require("@splunk/visualization-color-palettes"));
280
+ var defaultImport21 = __toESM(require("@splunk/visualization-color-palettes"));
306
281
  __reExport(visualization_color_palettes_exports, require("@splunk/visualization-color-palettes"));
307
- var visualization_color_palettes_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
282
+ var visualization_color_palettes_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
308
283
 
309
284
  // esm-externals:@splunk/visualization-encoding/utils/types
310
285
  var types_exports = {};
311
286
  __export(types_exports, {
312
287
  default: () => types_default
313
288
  });
314
- var defaultImport18 = __toESM(require("@splunk/visualization-encoding/utils/types"));
289
+ var defaultImport22 = __toESM(require("@splunk/visualization-encoding/utils/types"));
315
290
  __reExport(types_exports, require("@splunk/visualization-encoding/utils/types"));
316
- var types_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
291
+ var types_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
317
292
 
318
293
  // src/Map/PureMap/MapUtils.ts
319
294
  var MAX_LATITUDE = 90;
@@ -516,10 +491,11 @@ var sortByValuesField = (bubbleLayer) => {
516
491
  bubbleLayer.bubbleSize.unshift(bubbleLayer.bubbleSize.splice(index, 1)[0]);
517
492
  };
518
493
  var bakeBubbleData = (layer) => {
519
- var _a, _b, _c, _d;
520
- if (!((_a = layer == null ? void 0 : layer.bubbleSize) == null ? void 0 : _a.length) || !((_b = layer == null ? void 0 : layer.geobin) == null ? void 0 : _b.length) || !((_c = layer == null ? void 0 : layer.latitude) == null ? void 0 : _c.length) || !((_d = layer == null ? void 0 : layer.longitude) == null ? void 0 : _d.length)) {
494
+ var _a, _b, _c;
495
+ if (!((_a = layer == null ? void 0 : layer.bubbleSize) == null ? void 0 : _a.length) || !((_b = layer == null ? void 0 : layer.latitude) == null ? void 0 : _b.length) || !((_c = layer == null ? void 0 : layer.longitude) == null ? void 0 : _c.length)) {
521
496
  return null;
522
497
  }
498
+ const hasGeobinData = Array.isArray(layer.geobin) && layer.geobin.length > 0;
523
499
  const sanitizedBubbleSize = sanitizeValues(layer.bubbleSize);
524
500
  let transposedBubbleSize;
525
501
  let transposedSanitizedBubbleSize;
@@ -541,14 +517,14 @@ var bakeBubbleData = (layer) => {
541
517
  return null;
542
518
  }
543
519
  const data = layer.latitude.map((lat, i) => ({
544
- zoom: getZoomLevelFromGeobin(layer.geobin[i]),
520
+ zoom: hasGeobinData ? getZoomLevelFromGeobin(layer.geobin[i]) : null,
545
521
  values: transposedBubbleSize[i],
546
522
  sanitizedValues: transposedSanitizedBubbleSize[i],
547
523
  coordinates: [layer.longitude[i], lat],
548
524
  metadata: layer.metadata ? layer.metadata[i] : {}
549
525
  })).filter((d) => Boolean(d.values));
550
526
  let min = (0, lodash_exports.sum)(transposedSanitizedBubbleSize[0]);
551
- let max = (0, lodash_exports.sum)(transposedSanitizedBubbleSize[1]);
527
+ let max = min;
552
528
  transposedSanitizedBubbleSize.forEach((row) => {
553
529
  const bubbleSize = (0, lodash_exports.sum)(row);
554
530
  max = bubbleSize > max ? bubbleSize : max;
@@ -674,42 +650,6 @@ var formatMetadata = (choroplethLayer, i) => {
674
650
  }, base);
675
651
  };
676
652
 
677
- // esm-externals:@splunk/visualizations-shared/iconUtils
678
- var iconUtils_exports = {};
679
- __export(iconUtils_exports, {
680
- default: () => iconUtils_default
681
- });
682
- var defaultImport19 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
683
- __reExport(iconUtils_exports, require("@splunk/visualizations-shared/iconUtils"));
684
- var iconUtils_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
685
-
686
- // esm-externals:@splunk/visualizations-shared/RemoteIcon
687
- var RemoteIcon_exports = {};
688
- __export(RemoteIcon_exports, {
689
- default: () => RemoteIcon_default
690
- });
691
- var defaultImport20 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
692
- __reExport(RemoteIcon_exports, require("@splunk/visualizations-shared/RemoteIcon"));
693
- var RemoteIcon_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
694
-
695
- // esm-externals:@splunk/visualization-context/FeatureFlagContext
696
- var FeatureFlagContext_exports = {};
697
- __export(FeatureFlagContext_exports, {
698
- default: () => FeatureFlagContext_default
699
- });
700
- var defaultImport21 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
701
- __reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
702
- var FeatureFlagContext_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
703
-
704
- // esm-externals:@splunk/ui-utils/id
705
- var id_exports = {};
706
- __export(id_exports, {
707
- default: () => id_default
708
- });
709
- var defaultImport22 = __toESM(require("@splunk/ui-utils/id"));
710
- __reExport(id_exports, require("@splunk/ui-utils/id"));
711
- var id_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
712
-
713
653
  // esm-externals:@splunk/react-ui/Popover
714
654
  var Popover_exports = {};
715
655
  __export(Popover_exports, {
@@ -730,19 +670,24 @@ var themes_default = "default" in defaultImport24 ? defaultImport24.default : de
730
670
 
731
671
  // src/Map/PureMap/Tooltip.tsx
732
672
  var StyledPopover = styled_components_default(Popover_default)`
733
- width: 250px;
673
+ min-width: 250px;
674
+ max-width: 332px;
675
+ max-width: fit-content;
734
676
  font-size: 12px;
735
677
  `;
736
678
  var StyledTable = styled_components_default.table`
737
679
  margin: 2px 6px 2px 6px;
738
- table-layout: fixed;
739
680
  width: calc(100% - 12px);
740
681
  `;
741
682
  var StyledTitleColumn = styled_components_default.td`
742
683
  opacity: 0.85;
684
+ word-break: break-all;
685
+ vertical-align: top;
743
686
  `;
744
687
  var StyledValueColumn = styled_components_default.td`
745
688
  text-align: right;
689
+ word-break: break-all;
690
+ vertical-align: top;
746
691
  `;
747
692
  var StyledColorBlock = styled_components_default.div`
748
693
  background-color: ${(props) => props.color};
@@ -753,10 +698,6 @@ var StyledColorBlock = styled_components_default.div`
753
698
  height: 11px;
754
699
  transform: translateY(1px);
755
700
  `;
756
- var StyledFieldLabel = styled_components_default.span`
757
- display: inline-block;
758
- white-space: nowrap;
759
- `;
760
701
  var StyledIconWrapper = styled_components_default.span`
761
702
  margin-left: 4px;
762
703
  display: inline-block;
@@ -823,7 +764,7 @@ var Tooltip = ({
823
764
  "data-test": "map-marker-tooltip",
824
765
  defaultPlacement: "above"
825
766
  },
826
- /* @__PURE__ */ react_exports.createElement(StyledTable, null, tooltipHeader && /* @__PURE__ */ react_exports.createElement(StyledTooltipHeader, { "data-test": "tooltip-header" }, /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement("th", { colSpan: 2 }, /* @__PURE__ */ react_exports.createElement("span", { "data-test": "tooltip-header-value" }, tooltipHeader)))), /* @__PURE__ */ react_exports.createElement("tbody", null, areaId && areaValue && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "area-id" }, areaId), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "area-value" }, areaValue)), Boolean(showCoordinates && latitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Latitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "latitude" }, convertDegToDMS(latitude, "latitude"))), Boolean(showCoordinates && longitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Longitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "longitude" }, convertDegToDMS(longitude, "longitude"))), additionalFields.filter(({ value }) => value && String(value) !== "0").map(({ name, value, color, icon }) => /* @__PURE__ */ react_exports.createElement("tr", { key: (0, id_exports.createDOMID)() }, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "field-title" }, color ? /* @__PURE__ */ react_exports.createElement(StyledColorBlock, { "data-test": "field-color", color }) : null, /* @__PURE__ */ react_exports.createElement(StyledFieldLabel, null, name, isTooltipIconFlagEnabled && icon && ((0, iconUtils_exports.isRemoteIcon)(icon) || (0, iconUtils_exports.isDataURI)(icon)) ? /* @__PURE__ */ react_exports.createElement(StyledIconWrapper, { "data-test": "field-icon" }, /* @__PURE__ */ react_exports.createElement(RemoteIcon_default, { iconURL: icon, width: 16, height: 16 })) : null)), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "field-value" }, value)))))
767
+ /* @__PURE__ */ react_exports.createElement(StyledTable, null, tooltipHeader && /* @__PURE__ */ react_exports.createElement(StyledTooltipHeader, { "data-test": "tooltip-header" }, /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement("th", { colSpan: 2 }, /* @__PURE__ */ react_exports.createElement("span", { "data-test": "tooltip-header-value" }, tooltipHeader)))), /* @__PURE__ */ react_exports.createElement("tbody", null, Boolean(areaId && areaValue) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "area-id" }, areaId), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "area-value" }, areaValue)), Boolean(showCoordinates && latitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Latitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "latitude" }, convertDegToDMS(latitude, "latitude"))), Boolean(showCoordinates && longitude) && /* @__PURE__ */ react_exports.createElement("tr", null, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, null, (0, i18n_exports._)("Longitude")), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "longitude" }, convertDegToDMS(longitude, "longitude"))), additionalFields.filter(({ value }) => value && String(value) !== "0").map(({ name, value, color, icon }) => /* @__PURE__ */ react_exports.createElement("tr", { key: (0, id_exports.createDOMID)() }, /* @__PURE__ */ react_exports.createElement(StyledTitleColumn, { "data-test": "field-title" }, color ? /* @__PURE__ */ react_exports.createElement(StyledColorBlock, { "data-test": "field-color", color }) : null, /* @__PURE__ */ react_exports.createElement("span", null, name, isTooltipIconFlagEnabled && icon && ((0, iconUtils_exports.isRemoteIcon)(icon) || (0, iconUtils_exports.isDataURI)(icon)) ? /* @__PURE__ */ react_exports.createElement(StyledIconWrapper, { "data-test": "field-icon" }, /* @__PURE__ */ react_exports.createElement(RemoteIcon_default, { iconURL: icon, width: 16, height: 16 })) : null)), /* @__PURE__ */ react_exports.createElement(StyledValueColumn, { "data-test": "field-value" }, value)))))
827
768
  );
828
769
  };
829
770
  var Tooltip_default = Tooltip;
@@ -939,8 +880,9 @@ var PieSegment = react_exports.memo(
939
880
  );
940
881
  if (end - start === 1) {
941
882
  return /* @__PURE__ */ react_exports.createElement(
942
- "circle",
883
+ BubbleSegment,
943
884
  {
885
+ as: "circle",
944
886
  onClick: handleSegmentClick,
945
887
  cx: radius,
946
888
  cy: radius,
@@ -960,8 +902,9 @@ var PieSegment = react_exports.memo(
960
902
  const y1 = Math.sin(a1);
961
903
  const arc = end - start > 0.5 ? 1 : 0;
962
904
  return /* @__PURE__ */ react_exports.createElement(
963
- "path",
905
+ BubbleSegment,
964
906
  {
907
+ as: "path",
965
908
  onClick: handleSegmentClick,
966
909
  d: `M ${radius} ${radius} L ${radius + radius * x0} ${radius + radius * y0} A ${radius} ${radius} 0 ${arc} 1 ${radius + radius * x1} ${radius + radius * y1} L ${radius} ${radius} A 0 0 0 ${arc} 0 ${radius} ${radius}`,
967
910
  fill: color,
@@ -974,6 +917,14 @@ var PieSegment = react_exports.memo(
974
917
  }
975
918
  );
976
919
  PieSegment.displayName = "MapBubblePieSegment";
920
+ var BubbleSegment = styled_components_default.path`
921
+ transition: 0.2s ease-in-out;
922
+ transition-property: fill, stroke;
923
+ `;
924
+ var BUBBLE_SEGMENT_DIMMED_STYLES = {
925
+ fill: "rgba(150, 150, 150, 0.3)",
926
+ stroke: "rgba(200, 200, 200, 0.4)"
927
+ };
977
928
  var StyledMarkerWrapper = styled_components_default(MarkerWrapper_default)`
978
929
  cursor: pointer;
979
930
  `;
@@ -1104,7 +1055,8 @@ var BubbleLayer = (props) => {
1104
1055
  const dynamicColors = bubbleLayer.dataColors;
1105
1056
  const dataToRender = react_exports.useMemo(
1106
1057
  () => data.reduce((acc, datum, i) => {
1107
- if (datum.zoom === roundedZoom) {
1058
+ const shouldRender = datum.zoom === null || datum.zoom === void 0 || datum.zoom === roundedZoom;
1059
+ if (shouldRender) {
1108
1060
  acc.push({ data: datum, idx: i });
1109
1061
  }
1110
1062
  return acc;
@@ -1172,6 +1124,92 @@ var BubbleLayer = (props) => {
1172
1124
  };
1173
1125
  var BubbleLayer_default = BubbleLayer;
1174
1126
 
1127
+ // src/Map/PureMap/PureMapContainer.tsx
1128
+ var PureMapContainer = styled_components_default.div.attrs({
1129
+ "data-test": "puremap-container"
1130
+ })`
1131
+ ${maplibre_gl_default2}
1132
+ overflow: hidden;
1133
+ position: relative;
1134
+ z-index: 0;
1135
+ background-color: ${(props) => props.backgroundColor};
1136
+ ${(props) => (0, style_exports.toDimension)((0, lodash_exports.pick)(props, ["width", "height"]))};
1137
+
1138
+ // keep zoom control on top of cooperative gesture layer
1139
+ .maplibregl-cooperative-gesture-screen {
1140
+ z-index: 0;
1141
+ }
1142
+
1143
+ // overwrite maplibregl zoom control styles
1144
+ .maplibregl-ctrl-top-left {
1145
+ display: ${(props) => props.showZoomControls ? "block" : "none"};
1146
+ position: absolute;
1147
+ top: 12px;
1148
+ left: 16px;
1149
+ .maplibregl-ctrl-group {
1150
+ width: 40px !important;
1151
+ height: 87px !important;
1152
+ border-radius: 4px;
1153
+ margin: 8px 0px;
1154
+ background-color: ${(props) => props.controlBackgroundColor};
1155
+ box-shadow:
1156
+ 0px 26px 103px rgba(0, 0, 0, 0.64),
1157
+ 0px 11px 18px rgba(0, 0, 0, 0.32),
1158
+ 0px 3px 6px rgba(0, 0, 0, 0.3);
1159
+ & button {
1160
+ width: 40px;
1161
+ height: 43px;
1162
+ border-top: 0;
1163
+ }
1164
+ .maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
1165
+ background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M9 1C9 0.447715 8.55229 0 8 0C7.44772 0 7 0.447715 7 1V7H1C0.447715 7 0 7.44772 0 8C0 8.55229 0.447715 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55229 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55229 16 8C16 7.44772 15.5523 7 15 7H9V1Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
1166
+ }
1167
+
1168
+ .maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
1169
+ background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="14" height="3" viewBox="0 0 14 3" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 1.99707C0 1.44479 0.447715 0.99707 1 0.99707H13C13.5523 0.99707 14 1.44479 14 1.99707C14 2.54936 13.5523 2.99707 13 2.99707H1C0.447715 2.99707 0 2.54936 0 1.99707Z" fill="${(props) => props.controlIconColorEncoded.color}" fill-opacity="${(props) => props.controlIconColorEncoded.opacity}" /></svg>');
1170
+ }
1171
+ }
1172
+ }
1173
+
1174
+ // overwrite maplibregl scale styles
1175
+ .maplibregl-ctrl-bottom-left {
1176
+ display: ${(props) => props.showScale ? "block" : "none"};
1177
+ position: absolute;
1178
+ z-index: 0;
1179
+ bottom: 16px;
1180
+ left: 12px;
1181
+ width: 86px;
1182
+ height: 29px;
1183
+ border-radius: 4px;
1184
+ margin: 0;
1185
+ background-color: ${(props) => props.controlBackgroundColor};
1186
+ box-shadow:
1187
+ 0px 26px 103px rgba(0, 0, 0, 0.13),
1188
+ 0px 11px 18px rgba(0, 0, 0, 0.06),
1189
+ 0px 3px 6px rgba(0, 0, 0, 0.06);
1190
+ .maplibregl-ctrl-scale {
1191
+ background-color: ${(props) => props.controlBackgroundColor};
1192
+ color: ${(props) => props.controlForegroundColor};
1193
+ border: 2px solid ${(props) => props.controlForegroundColor};
1194
+ border-top: 0;
1195
+ border-left: 0;
1196
+ border-right: 0;
1197
+ padding: 0;
1198
+ margin: 6px 8px 8px 8px;
1199
+ line-height: 13px;
1200
+ letter-spacing: 0.02em;
1201
+ font-family: sans-serif;
1202
+ font-size: 10px;
1203
+ }
1204
+ }
1205
+
1206
+ :has(${BubbleSegment}:hover) ${BubbleSegment}:not(:hover) {
1207
+ fill: ${BUBBLE_SEGMENT_DIMMED_STYLES.fill};
1208
+ stroke: ${BUBBLE_SEGMENT_DIMMED_STYLES.stroke};
1209
+ }
1210
+ `;
1211
+ var PureMapContainer_default = PureMapContainer;
1212
+
1175
1213
  // src/Map/PureMap/MarkerLayer.tsx
1176
1214
  var MarkerIcon = (_a) => {
1177
1215
  var _b = _a, { theme, color } = _b, otherProps = __objRest(_b, ["theme", "color"]);
@@ -1319,7 +1357,7 @@ var ClusterLayer = ({
1319
1357
  }
1320
1358
  );
1321
1359
  }
1322
- if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Bubble && "geobin" in clusterLayer && "bubbleSize" in clusterLayer) {
1360
+ if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Bubble && Array.isArray(clusterLayer.bubbleSize)) {
1323
1361
  return /* @__PURE__ */ react_exports.createElement(
1324
1362
  BubbleLayer_default,
1325
1363
  {
@@ -1579,17 +1617,29 @@ var LocalChoroplethLayer = (props) => {
1579
1617
  message: ""
1580
1618
  });
1581
1619
  react_exports.useEffect(() => {
1582
- let geoJsonData;
1620
+ let isMounted = true;
1583
1621
  const geoRegistry = GeoRegistry_default.create();
1584
1622
  geoRegistry.addDefaultProvider(new GeoJsonProvider_default());
1585
- try {
1586
- geoJsonData = geoRegistry.getByURL(choroplethLayer.source);
1587
- setGeoJson(geoJsonData);
1588
- setValidGeoJson(true);
1589
- } catch (e) {
1590
- setGeoJsonError(e);
1591
- setValidGeoJson(false);
1592
- }
1623
+ const loadGeoJson = () => __async(void 0, null, function* () {
1624
+ try {
1625
+ const geoJsonData = yield geoRegistry.getByURL(choroplethLayer.source);
1626
+ if (!isMounted) {
1627
+ return;
1628
+ }
1629
+ setGeoJson(geoJsonData);
1630
+ setValidGeoJson(true);
1631
+ } catch (e) {
1632
+ if (!isMounted) {
1633
+ return;
1634
+ }
1635
+ setGeoJsonError(e);
1636
+ setValidGeoJson(false);
1637
+ }
1638
+ });
1639
+ loadGeoJson();
1640
+ return () => {
1641
+ isMounted = false;
1642
+ };
1593
1643
  }, [choroplethLayer.source]);
1594
1644
  const updatedPropertyFormat = react_exports.useMemo(() => {
1595
1645
  let propertyFormat = "name";
@@ -1714,7 +1764,7 @@ var StyledFitToDataButton = styled_components_default(Button_default).attrs({
1714
1764
  "data-test": "fit-to-data-button"
1715
1765
  })`
1716
1766
  position: absolute;
1717
- top: 115px;
1767
+ top: ${(props) => props.showZoomControls ? "115px" : "12px"};
1718
1768
  left: 16px;
1719
1769
  z-index: 3;
1720
1770
  width: 40px !important;
@@ -1760,6 +1810,8 @@ var PureMap = (props) => {
1760
1810
  const scaleControl = (0, react_exports.useRef)(null);
1761
1811
  const zoomControl = (0, react_exports.useRef)(null);
1762
1812
  const fitToDataButtonClickedRef = (0, react_exports.useRef)(false);
1813
+ const isUserInteractingRef = (0, react_exports.useRef)(false);
1814
+ const [hasUserPanned, setHasUserPanned] = react_exports.useState(false);
1763
1815
  const { tilePreset, defaultTileLight, defaultTileDark } = (0, react_exports.useMemo)(
1764
1816
  () => getTilePreset({ defaultTileConfig, customTileConfig }),
1765
1817
  [defaultTileConfig, customTileConfig]
@@ -1800,6 +1852,9 @@ var PureMap = (props) => {
1800
1852
  [onOptionsChange]
1801
1853
  );
1802
1854
  const fitMapToContent = (0, react_exports.useCallback)(() => {
1855
+ if (!layers[0] || !map.current) {
1856
+ return;
1857
+ }
1803
1858
  const lngLatBounds = getGlobalLayerBoundaries([layers[0]]);
1804
1859
  map.current.fitBounds(
1805
1860
  lngLatBounds,
@@ -1843,7 +1898,7 @@ var PureMap = (props) => {
1843
1898
  map.current.on("load", () => {
1844
1899
  if ((layers == null ? void 0 : layers.length) > 0 && center === void 0 && zoom === void 0) {
1845
1900
  setMapMinZoom(map.current.getZoom());
1846
- map.current.on("zoomend", () => {
1901
+ map.current.once("zoomend", () => {
1847
1902
  addZoomEndEventListener();
1848
1903
  });
1849
1904
  fitMapToContent();
@@ -1861,6 +1916,14 @@ var PureMap = (props) => {
1861
1916
  }
1862
1917
  }, 500);
1863
1918
  });
1919
+ map.current.on("dragstart", () => {
1920
+ setHasUserPanned(true);
1921
+ });
1922
+ map.current.on("zoomstart", (e) => {
1923
+ if (e.originalEvent) {
1924
+ setHasUserPanned(true);
1925
+ }
1926
+ });
1864
1927
  map.current.on("dragend", () => {
1865
1928
  const newCenter = map.current.getCenter();
1866
1929
  onOptionsChangeProxy({
@@ -1868,6 +1931,26 @@ var PureMap = (props) => {
1868
1931
  zoom: map.current.getZoom()
1869
1932
  });
1870
1933
  });
1934
+ map.current.on("dragstart", () => {
1935
+ isUserInteractingRef.current = true;
1936
+ });
1937
+ map.current.on("dragend", () => {
1938
+ setTimeout(() => {
1939
+ if (isUserInteractingRef) {
1940
+ isUserInteractingRef.current = false;
1941
+ }
1942
+ }, 100);
1943
+ });
1944
+ map.current.on("zoomstart", () => {
1945
+ isUserInteractingRef.current = true;
1946
+ });
1947
+ map.current.on("zoomend", () => {
1948
+ setTimeout(() => {
1949
+ if (isUserInteractingRef) {
1950
+ isUserInteractingRef.current = false;
1951
+ }
1952
+ }, 100);
1953
+ });
1871
1954
  map.current.on("resize", () => {
1872
1955
  const mapZoomLevel = map.current.getZoom();
1873
1956
  if (currentZoomLevelRef.current <= mapMinZoomRef.current && mapZoomLevel !== mapMinZoomRef.current) {
@@ -1963,6 +2046,9 @@ var PureMap = (props) => {
1963
2046
  if (fitToDataButtonClickedRef.current) {
1964
2047
  return;
1965
2048
  }
2049
+ if (isUserInteractingRef.current) {
2050
+ return;
2051
+ }
1966
2052
  map.current.flyTo({
1967
2053
  center: lngLatCenter,
1968
2054
  // Make sure we are not flying to a zoom value smaller than the mapMinZoom
@@ -1994,12 +2080,23 @@ var PureMap = (props) => {
1994
2080
  center
1995
2081
  ]);
1996
2082
  const showResetButton = (0, react_exports.useCallback)(() => {
1997
- return center !== void 0 || zoom !== void 0;
1998
- }, [center, zoom]);
2083
+ return center !== void 0 || zoom !== void 0 || hasUserPanned;
2084
+ }, [center, zoom, hasUserPanned]);
1999
2085
  const handleResetClick = (0, react_exports.useCallback)(() => {
2000
2086
  fitToDataButtonClickedRef.current = true;
2087
+ setHasUserPanned(false);
2088
+ if (map.current) {
2089
+ if (center !== void 0 && zoom !== void 0) {
2090
+ map.current.jumpTo({
2091
+ center: lngLatCenter,
2092
+ zoom: Math.max(zoomLevel, mapMinZoomRef.current)
2093
+ });
2094
+ } else {
2095
+ fitMapToContent();
2096
+ }
2097
+ }
2001
2098
  onOptionsChangeProxy({ center: void 0, zoom: void 0 });
2002
- }, [onOptionsChangeProxy]);
2099
+ }, [onOptionsChangeProxy, fitMapToContent, center, zoom, lngLatCenter, zoomLevel]);
2003
2100
  return /* @__PURE__ */ react_exports.createElement(
2004
2101
  PureMapContainer_default,
2005
2102
  {
@@ -2022,7 +2119,8 @@ var PureMap = (props) => {
2022
2119
  title: (0, i18n_exports._)("Fit to data"),
2023
2120
  controlBackgroundColor,
2024
2121
  controlForegroundColor,
2025
- controlIconColorEncoded: formatColor(controlForegroundColor)
2122
+ controlIconColorEncoded: formatColor(controlForegroundColor),
2123
+ showZoomControls
2026
2124
  }
2027
2125
  ),
2028
2126
  isMapLoaded && layer && (layer.type === visualization_schemas_exports.LAYER_TYPE.Bubble || layer.type === visualization_schemas_exports.LAYER_TYPE.Marker) && /* @__PURE__ */ react_exports.createElement(
@@ -2641,7 +2739,6 @@ var editorConfig = [
2641
2739
  }
2642
2740
  }
2643
2741
  ],
2644
- // TODO: add support for seriesColorsByField option
2645
2742
  // [
2646
2743
  // {
2647
2744
  // label: _('Series colors by field name'),
@@ -3035,7 +3132,7 @@ var Cover = styled_components_default.div`
3035
3132
  bottom: 0;
3036
3133
  `;
3037
3134
  var Blocker = styled_components_default.div.attrs({
3038
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b"
3135
+ "data-splunk-visualization-version": "28.5.0 - b192418b7"
3039
3136
  })`
3040
3137
  position: relative;
3041
3138
  width: 100%;
@@ -3107,7 +3204,7 @@ var withFixedSizeContainer = (Viz) => {
3107
3204
  FixSizeItem,
3108
3205
  {
3109
3206
  "data-test": "fix-size-item",
3110
- "data-splunk-visualization-version": "28.3.0 - 843e0f60b",
3207
+ "data-splunk-visualization-version": "28.5.0 - b192418b7",
3111
3208
  width,
3112
3209
  height,
3113
3210
  backgroundColor
@@ -3209,7 +3306,7 @@ var convertToArrOfObjects = (columns, fields) => {
3209
3306
  for (let i = 0; i < columns[0].length; i += 1) {
3210
3307
  const newObj = {};
3211
3308
  fields.forEach((field, index) => {
3212
- const fieldName = typeof field === "string" ? field : field.name;
3309
+ const fieldName = getFieldName(field);
3213
3310
  if (columns[index][i] === "") {
3214
3311
  newObj[fieldName] = null;
3215
3312
  } else {
@@ -3220,6 +3317,7 @@ var convertToArrOfObjects = (columns, fields) => {
3220
3317
  }
3221
3318
  return data;
3222
3319
  };
3320
+ var getFieldName = (field) => typeof field === "string" ? field : field.name;
3223
3321
  var largestTriangleThreeBuckets = (data, threshold, preferredDownsampleIndices) => {
3224
3322
  const dataLength = data.length;
3225
3323
  const downsampledIndices = [];
@@ -3336,9 +3434,9 @@ var tryToCoerceAllDisplayedFields = (ds, xField, yFields, fieldTypes, options) =
3336
3434
  let xColumn = [];
3337
3435
  const yColumns = [];
3338
3436
  const canDownsample = !ds.data.fields.some((field, index) => {
3339
- var _a, _b;
3340
- const fieldName = (_a = field.name) != null ? _a : field;
3341
- const fieldType = (_b = fieldTypes[index]) != null ? _b : "unknown";
3437
+ var _a;
3438
+ const fieldName = getFieldName(field);
3439
+ const fieldType = (_a = fieldTypes[index]) != null ? _a : "unknown";
3342
3440
  const column = ds.data.columns[index];
3343
3441
  let hasDisplayedColumnThatCantBeDownsampled = false;
3344
3442
  if (fieldName === xField) {
@@ -3691,6 +3789,16 @@ var triangleEventAnnotationRenderer = ({
3691
3789
  eventColor: eventWithColor.color
3692
3790
  });
3693
3791
  };
3792
+ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
3793
+ const rangeSelectEventHandler = eventHandlers.find(
3794
+ (eventHandler) => {
3795
+ var _a;
3796
+ return (_a = eventHandler.options.events) == null ? void 0 : _a.includes("range.select");
3797
+ }
3798
+ );
3799
+ const xAxisIsTime = xField === "_time";
3800
+ return !!rangeSelectEventHandler && xAxisIsTime;
3801
+ };
3694
3802
  var canvasSupportedTimeSeriesCharts = ["splunk.line"];
3695
3803
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
3696
3804
  return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
@@ -3711,17 +3819,34 @@ var filterChartDataFromInternalFields = (chartData) => {
3711
3819
  var convert2DArrayToNumbers = (arr) => {
3712
3820
  return arr.map((subArray) => subArray.map((element) => parseFloat(element)));
3713
3821
  };
3714
- var SideLegendWidth = 75;
3715
- var commonLegendProps = { center: true, fontSize: 12, largerTiles: true, hideSeriesValue: true };
3822
+ var parseAxisValue = (val) => {
3823
+ if (val === void 0 || val === null || val === "auto" || val === "") {
3824
+ return void 0;
3825
+ }
3826
+ const num = typeof val === "number" ? val : Number.parseFloat(val);
3827
+ return Number.isNaN(num) ? void 0 : num;
3828
+ };
3829
+ var parseXAxisLineVisibility = (visibility) => {
3830
+ if (visibility === "hide") return false;
3831
+ if (visibility === "show") return true;
3832
+ return void 0;
3833
+ };
3716
3834
  var getLegend = (props) => {
3717
3835
  const legendPlacement = props == null ? void 0 : props.legendDisplay;
3836
+ const { isSeriesCompare, legendTruncation } = props;
3837
+ const commonLegendProps = {
3838
+ center: true,
3839
+ fontSize: 12,
3840
+ largerTiles: true,
3841
+ hideSeriesValue: !isSeriesCompare,
3842
+ // Show values if in seriesCompare mode
3843
+ legendTruncation
3844
+ };
3718
3845
  switch (legendPlacement) {
3719
3846
  case "off":
3720
3847
  return false;
3721
3848
  case "left":
3722
- return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({
3723
- width: SideLegendWidth
3724
- }, commonLegendProps));
3849
+ return (0, visualization_canvas_exports.LeftLegendFactory)(__spreadValues({}, commonLegendProps));
3725
3850
  case "bottom":
3726
3851
  return (0, visualization_canvas_exports.BottomLegendFactory)(__spreadValues({
3727
3852
  wrap: true
@@ -3731,9 +3856,7 @@ var getLegend = (props) => {
3731
3856
  wrap: true
3732
3857
  }, commonLegendProps));
3733
3858
  default:
3734
- return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({
3735
- width: SideLegendWidth
3736
- }, commonLegendProps));
3859
+ return (0, visualization_canvas_exports.SideLegendFactory)(__spreadValues({}, commonLegendProps));
3737
3860
  }
3738
3861
  };
3739
3862
  var getComputedAxisTitles = (inputAxisTitle, fields, axisTitleVisibility) => {
@@ -3768,22 +3891,25 @@ var ellipsisAxisTitle = (axisTitle, containerSpacing, fontSize = 12) => {
3768
3891
  const end = axisTitle.slice(-halfChars);
3769
3892
  return `${start}...${end}`;
3770
3893
  };
3771
- var getFieldName = (field) => {
3894
+ var getFieldName2 = (field) => {
3772
3895
  const fieldName = typeof field === "object" ? field == null ? void 0 : field.name : field;
3773
3896
  return fieldName;
3774
3897
  };
3775
3898
  var getFieldNames = (fields) => {
3776
- return fields.map((field) => getFieldName(field));
3899
+ return fields.map((field) => getFieldName2(field));
3777
3900
  };
3778
- var getXScaleConfig = (label, xAxisLabelVisibility) => {
3901
+ var getXScaleConfig = (label, xAxisLabelVisibility, xAxisLabelRotation) => {
3779
3902
  const xConfig = { x: {} };
3780
3903
  xConfig.x.label = label;
3781
3904
  if (xAxisLabelVisibility === "hide") {
3782
3905
  xConfig.x.hideLabels = true;
3783
3906
  }
3907
+ if (xAxisLabelRotation !== void 0) {
3908
+ xConfig.x.labelRotation = xAxisLabelRotation;
3909
+ }
3784
3910
  return xConfig;
3785
3911
  };
3786
- var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility) => {
3912
+ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax) => {
3787
3913
  const scaleType = yAxisScale != null ? yAxisScale : "linear";
3788
3914
  const yConfig = { y: {} };
3789
3915
  yConfig.y.label = label;
@@ -3791,34 +3917,46 @@ var getYScaleConfig = (label, yAxisAbbreviation, yAxisScale, yAxisLabelVisibilit
3791
3917
  if (yAxisAbbreviation !== "none") {
3792
3918
  yConfig.y.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1);
3793
3919
  }
3794
- if (yAxisAbbreviation === "none") {
3795
- yConfig.y.width = 55;
3796
- } else {
3920
+ if (yAxisAbbreviation !== "none") {
3797
3921
  yConfig.y.width = label && label.length > 0 ? 30 : 10;
3798
3922
  }
3799
3923
  if (yAxisLabelVisibility === "hide") {
3800
3924
  yConfig.y.hideLabels = true;
3801
3925
  }
3926
+ if (yAxisMin !== void 0 || yAxisMax !== void 0) {
3927
+ yConfig.y.range = (u, dataMin, dataMax) => {
3928
+ const min = yAxisMin != null ? yAxisMin : dataMin;
3929
+ const max = yAxisMax != null ? yAxisMax : dataMax;
3930
+ return [min, max];
3931
+ };
3932
+ }
3802
3933
  return yConfig;
3803
3934
  };
3804
- var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility) => {
3935
+ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInteger, y2AxisLabelVisibility, y2AxisMin, y2AxisMax) => {
3805
3936
  const y2Config = { y2: {} };
3806
3937
  const scaleType = axisScale != null ? axisScale : "linear";
3807
3938
  y2Config.y2.label = label;
3808
3939
  y2Config.y2.side = "right";
3809
- y2Config.y2.showGrid = false;
3810
3940
  y2Config.y2.type = scaleType;
3811
3941
  if (axisAbbreviation !== "none") {
3812
3942
  y2Config.y2.tickFmt = (v) => (0, visualization_canvas_exports.shortenNumber)(v, 1, roundAxisLabelsToInteger);
3943
+ y2Config.y2.width = label && label.length > 0 ? 50 : 10;
3813
3944
  } else if (roundAxisLabelsToInteger) {
3814
3945
  y2Config.y2.tickFmt = (v) => roundAxisLabelsToInteger ? Math.round(v).toString() : v.toString();
3815
3946
  }
3816
3947
  if (y2AxisLabelVisibility === "hide") {
3817
3948
  y2Config.y2.hideLabels = true;
3818
3949
  }
3950
+ if (y2AxisMin !== void 0 || y2AxisMax !== void 0) {
3951
+ y2Config.y2.range = (u, dataMin, dataMax) => {
3952
+ const min = y2AxisMin != null ? y2AxisMin : dataMin;
3953
+ const max = y2AxisMax != null ? y2AxisMax : dataMax;
3954
+ return [min, max];
3955
+ };
3956
+ }
3819
3957
  return y2Config;
3820
3958
  };
3821
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay) => {
3959
+ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
3822
3960
  const seriesConfig = {};
3823
3961
  let spanGaps;
3824
3962
  let replaceNullsWithZero;
@@ -3845,6 +3983,8 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
3845
3983
  );
3846
3984
  if (shouldAssignToY2) {
3847
3985
  seriesConfig[field].overrides.scale = "y2";
3986
+ } else {
3987
+ seriesConfig[field].overrides.scale = "y";
3848
3988
  }
3849
3989
  }
3850
3990
  if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
@@ -3853,12 +3993,92 @@ var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled
3853
3993
  if (markerDisplay !== void 0) {
3854
3994
  seriesConfig[field].markerDisplay = markerDisplay;
3855
3995
  }
3996
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
3997
+ if (fieldDashStyle) {
3998
+ seriesConfig[field].lineDashStyle = fieldDashStyle;
3999
+ }
4000
+ const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
4001
+ const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
4002
+ if (fieldStepPosition && fieldStepPosition !== "off") {
4003
+ seriesConfig[field].stepPosition = fieldStepPosition;
4004
+ }
3856
4005
  if (replaceNullsWithZero !== void 0) {
3857
4006
  seriesConfig[field].replaceNullsWithZero = replaceNullsWithZero;
3858
4007
  }
3859
4008
  });
3860
4009
  return seriesConfig;
3861
4010
  };
4011
+ var findRangeIndices = (xData, startValue, endValue) => {
4012
+ let startXIndex = -1;
4013
+ let endXIndex = -1;
4014
+ const xDataEpoch = xData.map((val) => {
4015
+ if (typeof val === "string") {
4016
+ return new Date(val).getTime() / 1e3;
4017
+ }
4018
+ return val;
4019
+ });
4020
+ for (let i = 0; i < xDataEpoch.length; i += 1) {
4021
+ if (xDataEpoch[i] >= startValue) {
4022
+ startXIndex = i;
4023
+ break;
4024
+ }
4025
+ }
4026
+ if (startXIndex === -1 && xDataEpoch.length > 0) {
4027
+ startXIndex = xDataEpoch.length - 1;
4028
+ }
4029
+ for (let i = xDataEpoch.length - 1; i >= 0; i -= 1) {
4030
+ if (xDataEpoch[i] <= endValue) {
4031
+ endXIndex = i;
4032
+ break;
4033
+ }
4034
+ }
4035
+ if (endXIndex === -1 && xDataEpoch.length > 0) {
4036
+ endXIndex = 0;
4037
+ }
4038
+ return { startXIndex, endXIndex };
4039
+ };
4040
+
4041
+ // src/common/hooks/useTrellisEnabled.ts
4042
+ var useTrellisFeatureFlagOn = () => {
4043
+ const context = (0, react_exports.useContext)(FeatureFlagContext_default);
4044
+ return Boolean(context == null ? void 0 : context.visualizations_enableTrellis);
4045
+ };
4046
+ var useTrellisEnabled = (layoutType = visualization_schemas_exports.LAYOUT_TYPE.Off) => {
4047
+ const trellisFeatureEnabled = useTrellisFeatureFlagOn();
4048
+ return trellisFeatureEnabled && layoutType === visualization_schemas_exports.LAYOUT_TYPE.Trellis;
4049
+ };
4050
+
4051
+ // src/common/components/TrellisTitle.tsx
4052
+ var TRELLIS_TITLE_HEIGHT = 28;
4053
+ var TrellisTitleText = styled_components_default.div`
4054
+ margin-left: 10px;
4055
+ margin-right: 10px;
4056
+ padding-top: 8px;
4057
+ text-overflow: ellipsis;
4058
+ white-space: nowrap;
4059
+ overflow: hidden;
4060
+ `;
4061
+ var TrellisTitleDiv = styled_components_default.div`
4062
+ height: ${TRELLIS_TITLE_HEIGHT}px;
4063
+ font-size: 14px;
4064
+ font-weight: 700;
4065
+ color: ${(props) => props.fontColor};
4066
+ background-color: ${(props) => props.backgroundColor};
4067
+ 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.
4068
+ `;
4069
+ var TrellisTitle = (props) => {
4070
+ const titleText = String(props.trellisKey).toString();
4071
+ return /* @__PURE__ */ react_exports.createElement(
4072
+ TrellisTitleDiv,
4073
+ {
4074
+ fontColor: props.fontColor,
4075
+ backgroundColor: props.backgroundColor,
4076
+ "data-test": "trellis-title",
4077
+ title: titleText
4078
+ },
4079
+ /* @__PURE__ */ react_exports.createElement(TrellisTitleText, null, titleText)
4080
+ );
4081
+ };
3862
4082
 
3863
4083
  // src/common/TimeSeriesChartWrapper.tsx
3864
4084
  var TimeSeriesChartContainer = styled_components_default.div`
@@ -3869,38 +4089,123 @@ var TimeSeriesChartContainer = styled_components_default.div`
3869
4089
  position: absolute !important; // This is needed for canvas element export pdf/png to work correctly
3870
4090
  }
3871
4091
  `;
3872
- var handleClick = (chartEvent, onClick) => {
4092
+ var appendTrellisToPayload = (payload, trellisKey, trellisSplitBy) => {
4093
+ const result = __spreadValues({}, payload);
4094
+ if (trellisSplitBy) {
4095
+ result["trellis.name"] = trellisSplitBy;
4096
+ }
4097
+ if (trellisKey) {
4098
+ result["trellis.value"] = trellisKey;
4099
+ }
4100
+ return result;
4101
+ };
4102
+ var hasMouseoverPayloadChanged = (currentPayload, previousPayload) => {
4103
+ if (!previousPayload) {
4104
+ return true;
4105
+ }
4106
+ if (currentPayload.index !== previousPayload.index) {
4107
+ return true;
4108
+ }
4109
+ if (currentPayload.seriesIndex !== previousPayload.seriesIndex) {
4110
+ return true;
4111
+ }
4112
+ if (currentPayload["trellis.name"] !== previousPayload["trellis.name"]) {
4113
+ return true;
4114
+ }
4115
+ if (currentPayload["trellis.value"] !== previousPayload["trellis.value"]) {
4116
+ return true;
4117
+ }
4118
+ return false;
4119
+ };
4120
+ var handleClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
3873
4121
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(chartEvent, "value", "seriesKey")), {
3874
4122
  name: chartEvent.seriesKey
3875
4123
  });
3876
4124
  delete payload.seriesKey;
3877
4125
  if (chartEvent.rowContext) {
3878
- Object.keys(chartEvent.rowContext).forEach((fieldName) => {
3879
- payload[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
3880
- });
4126
+ Object.assign(
4127
+ payload,
4128
+ Object.keys(chartEvent.rowContext).reduce((acc, fieldName) => {
4129
+ acc[`row.${fieldName}.value`] = chartEvent.rowContext[fieldName];
4130
+ return acc;
4131
+ }, {})
4132
+ );
3881
4133
  }
4134
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
3882
4135
  if (onClick) {
3883
4136
  onClick({
3884
4137
  type: "point.click",
3885
4138
  originalEvent: chartEvent,
3886
- payload
4139
+ payload: updatedPayload
3887
4140
  });
3888
4141
  }
3889
4142
  };
3890
- var handleLegendClick = (chartEvent, onClick) => {
4143
+ var handleLegendClick = (chartEvent, onClick, trellisKey, trellisSplitBy) => {
3891
4144
  const payload = {
3892
4145
  name: chartEvent
3893
4146
  };
4147
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
3894
4148
  if (onClick) {
3895
4149
  onClick({
3896
4150
  type: "legend.click",
3897
4151
  originalEvent: chartEvent,
3898
- payload
4152
+ payload: updatedPayload
4153
+ });
4154
+ }
4155
+ };
4156
+ var handleRangeSelection = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
4157
+ var _a;
4158
+ if (!rangeEvent) {
4159
+ return;
4160
+ }
4161
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
4162
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
4163
+ const payload = {
4164
+ startXIndex,
4165
+ startXValue: rangeEvent.start,
4166
+ endXIndex,
4167
+ endXValue: rangeEvent.end
4168
+ };
4169
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
4170
+ if (onSelect) {
4171
+ onSelect({
4172
+ type: "range.selectBeforeZoom",
4173
+ originalEvent: rangeEvent,
4174
+ payload: updatedPayload
3899
4175
  });
3900
4176
  }
3901
4177
  };
4178
+ var handleRangeZoom = (rangeEvent, onSelect, chartData, trellisKey, trellisSplitBy) => {
4179
+ var _a;
4180
+ const xData = ((_a = chartData == null ? void 0 : chartData.columns) == null ? void 0 : _a[0]) || [];
4181
+ const { startXIndex, endXIndex } = findRangeIndices(xData, rangeEvent.start, rangeEvent.end);
4182
+ const payload = {
4183
+ startXIndex,
4184
+ startXValue: rangeEvent.start,
4185
+ endXIndex,
4186
+ endXValue: rangeEvent.end
4187
+ };
4188
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
4189
+ if (onSelect) {
4190
+ onSelect({
4191
+ type: "range.select",
4192
+ originalEvent: rangeEvent,
4193
+ payload: updatedPayload
4194
+ });
4195
+ }
4196
+ };
4197
+ var parseArrayOption = (value) => {
4198
+ if (Array.isArray(value)) {
4199
+ return value;
4200
+ }
4201
+ if (value) {
4202
+ return JSON.parse(value);
4203
+ }
4204
+ return void 0;
4205
+ };
3902
4206
  var TimeSeriesChartWrapper = (props) => {
3903
- const {
4207
+ var _b, _c, _d;
4208
+ const _a = props, {
3904
4209
  width,
3905
4210
  height,
3906
4211
  chartData,
@@ -3913,12 +4218,57 @@ var TimeSeriesChartWrapper = (props) => {
3913
4218
  markerDisplay,
3914
4219
  onClick,
3915
4220
  onPointMouseOver,
3916
- onPointMouseOut
3917
- } = props;
3918
- const {
4221
+ onPointMouseOut,
4222
+ onSelect,
4223
+ splitByLayout,
4224
+ trellisKey,
4225
+ trellisSplitBy,
3919
4226
  backgroundColor,
4227
+ defaultFontColor,
4228
+ additionalTooltipValues,
4229
+ xAxisLineVisibility: xAxisLineVisibility,
4230
+ yAxisLineVisibility,
4231
+ y2AxisLineVisibility,
4232
+ showYAxisWithZero: showYAxisWithZeroFromProps,
4233
+ showY2AxisWithZero: showY2AxisWithZeroFromProps
4234
+ } = _a, otherOptions = __objRest(_a, [
4235
+ "width",
4236
+ "height",
4237
+ "chartData",
4238
+ "options",
4239
+ "userLocale",
4240
+ "annotationX",
4241
+ "annotationLabel",
4242
+ "annotationColor",
4243
+ "legendDisplay",
4244
+ "markerDisplay",
4245
+ "onClick",
4246
+ "onPointMouseOver",
4247
+ "onPointMouseOut",
4248
+ "onSelect",
4249
+ "splitByLayout",
4250
+ "trellisKey",
4251
+ "trellisSplitBy",
4252
+ "backgroundColor",
4253
+ "defaultFontColor",
4254
+ "additionalTooltipValues",
4255
+ // Extract axis line visibility options from props
4256
+ "xAxisLineVisibility",
4257
+ "yAxisLineVisibility",
4258
+ "y2AxisLineVisibility",
4259
+ // Extract showYAxisWithZero directly from props for accelerated render mode
4260
+ "showYAxisWithZero",
4261
+ "showY2AxisWithZero"
4262
+ ]);
4263
+ const { eventHandlers, xField: xFieldFromProps } = otherOptions;
4264
+ const trellisEnabled = useTrellisEnabled(splitByLayout);
4265
+ const {
4266
+ backgroundColor: bgColorFromOptions,
3920
4267
  seriesColors: seriesColorsStr,
3921
4268
  fieldColors,
4269
+ legendLabels: legendLabelsStr,
4270
+ legendMode,
4271
+ legendTruncation,
3922
4272
  "axisTitleX.text": xAxisTitleText,
3923
4273
  "axisTitleY.text": yAxisTitleText,
3924
4274
  "axisTitleY2.text": y2AxisTitleText,
@@ -3926,8 +4276,12 @@ var TimeSeriesChartWrapper = (props) => {
3926
4276
  "axisTitleY.visibility": yAxisTitleVisibility,
3927
4277
  "axisTitleY2.visibility": y2AxisTitleVisibility,
3928
4278
  "axisLabelsX.majorLabelVisibility": xAxisLabelVisibility,
4279
+ "axisLabelsX.majorLabelStyle.rotation": xAxisLabelRotation,
4280
+ "axisLabelsX.maxLabelParts": xAxisMaxLabelParts,
3929
4281
  "axisLabelsY.majorLabelVisibility": yAxisLabelVisibility,
4282
+ "axisLabelsY.majorUnit": yAxisMajorUnitFromSimpleXML,
3930
4283
  "axisLabelsY2.majorLabelVisibility": y2AxisLabelVisibility,
4284
+ "axisLabelsY2.majorUnit": y2AxisMajorUnitFromSimpleXML,
3931
4285
  "axisY.abbreviation": yAxisAbbreviation,
3932
4286
  "axisY.scale": yAxisScale,
3933
4287
  "axisY2.abbreviation": y2AxisAbbreviation,
@@ -3937,10 +4291,73 @@ var TimeSeriesChartWrapper = (props) => {
3937
4291
  "axisLabelsY2.integerUnits": y2IntegerUnits,
3938
4292
  "chart.overlayFields": overlayFieldsStr,
3939
4293
  "chart.nullValueMode": nullValueMode,
3940
- lineWidth
4294
+ "chart.showDataLabels": showDataLabels,
4295
+ lineWidth,
4296
+ lineDashStyle,
4297
+ fieldDashStyles: lineDashStylesByFieldStr,
4298
+ stepPosition,
4299
+ fieldStepPositions: stepPositionsByFieldStr,
4300
+ yAxisMin: yAxisMinRaw,
4301
+ yAxisMax: yAxisMaxRaw,
4302
+ y2AxisMin: y2AxisMinRaw,
4303
+ y2AxisMax: y2AxisMaxRaw,
4304
+ showXMajorGridLines,
4305
+ showYMajorGridLines,
4306
+ showY2MajorGridLines,
4307
+ showYMinorGridLines,
4308
+ showY2MinorGridLines,
4309
+ showLineSmoothing,
4310
+ xAxisMajorTickVisibility,
4311
+ xAxisMajorTickSize,
4312
+ yAxisMajorTickVisibility,
4313
+ y2AxisMajorTickVisibility,
4314
+ yAxisMajorTickSize,
4315
+ y2AxisMajorTickSize,
4316
+ yAxisMajorTickInterval,
4317
+ y2AxisMajorTickInterval,
4318
+ yAxisMinorTickVisibility,
4319
+ y2AxisMinorTickVisibility,
4320
+ yAxisMinorTickSize,
4321
+ y2AxisMinorTickSize,
4322
+ showYAxisWithZero: showYAxisWithZeroFromOptions,
4323
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions
3941
4324
  } = options;
4325
+ const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
4326
+ const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
4327
+ const showY2AxisWithZero = showY2AxisWithZeroFromProps != null ? showY2AxisWithZeroFromProps : showY2AxisWithZeroFromOptions;
4328
+ const showXMajorTicks = xAxisMajorTickVisibility !== "hide";
4329
+ const showYMajorTicks = yAxisMajorTickVisibility === "show";
4330
+ const showY2MajorTicks = y2AxisMajorTickVisibility === "show";
4331
+ const showYMinorTicks = yAxisMinorTickVisibility === "show";
4332
+ const showY2MinorTicks = y2AxisMinorTickVisibility === "show";
4333
+ const showXAxisLine = parseXAxisLineVisibility(xAxisLineVisibility);
4334
+ const showYAxisLine = yAxisLineVisibility === "show";
4335
+ const showY2AxisLine = y2AxisLineVisibility === "show";
4336
+ const yAxisMin = parseAxisValue(yAxisMinRaw);
4337
+ const yAxisMax = parseAxisValue(yAxisMaxRaw);
4338
+ const y2AxisMin = parseAxisValue(y2AxisMinRaw);
4339
+ const y2AxisMax = parseAxisValue(y2AxisMaxRaw);
4340
+ const parseTickInterval = (simpleXMLValue, canvasValue) => {
4341
+ if (simpleXMLValue) return Number(simpleXMLValue);
4342
+ if (canvasValue) return Number(canvasValue);
4343
+ return void 0;
4344
+ };
4345
+ const yAxisMajorTickIntervalNum = parseTickInterval(yAxisMajorUnitFromSimpleXML, yAxisMajorTickInterval);
4346
+ const y2AxisMajorTickIntervalNum = parseTickInterval(
4347
+ y2AxisMajorUnitFromSimpleXML,
4348
+ y2AxisMajorTickInterval
4349
+ );
4350
+ const xAxisMajorTickSizeNum = xAxisMajorTickSize != null ? Number(xAxisMajorTickSize) : void 0;
4351
+ const yAxisMajorTickSizeNum = yAxisMajorTickSize != null ? Number(yAxisMajorTickSize) : void 0;
4352
+ const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
4353
+ const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
4354
+ const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
3942
4355
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
3943
4356
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
4357
+ const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
4358
+ const stepPositionsByField = stepPositionsByFieldStr ? JSON.parse(stepPositionsByFieldStr) : void 0;
4359
+ const legendLabels = parseArrayOption(legendLabelsStr);
4360
+ const bgColor = backgroundColor || bgColorFromOptions;
3944
4361
  const [containerWidth, setContainerWidth] = react_exports.useState(Number(props.width));
3945
4362
  const [containerHeight, setContainerHeight] = react_exports.useState(Number(props.height));
3946
4363
  const cachedHandleResize = react_exports.useCallback((w, h) => {
@@ -3951,31 +4368,64 @@ var TimeSeriesChartWrapper = (props) => {
3951
4368
  fields: chartData.fields,
3952
4369
  columns: chartData.seriesList
3953
4370
  });
3954
- const xField = getFieldName(filteredChartData.fields[0]);
4371
+ const xField = getFieldName2(filteredChartData.fields[0]);
3955
4372
  const yFields = getFieldNames(
3956
4373
  filteredChartData.fields.length > 1 ? filteredChartData.fields.slice(1) : []
3957
4374
  );
3958
- const y2Fields = y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [];
3959
- const overlayFields = overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [];
4375
+ const y2Fields = (0, react_exports.useMemo)(
4376
+ () => y2FieldsStr ? y2FieldsStr.split(",").map((f) => f.trim()) : [],
4377
+ [y2FieldsStr]
4378
+ );
4379
+ const overlayFields = (0, react_exports.useMemo)(
4380
+ () => overlayFieldsStr ? overlayFieldsStr.split(",").map((f) => f.trim()) : [],
4381
+ [overlayFieldsStr]
4382
+ );
3960
4383
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
3961
4384
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
3962
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFields, yAxisTitleVisibility);
4385
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
4386
+ let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
3963
4387
  yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
3964
4388
  const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
3965
4389
  let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
3966
4390
  y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
3967
- const xScaleConfig = getXScaleConfig(xAxisTitle, xAxisLabelVisibility);
3968
- const yScaleConfig = getYScaleConfig(yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility);
3969
- let y2ScaleConfig = {};
3970
- if (y2Enabled) {
3971
- y2ScaleConfig = getY2ScaleConfig(
3972
- y2AxisTitle,
3973
- y2AxisAbbreviation,
3974
- y2AxisScale,
3975
- y2IntegerUnits,
3976
- y2AxisLabelVisibility
3977
- );
3978
- }
4391
+ const xScaleConfig = (0, react_exports.useMemo)(
4392
+ () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
4393
+ [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
4394
+ );
4395
+ const yScaleConfig = (0, react_exports.useMemo)(
4396
+ () => getYScaleConfig(
4397
+ yAxisTitle,
4398
+ yAxisAbbreviation,
4399
+ yAxisScale,
4400
+ yAxisLabelVisibility,
4401
+ yAxisMin,
4402
+ yAxisMax
4403
+ ),
4404
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax]
4405
+ );
4406
+ const y2ScaleConfig = (0, react_exports.useMemo)(() => {
4407
+ if (y2Enabled) {
4408
+ return getY2ScaleConfig(
4409
+ y2AxisTitle,
4410
+ y2AxisAbbreviation,
4411
+ y2AxisScale,
4412
+ y2IntegerUnits,
4413
+ y2AxisLabelVisibility,
4414
+ y2AxisMin,
4415
+ y2AxisMax
4416
+ );
4417
+ }
4418
+ return {};
4419
+ }, [
4420
+ y2Enabled,
4421
+ y2AxisTitle,
4422
+ y2AxisAbbreviation,
4423
+ y2AxisScale,
4424
+ y2IntegerUnits,
4425
+ y2AxisLabelVisibility,
4426
+ y2AxisMin,
4427
+ y2AxisMax
4428
+ ]);
3979
4429
  const uplotContainerElement = (0, react_exports.useRef)(null);
3980
4430
  const seriesDataFormatted = [
3981
4431
  filteredChartData.columns[0],
@@ -3991,9 +4441,25 @@ var TimeSeriesChartWrapper = (props) => {
3991
4441
  overlayFields,
3992
4442
  y2Enabled,
3993
4443
  nullValueMode,
3994
- markerDisplay
4444
+ markerDisplay,
4445
+ lineDashStyle,
4446
+ lineDashStylesByField,
4447
+ stepPosition,
4448
+ stepPositionsByField
3995
4449
  ),
3996
- [yFields, y2Fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay]
4450
+ [
4451
+ yFields,
4452
+ y2Fields,
4453
+ lineWidth,
4454
+ overlayFields,
4455
+ y2Enabled,
4456
+ nullValueMode,
4457
+ markerDisplay,
4458
+ lineDashStyle,
4459
+ lineDashStylesByField,
4460
+ stepPosition,
4461
+ stepPositionsByField
4462
+ ]
3997
4463
  );
3998
4464
  const chartingEventAnnotations = (0, react_exports.useMemo)(
3999
4465
  () => getAnnotationsForCanvas({
@@ -4007,25 +4473,59 @@ var TimeSeriesChartWrapper = (props) => {
4007
4473
  () => __spreadValues(__spreadValues(__spreadValues({}, xScaleConfig), yScaleConfig), y2ScaleConfig),
4008
4474
  [xScaleConfig, yScaleConfig, y2ScaleConfig]
4009
4475
  );
4010
- const legend = (0, react_exports.useMemo)(() => getLegend({ legendDisplay }), [legendDisplay]);
4476
+ const isSeriesCompare = legendMode === "seriesCompare";
4477
+ const legend = (0, react_exports.useMemo)(
4478
+ () => getLegend({
4479
+ legendDisplay: isSeriesCompare && legendDisplay !== "off" ? "right" : legendDisplay,
4480
+ isSeriesCompare,
4481
+ legendTruncation
4482
+ }),
4483
+ [legendDisplay, isSeriesCompare, legendTruncation]
4484
+ );
4011
4485
  const handleChartClick = react_exports.useCallback(
4012
4486
  (event) => {
4013
4487
  if (onClick) {
4014
- handleClick(event, onClick);
4488
+ handleClick(event, onClick, trellisKey, trellisSplitBy);
4015
4489
  }
4016
4490
  },
4017
- [onClick]
4491
+ [onClick, trellisKey, trellisSplitBy]
4018
4492
  );
4019
4493
  const handleChartLegendClick = react_exports.useCallback(
4020
4494
  (event) => {
4021
4495
  if (onClick) {
4022
- handleLegendClick(event, onClick);
4496
+ handleLegendClick(event, onClick, trellisKey, trellisSplitBy);
4497
+ }
4498
+ },
4499
+ [onClick, trellisKey, trellisSplitBy]
4500
+ );
4501
+ const handleChartRangeSelection = react_exports.useCallback(
4502
+ (range2) => {
4503
+ if (onSelect) {
4504
+ handleRangeSelection(range2, onSelect, chartData, trellisKey, trellisSplitBy);
4505
+ }
4506
+ },
4507
+ [onSelect, chartData, trellisKey, trellisSplitBy]
4508
+ );
4509
+ const handleChartRangeZoom = react_exports.useCallback(
4510
+ (range2) => {
4511
+ if (onSelect) {
4512
+ handleRangeZoom(range2, onSelect, chartData, trellisKey, trellisSplitBy);
4023
4513
  }
4024
4514
  },
4025
- [onClick]
4515
+ [onSelect, chartData, trellisKey, trellisSplitBy]
4516
+ );
4517
+ const xFieldToUse = xFieldFromProps || xField;
4518
+ const enableSearchZoom = react_exports.useMemo(
4519
+ () => shouldEnableSearchZoom(eventHandlers, xFieldToUse),
4520
+ [eventHandlers, xFieldToUse]
4026
4521
  );
4027
4522
  const lastPayloadRef = react_exports.useRef(null);
4028
4523
  const lastOriginalEventRef = react_exports.useRef(null);
4524
+ const previousMouseoverPayloadRef = react_exports.useRef(null);
4525
+ const additionalTooltipValuesRef = react_exports.useRef(additionalTooltipValues);
4526
+ react_exports.useEffect(() => {
4527
+ additionalTooltipValuesRef.current = additionalTooltipValues;
4528
+ }, [additionalTooltipValues]);
4029
4529
  const handleChartCrosshairChange = react_exports.useCallback(
4030
4530
  (event) => {
4031
4531
  if (onPointMouseOver || onPointMouseOut) {
@@ -4037,6 +4537,7 @@ var TimeSeriesChartWrapper = (props) => {
4037
4537
  payload: lastPayloadRef.current
4038
4538
  });
4039
4539
  }
4540
+ previousMouseoverPayloadRef.current = null;
4040
4541
  return;
4041
4542
  }
4042
4543
  const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
@@ -4044,25 +4545,36 @@ var TimeSeriesChartWrapper = (props) => {
4044
4545
  });
4045
4546
  delete payload.seriesKey;
4046
4547
  if (event.rowContext) {
4047
- Object.keys(event.rowContext).forEach((fieldName) => {
4048
- payload[`row.${fieldName}.value`] = event.rowContext[fieldName];
4049
- });
4548
+ Object.assign(
4549
+ payload,
4550
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
4551
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
4552
+ return acc;
4553
+ }, {})
4554
+ );
4555
+ }
4556
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
4557
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
4558
+ return;
4050
4559
  }
4051
- lastPayloadRef.current = payload;
4560
+ lastPayloadRef.current = updatedPayload;
4052
4561
  lastOriginalEventRef.current = event;
4562
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
4053
4563
  if (onPointMouseOver) {
4054
4564
  onPointMouseOver({
4055
4565
  type: "point.mouseover",
4056
4566
  originalEvent: event,
4057
- payload
4567
+ payload: updatedPayload
4058
4568
  });
4059
4569
  }
4060
4570
  }
4061
4571
  },
4062
- [onPointMouseOver, onPointMouseOut]
4572
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
4063
4573
  );
4064
- const memoizedChart = (0, react_exports.useMemo)(
4065
- () => /* @__PURE__ */ react_exports.createElement(
4574
+ 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}`;
4575
+ const memoizedChart = (0, react_exports.useMemo)(() => {
4576
+ const computedOnRangeZoom = onSelect ? handleChartRangeZoom : void 0;
4577
+ return /* @__PURE__ */ react_exports.createElement(visualization_canvas_exports.RangeSelectionProvider, { key: dataKey }, /* @__PURE__ */ react_exports.createElement(
4066
4578
  visualization_canvas_exports.TimeSeriesChart,
4067
4579
  {
4068
4580
  data: chartData,
@@ -4072,49 +4584,121 @@ var TimeSeriesChartWrapper = (props) => {
4072
4584
  seriesColorsByField,
4073
4585
  seriesConfig: seriesOverrides,
4074
4586
  legend,
4587
+ legendLabels,
4588
+ legendTruncation,
4589
+ isSeriesCompare: legendMode === "seriesCompare",
4590
+ maxSeriesFocus: legendMode === "seriesCompare" ? 0 : void 0,
4075
4591
  scaleConfig,
4076
4592
  timestampFormat: "expanded",
4077
4593
  onCrosshairClick: onClick ? handleChartClick : void 0,
4078
4594
  onCrosshairChange: onPointMouseOver || onPointMouseOut ? handleChartCrosshairChange : void 0,
4079
4595
  onSeriesClick: onClick ? handleChartLegendClick : void 0,
4596
+ onRangeSelection: handleChartRangeSelection,
4597
+ onRangeZoom: computedOnRangeZoom,
4598
+ serverSideZoom: enableSearchZoom,
4080
4599
  userLocale,
4081
4600
  events: chartingEventAnnotations,
4082
- eventsConfig: { renderer: triangleEventAnnotationRenderer }
4601
+ eventsConfig: { renderer: triangleEventAnnotationRenderer },
4602
+ additionalTooltipValuesRef,
4603
+ showXMajorGridLines,
4604
+ showYMajorGridLines,
4605
+ showY2MajorGridLines,
4606
+ showYMinorGridLines,
4607
+ showY2MinorGridLines,
4608
+ showLineSmoothing,
4609
+ dataValuesDisplay,
4610
+ showXMajorTicks,
4611
+ xAxisMajorTickSize: xAxisMajorTickSizeNum,
4612
+ showYMajorTicks,
4613
+ showY2MajorTicks,
4614
+ yAxisMajorTickSize: yAxisMajorTickSizeNum,
4615
+ y2AxisMajorTickSize: y2AxisMajorTickSizeNum,
4616
+ yAxisMajorTickInterval: yAxisMajorTickIntervalNum,
4617
+ y2AxisMajorTickInterval: y2AxisMajorTickIntervalNum,
4618
+ showYMinorTicks,
4619
+ showY2MinorTicks,
4620
+ yAxisMinorTickSize: yAxisMinorTickSizeNum,
4621
+ y2AxisMinorTickSize: y2AxisMinorTickSizeNum,
4622
+ showYAxisWithZero,
4623
+ showY2AxisWithZero,
4624
+ showXAxisLine,
4625
+ showYAxisLine,
4626
+ showY2AxisLine,
4627
+ xAxisMaxLabelParts
4083
4628
  }
4084
- ),
4085
- [
4086
- chartData,
4087
- containerWidth,
4088
- containerHeight,
4089
- seriesColors,
4090
- seriesColorsByField,
4091
- seriesOverrides,
4092
- legend,
4093
- scaleConfig,
4094
- userLocale,
4095
- chartingEventAnnotations,
4096
- onClick,
4097
- handleChartClick,
4098
- onPointMouseOver,
4099
- onPointMouseOut,
4100
- handleChartCrosshairChange,
4101
- handleChartLegendClick
4102
- ]
4103
- );
4629
+ ));
4630
+ }, [
4631
+ onSelect,
4632
+ handleChartRangeZoom,
4633
+ dataKey,
4634
+ chartData,
4635
+ containerWidth,
4636
+ containerHeight,
4637
+ seriesColors,
4638
+ seriesColorsByField,
4639
+ seriesOverrides,
4640
+ legend,
4641
+ legendLabels,
4642
+ legendTruncation,
4643
+ scaleConfig,
4644
+ onClick,
4645
+ handleChartClick,
4646
+ onPointMouseOver,
4647
+ onPointMouseOut,
4648
+ handleChartCrosshairChange,
4649
+ handleChartLegendClick,
4650
+ handleChartRangeSelection,
4651
+ enableSearchZoom,
4652
+ userLocale,
4653
+ chartingEventAnnotations,
4654
+ showXMajorGridLines,
4655
+ showYMajorGridLines,
4656
+ showY2MajorGridLines,
4657
+ showYMinorGridLines,
4658
+ showY2MinorGridLines,
4659
+ showLineSmoothing,
4660
+ dataValuesDisplay,
4661
+ showXMajorTicks,
4662
+ xAxisMajorTickSizeNum,
4663
+ showYMajorTicks,
4664
+ showY2MajorTicks,
4665
+ yAxisMajorTickSizeNum,
4666
+ y2AxisMajorTickSizeNum,
4667
+ yAxisMajorTickIntervalNum,
4668
+ y2AxisMajorTickIntervalNum,
4669
+ showYMinorTicks,
4670
+ showY2MinorTicks,
4671
+ yAxisMinorTickSizeNum,
4672
+ y2AxisMinorTickSizeNum,
4673
+ showYAxisWithZero,
4674
+ showY2AxisWithZero,
4675
+ showXAxisLine,
4676
+ showYAxisLine,
4677
+ showY2AxisLine,
4678
+ legendMode,
4679
+ xAxisMaxLabelParts
4680
+ ]);
4104
4681
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
4105
- return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor }, memoizedChart);
4106
- }, [backgroundColor, memoizedChart]);
4107
- return /* @__PURE__ */ react_exports.createElement(
4682
+ return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
4683
+ }, [bgColor, memoizedChart]);
4684
+ return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, trellisEnabled && /* @__PURE__ */ react_exports.createElement(
4685
+ TrellisTitle,
4686
+ {
4687
+ trellisKey,
4688
+ backgroundColor: bgColor,
4689
+ fontColor: defaultFontColor
4690
+ }
4691
+ ), /* @__PURE__ */ react_exports.createElement(
4108
4692
  TimeSeriesChartContainer,
4109
4693
  {
4110
- height,
4694
+ height: trellisEnabled ? Number(height) - TRELLIS_TITLE_HEIGHT : height,
4111
4695
  width,
4112
4696
  ref: uplotContainerElement,
4113
4697
  "data-test": "timeseries-chart-wrapper"
4114
4698
  },
4115
4699
  /* @__PURE__ */ react_exports.createElement(SizeAwareWrapper_default, { width, height, onResize: cachedHandleResize }),
4116
4700
  memoizedVisualization
4117
- );
4701
+ ));
4118
4702
  };
4119
4703
  var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
4120
4704
 
@@ -4477,10 +5061,10 @@ var formatLayer = (l, dataFields, dataSourceData, transformedData) => {
4477
5061
  return typeof geomItem === "string" ? JSON.parse(geomItem) : geomItem;
4478
5062
  });
4479
5063
  }
4480
- if (Object.prototype.hasOwnProperty.call(layer, "seriesColors")) {
5064
+ if (Object.hasOwn(layer, "seriesColors")) {
4481
5065
  layer.seriesColors = Array.isArray(layer.seriesColors) ? (0, colorUtils_exports.sanitizeArrayOfColors)(layer.seriesColors) : void 0;
4482
5066
  }
4483
- if (Object.prototype.hasOwnProperty.call(layer, "dataColors")) {
5067
+ if (Object.hasOwn(layer, "dataColors")) {
4484
5068
  layer.dataColors = Array.isArray(layer.dataColors) ? (0, colorUtils_exports.sanitizeArrayOfColors)(layer.dataColors) : void 0;
4485
5069
  }
4486
5070
  layer.metadata = transformedData;
@@ -4595,7 +5179,7 @@ var withNullToZeros = (Viz) => {
4595
5179
  function useIconPlaceholder(dataSources, loading) {
4596
5180
  return loading;
4597
5181
  }
4598
- var Map2 = withoutInternalFields(
5182
+ var MapVisualization = withoutInternalFields(
4599
5183
  withTooltipFields(
4600
5184
  withNullToZeros(
4601
5185
  withDashboardViz_default({
@@ -4609,5 +5193,5 @@ var Map2 = withoutInternalFields(
4609
5193
  )
4610
5194
  );
4611
5195
  var { themes: themes2 } = config_default;
4612
- var Map_default = Map2;
5196
+ var Map_default = MapVisualization;
4613
5197
  //# sourceMappingURL=Map.js.map