@dynatrace/strato-geo 1.3.4 → 1.5.1

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 (410) hide show
  1. package/esm/index.js +1 -25
  2. package/esm/index.js.map +2 -2
  3. package/esm/map/MapView.js +61 -51
  4. package/esm/map/MapView.js.map +2 -2
  5. package/esm/map/components/BaseLayerDataError.js +3 -3
  6. package/esm/map/components/BaseLayerDataError.js.map +2 -2
  7. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js +2 -2
  8. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js.map +2 -2
  9. package/esm/map/components/BubbleLayer/BubbleLayer.js +14 -8
  10. package/esm/map/components/BubbleLayer/BubbleLayer.js.map +2 -2
  11. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js +6 -5
  12. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js.map +2 -2
  13. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js +2 -2
  14. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js.map +2 -2
  15. package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js +81 -74
  16. package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js.map +2 -2
  17. package/esm/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js +6 -5
  18. package/esm/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js.map +2 -2
  19. package/esm/map/components/ConnectionLayer/ConnectionLayer.js +27 -23
  20. package/esm/map/components/ConnectionLayer/ConnectionLayer.js.map +2 -2
  21. package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js +39 -39
  22. package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js.map +2 -2
  23. package/esm/map/components/ConnectionLayer/ConnectionLayerLine.js +3 -3
  24. package/esm/map/components/ConnectionLayer/ConnectionLayerLine.js.map +2 -2
  25. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js +6 -5
  26. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js.map +2 -2
  27. package/esm/map/components/DefaultTooltip/DefaultTooltip.js +15 -15
  28. package/esm/map/components/DefaultTooltip/DefaultTooltip.js.map +2 -2
  29. package/esm/map/components/DefaultTooltip/utils/get-default-actions.js +5 -2
  30. package/esm/map/components/DefaultTooltip/utils/get-default-actions.js.map +2 -2
  31. package/esm/map/components/DotLayer/BackgroundLayer.js +2 -2
  32. package/esm/map/components/DotLayer/BackgroundLayer.js.map +2 -2
  33. package/esm/map/components/DotLayer/BackgroundSymbolLayer.js +46 -0
  34. package/esm/map/components/DotLayer/BackgroundSymbolLayer.js.map +7 -0
  35. package/esm/map/components/DotLayer/DotLayer.js +64 -39
  36. package/esm/map/components/DotLayer/DotLayer.js.map +2 -2
  37. package/esm/map/components/DotLayer/DotLayerTooltip.js +6 -5
  38. package/esm/map/components/DotLayer/DotLayerTooltip.js.map +2 -2
  39. package/esm/map/components/MapContent.js +125 -77
  40. package/esm/map/components/MapContent.js.map +2 -2
  41. package/esm/map/components/MapUnavailable.js +3 -3
  42. package/esm/map/components/MapUnavailable.js.map +2 -2
  43. package/esm/map/components/legend/CategoricalLegendRenderer.js +2 -2
  44. package/esm/map/components/legend/CategoricalLegendRenderer.js.map +2 -2
  45. package/esm/map/components/legend/MapLegendRenderer.js +5 -4
  46. package/esm/map/components/legend/MapLegendRenderer.js.map +2 -2
  47. package/esm/map/components/legend/SequentialLegendRenderer.js +2 -2
  48. package/esm/map/components/legend/SequentialLegendRenderer.js.map +2 -2
  49. package/esm/map/components/legend/ThresholdLegendRenderer.js +2 -2
  50. package/esm/map/components/legend/ThresholdLegendRenderer.js.map +2 -2
  51. package/esm/map/components/toolbar/MapToolbar.js +11 -9
  52. package/esm/map/components/toolbar/MapToolbar.js.map +2 -2
  53. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js +4 -3
  54. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js.map +2 -2
  55. package/esm/map/components/toolbar/buttons/MapResetButton.js +10 -4
  56. package/esm/map/components/toolbar/buttons/MapResetButton.js.map +2 -2
  57. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js +32 -28
  58. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js.map +2 -2
  59. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js +10 -4
  60. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js.map +2 -2
  61. package/esm/map/components/toolbar/utils/zoom-state-utils.js +36 -0
  62. package/esm/map/components/toolbar/utils/zoom-state-utils.js.map +7 -0
  63. package/esm/map/constants.js +6 -0
  64. package/esm/map/constants.js.map +2 -2
  65. package/esm/map/contexts/a11y-toolbar-tab-index.context.js +4 -2
  66. package/esm/map/contexts/a11y-toolbar-tab-index.context.js.map +2 -2
  67. package/esm/map/contexts/color-scale.context.js +2 -2
  68. package/esm/map/contexts/color-scale.context.js.map +2 -2
  69. package/esm/map/contexts/formatter.context.js +2 -2
  70. package/esm/map/contexts/formatter.context.js.map +2 -2
  71. package/esm/map/contexts/layer-coloring-strategy.context.js +2 -2
  72. package/esm/map/contexts/layer-coloring-strategy.context.js.map +2 -2
  73. package/esm/map/contexts/layer-ids.context.js +2 -2
  74. package/esm/map/contexts/layer-ids.context.js.map +2 -2
  75. package/esm/map/contexts/map-base-layer.context.js +2 -2
  76. package/esm/map/contexts/map-base-layer.context.js.map +2 -2
  77. package/esm/map/contexts/map-configuration.context.js +2 -2
  78. package/esm/map/contexts/map-configuration.context.js.map +2 -2
  79. package/esm/map/contexts/map-data-bounding-box.context.js +4 -2
  80. package/esm/map/contexts/map-data-bounding-box.context.js.map +2 -2
  81. package/esm/map/contexts/map-initial-view.context.js +2 -2
  82. package/esm/map/contexts/map-initial-view.context.js.map +2 -2
  83. package/esm/map/contexts/map-raw-data.context.js +2 -4
  84. package/esm/map/contexts/map-raw-data.context.js.map +2 -2
  85. package/esm/map/hooks/use-active-interaction.js +16 -12
  86. package/esm/map/hooks/use-active-interaction.js.map +2 -2
  87. package/esm/map/hooks/use-attach-symbol-to-map.js.map +1 -1
  88. package/esm/map/hooks/use-color-scale.js +2 -2
  89. package/esm/map/hooks/use-color-scale.js.map +2 -2
  90. package/esm/map/hooks/use-data-bounding-box.js +2 -2
  91. package/esm/map/hooks/use-data-bounding-box.js.map +2 -2
  92. package/esm/map/hooks/use-formatter-context.js +2 -2
  93. package/esm/map/hooks/use-formatter-context.js.map +2 -2
  94. package/esm/map/hooks/use-load-symbol-into-map.js.map +1 -1
  95. package/esm/map/hooks/use-map-performance.js.map +2 -2
  96. package/esm/map/hooks/use-resolve-color.js +7 -3
  97. package/esm/map/hooks/use-resolve-color.js.map +2 -2
  98. package/esm/map/hooks/use-tooltip-template.js +3 -2
  99. package/esm/map/hooks/use-tooltip-template.js.map +2 -2
  100. package/esm/map/hooks/use-truncation-mode.js +2 -2
  101. package/esm/map/hooks/use-truncation-mode.js.map +2 -2
  102. package/esm/map/index.js +26 -0
  103. package/esm/map/index.js.map +7 -0
  104. package/esm/map/providers/color-scale.provider.js +5 -4
  105. package/esm/map/providers/color-scale.provider.js.map +2 -2
  106. package/esm/map/providers/imperative-handler.provider.js +10 -2
  107. package/esm/map/providers/imperative-handler.provider.js.map +2 -2
  108. package/esm/map/providers/layer-color-strategy.provider.js +3 -3
  109. package/esm/map/providers/layer-color-strategy.provider.js.map +2 -2
  110. package/esm/map/providers/map-initial-view.provider.js +6 -5
  111. package/esm/map/providers/map-initial-view.provider.js.map +2 -2
  112. package/esm/map/slots/BubbleLayer.js.map +1 -1
  113. package/esm/map/slots/BubbleLayerTooltip.js +6 -2
  114. package/esm/map/slots/BubbleLayerTooltip.js.map +2 -2
  115. package/esm/map/slots/ChartInteractions.js.map +1 -1
  116. package/esm/map/slots/ChoroplethLayer.js.map +1 -1
  117. package/esm/map/slots/ConnectionLayer.js.map +1 -1
  118. package/esm/map/slots/DotLayer.js.map +1 -1
  119. package/esm/map/slots/DotLayerTooltip.js +6 -2
  120. package/esm/map/slots/DotLayerTooltip.js.map +2 -2
  121. package/esm/map/slots/states/DisabledState.js +3 -3
  122. package/esm/map/slots/states/DisabledState.js.map +2 -2
  123. package/esm/map/slots/states/ErrorStateSlot.js.map +1 -1
  124. package/esm/map/store/map-store.context.js +9 -3
  125. package/esm/map/store/map-store.context.js.map +2 -2
  126. package/esm/map/store/map-store.provider.js +3 -2
  127. package/esm/map/store/map-store.provider.js.map +2 -2
  128. package/esm/map/store/selectors.js +2 -0
  129. package/esm/map/store/selectors.js.map +2 -2
  130. package/esm/map/store/store.js +13 -0
  131. package/esm/map/store/store.js.map +2 -2
  132. package/esm/map/utils/build-scale-from-legend-config.js +4 -2
  133. package/esm/map/utils/build-scale-from-legend-config.js.map +2 -2
  134. package/esm/map/utils/extract-layers-data.js +6 -6
  135. package/esm/map/utils/extract-layers-data.js.map +2 -2
  136. package/esm/map/utils/get-data-layers-bounding-box.js +3 -3
  137. package/esm/map/utils/get-data-layers-bounding-box.js.map +2 -2
  138. package/esm/map/utils/get-map-states-template.js +2 -2
  139. package/esm/map/utils/get-map-states-template.js.map +2 -2
  140. package/esm/map/utils/is-component.js.map +2 -2
  141. package/esm/map/utils/is-valid-shape.js.map +1 -1
  142. package/esm/map/utils/iterate-config-slots.js +11 -5
  143. package/esm/map/utils/iterate-config-slots.js.map +2 -2
  144. package/esm/map/utils/replace-infinite-values-in-ranges.js +30 -0
  145. package/esm/map/utils/replace-infinite-values-in-ranges.js.map +7 -0
  146. package/esm/map/utils/set-layers-id.js +4 -2
  147. package/esm/map/utils/set-layers-id.js.map +2 -2
  148. package/esm/map/utils/to-mapbox-initial-view-state.js.map +2 -2
  149. package/index.d.ts +1 -24
  150. package/index.js +5 -31
  151. package/map/MapView.d.ts +2 -2
  152. package/map/MapView.js +62 -61
  153. package/map/components/BaseLayerDataError.d.ts +1 -2
  154. package/map/components/BaseLayerDataError.js +4 -13
  155. package/map/components/BubbleLayer/BubbleCircleLayer.d.ts +1 -2
  156. package/map/components/BubbleLayer/BubbleCircleLayer.js +3 -12
  157. package/map/components/BubbleLayer/BubbleLayer.d.ts +2 -2
  158. package/map/components/BubbleLayer/BubbleLayer.js +15 -18
  159. package/map/components/BubbleLayer/BubbleLayerTooltip.d.ts +1 -2
  160. package/map/components/BubbleLayer/BubbleLayerTooltip.js +7 -15
  161. package/map/components/BubbleLayer/BubbleOutlineLayer.d.ts +1 -2
  162. package/map/components/BubbleLayer/BubbleOutlineLayer.js +3 -12
  163. package/map/components/BubbleLayer/contexts/size-interpolation.context.js +1 -0
  164. package/map/components/BubbleLayer/hooks/use-size-interpolation.js +1 -0
  165. package/map/components/BubbleLayer/utils/add-outline-size.js +1 -0
  166. package/map/components/BubbleLayer/utils/build-radius-scale.js +1 -0
  167. package/map/components/BubbleLayer/utils/build-stick-to-distance-expressions.js +1 -0
  168. package/map/components/BubbleLayer/utils/define-radius.js +1 -0
  169. package/map/components/BubbleLayer/utils/parse-bubble-data-to-geo-json.js +1 -0
  170. package/map/components/ChoroplethLayer/ChoroplethLayer.d.ts +2 -2
  171. package/map/components/ChoroplethLayer/ChoroplethLayer.js +82 -84
  172. package/map/components/ChoroplethLayer/ChoroplethLayerTooltip.d.ts +1 -2
  173. package/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js +7 -15
  174. package/map/components/ChoroplethLayer/utils/parse-region-data-to-geo-json.js +1 -0
  175. package/map/components/ConnectionLayer/ConnectionLayer.d.ts +2 -2
  176. package/map/components/ConnectionLayer/ConnectionLayer.js +28 -33
  177. package/map/components/ConnectionLayer/ConnectionLayerDirection.d.ts +1 -2
  178. package/map/components/ConnectionLayer/ConnectionLayerDirection.js +40 -49
  179. package/map/components/ConnectionLayer/ConnectionLayerLine.d.ts +1 -2
  180. package/map/components/ConnectionLayer/ConnectionLayerLine.js +4 -13
  181. package/map/components/ConnectionLayer/ConnectionLayerTooltip.d.ts +1 -2
  182. package/map/components/ConnectionLayer/ConnectionLayerTooltip.js +7 -15
  183. package/map/components/ConnectionLayer/hooks/use-connection-layer-mouse-move.js +1 -0
  184. package/map/components/ConnectionLayer/utils/get-arc-line-feature.js +1 -0
  185. package/map/components/ConnectionLayer/utils/get-arrows-angles.js +1 -0
  186. package/map/components/ConnectionLayer/utils/get-straight-line-feature.js +1 -0
  187. package/map/components/ConnectionLayer/utils/parse-connection-data-to-geo-json.js +1 -0
  188. package/map/components/ConnectionLayer/utils/parse-direction-data-to-geo-json.js +1 -0
  189. package/map/components/DefaultTooltip/DefaultTooltip.d.ts +1 -2
  190. package/map/components/DefaultTooltip/DefaultTooltip.js +16 -25
  191. package/map/components/DefaultTooltip/utils/get-default-actions.js +6 -12
  192. package/map/components/DefaultTooltip/utils/handle-copy-to-clipboard.js +1 -0
  193. package/map/components/DotLayer/BackgroundLayer.d.ts +1 -2
  194. package/map/components/DotLayer/BackgroundLayer.js +3 -12
  195. package/map/components/DotLayer/BackgroundSymbolLayer.d.ts +14 -0
  196. package/map/components/DotLayer/BackgroundSymbolLayer.js +62 -0
  197. package/map/components/DotLayer/DotLayer.d.ts +2 -2
  198. package/map/components/DotLayer/DotLayer.js +65 -49
  199. package/map/components/DotLayer/DotLayerTooltip.d.ts +1 -2
  200. package/map/components/DotLayer/DotLayerTooltip.js +7 -15
  201. package/map/components/DotLayer/utils/calculate-circle-translate.js +1 -0
  202. package/map/components/DotLayer/utils/define-bearing.js +1 -0
  203. package/map/components/DotLayer/utils/parse-dot-data-to-geo-json.js +1 -0
  204. package/map/components/DotLayer/utils/resolve-icon-background.js +1 -0
  205. package/map/components/MapContent.d.ts +2 -2
  206. package/map/components/MapContent.js +119 -85
  207. package/map/components/MapUnavailable.d.ts +1 -2
  208. package/map/components/MapUnavailable.js +4 -13
  209. package/map/components/legend/CategoricalLegendRenderer.d.ts +1 -2
  210. package/map/components/legend/CategoricalLegendRenderer.js +3 -12
  211. package/map/components/legend/MapLegendRenderer.d.ts +1 -2
  212. package/map/components/legend/MapLegendRenderer.js +6 -14
  213. package/map/components/legend/SequentialLegendRenderer.d.ts +1 -2
  214. package/map/components/legend/SequentialLegendRenderer.js +3 -12
  215. package/map/components/legend/ThresholdLegendRenderer.d.ts +1 -2
  216. package/map/components/legend/ThresholdLegendRenderer.js +3 -12
  217. package/map/components/toolbar/MapToolbar.d.ts +1 -2
  218. package/map/components/toolbar/MapToolbar.js +12 -19
  219. package/map/components/toolbar/buttons/MapDownloadDataButton.d.ts +1 -2
  220. package/map/components/toolbar/buttons/MapDownloadDataButton.js +5 -13
  221. package/map/components/toolbar/buttons/MapResetButton.d.ts +1 -2
  222. package/map/components/toolbar/buttons/MapResetButton.js +11 -14
  223. package/map/components/toolbar/buttons/MapZoomInOutButtons.d.ts +1 -2
  224. package/map/components/toolbar/buttons/MapZoomInOutButtons.js +33 -38
  225. package/map/components/toolbar/buttons/MapZoomToFitButton.d.ts +1 -2
  226. package/map/components/toolbar/buttons/MapZoomToFitButton.js +11 -14
  227. package/map/components/toolbar/constants.js +1 -0
  228. package/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.js +1 -0
  229. package/map/components/toolbar/utils/a11y-toolbar-controls.js +1 -0
  230. package/map/components/toolbar/utils/zoom-state-utils.d.ts +4 -0
  231. package/map/components/toolbar/utils/zoom-state-utils.js +48 -0
  232. package/map/constants.d.ts +5 -1
  233. package/map/constants.js +7 -0
  234. package/map/contexts/a11y-toolbar-tab-index.context.d.ts +1 -2
  235. package/map/contexts/a11y-toolbar-tab-index.context.js +5 -12
  236. package/map/contexts/color-scale.context.d.ts +1 -2
  237. package/map/contexts/color-scale.context.js +3 -12
  238. package/map/contexts/formatter.context.d.ts +1 -2
  239. package/map/contexts/formatter.context.js +3 -12
  240. package/map/contexts/layer-coloring-strategy.context.d.ts +1 -2
  241. package/map/contexts/layer-coloring-strategy.context.js +3 -12
  242. package/map/contexts/layer-ids.context.d.ts +1 -2
  243. package/map/contexts/layer-ids.context.js +3 -12
  244. package/map/contexts/map-base-layer.context.d.ts +1 -2
  245. package/map/contexts/map-base-layer.context.js +3 -12
  246. package/map/contexts/map-configuration.context.d.ts +1 -2
  247. package/map/contexts/map-configuration.context.js +3 -12
  248. package/map/contexts/map-data-bounding-box.context.d.ts +2 -2
  249. package/map/contexts/map-data-bounding-box.context.js +5 -12
  250. package/map/contexts/map-initial-view.context.d.ts +1 -2
  251. package/map/contexts/map-initial-view.context.js +3 -12
  252. package/map/contexts/map-loading.context.js +1 -0
  253. package/map/contexts/map-raw-data.context.d.ts +1 -2
  254. package/map/contexts/map-raw-data.context.js +3 -14
  255. package/map/contexts/map-truncation-mode.context.js +1 -0
  256. package/map/hooks/use-active-interaction.js +17 -12
  257. package/map/hooks/use-attach-image-from-icon.js +1 -0
  258. package/map/hooks/use-attach-symbol-to-map.d.ts +1 -1
  259. package/map/hooks/use-attach-symbol-to-map.js +1 -0
  260. package/map/hooks/use-color-scale.js +3 -12
  261. package/map/hooks/use-data-bounding-box.d.ts +1 -1
  262. package/map/hooks/use-data-bounding-box.js +3 -12
  263. package/map/hooks/use-formatter-context.js +3 -12
  264. package/map/hooks/use-hover-interaction.js +1 -0
  265. package/map/hooks/use-initial-view-context.d.ts +1 -1
  266. package/map/hooks/use-initial-view-context.js +1 -0
  267. package/map/hooks/use-layer-coloring-strategy.js +1 -0
  268. package/map/hooks/use-legend-interaction-highlighting.js +1 -0
  269. package/map/hooks/use-legend-interaction-visibility.js +1 -0
  270. package/map/hooks/use-load-map-base-layer.js +1 -0
  271. package/map/hooks/use-load-symbol-into-map.d.ts +1 -1
  272. package/map/hooks/use-load-symbol-into-map.js +1 -0
  273. package/map/hooks/use-map-base-layer-features.js +1 -0
  274. package/map/hooks/use-map-config.js +1 -0
  275. package/map/hooks/use-map-loading.js +1 -0
  276. package/map/hooks/use-map-mouse-move.js +1 -0
  277. package/map/hooks/use-map-performance.d.ts +2 -1
  278. package/map/hooks/use-map-performance.js +1 -0
  279. package/map/hooks/use-map-raw-data.js +1 -0
  280. package/map/hooks/use-overlay-events.js +1 -0
  281. package/map/hooks/use-resolve-color.js +4 -2
  282. package/map/hooks/use-safe-svg-parser.js +1 -0
  283. package/map/hooks/use-tooltip-event-listeners.js +1 -0
  284. package/map/hooks/use-tooltip-template.d.ts +2 -2
  285. package/map/hooks/use-tooltip-template.js +4 -12
  286. package/map/hooks/use-truncation-mode.js +3 -12
  287. package/map/index.d.ts +24 -0
  288. package/map/index.js +45 -0
  289. package/map/map-styles/default-style.js +1 -0
  290. package/map/providers/color-scale.provider.d.ts +5 -3
  291. package/map/providers/color-scale.provider.js +6 -14
  292. package/map/providers/imperative-handler.provider.d.ts +3 -3
  293. package/map/providers/imperative-handler.provider.js +8 -1
  294. package/map/providers/layer-color-strategy.provider.d.ts +2 -2
  295. package/map/providers/layer-color-strategy.provider.js +4 -13
  296. package/map/providers/map-initial-view.provider.d.ts +2 -2
  297. package/map/providers/map-initial-view.provider.js +7 -15
  298. package/map/shapes/circle.js +1 -0
  299. package/map/shapes/cross.js +1 -0
  300. package/map/shapes/diamond.js +1 -0
  301. package/map/shapes/heart.js +1 -0
  302. package/map/shapes/pin.js +1 -0
  303. package/map/shapes/shape-picker.js +1 -0
  304. package/map/shapes/square.js +1 -0
  305. package/map/shapes/star.js +1 -0
  306. package/map/shapes/triangle.js +1 -0
  307. package/map/slots/BaseLayer.js +1 -0
  308. package/map/slots/BubbleLayer.d.ts +2 -2
  309. package/map/slots/BubbleLayer.js +1 -0
  310. package/map/slots/BubbleLayerTooltip.d.ts +1 -2
  311. package/map/slots/BubbleLayerTooltip.js +7 -12
  312. package/map/slots/CategoricalLegend.js +1 -0
  313. package/map/slots/ChartInteractions.d.ts +1 -1
  314. package/map/slots/ChartInteractions.js +1 -0
  315. package/map/slots/ChoroplethLayer.d.ts +2 -2
  316. package/map/slots/ChoroplethLayer.js +1 -0
  317. package/map/slots/ChoroplethLayerTooltip.js +1 -0
  318. package/map/slots/ConnectionLayer.d.ts +2 -2
  319. package/map/slots/ConnectionLayer.js +1 -0
  320. package/map/slots/ConnectionLayerTooltip.js +1 -0
  321. package/map/slots/DotLayer.d.ts +2 -2
  322. package/map/slots/DotLayer.js +1 -0
  323. package/map/slots/DotLayerTooltip.d.ts +1 -2
  324. package/map/slots/DotLayerTooltip.js +7 -12
  325. package/map/slots/SequentialLegend.js +1 -0
  326. package/map/slots/ThresholdLegend.js +1 -0
  327. package/map/slots/Tooltip.js +1 -0
  328. package/map/slots/Zoom.js +1 -0
  329. package/map/slots/ZoomToFit.js +1 -0
  330. package/map/slots/states/DisabledState.d.ts +1 -2
  331. package/map/slots/states/DisabledState.js +4 -13
  332. package/map/slots/states/ErrorStateSlot.d.ts +1 -1
  333. package/map/slots/states/ErrorStateSlot.js +1 -0
  334. package/map/store/map-store.context.d.ts +7 -2
  335. package/map/store/map-store.context.js +10 -13
  336. package/map/store/map-store.provider.d.ts +2 -2
  337. package/map/store/map-store.provider.js +4 -12
  338. package/map/store/selectors.d.ts +1 -0
  339. package/map/store/selectors.js +3 -0
  340. package/map/store/store.d.ts +2 -1
  341. package/map/store/store.js +14 -0
  342. package/map/types/base-layer-shapes-request-config.js +1 -0
  343. package/map/types/base-layer.js +1 -0
  344. package/map/types/bubble-layer.js +1 -0
  345. package/map/types/choropleth-layer.js +1 -0
  346. package/map/types/coloring.js +1 -0
  347. package/map/types/configuration.js +1 -0
  348. package/map/types/connection-layer.js +1 -0
  349. package/map/types/dot-layer.d.ts +1 -1
  350. package/map/types/dot-layer.js +1 -0
  351. package/map/types/legend.js +1 -0
  352. package/map/types/location.js +1 -0
  353. package/map/types/map-view.d.ts +3 -1
  354. package/map/types/map-view.js +1 -0
  355. package/map/types/shapes.js +1 -0
  356. package/map/types/state.d.ts +8 -0
  357. package/map/types/state.js +1 -0
  358. package/map/types/toolbar.js +1 -0
  359. package/map/types/tooltip.js +1 -0
  360. package/map/utils/apply-feature-filter-rules.js +1 -0
  361. package/map/utils/associated-features.js +1 -0
  362. package/map/utils/attach-image-from-shape.js +1 -0
  363. package/map/utils/attach-image-from-string.js +1 -0
  364. package/map/utils/attach-image-from-text.js +1 -0
  365. package/map/utils/attach-image-to-map.js +1 -0
  366. package/map/utils/base-layer-rules.js +1 -0
  367. package/map/utils/build-and-download-csv.js +1 -0
  368. package/map/utils/build-categorical-scale.js +1 -0
  369. package/map/utils/build-scale-from-legend-config.d.ts +1 -1
  370. package/map/utils/build-scale-from-legend-config.js +5 -2
  371. package/map/utils/calculate-hovered-color.js +1 -0
  372. package/map/utils/create-bitmap-config-options.js +1 -0
  373. package/map/utils/create-categorical-color-scheme-from-custom-color-object.js +1 -0
  374. package/map/utils/create-categorical-color-scheme-from-legend-props.js +1 -0
  375. package/map/utils/define-color.js +1 -0
  376. package/map/utils/extract-layers-data.d.ts +2 -2
  377. package/map/utils/extract-layers-data.js +7 -16
  378. package/map/utils/fetch-base-layer-features.js +1 -0
  379. package/map/utils/fetch-client-config-map-enabled.js +1 -0
  380. package/map/utils/get-base-layer-shapes-request-config.js +1 -0
  381. package/map/utils/get-color-from-token.js +1 -0
  382. package/map/utils/get-data-layers-bounding-box.d.ts +3 -2
  383. package/map/utils/get-data-layers-bounding-box.js +4 -13
  384. package/map/utils/get-data-uri.js +1 -0
  385. package/map/utils/get-map-states-template.d.ts +3 -3
  386. package/map/utils/get-map-states-template.js +3 -12
  387. package/map/utils/get-scaled-symbol-size.js +1 -0
  388. package/map/utils/get-tenant-country-code.js +1 -0
  389. package/map/utils/is-component.d.ts +2 -2
  390. package/map/utils/is-component.js +1 -0
  391. package/map/utils/is-valid-shape.d.ts +1 -1
  392. package/map/utils/is-valid-shape.js +1 -0
  393. package/map/utils/iterate-config-slots.d.ts +2 -2
  394. package/map/utils/iterate-config-slots.js +12 -15
  395. package/map/utils/merge-feature-collections.js +1 -0
  396. package/map/utils/parse-tooltip-data.js +1 -0
  397. package/map/utils/replace-infinite-values-in-ranges.d.ts +6 -0
  398. package/map/utils/replace-infinite-values-in-ranges.js +49 -0
  399. package/map/utils/set-layers-id.d.ts +3 -3
  400. package/map/utils/set-layers-id.js +3 -12
  401. package/map/utils/tabularize-layers-data.js +1 -0
  402. package/map/utils/to-mapbox-initial-view-state.d.ts +6 -4
  403. package/map/utils/to-mapbox-initial-view-state.js +1 -0
  404. package/map/utils/tooltip-type-guards.js +1 -0
  405. package/map/utils/use-set-map-initial-configuration.js +1 -0
  406. package/package.json +6 -6
  407. package/esm/map/components/legend/utils/resolve-color.js +0 -21
  408. package/esm/map/components/legend/utils/resolve-color.js.map +0 -7
  409. package/map/components/legend/utils/resolve-color.d.ts +0 -8
  410. package/map/components/legend/utils/resolve-color.js +0 -39
