@dynatrace/strato-geo 0.6.32

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 (665) hide show
  1. package/LICENSE +174 -0
  2. package/README.md +15 -0
  3. package/esm/index.js +16 -0
  4. package/esm/index.js.map +7 -0
  5. package/esm/map/MapView.js +16 -0
  6. package/esm/map/MapView.js.map +7 -0
  7. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js +16 -0
  8. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js.map +7 -0
  9. package/esm/map/components/BubbleLayer/BubbleLayer.js +16 -0
  10. package/esm/map/components/BubbleLayer/BubbleLayer.js.map +7 -0
  11. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js +16 -0
  12. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js.map +7 -0
  13. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js +16 -0
  14. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js.map +7 -0
  15. package/esm/map/components/BubbleLayer/contexts/size-interpolation.context.js +16 -0
  16. package/esm/map/components/BubbleLayer/contexts/size-interpolation.context.js.map +7 -0
  17. package/esm/map/components/BubbleLayer/functions/add-outline-size.js +16 -0
  18. package/esm/map/components/BubbleLayer/functions/add-outline-size.js.map +7 -0
  19. package/esm/map/components/BubbleLayer/functions/build-radius-scale.js +16 -0
  20. package/esm/map/components/BubbleLayer/functions/build-radius-scale.js.map +7 -0
  21. package/esm/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js +16 -0
  22. package/esm/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js.map +7 -0
  23. package/esm/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js +16 -0
  24. package/esm/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js.map +7 -0
  25. package/esm/map/components/BubbleLayer/hooks/use-size-interpolation.js +16 -0
  26. package/esm/map/components/BubbleLayer/hooks/use-size-interpolation.js.map +7 -0
  27. package/esm/map/components/ChoroplethLayer.js +16 -0
  28. package/esm/map/components/ChoroplethLayer.js.map +7 -0
  29. package/esm/map/components/ChoroplethLayerTooltip.js +16 -0
  30. package/esm/map/components/ChoroplethLayerTooltip.js.map +7 -0
  31. package/esm/map/components/ConnectionLayer/ConnectionLayer.js +16 -0
  32. package/esm/map/components/ConnectionLayer/ConnectionLayer.js.map +7 -0
  33. package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js +16 -0
  34. package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js.map +7 -0
  35. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js +16 -0
  36. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js.map +7 -0
  37. package/esm/map/components/ConnectionLayer/functions/get-arc-line-features.js +16 -0
  38. package/esm/map/components/ConnectionLayer/functions/get-arc-line-features.js.map +7 -0
  39. package/esm/map/components/ConnectionLayer/functions/get-arrows-angles.js +16 -0
  40. package/esm/map/components/ConnectionLayer/functions/get-arrows-angles.js.map +7 -0
  41. package/esm/map/components/ConnectionLayer/functions/get-straight-line-features.js +16 -0
  42. package/esm/map/components/ConnectionLayer/functions/get-straight-line-features.js.map +7 -0
  43. package/esm/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js +16 -0
  44. package/esm/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js.map +7 -0
  45. package/esm/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js +16 -0
  46. package/esm/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js.map +7 -0
  47. package/esm/map/components/DefaultTooltip.js +16 -0
  48. package/esm/map/components/DefaultTooltip.js.map +7 -0
  49. package/esm/map/components/DotLayer/BackgroundLayer.js +16 -0
  50. package/esm/map/components/DotLayer/BackgroundLayer.js.map +7 -0
  51. package/esm/map/components/DotLayer/DotLayer.js +16 -0
  52. package/esm/map/components/DotLayer/DotLayer.js.map +7 -0
  53. package/esm/map/components/DotLayer/DotLayerTooltip.js +16 -0
  54. package/esm/map/components/DotLayer/DotLayerTooltip.js.map +7 -0
  55. package/esm/map/components/DotLayer/functions/calculate-circle-translate.js +16 -0
  56. package/esm/map/components/DotLayer/functions/calculate-circle-translate.js.map +7 -0
  57. package/esm/map/components/DotLayer/functions/resolve-icon-background.js +16 -0
  58. package/esm/map/components/DotLayer/functions/resolve-icon-background.js.map +7 -0
  59. package/esm/map/components/MapContent.js +16 -0
  60. package/esm/map/components/MapContent.js.map +7 -0
  61. package/esm/map/components/legend/CategoricalLegendRenderer.js +16 -0
  62. package/esm/map/components/legend/CategoricalLegendRenderer.js.map +7 -0
  63. package/esm/map/components/legend/MapLegendRenderer.js +16 -0
  64. package/esm/map/components/legend/MapLegendRenderer.js.map +7 -0
  65. package/esm/map/components/legend/SequentialLegendRenderer.js +16 -0
  66. package/esm/map/components/legend/SequentialLegendRenderer.js.map +7 -0
  67. package/esm/map/components/legend/ThresholdLegendRenderer.js +16 -0
  68. package/esm/map/components/legend/ThresholdLegendRenderer.js.map +7 -0
  69. package/esm/map/components/legend/functions/resolve-color.js +16 -0
  70. package/esm/map/components/legend/functions/resolve-color.js.map +7 -0
  71. package/esm/map/components/toolbar/MapToolbar.js +16 -0
  72. package/esm/map/components/toolbar/MapToolbar.js.map +7 -0
  73. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js +16 -0
  74. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js.map +7 -0
  75. package/esm/map/components/toolbar/buttons/MapResetButton.js +16 -0
  76. package/esm/map/components/toolbar/buttons/MapResetButton.js.map +7 -0
  77. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js +16 -0
  78. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js.map +7 -0
  79. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js +16 -0
  80. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js.map +7 -0
  81. package/esm/map/components/toolbar/constants.js +16 -0
  82. package/esm/map/components/toolbar/constants.js.map +7 -0
  83. package/esm/map/constants.js +16 -0
  84. package/esm/map/constants.js.map +7 -0
  85. package/esm/map/contexts/a11y-toolbar-tab-index.context.js +16 -0
  86. package/esm/map/contexts/a11y-toolbar-tab-index.context.js.map +7 -0
  87. package/esm/map/contexts/color-scale.context.js +16 -0
  88. package/esm/map/contexts/color-scale.context.js.map +7 -0
  89. package/esm/map/contexts/layer-coloring-strategy.context.js +16 -0
  90. package/esm/map/contexts/layer-coloring-strategy.context.js.map +7 -0
  91. package/esm/map/contexts/layer-ids.context.js +16 -0
  92. package/esm/map/contexts/layer-ids.context.js.map +7 -0
  93. package/esm/map/contexts/map-configuration.context.js +16 -0
  94. package/esm/map/contexts/map-configuration.context.js.map +7 -0
  95. package/esm/map/contexts/map-country-code.context.js +16 -0
  96. package/esm/map/contexts/map-country-code.context.js.map +7 -0
  97. package/esm/map/contexts/map-data-bounding-box.context.js +16 -0
  98. package/esm/map/contexts/map-data-bounding-box.context.js.map +7 -0
  99. package/esm/map/contexts/map-initial-view.context.js +16 -0
  100. package/esm/map/contexts/map-initial-view.context.js.map +7 -0
  101. package/esm/map/contexts/map-raw-data.context.js +16 -0
  102. package/esm/map/contexts/map-raw-data.context.js.map +7 -0
  103. package/esm/map/functions/__test__/fixtures/business-locations.js +16 -0
  104. package/esm/map/functions/__test__/fixtures/business-locations.js.map +7 -0
  105. package/esm/map/functions/__test__/fixtures/connection-layer.js +16 -0
  106. package/esm/map/functions/__test__/fixtures/connection-layer.js.map +7 -0
  107. package/esm/map/functions/__test__/fixtures/countries-stats.js +16 -0
  108. package/esm/map/functions/__test__/fixtures/countries-stats.js.map +7 -0
  109. package/esm/map/functions/__test__/fixtures/csv-download-cases.js +16 -0
  110. package/esm/map/functions/__test__/fixtures/csv-download-cases.js.map +7 -0
  111. package/esm/map/functions/__test__/fixtures/events-locations.js +16 -0
  112. package/esm/map/functions/__test__/fixtures/events-locations.js.map +7 -0
  113. package/esm/map/functions/__test__/fixtures/facilities-locations.js +16 -0
  114. package/esm/map/functions/__test__/fixtures/facilities-locations.js.map +7 -0
  115. package/esm/map/functions/__test__/fixtures/flight-connections.js +16 -0
  116. package/esm/map/functions/__test__/fixtures/flight-connections.js.map +7 -0
  117. package/esm/map/functions/a11y-toolbar-controls.js +16 -0
  118. package/esm/map/functions/a11y-toolbar-controls.js.map +7 -0
  119. package/esm/map/functions/attach-image-from-shape.js +16 -0
  120. package/esm/map/functions/attach-image-from-shape.js.map +7 -0
  121. package/esm/map/functions/attach-image-from-string.js +16 -0
  122. package/esm/map/functions/attach-image-from-string.js.map +7 -0
  123. package/esm/map/functions/attach-image-from-text.js +16 -0
  124. package/esm/map/functions/attach-image-from-text.js.map +7 -0
  125. package/esm/map/functions/attach-image-to-map.js +16 -0
  126. package/esm/map/functions/attach-image-to-map.js.map +7 -0
  127. package/esm/map/functions/build-and-download-csv.js +16 -0
  128. package/esm/map/functions/build-and-download-csv.js.map +7 -0
  129. package/esm/map/functions/build-categorical-scale.js +16 -0
  130. package/esm/map/functions/build-categorical-scale.js.map +7 -0
  131. package/esm/map/functions/build-scale-from-legend-config.js +16 -0
  132. package/esm/map/functions/build-scale-from-legend-config.js.map +7 -0
  133. package/esm/map/functions/calculate-hovered-color.js +16 -0
  134. package/esm/map/functions/calculate-hovered-color.js.map +7 -0
  135. package/esm/map/functions/create-bitmap-config-options.js +16 -0
  136. package/esm/map/functions/create-bitmap-config-options.js.map +7 -0
  137. package/esm/map/functions/define-bearing.js +16 -0
  138. package/esm/map/functions/define-bearing.js.map +7 -0
  139. package/esm/map/functions/define-color.js +16 -0
  140. package/esm/map/functions/define-color.js.map +7 -0
  141. package/esm/map/functions/define-radius.js +16 -0
  142. package/esm/map/functions/define-radius.js.map +7 -0
  143. package/esm/map/functions/extract-layers-data.js +16 -0
  144. package/esm/map/functions/extract-layers-data.js.map +7 -0
  145. package/esm/map/functions/get-client-settings.js +16 -0
  146. package/esm/map/functions/get-client-settings.js.map +7 -0
  147. package/esm/map/functions/get-color-from-token.js +16 -0
  148. package/esm/map/functions/get-color-from-token.js.map +7 -0
  149. package/esm/map/functions/get-countries-geo-code.js +16 -0
  150. package/esm/map/functions/get-countries-geo-code.js.map +7 -0
  151. package/esm/map/functions/get-data-layers-bounding-box.js +16 -0
  152. package/esm/map/functions/get-data-layers-bounding-box.js.map +7 -0
  153. package/esm/map/functions/get-data-uri.js +16 -0
  154. package/esm/map/functions/get-data-uri.js.map +7 -0
  155. package/esm/map/functions/get-map-states-template.js +16 -0
  156. package/esm/map/functions/get-map-states-template.js.map +7 -0
  157. package/esm/map/functions/get-scaled-symbol-size.js +16 -0
  158. package/esm/map/functions/get-scaled-symbol-size.js.map +7 -0
  159. package/esm/map/functions/get-tenant-country-code.js +16 -0
  160. package/esm/map/functions/get-tenant-country-code.js.map +7 -0
  161. package/esm/map/functions/is-valid-shape.js +16 -0
  162. package/esm/map/functions/is-valid-shape.js.map +7 -0
  163. package/esm/map/functions/iterate-config-slots.js +16 -0
  164. package/esm/map/functions/iterate-config-slots.js.map +7 -0
  165. package/esm/map/functions/parse-dot-data-to-geo-json.js +16 -0
  166. package/esm/map/functions/parse-dot-data-to-geo-json.js.map +7 -0
  167. package/esm/map/functions/parse-region-data-to-geo-json.js +16 -0
  168. package/esm/map/functions/parse-region-data-to-geo-json.js.map +7 -0
  169. package/esm/map/functions/safe-reactdom-render.js +16 -0
  170. package/esm/map/functions/safe-reactdom-render.js.map +7 -0
  171. package/esm/map/functions/set-layers-id.js +16 -0
  172. package/esm/map/functions/set-layers-id.js.map +7 -0
  173. package/esm/map/functions/tabularize-layers-data.js +18 -0
  174. package/esm/map/functions/tabularize-layers-data.js.map +7 -0
  175. package/esm/map/functions/to-mapbox-initial-view-state.js +16 -0
  176. package/esm/map/functions/to-mapbox-initial-view-state.js.map +7 -0
  177. package/esm/map/functions/tooltip-type-guards.js +16 -0
  178. package/esm/map/functions/tooltip-type-guards.js.map +7 -0
  179. package/esm/map/hooks/use-a11y-toolbar-tab-index.js +16 -0
  180. package/esm/map/hooks/use-a11y-toolbar-tab-index.js.map +7 -0
  181. package/esm/map/hooks/use-active-interaction.js +16 -0
  182. package/esm/map/hooks/use-active-interaction.js.map +7 -0
  183. package/esm/map/hooks/use-attach-image-from-icon.js +16 -0
  184. package/esm/map/hooks/use-attach-image-from-icon.js.map +7 -0
  185. package/esm/map/hooks/use-attach-symbol-to-map.js +16 -0
  186. package/esm/map/hooks/use-attach-symbol-to-map.js.map +7 -0
  187. package/esm/map/hooks/use-color-scale.js +16 -0
  188. package/esm/map/hooks/use-color-scale.js.map +7 -0
  189. package/esm/map/hooks/use-connection-direction-interaction-highlighting.js +16 -0
  190. package/esm/map/hooks/use-connection-direction-interaction-highlighting.js.map +7 -0
  191. package/esm/map/hooks/use-connection-interaction-highlighting.js +16 -0
  192. package/esm/map/hooks/use-connection-interaction-highlighting.js.map +7 -0
  193. package/esm/map/hooks/use-data-bounding-box.js +16 -0
  194. package/esm/map/hooks/use-data-bounding-box.js.map +7 -0
  195. package/esm/map/hooks/use-hover-interaction.js +16 -0
  196. package/esm/map/hooks/use-hover-interaction.js.map +7 -0
  197. package/esm/map/hooks/use-initial-view-context.js +16 -0
  198. package/esm/map/hooks/use-initial-view-context.js.map +7 -0
  199. package/esm/map/hooks/use-initial-view-state.js +16 -0
  200. package/esm/map/hooks/use-initial-view-state.js.map +7 -0
  201. package/esm/map/hooks/use-layer-coloring-strategy.js +16 -0
  202. package/esm/map/hooks/use-layer-coloring-strategy.js.map +7 -0
  203. package/esm/map/hooks/use-legend-interaction-highlighting.js +16 -0
  204. package/esm/map/hooks/use-legend-interaction-highlighting.js.map +7 -0
  205. package/esm/map/hooks/use-legend-interaction-visibility.js +16 -0
  206. package/esm/map/hooks/use-legend-interaction-visibility.js.map +7 -0
  207. package/esm/map/hooks/use-load-symbol-into-map.js +16 -0
  208. package/esm/map/hooks/use-load-symbol-into-map.js.map +7 -0
  209. package/esm/map/hooks/use-map-config.js +16 -0
  210. package/esm/map/hooks/use-map-config.js.map +7 -0
  211. package/esm/map/hooks/use-map-country-code.js +16 -0
  212. package/esm/map/hooks/use-map-country-code.js.map +7 -0
  213. package/esm/map/hooks/use-map-raw-data.js +16 -0
  214. package/esm/map/hooks/use-map-raw-data.js.map +7 -0
  215. package/esm/map/hooks/use-map-settings.js +16 -0
  216. package/esm/map/hooks/use-map-settings.js.map +7 -0
  217. package/esm/map/hooks/use-map-source.js +16 -0
  218. package/esm/map/hooks/use-map-source.js.map +7 -0
  219. package/esm/map/hooks/use-overlay-events.js +16 -0
  220. package/esm/map/hooks/use-overlay-events.js.map +7 -0
  221. package/esm/map/hooks/use-resolve-color.js +16 -0
  222. package/esm/map/hooks/use-resolve-color.js.map +7 -0
  223. package/esm/map/hooks/use-safe-svg-parser.js +16 -0
  224. package/esm/map/hooks/use-safe-svg-parser.js.map +7 -0
  225. package/esm/map/hooks/use-tooltip-event-listeners.js +16 -0
  226. package/esm/map/hooks/use-tooltip-event-listeners.js.map +7 -0
  227. package/esm/map/hooks/use-tooltip-template.js +16 -0
  228. package/esm/map/hooks/use-tooltip-template.js.map +7 -0
  229. package/esm/map/hooks/useDefaultTooltipActions.js +16 -0
  230. package/esm/map/hooks/useDefaultTooltipActions.js.map +7 -0
  231. package/esm/map/map-styles/default-style.js +16 -0
  232. package/esm/map/map-styles/default-style.js.map +7 -0
  233. package/esm/map/providers/color-scale.provider.js +16 -0
  234. package/esm/map/providers/color-scale.provider.js.map +7 -0
  235. package/esm/map/providers/layer-color-strategy.provider.js +16 -0
  236. package/esm/map/providers/layer-color-strategy.provider.js.map +7 -0
  237. package/esm/map/providers/map-initial-view.provider.js +16 -0
  238. package/esm/map/providers/map-initial-view.provider.js.map +7 -0
  239. package/esm/map/shapes/circle.js +33 -0
  240. package/esm/map/shapes/circle.js.map +7 -0
  241. package/esm/map/shapes/cross.js +28 -0
  242. package/esm/map/shapes/cross.js.map +7 -0
  243. package/esm/map/shapes/diamond.js +21 -0
  244. package/esm/map/shapes/diamond.js.map +7 -0
  245. package/esm/map/shapes/heart.js +28 -0
  246. package/esm/map/shapes/heart.js.map +7 -0
  247. package/esm/map/shapes/pin.js +22 -0
  248. package/esm/map/shapes/pin.js.map +7 -0
  249. package/esm/map/shapes/shape-picker.js +16 -0
  250. package/esm/map/shapes/shape-picker.js.map +7 -0
  251. package/esm/map/shapes/square.js +19 -0
  252. package/esm/map/shapes/square.js.map +7 -0
  253. package/esm/map/shapes/star.js +33 -0
  254. package/esm/map/shapes/star.js.map +7 -0
  255. package/esm/map/shapes/triangle.js +28 -0
  256. package/esm/map/shapes/triangle.js.map +7 -0
  257. package/esm/map/slots/BubbleLayer.js +16 -0
  258. package/esm/map/slots/BubbleLayer.js.map +7 -0
  259. package/esm/map/slots/BubbleLayerTooltip.js +16 -0
  260. package/esm/map/slots/BubbleLayerTooltip.js.map +7 -0
  261. package/esm/map/slots/CategoricalLegend.js +16 -0
  262. package/esm/map/slots/CategoricalLegend.js.map +7 -0
  263. package/esm/map/slots/ChartInteractions.js +16 -0
  264. package/esm/map/slots/ChartInteractions.js.map +7 -0
  265. package/esm/map/slots/ChoroplethLayer.js +16 -0
  266. package/esm/map/slots/ChoroplethLayer.js.map +7 -0
  267. package/esm/map/slots/ChoroplethLayerTooltip.js +16 -0
  268. package/esm/map/slots/ChoroplethLayerTooltip.js.map +7 -0
  269. package/esm/map/slots/ConnectionLayer.js +16 -0
  270. package/esm/map/slots/ConnectionLayer.js.map +7 -0
  271. package/esm/map/slots/ConnectionLayerTooltip.js +16 -0
  272. package/esm/map/slots/ConnectionLayerTooltip.js.map +7 -0
  273. package/esm/map/slots/DotLayer.js +16 -0
  274. package/esm/map/slots/DotLayer.js.map +7 -0
  275. package/esm/map/slots/DotLayerTooltip.js +16 -0
  276. package/esm/map/slots/DotLayerTooltip.js.map +7 -0
  277. package/esm/map/slots/SequentialLegend.js +16 -0
  278. package/esm/map/slots/SequentialLegend.js.map +7 -0
  279. package/esm/map/slots/ThresholdLegend.js +16 -0
  280. package/esm/map/slots/ThresholdLegend.js.map +7 -0
  281. package/esm/map/slots/Tooltip.js +16 -0
  282. package/esm/map/slots/Tooltip.js.map +7 -0
  283. package/esm/map/slots/Zoom.js +16 -0
  284. package/esm/map/slots/Zoom.js.map +7 -0
  285. package/esm/map/slots/ZoomToFit.js +16 -0
  286. package/esm/map/slots/ZoomToFit.js.map +7 -0
  287. package/esm/map/slots/states/DisabledState.js +16 -0
  288. package/esm/map/slots/states/DisabledState.js.map +7 -0
  289. package/esm/map/slots/states/ErrorStateSlot.js +16 -0
  290. package/esm/map/slots/states/ErrorStateSlot.js.map +7 -0
  291. package/esm/map/sources/CN.js +16 -0
  292. package/esm/map/sources/CN.js.map +7 -0
  293. package/esm/map/sources/IL.js +16 -0
  294. package/esm/map/sources/IL.js.map +7 -0
  295. package/esm/map/sources/IN.js +16 -0
  296. package/esm/map/sources/IN.js.map +7 -0
  297. package/esm/map/sources/countries.js +16 -0
  298. package/esm/map/sources/countries.js.map +7 -0
  299. package/esm/map/store/map-store.context.js +16 -0
  300. package/esm/map/store/map-store.context.js.map +7 -0
  301. package/esm/map/store/map-store.provider.js +16 -0
  302. package/esm/map/store/map-store.provider.js.map +7 -0
  303. package/esm/map/store/selectors.js +16 -0
  304. package/esm/map/store/selectors.js.map +7 -0
  305. package/esm/map/store/store.js +16 -0
  306. package/esm/map/store/store.js.map +7 -0
  307. package/esm/map/styles/react-mapgl-styles.css +671 -0
  308. package/esm/map/types/bubble-layer.js +16 -0
  309. package/esm/map/types/bubble-layer.js.map +7 -0
  310. package/esm/map/types/choropleth-layer.js +16 -0
  311. package/esm/map/types/choropleth-layer.js.map +7 -0
  312. package/esm/map/types/coloring.js +16 -0
  313. package/esm/map/types/coloring.js.map +7 -0
  314. package/esm/map/types/configuration.js +16 -0
  315. package/esm/map/types/configuration.js.map +7 -0
  316. package/esm/map/types/connection-layer.js +16 -0
  317. package/esm/map/types/connection-layer.js.map +7 -0
  318. package/esm/map/types/dot-layer.js +16 -0
  319. package/esm/map/types/dot-layer.js.map +7 -0
  320. package/esm/map/types/legend.js +16 -0
  321. package/esm/map/types/legend.js.map +7 -0
  322. package/esm/map/types/location.js +16 -0
  323. package/esm/map/types/location.js.map +7 -0
  324. package/esm/map/types/map-view.js +16 -0
  325. package/esm/map/types/map-view.js.map +7 -0
  326. package/esm/map/types/shapes.js +16 -0
  327. package/esm/map/types/shapes.js.map +7 -0
  328. package/esm/map/types/state.js +16 -0
  329. package/esm/map/types/state.js.map +7 -0
  330. package/esm/map/types/toolbar.js +16 -0
  331. package/esm/map/types/toolbar.js.map +7 -0
  332. package/esm/map/types/tooltip.js +16 -0
  333. package/esm/map/types/tooltip.js.map +7 -0
  334. package/index.d.ts +37 -0
  335. package/index.js +15 -0
  336. package/map/MapView.d.ts +25 -0
  337. package/map/MapView.js +15 -0
  338. package/map/components/BubbleLayer/BubbleCircleLayer.d.ts +20 -0
  339. package/map/components/BubbleLayer/BubbleCircleLayer.js +15 -0
  340. package/map/components/BubbleLayer/BubbleLayer.d.ts +22 -0
  341. package/map/components/BubbleLayer/BubbleLayer.js +15 -0
  342. package/map/components/BubbleLayer/BubbleLayerTooltip.d.ts +26 -0
  343. package/map/components/BubbleLayer/BubbleLayerTooltip.js +15 -0
  344. package/map/components/BubbleLayer/BubbleOutlineLayer.d.ts +5 -0
  345. package/map/components/BubbleLayer/BubbleOutlineLayer.js +15 -0
  346. package/map/components/BubbleLayer/contexts/size-interpolation.context.d.ts +2 -0
  347. package/map/components/BubbleLayer/contexts/size-interpolation.context.js +15 -0
  348. package/map/components/BubbleLayer/functions/add-outline-size.d.ts +21 -0
  349. package/map/components/BubbleLayer/functions/add-outline-size.js +15 -0
  350. package/map/components/BubbleLayer/functions/build-radius-scale.d.ts +18 -0
  351. package/map/components/BubbleLayer/functions/build-radius-scale.js +15 -0
  352. package/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.d.ts +28 -0
  353. package/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js +15 -0
  354. package/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.d.ts +35 -0
  355. package/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js +15 -0
  356. package/map/components/BubbleLayer/hooks/use-size-interpolation.d.ts +1 -0
  357. package/map/components/BubbleLayer/hooks/use-size-interpolation.js +15 -0
  358. package/map/components/ChoroplethLayer.d.ts +21 -0
  359. package/map/components/ChoroplethLayer.js +15 -0
  360. package/map/components/ChoroplethLayerTooltip.d.ts +25 -0
  361. package/map/components/ChoroplethLayerTooltip.js +15 -0
  362. package/map/components/ConnectionLayer/ConnectionLayer.d.ts +22 -0
  363. package/map/components/ConnectionLayer/ConnectionLayer.js +15 -0
  364. package/map/components/ConnectionLayer/ConnectionLayerDirection.d.ts +26 -0
  365. package/map/components/ConnectionLayer/ConnectionLayerDirection.js +15 -0
  366. package/map/components/ConnectionLayer/ConnectionLayerTooltip.d.ts +26 -0
  367. package/map/components/ConnectionLayer/ConnectionLayerTooltip.js +15 -0
  368. package/map/components/ConnectionLayer/functions/get-arc-line-features.d.ts +18 -0
  369. package/map/components/ConnectionLayer/functions/get-arc-line-features.js +15 -0
  370. package/map/components/ConnectionLayer/functions/get-arrows-angles.d.ts +4 -0
  371. package/map/components/ConnectionLayer/functions/get-arrows-angles.js +15 -0
  372. package/map/components/ConnectionLayer/functions/get-straight-line-features.d.ts +18 -0
  373. package/map/components/ConnectionLayer/functions/get-straight-line-features.js +15 -0
  374. package/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.d.ts +18 -0
  375. package/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js +15 -0
  376. package/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.d.ts +7 -0
  377. package/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js +15 -0
  378. package/map/components/DefaultTooltip.d.ts +26 -0
  379. package/map/components/DefaultTooltip.js +15 -0
  380. package/map/components/DotLayer/BackgroundLayer.d.ts +25 -0
  381. package/map/components/DotLayer/BackgroundLayer.js +15 -0
  382. package/map/components/DotLayer/DotLayer.d.ts +25 -0
  383. package/map/components/DotLayer/DotLayer.js +15 -0
  384. package/map/components/DotLayer/DotLayerTooltip.d.ts +26 -0
  385. package/map/components/DotLayer/DotLayerTooltip.js +15 -0
  386. package/map/components/DotLayer/functions/calculate-circle-translate.d.ts +16 -0
  387. package/map/components/DotLayer/functions/calculate-circle-translate.js +15 -0
  388. package/map/components/DotLayer/functions/resolve-icon-background.d.ts +19 -0
  389. package/map/components/DotLayer/functions/resolve-icon-background.js +15 -0
  390. package/map/components/MapContent.d.ts +18 -0
  391. package/map/components/MapContent.js +15 -0
  392. package/map/components/legend/CategoricalLegendRenderer.d.ts +2 -0
  393. package/map/components/legend/CategoricalLegendRenderer.js +15 -0
  394. package/map/components/legend/MapLegendRenderer.d.ts +17 -0
  395. package/map/components/legend/MapLegendRenderer.js +15 -0
  396. package/map/components/legend/SequentialLegendRenderer.d.ts +17 -0
  397. package/map/components/legend/SequentialLegendRenderer.js +15 -0
  398. package/map/components/legend/ThresholdLegendRenderer.d.ts +17 -0
  399. package/map/components/legend/ThresholdLegendRenderer.js +15 -0
  400. package/map/components/legend/functions/resolve-color.d.ts +23 -0
  401. package/map/components/legend/functions/resolve-color.js +15 -0
  402. package/map/components/toolbar/MapToolbar.d.ts +20 -0
  403. package/map/components/toolbar/MapToolbar.js +15 -0
  404. package/map/components/toolbar/buttons/MapDownloadDataButton.d.ts +17 -0
  405. package/map/components/toolbar/buttons/MapDownloadDataButton.js +15 -0
  406. package/map/components/toolbar/buttons/MapResetButton.d.ts +17 -0
  407. package/map/components/toolbar/buttons/MapResetButton.js +15 -0
  408. package/map/components/toolbar/buttons/MapZoomInOutButtons.d.ts +17 -0
  409. package/map/components/toolbar/buttons/MapZoomInOutButtons.js +15 -0
  410. package/map/components/toolbar/buttons/MapZoomToFitButton.d.ts +20 -0
  411. package/map/components/toolbar/buttons/MapZoomToFitButton.js +15 -0
  412. package/map/components/toolbar/constants.d.ts +19 -0
  413. package/map/components/toolbar/constants.js +15 -0
  414. package/map/constants.d.ts +73 -0
  415. package/map/constants.js +15 -0
  416. package/map/contexts/a11y-toolbar-tab-index.context.d.ts +18 -0
  417. package/map/contexts/a11y-toolbar-tab-index.context.js +15 -0
  418. package/map/contexts/color-scale.context.d.ts +19 -0
  419. package/map/contexts/color-scale.context.js +15 -0
  420. package/map/contexts/layer-coloring-strategy.context.d.ts +2 -0
  421. package/map/contexts/layer-coloring-strategy.context.js +15 -0
  422. package/map/contexts/layer-ids.context.d.ts +17 -0
  423. package/map/contexts/layer-ids.context.js +15 -0
  424. package/map/contexts/map-configuration.context.d.ts +18 -0
  425. package/map/contexts/map-configuration.context.js +15 -0
  426. package/map/contexts/map-country-code.context.d.ts +17 -0
  427. package/map/contexts/map-country-code.context.js +15 -0
  428. package/map/contexts/map-data-bounding-box.context.d.ts +17 -0
  429. package/map/contexts/map-data-bounding-box.context.js +15 -0
  430. package/map/contexts/map-initial-view.context.d.ts +18 -0
  431. package/map/contexts/map-initial-view.context.js +15 -0
  432. package/map/contexts/map-raw-data.context.d.ts +17 -0
  433. package/map/contexts/map-raw-data.context.js +15 -0
  434. package/map/functions/__test__/fixtures/business-locations.d.ts +31 -0
  435. package/map/functions/__test__/fixtures/business-locations.js +15 -0
  436. package/map/functions/__test__/fixtures/connection-layer.d.ts +28 -0
  437. package/map/functions/__test__/fixtures/connection-layer.js +15 -0
  438. package/map/functions/__test__/fixtures/countries-stats.d.ts +31 -0
  439. package/map/functions/__test__/fixtures/countries-stats.js +15 -0
  440. package/map/functions/__test__/fixtures/csv-download-cases.d.ts +59 -0
  441. package/map/functions/__test__/fixtures/csv-download-cases.js +15 -0
  442. package/map/functions/__test__/fixtures/events-locations.d.ts +31 -0
  443. package/map/functions/__test__/fixtures/events-locations.js +15 -0
  444. package/map/functions/__test__/fixtures/facilities-locations.d.ts +40 -0
  445. package/map/functions/__test__/fixtures/facilities-locations.js +15 -0
  446. package/map/functions/__test__/fixtures/flight-connections.d.ts +26 -0
  447. package/map/functions/__test__/fixtures/flight-connections.js +15 -0
  448. package/map/functions/a11y-toolbar-controls.d.ts +22 -0
  449. package/map/functions/a11y-toolbar-controls.js +15 -0
  450. package/map/functions/attach-image-from-shape.d.ts +18 -0
  451. package/map/functions/attach-image-from-shape.js +15 -0
  452. package/map/functions/attach-image-from-string.d.ts +18 -0
  453. package/map/functions/attach-image-from-string.js +15 -0
  454. package/map/functions/attach-image-from-text.d.ts +17 -0
  455. package/map/functions/attach-image-from-text.js +15 -0
  456. package/map/functions/attach-image-to-map.d.ts +17 -0
  457. package/map/functions/attach-image-to-map.js +15 -0
  458. package/map/functions/build-and-download-csv.d.ts +6 -0
  459. package/map/functions/build-and-download-csv.js +15 -0
  460. package/map/functions/build-categorical-scale.d.ts +2 -0
  461. package/map/functions/build-categorical-scale.js +15 -0
  462. package/map/functions/build-scale-from-legend-config.d.ts +23 -0
  463. package/map/functions/build-scale-from-legend-config.js +15 -0
  464. package/map/functions/calculate-hovered-color.d.ts +1 -0
  465. package/map/functions/calculate-hovered-color.js +15 -0
  466. package/map/functions/create-bitmap-config-options.d.ts +16 -0
  467. package/map/functions/create-bitmap-config-options.js +15 -0
  468. package/map/functions/define-bearing.d.ts +17 -0
  469. package/map/functions/define-bearing.js +15 -0
  470. package/map/functions/define-color.d.ts +16 -0
  471. package/map/functions/define-color.js +15 -0
  472. package/map/functions/define-radius.d.ts +17 -0
  473. package/map/functions/define-radius.js +15 -0
  474. package/map/functions/extract-layers-data.d.ts +7 -0
  475. package/map/functions/extract-layers-data.js +15 -0
  476. package/map/functions/get-client-settings.d.ts +16 -0
  477. package/map/functions/get-client-settings.js +15 -0
  478. package/map/functions/get-color-from-token.d.ts +1 -0
  479. package/map/functions/get-color-from-token.js +15 -0
  480. package/map/functions/get-countries-geo-code.d.ts +16 -0
  481. package/map/functions/get-countries-geo-code.js +15 -0
  482. package/map/functions/get-data-layers-bounding-box.d.ts +17 -0
  483. package/map/functions/get-data-layers-bounding-box.js +15 -0
  484. package/map/functions/get-data-uri.d.ts +16 -0
  485. package/map/functions/get-data-uri.js +15 -0
  486. package/map/functions/get-map-states-template.d.ts +19 -0
  487. package/map/functions/get-map-states-template.js +15 -0
  488. package/map/functions/get-scaled-symbol-size.d.ts +17 -0
  489. package/map/functions/get-scaled-symbol-size.js +15 -0
  490. package/map/functions/get-tenant-country-code.d.ts +16 -0
  491. package/map/functions/get-tenant-country-code.js +15 -0
  492. package/map/functions/is-valid-shape.d.ts +18 -0
  493. package/map/functions/is-valid-shape.js +15 -0
  494. package/map/functions/iterate-config-slots.d.ts +23 -0
  495. package/map/functions/iterate-config-slots.js +15 -0
  496. package/map/functions/parse-dot-data-to-geo-json.d.ts +31 -0
  497. package/map/functions/parse-dot-data-to-geo-json.js +15 -0
  498. package/map/functions/parse-region-data-to-geo-json.d.ts +17 -0
  499. package/map/functions/parse-region-data-to-geo-json.js +15 -0
  500. package/map/functions/safe-reactdom-render.d.ts +22 -0
  501. package/map/functions/safe-reactdom-render.js +15 -0
  502. package/map/functions/set-layers-id.d.ts +25 -0
  503. package/map/functions/set-layers-id.js +15 -0
  504. package/map/functions/tabularize-layers-data.d.ts +27 -0
  505. package/map/functions/tabularize-layers-data.js +17 -0
  506. package/map/functions/to-mapbox-initial-view-state.d.ts +1 -0
  507. package/map/functions/to-mapbox-initial-view-state.js +15 -0
  508. package/map/functions/tooltip-type-guards.d.ts +32 -0
  509. package/map/functions/tooltip-type-guards.js +15 -0
  510. package/map/hooks/use-a11y-toolbar-tab-index.d.ts +22 -0
  511. package/map/hooks/use-a11y-toolbar-tab-index.js +15 -0
  512. package/map/hooks/use-active-interaction.d.ts +1 -0
  513. package/map/hooks/use-active-interaction.js +15 -0
  514. package/map/hooks/use-attach-image-from-icon.d.ts +18 -0
  515. package/map/hooks/use-attach-image-from-icon.js +15 -0
  516. package/map/hooks/use-attach-symbol-to-map.d.ts +18 -0
  517. package/map/hooks/use-attach-symbol-to-map.js +15 -0
  518. package/map/hooks/use-color-scale.d.ts +17 -0
  519. package/map/hooks/use-color-scale.js +15 -0
  520. package/map/hooks/use-connection-direction-interaction-highlighting.d.ts +1 -0
  521. package/map/hooks/use-connection-direction-interaction-highlighting.js +15 -0
  522. package/map/hooks/use-connection-interaction-highlighting.d.ts +1 -0
  523. package/map/hooks/use-connection-interaction-highlighting.js +15 -0
  524. package/map/hooks/use-data-bounding-box.d.ts +1 -0
  525. package/map/hooks/use-data-bounding-box.js +15 -0
  526. package/map/hooks/use-hover-interaction.d.ts +1 -0
  527. package/map/hooks/use-hover-interaction.js +15 -0
  528. package/map/hooks/use-initial-view-context.d.ts +1 -0
  529. package/map/hooks/use-initial-view-context.js +15 -0
  530. package/map/hooks/use-initial-view-state.d.ts +2 -0
  531. package/map/hooks/use-initial-view-state.js +15 -0
  532. package/map/hooks/use-layer-coloring-strategy.d.ts +1 -0
  533. package/map/hooks/use-layer-coloring-strategy.js +15 -0
  534. package/map/hooks/use-legend-interaction-highlighting.d.ts +5 -0
  535. package/map/hooks/use-legend-interaction-highlighting.js +15 -0
  536. package/map/hooks/use-legend-interaction-visibility.d.ts +5 -0
  537. package/map/hooks/use-legend-interaction-visibility.js +15 -0
  538. package/map/hooks/use-load-symbol-into-map.d.ts +21 -0
  539. package/map/hooks/use-load-symbol-into-map.js +15 -0
  540. package/map/hooks/use-map-config.d.ts +1 -0
  541. package/map/hooks/use-map-config.js +15 -0
  542. package/map/hooks/use-map-country-code.d.ts +1 -0
  543. package/map/hooks/use-map-country-code.js +15 -0
  544. package/map/hooks/use-map-raw-data.d.ts +1 -0
  545. package/map/hooks/use-map-raw-data.js +15 -0
  546. package/map/hooks/use-map-settings.d.ts +5 -0
  547. package/map/hooks/use-map-settings.js +15 -0
  548. package/map/hooks/use-map-source.d.ts +1 -0
  549. package/map/hooks/use-map-source.js +15 -0
  550. package/map/hooks/use-overlay-events.d.ts +24 -0
  551. package/map/hooks/use-overlay-events.js +15 -0
  552. package/map/hooks/use-resolve-color.d.ts +16 -0
  553. package/map/hooks/use-resolve-color.js +15 -0
  554. package/map/hooks/use-safe-svg-parser.d.ts +23 -0
  555. package/map/hooks/use-safe-svg-parser.js +15 -0
  556. package/map/hooks/use-tooltip-event-listeners.d.ts +16 -0
  557. package/map/hooks/use-tooltip-event-listeners.js +15 -0
  558. package/map/hooks/use-tooltip-template.d.ts +11 -0
  559. package/map/hooks/use-tooltip-template.js +15 -0
  560. package/map/hooks/useDefaultTooltipActions.d.ts +18 -0
  561. package/map/hooks/useDefaultTooltipActions.js +15 -0
  562. package/map/map-styles/default-style.d.ts +17 -0
  563. package/map/map-styles/default-style.js +15 -0
  564. package/map/providers/color-scale.provider.d.ts +15 -0
  565. package/map/providers/color-scale.provider.js +15 -0
  566. package/map/providers/layer-color-strategy.provider.d.ts +30 -0
  567. package/map/providers/layer-color-strategy.provider.js +15 -0
  568. package/map/providers/map-initial-view.provider.d.ts +28 -0
  569. package/map/providers/map-initial-view.provider.js +15 -0
  570. package/map/shapes/circle.d.ts +16 -0
  571. package/map/shapes/circle.js +32 -0
  572. package/map/shapes/cross.d.ts +16 -0
  573. package/map/shapes/cross.js +27 -0
  574. package/map/shapes/diamond.d.ts +16 -0
  575. package/map/shapes/diamond.js +20 -0
  576. package/map/shapes/heart.d.ts +16 -0
  577. package/map/shapes/heart.js +27 -0
  578. package/map/shapes/pin.d.ts +16 -0
  579. package/map/shapes/pin.js +21 -0
  580. package/map/shapes/shape-picker.d.ts +2 -0
  581. package/map/shapes/shape-picker.js +15 -0
  582. package/map/shapes/square.d.ts +16 -0
  583. package/map/shapes/square.js +18 -0
  584. package/map/shapes/star.d.ts +16 -0
  585. package/map/shapes/star.js +32 -0
  586. package/map/shapes/triangle.d.ts +16 -0
  587. package/map/shapes/triangle.js +27 -0
  588. package/map/slots/BubbleLayer.d.ts +31 -0
  589. package/map/slots/BubbleLayer.js +15 -0
  590. package/map/slots/BubbleLayerTooltip.d.ts +22 -0
  591. package/map/slots/BubbleLayerTooltip.js +15 -0
  592. package/map/slots/CategoricalLegend.d.ts +21 -0
  593. package/map/slots/CategoricalLegend.js +15 -0
  594. package/map/slots/ChartInteractions.d.ts +31 -0
  595. package/map/slots/ChartInteractions.js +15 -0
  596. package/map/slots/ChoroplethLayer.d.ts +31 -0
  597. package/map/slots/ChoroplethLayer.js +15 -0
  598. package/map/slots/ChoroplethLayerTooltip.d.ts +20 -0
  599. package/map/slots/ChoroplethLayerTooltip.js +15 -0
  600. package/map/slots/ConnectionLayer.d.ts +32 -0
  601. package/map/slots/ConnectionLayer.js +15 -0
  602. package/map/slots/ConnectionLayerTooltip.d.ts +21 -0
  603. package/map/slots/ConnectionLayerTooltip.js +15 -0
  604. package/map/slots/DotLayer.d.ts +33 -0
  605. package/map/slots/DotLayer.js +15 -0
  606. package/map/slots/DotLayerTooltip.d.ts +22 -0
  607. package/map/slots/DotLayerTooltip.js +15 -0
  608. package/map/slots/SequentialLegend.d.ts +21 -0
  609. package/map/slots/SequentialLegend.js +15 -0
  610. package/map/slots/ThresholdLegend.d.ts +21 -0
  611. package/map/slots/ThresholdLegend.js +15 -0
  612. package/map/slots/Tooltip.d.ts +29 -0
  613. package/map/slots/Tooltip.js +15 -0
  614. package/map/slots/Zoom.d.ts +22 -0
  615. package/map/slots/Zoom.js +15 -0
  616. package/map/slots/ZoomToFit.d.ts +22 -0
  617. package/map/slots/ZoomToFit.js +15 -0
  618. package/map/slots/states/DisabledState.d.ts +29 -0
  619. package/map/slots/states/DisabledState.js +15 -0
  620. package/map/slots/states/ErrorStateSlot.d.ts +20 -0
  621. package/map/slots/states/ErrorStateSlot.js +15 -0
  622. package/map/sources/CN.d.ts +16 -0
  623. package/map/sources/CN.js +15 -0
  624. package/map/sources/IL.d.ts +16 -0
  625. package/map/sources/IL.js +15 -0
  626. package/map/sources/IN.d.ts +16 -0
  627. package/map/sources/IN.js +15 -0
  628. package/map/sources/countries.d.ts +41 -0
  629. package/map/sources/countries.js +15 -0
  630. package/map/store/map-store.context.d.ts +20 -0
  631. package/map/store/map-store.context.js +15 -0
  632. package/map/store/map-store.provider.d.ts +17 -0
  633. package/map/store/map-store.provider.js +15 -0
  634. package/map/store/selectors.d.ts +30 -0
  635. package/map/store/selectors.js +15 -0
  636. package/map/store/store.d.ts +7 -0
  637. package/map/store/store.js +15 -0
  638. package/map/styles/react-mapgl-styles.css +671 -0
  639. package/map/types/bubble-layer.d.ts +85 -0
  640. package/map/types/bubble-layer.js +15 -0
  641. package/map/types/choropleth-layer.d.ts +40 -0
  642. package/map/types/choropleth-layer.js +15 -0
  643. package/map/types/coloring.d.ts +46 -0
  644. package/map/types/coloring.js +15 -0
  645. package/map/types/configuration.d.ts +25 -0
  646. package/map/types/configuration.js +15 -0
  647. package/map/types/connection-layer.d.ts +77 -0
  648. package/map/types/connection-layer.js +15 -0
  649. package/map/types/dot-layer.d.ts +62 -0
  650. package/map/types/dot-layer.js +15 -0
  651. package/map/types/legend.d.ts +85 -0
  652. package/map/types/legend.js +15 -0
  653. package/map/types/location.d.ts +22 -0
  654. package/map/types/location.js +15 -0
  655. package/map/types/map-view.d.ts +97 -0
  656. package/map/types/map-view.js +15 -0
  657. package/map/types/shapes.d.ts +18 -0
  658. package/map/types/shapes.js +15 -0
  659. package/map/types/state.d.ts +39 -0
  660. package/map/types/state.js +15 -0
  661. package/map/types/toolbar.d.ts +47 -0
  662. package/map/types/toolbar.js +15 -0
  663. package/map/types/tooltip.d.ts +77 -0
  664. package/map/types/tooltip.js +15 -0
  665. package/package.json +59 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/BubbleLayer/hooks/use-size-interpolation.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { useContext } from 'react';\n\nimport { SizeInterpolationContext } from '../contexts/size-interpolation.context.js';\n\nexport const useSizeInterpolation = () => useContext(SizeInterpolationContext);\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAS,cAAAA,MAAkB,QAE3B,OAAS,4BAAAC,MAAgC,4CAElC,MAAMC,EAAuB,IAAMF,EAAWC,CAAwB",
