@splunk/visualizations 28.5.3 → 28.7.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 (663) hide show
  1. package/Area/Area.d.ts.map +1 -1
  2. package/Area/areaUtils.d.ts +1 -1
  3. package/Area/areaUtils.d.ts.map +1 -1
  4. package/Area/config.d.ts.map +1 -1
  5. package/Area.config.js +93 -25
  6. package/Area.config.js.map +3 -3
  7. package/Area.js +708 -319
  8. package/Area.js.map +4 -4
  9. package/Bar/Bar.d.ts.map +1 -1
  10. package/Bar.config.js +81 -24
  11. package/Bar.config.js.map +3 -3
  12. package/Bar.js +528 -297
  13. package/Bar.js.map +4 -4
  14. package/Bubble.config.js +80 -23
  15. package/Bubble.config.js.map +2 -2
  16. package/Bubble.js +375 -208
  17. package/Bubble.js.map +4 -4
  18. package/CHANGELOG.external.md +75 -60
  19. package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts +1 -0
  20. package/ChoroplethSvg/PureChoroplethSvg/PureChoroplethSvg.d.ts.map +1 -1
  21. package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts +12 -25
  22. package/ChoroplethSvg/PureChoroplethSvg/SvgChoroplethDynamic.d.ts.map +1 -1
  23. package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts +11 -4
  24. package/ChoroplethSvg/PureChoroplethSvg/SvgMutator.d.ts.map +1 -1
  25. package/ChoroplethSvg.js +1133 -253
  26. package/ChoroplethSvg.js.map +4 -4
  27. package/Column/Column.d.ts.map +1 -1
  28. package/Column.config.js +81 -24
  29. package/Column.config.js.map +3 -3
  30. package/Column.js +531 -300
  31. package/Column.js.map +4 -4
  32. package/Ellipse.config.js +1 -1
  33. package/Ellipse.config.js.map +2 -2
  34. package/Ellipse.js +277 -161
  35. package/Ellipse.js.map +4 -4
  36. package/Events/PureEvents/FieldSummaryTooltip.d.ts +8 -31
  37. package/Events/PureEvents/FieldSummaryTooltip.d.ts.map +1 -1
  38. package/Events/PureEvents/PureEvents.d.ts.map +1 -1
  39. package/Events/PureEvents/TimeControlsPopover.d.ts +6 -25
  40. package/Events/PureEvents/TimeControlsPopover.d.ts.map +1 -1
  41. package/Events/config.d.ts.map +1 -1
  42. package/Events.config.js +13 -3
  43. package/Events.config.js.map +2 -2
  44. package/Events.js +355 -293
  45. package/Events.js.map +4 -4
  46. package/FillerGauge/FillerGauge.d.ts.map +1 -1
  47. package/FillerGauge/config.d.ts.map +1 -1
  48. package/FillerGauge.config.js +76 -24
  49. package/FillerGauge.config.js.map +2 -2
  50. package/FillerGauge.js +512 -271
  51. package/FillerGauge.js.map +4 -4
  52. package/Image/config.d.ts.map +1 -1
  53. package/Image.config.js +7 -0
  54. package/Image.config.js.map +2 -2
  55. package/Image.js +282 -149
  56. package/Image.js.map +4 -4
  57. package/LICENSE +13 -0
  58. package/Line/Line.d.ts.map +1 -1
  59. package/Line/config.d.ts.map +1 -1
  60. package/Line/lineUtils.d.ts.map +1 -1
  61. package/Line/mockdata/LineData.d.ts +21 -0
  62. package/Line/mockdata/LineData.d.ts.map +1 -1
  63. package/Line.config.js +86 -25
  64. package/Line.config.js.map +3 -3
  65. package/Line.js +638 -382
  66. package/Line.js.map +4 -4
  67. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts +47 -73
  68. package/LinkGraph/PureLinkGraph/PureLinkGraph.d.ts.map +1 -1
  69. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts +11 -2
  70. package/LinkGraph/PureLinkGraph/PureLinkGraphUtils.d.ts.map +1 -1
  71. package/LinkGraph/PureLinkGraph/components/Graph.d.ts +5 -5
  72. package/LinkGraph/PureLinkGraph/components/Node.d.ts +2 -2
  73. package/LinkGraph/PureLinkGraph/components/Nodes.d.ts +2 -2
  74. package/LinkGraph.js +886 -759
  75. package/LinkGraph.js.map +4 -4
  76. package/Map/Map.d.ts +1 -0
  77. package/Map/Map.d.ts.map +1 -1
  78. package/Map/PureMap/BubbleLayer.d.ts +22 -4
  79. package/Map/PureMap/BubbleLayer.d.ts.map +1 -1
  80. package/Map/PureMap/ChoroplethLayer.d.ts +9 -1
  81. package/Map/PureMap/ChoroplethLayer.d.ts.map +1 -1
  82. package/Map/PureMap/ClusterLayer.d.ts +3 -1
  83. package/Map/PureMap/ClusterLayer.d.ts.map +1 -1
  84. package/Map/PureMap/LocalChoroplethLayer.d.ts +1 -0
  85. package/Map/PureMap/LocalChoroplethLayer.d.ts.map +1 -1
  86. package/Map/PureMap/MapContext.d.ts +13 -0
  87. package/Map/PureMap/MapContext.d.ts.map +1 -0
  88. package/Map/PureMap/MarkerLayer.d.ts +19 -2
  89. package/Map/PureMap/MarkerLayer.d.ts.map +1 -1
  90. package/Map/PureMap/MarkerWrapper.d.ts +3 -2
  91. package/Map/PureMap/MarkerWrapper.d.ts.map +1 -1
  92. package/Map/PureMap/PureMap.d.ts +1 -0
  93. package/Map/PureMap/PureMap.d.ts.map +1 -1
  94. package/Map/PureMap/PureMapContainer.d.ts.map +1 -1
  95. package/Map/PureMap/Tooltip.d.ts +6 -1
  96. package/Map/PureMap/Tooltip.d.ts.map +1 -1
  97. package/Map/PureMap/keyboardConstants.d.ts +11 -0
  98. package/Map/PureMap/keyboardConstants.d.ts.map +1 -0
  99. package/Map/PureMap/useRovingTabindex.d.ts +18 -0
  100. package/Map/PureMap/useRovingTabindex.d.ts.map +1 -0
  101. package/Map/config.d.ts.map +1 -1
  102. package/Map.config.js +4 -1
  103. package/Map.config.js.map +2 -2
  104. package/Map.js +1594 -628
  105. package/Map.js.map +4 -4
  106. package/Markdown/Markdown.d.ts.map +1 -1
  107. package/Markdown.config.js.map +1 -1
  108. package/Markdown.js +304 -161
  109. package/Markdown.js.map +4 -4
  110. package/MarkerGauge/MarkerGauge.d.ts +1 -47
  111. package/MarkerGauge/MarkerGauge.d.ts.map +1 -1
  112. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts +22 -68
  113. package/MarkerGauge/PureMarkerGauge/MarkerGauge.d.ts.map +1 -1
  114. package/MarkerGauge/config.d.ts.map +1 -1
  115. package/MarkerGauge.config.js +75 -23
  116. package/MarkerGauge.config.js.map +2 -2
  117. package/MarkerGauge.js +560 -375
  118. package/MarkerGauge.js.map +4 -4
  119. package/NetworkGraph/NetworkGraph.d.ts +2 -5
  120. package/NetworkGraph/NetworkGraph.d.ts.map +1 -1
  121. package/NetworkGraph/PureNetworkGraph/PureNetworkGraph.d.ts.map +1 -1
  122. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts +1 -0
  123. package/NetworkGraph/PureNetworkGraph/components/NetworkGraphSvg.d.ts.map +1 -1
  124. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts +1 -0
  125. package/NetworkGraph/PureNetworkGraph/components/Node.d.ts.map +1 -1
  126. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts +1 -1
  127. package/NetworkGraph/PureNetworkGraph/components/Tooltip.d.ts.map +1 -1
  128. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts +1 -0
  129. package/NetworkGraph/PureNetworkGraph/components/ZoomControls.d.ts.map +1 -1
  130. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts +23 -0
  131. package/NetworkGraph/PureNetworkGraph/utils/networkGraphUtils.d.ts.map +1 -1
  132. package/NetworkGraph.config.js +2 -0
  133. package/NetworkGraph.config.js.map +2 -2
  134. package/NetworkGraph.js +895 -455
  135. package/NetworkGraph.js.map +4 -4
  136. package/ParallelCoordinates.config.js.map +1 -1
  137. package/ParallelCoordinates.js +288 -172
  138. package/ParallelCoordinates.js.map +4 -4
  139. package/Pie/Pie.d.ts.map +1 -1
  140. package/Pie/pieUtils.d.ts +2 -2
  141. package/Pie.config.js +74 -22
  142. package/Pie.config.js.map +2 -2
  143. package/Pie.js +522 -296
  144. package/Pie.js.map +4 -4
  145. package/ProcessTree/ProcessTree.d.ts +23 -0
  146. package/ProcessTree/ProcessTree.d.ts.map +1 -0
  147. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts +33 -0
  148. package/ProcessTree/PureProcessTree/PureProcessTree.d.ts.map +1 -0
  149. package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts +8 -0
  150. package/ProcessTree/PureProcessTree/components/DirectionalBytes.d.ts.map +1 -0
  151. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts +46 -0
  152. package/ProcessTree/PureProcessTree/components/ProcessTreeLeftPanel.d.ts.map +1 -0
  153. package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts +20 -0
  154. package/ProcessTree/PureProcessTree/components/ProcessTreeRightPanel.d.ts.map +1 -0
  155. package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts +20 -0
  156. package/ProcessTree/PureProcessTree/hooks/useProcessTreeExpansionState.d.ts.map +1 -0
  157. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts +46 -0
  158. package/ProcessTree/PureProcessTree/hooks/useProcessTreeGraphData.d.ts.map +1 -0
  159. package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts +23 -0
  160. package/ProcessTree/PureProcessTree/hooks/useProcessTreeLinkOverlay.d.ts.map +1 -0
  161. package/ProcessTree/PureProcessTree/mockdata/data.d.ts +235 -0
  162. package/ProcessTree/PureProcessTree/mockdata/data.d.ts.map +1 -0
  163. package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts +9 -0
  164. package/ProcessTree/PureProcessTree/utils/iconLoader.d.ts.map +1 -0
  165. package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts +36 -0
  166. package/ProcessTree/PureProcessTree/utils/processTreeLinkOverlayUtils.d.ts.map +1 -0
  167. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts +82 -0
  168. package/ProcessTree/PureProcessTree/utils/processTreeUtils.d.ts.map +1 -0
  169. package/ProcessTree/config.d.ts +4 -0
  170. package/ProcessTree/config.d.ts.map +1 -0
  171. package/ProcessTree/index.d.ts +3 -0
  172. package/ProcessTree/index.d.ts.map +1 -0
  173. package/ProcessTree.config.js +192 -0
  174. package/ProcessTree.config.js.map +7 -0
  175. package/ProcessTree.js +5128 -0
  176. package/ProcessTree.js.map +7 -0
  177. package/Punchcard/Punchcard.d.ts +1 -5
  178. package/Punchcard/Punchcard.d.ts.map +1 -1
  179. package/Punchcard/PurePunchcard/Punchcard.d.ts +28 -32
  180. package/Punchcard/PurePunchcard/Punchcard.d.ts.map +1 -1
  181. package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts +7 -12
  182. package/Punchcard/PurePunchcard/src/PunchcardAxis.d.ts.map +1 -1
  183. package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts +14 -19
  184. package/Punchcard/PurePunchcard/src/PunchcardBubble.d.ts.map +1 -1
  185. package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts +22 -27
  186. package/Punchcard/PurePunchcard/src/PunchcardChartArea.d.ts.map +1 -1
  187. package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts +3 -8
  188. package/Punchcard/PurePunchcard/src/PunchcardGridLines.d.ts.map +1 -1
  189. package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts +9 -14
  190. package/Punchcard/PurePunchcard/src/PunchcardLegend.d.ts.map +1 -1
  191. package/Punchcard/PurePunchcard/src/PunchcardRow.d.ts.map +1 -1
  192. package/Punchcard.config.js.map +1 -1
  193. package/Punchcard.js +444 -631
  194. package/Punchcard.js.map +4 -4
  195. package/README.md +2 -0
  196. package/Rectangle.config.js +1 -1
  197. package/Rectangle.config.js.map +2 -2
  198. package/Rectangle.js +289 -173
  199. package/Rectangle.js.map +4 -4
  200. package/RichText/PureRichText/Editor/EditorPanel.d.ts +20 -0
  201. package/RichText/PureRichText/Editor/EditorPanel.d.ts.map +1 -0
  202. package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts +17 -0
  203. package/RichText/PureRichText/Editor/EditorPanelStyles.d.ts.map +1 -0
  204. package/RichText/PureRichText/Editor/FontSelector.d.ts +15 -0
  205. package/RichText/PureRichText/Editor/FontSelector.d.ts.map +1 -0
  206. package/RichText/PureRichText/Editor/FormatButton.d.ts +23 -0
  207. package/RichText/PureRichText/Editor/FormatButton.d.ts.map +1 -0
  208. package/RichText/PureRichText/Editor/editorPanelUtils.d.ts +19 -0
  209. package/RichText/PureRichText/Editor/editorPanelUtils.d.ts.map +1 -0
  210. package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts +11 -0
  211. package/RichText/PureRichText/Editor/hooks/useLineSpacing.d.ts.map +1 -0
  212. package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts +26 -0
  213. package/RichText/PureRichText/Editor/hooks/useLinkHandlers.d.ts.map +1 -0
  214. package/RichText/PureRichText/Editor/index.d.ts +9 -0
  215. package/RichText/PureRichText/Editor/index.d.ts.map +1 -0
  216. package/RichText/PureRichText/InnerEditor.d.ts +41 -0
  217. package/RichText/PureRichText/InnerEditor.d.ts.map +1 -0
  218. package/RichText/PureRichText/PureRichText.d.ts +19 -0
  219. package/RichText/PureRichText/PureRichText.d.ts.map +1 -0
  220. package/RichText/PureRichText/PureRichTextContext.d.ts +64 -0
  221. package/RichText/PureRichText/PureRichTextContext.d.ts.map +1 -0
  222. package/RichText/PureRichText/RichTextStyles.d.ts +25 -0
  223. package/RichText/PureRichText/RichTextStyles.d.ts.map +1 -0
  224. package/RichText/PureRichText/activeInstance.d.ts +23 -0
  225. package/RichText/PureRichText/activeInstance.d.ts.map +1 -0
  226. package/RichText/PureRichText/config.d.ts +17 -0
  227. package/RichText/PureRichText/config.d.ts.map +1 -0
  228. package/RichText/PureRichText/hooks/index.d.ts +12 -0
  229. package/RichText/PureRichText/hooks/index.d.ts.map +1 -0
  230. package/RichText/PureRichText/hooks/useContentSave.d.ts +25 -0
  231. package/RichText/PureRichText/hooks/useContentSave.d.ts.map +1 -0
  232. package/RichText/PureRichText/hooks/useContentSync.d.ts +28 -0
  233. package/RichText/PureRichText/hooks/useContentSync.d.ts.map +1 -0
  234. package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts +33 -0
  235. package/RichText/PureRichText/hooks/useDashboardKeyboardNav.d.ts.map +1 -0
  236. package/RichText/PureRichText/hooks/useEditModeEffect.d.ts +10 -0
  237. package/RichText/PureRichText/hooks/useEditModeEffect.d.ts.map +1 -0
  238. package/RichText/PureRichText/hooks/useEditorSetup.d.ts +36 -0
  239. package/RichText/PureRichText/hooks/useEditorSetup.d.ts.map +1 -0
  240. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts +33 -0
  241. package/RichText/PureRichText/hooks/useFakeHighlight.d.ts.map +1 -0
  242. package/RichText/PureRichText/hooks/useFocusHandlers.d.ts +35 -0
  243. package/RichText/PureRichText/hooks/useFocusHandlers.d.ts.map +1 -0
  244. package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts +18 -0
  245. package/RichText/PureRichText/hooks/useKeyboardShortcuts.d.ts.map +1 -0
  246. package/RichText/PureRichText/hooks/useMouseHandlers.d.ts +24 -0
  247. package/RichText/PureRichText/hooks/useMouseHandlers.d.ts.map +1 -0
  248. package/RichText/PureRichText/hooks/useRichTextState.d.ts +38 -0
  249. package/RichText/PureRichText/hooks/useRichTextState.d.ts.map +1 -0
  250. package/RichText/PureRichText/hooks/useStepFontSize.d.ts +17 -0
  251. package/RichText/PureRichText/hooks/useStepFontSize.d.ts.map +1 -0
  252. package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts +18 -0
  253. package/RichText/PureRichText/hooks/useStepLineSpacing.d.ts.map +1 -0
  254. package/RichText/PureRichText/hooks/useTokenMap.d.ts +45 -0
  255. package/RichText/PureRichText/hooks/useTokenMap.d.ts.map +1 -0
  256. package/RichText/PureRichText/index.d.ts +16 -0
  257. package/RichText/PureRichText/index.d.ts.map +1 -0
  258. package/RichText/PureRichText/renderers/ElementRenderer.d.ts +8 -0
  259. package/RichText/PureRichText/renderers/ElementRenderer.d.ts.map +1 -0
  260. package/RichText/PureRichText/renderers/LeafRenderer.d.ts +8 -0
  261. package/RichText/PureRichText/renderers/LeafRenderer.d.ts.map +1 -0
  262. package/RichText/PureRichText/types.d.ts +111 -0
  263. package/RichText/PureRichText/types.d.ts.map +1 -0
  264. package/RichText/PureRichText/utils/a11yUtils.d.ts +9 -0
  265. package/RichText/PureRichText/utils/a11yUtils.d.ts.map +1 -0
  266. package/RichText/PureRichText/utils/fontSize.d.ts +6 -0
  267. package/RichText/PureRichText/utils/fontSize.d.ts.map +1 -0
  268. package/RichText/PureRichText/utils/slateUtils.d.ts +99 -0
  269. package/RichText/PureRichText/utils/slateUtils.d.ts.map +1 -0
  270. package/RichText/RichText.d.ts +17 -0
  271. package/RichText/RichText.d.ts.map +1 -0
  272. package/RichText/config.d.ts +4 -0
  273. package/RichText/config.d.ts.map +1 -0
  274. package/RichText/index.d.ts +7 -0
  275. package/RichText/index.d.ts.map +1 -0
  276. package/RichText.config.js +268 -0
  277. package/RichText.config.js.map +7 -0
  278. package/RichText.js +7674 -0
  279. package/RichText.js.map +7 -0
  280. package/Sankey/PureSankey/PureSankey.d.ts.map +1 -1
  281. package/Sankey/PureSankey/SankeyLink.d.ts.map +1 -1
  282. package/Sankey/PureSankey/SankeyNode.d.ts +10 -3
  283. package/Sankey/PureSankey/SankeyNode.d.ts.map +1 -1
  284. package/Sankey/PureSankey/SankeyTooltip.d.ts.map +1 -1
  285. package/Sankey/PureSankey/SankeyUtils.d.ts +10 -0
  286. package/Sankey/PureSankey/SankeyUtils.d.ts.map +1 -1
  287. package/Sankey.config.js.map +1 -1
  288. package/Sankey.js +562 -290
  289. package/Sankey.js.map +4 -4
  290. package/Scatter/Scatter.d.ts.map +1 -1
  291. package/Scatter.config.js +81 -24
  292. package/Scatter.config.js.map +3 -3
  293. package/Scatter.js +528 -297
  294. package/Scatter.js.map +4 -4
  295. package/SingleValue/SingleValue.d.ts.map +1 -1
  296. package/SingleValue/config.d.ts.map +1 -1
  297. package/SingleValue.config.js +76 -24
  298. package/SingleValue.config.js.map +2 -2
  299. package/SingleValue.js +896 -779
  300. package/SingleValue.js.map +4 -4
  301. package/SingleValueBasic.js.map +1 -1
  302. package/SingleValueIcon/SingleValueIcon.d.ts.map +1 -1
  303. package/SingleValueIcon/config.d.ts.map +1 -1
  304. package/SingleValueIcon.config.js +76 -24
  305. package/SingleValueIcon.config.js.map +2 -2
  306. package/SingleValueIcon.js +512 -287
  307. package/SingleValueIcon.js.map +4 -4
  308. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts +0 -8
  309. package/SingleValueRadial/PureSingleValueRadial/utils/gaugeUtils.d.ts.map +1 -1
  310. package/SingleValueRadial/SingleValueRadial.d.ts.map +1 -1
  311. package/SingleValueRadial/config.d.ts.map +1 -1
  312. package/SingleValueRadial.config.js +76 -24
  313. package/SingleValueRadial.config.js.map +2 -2
  314. package/SingleValueRadial.js +543 -326
  315. package/SingleValueRadial.js.map +4 -4
  316. package/SparkLine/SparkLine.d.ts +57 -0
  317. package/SparkLine/SparkLine.d.ts.map +1 -0
  318. package/SparkLine/index.d.ts +1 -1
  319. package/SparkLine/index.d.ts.map +1 -1
  320. package/SparkLine.js +384 -485
  321. package/SparkLine.js.map +4 -4
  322. package/TRELLIS.md +48 -0
  323. package/Table/PureTable.d.ts +1 -0
  324. package/Table/PureTable.d.ts.map +1 -1
  325. package/Table/Table.d.ts.map +1 -1
  326. package/Table/cells/ArrayCell.d.ts.map +1 -1
  327. package/Table/config.d.ts.map +1 -1
  328. package/Table/hooks.d.ts +1 -1
  329. package/Table/hooks.d.ts.map +1 -1
  330. package/Table/tableUtils.d.ts +14 -0
  331. package/Table/tableUtils.d.ts.map +1 -0
  332. package/Table.config.js +4 -10
  333. package/Table.config.js.map +2 -2
  334. package/Table.js +1158 -846
  335. package/Table.js.map +4 -4
  336. package/Timeline/PureTimeline/src/TimelineYAxis.d.ts.map +1 -1
  337. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts +5 -0
  338. package/Timeline/PureTimeline/src/utils/timelineUtils.d.ts.map +1 -1
  339. package/Timeline/Timeline.d.ts +2 -0
  340. package/Timeline/Timeline.d.ts.map +1 -1
  341. package/Timeline/config.d.ts.map +1 -1
  342. package/Timeline/mockdata/timelineDataSource.d.ts +34 -0
  343. package/Timeline/mockdata/timelineDataSource.d.ts.map +1 -1
  344. package/Timeline.config.js +15 -0
  345. package/Timeline.config.js.map +2 -2
  346. package/Timeline.js +348 -186
  347. package/Timeline.js.map +4 -4
  348. package/common/Charting.d.ts.map +1 -1
  349. package/common/Charting.js +50 -28
  350. package/common/Charting.js.map +2 -2
  351. package/common/ChartingApi.d.ts +1 -1
  352. package/common/ChartingApi.d.ts.map +1 -1
  353. package/common/ChartingApi.js.map +2 -2
  354. package/common/DocExampleWithVizSandbox.js.map +1 -1
  355. package/common/OptionsDoc.js.map +1 -1
  356. package/common/OverviewDoc.js.map +1 -1
  357. package/common/SplunkVisualization.d.ts +1 -1
  358. package/common/SplunkVisualization.d.ts.map +1 -1
  359. package/common/SplunkVisualization.js +6 -4
  360. package/common/SplunkVisualization.js.map +2 -2
  361. package/common/StyledSkipLink.d.ts +2 -0
  362. package/common/StyledSkipLink.d.ts.map +1 -0
  363. package/common/StyledSkipLink.js +81 -0
  364. package/common/StyledSkipLink.js.map +7 -0
  365. package/common/TimeSeriesChartWrapper.d.ts.map +1 -1
  366. package/common/TimeSeriesChartWrapper.js +228 -107
  367. package/common/TimeSeriesChartWrapper.js.map +4 -4
  368. package/common/chartingUtils.d.ts +32 -6
  369. package/common/chartingUtils.d.ts.map +1 -1
  370. package/common/chartingUtils.js +166 -39
  371. package/common/chartingUtils.js.map +4 -4
  372. package/common/components/TrellisTitle.d.ts.map +1 -1
  373. package/common/docUtils.js +1 -1
  374. package/common/docUtils.js.map +2 -2
  375. package/common/editorConfig/AxesChartDataDisplay.d.ts.map +1 -1
  376. package/common/editorConfig/AxesChartYGridAndLabels.d.ts.map +1 -1
  377. package/common/editorConfig/BackgroundColor.d.ts +2 -2
  378. package/common/editorConfig/TrellisEditors.d.ts +33 -5
  379. package/common/editorConfig/TrellisEditors.d.ts.map +1 -1
  380. package/common/hocs/mockdata/trellisData.d.ts +54 -0
  381. package/common/hocs/mockdata/trellisData.d.ts.map +1 -1
  382. package/common/hocs/withTrellis.d.ts +9 -0
  383. package/common/hocs/withTrellis.d.ts.map +1 -1
  384. package/common/hooks/useSorting.d.ts +2 -2
  385. package/common/hooks/useSorting.d.ts.map +1 -1
  386. package/common/shapeUtils.d.ts +1 -1
  387. package/common/shapeUtils.d.ts.map +1 -1
  388. package/common/shapeUtils.js.map +2 -2
  389. package/common/utils/dataUtils.js +2 -1
  390. package/common/utils/dataUtils.js.map +2 -2
  391. package/common/utils/focusUtils.d.ts +4 -0
  392. package/common/utils/focusUtils.d.ts.map +1 -0
  393. package/common/utils/focusUtils.js +101 -0
  394. package/common/utils/focusUtils.js.map +7 -0
  395. package/common/utils/mapUtils.js +513 -184
  396. package/common/utils/mapUtils.js.map +4 -4
  397. package/common/utils/shadowDomUtils.d.ts +2 -0
  398. package/common/utils/shadowDomUtils.d.ts.map +1 -0
  399. package/common/utils/shadowDomUtils.js +39 -0
  400. package/common/utils/shadowDomUtils.js.map +7 -0
  401. package/common/utils/singleValueUtils.js +14 -26
  402. package/common/utils/singleValueUtils.js.map +2 -2
  403. package/common/utils/trellisUtils.d.ts.map +1 -1
  404. package/common/utils/trellisUtils.js +76 -70
  405. package/common/utils/trellisUtils.js.map +2 -2
  406. package/common/withDashboardViz.d.ts.map +1 -1
  407. package/common/withDashboardViz.js +276 -151
  408. package/common/withDashboardViz.js.map +4 -4
  409. package/docs-llm/INDEX.md +118 -0
  410. package/docs-llm/area/examples-json.md +3854 -0
  411. package/docs-llm/area/examples-react.md +2816 -0
  412. package/docs-llm/area/options.md +97 -0
  413. package/docs-llm/area/overview.md +27 -0
  414. package/docs-llm/bar/examples-json.md +3380 -0
  415. package/docs-llm/bar/examples-react.md +2352 -0
  416. package/docs-llm/bar/options.md +89 -0
  417. package/docs-llm/bar/overview.md +25 -0
  418. package/docs-llm/bubble/examples-json.md +4082 -0
  419. package/docs-llm/bubble/examples-react.md +3977 -0
  420. package/docs-llm/bubble/options.md +62 -0
  421. package/docs-llm/bubble/overview.md +26 -0
  422. package/docs-llm/choropleth-svg/examples-json.md +397 -0
  423. package/docs-llm/choropleth-svg/examples-react.md +389 -0
  424. package/docs-llm/choropleth-svg/options.md +15 -0
  425. package/docs-llm/choropleth-svg/overview.md +23 -0
  426. package/docs-llm/column/examples-json.md +3898 -0
  427. package/docs-llm/column/examples-react.md +2653 -0
  428. package/docs-llm/column/options.md +94 -0
  429. package/docs-llm/column/overview.md +31 -0
  430. package/docs-llm/dsl/examples-json.md +43 -0
  431. package/docs-llm/dsl/examples-react.md +78 -0
  432. package/docs-llm/dsl/formatters/format-by-type-examples-json.md +58 -0
  433. package/docs-llm/dsl/formatters/format-by-type-examples-react.md +43 -0
  434. package/docs-llm/dsl/formatters/format-by-type.md +38 -0
  435. package/docs-llm/dsl/formatters/frame-examples-json.md +42 -0
  436. package/docs-llm/dsl/formatters/frame-examples-react.md +24 -0
  437. package/docs-llm/dsl/formatters/frame.md +6 -0
  438. package/docs-llm/dsl/formatters/gradient-examples-json.md +98 -0
  439. package/docs-llm/dsl/formatters/gradient-examples-react.md +44 -0
  440. package/docs-llm/dsl/formatters/gradient.md +23 -0
  441. package/docs-llm/dsl/formatters/lerp-examples-json.md +40 -0
  442. package/docs-llm/dsl/formatters/lerp-examples-react.md +28 -0
  443. package/docs-llm/dsl/formatters/lerp.md +19 -0
  444. package/docs-llm/dsl/formatters/match-value-examples-json.md +65 -0
  445. package/docs-llm/dsl/formatters/match-value-examples-react.md +37 -0
  446. package/docs-llm/dsl/formatters/match-value.md +13 -0
  447. package/docs-llm/dsl/formatters/max-contrast-examples-json.md +39 -0
  448. package/docs-llm/dsl/formatters/max-contrast-examples-react.md +27 -0
  449. package/docs-llm/dsl/formatters/max-contrast.md +9 -0
  450. package/docs-llm/dsl/formatters/multi-format-examples-json.md +67 -0
  451. package/docs-llm/dsl/formatters/multi-format-examples-react.md +49 -0
  452. package/docs-llm/dsl/formatters/multi-format.md +12 -0
  453. package/docs-llm/dsl/formatters/objects-examples-json.md +49 -0
  454. package/docs-llm/dsl/formatters/objects-examples-react.md +37 -0
  455. package/docs-llm/dsl/formatters/objects.md +3 -0
  456. package/docs-llm/dsl/formatters/pick-examples-json.md +59 -0
  457. package/docs-llm/dsl/formatters/pick-examples-react.md +30 -0
  458. package/docs-llm/dsl/formatters/pick.md +9 -0
  459. package/docs-llm/dsl/formatters/prefix-examples-json.md +29 -0
  460. package/docs-llm/dsl/formatters/prefix-examples-react.md +19 -0
  461. package/docs-llm/dsl/formatters/prefix.md +3 -0
  462. package/docs-llm/dsl/formatters/prepend-examples-json.md +51 -0
  463. package/docs-llm/dsl/formatters/prepend-examples-react.md +33 -0
  464. package/docs-llm/dsl/formatters/prepend.md +9 -0
  465. package/docs-llm/dsl/formatters/range-value-examples-json.md +48 -0
  466. package/docs-llm/dsl/formatters/range-value-examples-react.md +34 -0
  467. package/docs-llm/dsl/formatters/range-value.md +15 -0
  468. package/docs-llm/dsl/formatters/set-color-channel-examples-json.md +40 -0
  469. package/docs-llm/dsl/formatters/set-color-channel-examples-react.md +31 -0
  470. package/docs-llm/dsl/formatters/set-color-channel.md +9 -0
  471. package/docs-llm/dsl/formatters/suffix-examples-json.md +29 -0
  472. package/docs-llm/dsl/formatters/suffix-examples-react.md +19 -0
  473. package/docs-llm/dsl/formatters/suffix.md +3 -0
  474. package/docs-llm/dsl/formatters/type-examples-json.md +37 -0
  475. package/docs-llm/dsl/formatters/type-examples-react.md +20 -0
  476. package/docs-llm/dsl/formatters/type.md +3 -0
  477. package/docs-llm/dsl/overview.md +41 -0
  478. package/docs-llm/dsl/selectors/abs.md +7 -0
  479. package/docs-llm/dsl/selectors/ceil.md +7 -0
  480. package/docs-llm/dsl/selectors/data-frame-average-examples-json.md +41 -0
  481. package/docs-llm/dsl/selectors/data-frame-average-examples-react.md +36 -0
  482. package/docs-llm/dsl/selectors/data-frame-average.md +7 -0
  483. package/docs-llm/dsl/selectors/data-frame-count-examples-json.md +41 -0
  484. package/docs-llm/dsl/selectors/data-frame-count-examples-react.md +36 -0
  485. package/docs-llm/dsl/selectors/data-frame-count.md +7 -0
  486. package/docs-llm/dsl/selectors/data-frame-examples-json.md +830 -0
  487. package/docs-llm/dsl/selectors/data-frame-examples-react.md +929 -0
  488. package/docs-llm/dsl/selectors/data-frame-get-field-examples-json.md +89 -0
  489. package/docs-llm/dsl/selectors/data-frame-get-field-examples-react.md +124 -0
  490. package/docs-llm/dsl/selectors/data-frame-get-field.md +5 -0
  491. package/docs-llm/dsl/selectors/data-frame-get-raw-value.md +5 -0
  492. package/docs-llm/dsl/selectors/data-frame-get-type.md +5 -0
  493. package/docs-llm/dsl/selectors/data-frame-get-value.md +5 -0
  494. package/docs-llm/dsl/selectors/data-frame-max-examples-json.md +51 -0
  495. package/docs-llm/dsl/selectors/data-frame-max-examples-react.md +41 -0
  496. package/docs-llm/dsl/selectors/data-frame-max.md +7 -0
  497. package/docs-llm/dsl/selectors/data-frame-min-examples-json.md +51 -0
  498. package/docs-llm/dsl/selectors/data-frame-min-examples-react.md +41 -0
  499. package/docs-llm/dsl/selectors/data-frame-min.md +7 -0
  500. package/docs-llm/dsl/selectors/data-frame-percentile-examples-json.md +41 -0
  501. package/docs-llm/dsl/selectors/data-frame-percentile-examples-react.md +36 -0
  502. package/docs-llm/dsl/selectors/data-frame-percentile.md +8 -0
  503. package/docs-llm/dsl/selectors/data-frame-set-value.md +5 -0
  504. package/docs-llm/dsl/selectors/data-frame-sum-examples-json.md +51 -0
  505. package/docs-llm/dsl/selectors/data-frame-sum-examples-react.md +41 -0
  506. package/docs-llm/dsl/selectors/data-frame-sum.md +7 -0
  507. package/docs-llm/dsl/selectors/data-frame.md +4 -0
  508. package/docs-llm/dsl/selectors/data-point-get-field.md +5 -0
  509. package/docs-llm/dsl/selectors/data-point-get-raw-value.md +4 -0
  510. package/docs-llm/dsl/selectors/data-point-get-type.md +5 -0
  511. package/docs-llm/dsl/selectors/data-point-get-value.md +5 -0
  512. package/docs-llm/dsl/selectors/data-point-set-value.md +4 -0
  513. package/docs-llm/dsl/selectors/data-point.md +5 -0
  514. package/docs-llm/dsl/selectors/data-series-average.md +22 -0
  515. package/docs-llm/dsl/selectors/data-series-count.md +14 -0
  516. package/docs-llm/dsl/selectors/data-series-get-field.md +5 -0
  517. package/docs-llm/dsl/selectors/data-series-get-raw-value.md +4 -0
  518. package/docs-llm/dsl/selectors/data-series-get-type.md +5 -0
  519. package/docs-llm/dsl/selectors/data-series-get-value.md +4 -0
  520. package/docs-llm/dsl/selectors/data-series-max.md +5 -0
  521. package/docs-llm/dsl/selectors/data-series-min.md +5 -0
  522. package/docs-llm/dsl/selectors/data-series-percentile.md +17 -0
  523. package/docs-llm/dsl/selectors/data-series-set-value.md +4 -0
  524. package/docs-llm/dsl/selectors/data-series-sum.md +24 -0
  525. package/docs-llm/dsl/selectors/data-series.md +4 -0
  526. package/docs-llm/dsl/selectors/delta.md +7 -0
  527. package/docs-llm/dsl/selectors/divide.md +8 -0
  528. package/docs-llm/dsl/selectors/first-point.md +5 -0
  529. package/docs-llm/dsl/selectors/floor.md +7 -0
  530. package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-json.md +89 -0
  531. package/docs-llm/dsl/selectors/frame-by-series-index-range-examples-react.md +88 -0
  532. package/docs-llm/dsl/selectors/frame-by-series-index-range.md +10 -0
  533. package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-json.md +88 -0
  534. package/docs-llm/dsl/selectors/frame-by-series-indexes-examples-react.md +87 -0
  535. package/docs-llm/dsl/selectors/frame-by-series-indexes.md +9 -0
  536. package/docs-llm/dsl/selectors/frame-by-series-names-examples-json.md +89 -0
  537. package/docs-llm/dsl/selectors/frame-by-series-names-examples-react.md +88 -0
  538. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-json.md +89 -0
  539. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes-examples-react.md +88 -0
  540. package/docs-llm/dsl/selectors/frame-by-series-names-or-indexes.md +9 -0
  541. package/docs-llm/dsl/selectors/frame-by-series-names.md +9 -0
  542. package/docs-llm/dsl/selectors/frame-by-series-types-examples-json.md +89 -0
  543. package/docs-llm/dsl/selectors/frame-by-series-types-examples-react.md +88 -0
  544. package/docs-llm/dsl/selectors/frame-by-series-types.md +9 -0
  545. package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-json.md +137 -0
  546. package/docs-llm/dsl/selectors/frame-without-internal-fields-examples-react.md +135 -0
  547. package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-json.md +157 -0
  548. package/docs-llm/dsl/selectors/frame-without-internal-fields-except-examples-react.md +155 -0
  549. package/docs-llm/dsl/selectors/frame-without-internal-fields-except.md +21 -0
  550. package/docs-llm/dsl/selectors/frame-without-internal-fields.md +17 -0
  551. package/docs-llm/dsl/selectors/frame-without-series-names.md +8 -0
  552. package/docs-llm/dsl/selectors/last-point.md +5 -0
  553. package/docs-llm/dsl/selectors/minus.md +8 -0
  554. package/docs-llm/dsl/selectors/multiply.md +8 -0
  555. package/docs-llm/dsl/selectors/plus.md +8 -0
  556. package/docs-llm/dsl/selectors/point-by-index.md +6 -0
  557. package/docs-llm/dsl/selectors/points-by-indexes.md +6 -0
  558. package/docs-llm/dsl/selectors/round.md +7 -0
  559. package/docs-llm/dsl/selectors/series-by-index-examples-json.md +49 -0
  560. package/docs-llm/dsl/selectors/series-by-index-examples-react.md +39 -0
  561. package/docs-llm/dsl/selectors/series-by-index.md +8 -0
  562. package/docs-llm/dsl/selectors/series-by-name-examples-json.md +49 -0
  563. package/docs-llm/dsl/selectors/series-by-name-examples-react.md +39 -0
  564. package/docs-llm/dsl/selectors/series-by-name.md +8 -0
  565. package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-json.md +47 -0
  566. package/docs-llm/dsl/selectors/series-by-prioritized-types-examples-react.md +39 -0
  567. package/docs-llm/dsl/selectors/series-by-prioritized-types.md +10 -0
  568. package/docs-llm/dsl/selectors/series-by-type-examples-json.md +49 -0
  569. package/docs-llm/dsl/selectors/series-by-type-examples-react.md +39 -0
  570. package/docs-llm/dsl/selectors/series-by-type.md +10 -0
  571. package/docs-llm/dsl/selectors/series-by-types.md +6 -0
  572. package/docs-llm/ellipse/examples-json.md +5 -0
  573. package/docs-llm/ellipse/examples-react.md +5 -0
  574. package/docs-llm/ellipse/options.md +16 -0
  575. package/docs-llm/ellipse/overview.md +5 -0
  576. package/docs-llm/events/examples-json.md +705 -0
  577. package/docs-llm/events/examples-react.md +536 -0
  578. package/docs-llm/events/options.md +18 -0
  579. package/docs-llm/events/overview.md +5 -0
  580. package/docs-llm/filler-gauge/examples-json.md +376 -0
  581. package/docs-llm/filler-gauge/examples-react.md +274 -0
  582. package/docs-llm/filler-gauge/options.md +26 -0
  583. package/docs-llm/filler-gauge/overview.md +5 -0
  584. package/docs-llm/image/examples-json.md +39 -0
  585. package/docs-llm/image/examples-react.md +65 -0
  586. package/docs-llm/image/options.md +13 -0
  587. package/docs-llm/image/overview.md +5 -0
  588. package/docs-llm/line/examples-json.md +3724 -0
  589. package/docs-llm/line/examples-react.md +2683 -0
  590. package/docs-llm/line/options.md +95 -0
  591. package/docs-llm/line/overview.md +29 -0
  592. package/docs-llm/link-graph/examples-json.md +5 -0
  593. package/docs-llm/link-graph/examples-react.md +5 -0
  594. package/docs-llm/link-graph/options.md +26 -0
  595. package/docs-llm/link-graph/overview.md +16 -0
  596. package/docs-llm/map/examples-json.md +13973 -0
  597. package/docs-llm/map/examples-react.md +6154 -0
  598. package/docs-llm/map/options.md +22 -0
  599. package/docs-llm/map/overview.md +32 -0
  600. package/docs-llm/markdown/examples-json.md +63 -0
  601. package/docs-llm/markdown/examples-react.md +98 -0
  602. package/docs-llm/markdown/options.md +17 -0
  603. package/docs-llm/markdown/overview.md +5 -0
  604. package/docs-llm/marker-gauge/examples-json.md +436 -0
  605. package/docs-llm/marker-gauge/examples-react.md +367 -0
  606. package/docs-llm/marker-gauge/options.md +26 -0
  607. package/docs-llm/marker-gauge/overview.md +5 -0
  608. package/docs-llm/network-graph/examples-json.md +8843 -0
  609. package/docs-llm/network-graph/examples-react.md +7339 -0
  610. package/docs-llm/network-graph/options.md +50 -0
  611. package/docs-llm/network-graph/overview.md +28 -0
  612. package/docs-llm/parallel-coordinates/examples-json.md +8376 -0
  613. package/docs-llm/parallel-coordinates/examples-react.md +2771 -0
  614. package/docs-llm/parallel-coordinates/options.md +14 -0
  615. package/docs-llm/parallel-coordinates/overview.md +22 -0
  616. package/docs-llm/pie/examples-json.md +851 -0
  617. package/docs-llm/pie/examples-react.md +606 -0
  618. package/docs-llm/pie/options.md +34 -0
  619. package/docs-llm/pie/overview.md +23 -0
  620. package/docs-llm/process-tree/options.md +32 -0
  621. package/docs-llm/punchcard/examples-json.md +6134 -0
  622. package/docs-llm/punchcard/examples-react.md +4562 -0
  623. package/docs-llm/punchcard/options.md +33 -0
  624. package/docs-llm/punchcard/overview.md +5 -0
  625. package/docs-llm/pure-rich-text/options.md +28 -0
  626. package/docs-llm/rectangle/examples-json.md +5 -0
  627. package/docs-llm/rectangle/examples-react.md +5 -0
  628. package/docs-llm/rectangle/options.md +19 -0
  629. package/docs-llm/rectangle/overview.md +5 -0
  630. package/docs-llm/rich-text/examples-json.md +96 -0
  631. package/docs-llm/rich-text/examples-react.md +119 -0
  632. package/docs-llm/rich-text/options.md +28 -0
  633. package/docs-llm/rich-text/overview.md +5 -0
  634. package/docs-llm/sankey/examples-json.md +844 -0
  635. package/docs-llm/sankey/examples-react.md +546 -0
  636. package/docs-llm/sankey/options.md +19 -0
  637. package/docs-llm/sankey/overview.md +24 -0
  638. package/docs-llm/scatter/examples-json.md +4012 -0
  639. package/docs-llm/scatter/examples-react.md +3914 -0
  640. package/docs-llm/scatter/options.md +68 -0
  641. package/docs-llm/scatter/overview.md +25 -0
  642. package/docs-llm/single-value/examples-json.md +2613 -0
  643. package/docs-llm/single-value/examples-react.md +2296 -0
  644. package/docs-llm/single-value/options.md +49 -0
  645. package/docs-llm/single-value/overview.md +23 -0
  646. package/docs-llm/single-value-icon/examples-json.md +1686 -0
  647. package/docs-llm/single-value-icon/examples-react.md +1573 -0
  648. package/docs-llm/single-value-icon/options.md +43 -0
  649. package/docs-llm/single-value-icon/overview.md +5 -0
  650. package/docs-llm/single-value-radial/examples-json.md +1178 -0
  651. package/docs-llm/single-value-radial/examples-react.md +1028 -0
  652. package/docs-llm/single-value-radial/options.md +41 -0
  653. package/docs-llm/single-value-radial/overview.md +5 -0
  654. package/docs-llm/table/examples-json.md +5 -0
  655. package/docs-llm/table/examples-react.md +5 -0
  656. package/docs-llm/table/options.md +25 -0
  657. package/docs-llm/table/overview.md +24 -0
  658. package/docs-llm/timeline/examples-json.md +5 -0
  659. package/docs-llm/timeline/examples-react.md +5 -0
  660. package/docs-llm/timeline/options.md +27 -0
  661. package/docs-llm/timeline/overview.md +24 -0
  662. package/package.json +39 -30
  663. package/LICENSE.md +0 -449