package/esm/index.js CHANGED
@@ -1,26 +1,2 @@
1
- import { ChartInteractions } from "./map/slots/ChartInteractions.js";
2
- import { MapView } from "./map/MapView.js";
3
- import { ConnectionLayer } from "./map/slots/ConnectionLayer.js";
4
- import { DotLayer } from "./map/slots/DotLayer.js";
5
- import { BubbleLayer } from "./map/slots/BubbleLayer.js";
6
- import { BaseLayer } from "./map/slots/BaseLayer.js";
7
- import { ChoroplethLayer } from "./map/slots/ChoroplethLayer.js";
8
- import { Tooltip, TooltipAtoms } from "./map/slots/Tooltip.js";
9
- import { SequentialLegend } from "./map/slots/SequentialLegend.js";
10
- import { ThresholdLegend } from "./map/slots/ThresholdLegend.js";
11
- import { CategoricalLegend } from "./map/slots/CategoricalLegend.js";
12
- export {
13
- BaseLayer,
14
- BubbleLayer,
15
- CategoricalLegend,
16
- ChartInteractions,
17
- ChoroplethLayer,
18
- ConnectionLayer,
19
- DotLayer,
20
- MapView,
21
- SequentialLegend,
22
- ThresholdLegend,
23
- Tooltip,
24
- TooltipAtoms
25
- };
1
+ export * from "./map/index.js";
26
2
  //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.ts"],