6
+ "names": ["useContext", "SizeInterpolationContext", "useSizeInterpolation"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import o from"react";import{Layer as l,Source as u}from"react-map-gl/maplibre";import{_getCanvasColor as a}from"@dynatrace/strato-components-preview/charts";import{useCurrentTheme as T}from"@dynatrace/strato-components-preview/core";import{ChoroplethLayerTooltip as d}from"./ChoroplethLayerTooltip.js";import{ACTIVE_COLOR as y,DEFAULT_CHOROPLETH_COLOR as L,DEFAULT_COUNTRIES_BORDER_COLOR as g,LEGEND_DIM_OPACITY as _,SHAPE_OPACITY as O,TRANSPARENT_BORDER_COLOR as I}from"../constants.js";import{parseRegionDataToGeoJSON as E}from"../functions/parse-region-data-to-geo-json.js";import{isChoroplethTooltipTemplate as S}from"../functions/tooltip-type-guards.js";import{useLayerColoringStrategy as P}from"../hooks/use-layer-coloring-strategy.js";import{useLegendInteractionHighlighting as A}from"../hooks/use-legend-interaction-highlighting.js";import{useLegendInteractionVisibility as R}from"../hooks/use-legend-interaction-visibility.js";import{useMapSource as v}from"../hooks/use-map-source.js";import{useResolveColor as D}from"../hooks/use-resolve-color.js";import{useTooltipTemplate as N}from"../hooks/use-tooltip-template.js";import{ChoroplethLayerTooltip as b}from"../slots/ChoroplethLayerTooltip.js";const H=r=>{const{layerId:t,data:n,regionAccessor:p,children:s}=r,m=v(),c=T(),h=P(),C=D(L,r,h),e=t.replace("layer","source");A(r,e),R(r,t);const f=E(m,n,p,C,c),i=N(s,b);return o.createElement(o.Fragment,null,o.createElement(u,{id:e,type:"geojson",data:f,generateId:!0},o.createElement(l,{id:t,type:"fill",source:e,paint:{"fill-color":["case",["boolean",["feature-state","active"],!1],["get","__color"],["boolean",["feature-state","hover"],!1],["get","__hoveredColor"],["get","__color"]],"fill-opacity":["case",["boolean",["feature-state","legendHover"],!0],O,_]}}),o.createElement(l,{type:"line",source:e,paint:{"line-color":a(g)}}),o.createElement(l,{type:"line",source:e,paint:{"line-color":["case",["boolean",["feature-state","active"],!1],a(y),a(I)]}})),o.createElement(d,{layerId:t,tooltipTemplate:S(i)?i:void 0}))};H.displayName="ChoroplethLayer";export{H as ChoroplethLayer};
16
+ //# sourceMappingURL=ChoroplethLayer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/map/components/ChoroplethLayer.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\nimport { useCurrentTheme } from '@dynatrace/strato-components-preview/core';\n\nimport { ChoroplethLayerTooltip } from './ChoroplethLayerTooltip.js';\nimport {\n ACTIVE_COLOR,\n DEFAULT_CHOROPLETH_COLOR,\n DEFAULT_COUNTRIES_BORDER_COLOR,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n TRANSPARENT_BORDER_COLOR,\n} from '../constants.js';\nimport { parseRegionDataToGeoJSON } from '../functions/parse-region-data-to-geo-json.js';\nimport { isChoroplethTooltipTemplate } from '../functions/tooltip-type-guards.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 { useMapSource } from '../hooks/use-map-source.js';\nimport { useResolveColor } from '../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../hooks/use-tooltip-template.js';\nimport { ChoroplethLayerTooltip as ChoroplethLayerTooltipSlot } from '../slots/ChoroplethLayerTooltip.js';\nimport { InternalChoroplethLayerProps } from '../types/choropleth-layer.js';\n\nexport const ChoroplethLayer = <T extends Record<string, unknown>>(\n props: PropsWithChildren<InternalChoroplethLayerProps<T>>,\n) => {\n const { layerId, data, regionAccessor, children } = props;\n\n const mapSource = useMapSource();\n const theme = useCurrentTheme();\n\n const colorParser = useLayerColoringStrategy();\n const choroplethColor = useResolveColor(\n DEFAULT_CHOROPLETH_COLOR,\n props,\n colorParser,\n );\n const sourceId = layerId.replace('layer', 'source');\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n const dataGeoJSON = parseRegionDataToGeoJSON(\n mapSource,\n data,\n regionAccessor,\n choroplethColor,\n theme,\n );\n\n const tooltipTemplate = useTooltipTemplate(\n children,\n ChoroplethLayerTooltipSlot,\n );\n\n return (\n <>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJSON} generateId>\n <Layer\n id={layerId}\n type=\"fill\"\n source={sourceId}\n paint={{\n 'fill-color': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n ['get', '__color'],\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'fill-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n }}\n />\n <Layer\n type=\"line\"\n source={sourceId}\n paint={{\n 'line-color': getCanvasColor(DEFAULT_COUNTRIES_BORDER_COLOR),\n }}\n />\n <Layer\n type=\"line\"\n source={sourceId}\n paint={{\n 'line-color': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n getCanvasColor(ACTIVE_COLOR),\n getCanvasColor(TRANSPARENT_BORDER_COLOR),\n ],\n }}\n />\n </Source>\n <ChoroplethLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isChoroplethTooltipTemplate(tooltipTemplate)\n ? tooltipTemplate\n : undefined\n }\n />\n </>\n );\n};\n\nChoroplethLayer['displayName'] = 'ChoroplethLayer';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,MAAkC,QACzC,OAAS,SAAAC,EAAO,UAAAC,MAAc,wBAE9B,OAAS,mBAAmBC,MAAsB,8CAClD,OAAS,mBAAAC,MAAuB,4CAEhC,OAAS,0BAAAC,MAA8B,8BACvC,OACE,gBAAAC,EACA,4BAAAC,EACA,kCAAAC,EACA,sBAAAC,EACA,iBAAAC,EACA,4BAAAC,MACK,kBACP,OAAS,4BAAAC,MAAgC,gDACzC,OAAS,+BAAAC,MAAmC,sCAC5C,OAAS,4BAAAC,MAAgC,0CACzC,OAAS,oCAAAC,MAAwC,kDACjD,OAAS,kCAAAC,MAAsC,gDAC/C,OAAS,gBAAAC,MAAoB,6BAC7B,OAAS,mBAAAC,MAAuB,gCAChC,OAAS,sBAAAC,MAA0B,mCACnC,OAAS,0BAA0BC,MAAkC,qCAG9D,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,KAAAC,EAAM,eAAAC,EAAgB,SAAAC,CAAS,EAAIJ,EAE9CK,EAAYV,EAAa,EACzBW,EAAQxB,EAAgB,EAExByB,EAAcf,EAAyB,EACvCgB,EAAkBZ,EACtBX,EACAe,EACAO,CACF,EACME,EAAWR,EAAQ,QAAQ,QAAS,QAAQ,EAClDR,EAAiCO,EAAOS,CAAQ,EAChDf,EAA+BM,EAAOC,CAAO,EAE7C,MAAMS,EAAcpB,EAClBe,EACAH,EACAC,EACAK,EACAF,CACF,EAEMK,EAAkBd,EACtBO,EACAN,CACF,EAEA,OACEpB,EAAA,cAAAA,EAAA,cACEA,EAAA,cAACE,EAAA,CAAO,GAAI6B,EAAU,KAAK,UAAU,KAAMC,EAAa,WAAU,IAChEhC,EAAA,cAACC,EAAA,CACC,GAAIsB,EACJ,KAAK,OACL,OAAQQ,EACR,MAAO,CACL,aAAc,CACZ,OACA,CAAC,UAAW,CAAC,gBAAiB,QAAQ,EAAG,EAAK,EAC9C,CAAC,MAAO,SAAS,EACjB,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7C,CAAC,MAAO,gBAAgB,EACxB,CAAC,MAAO,SAAS,CACnB,EACA,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,aAAa,EAAG,EAAI,EAClDrB,EACAD,CACF,CACF,EACF,EACAT,EAAA,cAACC,EAAA,CACC,KAAK,OACL,OAAQ8B,EACR,MAAO,CACL,aAAc5B,EAAeK,CAA8B,CAC7D,EACF,EACAR,EAAA,cAACC,EAAA,CACC,KAAK,OACL,OAAQ8B,EACR,MAAO,CACL,aAAc,CACZ,OACA,CAAC,UAAW,CAAC,gBAAiB,QAAQ,EAAG,EAAK,EAC9C5B,EAAeG,CAAY,EAC3BH,EAAeQ,CAAwB,CACzC,CACF,EACF,CACF,EACAX,EAAA,cAACK,EAAA,CACC,QAASkB,EACT,gBACEV,EAA4BoB,CAAe,EACvCA,EACA,OAER,CACF,CAEJ,EAEAZ,EAAgB,YAAiB",
6
+ "names": ["React", "Layer", "Source", "getCanvasColor", "useCurrentTheme", "ChoroplethLayerTooltip", "ACTIVE_COLOR", "DEFAULT_CHOROPLETH_COLOR", "DEFAULT_COUNTRIES_BORDER_COLOR", "LEGEND_DIM_OPACITY", "SHAPE_OPACITY", "TRANSPARENT_BORDER_COLOR", "parseRegionDataToGeoJSON", "isChoroplethTooltipTemplate", "useLayerColoringStrategy", "useLegendInteractionHighlighting", "useLegendInteractionVisibility", "useMapSource", "useResolveColor", "useTooltipTemplate", "ChoroplethLayerTooltipSlot", "ChoroplethLayer", "props", "layerId", "data", "regionAccessor", "children", "mapSource", "theme", "colorParser", "choroplethColor", "sourceId", "dataGeoJSON", "tooltipTemplate"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import f,{useRef as y}from"react";import{_ChartTooltip as L,_useChartActionsMenu as I}from"@dynatrace/strato-components-preview/charts";import{useMapTooltipPinnedState as M,useMapTooltipState as _}from"../store/selectors.js";const v=a=>{const{layerId:i,tooltipTemplate:e}=a,{selectedItem:l,actionsMenuRef:p,updateSelectedItem:s,onLeave:c}=I(),{hoveredLayerId:d,data:t,position:r,visible:T,enabled:h}=_(),o=M(),n=y({});if(!e||!o&&(d!==i||!T||!h)||!r)return null;if(!o&&t?.[0]){const{name:u,__color:m,__hoveredColor:x,...C}=t[0];n.current={data:C,name:u,color:m}}return f.createElement(L,{position:r,pinned:o,onMouseLeave:c,actionSelectionValue:{selectedItemId:l,actionsMenuRef:p,updateSelectedItem:s}},e(n.current))};v.displayName="ChoroplethLayerTooltip";export{v as ChoroplethLayerTooltip};
16
+ //# sourceMappingURL=ChoroplethLayerTooltip.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/map/components/ChoroplethLayerTooltip.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport 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 { ChoroplethLayerTooltipHandler } from '../types/tooltip.js';\n\nexport interface ChoroplethLayerTooltipProps<\n T extends Record<string, unknown>,\n> {\n layerId: string;\n tooltipTemplate?: ChoroplethLayerTooltipHandler<T>;\n}\n\nexport const ChoroplethLayerTooltip = <T extends Record<string, unknown>>(\n props: ChoroplethLayerTooltipProps<T>,\n) => {\n const { layerId, tooltipTemplate } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<T>();\n const pinned = useMapTooltipPinnedState();\n\n const regionData = useRef({});\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 {\n name,\n __color: color,\n __hoveredColor, // ignore private field\n ...customData\n } = data[0];\n regionData.current = { data: customData, name, color };\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {\n // @ts-expect-error -- to be removed after ADES-6836\n tooltipTemplate(regionData.current)\n }\n </ChartTooltip>\n );\n};\n\nChoroplethLayerTooltip['displayName'] = 'ChoroplethLayerTooltip';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,GAAS,UAAAC,MAAc,QAE9B,OACE,iBAAiBC,EACjB,wBAAwBC,MACnB,8CAEP,OACE,4BAAAC,EACA,sBAAAC,MACK,wBAUA,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,gBAAAC,CAAgB,EAAIF,EAC/B,CACJ,aAAcG,EACd,eAAAC,EACA,mBAAAC,EACA,QAAAC,CACF,EAAIV,EAAoB,EAElB,CAAE,eAAAW,EAAgB,KAAAC,EAAM,SAAAC,EAAU,QAAAC,EAAS,QAAAC,CAAQ,EACvDb,EAAsB,EAClBc,EAASf,EAAyB,EAElCgB,EAAanB,EAAO,CAAC,CAAC,EAK5B,GAAI,CAACQ,GAFH,CAACU,IAAWL,IAAmBN,GAAW,CAACS,GAAW,CAACC,IAEb,CAACF,EAC3C,OAAO,KAGT,GAAI,CAACG,GAAUJ,IAAO,CAAC,EAAG,CACxB,KAAM,CACJ,KAAAM,EACA,QAASC,EACT,eAAAC,EACA,GAAGC,CACL,EAAIT,EAAK,CAAC,EACVK,EAAW,QAAU,CAAE,KAAMI,EAAY,KAAAH,EAAM,MAAAC,CAAM,CACvD,CAEA,OACEtB,EAAA,cAACE,EAAA,CACC,SAAUc,EACV,OAAQG,EACR,aAAcN,EACd,qBAAsB,CACpB,eAAAH,EACA,eAAAC,EACA,mBAAAC,CACF,GAIEH,EAAgBW,EAAW,OAAO,CAEtC,CAEJ,EAEAd,EAAuB,YAAiB",
6
+ "names": ["React", "useRef", "ChartTooltip", "useChartActionsMenu", "useMapTooltipPinnedState", "useMapTooltipState", "ChoroplethLayerTooltip", "props", "layerId", "tooltipTemplate", "selectedItemId", "actionsMenuRef", "updateSelectedItem", "onLeave", "hoveredLayerId", "data", "position", "visible", "enabled", "pinned", "regionData", "name", "color", "__hoveredColor", "customData"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import o from"react";import{Layer as d,Source as y}from"react-map-gl/maplibre";import{useCurrentTheme as L}from"@dynatrace/strato-components-preview/core";import{ConnectionLayerDirection as T}from"./ConnectionLayerDirection.js";import{ConnectionLayerTooltip as f}from"./ConnectionLayerTooltip.js";import{parseConnectionDataToGeoJSON as C}from"./functions/parse-connection-data-to-geo-json.js";import{DEFAULT_LINE_CAP as u,DEFAULT_LINE_DASH_ARRAY as I,DEFAULT_LINE_JOIN as _}from"../../constants.js";import{isConnectionTooltipTemplate as h}from"../../functions/tooltip-type-guards.js";import{useTooltipTemplate as D}from"../../hooks/use-tooltip-template.js";import{ConnectionLayerTooltip as g}from"../../slots/ConnectionLayerTooltip.js";const A=a=>{const{data:l,layerId:e,curve:p,children:m,directionIndicator:n,line:t}=a,c=L(),s=`source-${e}`,r=C(l,c,p),i=D(m,g);return o.createElement(o.Fragment,null,o.createElement(y,{id:s,type:"geojson",data:r,generateId:!0},o.createElement(d,{type:"line",id:e,layout:{"line-cap":u,"line-join":_},paint:{"line-color":["case",["boolean",["feature-state","hover"],!1],["get","__lineHoveredColor"],["get","__lineColor"]],"line-width":["get","__lineWidth"],...t&&t==="dashed"?{"line-dasharray":I}:null}})),o.createElement(f,{layerId:e,tooltipTemplate:h(i)?i:void 0}),n&&o.createElement(T,{geoJsonData:r,layerId:e,directionIndicator:n}))};A.displayName="ConnectionLayer";export{A as ConnectionLayer};
16
+ //# sourceMappingURL=ConnectionLayer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/ConnectionLayer/ConnectionLayer.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { useCurrentTheme } from '@dynatrace/strato-components-preview/core';\n\nimport { ConnectionLayerDirection } from './ConnectionLayerDirection.js';\nimport { ConnectionLayerTooltip } from './ConnectionLayerTooltip.js';\nimport { parseConnectionDataToGeoJSON } from './functions/parse-connection-data-to-geo-json.js';\nimport {\n DEFAULT_LINE_CAP,\n DEFAULT_LINE_DASH_ARRAY,\n DEFAULT_LINE_JOIN,\n} from '../../constants.js';\nimport { isConnectionTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { ConnectionLayerTooltip as ConnectionLayerTooltipSlot } from '../../slots/ConnectionLayerTooltip.js';\nimport { InternalConnectionLayerProps } from '../../types/connection-layer.js';\nimport { Location } from '../../types/location.js';\n\nexport const ConnectionLayer = <T extends Location>(\n props: React.PropsWithChildren<InternalConnectionLayerProps<T>>,\n) => {\n const { data, layerId, curve, children, directionIndicator, line } = props;\n\n const theme = useCurrentTheme();\n\n const sourceId = `source-${layerId}`;\n\n const geoJsonData = parseConnectionDataToGeoJSON(data, theme, curve);\n\n const tooltipTemplate = useTooltipTemplate(\n children,\n ConnectionLayerTooltipSlot,\n );\n\n return (\n <>\n <Source id={sourceId} type=\"geojson\" data={geoJsonData} generateId>\n <Layer\n type=\"line\"\n id={layerId}\n layout={{\n 'line-cap': DEFAULT_LINE_CAP,\n 'line-join': DEFAULT_LINE_JOIN,\n }}\n paint={{\n 'line-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__lineHoveredColor'],\n ['get', '__lineColor'],\n ],\n 'line-width': ['get', '__lineWidth'],\n ...(line && line === 'dashed'\n ? { 'line-dasharray': DEFAULT_LINE_DASH_ARRAY }\n : null),\n }}\n />\n </Source>\n\n <ConnectionLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isConnectionTooltipTemplate(tooltipTemplate)\n ? tooltipTemplate\n : undefined\n }\n />\n\n {directionIndicator && (\n <ConnectionLayerDirection\n geoJsonData={geoJsonData}\n layerId={layerId}\n directionIndicator={directionIndicator}\n />\n )}\n </>\n );\n};\n\nConnectionLayer['displayName'] = 'ConnectionLayer';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,MAAW,QAClB,OAAS,SAAAC,EAAO,UAAAC,MAAc,wBAE9B,OAAS,mBAAAC,MAAuB,4CAEhC,OAAS,4BAAAC,MAAgC,gCACzC,OAAS,0BAAAC,MAA8B,8BACvC,OAAS,gCAAAC,MAAoC,mDAC7C,OACE,oBAAAC,EACA,2BAAAC,EACA,qBAAAC,MACK,qBACP,OAAS,+BAAAC,MAAmC,yCAC5C,OAAS,sBAAAC,MAA0B,sCACnC,OAAS,0BAA0BC,MAAkC,wCAI9D,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,KAAAC,EAAM,QAAAC,EAAS,MAAAC,EAAO,SAAAC,EAAU,mBAAAC,EAAoB,KAAAC,CAAK,EAAIN,EAE/DO,EAAQlB,EAAgB,EAExBmB,EAAW,UAAUN,CAAO,GAE5BO,EAAcjB,EAA6BS,EAAMM,EAAOJ,CAAK,EAE7DO,EAAkBb,EACtBO,EACAN,CACF,EAEA,OACEZ,EAAA,cAAAA,EAAA,cACEA,EAAA,cAACE,EAAA,CAAO,GAAIoB,EAAU,KAAK,UAAU,KAAMC,EAAa,WAAU,IAChEvB,EAAA,cAACC,EAAA,CACC,KAAK,OACL,GAAIe,EACJ,OAAQ,CACN,WAAYT,EACZ,YAAaE,CACf,EACA,MAAO,CACL,aAAc,CACZ,OACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7C,CAAC,MAAO,oBAAoB,EAC5B,CAAC,MAAO,aAAa,CACvB,EACA,aAAc,CAAC,MAAO,aAAa,EACnC,GAAIW,GAAQA,IAAS,SACjB,CAAE,iBAAkBZ,CAAwB,EAC5C,IACN,EACF,CACF,EAEAR,EAAA,cAACK,EAAA,CACC,QAASW,EACT,gBACEN,EAA4Bc,CAAe,EACvCA,EACA,OAER,EAECL,GACCnB,EAAA,cAACI,EAAA,CACC,YAAamB,EACb,QAASP,EACT,mBAAoBG,EACtB,CAEJ,CAEJ,EAEAN,EAAgB,YAAiB",
6
+ "names": ["React", "Layer", "Source", "useCurrentTheme", "ConnectionLayerDirection", "ConnectionLayerTooltip", "parseConnectionDataToGeoJSON", "DEFAULT_LINE_CAP", "DEFAULT_LINE_DASH_ARRAY", "DEFAULT_LINE_JOIN", "isConnectionTooltipTemplate", "useTooltipTemplate", "ConnectionLayerTooltipSlot", "ConnectionLayer", "props", "data", "layerId", "curve", "children", "directionIndicator", "line", "theme", "sourceId", "geoJsonData", "tooltipTemplate"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import e from"react";import{Layer as l,Source as m}from"react-map-gl";import{SorterIcon as p}from"@dynatrace/strato-icons";import{parseDirectionDataToGeoJSON as d}from"./functions/parse-direction-data-to-geo-json.js";import{DIRECTION_ICON_OUTPUT_SIZE as y,DIRECTION_ICON_SHRINK_RATIO as I}from"../../constants.js";import{useConnectionDirectionInteractionHighlighting as g}from"../../hooks/use-connection-direction-interaction-highlighting.js";import{useLoadSymbolIntoMap as _}from"../../hooks/use-load-symbol-into-map.js";const C=t=>{const{geoJsonData:i,layerId:o,directionIndicator:r}=t,{symbolName:a}=_(e.createElement(p,null),o,y),n=o.replace("layer","source"),c=d({geoJsonData:i,directionIndicator:r}),s=180;return g(o,n),e.createElement(m,{id:`${n}-direction`,type:"geojson",data:c,generateId:!0},e.createElement(l,{id:`${o}-direction`,type:"symbol",layout:{"symbol-placement":"point","icon-image":a,"icon-rotate":["+",["get","__angle"],s],"icon-rotation-alignment":"map","icon-allow-overlap":!0,"icon-ignore-placement":!0,"icon-size":["*",["get","__lineWidth"],I]},paint:{"icon-color":["case",["boolean",["feature-state","hover"],!1],["get","__lineHoveredColor"],["get","__lineColor"]],"icon-opacity":["get","__lineOpacity"]}}))};C.displayName="ConnectionLayerDirection";export{C as ConnectionLayerDirection};
16
+ //# sourceMappingURL=ConnectionLayerDirection.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/ConnectionLayer/ConnectionLayerDirection.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { Layer, Source } from 'react-map-gl';\n\nimport { SorterIcon } from '@dynatrace/strato-icons';\n\nimport { parseDirectionDataToGeoJSON } from './functions/parse-direction-data-to-geo-json.js';\nimport {\n DIRECTION_ICON_OUTPUT_SIZE,\n DIRECTION_ICON_SHRINK_RATIO,\n} from '../../constants.js';\nimport { useConnectionDirectionInteractionHighlighting } from '../../hooks/use-connection-direction-interaction-highlighting.js';\nimport { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport { InternalConnectionLayerProps } from '../../types/connection-layer.js';\nimport { Location } from '../../types/location.js';\n\ninterface ConnectionLayerDirectionProps<T extends Location>\n extends Required<\n Pick<InternalConnectionLayerProps<T>, 'layerId' | 'directionIndicator'>\n > {\n geoJsonData: GeoJSON.FeatureCollection;\n}\n\nexport const ConnectionLayerDirection = <T extends Location>(\n props: ConnectionLayerDirectionProps<T>,\n) => {\n const { geoJsonData, layerId, directionIndicator } = props;\n\n // To get an image with enough quality instead of creating a tiny pic\n // and enlarge it, we create a huge image to shrink it\n const { symbolName } = useLoadSymbolIntoMap(\n <SorterIcon />,\n layerId,\n DIRECTION_ICON_OUTPUT_SIZE,\n );\n\n const sourceId = layerId.replace('layer', 'source');\n\n const parsedGeoJsonData = parseDirectionDataToGeoJSON({\n geoJsonData,\n directionIndicator,\n });\n\n /**\n * This value is necessary due to the icon\n * that comes from the '@dynatrace/strato-icons'\n * SorterIcon points downwards, but it should point upwards\n * for the sake of the angle calculation.\n */\n const iconRotationDegrees = 180;\n\n useConnectionDirectionInteractionHighlighting(layerId, sourceId);\n\n return (\n <Source\n id={`${sourceId}-direction`}\n type=\"geojson\"\n data={parsedGeoJsonData}\n generateId\n >\n <Layer\n id={`${layerId}-direction`}\n type=\"symbol\"\n layout={{\n 'symbol-placement': 'point',\n 'icon-image': symbolName,\n 'icon-rotate': ['+', ['get', '__angle'], iconRotationDegrees],\n 'icon-rotation-alignment': 'map',\n 'icon-allow-overlap': true,\n 'icon-ignore-placement': true,\n 'icon-size': [\n '*',\n ['get', '__lineWidth'],\n DIRECTION_ICON_SHRINK_RATIO,\n ],\n }}\n paint={{\n 'icon-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__lineHoveredColor'],\n ['get', '__lineColor'],\n ],\n 'icon-opacity': ['get', '__lineOpacity'],\n }}\n />\n </Source>\n );\n};\n\nConnectionLayerDirection['displayName'] = 'ConnectionLayerDirection';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,MAAW,QAClB,OAAS,SAAAC,EAAO,UAAAC,MAAc,eAE9B,OAAS,cAAAC,MAAkB,0BAE3B,OAAS,+BAAAC,MAAmC,kDAC5C,OACE,8BAAAC,EACA,+BAAAC,MACK,qBACP,OAAS,iDAAAC,MAAqD,mEAC9D,OAAS,wBAAAC,MAA4B,0CAW9B,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,YAAAC,EAAa,QAAAC,EAAS,mBAAAC,CAAmB,EAAIH,EAI/C,CAAE,WAAAI,CAAW,EAAIN,EACrBR,EAAA,cAACG,EAAA,IAAW,EACZS,EACAP,CACF,EAEMU,EAAWH,EAAQ,QAAQ,QAAS,QAAQ,EAE5CI,EAAoBZ,EAA4B,CACpD,YAAAO,EACA,mBAAAE,CACF,CAAC,EAQKI,EAAsB,IAE5B,OAAAV,EAA8CK,EAASG,CAAQ,EAG7Df,EAAA,cAACE,EAAA,CACC,GAAI,GAAGa,CAAQ,aACf,KAAK,UACL,KAAMC,EACN,WAAU,IAEVhB,EAAA,cAACC,EAAA,CACC,GAAI,GAAGW,CAAO,aACd,KAAK,SACL,OAAQ,CACN,mBAAoB,QACpB,aAAcE,EACd,cAAe,CAAC,IAAK,CAAC,MAAO,SAAS,EAAGG,CAAmB,EAC5D,0BAA2B,MAC3B,qBAAsB,GACtB,wBAAyB,GACzB,YAAa,CACX,IACA,CAAC,MAAO,aAAa,EACrBX,CACF,CACF,EACA,MAAO,CACL,aAAc,CACZ,OACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7C,CAAC,MAAO,oBAAoB,EAC5B,CAAC,MAAO,aAAa,CACvB,EACA,eAAgB,CAAC,MAAO,eAAe,CACzC,EACF,CACF,CAEJ,EAEAG,EAAyB,YAAiB",
6
+ "names": ["React", "Layer", "Source", "SorterIcon", "parseDirectionDataToGeoJSON", "DIRECTION_ICON_OUTPUT_SIZE", "DIRECTION_ICON_SHRINK_RATIO", "useConnectionDirectionInteractionHighlighting", "useLoadSymbolIntoMap", "ConnectionLayerDirection", "props", "geoJsonData", "layerId", "directionIndicator", "symbolName", "sourceId", "parsedGeoJsonData", "iconRotationDegrees"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import u,{useRef as C}from"react";import{_ChartTooltip as f,_useChartActionsMenu as L}from"@dynatrace/strato-components-preview/charts";import{useMapTooltipPinnedState as y,useMapTooltipState as h}from"../../store/selectors.js";const I=r=>{const{layerId:a,tooltipTemplate:e}=r,{selectedItem:p,actionsMenuRef:c,updateSelectedItem:l,onLeave:s}=L(),{hoveredLayerId:d,data:t,position:n,visible:T,enabled:m}=h(),o=y(),i=C({path:[]});return!e||!o&&(d!==a||!T||!m)||!n?null:(!o&&t?.[0]&&(i.current=t[0]),u.createElement(f,{position:n,pinned:o,onMouseLeave:s,actionSelectionValue:{selectedItemId:p,actionsMenuRef:c,updateSelectedItem:l}},e(i.current)))};I.displayName="ConnectionLayerTooltip";export{I as ConnectionLayerTooltip};
16
+ //# sourceMappingURL=ConnectionLayerTooltip.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/ConnectionLayer/ConnectionLayerTooltip.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport 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 { Connection } from '../../types/connection-layer.js';\nimport { Location } from '../../types/location.js';\nimport { ConnectionLayerTooltipHandler } from '../../types/tooltip.js';\n\nexport interface ConnectionLayerTooltipProps<T extends Location> {\n layerId: string;\n tooltipTemplate?: ConnectionLayerTooltipHandler<T>;\n}\n\nexport const ConnectionLayerTooltip = <T extends Location>(\n props: ConnectionLayerTooltipProps<T>,\n) => {\n const { layerId, tooltipTemplate } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<Connection<T>>();\n const pinned = useMapTooltipPinnedState();\n\n const connectionData = useRef<Connection<T>>({\n path: [],\n });\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 connectionData.current = data[0];\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {tooltipTemplate(connectionData.current)}\n </ChartTooltip>\n );\n};\n\nConnectionLayerTooltip['displayName'] = 'ConnectionLayerTooltip';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,GAAS,UAAAC,MAAc,QAE9B,OACE,iBAAiBC,EACjB,wBAAwBC,MACnB,8CAEP,OACE,4BAAAC,EACA,sBAAAC,MACK,2BAUA,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,QAAAC,EAAS,gBAAAC,CAAgB,EAAIF,EAC/B,CACJ,aAAcG,EACd,eAAAC,EACA,mBAAAC,EACA,QAAAC,CACF,EAAIV,EAAoB,EAClB,CAAE,eAAAW,EAAgB,KAAAC,EAAM,SAAAC,EAAU,QAAAC,EAAS,QAAAC,CAAQ,EACvDb,EAAkC,EAC9Bc,EAASf,EAAyB,EAElCgB,EAAiBnB,EAAsB,CAC3C,KAAM,CAAC,CACT,CAAC,EAKD,MAAI,CAACQ,GAFH,CAACU,IAAWL,IAAmBN,GAAW,CAACS,GAAW,CAACC,IAEb,CAACF,EACpC,MAGL,CAACG,GAAUJ,IAAO,CAAC,IACrBK,EAAe,QAAUL,EAAK,CAAC,GAI/Bf,EAAA,cAACE,EAAA,CACC,SAAUc,EACV,OAAQG,EACR,aAAcN,EACd,qBAAsB,CACpB,eAAAH,EACA,eAAAC,EACA,mBAAAC,CACF,GAECH,EAAgBW,EAAe,OAAO,CACzC,EAEJ,EAEAd,EAAuB,YAAiB",
6
+ "names": ["React", "useRef", "ChartTooltip", "useChartActionsMenu", "useMapTooltipPinnedState", "useMapTooltipState", "ConnectionLayerTooltip", "props", "layerId", "tooltipTemplate", "selectedItemId", "actionsMenuRef", "updateSelectedItem", "onLeave", "hoveredLayerId", "data", "position", "visible", "enabled", "pinned", "connectionData"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import u from"@turf/bearing";import g from"@turf/destination";import d from"@turf/distance";import{lineString as f}from"@turf/helpers";import p from"@turf/length";import l from"@turf/line-arc";import S from"@turf/midpoint";import{toMercator as L,toWgs84 as F}from"@turf/projection";const G=e=>{const a=f(e),r=F(a),{geometry:{coordinates:[n,t]}}=r,i=p(r),s=S(n,t),c=u(n,t)+90,o=g(s,i,c),m=l(o,d(o,n),u(o,n),u(o,t),{steps:256});return L(m)},B=(e,a)=>{if(e.length<2)return[];const r=[];for(let t=0;t<e.length-1;t++){const i=e[t],s=e[t+1],c=[[i.longitude,i.latitude],[s.longitude,s.latitude]],o=G(c);r.push(...o.geometry.coordinates)}return[f(r,{...a})]};export{B as getArcLineFeatures};
16
+ //# sourceMappingURL=get-arc-line-features.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/ConnectionLayer/functions/get-arc-line-features.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport turfBearing from '@turf/bearing';\nimport turfDestination from '@turf/destination';\nimport turfDistance from '@turf/distance';\nimport { lineString as turfLineString } from '@turf/helpers';\nimport turfLineDistance from '@turf/length';\nimport turfLineArc from '@turf/line-arc';\nimport turfMidpoint from '@turf/midpoint';\nimport {\n toMercator as turfToMercator,\n toWgs84 as turfToWgs84,\n} from '@turf/projection';\n\nimport { FeatureProperties } from '../../../types/connection-layer.js';\nimport { Location } from '../../../types/location.js';\n\nconst getArcFeatureItem = (\n coordinates: GeoJSON.Position[],\n): GeoJSON.Feature<GeoJSON.LineString> => {\n const feature = turfLineString(coordinates);\n\n const parsedLineString = turfToWgs84(feature);\n\n const {\n geometry: {\n coordinates: [start, end],\n },\n } = parsedLineString;\n\n const lineDistance = turfLineDistance(parsedLineString);\n const midPoint = turfMidpoint(start, end);\n const bearing = turfBearing(start, end) + 90;\n const center = turfDestination(midPoint, lineDistance, bearing);\n\n const lineArc = turfLineArc(\n center,\n turfDistance(center, start),\n turfBearing(center, start),\n turfBearing(center, end),\n { steps: 256 },\n );\n\n return turfToMercator(lineArc);\n};\n\nexport const getArcLineFeatures = <T extends Location>(\n path: T[],\n featureProperties: FeatureProperties<T>,\n): GeoJSON.Feature<GeoJSON.LineString>[] => {\n if (path.length < 2) {\n return [];\n }\n\n const finalCoordinates: GeoJSON.Position[] = [];\n\n for (let i = 0; i < path.length - 1; i++) {\n const start = path[i];\n const end = path[i + 1];\n\n const coordinates: GeoJSON.Position[] = [\n [start.longitude, start.latitude],\n [end.longitude, end.latitude],\n ];\n\n const feature = getArcFeatureItem(coordinates);\n\n finalCoordinates.push(...feature.geometry.coordinates);\n }\n\n const finalFeature = turfLineString(finalCoordinates, {\n ...featureProperties,\n });\n\n return [finalFeature];\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,MAAiB,gBACxB,OAAOC,MAAqB,oBAC5B,OAAOC,MAAkB,iBACzB,OAAS,cAAcC,MAAsB,gBAC7C,OAAOC,MAAsB,eAC7B,OAAOC,MAAiB,iBACxB,OAAOC,MAAkB,iBACzB,OACE,cAAcC,EACd,WAAWC,MACN,mBAKP,MAAMC,EACJC,GACwC,CACxC,MAAMC,EAAUR,EAAeO,CAAW,EAEpCE,EAAmBJ,EAAYG,CAAO,EAEtC,CACJ,SAAU,CACR,YAAa,CAACE,EAAOC,CAAG,CAC1B,CACF,EAAIF,EAEEG,EAAeX,EAAiBQ,CAAgB,EAChDI,EAAWV,EAAaO,EAAOC,CAAG,EAClCG,EAAUjB,EAAYa,EAAOC,CAAG,EAAI,GACpCI,EAASjB,EAAgBe,EAAUD,EAAcE,CAAO,EAExDE,EAAUd,EACda,EACAhB,EAAagB,EAAQL,CAAK,EAC1Bb,EAAYkB,EAAQL,CAAK,EACzBb,EAAYkB,EAAQJ,CAAG,EACvB,CAAE,MAAO,GAAI,CACf,EAEA,OAAOP,EAAeY,CAAO,CAC/B,EAEaC,EAAqB,CAChCC,EACAC,IAC0C,CAC1C,GAAID,EAAK,OAAS,EAChB,MAAO,CAAC,EAGV,MAAME,EAAuC,CAAC,EAE9C,QAASC,EAAI,EAAGA,EAAIH,EAAK,OAAS,EAAGG,IAAK,CACxC,MAAMX,EAAQQ,EAAKG,CAAC,EACdV,EAAMO,EAAKG,EAAI,CAAC,EAEhBd,EAAkC,CACtC,CAACG,EAAM,UAAWA,EAAM,QAAQ,EAChC,CAACC,EAAI,UAAWA,EAAI,QAAQ,CAC9B,EAEMH,EAAUF,EAAkBC,CAAW,EAE7Ca,EAAiB,KAAK,GAAGZ,EAAQ,SAAS,WAAW,CACvD,CAMA,MAAO,CAJcR,EAAeoB,EAAkB,CACpD,GAAGD,CACL,CAAC,CAEmB,CACtB",
6
+ "names": ["turfBearing", "turfDestination", "turfDistance", "turfLineString", "turfLineDistance", "turfLineArc", "turfMidpoint", "turfToMercator", "turfToWgs84", "getArcFeatureItem", "coordinates", "feature", "parsedLineString", "start", "end", "lineDistance", "midPoint", "bearing", "center", "lineArc", "getArcLineFeatures", "path", "featureProperties", "finalCoordinates", "i"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import t from"@turf/rhumb-bearing";const l=r=>{if(r.length<2)return{startMarkerAngle:0,endMarkerAngle:0};const e=[r[0],r[1]],n=[r[r.length-2],r[r.length-1]];return{startMarkerAngle:t(e[1],e[0]),endMarkerAngle:t(n[0],n[1])}};export{l as getArrowsAngles};
16
+ //# sourceMappingURL=get-arrows-angles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/ConnectionLayer/functions/get-arrows-angles.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport rhumbBearing from '@turf/rhumb-bearing';\n\nexport const getArrowsAngles = (coordinates: number[][]) => {\n if (coordinates.length < 2) {\n return {\n startMarkerAngle: 0,\n endMarkerAngle: 0,\n };\n }\n\n const startArrowCoords = [coordinates[0], coordinates[1]];\n\n const endArrowCoords = [\n coordinates[coordinates.length - 2],\n coordinates[coordinates.length - 1],\n ];\n\n return {\n startMarkerAngle: rhumbBearing(startArrowCoords[1], startArrowCoords[0]),\n endMarkerAngle: rhumbBearing(endArrowCoords[0], endArrowCoords[1]),\n };\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,MAAkB,sBAElB,MAAMC,EAAmBC,GAA4B,CAC1D,GAAIA,EAAY,OAAS,EACvB,MAAO,CACL,iBAAkB,EAClB,eAAgB,CAClB,EAGF,MAAMC,EAAmB,CAACD,EAAY,CAAC,EAAGA,EAAY,CAAC,CAAC,EAElDE,EAAiB,CACrBF,EAAYA,EAAY,OAAS,CAAC,EAClCA,EAAYA,EAAY,OAAS,CAAC,CACpC,EAEA,MAAO,CACL,iBAAkBF,EAAaG,EAAiB,CAAC,EAAGA,EAAiB,CAAC,CAAC,EACvE,eAAgBH,EAAaI,EAAe,CAAC,EAAGA,EAAe,CAAC,CAAC,CACnE,CACF",
6
+ "names": ["rhumbBearing", "getArrowsAngles", "coordinates", "startArrowCoords", "endArrowCoords"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import{lineString as i}from"@turf/helpers";const f=(e,r)=>{const o=e.map(t=>[t.longitude,t.latitude]);return[i(o,{...r})]};export{f as getStraightLineFeatures};
16
+ //# sourceMappingURL=get-straight-line-features.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/ConnectionLayer/functions/get-straight-line-features.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { lineString as turfLineString } from '@turf/helpers';\n\nimport { FeatureProperties } from '../../../types/connection-layer.js';\nimport { Location } from '../../../types/location.js';\n\nexport const getStraightLineFeatures = <T extends Location>(\n path: T[],\n featureProperties: FeatureProperties<T>,\n): GeoJSON.Feature[] => {\n const coordinates = path.map((coord) => [coord.longitude, coord.latitude]);\n const feature = turfLineString(coordinates, {\n ...featureProperties,\n });\n\n return [feature];\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAS,cAAcA,MAAsB,gBAKtC,MAAMC,EAA0B,CACrCC,EACAC,IACsB,CACtB,MAAMC,EAAcF,EAAK,IAAKG,GAAU,CAACA,EAAM,UAAWA,EAAM,QAAQ,CAAC,EAKzE,MAAO,CAJSL,EAAeI,EAAa,CAC1C,GAAGD,CACL,CAAC,CAEc,CACjB",
6
+ "names": ["turfLineString", "getStraightLineFeatures", "path", "featureProperties", "coordinates", "coord"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import{featureCollection as m}from"@turf/helpers";import{_getCanvasColor as p}from"@dynatrace/strato-components-preview/charts";import{getArcLineFeatures as f}from"./get-arc-line-features.js";import{getStraightLineFeatures as T}from"./get-straight-line-features.js";import{DEFAULT_LINE_COLOR as L,DEFAULT_LINE_THICKNESS as _,MAX_LINE_THICKNESS as u,MIN_LINE_THICKNESS as C}from"../../../constants.js";import{calculateHoveredColor as d}from"../../../functions/calculate-hovered-color.js";const F=e=>e===void 0?_:e<C?C:e>u?u:e,v=(e,o)=>t=>{const{color:r,thickness:s,...a}=t,n=F(s),i=p(r||L),c=d(i);return{...a,__lineColor:i,__lineHoveredColor:c,__lineWidth:n,curve:o}},N=(e,o)=>o.curve==="smooth"?f(e,o):T(e,o),K=(e,o,t)=>{const r=m([]),s=v(o,t);return e.forEach(a=>{const{path:n,...i}=a,c=s({path:n,...i}),l=N(n,c);r.features.push(...l)}),r};export{K as parseConnectionDataToGeoJSON};
16
+ //# sourceMappingURL=parse-connection-data-to-geo-json.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { featureCollection as turfFeatureCollection } from '@turf/helpers';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\nimport { ThemeOptions } from '@dynatrace/strato-components-preview/core';\n\nimport { getArcLineFeatures } from './get-arc-line-features.js';\nimport { getStraightLineFeatures } from './get-straight-line-features.js';\nimport {\n DEFAULT_LINE_COLOR,\n DEFAULT_LINE_THICKNESS,\n MAX_LINE_THICKNESS,\n MIN_LINE_THICKNESS,\n} from '../../../constants.js';\nimport { calculateHoveredColor } from '../../../functions/calculate-hovered-color.js';\nimport {\n Connection,\n type CurvedLine,\n FeatureProperties,\n} from '../../../types/connection-layer.js';\nimport { Location } from '../../../types/location.js';\n\nconst getLineThickness = (thickness?: number): number => {\n if (thickness === undefined) {\n return DEFAULT_LINE_THICKNESS;\n }\n\n if (thickness < MIN_LINE_THICKNESS) {\n return MIN_LINE_THICKNESS;\n }\n\n if (thickness > MAX_LINE_THICKNESS) {\n return MAX_LINE_THICKNESS;\n }\n\n return thickness;\n};\n\nconst getFeatureProperties =\n (theme: ThemeOptions, curve?: CurvedLine) =>\n <T extends Location>(properties: Connection<T>): FeatureProperties<T> => {\n const { color, thickness, ...rest } = properties;\n\n const lineThickness = getLineThickness(thickness);\n const canvasColor = getCanvasColor(color || DEFAULT_LINE_COLOR);\n const hoveredColor = calculateHoveredColor(canvasColor);\n\n return {\n ...rest,\n __lineColor: canvasColor,\n __lineHoveredColor: hoveredColor,\n __lineWidth: lineThickness,\n curve,\n };\n };\n\nconst getFeatures = <T extends Location>(\n path: T[],\n featureProperties: FeatureProperties<T>,\n): GeoJSON.Feature[] => {\n const isCurve = featureProperties.curve === 'smooth';\n\n if (isCurve) {\n return getArcLineFeatures(path, featureProperties);\n }\n\n return getStraightLineFeatures(path, featureProperties);\n};\n\nexport const parseConnectionDataToGeoJSON = <T extends Location>(\n data: Connection<T>[],\n theme: 'dark' | 'light',\n curve?: CurvedLine,\n): GeoJSON.FeatureCollection => {\n const featuresCollection: GeoJSON.FeatureCollection = turfFeatureCollection(\n [],\n );\n\n const getProperties = getFeatureProperties(theme, curve);\n\n data.forEach((dataEntry) => {\n const { path, ...properties } = dataEntry;\n\n const featureProperties = getProperties({ path, ...properties });\n\n const features = getFeatures(path, featureProperties);\n\n featuresCollection.features.push(...features);\n });\n\n return featuresCollection;\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAS,qBAAqBA,MAA6B,gBAE3D,OAAS,mBAAmBC,MAAsB,8CAGlD,OAAS,sBAAAC,MAA0B,6BACnC,OAAS,2BAAAC,MAA+B,kCACxC,OACE,sBAAAC,EACA,0BAAAC,EACA,sBAAAC,EACA,sBAAAC,MACK,wBACP,OAAS,yBAAAC,MAA6B,gDAQtC,MAAMC,EAAoBC,GACpBA,IAAc,OACTL,EAGLK,EAAYH,EACPA,EAGLG,EAAYJ,EACPA,EAGFI,EAGHC,EACJ,CAACC,EAAqBC,IACDC,GAAoD,CACvE,KAAM,CAAE,MAAAC,EAAO,UAAAL,EAAW,GAAGM,CAAK,EAAIF,EAEhCG,EAAgBR,EAAiBC,CAAS,EAC1CQ,EAAcjB,EAAec,GAASX,CAAkB,EACxDe,EAAeX,EAAsBU,CAAW,EAEtD,MAAO,CACL,GAAGF,EACH,YAAaE,EACb,mBAAoBC,EACpB,YAAaF,EACb,MAAAJ,CACF,CACF,EAEIO,EAAc,CAClBC,EACAC,IAEgBA,EAAkB,QAAU,SAGnCpB,EAAmBmB,EAAMC,CAAiB,EAG5CnB,EAAwBkB,EAAMC,CAAiB,EAG3CC,EAA+B,CAC1CC,EACAZ,EACAC,IAC8B,CAC9B,MAAMY,EAAgDzB,EACpD,CAAC,CACH,EAEM0B,EAAgBf,EAAqBC,EAAOC,CAAK,EAEvD,OAAAW,EAAK,QAASG,GAAc,CAC1B,KAAM,CAAE,KAAAN,EAAM,GAAGP,CAAW,EAAIa,EAE1BL,EAAoBI,EAAc,CAAE,KAAAL,EAAM,GAAGP,CAAW,CAAC,EAEzDc,EAAWR,EAAYC,EAAMC,CAAiB,EAEpDG,EAAmB,SAAS,KAAK,GAAGG,CAAQ,CAC9C,CAAC,EAEMH,CACT",
6
+ "names": ["turfFeatureCollection", "getCanvasColor", "getArcLineFeatures", "getStraightLineFeatures", "DEFAULT_LINE_COLOR", "DEFAULT_LINE_THICKNESS", "MAX_LINE_THICKNESS", "MIN_LINE_THICKNESS", "calculateHoveredColor", "getLineThickness", "thickness", "getFeatureProperties", "theme", "curve", "properties", "color", "rest", "lineThickness", "canvasColor", "hoveredColor", "getFeatures", "path", "featureProperties", "parseConnectionDataToGeoJSON", "data", "featuresCollection", "getProperties", "dataEntry", "features"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import{point as l}from"@turf/helpers";import{getArrowsAngles as N}from"./get-arrows-angles.js";const u=(n,e,o)=>l(o,{...n.properties,__angle:e}),C=n=>{const{geoJsonData:e,directionIndicator:o}=n,s=[];for(let r=0;r<e.features.length;r++){const a=e.features[r],{coordinates:t}=a.geometry,{endMarkerAngle:d,startMarkerAngle:J}=N(t),S=o!=="end",G=o!=="start",p=t[0],g=t[t.length-1],i=S&&u(a,J,p),c=G&&u(a,d,g);s.push(...i?[i]:[],...c?[c]:[])}return{...e,features:s}};export{C as parseDirectionDataToGeoJSON};
16
+ //# sourceMappingURL=parse-direction-data-to-geo-json.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { point as turfPoint } from '@turf/helpers';\n\nimport { getArrowsAngles } from './get-arrows-angles.js';\nimport {\n GeoJSONFeature,\n InternalConnectionLayerProps,\n} from '../../../types/connection-layer.js';\nimport { Location } from '../../../types/location.js';\n\ninterface ParseGeoJsonDataProps<T extends Location>\n extends Required<\n Pick<InternalConnectionLayerProps<T>, 'directionIndicator'>\n > {\n geoJsonData: GeoJSON.FeatureCollection;\n}\n\nconst getConnectionGeoJSONFeature = <T extends Location>(\n feature: GeoJSONFeature<GeoJSON.LineString, T>,\n angle: number,\n coordinates: number[],\n): GeoJSONFeature<GeoJSON.Point, T> =>\n turfPoint(coordinates, { ...feature.properties, __angle: angle });\n\nexport const parseDirectionDataToGeoJSON = <T extends Location>(\n props: ParseGeoJsonDataProps<T>,\n): GeoJSON.FeatureCollection => {\n const { geoJsonData, directionIndicator } = props;\n\n const features: GeoJSONFeature<GeoJSON.Point, T>[] = [];\n\n for (let i = 0; i < geoJsonData.features.length; i++) {\n const feature = geoJsonData.features[i] as GeoJSONFeature<\n GeoJSON.LineString,\n T\n >;\n\n const { coordinates } = feature.geometry;\n\n const { endMarkerAngle, startMarkerAngle } = getArrowsAngles(coordinates);\n\n const showStartArrow = directionIndicator !== 'end';\n const showEndArrow = directionIndicator !== 'start';\n\n const startCoordinate = coordinates[0];\n const endCoordinate = coordinates[coordinates.length - 1];\n\n const startPoint =\n showStartArrow &&\n getConnectionGeoJSONFeature(feature, startMarkerAngle, startCoordinate);\n\n const endPoint =\n showEndArrow &&\n getConnectionGeoJSONFeature(feature, endMarkerAngle, endCoordinate);\n\n features.push(\n ...(startPoint ? [startPoint] : []),\n ...(endPoint ? [endPoint] : []),\n );\n }\n\n return {\n ...geoJsonData,\n features,\n };\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAS,SAASA,MAAiB,gBAEnC,OAAS,mBAAAC,MAAuB,yBAchC,MAAMC,EAA8B,CAClCC,EACAC,EACAC,IAEAL,EAAUK,EAAa,CAAE,GAAGF,EAAQ,WAAY,QAASC,CAAM,CAAC,EAErDE,EACXC,GAC8B,CAC9B,KAAM,CAAE,YAAAC,EAAa,mBAAAC,CAAmB,EAAIF,EAEtCG,EAA+C,CAAC,EAEtD,QAASC,EAAI,EAAGA,EAAIH,EAAY,SAAS,OAAQG,IAAK,CACpD,MAAMR,EAAUK,EAAY,SAASG,CAAC,EAKhC,CAAE,YAAAN,CAAY,EAAIF,EAAQ,SAE1B,CAAE,eAAAS,EAAgB,iBAAAC,CAAiB,EAAIZ,EAAgBI,CAAW,EAElES,EAAiBL,IAAuB,MACxCM,EAAeN,IAAuB,QAEtCO,EAAkBX,EAAY,CAAC,EAC/BY,EAAgBZ,EAAYA,EAAY,OAAS,CAAC,EAElDa,EACJJ,GACAZ,EAA4BC,EAASU,EAAkBG,CAAe,EAElEG,EACJJ,GACAb,EAA4BC,EAASS,EAAgBK,CAAa,EAEpEP,EAAS,KACP,GAAIQ,EAAa,CAACA,CAAU,EAAI,CAAC,EACjC,GAAIC,EAAW,CAACA,CAAQ,EAAI,CAAC,CAC/B,CACF,CAEA,MAAO,CACL,GAAGX,EACH,SAAAE,CACF,CACF",
6
+ "names": ["turfPoint", "getArrowsAngles", "getConnectionGeoJSONFeature", "feature", "angle", "coordinates", "parseDirectionDataToGeoJSON", "props", "geoJsonData", "directionIndicator", "features", "i", "endMarkerAngle", "startMarkerAngle", "showStartArrow", "showEndArrow", "startCoordinate", "endCoordinate", "startPoint", "endPoint"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import{isNil as n}from"lodash";import t from"react";import{_ChartTooltipAtoms as p,_ChartTooltipSlots as l,_GeoItem as m}from"@dynatrace/strato-components-preview/charts";import{isConnection as u,isRegion as T}from"../functions/tooltip-type-guards.js";import{useDefaultTooltipActions as f}from"../hooks/useDefaultTooltipActions.js";const d=r=>{const{closestPoint:o,layerData:e}=r;let a;const s=f(o);return T(o)?t.createElement(l.Body,null,t.createElement(l.Item,null,t.createElement(l.Symbol,null,t.createElement(p.SingleDataPoint,{color:o.color})),t.createElement(l.Content,null,o.name),o.value?t.createElement(l.Value,null,o.value):null)):(u(o)?a=o.path:a=n(e)||e.length===0?[o]:e,t.createElement(l.Body,null,a.map(i=>t.createElement(m,{key:`${i.latitude}-${i.longitude}`,latitude:i.latitude,longitude:i.longitude,actions:s}))))};d.displayName="DefaultTooltip";export{d as DefaultTooltip};
16
+ //# sourceMappingURL=DefaultTooltip.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/map/components/DefaultTooltip.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { isNil } from 'lodash';\nimport React from 'react';\n\nimport {\n _ChartTooltipAtoms as ChartTooltipAtoms,\n _ChartTooltipSlots as ChartTooltipSlots,\n _GeoItem as GeoItem,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { isConnection, isRegion } from '../functions/tooltip-type-guards.js';\nimport { useDefaultTooltipActions } from '../hooks/useDefaultTooltipActions.js';\nimport { Location } from '../types/location.js';\n\ninterface DefaultTooltipProps<T extends Location> {\n closestPoint: T;\n layerData?: T[];\n}\n\nexport const DefaultTooltip = <T extends Location>(\n props: DefaultTooltipProps<T>,\n) => {\n const { closestPoint, layerData } = props;\n let defaultTooltipData;\n\n const defaultActions = useDefaultTooltipActions(closestPoint);\n\n if (isRegion(closestPoint)) {\n // TODO consider extract a separate component for Chorolopleth (wait for all templates)\n return (\n // TODO ADES-6755 use the template for series item once available\n <ChartTooltipSlots.Body>\n <ChartTooltipSlots.Item>\n <ChartTooltipSlots.Symbol>\n <ChartTooltipAtoms.SingleDataPoint color={closestPoint['color']} />\n </ChartTooltipSlots.Symbol>\n <ChartTooltipSlots.Content>\n {closestPoint['name']}\n </ChartTooltipSlots.Content>\n {closestPoint['value'] ? (\n <ChartTooltipSlots.Value>\n {closestPoint['value']}\n </ChartTooltipSlots.Value>\n ) : null}\n </ChartTooltipSlots.Item>\n </ChartTooltipSlots.Body>\n );\n }\n if (isConnection(closestPoint)) {\n defaultTooltipData = closestPoint.path;\n } else {\n defaultTooltipData =\n isNil(layerData) || layerData.length === 0 ? [closestPoint] : layerData;\n }\n\n return (\n <ChartTooltipSlots.Body>\n {defaultTooltipData.map((pointData) => (\n <GeoItem\n key={`${pointData.latitude}-${pointData.longitude}`}\n latitude={pointData.latitude}\n longitude={pointData.longitude}\n actions={defaultActions}\n ></GeoItem>\n ))}\n </ChartTooltipSlots.Body>\n );\n};\n\nDefaultTooltip['displayName'] = 'DefaultTooltip';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAS,SAAAA,MAAa,SACtB,OAAOC,MAAW,QAElB,OACE,sBAAsBC,EACtB,sBAAsBC,EACtB,YAAYC,MACP,8CAEP,OAAS,gBAAAC,EAAc,YAAAC,MAAgB,sCACvC,OAAS,4BAAAC,MAAgC,uCAQlC,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,aAAAC,EAAc,UAAAC,CAAU,EAAIF,EACpC,IAAIG,EAEJ,MAAMC,EAAiBN,EAAyBG,CAAY,EAE5D,OAAIJ,EAASI,CAAY,EAIrBT,EAAA,cAACE,EAAkB,KAAlB,KACCF,EAAA,cAACE,EAAkB,KAAlB,KACCF,EAAA,cAACE,EAAkB,OAAlB,KACCF,EAAA,cAACC,EAAkB,gBAAlB,CAAkC,MAAOQ,EAAa,MAAU,CACnE,EACAT,EAAA,cAACE,EAAkB,QAAlB,KACEO,EAAa,IAChB,EACCA,EAAa,MACZT,EAAA,cAACE,EAAkB,MAAlB,KACEO,EAAa,KAChB,EACE,IACN,CACF,GAGAL,EAAaK,CAAY,EAC3BE,EAAqBF,EAAa,KAElCE,EACEZ,EAAMW,CAAS,GAAKA,EAAU,SAAW,EAAI,CAACD,CAAY,EAAIC,EAIhEV,EAAA,cAACE,EAAkB,KAAlB,KACES,EAAmB,IAAKE,GACvBb,EAAA,cAACG,EAAA,CACC,IAAK,GAAGU,EAAU,QAAQ,IAAIA,EAAU,SAAS,GACjD,SAAUA,EAAU,SACpB,UAAWA,EAAU,UACrB,QAASD,EACV,CACF,CACH,EAEJ,EAEAL,EAAe,YAAiB",
6
+ "names": ["isNil", "React", "ChartTooltipAtoms", "ChartTooltipSlots", "GeoItem", "isConnection", "isRegion", "useDefaultTooltipActions", "DefaultTooltip", "props", "closestPoint", "layerData", "defaultTooltipData", "defaultActions", "pointData"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import u from"react";import{Layer as d}from"react-map-gl";import{calculateCircleTranslate as f}from"./functions/calculate-circle-translate.js";import{resolveIconBackground as m}from"./functions/resolve-icon-background.js";import{BUBBLE_OUTLINE_STROKE as b,ICON_BACKGROUND_OPACITY as e}from"../../constants.js";import{calculateHoveredColor as p}from"../../functions/calculate-hovered-color.js";const y=c=>{const{background:a,beforeId:t,source:n,radius:o,iconAnchor:l}=c,r=m(a),s=p(r.color),i=f(l,o);return u.createElement(d,{type:"circle",beforeId:t,source:n,paint:{"circle-color":["case",["boolean",["feature-state","hover"],!1],s,r.color],"circle-radius":o,"circle-opacity":["case",["boolean",r.enabled,!1],e,["boolean",["feature-state","hover"],!1],e,0],"circle-stroke-width":["case",["boolean",["feature-state","active"],!1],b,0],"circle-translate":i}})};export{y as BackgroundLayer};
16
+ //# sourceMappingURL=BackgroundLayer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/DotLayer/BackgroundLayer.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport React from 'react';\nimport { Layer } from 'react-map-gl';\n\nimport { calculateCircleTranslate } from './functions/calculate-circle-translate.js';\nimport { resolveIconBackground } from './functions/resolve-icon-background.js';\nimport {\n BUBBLE_OUTLINE_STROKE,\n ICON_BACKGROUND_OPACITY,\n} from '../../constants.js';\nimport { calculateHoveredColor } from '../../functions/calculate-hovered-color.js';\n\ninterface BackgroundLayerProps {\n background: boolean | string;\n beforeId: string;\n source: string;\n radius: number;\n iconAnchor: 'bottom' | 'center';\n}\n\nexport const BackgroundLayer = (props: BackgroundLayerProps) => {\n const { background, beforeId, source, radius, iconAnchor } = props;\n\n const iconBackground = resolveIconBackground(background);\n\n const hoveredColor = calculateHoveredColor(iconBackground.color);\n\n const circleTranslate = calculateCircleTranslate(iconAnchor, radius);\n\n return (\n <Layer\n type=\"circle\"\n beforeId={beforeId}\n source={source}\n paint={{\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n hoveredColor,\n iconBackground.color,\n ],\n 'circle-radius': radius,\n 'circle-opacity': [\n 'case',\n ['boolean', iconBackground.enabled, false],\n ICON_BACKGROUND_OPACITY,\n ['boolean', ['feature-state', 'hover'], false],\n ICON_BACKGROUND_OPACITY,\n 0,\n ],\n 'circle-stroke-width': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n BUBBLE_OUTLINE_STROKE,\n 0,\n ],\n 'circle-translate': circleTranslate,\n }}\n />\n );\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeA,OAAOA,MAAW,QAClB,OAAS,SAAAC,MAAa,eAEtB,OAAS,4BAAAC,MAAgC,4CACzC,OAAS,yBAAAC,MAA6B,yCACtC,OACE,yBAAAC,EACA,2BAAAC,MACK,qBACP,OAAS,yBAAAC,MAA6B,6CAU/B,MAAMC,EAAmBC,GAAgC,CAC9D,KAAM,CAAE,WAAAC,EAAY,SAAAC,EAAU,OAAAC,EAAQ,OAAAC,EAAQ,WAAAC,CAAW,EAAIL,EAEvDM,EAAiBX,EAAsBM,CAAU,EAEjDM,EAAeT,EAAsBQ,EAAe,KAAK,EAEzDE,EAAkBd,EAAyBW,EAAYD,CAAM,EAEnE,OACEZ,EAAA,cAACC,EAAA,CACC,KAAK,SACL,SAAUS,EACV,OAAQC,EACR,MAAO,CACL,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7CI,EACAD,EAAe,KACjB,EACA,gBAAiBF,EACjB,iBAAkB,CAChB,OACA,CAAC,UAAWE,EAAe,QAAS,EAAK,EACzCT,EACA,CAAC,UAAW,CAAC,gBAAiB,OAAO,EAAG,EAAK,EAC7CA,EACA,CACF,EACA,sBAAuB,CACrB,OACA,CAAC,UAAW,CAAC,gBAAiB,QAAQ,EAAG,EAAK,EAC9CD,EACA,CACF,EACA,mBAAoBY,CACtB,EACF,CAEJ",
6
+ "names": ["React", "Layer", "calculateCircleTranslate", "resolveIconBackground", "BUBBLE_OUTLINE_STROKE", "ICON_BACKGROUND_OPACITY", "calculateHoveredColor", "BackgroundLayer", "props", "background", "beforeId", "source", "radius", "iconAnchor", "iconBackground", "hoveredColor", "circleTranslate"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import e from"react";import{Layer as g,Source as I}from"react-map-gl/maplibre";import{BackgroundLayer as D}from"./BackgroundLayer.js";import{DotLayerTooltip as _}from"./DotLayerTooltip.js";import{DEFAULT_ICON_COLOR as h,DEFAULT_ICON_SIZE_RATIO as b,DEFAULT_SHAPE_COLOR as S,DEFAULT_SYMBOL_SIZE as C,LEGEND_DIM_OPACITY as A,SHAPE_OPACITY as O}from"../../constants.js";import{parseDotDataToGeoJSON as E}from"../../functions/parse-dot-data-to-geo-json.js";import{isDotTooltipTemplate as P}from"../../functions/tooltip-type-guards.js";import{useLayerColoringStrategy as N}from"../../hooks/use-layer-coloring-strategy.js";import{useLegendInteractionHighlighting as F}from"../../hooks/use-legend-interaction-highlighting.js";import{useLegendInteractionVisibility as H}from"../../hooks/use-legend-interaction-visibility.js";import{useLoadSymbolIntoMap as U}from"../../hooks/use-load-symbol-into-map.js";import{useResolveColor as k}from"../../hooks/use-resolve-color.js";import{useTooltipTemplate as G}from"../../hooks/use-tooltip-template.js";import{DotLayerTooltip as M}from"../../slots/DotLayerTooltip.js";const Y=r=>{const{data:l,layerId:o,bearing:s=0,children:p,shape:i="circle",background:c=!1,shapeSize:n=C}=r,{symbolName:d,symbolType:y}=U(i,o,n),L=y==="shape"?S:h,u=N(),f=k(L,r,u),a=G(p,M),t=`source-${o}`;F(r,t),H(r,o);const T=E(l,f,s),m=i==="pin"?"bottom":"center";return e.createElement(e.Fragment,null,e.createElement(I,{id:t,type:"geojson",data:T,generateId:!0},e.createElement(g,{type:"symbol",id:o,layout:{"icon-image":d,"icon-size":b,"icon-rotate":["get","__bearing"],"icon-ignore-placement":!0,"icon-anchor":m},paint:{"icon-color":["get","__color"],"icon-opacity":["case",["boolean",["feature-state","legendHover"],!0],O,A]}}),e.createElement(D,{background:c,beforeId:o,source:t,radius:n/2,iconAnchor:m})),e.createElement(_,{layerId:o,tooltipTemplate:P(a)?a:void 0}))};Y.displayName="DotLayer";export{Y as DotLayer};
16
+ //# sourceMappingURL=DotLayer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/DotLayer/DotLayer.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { BackgroundLayer } from './BackgroundLayer.js';\nimport { DotLayerTooltip } from './DotLayerTooltip.js';\nimport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE_RATIO,\n DEFAULT_SHAPE_COLOR,\n DEFAULT_SYMBOL_SIZE,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n} from '../../constants.js';\nimport { parseDotDataToGeoJSON } from '../../functions/parse-dot-data-to-geo-json.js';\nimport { isDotTooltipTemplate } from '../../functions/tooltip-type-guards.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 { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport { useResolveColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { DotLayerTooltip as DotLayerTooltipSlot } from '../../slots/DotLayerTooltip.js';\nimport { InternalDotLayerProps } from '../../types/dot-layer.js';\nimport { Location } from '../../types/location.js';\n\n/**\n * DotLayer Component\n */\nexport const DotLayer = <T extends Location>(\n props: PropsWithChildren<InternalDotLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n bearing = 0,\n children,\n shape = 'circle',\n background = false,\n shapeSize = DEFAULT_SYMBOL_SIZE,\n } = props;\n\n const { symbolName, symbolType } = useLoadSymbolIntoMap(\n shape,\n layerId,\n shapeSize,\n );\n\n const defaultSymbolColor =\n symbolType === 'shape' ? DEFAULT_SHAPE_COLOR : DEFAULT_ICON_COLOR;\n\n const colorParser = useLayerColoringStrategy();\n const shapeColor = useResolveColor(defaultSymbolColor, props, colorParser);\n\n const tooltipTemplate = useTooltipTemplate(children, DotLayerTooltipSlot);\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n const dataGeoJson = parseDotDataToGeoJSON(data, shapeColor, bearing);\n\n const iconAnchor = shape === 'pin' ? 'bottom' : 'center';\n\n return (\n <>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <Layer\n type=\"symbol\"\n id={layerId}\n layout={{\n 'icon-image': symbolName,\n 'icon-size': DEFAULT_ICON_SIZE_RATIO,\n 'icon-rotate': ['get', '__bearing'],\n // https://maplibre.org/maplibre-style-spec/layers/#layout-symbol-icon-ignore-placement\n 'icon-ignore-placement': true,\n 'icon-anchor': iconAnchor,\n }}\n paint={{\n 'icon-color': ['get', '__color'],\n 'icon-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n }}\n />\n <BackgroundLayer\n background={background}\n beforeId={layerId}\n source={sourceId}\n radius={shapeSize / 2}\n iconAnchor={iconAnchor}\n />\n </Source>\n\n <DotLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isDotTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nDotLayer['displayName'] = 'DotLayer';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,MAAkC,QACzC,OAAS,SAAAC,EAAO,UAAAC,MAAc,wBAE9B,OAAS,mBAAAC,MAAuB,uBAChC,OAAS,mBAAAC,MAAuB,uBAChC,OACE,sBAAAC,EACA,2BAAAC,EACA,uBAAAC,EACA,uBAAAC,EACA,sBAAAC,EACA,iBAAAC,MACK,qBACP,OAAS,yBAAAC,MAA6B,gDACtC,OAAS,wBAAAC,MAA4B,yCACrC,OAAS,4BAAAC,MAAgC,6CACzC,OAAS,oCAAAC,MAAwC,qDACjD,OAAS,kCAAAC,MAAsC,mDAC/C,OAAS,wBAAAC,MAA4B,0CACrC,OAAS,mBAAAC,MAAuB,mCAChC,OAAS,sBAAAC,MAA0B,sCACnC,OAAS,mBAAmBC,MAA2B,iCAOhD,MAAMC,EACXC,GACG,CACH,KAAM,CACJ,KAAAC,EACA,QAAAC,EACA,QAAAC,EAAU,EACV,SAAAC,EACA,MAAAC,EAAQ,SACR,WAAAC,EAAa,GACb,UAAAC,EAAYpB,CACd,EAAIa,EAEE,CAAE,WAAAQ,EAAY,WAAAC,CAAW,EAAId,EACjCU,EACAH,EACAK,CACF,EAEMG,EACJD,IAAe,QAAUvB,EAAsBF,EAE3C2B,EAAcnB,EAAyB,EACvCoB,EAAahB,EAAgBc,EAAoBV,EAAOW,CAAW,EAEnEE,EAAkBhB,EAAmBO,EAAUN,CAAmB,EAElEgB,EAAW,UAAUZ,CAAO,GAClCT,EAAiCO,EAAOc,CAAQ,EAChDpB,EAA+BM,EAAOE,CAAO,EAE7C,MAAMa,EAAczB,EAAsBW,EAAMW,EAAYT,CAAO,EAE7Da,EAAaX,IAAU,MAAQ,SAAW,SAEhD,OACE1B,EAAA,cAAAA,EAAA,cACEA,EAAA,cAACE,EAAA,CAAO,GAAIiC,EAAU,KAAK,UAAU,KAAMC,EAAa,WAAU,IAChEpC,EAAA,cAACC,EAAA,CACC,KAAK,SACL,GAAIsB,EACJ,OAAQ,CACN,aAAcM,EACd,YAAavB,EACb,cAAe,CAAC,MAAO,WAAW,EAElC,wBAAyB,GACzB,cAAe+B,CACjB,EACA,MAAO,CACL,aAAc,CAAC,MAAO,SAAS,EAC/B,eAAgB,CACd,OACA,CAAC,UAAW,CAAC,gBAAiB,aAAa,EAAG,EAAI,EAClD3B,EACAD,CACF,CACF,EACF,EACAT,EAAA,cAACG,EAAA,CACC,WAAYwB,EACZ,SAAUJ,EACV,OAAQY,EACR,OAAQP,EAAY,EACpB,WAAYS,EACd,CACF,EAEArC,EAAA,cAACI,EAAA,CACC,QAASmB,EACT,gBACEX,EAAqBsB,CAAe,EAAIA,EAAkB,OAE9D,CACF,CAEJ,EAEAd,EAAS,YAAiB",
6
+ "names": ["React", "Layer", "Source", "BackgroundLayer", "DotLayerTooltip", "DEFAULT_ICON_COLOR", "DEFAULT_ICON_SIZE_RATIO", "DEFAULT_SHAPE_COLOR", "DEFAULT_SYMBOL_SIZE", "LEGEND_DIM_OPACITY", "SHAPE_OPACITY", "parseDotDataToGeoJSON", "isDotTooltipTemplate", "useLayerColoringStrategy", "useLegendInteractionHighlighting", "useLegendInteractionVisibility", "useLoadSymbolIntoMap", "useResolveColor", "useTooltipTemplate", "DotLayerTooltipSlot", "DotLayer", "props", "data", "layerId", "bearing", "children", "shape", "background", "shapeSize", "symbolName", "symbolType", "defaultSymbolColor", "colorParser", "shapeColor", "tooltipTemplate", "sourceId", "dataGeoJson", "iconAnchor"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import u,{useRef as f}from"react";import{_ChartTooltip as L,_useChartActionsMenu as y}from"@dynatrace/strato-components-preview/charts";import{useMapTooltipPinnedState as D,useMapTooltipState as I}from"../../store/selectors.js";const h=a=>{const{tooltipTemplate:t,layerId:n}=a,{selectedItem:p,actionsMenuRef:l,updateSelectedItem:s,onLeave:c}=y(),{hoveredLayerId:d,data:e,position:i,visible:T,enabled:m}=I(),o=D(),r=f({});return!t||!o&&(d!==n||!T||!m)||!i?null:(!o&&e?.[0]&&(r.current=e[0]),u.createElement(L,{position:i,pinned:o,onMouseLeave:c,actionSelectionValue:{selectedItemId:p,actionsMenuRef:l,updateSelectedItem:s}},t(r.current)))};h.displayName="DotLayerTooltip";export{h as DotLayerTooltip};
16
+ //# sourceMappingURL=DotLayerTooltip.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/map/components/DotLayer/DotLayerTooltip.tsx"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport 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 { Location } from '../../types/location.js';\nimport { DotLayerTooltipHandler } from '../../types/tooltip.js';\n\nexport interface DotLayerTooltipProps<T extends Location> {\n layerId: string;\n tooltipTemplate?: DotLayerTooltipHandler<T>;\n}\n\nexport const DotLayerTooltip = <T extends Location>(\n props: DotLayerTooltipProps<T>,\n) => {\n const { tooltipTemplate, layerId } = props;\n const {\n selectedItem: selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n onLeave,\n } = useChartActionsMenu();\n\n const { hoveredLayerId, data, position, visible, enabled } =\n useMapTooltipState<T>();\n const pinned = useMapTooltipPinnedState();\n\n const dotData = useRef<T>({} as T);\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 dotData.current = data[0];\n }\n\n return (\n <ChartTooltip\n position={position}\n pinned={pinned}\n onMouseLeave={onLeave}\n actionSelectionValue={{\n selectedItemId,\n actionsMenuRef,\n updateSelectedItem,\n }}\n >\n {tooltipTemplate(dotData.current)}\n </ChartTooltip>\n );\n};\n\nDotLayerTooltip['displayName'] = 'DotLayerTooltip';\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAgBA,OAAOA,GAAS,UAAAC,MAAc,QAE9B,OACE,iBAAiBC,EACjB,wBAAwBC,MACnB,8CAEP,OACE,4BAAAC,EACA,sBAAAC,MACK,2BASA,MAAMC,EACXC,GACG,CACH,KAAM,CAAE,gBAAAC,EAAiB,QAAAC,CAAQ,EAAIF,EAC/B,CACJ,aAAcG,EACd,eAAAC,EACA,mBAAAC,EACA,QAAAC,CACF,EAAIV,EAAoB,EAElB,CAAE,eAAAW,EAAgB,KAAAC,EAAM,SAAAC,EAAU,QAAAC,EAAS,QAAAC,CAAQ,EACvDb,EAAsB,EAClBc,EAASf,EAAyB,EAElCgB,EAAUnB,EAAU,CAAC,CAAM,EAKjC,MAAI,CAACO,GAFH,CAACW,IAAWL,IAAmBL,GAAW,CAACQ,GAAW,CAACC,IAEb,CAACF,EACpC,MAGL,CAACG,GAAUJ,IAAO,CAAC,IACrBK,EAAQ,QAAUL,EAAK,CAAC,GAIxBf,EAAA,cAACE,EAAA,CACC,SAAUc,EACV,OAAQG,EACR,aAAcN,EACd,qBAAsB,CACpB,eAAAH,EACA,eAAAC,EACA,mBAAAC,CACF,GAECJ,EAAgBY,EAAQ,OAAO,CAClC,EAEJ,EAEAd,EAAgB,YAAiB",
6
+ "names": ["React", "useRef", "ChartTooltip", "useChartActionsMenu", "useMapTooltipPinnedState", "useMapTooltipState", "DotLayerTooltip", "props", "tooltipTemplate", "layerId", "selectedItemId", "actionsMenuRef", "updateSelectedItem", "onLeave", "hoveredLayerId", "data", "position", "visible", "enabled", "pinned", "dotData"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */const r=(t,e)=>t==="bottom"?[0,-(e/2)]:[0,0];export{r as calculateCircleTranslate};
16
+ //# sourceMappingURL=calculate-circle-translate.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../../src/map/components/DotLayer/functions/calculate-circle-translate.ts"],
4
+ "sourcesContent": ["/**\n * @license\n * Copyright 2023 Dynatrace LLC\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const calculateCircleTranslate = (\n iconAnchor: 'bottom' | 'center',\n radius: number,\n): [number, number] => {\n if (iconAnchor === 'bottom') {\n const offsetTop = radius / 2;\n\n return [0, -offsetTop];\n }\n\n return [0, 0];\n};\n"],
5
+ "mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAeO,MAAMA,EAA2B,CACtCC,EACAC,IAEID,IAAe,SAGV,CAAC,EAAG,EAFOC,EAAS,EAEN,EAGhB,CAAC,EAAG,CAAC",
6
+ "names": ["calculateCircleTranslate", "iconAnchor", "radius"]
7
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2023 Dynatrace LLC
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */import{_getCanvasColor as r}from"@dynatrace/strato-components-preview/charts";import{DEFAULT_ICON_BACKGROUND_COLOR as e}from"../../../constants.js";const l=o=>typeof o=="string"?{enabled:!0,color:r(o,e)}:{enabled:o,color:r(e)};export{l as resolveIconBackground};
16
+ //# sourceMappingURL=resolve-icon-background.js.map