package/Map.js CHANGED
@@ -12,6 +12,7 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
12
12
  var __getProtoOf = Object.getPrototypeOf;
13
13
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
14
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
15
+ var __pow = Math.pow;
15
16
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
17
  var __spreadValues = (a, b) => {
17
18
  for (var prop in b || (b = {}))
@@ -59,6 +60,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
59
60
  mod
60
61
  ));
61
62
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
63
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
62
64
  var __async = (__this, __arguments, generator) => {
63
65
  return new Promise((resolve, reject) => {
64
66
  var fulfilled = (value) => {
@@ -191,104 +193,273 @@ var defaultImport11 = __toESM(require("@splunk/react-ui/Button"));
191
193
  __reExport(Button_exports, require("@splunk/react-ui/Button"));
192
194
  var Button_default = "default" in defaultImport11 ? defaultImport11.default : defaultImport11;
193
195
 
196
+ // esm-externals:@splunk/react-ui/Tooltip
197
+ var Tooltip_exports = {};
198
+ __export(Tooltip_exports, {
199
+ default: () => Tooltip_default
200
+ });
201
+ var defaultImport12 = __toESM(require("@splunk/react-ui/Tooltip"));
202
+ __reExport(Tooltip_exports, require("@splunk/react-ui/Tooltip"));
203
+ var Tooltip_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
204
+
194
205
  // esm-externals:@splunk/visualization-context/MapContext
195
206
  var MapContext_exports = {};
196
207
  __export(MapContext_exports, {
197
208
  default: () => MapContext_default
198
209
  });
199
- var defaultImport12 = __toESM(require("@splunk/visualization-context/MapContext"));
210
+ var defaultImport13 = __toESM(require("@splunk/visualization-context/MapContext"));
200
211
  __reExport(MapContext_exports, require("@splunk/visualization-context/MapContext"));
201
- var MapContext_default = "default" in defaultImport12 ? defaultImport12.default : defaultImport12;
212
+ var MapContext_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
202
213
 
203
214
  // esm-externals:@splunk/visualization-schemas
204
215
  var visualization_schemas_exports = {};
205
216
  __export(visualization_schemas_exports, {
206
217
  default: () => visualization_schemas_default
207
218
  });
208
- var defaultImport13 = __toESM(require("@splunk/visualization-schemas"));
219
+ var defaultImport14 = __toESM(require("@splunk/visualization-schemas"));
209
220
  __reExport(visualization_schemas_exports, require("@splunk/visualization-schemas"));
210
- var visualization_schemas_default = "default" in defaultImport13 ? defaultImport13.default : defaultImport13;
221
+ var visualization_schemas_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
222
+
223
+ // src/common/utils/shadowDomUtils.ts
224
+ var getFloatingLayerStyleTarget = (anchor) => {
225
+ if (!anchor || typeof anchor.getRootNode !== "function") {
226
+ return void 0;
227
+ }
228
+ const rootNode = anchor.getRootNode();
229
+ if (typeof ShadowRoot !== "undefined" && rootNode instanceof ShadowRoot) {
230
+ return anchor.ownerDocument.head;
231
+ }
232
+ return void 0;
233
+ };
211
234
 
212
235
  // esm-externals:@splunk/visualizations-shared/style
213
236
  var style_exports = {};
214
237
  __export(style_exports, {
215
238
  default: () => style_default
216
239
  });
217
- var defaultImport14 = __toESM(require("@splunk/visualizations-shared/style"));
240
+ var defaultImport15 = __toESM(require("@splunk/visualizations-shared/style"));
218
241
  __reExport(style_exports, require("@splunk/visualizations-shared/style"));
219
- var style_default = "default" in defaultImport14 ? defaultImport14.default : defaultImport14;
242
+ var style_default = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
220
243
 
221
244
  // esm-externals:maplibre-gl/dist/maplibre-gl.css
222
245
  var maplibre_gl_exports2 = {};
223
246
  __export(maplibre_gl_exports2, {
224
247
  default: () => maplibre_gl_default2
225
248
  });
226
- var defaultImport15 = __toESM(require("maplibre-gl/dist/maplibre-gl.css"));
249
+ var defaultImport16 = __toESM(require("maplibre-gl/dist/maplibre-gl.css"));
227
250
  __reExport(maplibre_gl_exports2, require("maplibre-gl/dist/maplibre-gl.css"));
228
- var maplibre_gl_default2 = "default" in defaultImport15 ? defaultImport15.default : defaultImport15;
251
+ var maplibre_gl_default2 = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
229
252
 
230
253
  // esm-externals:@splunk/visualizations-shared/iconUtils
231
254
  var iconUtils_exports = {};
232
255
  __export(iconUtils_exports, {
233
256
  default: () => iconUtils_default
234
257
  });
235
- var defaultImport16 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
258
+ var defaultImport17 = __toESM(require("@splunk/visualizations-shared/iconUtils"));
236
259
  __reExport(iconUtils_exports, require("@splunk/visualizations-shared/iconUtils"));
237
- var iconUtils_default = "default" in defaultImport16 ? defaultImport16.default : defaultImport16;
260
+ var iconUtils_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
238
261
 
239
262
  // esm-externals:@splunk/visualizations-shared/RemoteIcon
240
263
  var RemoteIcon_exports = {};
241
264
  __export(RemoteIcon_exports, {
242
265
  default: () => RemoteIcon_default
243
266
  });
244
- var defaultImport17 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
267
+ var defaultImport18 = __toESM(require("@splunk/visualizations-shared/RemoteIcon"));
245
268
  __reExport(RemoteIcon_exports, require("@splunk/visualizations-shared/RemoteIcon"));
246
- var RemoteIcon_default = "default" in defaultImport17 ? defaultImport17.default : defaultImport17;
269
+ var RemoteIcon_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
247
270
 
248
271
  // esm-externals:@splunk/visualization-context/FeatureFlagContext
249
272
  var FeatureFlagContext_exports = {};
250
273
  __export(FeatureFlagContext_exports, {
251
274
  default: () => FeatureFlagContext_default
252
275
  });
253
- var defaultImport18 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
276
+ var defaultImport19 = __toESM(require("@splunk/visualization-context/FeatureFlagContext"));
254
277
  __reExport(FeatureFlagContext_exports, require("@splunk/visualization-context/FeatureFlagContext"));
255
- var FeatureFlagContext_default = "default" in defaultImport18 ? defaultImport18.default : defaultImport18;
278
+ var FeatureFlagContext_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
279
+
280
+ // esm-externals:@splunk/ui-utils/format
281
+ var format_exports = {};
282
+ __export(format_exports, {
283
+ default: () => format_default
284
+ });
285
+ var defaultImport20 = __toESM(require("@splunk/ui-utils/format"));
286
+ __reExport(format_exports, require("@splunk/ui-utils/format"));
287
+ var format_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
288
+
289
+ // src/Map/PureMap/keyboardConstants.ts
290
+ var KEYBOARD_KEYS = {
291
+ ARROW_RIGHT: "ArrowRight",
292
+ ARROW_LEFT: "ArrowLeft",
293
+ ARROW_UP: "ArrowUp",
294
+ ARROW_DOWN: "ArrowDown",
295
+ HOME: "Home",
296
+ END: "End",
297
+ ENTER: "Enter",
298
+ SPACE: " "
299
+ };
300
+
301
+ // esm-externals:@splunk/react-ui/Popover
302
+ var Popover_exports = {};
303
+ __export(Popover_exports, {
304
+ default: () => Popover_default
305
+ });
306
+ var defaultImport21 = __toESM(require("@splunk/react-ui/Popover"));
307
+ __reExport(Popover_exports, require("@splunk/react-ui/Popover"));
308
+ var Popover_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
309
+
310
+ // esm-externals:@splunk/themes
311
+ var themes_exports = {};
312
+ __export(themes_exports, {
313
+ default: () => themes_default
314
+ });
315
+ var defaultImport22 = __toESM(require("@splunk/themes"));
316
+ __reExport(themes_exports, require("@splunk/themes"));
317
+ var themes_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
256
318
 
257
319
  // esm-externals:@splunk/ui-utils/id
258
320
  var id_exports = {};
259
321
  __export(id_exports, {
260
322
  default: () => id_default
261
323
  });
262
- var defaultImport19 = __toESM(require("@splunk/ui-utils/id"));
324
+ var defaultImport23 = __toESM(require("@splunk/ui-utils/id"));
263
325
  __reExport(id_exports, require("@splunk/ui-utils/id"));
264
- var id_default = "default" in defaultImport19 ? defaultImport19.default : defaultImport19;
326
+ var id_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
327
+
328
+ // src/Map/PureMap/Tooltip.tsx
329
+ var StyledPopover = styled_components_default(Popover_default)`
330
+ min-width: 250px;
331
+ max-width: 332px;
332
+ max-width: fit-content;
333
+ font-size: 12px;
334
+ `;
335
+ var StyledTable = styled_components_default.table`
336
+ margin: 2px 6px 2px 6px;
337
+ width: calc(100% - 12px);
338
+ `;
339
+ var StyledTitleColumn = styled_components_default.td`
340
+ opacity: 0.85;
341
+ word-break: break-all;
342
+ vertical-align: top;
343
+ `;
344
+ var StyledValueColumn = styled_components_default.td`
345
+ text-align: right;
346
+ word-break: break-all;
347
+ vertical-align: top;
348
+ `;
349
+ var StyledColorBlock = styled_components_default.div`
350
+ background-color: ${(props) => props.color};
351
+ display: inline-block;
352
+ margin-right: 4px;
353
+ border-radius: 2px;
354
+ width: 6px;
355
+ height: 11px;
356
+ transform: translateY(1px);
357
+ `;
358
+ var StyledIconWrapper = styled_components_default.span`
359
+ margin-left: 4px;
360
+ display: inline-block;
361
+ vertical-align: middle;
362
+ `;
363
+ var StyledTooltipHeader = styled_components_default.thead`
364
+ th {
365
+ height: 16px;
366
+ color: ${themes_exports.variables.contentColorActive};
367
+ padding: 0;
368
+ }
369
+
370
+ span {
371
+ display: block;
372
+ white-space: nowrap;
373
+ overflow: hidden;
374
+ text-overflow: ellipsis;
375
+ width: 100%;
376
+ }
377
+ `;
378
+ var convertDegToDMS = (decimalDegree, type) => {
379
+ const truncate = (n) => n > 0 ? Math.floor(n) : Math.ceil(n);
380
+ const absoluteDegree = Math.abs(decimalDegree);
381
+ let degrees = truncate(absoluteDegree);
382
+ let minutes = truncate((absoluteDegree - degrees) * 60);
383
+ let seconds = Math.round((absoluteDegree - degrees - minutes / 60) * 3600);
384
+ if (seconds === 60) {
385
+ minutes += 1;
386
+ seconds = 0;
387
+ }
388
+ if (minutes === 60) {
389
+ degrees += 1;
390
+ minutes = 0;
391
+ }
392
+ let direction;
393
+ if (type === "longitude") {
394
+ direction = decimalDegree < 0 ? "W" : "E";
395
+ } else if (type === "latitude") {
396
+ direction = decimalDegree < 0 ? "S" : "N";
397
+ }
398
+ return `${degrees}\xB0 ${minutes}' ${seconds}" ${direction}`;
399
+ };
400
+ var Tooltip = ({
401
+ id,
402
+ open,
403
+ anchor,
404
+ latitude,
405
+ longitude,
406
+ areaId,
407
+ areaValue,
408
+ additionalFields = [],
409
+ showCoordinates = true,
410
+ tooltipHeader = null,
411
+ stylesManagedExternally = false,
412
+ onMouseEnter,
413
+ onMouseLeave
414
+ }) => {
415
+ const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
416
+ const isTooltipIconFlagEnabled = Boolean(featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableTooltipIcon);
417
+ const styleTarget = stylesManagedExternally ? void 0 : getFloatingLayerStyleTarget(anchor);
418
+ const popover = /* @__PURE__ */ react_exports.createElement(
419
+ StyledPopover,
420
+ {
421
+ id,
422
+ role: "tooltip",
423
+ open,
424
+ animation: false,
425
+ anchor,
426
+ "data-test": "map-marker-tooltip",
427
+ defaultPlacement: "above",
428
+ onMouseEnter,
429
+ onMouseLeave
430
+ },
431
+ /* @__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)))))
432
+ );
433
+ return styleTarget ? /* @__PURE__ */ react_exports.createElement(styled_components_exports.StyleSheetManager, { target: styleTarget }, popover) : popover;
434
+ };
435
+ var Tooltip_default2 = Tooltip;
265
436
 
266
437
  // esm-externals:d3-scale
267
438
  var d3_scale_exports = {};
268
439
  __export(d3_scale_exports, {
269
440
  default: () => d3_scale_default
270
441
  });
271
- var defaultImport20 = __toESM(require("d3-scale"));
442
+ var defaultImport24 = __toESM(require("d3-scale"));
272
443
  __reExport(d3_scale_exports, require("d3-scale"));
273
- var d3_scale_default = "default" in defaultImport20 ? defaultImport20.default : defaultImport20;
444
+ var d3_scale_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
274
445
 
275
446
  // esm-externals:@splunk/visualization-color-palettes
276
447
  var visualization_color_palettes_exports = {};
277
448
  __export(visualization_color_palettes_exports, {
278
449
  default: () => visualization_color_palettes_default
279
450
  });
280
- var defaultImport21 = __toESM(require("@splunk/visualization-color-palettes"));
451
+ var defaultImport25 = __toESM(require("@splunk/visualization-color-palettes"));
281
452
  __reExport(visualization_color_palettes_exports, require("@splunk/visualization-color-palettes"));
282
- var visualization_color_palettes_default = "default" in defaultImport21 ? defaultImport21.default : defaultImport21;
453
+ var visualization_color_palettes_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
283
454
 
284
455
  // esm-externals:@splunk/visualization-encoding/utils/types
285
456
  var types_exports = {};
286
457
  __export(types_exports, {
287
458
  default: () => types_default
288
459
  });
289
- var defaultImport22 = __toESM(require("@splunk/visualization-encoding/utils/types"));
460
+ var defaultImport26 = __toESM(require("@splunk/visualization-encoding/utils/types"));
290
461
  __reExport(types_exports, require("@splunk/visualization-encoding/utils/types"));
291
- var types_default = "default" in defaultImport22 ? defaultImport22.default : defaultImport22;
462
+ var types_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
292
463
 
293
464
  // src/Map/PureMap/MapUtils.ts
294
465
  var MAX_LATITUDE = 90;
@@ -472,7 +643,7 @@ var transposeArray = (array2) => {
472
643
  if (!(array2 == null ? void 0 : array2.length) || !((_a = array2[0]) == null ? void 0 : _a.length)) {
473
644
  return [];
474
645
  }
475
- return array2[0].map((_7, i) => array2.map((row) => row[i]));
646
+ return array2[0].map((_10, i) => array2.map((row) => row[i]));
476
647
  };
477
648
  var sanitizeValues = (values) => {
478
649
  if (!values) {
@@ -650,124 +821,30 @@ var formatMetadata = (choroplethLayer, i) => {
650
821
  }, base);
651
822
  };
652
823
 
653
- // esm-externals:@splunk/react-ui/Popover
654
- var Popover_exports = {};
655
- __export(Popover_exports, {
656
- default: () => Popover_default
657
- });
658
- var defaultImport23 = __toESM(require("@splunk/react-ui/Popover"));
659
- __reExport(Popover_exports, require("@splunk/react-ui/Popover"));
660
- var Popover_default = "default" in defaultImport23 ? defaultImport23.default : defaultImport23;
661
-
662
- // esm-externals:@splunk/themes
663
- var themes_exports = {};
664
- __export(themes_exports, {
665
- default: () => themes_default
666
- });
667
- var defaultImport24 = __toESM(require("@splunk/themes"));
668
- __reExport(themes_exports, require("@splunk/themes"));
669
- var themes_default = "default" in defaultImport24 ? defaultImport24.default : defaultImport24;
670
-
671
- // src/Map/PureMap/Tooltip.tsx
672
- var StyledPopover = styled_components_default(Popover_default)`
673
- min-width: 250px;
674
- max-width: 332px;
675
- max-width: fit-content;
676
- font-size: 12px;
677
- `;
678
- var StyledTable = styled_components_default.table`
679
- margin: 2px 6px 2px 6px;
680
- width: calc(100% - 12px);
681
- `;
682
- var StyledTitleColumn = styled_components_default.td`
683
- opacity: 0.85;
684
- word-break: break-all;
685
- vertical-align: top;
686
- `;
687
- var StyledValueColumn = styled_components_default.td`
688
- text-align: right;
689
- word-break: break-all;
690
- vertical-align: top;
691
- `;
692
- var StyledColorBlock = styled_components_default.div`
693
- background-color: ${(props) => props.color};
694
- display: inline-block;
695
- margin-right: 4px;
696
- border-radius: 2px;
697
- width: 6px;
698
- height: 11px;
699
- transform: translateY(1px);
700
- `;
701
- var StyledIconWrapper = styled_components_default.span`
702
- margin-left: 4px;
703
- display: inline-block;
704
- vertical-align: middle;
705
- `;
706
- var StyledTooltipHeader = styled_components_default.thead`
707
- th {
708
- height: 16px;
709
- color: ${themes_exports.variables.contentColorActive};
710
- padding: 0;
711
- }
712
-
713
- span {
714
- display: block;
715
- white-space: nowrap;
716
- overflow: hidden;
717
- text-overflow: ellipsis;
718
- width: 100%;
719
- }
720
- `;
721
- var convertDegToDMS = (decimalDegree, type) => {
722
- const truncate = (n) => n > 0 ? Math.floor(n) : Math.ceil(n);
723
- const absoluteDegree = Math.abs(decimalDegree);
724
- let degrees = truncate(absoluteDegree);
725
- let minutes = truncate((absoluteDegree - degrees) * 60);
726
- let seconds = Math.round((absoluteDegree - degrees - minutes / 60) * 3600);
727
- if (seconds === 60) {
728
- minutes += 1;
729
- seconds = 0;
730
- }
731
- if (minutes === 60) {
732
- degrees += 1;
733
- minutes = 0;
734
- }
735
- let direction;
736
- if (type === "longitude") {
737
- direction = decimalDegree < 0 ? "W" : "E";
738
- } else if (type === "latitude") {
739
- direction = decimalDegree < 0 ? "S" : "N";
824
+ // src/Map/PureMap/MapContext.tsx
825
+ var MapContext = react_exports.createContext({
826
+ activeTooltipId: null,
827
+ setActiveTooltipId: () => {
828
+ },
829
+ activeChoroplethId: null,
830
+ setActiveChoroplethId: () => {
740
831
  }
741
- return `${degrees}\xB0 ${minutes}' ${seconds}" ${direction}`;
742
- };
743
- var Tooltip = ({
744
- open,
745
- anchor,
746
- latitude,
747
- longitude,
748
- areaId,
749
- areaValue,
750
- additionalFields = [],
751
- showCoordinates = true,
752
- tooltipHeader = null
753
- }) => {
754
- const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
755
- const isTooltipIconFlagEnabled = Boolean(
756
- featureFlagContext && featureFlagContext.visualizations_enableTooltipIcon
757
- );
758
- return /* @__PURE__ */ react_exports.createElement(
759
- StyledPopover,
760
- {
761
- open,
762
- animation: false,
763
- anchor,
764
- "data-test": "map-marker-tooltip",
765
- defaultPlacement: "above"
766
- },
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)))))
832
+ });
833
+ var MapProvider = ({ children }) => {
834
+ const [activeTooltipId, setActiveTooltipId] = react_exports.useState(null);
835
+ const [activeChoroplethId, setActiveChoroplethId] = react_exports.useState(null);
836
+ const value = react_exports.useMemo(
837
+ () => ({
838
+ activeTooltipId,
839
+ setActiveTooltipId,
840
+ activeChoroplethId,
841
+ setActiveChoroplethId
842
+ }),
843
+ [activeTooltipId, activeChoroplethId]
768
844
  );
845
+ return /* @__PURE__ */ react_exports.createElement(MapContext.Provider, { value }, children);
769
846
  };
770
- var Tooltip_default = Tooltip;
847
+ var useMapContext = () => react_exports.useContext(MapContext);
771
848
 
772
849
  // src/Map/PureMap/MarkerWrapper.tsx
773
850
  var MarkerWrapper = (_a) => {
@@ -779,9 +856,10 @@ var MarkerWrapper = (_a) => {
779
856
  additionalFields = [],
780
857
  tooltipHeader = null,
781
858
  map,
782
- isChoroplethTooltipOpen,
783
859
  children,
784
- showCoordinates = true
860
+ showCoordinates = true,
861
+ stylesManagedExternally = false,
862
+ customMarkerId
785
863
  } = _b, otherProps = __objRest(_b, [
786
864
  "longitude",
787
865
  "latitude",
@@ -790,19 +868,120 @@ var MarkerWrapper = (_a) => {
790
868
  "additionalFields",
791
869
  "tooltipHeader",
792
870
  "map",
793
- "isChoroplethTooltipOpen",
794
871
  "children",
795
- "showCoordinates"
872
+ "showCoordinates",
873
+ "stylesManagedExternally",
874
+ "customMarkerId"
796
875
  ]);
797
876
  const container = react_exports.useRef();
798
877
  const marker = react_exports.useRef();
799
878
  const [isTooltipOpen, setTooltipOpenStatus] = react_exports.useState(false);
800
- const isChoroplethTooltip = react_exports.useCallback(
801
- () => isChoroplethTooltipOpen !== void 0,
802
- [isChoroplethTooltipOpen]
879
+ const [isFocused, setIsFocused] = react_exports.useState(false);
880
+ const [isHovered, setIsHovered] = react_exports.useState(false);
881
+ const [isPopoverHovered, setIsPopoverHovered] = react_exports.useState(false);
882
+ const tooltipId = react_exports.useMemo(() => (0, id_exports.createDOMID)(), []);
883
+ const pendingMoveEndHandler = react_exports.useRef(null);
884
+ const closeTimeoutRef = react_exports.useRef(null);
885
+ const generatedMarkerId = react_exports.useMemo(() => (0, id_exports.createDOMID)(), []);
886
+ const markerId = customMarkerId || generatedMarkerId;
887
+ const { activeTooltipId, setActiveTooltipId } = useMapContext();
888
+ const mapMoveHandlerRef = react_exports.useRef(null);
889
+ const openTooltip = react_exports.useCallback(() => {
890
+ setActiveTooltipId(markerId);
891
+ setTooltipOpenStatus(true);
892
+ }, [markerId, setActiveTooltipId]);
893
+ const cleanupPendingMoveEnd = react_exports.useCallback(() => {
894
+ if (pendingMoveEndHandler.current && map.current && typeof map.current.off === "function") {
895
+ map.current.off("moveend", pendingMoveEndHandler.current);
896
+ pendingMoveEndHandler.current = null;
897
+ }
898
+ }, [map]);
899
+ const cleanupMapMoveHandler = react_exports.useCallback(() => {
900
+ if (mapMoveHandlerRef.current && map.current && typeof map.current.off === "function") {
901
+ map.current.off("move", mapMoveHandlerRef.current);
902
+ mapMoveHandlerRef.current = null;
903
+ }
904
+ }, [map]);
905
+ const shouldCloseTooltip = react_exports.useCallback(
906
+ (focused, hovered, popoverHovered) => {
907
+ return !focused && !hovered && !popoverHovered;
908
+ },
909
+ []
803
910
  );
804
- const openTooltip = react_exports.useCallback(() => setTooltipOpenStatus(true), []);
805
- const closeTooltip = react_exports.useCallback(() => setTooltipOpenStatus(false), []);
911
+ const cancelCloseTimeout = react_exports.useCallback(() => {
912
+ if (closeTimeoutRef.current) {
913
+ clearTimeout(closeTimeoutRef.current);
914
+ closeTimeoutRef.current = null;
915
+ }
916
+ }, []);
917
+ const closeTooltipIfShould = react_exports.useCallback(
918
+ (focused, hovered, popoverHovered) => {
919
+ cancelCloseTimeout();
920
+ if (shouldCloseTooltip(focused, hovered, popoverHovered)) {
921
+ closeTimeoutRef.current = setTimeout(() => {
922
+ setTooltipOpenStatus(false);
923
+ setActiveTooltipId((currentId) => currentId === markerId ? null : currentId);
924
+ closeTimeoutRef.current = null;
925
+ }, 100);
926
+ }
927
+ },
928
+ [shouldCloseTooltip, markerId, setActiveTooltipId, cancelCloseTimeout]
929
+ );
930
+ const handleMouseEnter = react_exports.useCallback(() => {
931
+ cancelCloseTimeout();
932
+ setIsHovered(true);
933
+ openTooltip();
934
+ }, [openTooltip, cancelCloseTimeout]);
935
+ const handleMouseLeave = react_exports.useCallback(() => {
936
+ setIsHovered(false);
937
+ closeTooltipIfShould(isFocused, false, isPopoverHovered);
938
+ }, [isFocused, isPopoverHovered, closeTooltipIfShould]);
939
+ const handlePopoverMouseEnter = react_exports.useCallback(() => {
940
+ cancelCloseTimeout();
941
+ setIsPopoverHovered(true);
942
+ }, [cancelCloseTimeout]);
943
+ const handlePopoverMouseLeave = react_exports.useCallback(() => {
944
+ setIsPopoverHovered(false);
945
+ closeTooltipIfShould(isFocused, isHovered, false);
946
+ }, [isFocused, isHovered, closeTooltipIfShould]);
947
+ const handleBlur = react_exports.useCallback(() => {
948
+ setIsFocused(false);
949
+ cleanupPendingMoveEnd();
950
+ closeTooltipIfShould(false, isHovered, isPopoverHovered);
951
+ }, [isHovered, isPopoverHovered, cleanupPendingMoveEnd, closeTooltipIfShould]);
952
+ const handleEscapeKey = react_exports.useCallback(
953
+ (e) => {
954
+ if (e.key === "Escape" && activeTooltipId === markerId) {
955
+ cancelCloseTimeout();
956
+ setIsFocused(false);
957
+ setIsHovered(false);
958
+ setIsPopoverHovered(false);
959
+ cleanupPendingMoveEnd();
960
+ setTooltipOpenStatus(false);
961
+ setActiveTooltipId(null);
962
+ }
963
+ },
964
+ [activeTooltipId, markerId, cleanupPendingMoveEnd, setActiveTooltipId, cancelCloseTimeout]
965
+ );
966
+ const handleFocus = react_exports.useCallback(() => {
967
+ cleanupPendingMoveEnd();
968
+ if (map.current && longitude !== void 0 && latitude !== void 0 && typeof map.current.once === "function") {
969
+ const bounds = map.current.getBounds();
970
+ if (!bounds.contains([longitude, latitude])) {
971
+ const moveEndHandler = () => {
972
+ pendingMoveEndHandler.current = null;
973
+ setIsFocused(true);
974
+ openTooltip();
975
+ };
976
+ pendingMoveEndHandler.current = moveEndHandler;
977
+ map.current.once("moveend", moveEndHandler);
978
+ map.current.panTo([longitude, latitude]);
979
+ return;
980
+ }
981
+ }
982
+ setIsFocused(true);
983
+ openTooltip();
984
+ }, [openTooltip, map, longitude, latitude, cleanupPendingMoveEnd]);
806
985
  const cleanupMarker = react_exports.useCallback(() => {
807
986
  if (marker.current) {
808
987
  marker.current.remove();
@@ -823,40 +1002,231 @@ var MarkerWrapper = (_a) => {
823
1002
  cleanupMarker();
824
1003
  }
825
1004
  }, [latitude, longitude, map]);
826
- react_exports.useEffect(() => cleanupMarker, []);
1005
+ react_exports.useEffect(() => {
1006
+ if (isTooltipOpen && activeTooltipId === markerId) {
1007
+ document.addEventListener("keydown", handleEscapeKey);
1008
+ return () => {
1009
+ document.removeEventListener("keydown", handleEscapeKey);
1010
+ };
1011
+ }
1012
+ return void 0;
1013
+ }, [isTooltipOpen, activeTooltipId, markerId, handleEscapeKey]);
1014
+ react_exports.useEffect(() => {
1015
+ if (isTooltipOpen && activeTooltipId !== markerId && activeTooltipId !== null) {
1016
+ setTooltipOpenStatus(false);
1017
+ }
1018
+ }, [activeTooltipId, markerId, isTooltipOpen]);
1019
+ react_exports.useEffect(() => {
1020
+ if (!isTooltipOpen && activeTooltipId === null && (isFocused || isHovered || isPopoverHovered)) {
1021
+ openTooltip();
1022
+ }
1023
+ }, [activeTooltipId, isTooltipOpen, isFocused, isHovered, isPopoverHovered, openTooltip]);
1024
+ react_exports.useEffect(() => {
1025
+ if (!customMarkerId) return;
1026
+ if (activeTooltipId === markerId) {
1027
+ setTooltipOpenStatus(true);
1028
+ } else {
1029
+ setTooltipOpenStatus(false);
1030
+ }
1031
+ }, [customMarkerId, activeTooltipId, markerId]);
1032
+ const [, forceUpdate] = react_exports.useReducer((x) => x + 1, 0);
1033
+ react_exports.useEffect(() => {
1034
+ if (!isTooltipOpen || !map.current || typeof map.current.on !== "function") {
1035
+ return void 0;
1036
+ }
1037
+ let rafId = null;
1038
+ const handleMapMove = () => {
1039
+ if (rafId === null) {
1040
+ rafId = requestAnimationFrame(() => {
1041
+ forceUpdate();
1042
+ rafId = null;
1043
+ });
1044
+ }
1045
+ };
1046
+ mapMoveHandlerRef.current = handleMapMove;
1047
+ map.current.on("move", handleMapMove);
1048
+ return () => {
1049
+ if (rafId !== null) {
1050
+ cancelAnimationFrame(rafId);
1051
+ }
1052
+ cleanupMapMoveHandler();
1053
+ };
1054
+ }, [isTooltipOpen, map, cleanupMapMoveHandler]);
1055
+ react_exports.useEffect(
1056
+ () => () => {
1057
+ cancelCloseTimeout();
1058
+ cleanupPendingMoveEnd();
1059
+ cleanupMapMoveHandler();
1060
+ cleanupMarker();
1061
+ },
1062
+ [cancelCloseTimeout, cleanupPendingMoveEnd, cleanupMapMoveHandler, cleanupMarker]
1063
+ );
827
1064
  const filteredAdditionalFields = additionalFields.filter(({ value }) => value && String(value) !== "0");
828
- const showTooltip = showCoordinates || filteredAdditionalFields.length || areaId && areaValue;
829
- return /* @__PURE__ */ react_exports.createElement("div", { style: { visibility: isChoroplethTooltip() ? "hidden" : "visible" } }, /* @__PURE__ */ react_exports.createElement(
1065
+ const showTooltip = showCoordinates || filteredAdditionalFields.length || areaId && !Number.isNaN(areaValue);
1066
+ const isTooltipVisible = activeTooltipId === markerId && (isTooltipOpen || customMarkerId !== void 0);
1067
+ const childrenWithTooltipId = react_exports.useMemo(() => {
1068
+ if (!children) return null;
1069
+ if (!react_exports.isValidElement(children)) return children;
1070
+ return react_exports.cloneElement(children, {
1071
+ "aria-describedby": tooltipId
1072
+ });
1073
+ }, [children, tooltipId]);
1074
+ return /* @__PURE__ */ react_exports.createElement("div", null, /* @__PURE__ */ react_exports.createElement(
830
1075
  "div",
831
1076
  __spreadValues({
832
- style: {
833
- visibility: isChoroplethTooltip() ? "hidden" : "visible"
834
- },
835
1077
  ref: container,
836
1078
  "data-test": "map-marker",
837
- onMouseOver: openTooltip,
838
- onMouseLeave: closeTooltip,
839
- onFocus: openTooltip,
840
- onBlur: closeTooltip
1079
+ onMouseEnter: handleMouseEnter,
1080
+ onMouseLeave: handleMouseLeave,
1081
+ onFocus: handleFocus,
1082
+ onBlur: handleBlur
841
1083
  }, otherProps),
842
- children
1084
+ childrenWithTooltipId
843
1085
  ), /* @__PURE__ */ react_exports.createElement("div", null, showTooltip && /* @__PURE__ */ react_exports.createElement(
844
- Tooltip_default,
1086
+ Tooltip_default2,
845
1087
  {
846
- open: isChoroplethTooltip() ? isChoroplethTooltipOpen : isTooltipOpen,
1088
+ id: tooltipId,
1089
+ open: isTooltipVisible,
847
1090
  anchor: container.current,
848
- latitude: isChoroplethTooltip() ? null : latitude,
849
- longitude: isChoroplethTooltip() ? null : longitude,
1091
+ latitude: showCoordinates ? latitude : null,
1092
+ longitude: showCoordinates ? longitude : null,
850
1093
  areaId,
851
1094
  areaValue,
852
1095
  additionalFields,
853
1096
  showCoordinates,
854
- tooltipHeader
1097
+ tooltipHeader,
1098
+ stylesManagedExternally,
1099
+ onMouseEnter: handlePopoverMouseEnter,
1100
+ onMouseLeave: handlePopoverMouseLeave
855
1101
  }
856
1102
  )));
857
1103
  };
858
1104
  var MarkerWrapper_default = MarkerWrapper;
859
1105
 
1106
+ // src/Map/PureMap/useRovingTabindex.ts
1107
+ var useRovingTabindex = (map) => {
1108
+ const elementRefsRef = react_exports.useRef(
1109
+ new globalThis.Map()
1110
+ );
1111
+ const focusedIndexRef = react_exports.useRef(0);
1112
+ const moveFocusOnElementRemove = react_exports.useCallback((removedElementIndex) => {
1113
+ const removedElement = elementRefsRef.current.get(removedElementIndex);
1114
+ const wasFocused = (removedElement == null ? void 0 : removedElement.getAttribute("tabindex")) === "0";
1115
+ elementRefsRef.current.delete(removedElementIndex);
1116
+ if (wasFocused) {
1117
+ let replacementIndex = null;
1118
+ const indices = Array.from(elementRefsRef.current.keys()).sort((a, b) => a - b);
1119
+ const nextIndex = indices.find((i) => i > removedElementIndex);
1120
+ if (nextIndex !== void 0) {
1121
+ replacementIndex = nextIndex;
1122
+ } else if (indices.length > 0) {
1123
+ replacementIndex = indices[indices.length - 1];
1124
+ }
1125
+ if (replacementIndex !== null) {
1126
+ focusedIndexRef.current = replacementIndex;
1127
+ const replacementElement = elementRefsRef.current.get(replacementIndex);
1128
+ if (replacementElement) {
1129
+ replacementElement.setAttribute("tabindex", "0");
1130
+ }
1131
+ } else {
1132
+ focusedIndexRef.current = 0;
1133
+ }
1134
+ }
1135
+ }, []);
1136
+ const setElementRef = react_exports.useCallback(
1137
+ (index, element) => {
1138
+ if (element) {
1139
+ const existingElement = elementRefsRef.current.get(index);
1140
+ const hadFocus = (existingElement == null ? void 0 : existingElement.getAttribute("tabindex")) === "0";
1141
+ elementRefsRef.current.set(index, element);
1142
+ if (hadFocus) {
1143
+ element.setAttribute("tabindex", "0");
1144
+ } else {
1145
+ element.setAttribute("tabindex", index === focusedIndexRef.current ? "0" : "-1");
1146
+ }
1147
+ } else {
1148
+ moveFocusOnElementRemove(index);
1149
+ }
1150
+ },
1151
+ [moveFocusOnElementRemove]
1152
+ );
1153
+ const resolveFocusedIndex = react_exports.useCallback(() => {
1154
+ let currentIndex = focusedIndexRef.current;
1155
+ if (!elementRefsRef.current.has(currentIndex)) {
1156
+ for (const [index, element] of elementRefsRef.current.entries()) {
1157
+ if (element.getAttribute("tabindex") === "0") {
1158
+ currentIndex = index;
1159
+ focusedIndexRef.current = index;
1160
+ break;
1161
+ }
1162
+ }
1163
+ }
1164
+ return currentIndex;
1165
+ }, []);
1166
+ const handleKeyDown = react_exports.useCallback(
1167
+ (e) => {
1168
+ const currentIndex = resolveFocusedIndex();
1169
+ const count = elementRefsRef.current.size;
1170
+ let newIndex;
1171
+ switch (e.key) {
1172
+ case KEYBOARD_KEYS.ARROW_RIGHT:
1173
+ case KEYBOARD_KEYS.ARROW_DOWN:
1174
+ e.preventDefault();
1175
+ newIndex = currentIndex === count - 1 ? 0 : currentIndex + 1;
1176
+ break;
1177
+ case KEYBOARD_KEYS.ARROW_LEFT:
1178
+ case KEYBOARD_KEYS.ARROW_UP:
1179
+ e.preventDefault();
1180
+ newIndex = currentIndex === 0 ? count - 1 : currentIndex - 1;
1181
+ break;
1182
+ case KEYBOARD_KEYS.HOME:
1183
+ e.preventDefault();
1184
+ newIndex = 0;
1185
+ break;
1186
+ case KEYBOARD_KEYS.END:
1187
+ e.preventDefault();
1188
+ newIndex = count - 1;
1189
+ break;
1190
+ default:
1191
+ return;
1192
+ }
1193
+ if (newIndex !== currentIndex) {
1194
+ focusedIndexRef.current = newIndex;
1195
+ const oldElement = elementRefsRef.current.get(currentIndex);
1196
+ const newElement = elementRefsRef.current.get(newIndex);
1197
+ if (oldElement) {
1198
+ oldElement.setAttribute("tabindex", "-1");
1199
+ }
1200
+ if (newElement) {
1201
+ newElement.setAttribute("tabindex", "0");
1202
+ requestAnimationFrame(() => {
1203
+ newElement.focus();
1204
+ });
1205
+ }
1206
+ }
1207
+ },
1208
+ [resolveFocusedIndex]
1209
+ );
1210
+ const handleFocus = react_exports.useCallback(() => {
1211
+ var _a;
1212
+ if ((_a = map.current) == null ? void 0 : _a.keyboard) {
1213
+ map.current.keyboard.disable();
1214
+ }
1215
+ }, [map]);
1216
+ const handleBlur = react_exports.useCallback(() => {
1217
+ var _a;
1218
+ if ((_a = map.current) == null ? void 0 : _a.keyboard) {
1219
+ map.current.keyboard.enable();
1220
+ }
1221
+ }, [map]);
1222
+ return {
1223
+ handleKeyDown,
1224
+ handleFocus,
1225
+ handleBlur,
1226
+ setElementRef
1227
+ };
1228
+ };
1229
+
860
1230
  // src/Map/PureMap/BubbleLayer.tsx
861
1231
  var GEO_BOUND_PREFIX = "_geo_bounds_";
862
1232
  var GEO_LAT_AND_LONG_FIELD = ["_geo_long_field", "_geo_lat_field"];
@@ -869,21 +1239,51 @@ var PieSegment = react_exports.memo(
869
1239
  color,
870
1240
  themeColor,
871
1241
  segmentMetadata,
872
- handleBubbleClick
1242
+ handleBubbleClick,
1243
+ ariaLabel,
1244
+ "aria-describedby": ariaDescribedBy,
1245
+ onKeyDown,
1246
+ onFocus,
1247
+ onBlur,
1248
+ elementRef,
1249
+ hasEventHandlers
873
1250
  }) => {
874
1251
  const { name, value } = segmentMetadata != null ? segmentMetadata : {};
875
- const handleSegmentClick = react_exports.useCallback(
1252
+ const handleInteraction = react_exports.useCallback(
876
1253
  (e) => {
1254
+ if ("key" in e && e.key !== KEYBOARD_KEYS.ENTER && e.key !== KEYBOARD_KEYS.SPACE) {
1255
+ return;
1256
+ }
1257
+ e.preventDefault();
877
1258
  handleBubbleClick(e, name, value);
878
1259
  },
879
1260
  [name, value, handleBubbleClick]
880
1261
  );
1262
+ const handleKeyDown = react_exports.useCallback(
1263
+ (e) => {
1264
+ if (hasEventHandlers && (e.key === KEYBOARD_KEYS.ENTER || e.key === KEYBOARD_KEYS.SPACE)) {
1265
+ handleInteraction(e);
1266
+ }
1267
+ if (onKeyDown) {
1268
+ onKeyDown(e);
1269
+ }
1270
+ },
1271
+ [hasEventHandlers, handleInteraction, onKeyDown]
1272
+ );
881
1273
  if (end - start === 1) {
882
1274
  return /* @__PURE__ */ react_exports.createElement(
883
1275
  BubbleSegment,
884
1276
  {
1277
+ $hasEventHandlers: hasEventHandlers,
1278
+ ref: elementRef,
885
1279
  as: "circle",
886
- onClick: handleSegmentClick,
1280
+ role: hasEventHandlers ? "button" : "graphics-symbol",
1281
+ "aria-label": ariaLabel,
1282
+ "aria-describedby": ariaDescribedBy,
1283
+ onClick: hasEventHandlers ? handleInteraction : void 0,
1284
+ onKeyDown: handleKeyDown,
1285
+ onFocus,
1286
+ onBlur,
887
1287
  cx: radius,
888
1288
  cy: radius,
889
1289
  r: radius,
@@ -904,8 +1304,16 @@ var PieSegment = react_exports.memo(
904
1304
  return /* @__PURE__ */ react_exports.createElement(
905
1305
  BubbleSegment,
906
1306
  {
1307
+ $hasEventHandlers: hasEventHandlers,
1308
+ ref: elementRef,
907
1309
  as: "path",
908
- onClick: handleSegmentClick,
1310
+ role: hasEventHandlers ? "button" : "graphics-symbol",
1311
+ "aria-label": ariaLabel,
1312
+ "aria-describedby": ariaDescribedBy,
1313
+ onClick: hasEventHandlers ? handleInteraction : void 0,
1314
+ onKeyDown: handleKeyDown,
1315
+ onFocus,
1316
+ onBlur,
909
1317
  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}`,
910
1318
  fill: color,
911
1319
  fillOpacity: 0.8,
@@ -920,14 +1328,122 @@ PieSegment.displayName = "MapBubblePieSegment";
920
1328
  var BubbleSegment = styled_components_default.path`
921
1329
  transition: 0.2s ease-in-out;
922
1330
  transition-property: fill, stroke;
1331
+ ${({ $hasEventHandlers }) => $hasEventHandlers && "cursor: pointer;"}
1332
+
1333
+ &:focus {
1334
+ outline: none;
1335
+ }
923
1336
  `;
924
1337
  var BUBBLE_SEGMENT_DIMMED_STYLES = {
925
1338
  fill: "rgba(150, 150, 150, 0.3)",
926
1339
  stroke: "rgba(200, 200, 200, 0.4)"
927
1340
  };
928
- var StyledMarkerWrapper = styled_components_default(MarkerWrapper_default)`
929
- cursor: pointer;
930
- `;
1341
+ var BubbleSvg = react_exports.memo(
1342
+ ({
1343
+ values,
1344
+ valueRange,
1345
+ tooltipHeader,
1346
+ latitude,
1347
+ longitude,
1348
+ icon,
1349
+ isPie,
1350
+ themeColor,
1351
+ segmentStartIndex,
1352
+ colors,
1353
+ bubbleSize,
1354
+ onClick,
1355
+ "aria-describedby": ariaDescribedBy,
1356
+ onKeyDown,
1357
+ onFocus,
1358
+ onBlur,
1359
+ setElementRef,
1360
+ hasEventHandlers
1361
+ }) => {
1362
+ const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
1363
+ const isBubbleMapIconFlagEnabled = Boolean(featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableBubbleMapIcon);
1364
+ const total = values.reduce((totalValue, v) => totalValue + v, 0);
1365
+ const radius = matchBubbleSize(valueRange, total);
1366
+ const getAriaLabel = react_exports.useCallback(
1367
+ (segmentName, segmentValue) => {
1368
+ let segmentLabel = (0, i18n_exports._)("Map marker");
1369
+ if (tooltipHeader) {
1370
+ segmentLabel = tooltipHeader;
1371
+ } else if (latitude !== void 0 && longitude !== void 0) {
1372
+ segmentLabel = (0, format_exports.sprintf)((0, i18n_exports._)("Location: %(lat)s, %(lng)s"), {
1373
+ lat: convertDegToDMS(latitude, "latitude"),
1374
+ lng: convertDegToDMS(longitude, "longitude")
1375
+ });
1376
+ }
1377
+ if (segmentName != null && segmentValue != null) {
1378
+ segmentLabel = (0, format_exports.sprintf)((0, i18n_exports._)("%(locationLabel)s, %(segmentName)s: %(segmentValue)s"), {
1379
+ locationLabel: segmentLabel,
1380
+ segmentName,
1381
+ segmentValue: segmentValue.toString()
1382
+ });
1383
+ }
1384
+ if (hasEventHandlers) {
1385
+ segmentLabel = (0, format_exports.sprintf)((0, i18n_exports._)("%(label)s, Click for drilldown"), { label: segmentLabel });
1386
+ }
1387
+ return segmentLabel;
1388
+ },
1389
+ [tooltipHeader, latitude, longitude, hasEventHandlers]
1390
+ );
1391
+ const offsets = [];
1392
+ let runningTotal = 0;
1393
+ values.forEach((count) => {
1394
+ offsets.push(runningTotal);
1395
+ runningTotal += count;
1396
+ });
1397
+ const width = radius * 2;
1398
+ const showIcon = isBubbleMapIconFlagEnabled && radius >= ICON_DISPLAY_CUTOFF && icon && ((0, iconUtils_exports.isRemoteIcon)(icon) || (0, iconUtils_exports.isDataURI)(icon));
1399
+ return /* @__PURE__ */ react_exports.createElement("svg", { width, height: width, viewBox: `-3 -3 ${width + 6} ${width + 6}` }, isPie && /* @__PURE__ */ react_exports.createElement(
1400
+ "circle",
1401
+ {
1402
+ cx: radius,
1403
+ cy: radius,
1404
+ r: radius,
1405
+ fill: "none",
1406
+ strokeWidth: 2,
1407
+ stroke: themeColor,
1408
+ strokeOpacity: 0.3
1409
+ }
1410
+ ), values.map((v, i) => {
1411
+ var _a, _b;
1412
+ const globalIndex = segmentStartIndex + i;
1413
+ return /* @__PURE__ */ react_exports.createElement(
1414
+ PieSegment,
1415
+ {
1416
+ key: globalIndex,
1417
+ start: offsets[i] / total,
1418
+ end: (offsets[i] + v) / total,
1419
+ radius,
1420
+ color: colors[i],
1421
+ themeColor,
1422
+ segmentMetadata: bubbleSize[i],
1423
+ handleBubbleClick: onClick,
1424
+ ariaLabel: getAriaLabel((_a = bubbleSize[i]) == null ? void 0 : _a.name, (_b = bubbleSize[i]) == null ? void 0 : _b.value),
1425
+ "aria-describedby": ariaDescribedBy,
1426
+ onKeyDown,
1427
+ onFocus,
1428
+ onBlur,
1429
+ elementRef: setElementRef ? (element) => setElementRef(globalIndex, element) : void 0,
1430
+ hasEventHandlers
1431
+ }
1432
+ );
1433
+ }), showIcon && /* @__PURE__ */ react_exports.createElement(
1434
+ "foreignObject",
1435
+ {
1436
+ x: radius - radius * 0.8 / 2,
1437
+ y: radius - radius * 0.8 / 2,
1438
+ width: radius * 0.8,
1439
+ height: radius * 0.8,
1440
+ style: { pointerEvents: "none" },
1441
+ "data-test": "bubble-icon-wrapper"
1442
+ },
1443
+ /* @__PURE__ */ react_exports.createElement(RemoteIcon_default, { iconURL: icon, width: radius * 0.8, height: radius * 0.8 })
1444
+ ));
1445
+ }
1446
+ );
931
1447
  var Bubble = react_exports.memo(
932
1448
  ({
933
1449
  originalValues,
@@ -943,12 +1459,15 @@ var Bubble = react_exports.memo(
943
1459
  map,
944
1460
  handleMapClick,
945
1461
  icon,
946
- showCoordinates
1462
+ showCoordinates,
1463
+ stylesManagedExternally,
1464
+ segmentStartIndex = 0,
1465
+ onKeyDown,
1466
+ onFocus,
1467
+ onBlur,
1468
+ setElementRef,
1469
+ hasEventHandlers
947
1470
  }) => {
948
- const featureFlagContext = react_exports.useContext(FeatureFlagContext_default);
949
- const isBubbleMapIconFlagEnabled = Boolean(
950
- featureFlagContext && featureFlagContext.visualizations_enableBubbleMapIcon
951
- );
952
1471
  const onBubbleClick = react_exports.useCallback(
953
1472
  (e, name, value) => {
954
1473
  handleMapClick(e, name, value);
@@ -958,58 +1477,9 @@ var Bubble = react_exports.memo(
958
1477
  );
959
1478
  const allZeros = originalValues.every((v) => v === 0);
960
1479
  const values = originalValues.map((v) => v > 0 ? v : 0);
961
- const total = values.reduce((totalValue, v) => totalValue + v, 0);
962
- const radius = matchBubbleSize(valueRange, total);
963
- const bubble = react_exports.useMemo(() => {
964
- if (allZeros || !originalValues.length) return null;
965
- const offsets = [];
966
- let runningTotal = 0;
967
- values.forEach((count) => {
968
- offsets.push(runningTotal);
969
- runningTotal += count;
970
- });
971
- const width = radius * 2;
972
- return /* @__PURE__ */ react_exports.createElement("svg", { width, height: width, viewBox: `-3 -3 ${width + 6} ${width + 6}` }, isPie && /* @__PURE__ */ react_exports.createElement(
973
- "circle",
974
- {
975
- cx: radius,
976
- cy: radius,
977
- r: radius,
978
- fill: "none",
979
- strokeWidth: 2,
980
- stroke: themeColor,
981
- strokeOpacity: 0.3
982
- }
983
- ), values.map((v, i) => /* @__PURE__ */ react_exports.createElement(
984
- PieSegment,
985
- {
986
- key: (0, id_exports.createDOMID)(),
987
- start: offsets[i] / total,
988
- end: (offsets[i] + v) / total,
989
- radius,
990
- color: colors[i],
991
- themeColor,
992
- segmentMetadata: bubbleSize[i],
993
- handleBubbleClick: onBubbleClick
994
- }
995
- )));
996
- }, [
997
- bubbleSize,
998
- colors,
999
- isPie,
1000
- onBubbleClick,
1001
- originalValues,
1002
- themeColor,
1003
- allZeros,
1004
- radius,
1005
- total,
1006
- values
1007
- ]);
1008
- if (!bubble) {
1009
- return null;
1010
- }
1480
+ if (allZeros || !originalValues.length) return null;
1011
1481
  return /* @__PURE__ */ react_exports.createElement(
1012
- StyledMarkerWrapper,
1482
+ MarkerWrapper_default,
1013
1483
  {
1014
1484
  longitude,
1015
1485
  latitude,
@@ -1017,29 +1487,46 @@ var Bubble = react_exports.memo(
1017
1487
  tooltipHeader,
1018
1488
  map,
1019
1489
  "data-test-type": "bubble",
1020
- showCoordinates
1490
+ showCoordinates,
1491
+ stylesManagedExternally
1021
1492
  },
1022
- bubble,
1023
- isBubbleMapIconFlagEnabled && radius >= ICON_DISPLAY_CUTOFF && icon && ((0, iconUtils_exports.isRemoteIcon)(icon) || (0, iconUtils_exports.isDataURI)(icon)) && /* @__PURE__ */ react_exports.createElement(
1024
- "div",
1493
+ /* @__PURE__ */ react_exports.createElement(
1494
+ BubbleSvg,
1025
1495
  {
1026
- "data-test": "bubble-icon-wrapper",
1027
- style: {
1028
- position: "absolute",
1029
- top: `${radius}px`,
1030
- left: `${radius}px`,
1031
- transform: "translate(-50%, -50%)",
1032
- pointerEvents: "none"
1033
- }
1034
- },
1035
- /* @__PURE__ */ react_exports.createElement(RemoteIcon_default, { iconURL: icon, width: radius * 0.8, height: radius * 0.8 })
1496
+ values,
1497
+ valueRange,
1498
+ colors,
1499
+ bubbleSize,
1500
+ isPie,
1501
+ themeColor,
1502
+ segmentStartIndex,
1503
+ latitude,
1504
+ longitude,
1505
+ tooltipHeader,
1506
+ icon,
1507
+ onClick: onBubbleClick,
1508
+ onKeyDown,
1509
+ onFocus,
1510
+ onBlur,
1511
+ setElementRef,
1512
+ hasEventHandlers
1513
+ }
1036
1514
  )
1037
1515
  );
1038
1516
  }
1039
1517
  );
1040
1518
  Bubble.displayName = "MapBubble";
1041
1519
  var BubbleLayer = (props) => {
1042
- const { bubbleLayer, themeColorScheme, map, zoom, onMapClick, showCoordinates } = props;
1520
+ const {
1521
+ bubbleLayer,
1522
+ themeColorScheme,
1523
+ map,
1524
+ zoom,
1525
+ onMapClick,
1526
+ showCoordinates,
1527
+ stylesManagedExternally = false,
1528
+ hasEventHandlers
1529
+ } = props;
1043
1530
  bubbleLayer.seriesColors = bubbleLayer.seriesColors || DEFAULT_SERIES_COLORS;
1044
1531
  bubbleLayer.bubbleSize = bubbleLayer.bubbleSize || [];
1045
1532
  bubbleLayer.icon = bubbleLayer.icon || [];
@@ -1079,7 +1566,15 @@ var BubbleLayer = (props) => {
1079
1566
  },
1080
1567
  [dataToRender, onMapClick]
1081
1568
  );
1569
+ const { handleKeyDown, handleFocus, handleBlur, setElementRef } = useRovingTabindex(map);
1570
+ let globalSegmentIndex = 0;
1082
1571
  return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, dataToRender.map((datum, i) => {
1572
+ const allZeros = datum.data.values.every((v) => v === 0);
1573
+ const segmentStartIndex = globalSegmentIndex;
1574
+ const segmentCount = datum.data.values.length;
1575
+ if (!allZeros) {
1576
+ globalSegmentIndex += segmentCount;
1577
+ }
1083
1578
  const colors = dynamicColors ? [
1084
1579
  dataToRender.map(
1085
1580
  (obj) => (0, colorUtils_exports.isColor)(dynamicColors[obj.idx]) ? dynamicColors[obj.idx] : DEFAULT_CLUSTER_COLOR
@@ -1117,7 +1612,14 @@ var BubbleLayer = (props) => {
1117
1612
  map,
1118
1613
  handleMapClick: (e, name, value) => handleMapClick(e, name, value, i),
1119
1614
  icon: bubbleLayer.icon[datum.idx],
1120
- showCoordinates
1615
+ showCoordinates,
1616
+ stylesManagedExternally,
1617
+ segmentStartIndex,
1618
+ onKeyDown: handleKeyDown,
1619
+ onFocus: handleFocus,
1620
+ onBlur: handleBlur,
1621
+ setElementRef,
1622
+ hasEventHandlers
1121
1623
  }
1122
1624
  );
1123
1625
  }));
@@ -1140,37 +1642,6 @@ var PureMapContainer = styled_components_default.div.attrs({
1140
1642
  z-index: 0;
1141
1643
  }
1142
1644
 
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
1645
  // overwrite maplibregl scale styles
1175
1646
  .maplibregl-ctrl-bottom-left {
1176
1647
  display: ${(props) => props.showScale ? "block" : "none"};
@@ -1203,7 +1674,8 @@ var PureMapContainer = styled_components_default.div.attrs({
1203
1674
  }
1204
1675
  }
1205
1676
 
1206
- :has(${BubbleSegment}:hover) ${BubbleSegment}:not(:hover) {
1677
+ /* When a segment is hovered/focused, dim other segments */
1678
+ :has(${BubbleSegment}:is(:focus-visible, :hover)) ${BubbleSegment}:not(:is(:focus-visible, :hover)) {
1207
1679
  fill: ${BUBBLE_SEGMENT_DIMMED_STYLES.fill};
1208
1680
  stroke: ${BUBBLE_SEGMENT_DIMMED_STYLES.stroke};
1209
1681
  }
@@ -1211,29 +1683,92 @@ var PureMapContainer = styled_components_default.div.attrs({
1211
1683
  var PureMapContainer_default = PureMapContainer;
1212
1684
 
1213
1685
  // src/Map/PureMap/MarkerLayer.tsx
1686
+ var svgFocusStyle = styled_components_exports.css`
1687
+ &:focus {
1688
+ outline: none;
1689
+ filter: drop-shadow(2px 0px 1px ${themes_exports.variables.focusColor})
1690
+ drop-shadow(-2px 0px 1px ${themes_exports.variables.focusColor}) drop-shadow(0px 2px 1px ${themes_exports.variables.focusColor})
1691
+ drop-shadow(0px -2px 1px ${themes_exports.variables.focusColor});
1692
+ }
1693
+ `;
1694
+ var FocusableSvg = styled_components_default.svg`
1695
+ ${({ $hasEventHandlers }) => $hasEventHandlers && "cursor: pointer;"}
1696
+ ${svgFocusStyle}
1697
+ `;
1214
1698
  var MarkerIcon = (_a) => {
1215
- var _b = _a, { theme, color } = _b, otherProps = __objRest(_b, ["theme", "color"]);
1699
+ var _b = _a, {
1700
+ theme,
1701
+ color,
1702
+ ariaLabel,
1703
+ "aria-describedby": ariaDescribedby,
1704
+ onInteraction,
1705
+ onKeyDown: onKeyDownProp,
1706
+ onFocus,
1707
+ onBlur,
1708
+ elementRef,
1709
+ hasEventHandlers
1710
+ } = _b, otherProps = __objRest(_b, [
1711
+ "theme",
1712
+ "color",
1713
+ "ariaLabel",
1714
+ "aria-describedby",
1715
+ "onInteraction",
1716
+ "onKeyDown",
1717
+ "onFocus",
1718
+ "onBlur",
1719
+ "elementRef",
1720
+ "hasEventHandlers"
1721
+ ]);
1216
1722
  const strokeOpacity = theme === "light" ? 0.7 : 0.15;
1217
- return /* @__PURE__ */ react_exports.createElement("svg", __spreadValues({ width: 22, height: 28, fill: "none" }, otherProps), /* @__PURE__ */ react_exports.createElement(
1218
- "path",
1219
- {
1220
- d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1221
- fill: color
1222
- }
1223
- ), /* @__PURE__ */ react_exports.createElement(
1224
- "path",
1225
- {
1226
- d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1227
- stroke: "#08090A"
1228
- }
1229
- ), /* @__PURE__ */ react_exports.createElement(
1230
- "path",
1231
- {
1232
- d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1233
- stroke: color,
1234
- strokeOpacity
1235
- }
1236
- ));
1723
+ const handleKeyDown = react_exports.useCallback(
1724
+ (e) => {
1725
+ if (hasEventHandlers && (e.key === KEYBOARD_KEYS.ENTER || e.key === KEYBOARD_KEYS.SPACE)) {
1726
+ e.preventDefault();
1727
+ onInteraction == null ? void 0 : onInteraction(e);
1728
+ }
1729
+ onKeyDownProp == null ? void 0 : onKeyDownProp(e);
1730
+ },
1731
+ [hasEventHandlers, onInteraction, onKeyDownProp]
1732
+ );
1733
+ return /* @__PURE__ */ react_exports.createElement(
1734
+ FocusableSvg,
1735
+ __spreadValues({
1736
+ $hasEventHandlers: hasEventHandlers,
1737
+ ref: elementRef,
1738
+ width: 22,
1739
+ height: 28,
1740
+ fill: "none",
1741
+ role: hasEventHandlers ? "button" : "graphics-symbol",
1742
+ "aria-label": ariaLabel,
1743
+ "aria-describedby": ariaDescribedby,
1744
+ onClick: hasEventHandlers ? onInteraction : void 0,
1745
+ onKeyDown: handleKeyDown,
1746
+ onFocus,
1747
+ onBlur
1748
+ }, otherProps),
1749
+ /* @__PURE__ */ react_exports.createElement(
1750
+ "path",
1751
+ {
1752
+ d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1753
+ fill: color
1754
+ }
1755
+ ),
1756
+ /* @__PURE__ */ react_exports.createElement(
1757
+ "path",
1758
+ {
1759
+ d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1760
+ stroke: "#08090A"
1761
+ }
1762
+ ),
1763
+ /* @__PURE__ */ react_exports.createElement(
1764
+ "path",
1765
+ {
1766
+ d: "M11 .5C5.201.5.5 5.201.5 11c0 3.136 1.376 5.952 3.555 7.875 2.839 2.506 4.144 4.58 4.893 6.02.183.35.334.665.469.946l.014.03c.136.285.263.548.387.766.235.412.571.863 1.182.863.61 0 .947-.45 1.182-.863.124-.218.25-.48.387-.765l.014-.03c.135-.282.286-.597.469-.947.75-1.44 2.054-3.514 4.893-6.02A10.476 10.476 0 0 0 21.5 11C21.5 5.201 16.799.5 11 .5Z",
1767
+ stroke: color,
1768
+ strokeOpacity
1769
+ }
1770
+ )
1771
+ );
1237
1772
  };
1238
1773
  var Marker2 = react_exports.memo(
1239
1774
  ({
@@ -1245,14 +1780,58 @@ var Marker2 = react_exports.memo(
1245
1780
  additionalFields,
1246
1781
  handleLayerClick,
1247
1782
  showCoordinates,
1248
- tooltipHeader
1783
+ tooltipHeader,
1784
+ stylesManagedExternally,
1785
+ onKeyDown,
1786
+ onFocus,
1787
+ onBlur,
1788
+ elementRef,
1789
+ hasEventHandlers
1249
1790
  }) => {
1791
+ const ariaLabel = react_exports.useMemo(() => {
1792
+ let markerLabel = (0, i18n_exports._)("Map marker");
1793
+ if (tooltipHeader) {
1794
+ markerLabel = tooltipHeader;
1795
+ } else if (latitude !== void 0 && longitude !== void 0) {
1796
+ markerLabel = (0, format_exports.sprintf)((0, i18n_exports._)("Location: %(lat)s, %(lng)s"), {
1797
+ lat: convertDegToDMS(latitude, "latitude"),
1798
+ lng: convertDegToDMS(longitude, "longitude")
1799
+ });
1800
+ }
1801
+ if (hasEventHandlers) {
1802
+ markerLabel = (0, format_exports.sprintf)((0, i18n_exports._)("%(label)s, Click for drilldown"), { label: markerLabel });
1803
+ }
1804
+ return markerLabel;
1805
+ }, [tooltipHeader, latitude, longitude, hasEventHandlers]);
1250
1806
  const icon = react_exports.useMemo(
1251
- () => /* @__PURE__ */ react_exports.createElement(MarkerIcon, { color, theme: themeColorScheme, onClick: handleLayerClick }),
1252
- [color, handleLayerClick, themeColorScheme]
1807
+ () => /* @__PURE__ */ react_exports.createElement(
1808
+ MarkerIcon,
1809
+ {
1810
+ color,
1811
+ theme: themeColorScheme,
1812
+ ariaLabel,
1813
+ onInteraction: handleLayerClick,
1814
+ onKeyDown,
1815
+ onFocus,
1816
+ onBlur,
1817
+ elementRef,
1818
+ hasEventHandlers
1819
+ }
1820
+ ),
1821
+ [
1822
+ color,
1823
+ handleLayerClick,
1824
+ themeColorScheme,
1825
+ ariaLabel,
1826
+ onKeyDown,
1827
+ onFocus,
1828
+ onBlur,
1829
+ elementRef,
1830
+ hasEventHandlers
1831
+ ]
1253
1832
  );
1254
1833
  return /* @__PURE__ */ react_exports.createElement(
1255
- StyledMarkerWrapper2,
1834
+ StyledMarkerWrapper,
1256
1835
  {
1257
1836
  latitude,
1258
1837
  longitude,
@@ -1260,20 +1839,21 @@ var Marker2 = react_exports.memo(
1260
1839
  additionalFields,
1261
1840
  "data-test-type": "marker",
1262
1841
  showCoordinates,
1263
- tooltipHeader
1842
+ tooltipHeader,
1843
+ stylesManagedExternally
1264
1844
  },
1265
1845
  icon
1266
1846
  );
1267
1847
  }
1268
1848
  );
1269
1849
  Marker2.displayName = "MapMarker";
1270
- var StyledMarkerWrapper2 = styled_components_default(MarkerWrapper_default)`
1850
+ var StyledMarkerWrapper = styled_components_default(MarkerWrapper_default)`
1271
1851
  width: 22px;
1272
1852
  height: 28px;
1273
1853
  cursor: pointer;
1274
1854
  `;
1275
1855
  var generateMarkerWrapperProps = (markerLayer, showCoordinates, onMapClick = lodash_exports.noop) => {
1276
- var _a;
1856
+ var _a, _b;
1277
1857
  const latArray = markerLayer.latitude;
1278
1858
  const lonArray = markerLayer.longitude;
1279
1859
  const isStaticColor = !markerLayer.dataColors;
@@ -1287,8 +1867,8 @@ var generateMarkerWrapperProps = (markerLayer, showCoordinates, onMapClick = lod
1287
1867
  const staticColor = markerLayer.seriesColors && (0, colorUtils_exports.isColor)(markerLayer.seriesColors[0]) ? markerLayer.seriesColors[0] : DEFAULT_CLUSTER_COLOR;
1288
1868
  const dynamicColor = markerLayer.dataColors && (0, colorUtils_exports.isColor)(markerLayer.dataColors[i]) ? markerLayer.dataColors[i] : DEFAULT_CLUSTER_COLOR;
1289
1869
  const color = isStaticColor ? staticColor : dynamicColor;
1290
- const tooltipHeader = markerLayer.tooltipHeaderField && markerLayer.tooltipHeaderField[i];
1291
- const additionalFields = ((_a = markerLayer.metadata) == null ? void 0 : _a[i]) ? markerLayer.additionalTooltipFields.map((field) => ({
1870
+ const tooltipHeader = (_a = markerLayer.tooltipHeaderField) == null ? void 0 : _a[i];
1871
+ const additionalFields = ((_b = markerLayer.metadata) == null ? void 0 : _b[i]) ? markerLayer.additionalTooltipFields.map((field) => ({
1292
1872
  name: field,
1293
1873
  value: markerLayer.metadata[i][field]
1294
1874
  })) : [];
@@ -1315,12 +1895,21 @@ var generateMarkerWrapperProps = (markerLayer, showCoordinates, onMapClick = lod
1315
1895
  return markerProps;
1316
1896
  };
1317
1897
  var MarkerLayer = (props) => {
1318
- const { map, themeColorScheme, markerLayer, onMapClick, showCoordinates = true } = props;
1898
+ const {
1899
+ map,
1900
+ themeColorScheme,
1901
+ markerLayer,
1902
+ onMapClick,
1903
+ showCoordinates = true,
1904
+ stylesManagedExternally = false,
1905
+ hasEventHandlers
1906
+ } = props;
1319
1907
  markerLayer.seriesColors = markerLayer.seriesColors || DEFAULT_SERIES_COLORS;
1320
1908
  const markerPropsList = react_exports.useMemo(
1321
1909
  () => generateMarkerWrapperProps(markerLayer, showCoordinates, onMapClick),
1322
1910
  [markerLayer, onMapClick, showCoordinates]
1323
1911
  );
1912
+ const { handleKeyDown, handleFocus, handleBlur, setElementRef } = useRovingTabindex(map);
1324
1913
  return /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, markerPropsList.map((markerProps, i) => /* @__PURE__ */ react_exports.createElement(
1325
1914
  Marker2,
1326
1915
  __spreadProps(__spreadValues({
@@ -1328,7 +1917,13 @@ var MarkerLayer = (props) => {
1328
1917
  themeColorScheme,
1329
1918
  map
1330
1919
  }, markerProps), {
1331
- showCoordinates
1920
+ showCoordinates,
1921
+ stylesManagedExternally,
1922
+ onKeyDown: handleKeyDown,
1923
+ onFocus: handleFocus,
1924
+ onBlur: handleBlur,
1925
+ elementRef: (element) => setElementRef(i, element),
1926
+ hasEventHandlers
1332
1927
  })
1333
1928
  )));
1334
1929
  };
@@ -1341,24 +1936,28 @@ var ClusterLayer = ({
1341
1936
  zoom,
1342
1937
  map,
1343
1938
  onMapClick,
1344
- showCoordinates
1939
+ showCoordinates,
1940
+ stylesManagedExternally = false,
1941
+ hasEventHandlers
1345
1942
  }) => {
1346
1943
  var _a;
1347
1944
  if (((_a = map == null ? void 0 : map.current) == null ? void 0 : _a.isStyleLoaded) && [clusterLayer.longitude, clusterLayer.latitude].every(Array.isArray)) {
1348
1945
  if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Marker && !("geobin" in clusterLayer)) {
1349
- return /* @__PURE__ */ react_exports.createElement(
1946
+ return /* @__PURE__ */ react_exports.createElement(MapProvider, null, /* @__PURE__ */ react_exports.createElement(
1350
1947
  MarkerLayer_default,
1351
1948
  {
1352
1949
  markerLayer: clusterLayer,
1353
1950
  themeColorScheme,
1354
1951
  map,
1355
1952
  onMapClick,
1356
- showCoordinates
1953
+ showCoordinates,
1954
+ stylesManagedExternally,
1955
+ hasEventHandlers
1357
1956
  }
1358
- );
1957
+ ));
1359
1958
  }
1360
1959
  if ((clusterLayer == null ? void 0 : clusterLayer.type) === visualization_schemas_exports.LAYER_TYPE.Bubble && Array.isArray(clusterLayer.bubbleSize)) {
1361
- return /* @__PURE__ */ react_exports.createElement(
1960
+ return /* @__PURE__ */ react_exports.createElement(MapProvider, null, /* @__PURE__ */ react_exports.createElement(
1362
1961
  BubbleLayer_default,
1363
1962
  {
1364
1963
  bubbleLayer: clusterLayer,
@@ -1366,9 +1965,11 @@ var ClusterLayer = ({
1366
1965
  map,
1367
1966
  zoom,
1368
1967
  onMapClick,
1369
- showCoordinates
1968
+ showCoordinates,
1969
+ stylesManagedExternally,
1970
+ hasEventHandlers
1370
1971
  }
1371
- );
1972
+ ));
1372
1973
  }
1373
1974
  }
1374
1975
  return null;
@@ -1379,6 +1980,25 @@ var ClusterLayer_default = ClusterLayer;
1379
1980
  var getShapeId = (id) => `shape-${id}`;
1380
1981
  var getSourceId = (id) => `source-${id}`;
1381
1982
  var getStrokeId = (id) => `stroke-${id}`;
1983
+ var getCentroid = (geom) => {
1984
+ if (!(geom == null ? void 0 : geom.coordinates)) {
1985
+ return null;
1986
+ }
1987
+ const flattenCoordinates = (coords) => {
1988
+ if (typeof coords[0] === "number") return [coords];
1989
+ return coords.flatMap(flattenCoordinates);
1990
+ };
1991
+ const allCoords = flattenCoordinates(geom.coordinates);
1992
+ if (allCoords.length === 0) {
1993
+ return null;
1994
+ }
1995
+ const lngs = allCoords.map((c) => c[0]);
1996
+ const lats = allCoords.map((c) => c[1]);
1997
+ return [lngs.reduce((a, b) => a + b, 0) / lngs.length, lats.reduce((a, b) => a + b, 0) / lats.length];
1998
+ };
1999
+ var FocusableShapeButton = styled_components_default.button`
2000
+ ${themes_exports.mixins.screenReaderContent()};
2001
+ `;
1382
2002
  var compareGeom = (prev, next) => {
1383
2003
  if (prev !== null && next !== null) {
1384
2004
  return prev.type === next.type && (0, lodash_exports.isEqual)(prev.coordinates, next.coordinates);
@@ -1386,7 +2006,7 @@ var compareGeom = (prev, next) => {
1386
2006
  return prev === null && next === null;
1387
2007
  };
1388
2008
  var compareChoropleth = (prevProps, nextProps) => {
1389
- return compareGeom(prevProps.geomData, nextProps.geomData) && prevProps.id === nextProps.id && prevProps.map === nextProps.map && prevProps.areaId === nextProps.areaId && prevProps.areaValue === nextProps.areaValue && prevProps.color === nextProps.color && prevProps.opacity === nextProps.opacity && prevProps.strokeColor === nextProps.strokeColor && prevProps.isThemeChanged === nextProps.isThemeChanged && (0, lodash_exports.isEqual)(prevProps.additionalFields, nextProps.additionalFields) && prevProps.tooltipHeader === nextProps.tooltipHeader && prevProps.handleMapClick.toString() === nextProps.handleMapClick.toString();
2009
+ return compareGeom(prevProps.geomData, nextProps.geomData) && prevProps.id === nextProps.id && prevProps.map === nextProps.map && prevProps.areaId === nextProps.areaId && prevProps.areaValue === nextProps.areaValue && prevProps.color === nextProps.color && prevProps.opacity === nextProps.opacity && prevProps.strokeColor === nextProps.strokeColor && prevProps.isThemeChanged === nextProps.isThemeChanged && (0, lodash_exports.isEqual)(prevProps.additionalFields, nextProps.additionalFields) && prevProps.tooltipHeader === nextProps.tooltipHeader && prevProps.handleMapClick === nextProps.handleMapClick && prevProps.hasEventHandlers === nextProps.hasEventHandlers;
1390
2010
  };
1391
2011
  var cleanupChoropleth = (shapeId, sourceId, strokeId, map) => {
1392
2012
  var _a, _b, _c;
@@ -1423,26 +2043,40 @@ var Choropleth = react_exports.memo(
1423
2043
  isThemeChanged,
1424
2044
  additionalFields,
1425
2045
  tooltipHeader,
1426
- handleMapClick
2046
+ handleMapClick,
2047
+ stylesManagedExternally = false,
2048
+ onKeyDown,
2049
+ onFocus,
2050
+ onBlur,
2051
+ elementRef,
2052
+ hasEventHandlers
1427
2053
  }) => {
1428
2054
  const sourceId = getSourceId(id);
1429
2055
  const shapeId = getShapeId(id);
1430
2056
  const strokeId = getStrokeId(id);
1431
- const formattedGeomData = {
1432
- type: "Feature",
1433
- geometry: geomData,
1434
- properties: {}
1435
- };
1436
- const [isTooltipOpen, setTooltipOpenStatus] = react_exports.useState(false);
1437
- const [mouseLat, setmouseLat] = react_exports.useState(0);
1438
- const [mouseLng, setmouseLng] = react_exports.useState(0);
1439
- const openTooltip = react_exports.useCallback(() => {
1440
- setTooltipOpenStatus(true);
1441
- }, []);
1442
- const closeTooltip = react_exports.useCallback(() => {
1443
- setTooltipOpenStatus(false);
1444
- }, []);
1445
- const updateChoropleth = react_exports.useCallback(() => {
2057
+ const formattedGeomData = react_exports.useMemo(
2058
+ () => ({
2059
+ type: "Feature",
2060
+ geometry: geomData,
2061
+ properties: {}
2062
+ }),
2063
+ [geomData]
2064
+ );
2065
+ const [isFocused, setIsFocused] = react_exports.useState(false);
2066
+ const [isHovered, setIsHovered] = react_exports.useState(false);
2067
+ const [centroidLat, centroidLng] = react_exports.useMemo(() => {
2068
+ const centroid = getCentroid(geomData);
2069
+ if (!centroid) {
2070
+ return [null, null];
2071
+ }
2072
+ const [lng, lat] = centroid;
2073
+ return [lat, lng];
2074
+ }, [geomData]);
2075
+ const [mouseLat, setmouseLat] = react_exports.useState(centroidLat != null ? centroidLat : 0);
2076
+ const [mouseLng, setmouseLng] = react_exports.useState(centroidLng != null ? centroidLng : 0);
2077
+ const markerId = react_exports.useMemo(() => `choropleth-${shapeId}`, [shapeId]);
2078
+ const { activeChoroplethId, setActiveChoroplethId, setActiveTooltipId } = useMapContext();
2079
+ const updateLayers = react_exports.useCallback(() => {
1446
2080
  cleanupChoropleth(shapeId, sourceId, strokeId, map);
1447
2081
  map.current.addSource(sourceId, {
1448
2082
  type: "geojson",
@@ -1470,41 +2104,142 @@ var Choropleth = react_exports.memo(
1470
2104
  }
1471
2105
  });
1472
2106
  }
1473
- map.current.on("mousemove", shapeId, (e) => {
1474
- const mouseLngLat = e.lngLat;
1475
- setmouseLat(mouseLngLat.lat);
1476
- setmouseLng(mouseLngLat.lng);
1477
- openTooltip();
2107
+ }, [shapeId, sourceId, strokeId, map, formattedGeomData, color, opacity, strokeColor]);
2108
+ const registerEventHandlers = react_exports.useCallback(() => {
2109
+ var _a;
2110
+ const layer = (_a = map.current) == null ? void 0 : _a.getLayer(shapeId);
2111
+ if (!layer) return () => {
2112
+ };
2113
+ const handleMouseMove = (e) => {
2114
+ setmouseLat(e.lngLat.lat);
2115
+ setmouseLng(e.lngLat.lng);
2116
+ setIsHovered(true);
2117
+ setActiveTooltipId(markerId);
1478
2118
  map.current.getCanvas().style.cursor = "pointer";
1479
- });
1480
- map.current.on("mouseleave", shapeId, () => {
1481
- closeTooltip();
2119
+ };
2120
+ const handleMouseLeave = () => {
2121
+ setIsHovered(false);
2122
+ setActiveTooltipId(null);
1482
2123
  map.current.getCanvas().style.cursor = "";
1483
- });
1484
- map.current.on("click", shapeId, (e) => {
1485
- handleMapClick(e);
1486
- });
1487
- }, [shapeId, sourceId, map, color, opacity, formattedGeomData]);
2124
+ };
2125
+ const handleClick2 = (e) => {
2126
+ if (hasEventHandlers) {
2127
+ handleMapClick == null ? void 0 : handleMapClick(e);
2128
+ }
2129
+ };
2130
+ map.current.on("mousemove", shapeId, handleMouseMove);
2131
+ map.current.on("mouseleave", shapeId, handleMouseLeave);
2132
+ map.current.on("click", shapeId, handleClick2);
2133
+ return () => {
2134
+ if (map.current) {
2135
+ map.current.off("mousemove", shapeId, handleMouseMove);
2136
+ map.current.off("mouseleave", shapeId, handleMouseLeave);
2137
+ map.current.off("click", shapeId, handleClick2);
2138
+ }
2139
+ };
2140
+ }, [shapeId, markerId, map, setActiveTooltipId, hasEventHandlers, handleMapClick]);
2141
+ react_exports.useEffect(() => {
2142
+ updateLayers();
2143
+ }, [updateLayers]);
2144
+ react_exports.useEffect(() => {
2145
+ return registerEventHandlers();
2146
+ }, [registerEventHandlers]);
1488
2147
  react_exports.useEffect(() => {
1489
- updateChoropleth();
1490
- }, [map, geomData, color, opacity, id, strokeColor]);
2148
+ if (!map.current) return;
2149
+ const layer = map.current.getLayer(shapeId);
2150
+ if (!layer) return;
2151
+ if (activeChoroplethId === null || activeChoroplethId === shapeId) {
2152
+ map.current.setPaintProperty(shapeId, "fill-opacity", opacity);
2153
+ } else {
2154
+ map.current.setPaintProperty(shapeId, "fill-opacity", opacity * 0.3);
2155
+ }
2156
+ }, [activeChoroplethId, shapeId, opacity, map]);
1491
2157
  react_exports.useEffect(() => () => cleanupChoropleth(shapeId, sourceId, strokeId, map), []);
1492
2158
  if (isThemeChanged) {
1493
- updateChoropleth();
2159
+ updateLayers();
1494
2160
  }
2161
+ const handleFocus = react_exports.useCallback(() => {
2162
+ if (onFocus) {
2163
+ onFocus();
2164
+ }
2165
+ setIsFocused(true);
2166
+ setmouseLat(centroidLat);
2167
+ setmouseLng(centroidLng);
2168
+ setActiveChoroplethId(shapeId);
2169
+ setActiveTooltipId(markerId);
2170
+ }, [centroidLat, centroidLng, shapeId, markerId, setActiveChoroplethId, setActiveTooltipId, onFocus]);
2171
+ const handleBlur = react_exports.useCallback(() => {
2172
+ setIsFocused(false);
2173
+ setActiveChoroplethId(null);
2174
+ setActiveTooltipId(null);
2175
+ onBlur == null ? void 0 : onBlur();
2176
+ }, [setActiveChoroplethId, setActiveTooltipId, onBlur]);
2177
+ const handleKeyDown = react_exports.useCallback(
2178
+ (e) => {
2179
+ var _a, _b;
2180
+ onKeyDown == null ? void 0 : onKeyDown(e);
2181
+ if (hasEventHandlers && (e.key === KEYBOARD_KEYS.ENTER || e.key === KEYBOARD_KEYS.SPACE)) {
2182
+ e.preventDefault();
2183
+ const mockEvent = {
2184
+ lngLat: {
2185
+ lng: (_a = mouseLng != null ? mouseLng : centroidLng) != null ? _a : 0,
2186
+ lat: (_b = mouseLat != null ? mouseLat : centroidLat) != null ? _b : 0
2187
+ },
2188
+ originalEvent: e
2189
+ };
2190
+ handleMapClick(mockEvent);
2191
+ }
2192
+ },
2193
+ [hasEventHandlers, handleMapClick, onKeyDown, centroidLat, centroidLng, mouseLat, mouseLng]
2194
+ );
2195
+ const tooltipPosition = react_exports.useMemo(() => {
2196
+ if (isFocused) return { lat: centroidLat, lng: centroidLng };
2197
+ if (!isHovered || !map.current) return { lat: mouseLat, lng: mouseLng };
2198
+ const mousePoint = map.current.project([mouseLng, mouseLat]);
2199
+ mousePoint.y -= 24;
2200
+ const offsetCoords = map.current.unproject(mousePoint);
2201
+ return { lat: offsetCoords.lat, lng: offsetCoords.lng };
2202
+ }, [isFocused, isHovered, mouseLat, mouseLng, centroidLat, centroidLng, map]);
2203
+ const hasCentroid = centroidLat !== null && centroidLng !== null;
2204
+ const ariaLabel = react_exports.useMemo(() => {
2205
+ const formattedAreaValue = typeof areaValue === "number" && !Number.isNaN(areaValue) ? areaValue.toString() : "N/A";
2206
+ let choroplethLabel = (0, format_exports.sprintf)((0, i18n_exports._)("%(areaId)s: %(areaValue)s"), {
2207
+ areaId: areaId.toString(),
2208
+ areaValue: formattedAreaValue
2209
+ });
2210
+ if (hasEventHandlers) {
2211
+ choroplethLabel = (0, format_exports.sprintf)((0, i18n_exports._)("%(label)s, Click for drilldown"), { label: choroplethLabel });
2212
+ }
2213
+ return choroplethLabel;
2214
+ }, [areaId, areaValue, hasEventHandlers]);
1495
2215
  return /* @__PURE__ */ react_exports.createElement(
1496
2216
  MarkerWrapper_default,
1497
2217
  {
1498
- isChoroplethTooltipOpen: isTooltipOpen,
1499
2218
  additionalFields,
1500
2219
  tooltipHeader,
1501
- latitude: mouseLat,
1502
- longitude: mouseLng,
2220
+ latitude: tooltipPosition.lat,
2221
+ longitude: tooltipPosition.lng,
1503
2222
  map,
1504
2223
  areaId,
1505
- areaValue
2224
+ areaValue,
2225
+ stylesManagedExternally,
2226
+ customMarkerId: markerId,
2227
+ showCoordinates: false
1506
2228
  },
1507
- /* @__PURE__ */ react_exports.createElement("div", { "data-test": "choropleth-anchor", style: { padding: "24px", visibility: "hidden" } })
2229
+ /* @__PURE__ */ react_exports.createElement(
2230
+ FocusableShapeButton,
2231
+ {
2232
+ "data-test": "choropleth-anchor",
2233
+ ref: elementRef,
2234
+ role: hasEventHandlers && hasCentroid ? "button" : "graphics-symbol",
2235
+ "aria-label": ariaLabel,
2236
+ "aria-hidden": !hasCentroid,
2237
+ onFocus: handleFocus,
2238
+ onBlur: handleBlur,
2239
+ onKeyDown: handleKeyDown,
2240
+ onClick: hasEventHandlers ? handleMapClick : void 0
2241
+ }
2242
+ )
1508
2243
  );
1509
2244
  },
1510
2245
  compareChoropleth
@@ -1512,7 +2247,15 @@ var Choropleth = react_exports.memo(
1512
2247
  Choropleth.displayName = "MapChoropleth";
1513
2248
  var ChoroplethLayer = (props) => {
1514
2249
  var _a, _b, _c, _d, _e, _f, _g, _h;
1515
- const { map, choroplethLayer, isThemeChanged, setIsThemeChanged, onMapClick } = props;
2250
+ const {
2251
+ map,
2252
+ choroplethLayer,
2253
+ isThemeChanged,
2254
+ setIsThemeChanged,
2255
+ onMapClick,
2256
+ stylesManagedExternally = false,
2257
+ hasEventHandlers
2258
+ } = props;
1516
2259
  const cfgOpacity = Math.min(Math.max(choroplethLayer == null ? void 0 : choroplethLayer.choroplethOpacity, 0), 1);
1517
2260
  const scaledOpacities = (_a = getScaledOpacities(choroplethLayer == null ? void 0 : choroplethLayer.dataColors, cfgOpacity)) != null ? _a : [];
1518
2261
  const colors = (_b = choroplethLayer == null ? void 0 : choroplethLayer.dataColors) == null ? void 0 : _b.map((color) => (color == null ? void 0 : color.length) > 7 ? color.slice(0, 7) : color);
@@ -1522,6 +2265,7 @@ var ChoroplethLayer = (props) => {
1522
2265
  (_f = (_e = choroplethLayer == null ? void 0 : choroplethLayer.geom) == null ? void 0 : _e.length) != null ? _f : 0,
1523
2266
  (choroplethLayer == null ? void 0 : choroplethLayer.resultLimit) ? choroplethLayer.resultLimit : DEFAULT_RESULT_LIMIT
1524
2267
  );
2268
+ const { handleKeyDown, handleFocus, handleBlur, setElementRef } = useRovingTabindex(map);
1525
2269
  const areaIdSliced = (_h = (_g = choroplethLayer == null ? void 0 : choroplethLayer.areaIds) == null ? void 0 : _g.slice(0, limit)) != null ? _h : [];
1526
2270
  const uniqueAreaIdSliced = (0, lodash_exports.uniq)(areaIdSliced).length !== areaIdSliced.length ? areaIdSliced.map((id, i) => `${id}${i}`) : areaIdSliced;
1527
2271
  const additionalFields = (choroplethLayer == null ? void 0 : choroplethLayer.metadata) ? choroplethLayer.metadata.map((choroplethMetadata) => {
@@ -1561,8 +2305,14 @@ var ChoroplethLayer = (props) => {
1561
2305
  areaId,
1562
2306
  areaValue,
1563
2307
  additionalFields: additionalFields[i],
1564
- tooltipHeader: tooltipHeaderField && tooltipHeaderField[i],
1565
- handleMapClick: (e) => handleMapClick(e, i)
2308
+ tooltipHeader: tooltipHeaderField == null ? void 0 : tooltipHeaderField[i],
2309
+ handleMapClick: (e) => handleMapClick(e, i),
2310
+ stylesManagedExternally,
2311
+ onKeyDown: handleKeyDown,
2312
+ onFocus: handleFocus,
2313
+ onBlur: handleBlur,
2314
+ elementRef: (element) => setElementRef(i, element),
2315
+ hasEventHandlers
1566
2316
  }
1567
2317
  );
1568
2318
  }));
@@ -1574,32 +2324,41 @@ var Message_exports = {};
1574
2324
  __export(Message_exports, {
1575
2325
  default: () => Message_default
1576
2326
  });
1577
- var defaultImport25 = __toESM(require("@splunk/visualizations-shared/Message"));
2327
+ var defaultImport27 = __toESM(require("@splunk/visualizations-shared/Message"));
1578
2328
  __reExport(Message_exports, require("@splunk/visualizations-shared/Message"));
1579
- var Message_default = "default" in defaultImport25 ? defaultImport25.default : defaultImport25;
2329
+ var Message_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
1580
2330
 
1581
2331
  // esm-externals:@splunk/visualization-context/GeoRegistry
1582
2332
  var GeoRegistry_exports = {};
1583
2333
  __export(GeoRegistry_exports, {
1584
2334
  default: () => GeoRegistry_default
1585
2335
  });
1586
- var defaultImport26 = __toESM(require("@splunk/visualization-context/GeoRegistry"));
2336
+ var defaultImport28 = __toESM(require("@splunk/visualization-context/GeoRegistry"));
1587
2337
  __reExport(GeoRegistry_exports, require("@splunk/visualization-context/GeoRegistry"));
1588
- var GeoRegistry_default = "default" in defaultImport26 ? defaultImport26.default : defaultImport26;
2338
+ var GeoRegistry_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
1589
2339
 
1590
2340
  // esm-externals:@splunk/visualization-context/GeoJsonProvider
1591
2341
  var GeoJsonProvider_exports = {};
1592
2342
  __export(GeoJsonProvider_exports, {
1593
2343
  default: () => GeoJsonProvider_default
1594
2344
  });
1595
- var defaultImport27 = __toESM(require("@splunk/visualization-context/GeoJsonProvider"));
2345
+ var defaultImport29 = __toESM(require("@splunk/visualization-context/GeoJsonProvider"));
1596
2346
  __reExport(GeoJsonProvider_exports, require("@splunk/visualization-context/GeoJsonProvider"));
1597
- var GeoJsonProvider_default = "default" in defaultImport27 ? defaultImport27.default : defaultImport27;
2347
+ var GeoJsonProvider_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
1598
2348
 
1599
2349
  // src/Map/PureMap/LocalChoroplethLayer.tsx
1600
2350
  var LocalChoroplethLayer = (props) => {
1601
2351
  var _a, _b;
1602
- const { width, height, map, choroplethLayer, isThemeChanged, setIsThemeChanged, onMapClick } = props;
2352
+ const {
2353
+ width,
2354
+ height,
2355
+ map,
2356
+ choroplethLayer,
2357
+ isThemeChanged,
2358
+ setIsThemeChanged,
2359
+ onMapClick,
2360
+ hasEventHandlers
2361
+ } = props;
1603
2362
  const cfgOpacity = Math.min(Math.max(choroplethLayer == null ? void 0 : choroplethLayer.choroplethOpacity, 0), 1);
1604
2363
  const emptyFeature = {
1605
2364
  type: "Feature",
@@ -1616,6 +2375,7 @@ var LocalChoroplethLayer = (props) => {
1616
2375
  const [geoJsonError, setGeoJsonError] = react_exports.useState({
1617
2376
  message: ""
1618
2377
  });
2378
+ const { handleKeyDown, handleFocus, handleBlur, setElementRef } = useRovingTabindex(map);
1619
2379
  react_exports.useEffect(() => {
1620
2380
  let isMounted = true;
1621
2381
  const geoRegistry = GeoRegistry_default.create();
@@ -1718,29 +2478,42 @@ var LocalChoroplethLayer = (props) => {
1718
2478
  level: "error",
1719
2479
  message: geoJsonError.message
1720
2480
  }
1721
- ), validGeoJson && updatedAllChoroplethData.map((el, i) => {
1722
- var _a2, _b2;
1723
- const geometry = (_a2 = geoJson.features[i]) == null ? void 0 : _a2.geometry;
1724
- const geomData = geometry && (geometry.type === "MultiPolygon" || geometry.type === "Polygon") ? geometry : null;
1725
- return /* @__PURE__ */ react_exports.createElement(
1726
- Choropleth,
1727
- {
1728
- key: el.name,
1729
- id: el.name,
1730
- map,
1731
- color: el.color,
1732
- opacity: el.opacity,
1733
- strokeColor: choroplethLayer.choroplethStrokeColor,
1734
- areaId: el.name,
1735
- areaValue: typeof el.areaValue === "number" ? el.areaValue : Number(el.areaValue),
1736
- handleMapClick: (e) => handleMapClick(e, el.idx),
1737
- isThemeChanged,
1738
- geomData,
1739
- additionalFields: additionalFields[el.idx],
1740
- tooltipHeader: (_b2 = choroplethLayer.tooltipHeaderField) == null ? void 0 : _b2[el.idx]
2481
+ ), validGeoJson && (() => {
2482
+ let renderIndex = 0;
2483
+ return updatedAllChoroplethData.map((el, i) => {
2484
+ var _a2, _b2;
2485
+ const geometry = (_a2 = geoJson.features[i]) == null ? void 0 : _a2.geometry;
2486
+ const geomData = geometry && (geometry.type === "MultiPolygon" || geometry.type === "Polygon") ? geometry : null;
2487
+ if (!geomData) {
2488
+ return null;
1741
2489
  }
1742
- );
1743
- }));
2490
+ const currentRenderIndex = renderIndex;
2491
+ renderIndex += 1;
2492
+ return /* @__PURE__ */ react_exports.createElement(
2493
+ Choropleth,
2494
+ {
2495
+ key: el.name,
2496
+ id: el.name,
2497
+ map,
2498
+ color: el.color,
2499
+ opacity: el.opacity,
2500
+ strokeColor: choroplethLayer.choroplethStrokeColor,
2501
+ areaId: el.name,
2502
+ areaValue: typeof el.areaValue === "number" ? el.areaValue : Number(el.areaValue),
2503
+ handleMapClick: (e) => handleMapClick(e, el.idx),
2504
+ isThemeChanged,
2505
+ geomData,
2506
+ additionalFields: additionalFields[el.idx],
2507
+ tooltipHeader: (_b2 = choroplethLayer.tooltipHeaderField) == null ? void 0 : _b2[el.idx],
2508
+ onKeyDown: handleKeyDown,
2509
+ onFocus: handleFocus,
2510
+ onBlur: handleBlur,
2511
+ elementRef: (element) => setElementRef(currentRenderIndex, element),
2512
+ hasEventHandlers
2513
+ }
2514
+ );
2515
+ });
2516
+ })());
1744
2517
  };
1745
2518
  var LocalChoroplethLayer_default = LocalChoroplethLayer;
1746
2519
 
@@ -1760,24 +2533,49 @@ var formatColor = (color) => {
1760
2533
  opacity: chromaColor.alpha()
1761
2534
  };
1762
2535
  };
1763
- var StyledFitToDataButton = styled_components_default(Button_default).attrs({
1764
- "data-test": "fit-to-data-button"
1765
- })`
2536
+ var ControlButtonContainer = styled_components_default.div`
1766
2537
  position: absolute;
1767
- top: ${(props) => props.showZoomControls ? "115px" : "12px"};
1768
2538
  left: 16px;
1769
2539
  z-index: 3;
1770
- width: 40px !important;
1771
- height: 40px;
2540
+ width: 40px;
1772
2541
  border-radius: 4px;
1773
- border: none;
2542
+ background-color: ${(props) => props.controlBackgroundColor};
1774
2543
  box-shadow:
1775
2544
  0px 26px 103px rgba(0, 0, 0, 0.64),
1776
2545
  0px 11px 18px rgba(0, 0, 0, 0.32),
1777
- 0px 3px 6px rgba(0, 0, 0, 0.3) !important;
1778
- background-color: ${(props) => props.controlBackgroundColor} !important;
2546
+ 0px 3px 6px rgba(0, 0, 0, 0.3);
2547
+ `;
2548
+ var ZoomControlsContainer = styled_components_default(ControlButtonContainer)`
2549
+ top: 12px;
2550
+ display: flex;
2551
+ flex-direction: column;
2552
+ `;
2553
+ var FitToDataButtonContainer = styled_components_default(ControlButtonContainer)`
2554
+ top: ${(props) => props.showZoomControls ? "115px" : "12px"};
2555
+ `;
2556
+ var ControlButton = styled_components_default(Button_default)`
2557
+ width: 40px;
2558
+ height: 43px;
2559
+ border: none;
2560
+ background-color: ${(props) => props.controlBackgroundColor};
1779
2561
  background-repeat: no-repeat;
1780
2562
  background-position: center;
2563
+ `;
2564
+ var ZoomInButton = styled_components_default(ControlButton).attrs({
2565
+ "data-test": "zoom-in-button",
2566
+ "data-is-first": true
2567
+ })`
2568
+ 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>');
2569
+ `;
2570
+ var ZoomOutButton = styled_components_default(ControlButton).attrs({
2571
+ "data-test": "zoom-out-button"
2572
+ })`
2573
+ 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>');
2574
+ `;
2575
+ var StyledFitToDataButton = styled_components_default(ControlButton).attrs({
2576
+ "data-test": "fit-to-data-button"
2577
+ })`
2578
+ height: 40px;
1781
2579
  background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="9" stroke="${(props) => props.controlIconColorEncoded.color}" stroke-width="2" stroke-linecap="round"/><path d="M12 3.5V6.5M12 20.5V17.5M3.5 12H6.5M20.5 12H17.5" stroke="${(props) => props.controlIconColorEncoded.color}" stroke-width="2" stroke-linecap="round"/></svg>');
1782
2580
  `;
1783
2581
  PureMapContainer_default.displayName = "PureMapContainer";
@@ -1802,13 +2600,13 @@ var PureMap = (props) => {
1802
2600
  onMapClick,
1803
2601
  onOptionsChange,
1804
2602
  title,
1805
- showCoordinates
2603
+ showCoordinates,
2604
+ hasEventHandlers = false
1806
2605
  } = props;
1807
2606
  const { defaultTileConfig, customTileConfig } = (0, react_exports.useContext)(MapContext_default);
1808
2607
  const basemapContainer = (0, react_exports.useRef)(null);
1809
2608
  const map = (0, react_exports.useRef)(null);
1810
2609
  const scaleControl = (0, react_exports.useRef)(null);
1811
- const zoomControl = (0, react_exports.useRef)(null);
1812
2610
  const fitToDataButtonClickedRef = (0, react_exports.useRef)(false);
1813
2611
  const isUserInteractingRef = (0, react_exports.useRef)(false);
1814
2612
  const [hasUserPanned, setHasUserPanned] = react_exports.useState(false);
@@ -1957,8 +2755,6 @@ var PureMap = (props) => {
1957
2755
  setMapMinZoom(mapZoomLevel);
1958
2756
  }
1959
2757
  });
1960
- zoomControl.current = new maplibre_gl_exports.NavigationControl({ showCompass: false });
1961
- map.current.addControl(zoomControl.current, "top-left");
1962
2758
  },
1963
2759
  [lngLatCenter, zoomLevel, layers == null ? void 0 : layers.length]
1964
2760
  );
@@ -2097,6 +2893,19 @@ var PureMap = (props) => {
2097
2893
  }
2098
2894
  onOptionsChangeProxy({ center: void 0, zoom: void 0 });
2099
2895
  }, [onOptionsChangeProxy, fitMapToContent, center, zoom, lngLatCenter, zoomLevel]);
2896
+ const floatingLayerStyleTarget = getFloatingLayerStyleTarget(basemapContainer.current);
2897
+ const stylesManagedExternally = Boolean(floatingLayerStyleTarget);
2898
+ const wrapFloatingLayers = (children) => floatingLayerStyleTarget ? /* @__PURE__ */ react_exports.createElement(styled_components_exports.StyleSheetManager, { target: floatingLayerStyleTarget }, children) : children;
2899
+ const handleZoomIn = (0, react_exports.useCallback)(() => {
2900
+ if (map.current) {
2901
+ map.current.zoomIn();
2902
+ }
2903
+ }, []);
2904
+ const handleZoomOut = (0, react_exports.useCallback)(() => {
2905
+ if (map.current) {
2906
+ map.current.zoomOut();
2907
+ }
2908
+ }, []);
2100
2909
  return /* @__PURE__ */ react_exports.createElement(
2101
2910
  PureMapContainer_default,
2102
2911
  {
@@ -2112,49 +2921,76 @@ var PureMap = (props) => {
2112
2921
  showScale,
2113
2922
  showZoomControls
2114
2923
  },
2115
- showResetButton() && /* @__PURE__ */ react_exports.createElement(
2116
- StyledFitToDataButton,
2924
+ showZoomControls && /* @__PURE__ */ react_exports.createElement(ZoomControlsContainer, { controlBackgroundColor }, /* @__PURE__ */ react_exports.createElement(Tooltip_default, { content: (0, i18n_exports._)("Zoom in"), contentRelationship: "label" }, /* @__PURE__ */ react_exports.createElement(
2925
+ ZoomInButton,
2117
2926
  {
2118
- onClick: handleResetClick,
2119
- title: (0, i18n_exports._)("Fit to data"),
2927
+ onClick: handleZoomIn,
2120
2928
  controlBackgroundColor,
2121
2929
  controlForegroundColor,
2122
- controlIconColorEncoded: formatColor(controlForegroundColor),
2123
- showZoomControls
2930
+ controlIconColorEncoded: formatColor(controlForegroundColor)
2124
2931
  }
2125
- ),
2126
- isMapLoaded && layer && (layer.type === visualization_schemas_exports.LAYER_TYPE.Bubble || layer.type === visualization_schemas_exports.LAYER_TYPE.Marker) && /* @__PURE__ */ react_exports.createElement(
2127
- ClusterLayer_default,
2932
+ )), /* @__PURE__ */ react_exports.createElement(Tooltip_default, { content: (0, i18n_exports._)("Zoom out"), contentRelationship: "label" }, /* @__PURE__ */ react_exports.createElement(
2933
+ ZoomOutButton,
2128
2934
  {
2129
- clusterLayer: layer,
2130
- themeColorScheme,
2131
- map,
2132
- zoom: currentZoomLevel,
2133
- onMapClick,
2134
- showCoordinates
2935
+ onClick: handleZoomOut,
2936
+ controlBackgroundColor,
2937
+ controlForegroundColor,
2938
+ controlIconColorEncoded: formatColor(controlForegroundColor)
2135
2939
  }
2136
- ),
2137
- isMapLoaded && layer && layer.type === visualization_schemas_exports.LAYER_TYPE.Choropleth && layer.source && /* @__PURE__ */ react_exports.createElement(
2138
- LocalChoroplethLayer_default,
2940
+ ))),
2941
+ showResetButton() && /* @__PURE__ */ react_exports.createElement(
2942
+ FitToDataButtonContainer,
2139
2943
  {
2140
- width,
2141
- height,
2142
- map,
2143
- choroplethLayer: layer,
2144
- isThemeChanged,
2145
- setIsThemeChanged: setIsThemeChangedCallback,
2146
- onMapClick
2147
- }
2944
+ controlBackgroundColor,
2945
+ showZoomControls
2946
+ },
2947
+ /* @__PURE__ */ react_exports.createElement(Tooltip_default, { content: (0, i18n_exports._)("Fit to data"), contentRelationship: "label" }, /* @__PURE__ */ react_exports.createElement(
2948
+ StyledFitToDataButton,
2949
+ {
2950
+ onClick: handleResetClick,
2951
+ controlBackgroundColor,
2952
+ controlForegroundColor,
2953
+ controlIconColorEncoded: formatColor(controlForegroundColor)
2954
+ }
2955
+ ))
2148
2956
  ),
2149
- isMapLoaded && layer && layer.type === visualization_schemas_exports.LAYER_TYPE.Choropleth && !layer.source && /* @__PURE__ */ react_exports.createElement(
2150
- ChoroplethLayer_default,
2151
- {
2152
- map,
2153
- choroplethLayer: layer,
2154
- isThemeChanged,
2155
- setIsThemeChanged: setIsThemeChangedCallback,
2156
- onMapClick
2157
- }
2957
+ wrapFloatingLayers(
2958
+ /* @__PURE__ */ react_exports.createElement(react_exports.Fragment, null, isMapLoaded && layer && (layer.type === visualization_schemas_exports.LAYER_TYPE.Bubble || layer.type === visualization_schemas_exports.LAYER_TYPE.Marker) && /* @__PURE__ */ react_exports.createElement(
2959
+ ClusterLayer_default,
2960
+ {
2961
+ clusterLayer: layer,
2962
+ themeColorScheme,
2963
+ map,
2964
+ zoom: currentZoomLevel,
2965
+ onMapClick,
2966
+ showCoordinates,
2967
+ stylesManagedExternally,
2968
+ hasEventHandlers
2969
+ }
2970
+ ), isMapLoaded && layer && layer.type === visualization_schemas_exports.LAYER_TYPE.Choropleth && layer.source && /* @__PURE__ */ react_exports.createElement(MapProvider, null, /* @__PURE__ */ react_exports.createElement(
2971
+ LocalChoroplethLayer_default,
2972
+ {
2973
+ width,
2974
+ height,
2975
+ map,
2976
+ choroplethLayer: layer,
2977
+ isThemeChanged,
2978
+ setIsThemeChanged: setIsThemeChangedCallback,
2979
+ onMapClick,
2980
+ hasEventHandlers
2981
+ }
2982
+ )), isMapLoaded && layer && layer.type === visualization_schemas_exports.LAYER_TYPE.Choropleth && !layer.source && /* @__PURE__ */ react_exports.createElement(MapProvider, null, /* @__PURE__ */ react_exports.createElement(
2983
+ ChoroplethLayer_default,
2984
+ {
2985
+ map,
2986
+ choroplethLayer: layer,
2987
+ isThemeChanged,
2988
+ setIsThemeChanged: setIsThemeChangedCallback,
2989
+ onMapClick,
2990
+ stylesManagedExternally,
2991
+ hasEventHandlers
2992
+ }
2993
+ )))
2158
2994
  )
2159
2995
  );
2160
2996
  };
@@ -2234,36 +3070,36 @@ var PresetPalettes_exports = {};
2234
3070
  __export(PresetPalettes_exports, {
2235
3071
  default: () => PresetPalettes_default
2236
3072
  });
2237
- var defaultImport28 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
3073
+ var defaultImport30 = __toESM(require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
2238
3074
  __reExport(PresetPalettes_exports, require("@splunk/visualization-color-palettes/editors/PresetPalettes"));
2239
- var PresetPalettes_default = "default" in defaultImport28 ? defaultImport28.default : defaultImport28;
3075
+ var PresetPalettes_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
2240
3076
 
2241
3077
  // esm-externals:@splunk/visualization-icons
2242
3078
  var visualization_icons_exports = {};
2243
3079
  __export(visualization_icons_exports, {
2244
3080
  default: () => visualization_icons_default
2245
3081
  });
2246
- var defaultImport29 = __toESM(require("@splunk/visualization-icons"));
3082
+ var defaultImport31 = __toESM(require("@splunk/visualization-icons"));
2247
3083
  __reExport(visualization_icons_exports, require("@splunk/visualization-icons"));
2248
- var visualization_icons_default = "default" in defaultImport29 ? defaultImport29.default : defaultImport29;
3084
+ var visualization_icons_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
2249
3085
 
2250
3086
  // esm-externals:@splunk/visualization-icons/placeholders
2251
3087
  var placeholders_exports = {};
2252
3088
  __export(placeholders_exports, {
2253
3089
  default: () => placeholders_default
2254
3090
  });
2255
- var defaultImport30 = __toESM(require("@splunk/visualization-icons/placeholders"));
3091
+ var defaultImport32 = __toESM(require("@splunk/visualization-icons/placeholders"));
2256
3092
  __reExport(placeholders_exports, require("@splunk/visualization-icons/placeholders"));
2257
- var placeholders_default = "default" in defaultImport30 ? defaultImport30.default : defaultImport30;
3093
+ var placeholders_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
2258
3094
 
2259
3095
  // esm-externals:@splunk/visualizations-shared/configUtils
2260
3096
  var configUtils_exports = {};
2261
3097
  __export(configUtils_exports, {
2262
3098
  default: () => configUtils_default
2263
3099
  });
2264
- var defaultImport31 = __toESM(require("@splunk/visualizations-shared/configUtils"));
3100
+ var defaultImport33 = __toESM(require("@splunk/visualizations-shared/configUtils"));
2265
3101
  __reExport(configUtils_exports, require("@splunk/visualizations-shared/configUtils"));
2266
- var configUtils_default = "default" in defaultImport31 ? defaultImport31.default : defaultImport31;
3102
+ var configUtils_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
2267
3103
 
2268
3104
  // src/common/utils/configUtils.ts
2269
3105
  function enhanceConfig(vizConfig) {
@@ -2297,18 +3133,18 @@ var pick_exports = {};
2297
3133
  __export(pick_exports, {
2298
3134
  default: () => pick_default
2299
3135
  });
2300
- var defaultImport32 = __toESM(require("@splunk/themes/pick"));
3136
+ var defaultImport34 = __toESM(require("@splunk/themes/pick"));
2301
3137
  __reExport(pick_exports, require("@splunk/themes/pick"));
2302
- var pick_default = "default" in defaultImport32 ? defaultImport32.default : defaultImport32;
3138
+ var pick_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
2303
3139
 
2304
3140
  // esm-externals:@splunk/themes/variables
2305
3141
  var variables_exports = {};
2306
3142
  __export(variables_exports, {
2307
3143
  default: () => variables_default
2308
3144
  });
2309
- var defaultImport33 = __toESM(require("@splunk/themes/variables"));
3145
+ var defaultImport35 = __toESM(require("@splunk/themes/variables"));
2310
3146
  __reExport(variables_exports, require("@splunk/themes/variables"));
2311
- var variables_default = "default" in defaultImport33 ? defaultImport33.default : defaultImport33;
3147
+ var variables_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
2312
3148
 
2313
3149
  // src/common/ThemedDefaults.tsx
2314
3150
  var defaultBackgroundColor = (props) => pick_default({
@@ -2463,7 +3299,10 @@ var editorConfig = [
2463
3299
  label: (0, i18n_exports._)("Bubble size"),
2464
3300
  option: "layers[0].bubbleSize",
2465
3301
  editor: "editor.columnMultiSelector",
2466
- showEditor: ({ options }) => !(options.layers && options.layers.length && (options.layers[0].type === "marker" || options.layers[0].type === "choropleth")),
3302
+ showEditor: ({ options }) => {
3303
+ var _a;
3304
+ return !(((_a = options.layers) == null ? void 0 : _a.length) && (options.layers[0].type === "marker" || options.layers[0].type === "choropleth"));
3305
+ },
2467
3306
  editorProps: {
2468
3307
  dataSourceKey: "primary",
2469
3308
  shouldShowInternalFields: false,
@@ -2820,54 +3659,54 @@ var getSettingsFromThemedProps_exports = {};
2820
3659
  __export(getSettingsFromThemedProps_exports, {
2821
3660
  default: () => getSettingsFromThemedProps_default
2822
3661
  });
2823
- var defaultImport34 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
3662
+ var defaultImport36 = __toESM(require("@splunk/themes/getSettingsFromThemedProps"));
2824
3663
  __reExport(getSettingsFromThemedProps_exports, require("@splunk/themes/getSettingsFromThemedProps"));
2825
- var getSettingsFromThemedProps_default = "default" in defaultImport34 ? defaultImport34.default : defaultImport34;
3664
+ var getSettingsFromThemedProps_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
2826
3665
 
2827
3666
  // esm-externals:@splunk/visualization-encoding/Options
2828
3667
  var Options_exports = {};
2829
3668
  __export(Options_exports, {
2830
3669
  default: () => Options_default
2831
3670
  });
2832
- var defaultImport35 = __toESM(require("@splunk/visualization-encoding/Options"));
3671
+ var defaultImport37 = __toESM(require("@splunk/visualization-encoding/Options"));
2833
3672
  __reExport(Options_exports, require("@splunk/visualization-encoding/Options"));
2834
- var Options_default = "default" in defaultImport35 ? defaultImport35.default : defaultImport35;
3673
+ var Options_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
2835
3674
 
2836
3675
  // esm-externals:@splunk/visualizations-shared/SanitizeProps
2837
3676
  var SanitizeProps_exports = {};
2838
3677
  __export(SanitizeProps_exports, {
2839
3678
  default: () => SanitizeProps_default
2840
3679
  });
2841
- var defaultImport36 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
3680
+ var defaultImport38 = __toESM(require("@splunk/visualizations-shared/SanitizeProps"));
2842
3681
  __reExport(SanitizeProps_exports, require("@splunk/visualizations-shared/SanitizeProps"));
2843
- var SanitizeProps_default = "default" in defaultImport36 ? defaultImport36.default : defaultImport36;
3682
+ var SanitizeProps_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
2844
3683
 
2845
3684
  // esm-externals:@splunk/visualization-context/TimezoneContext
2846
3685
  var TimezoneContext_exports = {};
2847
3686
  __export(TimezoneContext_exports, {
2848
3687
  default: () => TimezoneContext_default
2849
3688
  });
2850
- var defaultImport37 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
3689
+ var defaultImport39 = __toESM(require("@splunk/visualization-context/TimezoneContext"));
2851
3690
  __reExport(TimezoneContext_exports, require("@splunk/visualization-context/TimezoneContext"));
2852
- var TimezoneContext_default = "default" in defaultImport37 ? defaultImport37.default : defaultImport37;
3691
+ var TimezoneContext_default = "default" in defaultImport39 ? defaultImport39.default : defaultImport39;
2853
3692
 
2854
3693
  // esm-externals:@splunk/moment
2855
3694
  var moment_exports = {};
2856
3695
  __export(moment_exports, {
2857
3696
  default: () => moment_default
2858
3697
  });
2859
- var defaultImport38 = __toESM(require("@splunk/moment"));
3698
+ var defaultImport40 = __toESM(require("@splunk/moment"));
2860
3699
  __reExport(moment_exports, require("@splunk/moment"));
2861
- var moment_default = "default" in defaultImport38 ? defaultImport38.default : defaultImport38;
3700
+ var moment_default = "default" in defaultImport40 ? defaultImport40.default : defaultImport40;
2862
3701
 
2863
3702
  // esm-externals:@splunk/async-dynamic-options-evaluator
2864
3703
  var async_dynamic_options_evaluator_exports = {};
2865
3704
  __export(async_dynamic_options_evaluator_exports, {
2866
3705
  default: () => async_dynamic_options_evaluator_default
2867
3706
  });
2868
- var defaultImport39 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
3707
+ var defaultImport41 = __toESM(require("@splunk/async-dynamic-options-evaluator"));
2869
3708
  __reExport(async_dynamic_options_evaluator_exports, require("@splunk/async-dynamic-options-evaluator"));
2870
- var async_dynamic_options_evaluator_default = "default" in defaultImport39 ? defaultImport39.default : defaultImport39;
3709
+ var async_dynamic_options_evaluator_default = "default" in defaultImport41 ? defaultImport41.default : defaultImport41;
2871
3710
 
2872
3711
  // src/common/interfaces/VizActionHandler.ts
2873
3712
  var DefaultVizActionHandler = class {
@@ -2882,7 +3721,7 @@ var DefaultVizActionHandler = class {
2882
3721
  var INITIAL_HEIGHT = 250;
2883
3722
  var SplunkVisualization = class {
2884
3723
  };
2885
- SplunkVisualization.propTypes = {
3724
+ __publicField(SplunkVisualization, "propTypes", {
2886
3725
  /**
2887
3726
  * display mode
2888
3727
  */
@@ -2958,11 +3797,11 @@ SplunkVisualization.propTypes = {
2958
3797
  * A callback to request new data with updated request params
2959
3798
  */
2960
3799
  onRequestParamsChange: prop_types_exports.func
2961
- };
3800
+ });
2962
3801
  /**
2963
3802
  *
2964
3803
  */
2965
- SplunkVisualization.defaults = {
3804
+ __publicField(SplunkVisualization, "defaults", {
2966
3805
  // BaseVisualization in dashboard-visualizations uses 100% for width but 250 for height
2967
3806
  width: "100%",
2968
3807
  height: INITIAL_HEIGHT,
@@ -2977,7 +3816,7 @@ SplunkVisualization.defaults = {
2977
3816
  onComputedProps: () => ({}),
2978
3817
  loading: false,
2979
3818
  onRequestParamsChange: lodash_exports.noop
2980
- };
3819
+ });
2981
3820
  var SplunkVisualization_default = SplunkVisualization;
2982
3821
 
2983
3822
  // src/common/interfaces/DataSource.ts
@@ -3031,9 +3870,9 @@ var usePaginationParams = ({
3031
3870
  meta,
3032
3871
  onRequestParamsChange
3033
3872
  }) => {
3034
- const totalCount = meta && meta.totalCount || 0;
3035
- const offset = requestParams && requestParams.offset || 0;
3036
- const count = requestParams && requestParams.count;
3873
+ const totalCount = (meta == null ? void 0 : meta.totalCount) || 0;
3874
+ const offset = (requestParams == null ? void 0 : requestParams.offset) || 0;
3875
+ const count = requestParams == null ? void 0 : requestParams.count;
3037
3876
  const totalPages = typeof count === "number" && count > 0 ? Math.ceil(totalCount / count) : 0;
3038
3877
  const current = typeof count === "number" && count > 0 ? Math.floor(offset / count) + 1 : 0;
3039
3878
  const isPaging = totalPages > 1 && typeof onRequestParamsChange === "function";
@@ -3075,9 +3914,9 @@ var SizeAwareWrapper_exports = {};
3075
3914
  __export(SizeAwareWrapper_exports, {
3076
3915
  default: () => SizeAwareWrapper_default
3077
3916
  });
3078
- var defaultImport40 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
3917
+ var defaultImport42 = __toESM(require("@splunk/visualizations-shared/SizeAwareWrapper"));
3079
3918
  __reExport(SizeAwareWrapper_exports, require("@splunk/visualizations-shared/SizeAwareWrapper"));
3080
- var SizeAwareWrapper_default = "default" in defaultImport40 ? defaultImport40.default : defaultImport40;
3919
+ var SizeAwareWrapper_default = "default" in defaultImport42 ? defaultImport42.default : defaultImport42;
3081
3920
 
3082
3921
  // src/common/components/MissingPropsMessage.tsx
3083
3922
  var isMissing = (v) => {
@@ -3132,7 +3971,7 @@ var Cover = styled_components_default.div`
3132
3971
  bottom: 0;
3133
3972
  `;
3134
3973
  var Blocker = styled_components_default.div.attrs({
3135
- "data-splunk-visualization-version": "28.5.3 - 657435b86"
3974
+ "data-splunk-visualization-version": "28.7.0 - d7b18cab6"
3136
3975
  })`
3137
3976
  position: relative;
3138
3977
  width: 100%;
@@ -3204,7 +4043,7 @@ var withFixedSizeContainer = (Viz) => {
3204
4043
  FixSizeItem,
3205
4044
  {
3206
4045
  "data-test": "fix-size-item",
3207
- "data-splunk-visualization-version": "28.5.3 - 657435b86",
4046
+ "data-splunk-visualization-version": "28.7.0 - d7b18cab6",
3208
4047
  width,
3209
4048
  height,
3210
4049
  backgroundColor
@@ -3295,13 +4134,14 @@ var numberUtils_exports = {};
3295
4134
  __export(numberUtils_exports, {
3296
4135
  default: () => numberUtils_default
3297
4136
  });
3298
- var defaultImport41 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
4137
+ var defaultImport43 = __toESM(require("@splunk/visualizations-shared/numberUtils"));
3299
4138
  __reExport(numberUtils_exports, require("@splunk/visualizations-shared/numberUtils"));
3300
- var numberUtils_default = "default" in defaultImport41 ? defaultImport41.default : defaultImport41;
4139
+ var numberUtils_default = "default" in defaultImport43 ? defaultImport43.default : defaultImport43;
3301
4140
 
3302
4141
  // src/common/utils/dataUtils.ts
3303
4142
  var convertToArrOfObjects = (columns, fields) => {
3304
- if (!columns || !columns[0] || !columns[0].length) return [];
4143
+ var _a;
4144
+ if (!((_a = columns == null ? void 0 : columns[0]) == null ? void 0 : _a.length)) return [];
3305
4145
  const data = [];
3306
4146
  for (let i = 0; i < columns[0].length; i += 1) {
3307
4147
  const newObj = {};
@@ -3695,9 +4535,9 @@ var FeatureFlags_exports = {};
3695
4535
  __export(FeatureFlags_exports, {
3696
4536
  default: () => FeatureFlags_default
3697
4537
  });
3698
- var defaultImport42 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
4538
+ var defaultImport44 = __toESM(require("@splunk/visualization-context/FeatureFlags"));
3699
4539
  __reExport(FeatureFlags_exports, require("@splunk/visualization-context/FeatureFlags"));
3700
- var FeatureFlags_default = "default" in defaultImport42 ? defaultImport42.default : defaultImport42;
4540
+ var FeatureFlags_default = "default" in defaultImport44 ? defaultImport44.default : defaultImport44;
3701
4541
 
3702
4542
  // src/common/utils/featureFlagUtils.ts
3703
4543
  var getFeatureFlag = (context, flagName) => {
@@ -3715,9 +4555,9 @@ var trellisUtils_exports = {};
3715
4555
  __export(trellisUtils_exports, {
3716
4556
  default: () => trellisUtils_default
3717
4557
  });
3718
- var defaultImport43 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
4558
+ var defaultImport45 = __toESM(require("@splunk/visualizations-shared/trellisUtils"));
3719
4559
  __reExport(trellisUtils_exports, require("@splunk/visualizations-shared/trellisUtils"));
3720
- var trellisUtils_default = "default" in defaultImport43 ? defaultImport43.default : defaultImport43;
4560
+ var trellisUtils_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
3721
4561
 
3722
4562
  // src/common/utils/trellisUtils.ts
3723
4563
  var turnOffLegendDisplayWhenTrellisIsOn = (isTrellisOn, options) => {
@@ -3734,9 +4574,9 @@ var visualization_canvas_exports = {};
3734
4574
  __export(visualization_canvas_exports, {
3735
4575
  default: () => visualization_canvas_default
3736
4576
  });
3737
- var defaultImport44 = __toESM(require("@splunk/visualization-canvas"));
4577
+ var defaultImport46 = __toESM(require("@splunk/visualization-canvas"));
3738
4578
  __reExport(visualization_canvas_exports, require("@splunk/visualization-canvas"));
3739
- var visualization_canvas_default = "default" in defaultImport44 ? defaultImport44.default : defaultImport44;
4579
+ var visualization_canvas_default = "default" in defaultImport46 ? defaultImport46.default : defaultImport46;
3740
4580
 
3741
4581
  // src/common/components/VizStyleWrapper.jsx
3742
4582
  var VizStyleWrapper = styled_components_default.div.attrs(({ dataTestKey }) => ({
@@ -3758,9 +4598,27 @@ var Triangle_exports = {};
3758
4598
  __export(Triangle_exports, {
3759
4599
  default: () => Triangle_default
3760
4600
  });
3761
- var defaultImport45 = __toESM(require("@splunk/react-icons/Triangle"));
4601
+ var defaultImport47 = __toESM(require("@splunk/react-icons/Triangle"));
3762
4602
  __reExport(Triangle_exports, require("@splunk/react-icons/Triangle"));
3763
- var Triangle_default = "default" in defaultImport45 ? defaultImport45.default : defaultImport45;
4603
+ var Triangle_default = "default" in defaultImport47 ? defaultImport47.default : defaultImport47;
4604
+
4605
+ // esm-externals:@splunk/visualizations-shared/propUtils
4606
+ var propUtils_exports = {};
4607
+ __export(propUtils_exports, {
4608
+ default: () => propUtils_default
4609
+ });
4610
+ var defaultImport48 = __toESM(require("@splunk/visualizations-shared/propUtils"));
4611
+ __reExport(propUtils_exports, require("@splunk/visualizations-shared/propUtils"));
4612
+ var propUtils_default = "default" in defaultImport48 ? defaultImport48.default : defaultImport48;
4613
+
4614
+ // esm-externals:@splunk/visualizations-shared/simpleXMLOptions
4615
+ var simpleXMLOptions_exports = {};
4616
+ __export(simpleXMLOptions_exports, {
4617
+ default: () => simpleXMLOptions_default
4618
+ });
4619
+ var defaultImport49 = __toESM(require("@splunk/visualizations-shared/simpleXMLOptions"));
4620
+ __reExport(simpleXMLOptions_exports, require("@splunk/visualizations-shared/simpleXMLOptions"));
4621
+ var simpleXMLOptions_default = "default" in defaultImport49 ? defaultImport49.default : defaultImport49;
3764
4622
 
3765
4623
  // src/common/chartingUtils.ts
3766
4624
  var DEFAULT_LINE_WIDTH = 2;
@@ -3799,9 +4657,9 @@ var shouldEnableSearchZoom = (eventHandlers = [], xField = "") => {
3799
4657
  const xAxisIsTime = xField === "_time";
3800
4658
  return !!rangeSelectEventHandler && xAxisIsTime;
3801
4659
  };
3802
- var canvasSupportedTimeSeriesCharts = ["splunk.line"];
4660
+ var canvasSupportedTimeSeriesCharts = ["splunk.line", "splunk.area"];
3803
4661
  var isTimeSeriesCanvasRenderSupported = (vizConfigKey) => {
3804
- return canvasSupportedTimeSeriesCharts.indexOf(vizConfigKey) > -1;
4662
+ return canvasSupportedTimeSeriesCharts.includes(vizConfigKey);
3805
4663
  };
3806
4664
  var filterChartDataFromInternalFields = (chartData) => {
3807
4665
  const { fields, columns } = chartData;
@@ -3956,46 +4814,66 @@ var getY2ScaleConfig = (label, axisAbbreviation, axisScale, roundAxisLabelsToInt
3956
4814
  }
3957
4815
  return y2Config;
3958
4816
  };
3959
- var getSeriesOverrides = (yfields, y2fields, lineWidth, overlayFields, y2Enabled, nullValueMode, markerDisplay, lineDashStyle, lineDashStylesByField, stepPosition, stepPositionsByField) => {
4817
+ var getSeriesType = (isOverlay, isAreaChart, isStacked) => {
4818
+ if (isOverlay) return "line";
4819
+ if (!isAreaChart) return void 0;
4820
+ return isStacked ? "stacked-area" : "area";
4821
+ };
4822
+ var getY2Scale = (field, y2fields, overlayFields) => {
4823
+ const assignToY2 = (y2fields == null ? void 0 : y2fields.length) > 0 && y2fields.includes(field) || !(y2fields == null ? void 0 : y2fields.length) && (overlayFields == null ? void 0 : overlayFields.includes(field));
4824
+ return assignToY2 ? "y2" : "y";
4825
+ };
4826
+ var getSeriesOverrides = (opts) => {
4827
+ var _a;
4828
+ const {
4829
+ yfields,
4830
+ y2fields,
4831
+ lineWidth,
4832
+ overlayFields,
4833
+ y2Enabled,
4834
+ nullValueMode,
4835
+ markerDisplay,
4836
+ lineDashStyle,
4837
+ lineDashStylesByField,
4838
+ stepPosition,
4839
+ stepPositionsByField,
4840
+ type,
4841
+ stackMode,
4842
+ showLines
4843
+ } = opts;
3960
4844
  const seriesConfig = {};
3961
4845
  let spanGaps;
3962
- let replaceNullsWithZero;
3963
4846
  if (nullValueMode === "gaps") {
3964
4847
  spanGaps = false;
3965
- } else if (nullValueMode === "connect" || nullValueMode === "zero") {
4848
+ } else if (nullValueMode != null) {
3966
4849
  spanGaps = true;
3967
- if (nullValueMode === "zero") {
3968
- replaceNullsWithZero = true;
3969
- }
4850
+ } else {
4851
+ spanGaps = void 0;
3970
4852
  }
3971
- yfields.forEach((field) => {
4853
+ const replaceNullsWithZero = nullValueMode === "zero" ? true : void 0;
4854
+ const isAreaChart = type === "area";
4855
+ const isStacked = isAreaChart && (stackMode === "stacked" || stackMode === "stacked100");
4856
+ const areaFields = isAreaChart ? yfields.filter((f) => !(overlayFields == null ? void 0 : overlayFields.includes(f))) : yfields;
4857
+ const overlayFieldsInOrder = (_a = overlayFields == null ? void 0 : overlayFields.filter((f) => yfields.includes(f))) != null ? _a : [];
4858
+ const orderedFields = isAreaChart ? [...areaFields, ...overlayFieldsInOrder] : yfields;
4859
+ orderedFields.forEach((field) => {
4860
+ var _a2;
4861
+ const isOverlay = (_a2 = overlayFields == null ? void 0 : overlayFields.includes(field)) != null ? _a2 : false;
4862
+ const isPercent = isAreaChart && stackMode === "stacked100" && !isOverlay;
4863
+ const shouldHideAreaOutline = isAreaChart && showLines === false && !isOverlay;
3972
4864
  seriesConfig[field] = {
3973
- overrides: { width: lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH }
4865
+ overrides: __spreadValues({
4866
+ width: shouldHideAreaOutline ? 0 : lineWidth != null ? lineWidth : DEFAULT_LINE_WIDTH
4867
+ }, isPercent ? { stacking: { mode: "percent", group: "A" } } : {})
3974
4868
  };
3975
- if (spanGaps !== void 0) {
3976
- seriesConfig[field].overrides.spanGaps = spanGaps;
3977
- }
3978
- if (y2Enabled) {
3979
- const shouldAssignToY2 = (
3980
- // If y2Fields are present, assign all y2Fields to y2 scale
3981
- (y2fields == null ? void 0 : y2fields.length) > 0 && y2fields.includes(field) || // Else, assign all overlayFields to y2 scale
3982
- (!y2fields || y2fields.length === 0) && (overlayFields == null ? void 0 : overlayFields.includes(field))
3983
- );
3984
- if (shouldAssignToY2) {
3985
- seriesConfig[field].overrides.scale = "y2";
3986
- } else {
3987
- seriesConfig[field].overrides.scale = "y";
3988
- }
3989
- }
3990
- if (overlayFields == null ? void 0 : overlayFields.includes(field)) {
3991
- seriesConfig[field].type = "line";
3992
- }
3993
- if (markerDisplay !== void 0) {
3994
- seriesConfig[field].markerDisplay = markerDisplay;
3995
- }
3996
- const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
3997
- if (fieldDashStyle) {
3998
- seriesConfig[field].lineDashStyle = fieldDashStyle;
4869
+ const seriesType = getSeriesType(isOverlay, isAreaChart, isStacked);
4870
+ if (seriesType !== void 0) seriesConfig[field].type = seriesType;
4871
+ if (spanGaps !== void 0) seriesConfig[field].overrides.spanGaps = spanGaps;
4872
+ if (y2Enabled) seriesConfig[field].overrides.scale = getY2Scale(field, y2fields, overlayFields);
4873
+ if (markerDisplay !== void 0) seriesConfig[field].markerDisplay = markerDisplay;
4874
+ if (!isAreaChart || isOverlay) {
4875
+ const fieldDashStyle = (lineDashStylesByField == null ? void 0 : lineDashStylesByField[field]) || lineDashStyle;
4876
+ if (fieldDashStyle) seriesConfig[field].lineDashStyle = fieldDashStyle;
3999
4877
  }
4000
4878
  const hasFieldStepPosition = Object.hasOwn(stepPositionsByField || {}, field);
4001
4879
  const fieldStepPosition = hasFieldStepPosition ? stepPositionsByField == null ? void 0 : stepPositionsByField[field] : stepPosition;
@@ -4066,8 +4944,27 @@ var TrellisTitleDiv = styled_components_default.div`
4066
4944
  background-color: ${(props) => props.backgroundColor};
4067
4945
  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
4946
  `;
4947
+ var formatTrellisKey = (value) => {
4948
+ if (value === null || value === void 0) {
4949
+ return "";
4950
+ }
4951
+ if (typeof value === "string") {
4952
+ return value;
4953
+ }
4954
+ if (typeof value === "number" || typeof value === "boolean") {
4955
+ return value.toString();
4956
+ }
4957
+ if (typeof value === "symbol") {
4958
+ return value.toString();
4959
+ }
4960
+ try {
4961
+ return JSON.stringify(value);
4962
+ } catch (e) {
4963
+ return typeof value === "bigint" ? value.toString() : "";
4964
+ }
4965
+ };
4069
4966
  var TrellisTitle = (props) => {
4070
- const titleText = String(props.trellisKey).toString();
4967
+ const titleText = formatTrellisKey(props.trellisKey);
4071
4968
  return /* @__PURE__ */ react_exports.createElement(
4072
4969
  TrellisTitleDiv,
4073
4970
  {
@@ -4203,6 +5100,38 @@ var parseArrayOption = (value) => {
4203
5100
  }
4204
5101
  return void 0;
4205
5102
  };
5103
+ var getAreaOpacityForCanvas = (areaOpacity) => (
5104
+ // Preserve legacy visualizations behavior where area opacity is squared to match charting output.
5105
+ areaOpacity !== void 0 && areaOpacity !== null ? __pow(areaOpacity, 2) : areaOpacity
5106
+ );
5107
+ var parseTickIntervalOption = (simpleXMLValue, canvasValue) => {
5108
+ if (simpleXMLValue) return Number(simpleXMLValue);
5109
+ if (canvasValue) return Number(canvasValue);
5110
+ return void 0;
5111
+ };
5112
+ var getYAxisTitles = ({
5113
+ y2Enabled,
5114
+ yFields,
5115
+ y2Fields,
5116
+ overlayFields,
5117
+ yAxisTitleText,
5118
+ yAxisTitleVisibility,
5119
+ y2AxisTitleText,
5120
+ y2AxisTitleVisibility,
5121
+ containerHeight
5122
+ }) => {
5123
+ const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
5124
+ const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
5125
+ const yAxisTitle = ellipsisAxisTitle(
5126
+ getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility),
5127
+ containerHeight
5128
+ );
5129
+ const y2AxisTitle = ellipsisAxisTitle(
5130
+ getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility),
5131
+ containerHeight
5132
+ );
5133
+ return { yAxisTitle, y2AxisTitle };
5134
+ };
4206
5135
  var TimeSeriesChartWrapper = (props) => {
4207
5136
  var _b, _c, _d;
4208
5137
  const _a = props, {
@@ -4292,6 +5221,8 @@ var TimeSeriesChartWrapper = (props) => {
4292
5221
  "chart.overlayFields": overlayFieldsStr,
4293
5222
  "chart.nullValueMode": nullValueMode,
4294
5223
  "chart.showDataLabels": showDataLabels,
5224
+ "chart.showLines": showLines,
5225
+ "chart.stackMode": stackMode,
4295
5226
  lineWidth,
4296
5227
  lineDashStyle,
4297
5228
  fieldDashStyles: lineDashStylesByFieldStr,
@@ -4320,7 +5251,10 @@ var TimeSeriesChartWrapper = (props) => {
4320
5251
  yAxisMinorTickSize,
4321
5252
  y2AxisMinorTickSize,
4322
5253
  showYAxisWithZero: showYAxisWithZeroFromOptions,
4323
- showY2AxisWithZero: showY2AxisWithZeroFromOptions
5254
+ showY2AxisWithZero: showY2AxisWithZeroFromOptions,
5255
+ // area only props
5256
+ areaFillOpacity: areaOpacity,
5257
+ chart: chartType
4324
5258
  } = options;
4325
5259
  const dataValuesDisplay = showDataLabels === "none" ? "off" : showDataLabels;
4326
5260
  const showYAxisWithZero = showYAxisWithZeroFromProps != null ? showYAxisWithZeroFromProps : showYAxisWithZeroFromOptions;
@@ -4337,13 +5271,11 @@ var TimeSeriesChartWrapper = (props) => {
4337
5271
  const yAxisMax = parseAxisValue(yAxisMaxRaw);
4338
5272
  const y2AxisMin = parseAxisValue(y2AxisMinRaw);
4339
5273
  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(
5274
+ const yAxisMajorTickIntervalNum = parseTickIntervalOption(
5275
+ yAxisMajorUnitFromSimpleXML,
5276
+ yAxisMajorTickInterval
5277
+ );
5278
+ const y2AxisMajorTickIntervalNum = parseTickIntervalOption(
4347
5279
  y2AxisMajorUnitFromSimpleXML,
4348
5280
  y2AxisMajorTickInterval
4349
5281
  );
@@ -4352,6 +5284,7 @@ var TimeSeriesChartWrapper = (props) => {
4352
5284
  const y2AxisMajorTickSizeNum = y2AxisMajorTickSize != null ? Number(y2AxisMajorTickSize) : void 0;
4353
5285
  const yAxisMinorTickSizeNum = yAxisMinorTickSize != null ? Number(yAxisMinorTickSize) : void 0;
4354
5286
  const y2AxisMinorTickSizeNum = y2AxisMinorTickSize != null ? Number(y2AxisMinorTickSize) : void 0;
5287
+ const areaOpacityForCanvas = getAreaOpacityForCanvas(areaOpacity);
4355
5288
  const seriesColors = seriesColorsStr ? JSON.parse(seriesColorsStr) : void 0;
4356
5289
  const seriesColorsByField = fieldColors ? JSON.parse(fieldColors) : void 0;
4357
5290
  const lineDashStylesByField = lineDashStylesByFieldStr ? JSON.parse(lineDashStylesByFieldStr) : void 0;
@@ -4382,26 +5315,40 @@ var TimeSeriesChartWrapper = (props) => {
4382
5315
  );
4383
5316
  let xAxisTitle = getComputedAxisTitles(xAxisTitleText, [xField], xAxisTitleVisibility);
4384
5317
  xAxisTitle = ellipsisAxisTitle(xAxisTitle, containerWidth);
4385
- const yFieldsForTitle = y2Enabled ? yFields.filter((field) => !y2Fields.includes(field)) : yFields;
4386
- let yAxisTitle = getComputedAxisTitles(yAxisTitleText, yFieldsForTitle, yAxisTitleVisibility);
4387
- yAxisTitle = ellipsisAxisTitle(yAxisTitle, containerHeight);
4388
- const fieldsForY2Axis = y2Fields.length > 0 ? y2Fields : overlayFields;
4389
- let y2AxisTitle = getComputedAxisTitles(y2AxisTitleText, fieldsForY2Axis, y2AxisTitleVisibility);
4390
- y2AxisTitle = ellipsisAxisTitle(y2AxisTitle, containerHeight);
5318
+ const { yAxisTitle, y2AxisTitle } = getYAxisTitles({
5319
+ y2Enabled,
5320
+ yFields,
5321
+ y2Fields,
5322
+ overlayFields,
5323
+ yAxisTitleText,
5324
+ yAxisTitleVisibility,
5325
+ y2AxisTitleText,
5326
+ y2AxisTitleVisibility,
5327
+ containerHeight
5328
+ });
4391
5329
  const xScaleConfig = (0, react_exports.useMemo)(
4392
5330
  () => getXScaleConfig(xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation),
4393
5331
  [xAxisTitle, xAxisLabelVisibility, xAxisLabelRotation]
4394
5332
  );
5333
+ const isStacked100 = stackMode === "stacked100";
4395
5334
  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]
5335
+ () => {
5336
+ const config2 = getYScaleConfig(
5337
+ yAxisTitle,
5338
+ yAxisAbbreviation,
5339
+ yAxisScale,
5340
+ yAxisLabelVisibility,
5341
+ yAxisMin,
5342
+ yAxisMax
5343
+ );
5344
+ if (isStacked100) {
5345
+ config2.y.tickFmt = (v) => `${Math.round(v * 100)}%`;
5346
+ config2.y.range = () => [0, 1];
5347
+ }
5348
+ return config2;
5349
+ },
5350
+ // eslint-disable-next-line react-hooks/exhaustive-deps
5351
+ [yAxisTitle, yAxisAbbreviation, yAxisScale, yAxisLabelVisibility, yAxisMin, yAxisMax, isStacked100]
4405
5352
  );
4406
5353
  const y2ScaleConfig = (0, react_exports.useMemo)(() => {
4407
5354
  if (y2Enabled) {
@@ -4433,10 +5380,11 @@ var TimeSeriesChartWrapper = (props) => {
4433
5380
  ];
4434
5381
  chartData.fields = filteredChartData.fields;
4435
5382
  chartData.columns = seriesDataFormatted;
5383
+ const normalizedStackMode = stackMode === "stacked" || stackMode === "stacked100" ? stackMode : "auto";
4436
5384
  const seriesOverrides = (0, react_exports.useMemo)(
4437
- () => getSeriesOverrides(
4438
- yFields,
4439
- y2Fields,
5385
+ () => getSeriesOverrides({
5386
+ yfields: yFields,
5387
+ y2fields: y2Fields,
4440
5388
  lineWidth,
4441
5389
  overlayFields,
4442
5390
  y2Enabled,
@@ -4445,8 +5393,11 @@ var TimeSeriesChartWrapper = (props) => {
4445
5393
  lineDashStyle,
4446
5394
  lineDashStylesByField,
4447
5395
  stepPosition,
4448
- stepPositionsByField
4449
- ),
5396
+ stepPositionsByField,
5397
+ type: chartType,
5398
+ stackMode: normalizedStackMode,
5399
+ showLines
5400
+ }),
4450
5401
  [
4451
5402
  yFields,
4452
5403
  y2Fields,
@@ -4458,7 +5409,10 @@ var TimeSeriesChartWrapper = (props) => {
4458
5409
  lineDashStyle,
4459
5410
  lineDashStylesByField,
4460
5411
  stepPosition,
4461
- stepPositionsByField
5412
+ stepPositionsByField,
5413
+ chartType,
5414
+ normalizedStackMode,
5415
+ showLines
4462
5416
  ]
4463
5417
  );
4464
5418
  const chartingEventAnnotations = (0, react_exports.useMemo)(
@@ -4526,50 +5480,54 @@ var TimeSeriesChartWrapper = (props) => {
4526
5480
  react_exports.useEffect(() => {
4527
5481
  additionalTooltipValuesRef.current = additionalTooltipValues;
4528
5482
  }, [additionalTooltipValues]);
5483
+ const handleCrosshairMouseout = react_exports.useCallback(() => {
5484
+ if (onPointMouseOut && lastPayloadRef.current) {
5485
+ onPointMouseOut({
5486
+ type: "point.mouseout",
5487
+ originalEvent: lastOriginalEventRef.current,
5488
+ payload: lastPayloadRef.current
5489
+ });
5490
+ }
5491
+ previousMouseoverPayloadRef.current = null;
5492
+ }, [onPointMouseOut]);
4529
5493
  const handleChartCrosshairChange = react_exports.useCallback(
4530
5494
  (event) => {
4531
- if (onPointMouseOver || onPointMouseOut) {
4532
- if (!event) {
4533
- if (onPointMouseOut && lastPayloadRef.current) {
4534
- onPointMouseOut({
4535
- type: "point.mouseout",
4536
- originalEvent: lastOriginalEventRef.current,
4537
- payload: lastPayloadRef.current
4538
- });
4539
- }
4540
- previousMouseoverPayloadRef.current = null;
4541
- return;
4542
- }
4543
- const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
4544
- name: event.seriesKey
5495
+ if (!onPointMouseOver && !onPointMouseOut) {
5496
+ return;
5497
+ }
5498
+ if (!event) {
5499
+ handleCrosshairMouseout();
5500
+ return;
5501
+ }
5502
+ const payload = __spreadProps(__spreadValues({}, (0, lodash_exports.pick)(event, "value", "seriesKey", "time", "index", "seriesIndex")), {
5503
+ name: event.seriesKey
5504
+ });
5505
+ delete payload.seriesKey;
5506
+ if (event.rowContext) {
5507
+ Object.assign(
5508
+ payload,
5509
+ Object.keys(event.rowContext).reduce((acc, fieldName) => {
5510
+ acc[`row.${fieldName}.value`] = event.rowContext[fieldName];
5511
+ return acc;
5512
+ }, {})
5513
+ );
5514
+ }
5515
+ const updatedPayload = appendTrellisToPayload(payload, trellisKey, trellisSplitBy);
5516
+ if (!hasMouseoverPayloadChanged(updatedPayload, previousMouseoverPayloadRef.current)) {
5517
+ return;
5518
+ }
5519
+ lastPayloadRef.current = updatedPayload;
5520
+ lastOriginalEventRef.current = event;
5521
+ previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
5522
+ if (onPointMouseOver) {
5523
+ onPointMouseOver({
5524
+ type: "point.mouseover",
5525
+ originalEvent: event,
5526
+ payload: updatedPayload
4545
5527
  });
4546
- delete payload.seriesKey;
4547
- if (event.rowContext) {
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;
4559
- }
4560
- lastPayloadRef.current = updatedPayload;
4561
- lastOriginalEventRef.current = event;
4562
- previousMouseoverPayloadRef.current = __spreadValues({}, updatedPayload);
4563
- if (onPointMouseOver) {
4564
- onPointMouseOver({
4565
- type: "point.mouseover",
4566
- originalEvent: event,
4567
- payload: updatedPayload
4568
- });
4569
- }
4570
5528
  }
4571
5529
  },
4572
- [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy]
5530
+ [onPointMouseOver, onPointMouseOut, trellisKey, trellisSplitBy, handleCrosshairMouseout]
4573
5531
  );
4574
5532
  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
5533
  const memoizedChart = (0, react_exports.useMemo)(() => {
@@ -4624,7 +5582,8 @@ var TimeSeriesChartWrapper = (props) => {
4624
5582
  showXAxisLine,
4625
5583
  showYAxisLine,
4626
5584
  showY2AxisLine,
4627
- xAxisMaxLabelParts
5585
+ xAxisMaxLabelParts,
5586
+ areaOpacity: areaOpacityForCanvas
4628
5587
  }
4629
5588
  ));
4630
5589
  }, [
@@ -4676,7 +5635,8 @@ var TimeSeriesChartWrapper = (props) => {
4676
5635
  showYAxisLine,
4677
5636
  showY2AxisLine,
4678
5637
  legendMode,
4679
- xAxisMaxLabelParts
5638
+ xAxisMaxLabelParts,
5639
+ areaOpacityForCanvas
4680
5640
  ]);
4681
5641
  const memoizedVisualization = (0, react_exports.useMemo)(() => {
4682
5642
  return /* @__PURE__ */ react_exports.createElement(VizStyleWrapper_default, { backgroundColor: bgColor }, memoizedChart);
@@ -4704,6 +5664,37 @@ var TimeSeriesChartWrapper_default = TimeSeriesChartWrapper;
4704
5664
 
4705
5665
  // src/common/withDashboardViz.tsx
4706
5666
  var SanitizedTimeSeriesChartWrapper = (0, SanitizeProps_exports.withSanitizedProps)(TimeSeriesChartWrapper_default);
5667
+ var buildEventCallbackProps = (supportedEvents, evaluatedOptionsToUse, onEventTrigger) => {
5668
+ const result = {};
5669
+ Object.keys(supportedEvents).forEach((eventName) => {
5670
+ const { parentKeys, payloadKeys } = supportedEvents[eventName];
5671
+ const eventCallbackPropName = (0, lodash_exports.camelCase)(`on.${eventName}`);
5672
+ let payload = {};
5673
+ if (Array.isArray(payloadKeys) && payloadKeys.length) {
5674
+ payloadKeys.forEach((p) => {
5675
+ payload[p] = evaluatedOptionsToUse[p];
5676
+ });
5677
+ }
5678
+ result[eventCallbackPropName] = (ev) => {
5679
+ if (ev == null ? void 0 : ev.payload) {
5680
+ payload = __spreadValues({}, ev.payload);
5681
+ }
5682
+ return onEventTrigger({
5683
+ originalEvent: ev,
5684
+ payload,
5685
+ type: eventName
5686
+ });
5687
+ };
5688
+ if (parentKeys) {
5689
+ for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
5690
+ const newObject = {};
5691
+ newObject[parentKeys[i]] = result[eventCallbackPropName];
5692
+ result[eventCallbackPropName] = newObject;
5693
+ }
5694
+ }
5695
+ });
5696
+ return result;
5697
+ };
4707
5698
  var withDashboardViz = (opts) => {
4708
5699
  const {
4709
5700
  ReactViz,
@@ -4761,9 +5752,7 @@ var withDashboardViz = (opts) => {
4761
5752
  const isDownsamplingEnabledByFeatureFlag = Boolean(
4762
5753
  featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableDownsampling
4763
5754
  );
4764
- const isTrellisFeatureFlagOn = Boolean(
4765
- featureFlagContext && featureFlagContext.visualizations_enableTrellis
4766
- );
5755
+ const isTrellisFeatureFlagOn = Boolean(featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableTrellis);
4767
5756
  const isTrellisOn = isTrellisFeatureFlagOn && ((_a = vizConfig == null ? void 0 : vizConfig.supports) == null ? void 0 : _a.includes("trellis" /* TRELLIS */)) && (options == null ? void 0 : options.splitByLayout) === "trellis" /* TRELLIS */;
4768
5757
  const isAcceleratedRenderFeatureFlagOn = Boolean(
4769
5758
  featureFlagContext == null ? void 0 : featureFlagContext.visualizations_enableAcceleratedRender
@@ -4928,38 +5917,12 @@ var withDashboardViz = (opts) => {
4928
5917
  }
4929
5918
  );
4930
5919
  }
4931
- const eventCallbackProps = {};
4932
- if (hasEventHandlers && mode === "view" && vizConfig.supports.indexOf("events" /* EVENTS */) > -1) {
4933
- const supportedEvents = vizConfig.events;
4934
- Object.keys(supportedEvents).forEach((eventName) => {
4935
- const { parentKeys, payloadKeys } = supportedEvents[eventName];
4936
- const eventCallbackPropName = (0, lodash_exports.camelCase)(`on.${eventName}`);
4937
- let payload = {};
4938
- if (Array.isArray(payloadKeys) && payloadKeys.length) {
4939
- payloadKeys.forEach((p) => {
4940
- payload[p] = evaluatedOptionsToUse[p];
4941
- });
4942
- }
4943
- eventCallbackProps[eventCallbackPropName] = (ev) => {
4944
- if (ev == null ? void 0 : ev.payload) {
4945
- payload = __spreadValues({}, ev.payload);
4946
- }
4947
- return onEventTrigger({
4948
- originalEvent: ev,
4949
- payload,
4950
- type: eventName
4951
- });
4952
- };
4953
- if (parentKeys) {
4954
- for (let i = parentKeys.length - 1; i >= 0; i -= 1) {
4955
- const newObject = {};
4956
- newObject[parentKeys[i]] = eventCallbackProps[eventCallbackPropName];
4957
- eventCallbackProps[eventCallbackPropName] = newObject;
4958
- }
4959
- }
4960
- });
4961
- }
4962
- const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), eventCallbackProps), {
5920
+ const eventCallbackProps = hasEventHandlers && mode === "view" && vizConfig.supports.includes("events" /* EVENTS */) ? buildEventCallbackProps(vizConfig.events, evaluatedOptionsToUse, onEventTrigger) : {};
5921
+ const computedVizProps = computeVizProps2(__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({}, props), evaluatedOptionsToUse), {
5922
+ // Align option transformation with the actual renderer selected below.
5923
+ // This prevents canvas-only option preservation from leaking into Highcharts mode.
5924
+ isAcceleratedRenderOn
5925
+ }), eventCallbackProps), {
4963
5926
  themeFunc
4964
5927
  }));
4965
5928
  if (useAsyncEvaluatedOptions && Object.keys(evaluatedOptionsToUse).length === 0) {
@@ -4993,9 +5956,9 @@ var dsl_exports = {};
4993
5956
  __export(dsl_exports, {
4994
5957
  default: () => dsl_default
4995
5958
  });
4996
- var defaultImport46 = __toESM(require("@splunk/visualization-encoding/utils/dsl"));
5959
+ var defaultImport50 = __toESM(require("@splunk/visualization-encoding/utils/dsl"));
4997
5960
  __reExport(dsl_exports, require("@splunk/visualization-encoding/utils/dsl"));
4998
- var dsl_default = "default" in defaultImport46 ? defaultImport46.default : defaultImport46;
5961
+ var dsl_default = "default" in defaultImport50 ? defaultImport50.default : defaultImport50;
4999
5962
 
5000
5963
  // src/common/utils/mapUtils.ts
5001
5964
  var columnsNullToZeros = (config2, dataSources, options) => {
@@ -5071,7 +6034,7 @@ var formatLayer = (l, dataFields, dataSourceData, transformedData) => {
5071
6034
  };
5072
6035
  var computeVizProps = (props) => {
5073
6036
  var _a, _b, _c;
5074
- const { themeFunc, theme, layers, dataSources, onOptionsChange, title } = props;
6037
+ const { themeFunc, theme, layers, dataSources, onOptionsChange, title, hasEventHandlers } = props;
5075
6038
  const themeColorVariables = ["controlBackgroundColor", "controlForegroundColor"];
5076
6039
  const themeColors = {};
5077
6040
  themeColorVariables.forEach((variable) => {
@@ -5088,14 +6051,15 @@ var computeVizProps = (props) => {
5088
6051
  themeColorScheme
5089
6052
  }), layers), {
5090
6053
  onOptionsChange,
5091
- title
6054
+ title,
6055
+ hasEventHandlers
5092
6056
  });
5093
6057
  };
5094
6058
  var withTooltipFields = (Viz) => {
5095
6059
  const VizWithTooltipFields = (_a) => {
5096
6060
  var _b = _a, { dataSources, options } = _b, otherProps = __objRest(_b, ["dataSources", "options"]);
5097
- var _a2, _b2, _c;
5098
- if (!dataSources || !dataSources.primary || !dataSources.primary.data) {
6061
+ var _a2, _b2, _c, _d;
6062
+ if (!((_a2 = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _a2.data)) {
5099
6063
  return /* @__PURE__ */ react_exports.createElement(Viz, __spreadProps(__spreadValues({}, otherProps), { options }));
5100
6064
  }
5101
6065
  const mergedOptions = (0, hocUtils_exports.deepMergeWithArrayPrimitiveOverrides)(
@@ -5103,8 +6067,8 @@ var withTooltipFields = (Viz) => {
5103
6067
  options,
5104
6068
  (0, JSONSchemaUtils_exports.pickFieldFromJSONSchema)(config_default.optionsSchema, "default")
5105
6069
  );
5106
- if ((_a2 = mergedOptions.layers) == null ? void 0 : _a2[0]) {
5107
- if (((_c = (_b2 = mergedOptions.layers) == null ? void 0 : _b2[0]) == null ? void 0 : _c.type) === "bubble") {
6070
+ if ((_b2 = mergedOptions.layers) == null ? void 0 : _b2[0]) {
6071
+ if (((_d = (_c = mergedOptions.layers) == null ? void 0 : _c[0]) == null ? void 0 : _d.type) === "bubble") {
5108
6072
  mergedOptions.layers[0].bubbleSizeFields = "> bubbleSize | getField()";
5109
6073
  mergedOptions.layers[0].dataValuesField = "> dataValues | getField()";
5110
6074
  mergedOptions.layers[0].tooltipHeaderFieldName = "> tooltipHeaderField | getField()";
@@ -5127,7 +6091,8 @@ var withTooltipFields = (Viz) => {
5127
6091
  var withoutInternalFields = (Viz) => {
5128
6092
  const VizWithoutInternalFields = (_a) => {
5129
6093
  var _b = _a, { dataSources } = _b, otherProps = __objRest(_b, ["dataSources"]);
5130
- if (!dataSources || !dataSources.primary || !dataSources.primary.data) {
6094
+ var _a2;
6095
+ if (!((_a2 = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _a2.data)) {
5131
6096
  return /* @__PURE__ */ react_exports.createElement(Viz, __spreadValues({}, otherProps));
5132
6097
  }
5133
6098
  const { primary } = dataSources;
@@ -5165,7 +6130,8 @@ var withoutInternalFields = (Viz) => {
5165
6130
  var withNullToZeros = (Viz) => {
5166
6131
  const VizWithColumnsNullToZeros = (_a) => {
5167
6132
  var _b = _a, { dataSources, options } = _b, otherProps = __objRest(_b, ["dataSources", "options"]);
5168
- if (!dataSources || !dataSources.primary || !dataSources.primary.data) {
6133
+ var _a2;
6134
+ if (!((_a2 = dataSources == null ? void 0 : dataSources.primary) == null ? void 0 : _a2.data)) {
5169
6135
  return /* @__PURE__ */ react_exports.createElement(Viz, __spreadValues({ options }, otherProps));
5170
6136
  }
5171
6137
  const modifiedDatasources = columnsNullToZeros(config_default, dataSources, options);