4
- "sourcesContent": ["export { ChartInteractions } from './map/slots/ChartInteractions.js';\nexport { MapView } from './map/MapView.js';\nexport { ConnectionLayer } from './map/slots/ConnectionLayer.js';\nexport { DotLayer } from './map/slots/DotLayer.js';\nexport { BubbleLayer } from './map/slots/BubbleLayer.js';\nexport { BaseLayer } from './map/slots/BaseLayer.js';\nexport { ChoroplethLayer } from './map/slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './map/slots/Tooltip.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './map/types/map-view.js';\n\nexport type { BaseLayerProps } from './map/types/base-layer.js';\n\nexport type {\n Connection,\n ConnectionLayerBaseProps,\n ConnectionLayerProps,\n CurvedLine,\n} from './map/types/connection-layer.js';\n\nexport type {\n DotLayerBaseProps,\n DotLayerProps,\n} from './map/types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './map/types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './map/types/choropleth-layer.js';\n\nexport type { Location } from './map/types/location.js';\nexport type { MapShape } from './map/types/shapes.js';\nexport type { ChartInteractionsProps } from './map/types/toolbar.js';\nexport type { ErrorStateSlotProps } from './map/slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './map/types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n ConnectionColorProps,\n} from './map/types/coloring.js';\n\nexport { SequentialLegend } from './map/slots/SequentialLegend.js';\nexport { ThresholdLegend } from './map/slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './map/slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n DotLayerTooltipData,\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n ChoroplethLayerTooltipData,\n} from './map/types/tooltip.js';\n"],
5
- "mappings": "AAAA,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,SAAS,oBAAoB;AAyDtC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;",
4
+ "sourcesContent": ["export * from './map/index.js';\n"],
5
+ "mappings": "AAAA,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,5 @@
1
- import React, { forwardRef, useState } from "react";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, useState } from "react";
2
3
  import {
3
4
  _ChartLayout as ChartLayout,
4
5
  _coerceSizeValue as coerceSizeValue,
@@ -59,62 +60,71 @@ const _MapView = forwardRef(
59
60
  const chartLayoutRef = useAutoLegendRefresh(layersData);
60
61
  const mapUnavailable = !isFetchingFeatures && !isMapEnabled || error;
61
62
  const isLoading = isFetchingFeatures || !isMapLoaded;
62
- return /* @__PURE__ */ React.createElement(
63
+ return /* @__PURE__ */ jsx(
63
64
  "div",
64
65
  {
65
66
  style: containerStyles,
66
67
  className: customerClassNames,
67
- "data-testid": "mapview-container"
68
- },
69
- // TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response
70
- mapUnavailable ? /* @__PURE__ */ React.createElement(
71
- MapUnavailable,
72
- {
73
- isFetchingFeatures,
74
- isDisabled: !isMapEnabled,
75
- chartHeight,
76
- error
77
- }
78
- ) : /* @__PURE__ */ React.createElement(MapLoadingContext.Provider, { value: loading }, /* @__PURE__ */ React.createElement(
79
- MapBaseLayerFeaturesContext.Provider,
80
- {
81
- value: baseFeatureCollection
82
- },
83
- /* @__PURE__ */ React.createElement(MapConfigurationContext.Provider, { value: config }, /* @__PURE__ */ React.createElement(LayerIdsContext.Provider, { value: layerIds }, /* @__PURE__ */ React.createElement(
84
- MapTruncationModeContext.Provider,
68
+ "data-testid": "mapview-container",
69
+ // TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response
70
+ children: mapUnavailable ? /* @__PURE__ */ jsx(
71
+ MapUnavailable,
85
72
  {
86
- value: truncationMode ?? DEFAULT_TRUNCATION_MODE
87
- },
88
- /* @__PURE__ */ React.createElement(FormatterContext.Provider, { value: formatter }, /* @__PURE__ */ React.createElement(MapRawDataContext.Provider, { value: layersData }, /* @__PURE__ */ React.createElement(MapStoreProvider, null, /* @__PURE__ */ React.createElement(ColorScaleProvider, { categories }, /* @__PURE__ */ React.createElement(LayerColorStrategyProvider, null, /* @__PURE__ */ React.createElement(
89
- ChartLayout,
90
- {
91
- ref: chartLayoutRef,
92
- chartHeight,
93
- errorState,
94
- showLoader: loading || isLoading
95
- },
96
- /* @__PURE__ */ React.createElement(ChartLayout.Graph, null, baseFeatureCollection && /* @__PURE__ */ React.createElement(
97
- MapContent,
98
- {
99
- ref: forwardedRef,
100
- onMapLoad: () => setIsMapLoaded(true),
101
- ...remaining
102
- },
103
- parsedChildren
104
- )),
105
- !isLegendHidden && /* @__PURE__ */ React.createElement(
106
- ChartLayout.Legend,
73
+ isFetchingFeatures,
74
+ isDisabled: !isMapEnabled,
75
+ chartHeight,
76
+ error
77
+ }
78
+ ) : /* @__PURE__ */ jsx(MapLoadingContext.Provider, { value: loading, children: /* @__PURE__ */ jsx(
79
+ MapBaseLayerFeaturesContext.Provider,
80
+ {
81
+ value: baseFeatureCollection,
82
+ children: /* @__PURE__ */ jsx(MapConfigurationContext.Provider, { value: config, children: /* @__PURE__ */ jsx(LayerIdsContext.Provider, { value: layerIds, children: /* @__PURE__ */ jsx(
83
+ MapTruncationModeContext.Provider,
107
84
  {
108
- position: legendPosition,
109
- ratio: legendRatio,
110
- ratioBoundaries: DEFAULT_LEGEND_SIZES,
111
- onResize: legendOnRatioChange
112
- },
113
- /* @__PURE__ */ React.createElement(MapLegendRenderer, null)
114
- )
115
- ))))))
116
- )))
117
- ))
85
+ value: truncationMode ?? DEFAULT_TRUNCATION_MODE,
86
+ children: /* @__PURE__ */ jsx(FormatterContext.Provider, { value: formatter, children: /* @__PURE__ */ jsx(MapRawDataContext.Provider, { value: layersData, children: /* @__PURE__ */ jsx(MapStoreProvider, { children: /* @__PURE__ */ jsx(
87
+ ColorScaleProvider,
88
+ {
89
+ categories,
90
+ dataMax: legendDomain[1],
91
+ children: /* @__PURE__ */ jsx(LayerColorStrategyProvider, { children: /* @__PURE__ */ jsxs(
92
+ ChartLayout,
93
+ {
94
+ ref: chartLayoutRef,
95
+ chartHeight,
96
+ errorState,
97
+ showLoader: loading || isLoading,
98
+ children: [
99
+ /* @__PURE__ */ jsx(ChartLayout.Graph, { children: baseFeatureCollection && /* @__PURE__ */ jsx(
100
+ MapContent,
101
+ {
102
+ ref: forwardedRef,
103
+ onMapLoad: () => setIsMapLoaded(true),
104
+ ...remaining,
105
+ children: parsedChildren
106
+ }
107
+ ) }),
108
+ !isLegendHidden && /* @__PURE__ */ jsx(
109
+ ChartLayout.Legend,
110
+ {
111
+ position: legendPosition,
112
+ ratio: legendRatio,
113
+ ratioBoundaries: DEFAULT_LEGEND_SIZES,
114
+ onResize: legendOnRatioChange,
115
+ children: /* @__PURE__ */ jsx(MapLegendRenderer, {})
116
+ }
117
+ )
118
+ ]
119
+ }
120
+ ) })
121
+ }
122
+ ) }) }) })
123
+ }
124
+ ) }) })
125
+ }
126
+ ) })
127
+ }
118
128
  );
119
129
  }
120
130
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/map/MapView.tsx"],
4
- "sourcesContent": ["import React, { forwardRef, type PropsWithChildren, useState } from 'react';\n\nimport {\n _ChartLayout as ChartLayout,\n _coerceSizeValue as coerceSizeValue,\n _useAutoLegendRefresh as useAutoLegendRefresh,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { MapLegendRenderer } from './components/legend/MapLegendRenderer.js';\nimport { MapContent } from './components/MapContent.js';\nimport { MapUnavailable } from './components/MapUnavailable.js';\nimport {\n DEFAULT_LEGEND_SIZES,\n DEFAULT_MAP_HEIGHT,\n DEFAULT_TRUNCATION_MODE,\n} from './constants.js';\nimport { FormatterContext } from './contexts/formatter.context.js';\nimport { LayerIdsContext } from './contexts/layer-ids.context.js';\nimport { MapBaseLayerFeaturesContext } from './contexts/map-base-layer.context.js';\nimport { MapConfigurationContext } from './contexts/map-configuration.context.js';\nimport { MapLoadingContext } from './contexts/map-loading.context.js';\nimport { MapRawDataContext } from './contexts/map-raw-data.context.js';\nimport { MapTruncationModeContext } from './contexts/map-truncation-mode.context.js';\nimport { useLoadMapBaseLayer } from './hooks/use-load-map-base-layer.js';\nimport { ColorScaleProvider } from './providers/color-scale.provider.js';\nimport { LayerColorStrategyProvider } from './providers/layer-color-strategy.provider.js';\nimport { ErrorStateSlot } from './slots/states/ErrorStateSlot.js';\nimport { MapStoreProvider } from './store/map-store.provider.js';\nimport type { MapViewProps, MapViewRef } from './types/map-view.js';\nimport { extractLayersData } from './utils/extract-layers-data.js';\nimport { getMapStatesTemplates } from './utils/get-map-states-template.js';\nimport { iterateConfigSlots } from './utils/iterate-config-slots.js';\nimport { setLayersId } from './utils/set-layers-id.js';\n\n// eslint-disable-next-line no-restricted-imports\nimport './styles/react-mapgl-styles.css';\n\n/**\n * MapView Component\n */\nconst _MapView = forwardRef<MapViewRef, PropsWithChildren<MapViewProps>>(\n (props, forwardedRef) => {\n const {\n children,\n loading = false,\n style: costumerStyle,\n className: customerClassNames,\n formatter,\n truncationMode,\n ...remaining\n } = props;\n const { layerIds, parsedChildren, valueAccessors } = setLayersId(children);\n\n const {\n flattenData: layersData,\n categories,\n legendDomain,\n } = extractLayersData(parsedChildren, valueAccessors);\n\n const config = iterateConfigSlots(children, legendDomain);\n\n const isLegendHidden = !config.legend || !!config.legend.hidden;\n const legendPosition = config.legend?.position;\n const legendRatio = config.legend?.ratio;\n const legendOnRatioChange = config.legend?.onRatioChange;\n\n const { isMapEnabled, isFetchingFeatures, baseFeatureCollection, error } =\n useLoadMapBaseLayer(config.baseLayer);\n\n const [isMapLoaded, setIsMapLoaded] = useState<boolean>(false);\n const { errorState } = getMapStatesTemplates(children);\n\n const chartHeight = coerceSizeValue(props.height) || DEFAULT_MAP_HEIGHT;\n\n const containerStyles = { width: '100%', ...costumerStyle };\n\n const chartLayoutRef = useAutoLegendRefresh(layersData);\n const mapUnavailable = (!isFetchingFeatures && !isMapEnabled) || error;\n\n const isLoading = isFetchingFeatures || !isMapLoaded;\n\n return (\n <div\n style={containerStyles}\n className={customerClassNames}\n data-testid=\"mapview-container\"\n >\n {\n // TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response\n mapUnavailable ? (\n <MapUnavailable\n isFetchingFeatures={isFetchingFeatures}\n isDisabled={!isMapEnabled}\n chartHeight={chartHeight}\n error={error}\n />\n ) : (\n <MapLoadingContext.Provider value={loading}>\n <MapBaseLayerFeaturesContext.Provider\n value={baseFeatureCollection}\n >\n <MapConfigurationContext.Provider value={config}>\n <LayerIdsContext.Provider value={layerIds}>\n <MapTruncationModeContext.Provider\n value={truncationMode ?? DEFAULT_TRUNCATION_MODE}\n >\n <FormatterContext.Provider value={formatter}>\n <MapRawDataContext.Provider value={layersData}>\n <MapStoreProvider>\n <ColorScaleProvider categories={categories}>\n <LayerColorStrategyProvider>\n <ChartLayout\n ref={chartLayoutRef}\n chartHeight={chartHeight}\n errorState={errorState}\n showLoader={loading || isLoading}\n >\n <ChartLayout.Graph>\n {baseFeatureCollection && (\n <MapContent\n ref={forwardedRef}\n onMapLoad={() => setIsMapLoaded(true)}\n {...remaining}\n >\n {parsedChildren}\n </MapContent>\n )}\n </ChartLayout.Graph>\n {!isLegendHidden && (\n <ChartLayout.Legend\n position={legendPosition}\n ratio={legendRatio}\n ratioBoundaries={DEFAULT_LEGEND_SIZES}\n onResize={legendOnRatioChange}\n >\n <MapLegendRenderer />\n </ChartLayout.Legend>\n )}\n </ChartLayout>\n </LayerColorStrategyProvider>\n </ColorScaleProvider>\n </MapStoreProvider>\n </MapRawDataContext.Provider>\n </FormatterContext.Provider>\n </MapTruncationModeContext.Provider>\n </LayerIdsContext.Provider>\n </MapConfigurationContext.Provider>\n </MapBaseLayerFeaturesContext.Provider>\n </MapLoadingContext.Provider>\n )\n }\n </div>\n );\n },\n);\n\n(_MapView as typeof _MapView & { displayName: string })['displayName'] =\n 'MapView';\n\n/**\n * The `MapView` is a component that renders a map with various geospatial data layers.\n * @public\n */\nexport const MapView = Object.assign(_MapView, {\n ErrorState: ErrorStateSlot,\n});\n"],
5
- "mappings": "AAAA,OAAO,SAAS,YAAoC,gBAAgB;AAEpE;AAAA,EACE,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,OACpB;AAEP,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,mCAAmC;AAC5C,SAAS,+BAA+B;AACxC,SAAS,yBAAyB;AAClC,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,kCAAkC;AAC3C,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAEjC,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAG5B,OAAO;AAKP,MAAM,WAAW;AAAA,EACf,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,EAAE,UAAU,gBAAgB,eAAe,IAAI,YAAY,QAAQ;AAEzE,UAAM;AAAA,MACJ,aAAa;AAAA,MACb;AAAA,MACA;AAAA,IACF,IAAI,kBAAkB,gBAAgB,cAAc;AAEpD,UAAM,SAAS,mBAAmB,UAAU,YAAY;AAExD,UAAM,iBAAiB,CAAC,OAAO,UAAU,CAAC,CAAC,OAAO,OAAO;AACzD,UAAM,iBAAiB,OAAO,QAAQ;AACtC,UAAM,cAAc,OAAO,QAAQ;AACnC,UAAM,sBAAsB,OAAO,QAAQ;AAE3C,UAAM,EAAE,cAAc,oBAAoB,uBAAuB,MAAM,IACrE,oBAAoB,OAAO,SAAS;AAEtC,UAAM,CAAC,aAAa,cAAc,IAAI,SAAkB,KAAK;AAC7D,UAAM,EAAE,WAAW,IAAI,sBAAsB,QAAQ;AAErD,UAAM,cAAc,gBAAgB,MAAM,MAAM,KAAK;AAErD,UAAM,kBAAkB,EAAE,OAAO,QAAQ,GAAG,cAAc;AAE1D,UAAM,iBAAiB,qBAAqB,UAAU;AACtD,UAAM,iBAAkB,CAAC,sBAAsB,CAAC,gBAAiB;AAEjE,UAAM,YAAY,sBAAsB,CAAC;AAEzC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,WAAW;AAAA,QACX,eAAY;AAAA;AAAA;AAAA,MAIV,iBACE;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,YAAY,CAAC;AAAA,UACb;AAAA,UACA;AAAA;AAAA,MACF,IAEA,oCAAC,kBAAkB,UAAlB,EAA2B,OAAO,WACjC;AAAA,QAAC,4BAA4B;AAAA,QAA5B;AAAA,UACC,OAAO;AAAA;AAAA,QAEP,oCAAC,wBAAwB,UAAxB,EAAiC,OAAO,UACvC,oCAAC,gBAAgB,UAAhB,EAAyB,OAAO,YAC/B;AAAA,UAAC,yBAAyB;AAAA,UAAzB;AAAA,YACC,OAAO,kBAAkB;AAAA;AAAA,UAEzB,oCAAC,iBAAiB,UAAjB,EAA0B,OAAO,aAChC,oCAAC,kBAAkB,UAAlB,EAA2B,OAAO,cACjC,oCAAC,wBACC,oCAAC,sBAAmB,cAClB,oCAAC,kCACC;AAAA,YAAC;AAAA;AAAA,cACC,KAAK;AAAA,cACL;AAAA,cACA;AAAA,cACA,YAAY,WAAW;AAAA;AAAA,YAEvB,oCAAC,YAAY,OAAZ,MACE,yBACC;AAAA,cAAC;AAAA;AAAA,gBACC,KAAK;AAAA,gBACL,WAAW,MAAM,eAAe,IAAI;AAAA,gBACnC,GAAG;AAAA;AAAA,cAEH;AAAA,YACH,CAEJ;AAAA,YACC,CAAC,kBACA;AAAA,cAAC,YAAY;AAAA,cAAZ;AAAA,gBACC,UAAU;AAAA,gBACV,OAAO;AAAA,gBACP,iBAAiB;AAAA,gBACjB,UAAU;AAAA;AAAA,cAEV,oCAAC,uBAAkB;AAAA,YACrB;AAAA,UAEJ,CACF,CACF,CACF,CACF,CACF;AAAA,QACF,CACF,CACF;AAAA,MACF,CACF;AAAA,IAGN;AAAA,EAEJ;AACF;AAEC,SAAuD,aAAa,IACnE;AAMK,MAAM,UAAU,OAAO,OAAO,UAAU;AAAA,EAC7C,YAAY;AACd,CAAC;",
4
+ "sourcesContent": ["import { forwardRef, type PropsWithChildren, useState } from 'react';\n\nimport {\n _ChartLayout as ChartLayout,\n _coerceSizeValue as coerceSizeValue,\n _useAutoLegendRefresh as useAutoLegendRefresh,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { MapLegendRenderer } from './components/legend/MapLegendRenderer.js';\nimport { MapContent } from './components/MapContent.js';\nimport { MapUnavailable } from './components/MapUnavailable.js';\nimport {\n DEFAULT_LEGEND_SIZES,\n DEFAULT_MAP_HEIGHT,\n DEFAULT_TRUNCATION_MODE,\n} from './constants.js';\nimport { FormatterContext } from './contexts/formatter.context.js';\nimport { LayerIdsContext } from './contexts/layer-ids.context.js';\nimport { MapBaseLayerFeaturesContext } from './contexts/map-base-layer.context.js';\nimport { MapConfigurationContext } from './contexts/map-configuration.context.js';\nimport { MapLoadingContext } from './contexts/map-loading.context.js';\nimport { MapRawDataContext } from './contexts/map-raw-data.context.js';\nimport { MapTruncationModeContext } from './contexts/map-truncation-mode.context.js';\nimport { useLoadMapBaseLayer } from './hooks/use-load-map-base-layer.js';\nimport { ColorScaleProvider } from './providers/color-scale.provider.js';\nimport { LayerColorStrategyProvider } from './providers/layer-color-strategy.provider.js';\nimport { ErrorStateSlot } from './slots/states/ErrorStateSlot.js';\nimport { MapStoreProvider } from './store/map-store.provider.js';\nimport type { MapViewProps, MapViewRef } from './types/map-view.js';\nimport { extractLayersData } from './utils/extract-layers-data.js';\nimport { getMapStatesTemplates } from './utils/get-map-states-template.js';\nimport { iterateConfigSlots } from './utils/iterate-config-slots.js';\nimport { setLayersId } from './utils/set-layers-id.js';\n\n// eslint-disable-next-line no-restricted-imports\nimport './styles/react-mapgl-styles.css';\n\n/**\n * MapView Component\n */\nconst _MapView = forwardRef<MapViewRef, PropsWithChildren<MapViewProps>>(\n (props, forwardedRef) => {\n const {\n children,\n loading = false,\n style: costumerStyle,\n className: customerClassNames,\n formatter,\n truncationMode,\n ...remaining\n } = props;\n const { layerIds, parsedChildren, valueAccessors } = setLayersId(children);\n\n const {\n flattenData: layersData,\n categories,\n legendDomain,\n } = extractLayersData(parsedChildren, valueAccessors);\n\n const config = iterateConfigSlots(children, legendDomain);\n\n const isLegendHidden = !config.legend || !!config.legend.hidden;\n const legendPosition = config.legend?.position;\n const legendRatio = config.legend?.ratio;\n const legendOnRatioChange = config.legend?.onRatioChange;\n\n const { isMapEnabled, isFetchingFeatures, baseFeatureCollection, error } =\n useLoadMapBaseLayer(config.baseLayer);\n\n const [isMapLoaded, setIsMapLoaded] = useState<boolean>(false);\n const { errorState } = getMapStatesTemplates(children);\n\n const chartHeight = coerceSizeValue(props.height) || DEFAULT_MAP_HEIGHT;\n\n const containerStyles = { width: '100%', ...costumerStyle };\n\n const chartLayoutRef = useAutoLegendRefresh(layersData);\n const mapUnavailable = (!isFetchingFeatures && !isMapEnabled) || error;\n\n const isLoading = isFetchingFeatures || !isMapLoaded;\n\n return (\n <div\n style={containerStyles}\n className={customerClassNames}\n data-testid=\"mapview-container\"\n >\n {\n // TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response\n mapUnavailable ? (\n <MapUnavailable\n isFetchingFeatures={isFetchingFeatures}\n isDisabled={!isMapEnabled}\n chartHeight={chartHeight}\n error={error}\n />\n ) : (\n <MapLoadingContext.Provider value={loading}>\n <MapBaseLayerFeaturesContext.Provider\n value={baseFeatureCollection}\n >\n <MapConfigurationContext.Provider value={config}>\n <LayerIdsContext.Provider value={layerIds}>\n <MapTruncationModeContext.Provider\n value={truncationMode ?? DEFAULT_TRUNCATION_MODE}\n >\n <FormatterContext.Provider value={formatter}>\n <MapRawDataContext.Provider value={layersData}>\n <MapStoreProvider>\n <ColorScaleProvider\n categories={categories}\n dataMax={legendDomain[1]}\n >\n <LayerColorStrategyProvider>\n <ChartLayout\n ref={chartLayoutRef}\n chartHeight={chartHeight}\n errorState={errorState}\n showLoader={loading || isLoading}\n >\n <ChartLayout.Graph>\n {baseFeatureCollection && (\n <MapContent\n ref={forwardedRef}\n onMapLoad={() => setIsMapLoaded(true)}\n {...remaining}\n >\n {parsedChildren}\n </MapContent>\n )}\n </ChartLayout.Graph>\n {!isLegendHidden && (\n <ChartLayout.Legend\n position={legendPosition}\n ratio={legendRatio}\n ratioBoundaries={DEFAULT_LEGEND_SIZES}\n onResize={legendOnRatioChange}\n >\n <MapLegendRenderer />\n </ChartLayout.Legend>\n )}\n </ChartLayout>\n </LayerColorStrategyProvider>\n </ColorScaleProvider>\n </MapStoreProvider>\n </MapRawDataContext.Provider>\n </FormatterContext.Provider>\n </MapTruncationModeContext.Provider>\n </LayerIdsContext.Provider>\n </MapConfigurationContext.Provider>\n </MapBaseLayerFeaturesContext.Provider>\n </MapLoadingContext.Provider>\n )\n }\n </div>\n );\n },\n);\n\n(_MapView as typeof _MapView & { displayName: string })['displayName'] =\n 'MapView';\n\n/**\n * The `MapView` is a component that renders a map with various geospatial data layers.\n * @public\n */\nexport const MapView = Object.assign(_MapView, {\n ErrorState: ErrorStateSlot,\n});\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { FormattedMessage } from "react-intl";
3
3
  import { _EmptyState as EmptyState } from "@dynatrace/strato-components-preview/charts";
4
4
  const BaseLayerDataError = ({ height }) => {
5
- const messageNode = /* @__PURE__ */ React.createElement(
5
+ const messageNode = /* @__PURE__ */ jsx(
6
6
  FormattedMessage,
7
7
  {
8
8
  id: "tS7epcIvtrbIhuBy",
@@ -10,7 +10,7 @@ const BaseLayerDataError = ({ height }) => {
10
10
  description: "Message to display when an error occurred while getting map data."
11
11
  }
12
12
  );
13
- return /* @__PURE__ */ React.createElement(EmptyState, { height }, messageNode);
13
+ return /* @__PURE__ */ jsx(EmptyState, { height, children: messageNode });
14
14
  };
15
15
  BaseLayerDataError.displayName = "BaseLayerDataError";
16
16
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/components/BaseLayerDataError.tsx"],
4
- "sourcesContent": ["import React, { type ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components-preview/charts';\n\ninterface BaseLayerDataErrorProps {\n height: number | string;\n}\n\nexport const BaseLayerDataError = ({ height }: BaseLayerDataErrorProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"tS7epcIvtrbIhuBy\"\n defaultMessage=\"An error occurred: Failed to load map data.\"\n description=\"Message to display when an error occurred while getting map data.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nBaseLayerDataError.displayName = 'BaseLayerDataError';\n"],
5
- "mappings": "AAAA,OAAO,WAA+B;AACtC,SAAS,wBAAwB;AAEjC,SAAS,eAAe,kBAAkB;AAMnC,MAAM,qBAAqB,CAAC,EAAE,OAAO,MAA+B;AACzE,QAAM,cACJ;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,gBAAe;AAAA,MACf,aAAY;AAAA;AAAA,EACd;AAGF,SAAO,oCAAC,cAAW,UAAiB,WAAY;AAClD;AAEA,mBAAmB,cAAc;",
4
+ "sourcesContent": ["import { type ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components-preview/charts';\n\ninterface BaseLayerDataErrorProps {\n height: number | string;\n}\n\nexport const BaseLayerDataError = ({ height }: BaseLayerDataErrorProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"tS7epcIvtrbIhuBy\"\n defaultMessage=\"An error occurred: Failed to load map data.\"\n description=\"Message to display when an error occurred while getting map data.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nBaseLayerDataError.displayName = 'BaseLayerDataError';\n"],
5
+ "mappings": "AAWI;AAVJ,SAAS,wBAAwB;AAEjC,SAAS,eAAe,kBAAkB;AAMnC,MAAM,qBAAqB,CAAC,EAAE,OAAO,MAA+B;AACzE,QAAM,cACJ;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,gBAAe;AAAA,MACf,aAAY;AAAA;AAAA,EACd;AAGF,SAAO,oBAAC,cAAW,QAAiB,uBAAY;AAClD;AAEA,mBAAmB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { Layer } from "@vis.gl/react-maplibre";
2
- import React from "react";
3
3
  import { useSizeInterpolation } from "./hooks/use-size-interpolation.js";
4
4
  import { buildCircleStickToDistanceExpression } from "./utils/build-stick-to-distance-expressions.js";
5
5
  import {
@@ -15,7 +15,7 @@ const BubbleCircleLayer = ({
15
15
  }) => {
16
16
  const sizeInterpolation = useSizeInterpolation();
17
17
  const radiusExpression = sizeInterpolation === "fixed" ? DEFAULT_RADIUS_EXPRESSION : buildCircleStickToDistanceExpression();
18
- return /* @__PURE__ */ React.createElement(
18
+ return /* @__PURE__ */ jsx(
19
19
  Layer,
20
20
  {
21
21
  type: "circle",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/map/components/BubbleLayer/BubbleCircleLayer.tsx"],
4
- "sourcesContent": ["import { Layer } from '@vis.gl/react-maplibre';\nimport React from 'react';\n\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport { buildCircleStickToDistanceExpression } from './utils/build-stick-to-distance-expressions.js';\nimport {\n BUBBLE_DEFAULT_OPACITY,\n BUBBLE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n SHAPE_OPACITY_DIMMED,\n SHAPE_OPACITY_DEFAULT,\n} from '../../constants.js';\n\nexport const BubbleCircleLayer = ({\n id,\n source,\n}: {\n id: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const radiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_RADIUS_EXPRESSION\n : buildCircleStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n id={id}\n source={source}\n paint={{\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-radius': radiusExpression,\n 'circle-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n BUBBLE_DEFAULT_OPACITY,\n SHAPE_OPACITY_DIMMED,\n ],\n 'circle-stroke-width': BUBBLE_STROKE,\n 'circle-stroke-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n ],\n }}\n />\n );\n};\n"],
5
- "mappings": "AAAA,SAAS,aAAa;AACtB,OAAO,WAAW;AAElB,SAAS,4BAA4B;AACrC,SAAS,4CAA4C;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AACF,MAGM;AACJ,QAAM,oBAAoB,qBAAqB;AAE/C,QAAM,mBACJ,sBAAsB,UAClB,4BACA,qCAAqC;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,gBAAgB;AAAA,UACxB,CAAC,OAAO,SAAS;AAAA,QACnB;AAAA,QACA,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,UAChB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,QACA,uBAAuB;AAAA,QACvB,uBAAuB;AAAA,UACrB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,gBAAgB;AAAA,UACxB,CAAC,OAAO,SAAS;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,UACvB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["import { Layer } from '@vis.gl/react-maplibre';\n\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport { buildCircleStickToDistanceExpression } from './utils/build-stick-to-distance-expressions.js';\nimport {\n BUBBLE_DEFAULT_OPACITY,\n BUBBLE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n SHAPE_OPACITY_DIMMED,\n SHAPE_OPACITY_DEFAULT,\n} from '../../constants.js';\n\nexport const BubbleCircleLayer = ({\n id,\n source,\n}: {\n id: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const radiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_RADIUS_EXPRESSION\n : buildCircleStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n id={id}\n source={source}\n paint={{\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-radius': radiusExpression,\n 'circle-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n BUBBLE_DEFAULT_OPACITY,\n SHAPE_OPACITY_DIMMED,\n ],\n 'circle-stroke-width': BUBBLE_STROKE,\n 'circle-stroke-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n ],\n }}\n />\n );\n};\n"],
5
+ "mappings": "AA2BI;AA3BJ,SAAS,aAAa;AAEtB,SAAS,4BAA4B;AACrC,SAAS,4CAA4C;AACrD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AACF,MAGM;AACJ,QAAM,oBAAoB,qBAAqB;AAE/C,QAAM,mBACJ,sBAAsB,UAClB,4BACA,qCAAqC;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,gBAAgB;AAAA,UACxB,CAAC,OAAO,SAAS;AAAA,QACnB;AAAA,QACA,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,UAChB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,QACA,uBAAuB;AAAA,QACvB,uBAAuB;AAAA,UACrB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,gBAAgB;AAAA,UACxB,CAAC,OAAO,SAAS;AAAA,QACnB;AAAA,QACA,yBAAyB;AAAA,UACvB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
2
  import { Source } from "@vis.gl/react-maplibre";
2
- import React from "react";
3
3
  import { BubbleCircleLayer } from "./BubbleCircleLayer.js";
4
4
  import { BubbleLayerTooltip } from "./BubbleLayerTooltip.js";
5
5
  import { BubbleOutlineLayer } from "./BubbleOutlineLayer.js";
@@ -46,13 +46,19 @@ const BubbleLayer = (props) => {
46
46
  radiusScale
47
47
  );
48
48
  const tooltipTemplate = useTooltipTemplate(children, BubbleLayerTooltipSlot);
49
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(SizeInterpolationContext.Provider, { value: sizeInterpolation }, /* @__PURE__ */ React.createElement(Source, { id: sourceId, type: "geojson", data: dataGeoJson, generateId: true }, /* @__PURE__ */ React.createElement(BubbleCircleLayer, { id: layerId, source: sourceId }), /* @__PURE__ */ React.createElement(BubbleOutlineLayer, { beforeId: layerId, source: sourceId }))), /* @__PURE__ */ React.createElement(
50
- BubbleLayerTooltip,
51
- {
52
- layerId,
53
- tooltipTemplate: isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : void 0
54
- }
55
- ));
49
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ /* @__PURE__ */ jsx(SizeInterpolationContext.Provider, { value: sizeInterpolation, children: /* @__PURE__ */ jsxs(Source, { id: sourceId, type: "geojson", data: dataGeoJson, generateId: true, children: [
51
+ /* @__PURE__ */ jsx(BubbleCircleLayer, { id: layerId, source: sourceId }),
52
+ /* @__PURE__ */ jsx(BubbleOutlineLayer, { beforeId: layerId, source: sourceId })
53
+ ] }) }),
54
+ /* @__PURE__ */ jsx(
55
+ BubbleLayerTooltip,
56
+ {
57
+ layerId,
58
+ tooltipTemplate: isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : void 0
59
+ }
60
+ )
61
+ ] });
56
62
  };
57
63
  BubbleLayer["displayName"] = "BubbleLayer";
58
64
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/map/components/BubbleLayer/BubbleLayer.tsx"],
4
- "sourcesContent": ["import { Source } from '@vis.gl/react-maplibre';\nimport React, { type PropsWithChildren } from 'react';\n\nimport { BubbleCircleLayer } from './BubbleCircleLayer.js';\nimport { BubbleLayerTooltip } from './BubbleLayerTooltip.js';\nimport { BubbleOutlineLayer } from './BubbleOutlineLayer.js';\nimport { SizeInterpolationContext } from './contexts/size-interpolation.context.js';\nimport { buildRadiusScale } from './utils/build-radius-scale.js';\nimport { parseBubbleDataToGeoJSON } from './utils/parse-bubble-data-to-geo-json.js';\nimport { DEFAULT_BUBBLE_COLOR, DEFAULT_RADIUS } from '../../constants.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useResolveLocationColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { BubbleLayerTooltip as BubbleLayerTooltipSlot } from '../../slots/BubbleLayerTooltip.js';\nimport {\n type InternalBubbleLayerProps,\n isScaleRadius,\n} from '../../types/bubble-layer.js';\nimport type { Location } from '../../types/location.js';\nimport { isBubbleTooltipTemplate } from '../../utils/tooltip-type-guards.js';\n\nexport const BubbleLayer = <T extends Location>(\n props: PropsWithChildren<InternalBubbleLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n radius = DEFAULT_RADIUS,\n children,\n sizeInterpolation = 'fixed',\n } = props;\n\n const colorParser = useLayerColoringStrategy();\n const bubbleColor = useResolveLocationColor(\n DEFAULT_BUBBLE_COLOR,\n props,\n colorParser,\n );\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n let radiusScale = (value: number) => value;\n\n if (isScaleRadius(props)) {\n const { radiusRange = [10, 100], radius, scale = 'linear' } = props;\n\n radiusScale = buildRadiusScale(data, radius, scale, radiusRange);\n }\n\n const dataGeoJson = parseBubbleDataToGeoJSON(\n data,\n bubbleColor,\n radius,\n radiusScale,\n );\n\n const tooltipTemplate = useTooltipTemplate(children, BubbleLayerTooltipSlot);\n\n return (\n <>\n <SizeInterpolationContext.Provider value={sizeInterpolation}>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <BubbleCircleLayer id={layerId} source={sourceId} />\n <BubbleOutlineLayer beforeId={layerId} source={sourceId} />\n </Source>\n </SizeInterpolationContext.Provider>\n\n <BubbleLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nBubbleLayer['displayName'] = 'BubbleLayer';\n"],
5
- "mappings": "AAAA,SAAS,cAAc;AACvB,OAAO,WAAuC;AAE9C,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB,sBAAsB;AACrD,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB,8BAA8B;AAC7D;AAAA,EAEE;AAAA,OACK;AAEP,SAAS,+BAA+B;AAEjC,MAAM,cAAc,CACzB,UACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,oBAAoB;AAAA,EACtB,IAAI;AAEJ,QAAM,cAAc,yBAAyB;AAC7C,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW,UAAU,OAAO;AAClC,mCAAiC,OAAO,QAAQ;AAChD,iCAA+B,OAAO,OAAO;AAE7C,MAAI,cAAc,CAAC,UAAkB;AAErC,MAAI,cAAc,KAAK,GAAG;AACxB,UAAM,EAAE,cAAc,CAAC,IAAI,GAAG,GAAG,QAAAA,SAAQ,QAAQ,SAAS,IAAI;AAE9D,kBAAc,iBAAiB,MAAMA,SAAQ,OAAO,WAAW;AAAA,EACjE;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,kBAAkB,mBAAmB,UAAU,sBAAsB;AAE3E,SACE,0DACE,oCAAC,yBAAyB,UAAzB,EAAkC,OAAO,qBACxC,oCAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,YAAU,QAChE,oCAAC,qBAAkB,IAAI,SAAS,QAAQ,UAAU,GAClD,oCAAC,sBAAmB,UAAU,SAAS,QAAQ,UAAU,CAC3D,CACF,GAEA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,iBACE,wBAAwB,eAAe,IAAI,kBAAkB;AAAA;AAAA,EAEjE,CACF;AAEJ;AAEA,YAAY,aAAa,IAAI;",
4
+ "sourcesContent": ["import { Source } from '@vis.gl/react-maplibre';\nimport { type PropsWithChildren } from 'react';\n\nimport { BubbleCircleLayer } from './BubbleCircleLayer.js';\nimport { BubbleLayerTooltip } from './BubbleLayerTooltip.js';\nimport { BubbleOutlineLayer } from './BubbleOutlineLayer.js';\nimport { SizeInterpolationContext } from './contexts/size-interpolation.context.js';\nimport { buildRadiusScale } from './utils/build-radius-scale.js';\nimport { parseBubbleDataToGeoJSON } from './utils/parse-bubble-data-to-geo-json.js';\nimport { DEFAULT_BUBBLE_COLOR, DEFAULT_RADIUS } from '../../constants.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useResolveLocationColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { BubbleLayerTooltip as BubbleLayerTooltipSlot } from '../../slots/BubbleLayerTooltip.js';\nimport {\n type InternalBubbleLayerProps,\n isScaleRadius,\n} from '../../types/bubble-layer.js';\nimport type { Location } from '../../types/location.js';\nimport { isBubbleTooltipTemplate } from '../../utils/tooltip-type-guards.js';\n\nexport const BubbleLayer = <T extends Location>(\n props: PropsWithChildren<InternalBubbleLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n radius = DEFAULT_RADIUS,\n children,\n sizeInterpolation = 'fixed',\n } = props;\n\n const colorParser = useLayerColoringStrategy();\n const bubbleColor = useResolveLocationColor(\n DEFAULT_BUBBLE_COLOR,\n props,\n colorParser,\n );\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n let radiusScale = (value: number) => value;\n\n if (isScaleRadius(props)) {\n const { radiusRange = [10, 100], radius, scale = 'linear' } = props;\n\n radiusScale = buildRadiusScale(data, radius, scale, radiusRange);\n }\n\n const dataGeoJson = parseBubbleDataToGeoJSON(\n data,\n bubbleColor,\n radius,\n radiusScale,\n );\n\n const tooltipTemplate = useTooltipTemplate(children, BubbleLayerTooltipSlot);\n\n return (\n <>\n <SizeInterpolationContext.Provider value={sizeInterpolation}>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <BubbleCircleLayer id={layerId} source={sourceId} />\n <BubbleOutlineLayer beforeId={layerId} source={sourceId} />\n </Source>\n </SizeInterpolationContext.Provider>\n\n <BubbleLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nBubbleLayer['displayName'] = 'BubbleLayer';\n"],
5
+ "mappings": "AA+DI,mBAGM,KADF,YAFJ;AA/DJ,SAAS,cAAc;AAGvB,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB,sBAAsB;AACrD,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB,8BAA8B;AAC7D;AAAA,EAEE;AAAA,OACK;AAEP,SAAS,+BAA+B;AAEjC,MAAM,cAAc,CACzB,UACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,oBAAoB;AAAA,EACtB,IAAI;AAEJ,QAAM,cAAc,yBAAyB;AAC7C,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW,UAAU,OAAO;AAClC,mCAAiC,OAAO,QAAQ;AAChD,iCAA+B,OAAO,OAAO;AAE7C,MAAI,cAAc,CAAC,UAAkB;AAErC,MAAI,cAAc,KAAK,GAAG;AACxB,UAAM,EAAE,cAAc,CAAC,IAAI,GAAG,GAAG,QAAAA,SAAQ,QAAQ,SAAS,IAAI;AAE9D,kBAAc,iBAAiB,MAAMA,SAAQ,OAAO,WAAW;AAAA,EACjE;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,kBAAkB,mBAAmB,UAAU,sBAAsB;AAE3E,SACE,iCACE;AAAA,wBAAC,yBAAyB,UAAzB,EAAkC,OAAO,mBACxC,+BAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,YAAU,MAChE;AAAA,0BAAC,qBAAkB,IAAI,SAAS,QAAQ,UAAU;AAAA,MAClD,oBAAC,sBAAmB,UAAU,SAAS,QAAQ,UAAU;AAAA,OAC3D,GACF;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,iBACE,wBAAwB,eAAe,IAAI,kBAAkB;AAAA;AAAA,IAEjE;AAAA,KACF;AAEJ;AAEA,YAAY,aAAa,IAAI;",
6
6
  "names": ["radius"]
7
7
  }
@@ -1,4 +1,5 @@
1
- import React, { useRef } from "react";
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
2
3
  import {
3
4
  _ChartTooltip as ChartTooltip,
4
5
  _useChartActionsMenu as useChartActionsMenu
@@ -40,7 +41,7 @@ const BubbleLayerTooltip = (props) => {
40
41
  closestPoint.current = sanitizedData[0];
41
42
  remainingPoints.current = sanitizedData.slice(1);
42
43
  }
43
- return /* @__PURE__ */ React.createElement(
44
+ return /* @__PURE__ */ jsx(
44
45
  ChartTooltip,
45
46
  {
46
47
  position,
@@ -51,9 +52,9 @@ const BubbleLayerTooltip = (props) => {
51
52
  selectedItemId,
52
53
  actionsMenuRef,
53
54
  updateSelectedItem
54
- }
55
- },
56
- closestPoint.current ? tooltipTemplate(closestPoint.current, remainingPoints.current) : null
55
+ },
56
+ children: closestPoint.current ? tooltipTemplate(closestPoint.current, remainingPoints.current) : null
57
+ }
57
58
  );
58
59
  };
59
60
  BubbleLayerTooltip["displayName"] = "BubbleLayerTooltip";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/map/components/BubbleLayer/BubbleLayerTooltip.tsx"],
4
- "sourcesContent": ["import React, { useRef } from 'react';\n\nimport {\n _ChartTooltip as ChartTooltip,\n _useChartActionsMenu as useChartActionsMenu,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport {\n useMapTooltipPinnedState,\n useMapTooltipState,\n} from '../../store/selectors.js';\nimport type { Location } from '../../types/location.js';\nimport type {\n BubbleLayerTooltipData,\n BubbleLayerTooltipHandler,\n} from '../../types/tooltip.js';\n\ninterface BubbleTooltipStatePayload {\n __color: string;\n __hoveredColor: string;\n __radius: number;\n __lat: number;\n data: Location;\n}\n\nexport interface BubbleLayerTooltipProps {\n layerId: string;\n tooltipTemplate?: BubbleLayerTooltipHandler;\n}\n\nexport const BubbleLayerTooltip = (props: BubbleLayerTooltipProps) => {\n const { layerId, tooltipTemplate } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n\n const tooltipRef = useRef<HTMLDivElement | null>(null);\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<BubbleTooltipStatePayload>();\n const pinned = useMapTooltipPinnedState();\n\n const closestPoint = useRef<BubbleLayerTooltipData>();\n const remainingPoints = useRef<BubbleLayerTooltipData[]>([]);\n\n const forceHideTooltip =\n !pinned && (hoveredLayerId !== layerId || !visible || !enabled);\n\n if (!tooltipTemplate || forceHideTooltip || !position) {\n return null;\n }\n\n if (!pinned && data?.[0]) {\n const sanitizedData = data.map((bubbleProps) => {\n const {\n __color: color,\n __radius: radius,\n data: customData,\n } = bubbleProps;\n\n return {\n color,\n radius,\n data: customData,\n };\n });\n\n closestPoint.current = sanitizedData[0];\n remainingPoints.current = sanitizedData.slice(1);\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n ref={tooltipRef}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {closestPoint.current\n ? tooltipTemplate(closestPoint.current, remainingPoints.current)\n : null}\n </ChartTooltip>\n );\n};\n\nBubbleLayerTooltip['displayName'] = 'BubbleLayerTooltip';\n"],
5
- "mappings": "AAAA,OAAO,SAAS,cAAc;AAE9B;AAAA,EACE,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,OACnB;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAoBA,MAAM,qBAAqB,CAAC,UAAmC;AACpE,QAAM,EAAE,SAAS,gBAAgB,IAAI;AACrC,QAAM;AAAA,IACJ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,oBAAoB;AAExB,QAAM,aAAa,OAA8B,IAAI;AACrD,QAAM,EAAE,gBAAgB,MAAM,UAAU,SAAS,QAAQ,IACvD,mBAA8C;AAChD,QAAM,SAAS,yBAAyB;AAExC,QAAM,eAAe,OAA+B;AACpD,QAAM,kBAAkB,OAAiC,CAAC,CAAC;AAE3D,QAAM,mBACJ,CAAC,WAAW,mBAAmB,WAAW,CAAC,WAAW,CAAC;AAEzD,MAAI,CAAC,mBAAmB,oBAAoB,CAAC,UAAU;AACrD,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,UAAU,OAAO,CAAC,GAAG;AACxB,UAAM,gBAAgB,KAAK,IAAI,CAAC,gBAAgB;AAC9C,YAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,MAAM;AAAA,MACR,IAAI;AAEJ,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,MAAM;AAAA,MACR;AAAA,IACF,CAAC;AAED,iBAAa,UAAU,cAAc,CAAC;AACtC,oBAAgB,UAAU,cAAc,MAAM,CAAC;AAAA,EACjD;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,cAAc;AAAA,MACd,sBAAsB;AAAA,QACpB;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA;AAAA,IAEC,aAAa,UACV,gBAAgB,aAAa,SAAS,gBAAgB,OAAO,IAC7D;AAAA,EACN;AAEJ;AAEA,mBAAmB,aAAa,IAAI;",
4
+ "sourcesContent": ["import { useRef } from 'react';\n\nimport {\n _ChartTooltip as ChartTooltip,\n _useChartActionsMenu as useChartActionsMenu,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport {\n useMapTooltipPinnedState,\n useMapTooltipState,\n} from '../../store/selectors.js';\nimport type { Location } from '../../types/location.js';\nimport type {\n BubbleLayerTooltipData,\n BubbleLayerTooltipHandler,\n} from '../../types/tooltip.js';\n\ninterface BubbleTooltipStatePayload {\n __color: string;\n __hoveredColor: string;\n __radius: number;\n __lat: number;\n data: Location;\n}\n\nexport interface BubbleLayerTooltipProps {\n layerId: string;\n tooltipTemplate?: BubbleLayerTooltipHandler;\n}\n\nexport const BubbleLayerTooltip = (props: BubbleLayerTooltipProps) => {\n const { layerId, tooltipTemplate } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n\n const tooltipRef = useRef<HTMLDivElement | null>(null);\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<BubbleTooltipStatePayload>();\n const pinned = useMapTooltipPinnedState();\n\n const closestPoint = useRef<BubbleLayerTooltipData>();\n const remainingPoints = useRef<BubbleLayerTooltipData[]>([]);\n\n const forceHideTooltip =\n !pinned && (hoveredLayerId !== layerId || !visible || !enabled);\n\n if (!tooltipTemplate || forceHideTooltip || !position) {\n return null;\n }\n\n if (!pinned && data?.[0]) {\n const sanitizedData = data.map((bubbleProps) => {\n const {\n __color: color,\n __radius: radius,\n data: customData,\n } = bubbleProps;\n\n return {\n color,\n radius,\n data: customData,\n };\n });\n\n closestPoint.current = sanitizedData[0];\n remainingPoints.current = sanitizedData.slice(1);\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n ref={tooltipRef}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {closestPoint.current\n ? tooltipTemplate(closestPoint.current, remainingPoints.current)\n : null}\n </ChartTooltip>\n );\n};\n\nBubbleLayerTooltip['displayName'] = 'BubbleLayerTooltip';\n"],
5
+ "mappings": "AA0EI;AA1EJ,SAAS,cAAc;AAEvB;AAAA,EACE,iBAAiB;AAAA,EACjB,wBAAwB;AAAA,OACnB;AAEP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAoBA,MAAM,qBAAqB,CAAC,UAAmC;AACpE,QAAM,EAAE,SAAS,gBAAgB,IAAI;AACrC,QAAM;AAAA,IACJ,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,oBAAoB;AAExB,QAAM,aAAa,OAA8B,IAAI;AACrD,QAAM,EAAE,gBAAgB,MAAM,UAAU,SAAS,QAAQ,IACvD,mBAA8C;AAChD,QAAM,SAAS,yBAAyB;AAExC,QAAM,eAAe,OAA+B;AACpD,QAAM,kBAAkB,OAAiC,CAAC,CAAC;AAE3D,QAAM,mBACJ,CAAC,WAAW,mBAAmB,WAAW,CAAC,WAAW,CAAC;AAEzD,MAAI,CAAC,mBAAmB,oBAAoB,CAAC,UAAU;AACrD,WAAO;AAAA,EACT;AAEA,MAAI,CAAC,UAAU,OAAO,CAAC,GAAG;AACxB,UAAM,gBAAgB,KAAK,IAAI,CAAC,gBAAgB;AAC9C,YAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,MAAM;AAAA,MACR,IAAI;AAEJ,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,MAAM;AAAA,MACR;AAAA,IACF,CAAC;AAED,iBAAa,UAAU,cAAc,CAAC;AACtC,oBAAgB,UAAU,cAAc,MAAM,CAAC;AAAA,EACjD;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL,cAAc;AAAA,MACd,sBAAsB;AAAA,QACpB;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC,uBAAa,UACV,gBAAgB,aAAa,SAAS,gBAAgB,OAAO,IAC7D;AAAA;AAAA,EACN;AAEJ;AAEA,mBAAmB,aAAa,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import { Layer } from "@vis.gl/react-maplibre";
2
- import React from "react";
3
3
  import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components-preview/charts";
4
4
  import { useSizeInterpolation } from "./hooks/use-size-interpolation.js";
5
5
  import { addOutlineSize } from "./utils/add-outline-size.js";
@@ -18,7 +18,7 @@ const BubbleOutlineLayer = ({
18
18
  }) => {
19
19
  const sizeInterpolation = useSizeInterpolation();
20
20
  const outlineRadiusExpression = sizeInterpolation === "fixed" ? DEFAULT_OUTLINE_RADIUS_EXPRESSION : buildOutlineStickToDistanceExpression();
21
- return /* @__PURE__ */ React.createElement(
21
+ return /* @__PURE__ */ jsx(
22
22
  Layer,
23
23
  {
24
24
  type: "circle",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/map/components/BubbleLayer/BubbleOutlineLayer.tsx"],
4
- "sourcesContent": ["import { Layer } from '@vis.gl/react-maplibre';\nimport React from 'react';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport { addOutlineSize } from './utils/add-outline-size.js';\nimport { buildOutlineStickToDistanceExpression } from './utils/build-stick-to-distance-expressions.js';\nimport {\n ACTIVE_COLOR,\n BUBBLE_OUTLINE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n} from '../../constants.js';\n\nconst DEFAULT_OUTLINE_RADIUS_EXPRESSION = addOutlineSize(\n DEFAULT_RADIUS_EXPRESSION,\n);\n\nexport const BubbleOutlineLayer = ({\n beforeId,\n source,\n}: {\n beforeId: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const outlineRadiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_OUTLINE_RADIUS_EXPRESSION\n : buildOutlineStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n beforeId={beforeId}\n source={source}\n paint={{\n 'circle-radius': outlineRadiusExpression,\n 'circle-opacity': 0,\n 'circle-stroke-width': BUBBLE_OUTLINE_STROKE,\n 'circle-stroke-color': getCanvasColor(ACTIVE_COLOR),\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n 1,\n 0,\n ],\n }}\n />\n );\n};\n"],
5
- "mappings": "AAAA,SAAS,aAAa;AACtB,OAAO,WAAW;AAElB,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,6CAA6C;AACtD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,oCAAoC;AAAA,EACxC;AACF;AAEO,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAGM;AACJ,QAAM,oBAAoB,qBAAqB;AAE/C,QAAM,0BACJ,sBAAsB,UAClB,oCACA,sCAAsC;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,QAClB,uBAAuB;AAAA,QACvB,uBAAuB,eAAe,YAAY;AAAA,QAClD,yBAAyB;AAAA,UACvB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,QAAQ,GAAG,KAAK;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;",
4
+ "sourcesContent": ["import { Layer } from '@vis.gl/react-maplibre';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { useSizeInterpolation } from './hooks/use-size-interpolation.js';\nimport { addOutlineSize } from './utils/add-outline-size.js';\nimport { buildOutlineStickToDistanceExpression } from './utils/build-stick-to-distance-expressions.js';\nimport {\n ACTIVE_COLOR,\n BUBBLE_OUTLINE_STROKE,\n DEFAULT_RADIUS_EXPRESSION,\n} from '../../constants.js';\n\nconst DEFAULT_OUTLINE_RADIUS_EXPRESSION = addOutlineSize(\n DEFAULT_RADIUS_EXPRESSION,\n);\n\nexport const BubbleOutlineLayer = ({\n beforeId,\n source,\n}: {\n beforeId: string;\n source: string;\n}) => {\n const sizeInterpolation = useSizeInterpolation();\n\n const outlineRadiusExpression =\n sizeInterpolation === 'fixed'\n ? DEFAULT_OUTLINE_RADIUS_EXPRESSION\n : buildOutlineStickToDistanceExpression();\n\n return (\n <Layer\n type=\"circle\"\n beforeId={beforeId}\n source={source}\n paint={{\n 'circle-radius': outlineRadiusExpression,\n 'circle-opacity': 0,\n 'circle-stroke-width': BUBBLE_OUTLINE_STROKE,\n 'circle-stroke-color': getCanvasColor(ACTIVE_COLOR),\n 'circle-stroke-opacity': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n 1,\n 0,\n ],\n }}\n />\n );\n};\n"],
5
+ "mappings": "AAgCI;AAhCJ,SAAS,aAAa;AAEtB,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,4BAA4B;AACrC,SAAS,sBAAsB;AAC/B,SAAS,6CAA6C;AACtD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,MAAM,oCAAoC;AAAA,EACxC;AACF;AAEO,MAAM,qBAAqB,CAAC;AAAA,EACjC;AAAA,EACA;AACF,MAGM;AACJ,QAAM,oBAAoB,qBAAqB;AAE/C,QAAM,0BACJ,sBAAsB,UAClB,oCACA,sCAAsC;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,QAClB,uBAAuB;AAAA,QACvB,uBAAuB,eAAe,YAAY;AAAA,QAClD,yBAAyB;AAAA,UACvB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,QAAQ,GAAG,KAAK;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;",
6
6
  "names": []
7
7
  }