@dynatrace/strato-geo 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (166) hide show
  1. package/esm/map/MapView.js +4 -1
  2. package/esm/map/MapView.js.map +2 -2
  3. package/esm/map/components/BaseLayerDataError.js +1 -1
  4. package/esm/map/components/BaseLayerDataError.js.map +1 -1
  5. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js +4 -2
  6. package/esm/map/components/BubbleLayer/BubbleCircleLayer.js.map +2 -2
  7. package/esm/map/components/BubbleLayer/BubbleLayer.js +10 -1
  8. package/esm/map/components/BubbleLayer/BubbleLayer.js.map +2 -2
  9. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js +1 -1
  10. package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js.map +1 -1
  11. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js +1 -1
  12. package/esm/map/components/BubbleLayer/BubbleOutlineLayer.js.map +1 -1
  13. package/esm/map/components/BubbleLayer/utils/parse-bubble-data-to-geo-json.js +1 -1
  14. package/esm/map/components/BubbleLayer/utils/parse-bubble-data-to-geo-json.js.map +1 -1
  15. package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js +4 -1
  16. package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js.map +2 -2
  17. package/esm/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js +1 -1
  18. package/esm/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js.map +1 -1
  19. package/esm/map/components/ChoroplethLayer/ChoroplethOutlineLayer.js +1 -1
  20. package/esm/map/components/ChoroplethLayer/ChoroplethOutlineLayer.js.map +1 -1
  21. package/esm/map/components/ChoroplethLayer/utils/parse-region-data-to-geo-json.js +2 -2
  22. package/esm/map/components/ChoroplethLayer/utils/parse-region-data-to-geo-json.js.map +1 -1
  23. package/esm/map/components/ConnectionLayer/ConnectionLayer.js +3 -0
  24. package/esm/map/components/ConnectionLayer/ConnectionLayer.js.map +2 -2
  25. package/esm/map/components/ConnectionLayer/ConnectionLayerLine.js +6 -3
  26. package/esm/map/components/ConnectionLayer/ConnectionLayerLine.js.map +2 -2
  27. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js +1 -1
  28. package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js.map +2 -2
  29. package/esm/map/components/ConnectionLayer/utils/parse-connection-data-to-geo-json.js +1 -1
  30. package/esm/map/components/ConnectionLayer/utils/parse-connection-data-to-geo-json.js.map +1 -1
  31. package/esm/map/components/ConnectionLayer/utils/restore-null-props.js.map +1 -1
  32. package/esm/map/components/DefaultTooltip/DefaultTooltip.js +1 -1
  33. package/esm/map/components/DefaultTooltip/DefaultTooltip.js.map +1 -1
  34. package/esm/map/components/DefaultTooltip/utils/get-default-actions.js +1 -1
  35. package/esm/map/components/DefaultTooltip/utils/get-default-actions.js.map +1 -1
  36. package/esm/map/components/DotLayer/DotLayer.js +4 -1
  37. package/esm/map/components/DotLayer/DotLayer.js.map +2 -2
  38. package/esm/map/components/DotLayer/DotLayerTooltip.js +1 -1
  39. package/esm/map/components/DotLayer/DotLayerTooltip.js.map +1 -1
  40. package/esm/map/components/DotLayer/utils/parse-dot-data-to-geo-json.js +1 -1
  41. package/esm/map/components/DotLayer/utils/parse-dot-data-to-geo-json.js.map +1 -1
  42. package/esm/map/components/DotLayer/utils/resolve-icon-background.js +1 -1
  43. package/esm/map/components/DotLayer/utils/resolve-icon-background.js.map +1 -1
  44. package/esm/map/components/MapContent.js +2 -2
  45. package/esm/map/components/MapContent.js.map +1 -1
  46. package/esm/map/components/legend/CategoricalLegendRenderer.js +1 -1
  47. package/esm/map/components/legend/CategoricalLegendRenderer.js.map +1 -1
  48. package/esm/map/components/legend/SequentialLegendRenderer.js +1 -1
  49. package/esm/map/components/legend/SequentialLegendRenderer.js.map +1 -1
  50. package/esm/map/components/legend/ThresholdLegendRenderer.js +1 -1
  51. package/esm/map/components/legend/ThresholdLegendRenderer.js.map +1 -1
  52. package/esm/map/components/toolbar/MapToolbar.js +1 -1
  53. package/esm/map/components/toolbar/MapToolbar.js.map +1 -1
  54. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js +1 -1
  55. package/esm/map/components/toolbar/buttons/MapDownloadDataButton.js.map +1 -1
  56. package/esm/map/components/toolbar/buttons/MapResetButton.js +1 -1
  57. package/esm/map/components/toolbar/buttons/MapResetButton.js.map +1 -1
  58. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js +1 -1
  59. package/esm/map/components/toolbar/buttons/MapZoomInOutButtons.js.map +1 -1
  60. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js +1 -1
  61. package/esm/map/components/toolbar/buttons/MapZoomToFitButton.js.map +1 -1
  62. package/esm/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.js +1 -1
  63. package/esm/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.js.map +1 -1
  64. package/esm/map/contexts/formatter.context.js.map +1 -1
  65. package/esm/map/hooks/use-formatter-context.js.map +1 -1
  66. package/esm/map/hooks/use-resolve-color.js +1 -1
  67. package/esm/map/hooks/use-resolve-color.js.map +2 -2
  68. package/esm/map/index.js.map +1 -1
  69. package/esm/map/slots/Tooltip.js +1 -1
  70. package/esm/map/slots/Tooltip.js.map +1 -1
  71. package/esm/map/slots/states/DisabledState.js +1 -1
  72. package/esm/map/slots/states/DisabledState.js.map +1 -1
  73. package/esm/map/store/map-store.context.js +1 -3
  74. package/esm/map/store/map-store.context.js.map +2 -2
  75. package/esm/map/store/map-store.provider.js +1 -3
  76. package/esm/map/store/map-store.provider.js.map +2 -2
  77. package/esm/map/store/selectors.js +1 -3
  78. package/esm/map/store/selectors.js.map +2 -2
  79. package/esm/map/types/bubble-layer.js.map +2 -2
  80. package/esm/map/types/coloring.js.map +2 -2
  81. package/esm/map/utils/attach-image-from-string.js +1 -1
  82. package/esm/map/utils/attach-image-from-string.js.map +1 -1
  83. package/esm/map/utils/build-and-download-csv.js +2 -2
  84. package/esm/map/utils/build-and-download-csv.js.map +1 -1
  85. package/esm/map/utils/build-categorical-scale.js.map +1 -1
  86. package/esm/map/utils/build-scale-from-legend-config.js +1 -1
  87. package/esm/map/utils/build-scale-from-legend-config.js.map +1 -1
  88. package/esm/map/utils/calculate-hovered-color.js +1 -1
  89. package/esm/map/utils/calculate-hovered-color.js.map +1 -1
  90. package/esm/map/utils/create-categorical-color-scheme-from-legend-props.js +1 -1
  91. package/esm/map/utils/create-categorical-color-scheme-from-legend-props.js.map +1 -1
  92. package/esm/map/utils/get-data-layers-bounding-box.js +1 -1
  93. package/esm/map/utils/get-data-layers-bounding-box.js.map +1 -1
  94. package/esm/map/utils/iterate-config-slots.js +1 -1
  95. package/esm/map/utils/iterate-config-slots.js.map +1 -1
  96. package/esm/map/utils/replace-infinite-values-in-ranges.js.map +1 -1
  97. package/esm/map/utils/tabularize-layers-data.js +1 -1
  98. package/esm/map/utils/tabularize-layers-data.js.map +1 -1
  99. package/map/MapView.js +4 -1
  100. package/map/components/BaseLayerDataError.js +1 -1
  101. package/map/components/BubbleLayer/BubbleCircleLayer.d.ts +3 -2
  102. package/map/components/BubbleLayer/BubbleCircleLayer.js +4 -2
  103. package/map/components/BubbleLayer/BubbleLayer.js +10 -1
  104. package/map/components/BubbleLayer/BubbleLayerTooltip.js +1 -1
  105. package/map/components/BubbleLayer/BubbleOutlineLayer.js +1 -1
  106. package/map/components/BubbleLayer/utils/parse-bubble-data-to-geo-json.js +1 -1
  107. package/map/components/ChoroplethLayer/ChoroplethLayer.js +4 -1
  108. package/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js +1 -1
  109. package/map/components/ChoroplethLayer/ChoroplethOutlineLayer.js +1 -1
  110. package/map/components/ChoroplethLayer/utils/parse-region-data-to-geo-json.js +2 -2
  111. package/map/components/ConnectionLayer/ConnectionLayer.js +3 -0
  112. package/map/components/ConnectionLayer/ConnectionLayerLine.js +6 -3
  113. package/map/components/ConnectionLayer/ConnectionLayerTooltip.d.ts +0 -7
  114. package/map/components/ConnectionLayer/ConnectionLayerTooltip.js +1 -1
  115. package/map/components/ConnectionLayer/utils/parse-connection-data-to-geo-json.js +1 -1
  116. package/map/components/ConnectionLayer/utils/restore-null-props.d.ts +1 -1
  117. package/map/components/DefaultTooltip/DefaultTooltip.js +1 -1
  118. package/map/components/DefaultTooltip/utils/get-default-actions.js +1 -1
  119. package/map/components/DotLayer/DotLayer.js +4 -1
  120. package/map/components/DotLayer/DotLayerTooltip.js +1 -1
  121. package/map/components/DotLayer/utils/parse-dot-data-to-geo-json.js +1 -1
  122. package/map/components/DotLayer/utils/resolve-icon-background.js +1 -1
  123. package/map/components/MapContent.js +2 -2
  124. package/map/components/legend/CategoricalLegendRenderer.js +1 -1
  125. package/map/components/legend/SequentialLegendRenderer.js +1 -1
  126. package/map/components/legend/ThresholdLegendRenderer.js +1 -1
  127. package/map/components/toolbar/MapToolbar.js +1 -1
  128. package/map/components/toolbar/buttons/MapDownloadDataButton.js +1 -1
  129. package/map/components/toolbar/buttons/MapResetButton.js +1 -1
  130. package/map/components/toolbar/buttons/MapZoomInOutButtons.js +1 -1
  131. package/map/components/toolbar/buttons/MapZoomToFitButton.js +1 -1
  132. package/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.js +1 -1
  133. package/map/contexts/formatter.context.d.ts +1 -1
  134. package/map/hooks/use-formatter-context.d.ts +1 -1
  135. package/map/hooks/use-resolve-color.d.ts +2 -2
  136. package/map/hooks/use-resolve-color.js +1 -1
  137. package/map/index.d.ts +2 -2
  138. package/map/slots/Tooltip.d.ts +1 -1
  139. package/map/slots/Tooltip.js +1 -1
  140. package/map/slots/states/DisabledState.js +1 -1
  141. package/map/store/map-store.context.d.ts +1 -1
  142. package/map/store/map-store.context.js +1 -1
  143. package/map/store/map-store.provider.js +1 -1
  144. package/map/store/selectors.js +1 -1
  145. package/map/types/bubble-layer.d.ts +2 -1
  146. package/map/types/choropleth-layer.d.ts +2 -1
  147. package/map/types/coloring.d.ts +0 -13
  148. package/map/types/connection-layer.d.ts +22 -2
  149. package/map/types/dot-layer.d.ts +2 -1
  150. package/map/types/legend.d.ts +1 -1
  151. package/map/types/map-view.d.ts +3 -3
  152. package/map/types/state.d.ts +1 -1
  153. package/map/types/toolbar.d.ts +1 -1
  154. package/map/types/tooltip.d.ts +1 -1
  155. package/map/utils/attach-image-from-string.js +1 -1
  156. package/map/utils/build-and-download-csv.js +2 -2
  157. package/map/utils/build-categorical-scale.d.ts +1 -1
  158. package/map/utils/build-scale-from-legend-config.js +1 -1
  159. package/map/utils/calculate-hovered-color.js +1 -1
  160. package/map/utils/create-categorical-color-scheme-from-legend-props.d.ts +1 -1
  161. package/map/utils/create-categorical-color-scheme-from-legend-props.js +1 -1
  162. package/map/utils/get-data-layers-bounding-box.js +1 -1
  163. package/map/utils/iterate-config-slots.js +1 -1
  164. package/map/utils/replace-infinite-values-in-ranges.d.ts +1 -1
  165. package/map/utils/tabularize-layers-data.js +1 -1
  166. package/package.json +5 -6
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/map/components/toolbar/buttons/MapZoomToFitButton.tsx"],
4
- "sourcesContent": ["import { useMap } from '@vis.gl/react-maplibre';\nimport { useRef, type KeyboardEvent as ReactKeyboardEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { _ChartToolbarRenderer as ChartToolbarRenderer } from '@dynatrace/strato-components-preview/charts';\nimport { ZoomToFitIcon } from '@dynatrace/strato-icons';\n\nimport { FIT_BOUNDS_OPTIONS } from '../../../constants.js';\nimport { useDataBoundingBox } from '../../../hooks/use-data-bounding-box.js';\nimport { useMapZoomState, useSetStateZoom } from '../../../store/store.js';\nimport { TOOLBAR_MESSAGES } from '../constants.js';\nimport { useA11yToolbarTabIndex } from '../hooks/use-a11y-toolbar-tab-index.js';\n\nexport const MapZoomToFitButton = () => {\n const resetButtonRef = useRef<HTMLButtonElement | null>(null);\n const { current: map } = useMap();\n const tabIndex = useA11yToolbarTabIndex('zoom-to-fit');\n const intl = useIntl();\n const boundingBox = useDataBoundingBox();\n const { zoomToFitEnabled } = useMapZoomState();\n const setZoomState = useSetStateZoom();\n const handleZoomToFit = () => {\n map?.fitBounds(boundingBox, FIT_BOUNDS_OPTIONS);\n setZoomState({ zoomToFitEnabled: false, zoomToFitInProgress: true });\n };\n\n const handleKeyDown = (event: ReactKeyboardEvent) => {\n if (event.code === 'Enter') {\n handleZoomToFit();\n }\n };\n\n return (\n <ChartToolbarRenderer.Control\n ref={resetButtonRef}\n prefixIcon={<ZoomToFitIcon />}\n tooltipText={intl.formatMessage(TOOLBAR_MESSAGES.zoomActionZoomToFit)}\n testId=\"map-toolbar-zoom-to-fit\"\n onKeyDown={handleKeyDown}\n onClick={handleZoomToFit}\n tabIndex={tabIndex}\n disabled={!zoomToFitEnabled}\n />\n );\n};\n\nMapZoomToFitButton['displayName'] = 'MapZoomToFit';\n"],
4
+ "sourcesContent": ["import { useMap } from '@vis.gl/react-maplibre';\nimport { useRef, type KeyboardEvent as ReactKeyboardEvent } from 'react';\nimport { useIntl } from 'react-intl';\n\nimport { _ChartToolbarRenderer as ChartToolbarRenderer } from '@dynatrace/strato-components/charts';\nimport { ZoomToFitIcon } from '@dynatrace/strato-icons';\n\nimport { FIT_BOUNDS_OPTIONS } from '../../../constants.js';\nimport { useDataBoundingBox } from '../../../hooks/use-data-bounding-box.js';\nimport { useMapZoomState, useSetStateZoom } from '../../../store/store.js';\nimport { TOOLBAR_MESSAGES } from '../constants.js';\nimport { useA11yToolbarTabIndex } from '../hooks/use-a11y-toolbar-tab-index.js';\n\nexport const MapZoomToFitButton = () => {\n const resetButtonRef = useRef<HTMLButtonElement | null>(null);\n const { current: map } = useMap();\n const tabIndex = useA11yToolbarTabIndex('zoom-to-fit');\n const intl = useIntl();\n const boundingBox = useDataBoundingBox();\n const { zoomToFitEnabled } = useMapZoomState();\n const setZoomState = useSetStateZoom();\n const handleZoomToFit = () => {\n map?.fitBounds(boundingBox, FIT_BOUNDS_OPTIONS);\n setZoomState({ zoomToFitEnabled: false, zoomToFitInProgress: true });\n };\n\n const handleKeyDown = (event: ReactKeyboardEvent) => {\n if (event.code === 'Enter') {\n handleZoomToFit();\n }\n };\n\n return (\n <ChartToolbarRenderer.Control\n ref={resetButtonRef}\n prefixIcon={<ZoomToFitIcon />}\n tooltipText={intl.formatMessage(TOOLBAR_MESSAGES.zoomActionZoomToFit)}\n testId=\"map-toolbar-zoom-to-fit\"\n onKeyDown={handleKeyDown}\n onClick={handleZoomToFit}\n tabIndex={tabIndex}\n disabled={!zoomToFitEnabled}\n />\n );\n};\n\nMapZoomToFitButton['displayName'] = 'MapZoomToFit';\n"],
5
5
  "mappings": "AAmCkB;AAnClB,SAAS,cAAc;AACvB,SAAS,cAAwD;AACjE,SAAS,eAAe;AAExB,SAAS,yBAAyB,4BAA4B;AAC9D,SAAS,qBAAqB;AAE9B,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB,uBAAuB;AACjD,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AAEhC,MAAM,qBAAqB,MAAM;AACtC,QAAM,iBAAiB,OAAiC,IAAI;AAC5D,QAAM,EAAE,SAAS,IAAI,IAAI,OAAO;AAChC,QAAM,WAAW,uBAAuB,aAAa;AACrD,QAAM,OAAO,QAAQ;AACrB,QAAM,cAAc,mBAAmB;AACvC,QAAM,EAAE,iBAAiB,IAAI,gBAAgB;AAC7C,QAAM,eAAe,gBAAgB;AACrC,QAAM,kBAAkB,MAAM;AAC5B,SAAK,UAAU,aAAa,kBAAkB;AAC9C,iBAAa,EAAE,kBAAkB,OAAO,qBAAqB,KAAK,CAAC;AAAA,EACrE;AAEA,QAAM,gBAAgB,CAAC,UAA8B;AACnD,QAAI,MAAM,SAAS,SAAS;AAC1B,sBAAgB;AAAA,IAClB;AAAA,EACF;AAEA,SACE;AAAA,IAAC,qBAAqB;AAAA,IAArB;AAAA,MACC,KAAK;AAAA,MACL,YAAY,oBAAC,iBAAc;AAAA,MAC3B,aAAa,KAAK,cAAc,iBAAiB,mBAAmB;AAAA,MACpE,QAAO;AAAA,MACP,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,UAAU,CAAC;AAAA;AAAA,EACb;AAEJ;AAEA,mBAAmB,aAAa,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { useContext } from "react";
2
- import { _getTabIndexValue as getTabIndexValue } from "@dynatrace/strato-components-preview/charts";
2
+ import { _getTabIndexValue as getTabIndexValue } from "@dynatrace/strato-components/charts";
3
3
  import { A11yToolbarTabIndexContext } from "../../../contexts/a11y-toolbar-tab-index.context.js";
4
4
  import { getTabIndexKey } from "../utils/a11y-toolbar-controls.js";
5
5
  const useA11yToolbarTabIndex = (type) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.ts"],
4
- "sourcesContent": ["import { useContext } from 'react';\n\nimport { _getTabIndexValue as getTabIndexValue } from '@dynatrace/strato-components-preview/charts';\n\nimport { A11yToolbarTabIndexContext } from '../../../contexts/a11y-toolbar-tab-index.context.js';\nimport type {\n A11yToolbarTabIndex,\n ToolbarInteractionModes,\n} from '../../../types/toolbar.js';\nimport { getTabIndexKey } from '../utils/a11y-toolbar-controls.js';\n\n/**\n * Get tabIndex value from context. depending on the param type\n *\n * @param type - toolbar buttons type\n */\nexport const useA11yToolbarTabIndex = (type: ToolbarInteractionModes) => {\n const tabIndexContext = useContext<A11yToolbarTabIndex[]>(\n A11yToolbarTabIndexContext,\n );\n\n const toolbarTabIndex = tabIndexContext.find(\n (tab) => getTabIndexKey(tab) === type,\n );\n\n return toolbarTabIndex ? getTabIndexValue(toolbarTabIndex) : -1;\n};\n"],
4
+ "sourcesContent": ["import { useContext } from 'react';\n\nimport { _getTabIndexValue as getTabIndexValue } from '@dynatrace/strato-components/charts';\n\nimport { A11yToolbarTabIndexContext } from '../../../contexts/a11y-toolbar-tab-index.context.js';\nimport type {\n A11yToolbarTabIndex,\n ToolbarInteractionModes,\n} from '../../../types/toolbar.js';\nimport { getTabIndexKey } from '../utils/a11y-toolbar-controls.js';\n\n/**\n * Get tabIndex value from context. depending on the param type\n *\n * @param type - toolbar buttons type\n */\nexport const useA11yToolbarTabIndex = (type: ToolbarInteractionModes) => {\n const tabIndexContext = useContext<A11yToolbarTabIndex[]>(\n A11yToolbarTabIndexContext,\n );\n\n const toolbarTabIndex = tabIndexContext.find(\n (tab) => getTabIndexKey(tab) === type,\n );\n\n return toolbarTabIndex ? getTabIndexValue(toolbarTabIndex) : -1;\n};\n"],
5
5
  "mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,qBAAqB,wBAAwB;AAEtD,SAAS,kCAAkC;AAK3C,SAAS,sBAAsB;AAOxB,MAAM,yBAAyB,CAAC,SAAkC;AACvE,QAAM,kBAAkB;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,kBAAkB,gBAAgB;AAAA,IACtC,CAAC,QAAQ,eAAe,GAAG,MAAM;AAAA,EACnC;AAEA,SAAO,kBAAkB,iBAAiB,eAAe,IAAI;AAC/D;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/contexts/formatter.context.ts"],
4
- "sourcesContent": ["import { createContext } from 'react';\n\nimport type { Formatter } from '@dynatrace/strato-components-preview/charts';\nimport type {\n ConvertibleUnit,\n FormatOptions,\n Unit,\n} from '@dynatrace-sdk/units';\n\nexport const FormatterContext = createContext<\n Formatter | FormatOptions<Unit, ConvertibleUnit> | undefined\n>(undefined);\n"],
4
+ "sourcesContent": ["import { createContext } from 'react';\n\nimport type { Formatter } from '@dynatrace/strato-components/charts';\nimport type {\n ConvertibleUnit,\n FormatOptions,\n Unit,\n} from '@dynatrace-sdk/units';\n\nexport const FormatterContext = createContext<\n Formatter | FormatOptions<Unit, ConvertibleUnit> | undefined\n>(undefined);\n"],
5
5
  "mappings": "AAAA,SAAS,qBAAqB;AASvB,MAAM,mBAAmB,cAE9B,MAAS;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/hooks/use-formatter-context.ts"],
4
- "sourcesContent": ["import { useContext } from 'react';\n\nimport type { Formatter } from '@dynatrace/strato-components-preview/charts';\nimport type {\n ConvertibleUnit,\n FormatOptions,\n Unit,\n} from '@dynatrace-sdk/units';\n\nimport { FormatterContext } from '../contexts/formatter.context.js';\n\nexport const useFormatterContext: () =>\n | Formatter\n | FormatOptions<Unit, ConvertibleUnit>\n | undefined = () => useContext(FormatterContext);\n"],
4
+ "sourcesContent": ["import { useContext } from 'react';\n\nimport type { Formatter } from '@dynatrace/strato-components/charts';\nimport type {\n ConvertibleUnit,\n FormatOptions,\n Unit,\n} from '@dynatrace-sdk/units';\n\nimport { FormatterContext } from '../contexts/formatter.context.js';\n\nexport const useFormatterContext: () =>\n | Formatter\n | FormatOptions<Unit, ConvertibleUnit>\n | undefined = () => useContext(FormatterContext);\n"],
5
5
  "mappings": "AAAA,SAAS,kBAAkB;AAS3B,SAAS,wBAAwB;AAE1B,MAAM,sBAGG,MAAM,WAAW,gBAAgB;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { isUndefined } from "lodash-es";
2
- import { _accessValue as accessValue } from "@dynatrace/strato-components-preview/core";
2
+ import { _accessValue as accessValue } from "@dynatrace/strato-components/core";
3
3
  import { useColorScale } from "./use-color-scale.js";
4
4
  import { DEFAULT_RANGE_COLOR } from "../constants.js";
5
5
  import { useMapConfig } from "./use-map-config.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/hooks/use-resolve-color.ts"],
4
- "sourcesContent": ["import { isUndefined } from 'lodash-es';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components-preview/core';\n\nimport { useColorScale } from './use-color-scale.js';\nimport { DEFAULT_RANGE_COLOR } from '../constants.js';\nimport { useMapConfig } from './use-map-config.js';\nimport {\n ChoroplethCustomColorProps,\n ColorParser,\n ConnectionColorProps,\n isLegendColoring,\n LegendColorLayerProps,\n LocationColorProps,\n} from '../types/coloring.js';\nimport { Connection } from '../types/connection-layer.js';\nimport { Location } from '../types/location.js';\nimport {\n isSequentialLegend,\n isThresholdLegend,\n} from '../utils/build-scale-from-legend-config.js';\n\nexport const useResolveColor = (\n defaultColor: string,\n props:\n | LocationColorProps<never>\n | ConnectionColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n const legendColoring = useColorScale();\n\n const { legend } = useMapConfig();\n\n if (!isLegendColoring(props)) {\n return props.color ?? defaultColor;\n }\n\n const fallbackColor =\n !isUndefined(legend) &&\n (isSequentialLegend(legend) || isThresholdLegend(legend))\n ? DEFAULT_RANGE_COLOR\n : defaultColor;\n\n let colorLegend: ((item: Record<string, unknown>) => string) | string =\n fallbackColor;\n\n if (!isUndefined(legendColoring) && !isUndefined(colorParser)) {\n colorLegend = (item: Record<string, unknown>): string => {\n const value = accessValue<number | string>(item, props.valueAccessor);\n if (isUndefined(value)) {\n return fallbackColor;\n }\n\n const parsedValue =\n typeof value === 'number' ? value + Number.MIN_VALUE : value;\n\n return colorParser(parsedValue) ?? fallbackColor;\n };\n }\n\n return colorLegend;\n};\n\nexport const useResolveLocationColor = <T extends Location>(\n defaultColor: string,\n props: LocationColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n\nexport const useResolveConnectionColor = <T extends Connection>(\n defaultColor: string,\n props: ConnectionColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n\nexport const useResolveChoroplethColor = <T extends Record<string, unknown>>(\n defaultColor: string,\n props: ChoroplethCustomColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n"],
5
- "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,mBAAmB;AAE5C,SAAS,qBAAqB;AAC9B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B;AAAA,EAIE;AAAA,OAGK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEA,MAAM,kBAAkB,CAC7B,cACA,OAKA,gBACG;AACH,QAAM,iBAAiB,cAAc;AAErC,QAAM,EAAE,OAAO,IAAI,aAAa;AAEhC,MAAI,CAAC,iBAAiB,KAAK,GAAG;AAC5B,WAAO,MAAM,SAAS;AAAA,EACxB;AAEA,QAAM,gBACJ,CAAC,YAAY,MAAM,MAClB,mBAAmB,MAAM,KAAK,kBAAkB,MAAM,KACnD,sBACA;AAEN,MAAI,cACF;AAEF,MAAI,CAAC,YAAY,cAAc,KAAK,CAAC,YAAY,WAAW,GAAG;AAC7D,kBAAc,CAAC,SAA0C;AACvD,YAAM,QAAQ,YAA6B,MAAM,MAAM,aAAa;AACpE,UAAI,YAAY,KAAK,GAAG;AACtB,eAAO;AAAA,MACT;AAEA,YAAM,cACJ,OAAO,UAAU,WAAW,QAAQ,OAAO,YAAY;AAEzD,aAAO,YAAY,WAAW,KAAK;AAAA,IACrC;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,0BAA0B,CACrC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;AAEO,MAAM,4BAA4B,CACvC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;AAEO,MAAM,4BAA4B,CACvC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;",
4
+ "sourcesContent": ["import { isUndefined } from 'lodash-es';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components/core';\n\nimport { useColorScale } from './use-color-scale.js';\nimport { DEFAULT_RANGE_COLOR } from '../constants.js';\nimport { useMapConfig } from './use-map-config.js';\nimport {\n type ChoroplethCustomColorProps,\n type ColorParser,\n isLegendColoring,\n type LegendColorLayerProps,\n type LocationColorProps,\n} from '../types/coloring.js';\nimport type {\n Connection,\n ConnectionColorProps,\n} from '../types/connection-layer.js';\nimport { Location } from '../types/location.js';\nimport {\n isSequentialLegend,\n isThresholdLegend,\n} from '../utils/build-scale-from-legend-config.js';\n\nexport const useResolveColor = (\n defaultColor: string,\n props:\n | LocationColorProps<never>\n | ConnectionColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n const legendColoring = useColorScale();\n\n const { legend } = useMapConfig();\n\n if (!isLegendColoring(props)) {\n return props.color ?? defaultColor;\n }\n\n const fallbackColor =\n !isUndefined(legend) &&\n (isSequentialLegend(legend) || isThresholdLegend(legend))\n ? DEFAULT_RANGE_COLOR\n : defaultColor;\n\n let colorLegend: ((item: Record<string, unknown>) => string) | string =\n fallbackColor;\n\n if (!isUndefined(legendColoring) && !isUndefined(colorParser)) {\n colorLegend = (item: Record<string, unknown>): string => {\n const value = accessValue<number | string>(item, props.valueAccessor);\n if (isUndefined(value)) {\n return fallbackColor;\n }\n\n const parsedValue =\n typeof value === 'number' ? value + Number.MIN_VALUE : value;\n\n return colorParser(parsedValue) ?? fallbackColor;\n };\n }\n\n return colorLegend;\n};\n\nexport const useResolveLocationColor = <T extends Location>(\n defaultColor: string,\n props: LocationColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n\nexport const useResolveConnectionColor = <T extends Connection>(\n defaultColor: string,\n props: ConnectionColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n\nexport const useResolveChoroplethColor = <T extends Record<string, unknown>>(\n defaultColor: string,\n props: ChoroplethCustomColorProps<T> | LegendColorLayerProps,\n colorParser?: ColorParser,\n) => {\n return useResolveColor(defaultColor, props, colorParser) as\n | string\n | ((item: T) => string);\n};\n"],
5
+ "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,mBAAmB;AAE5C,SAAS,qBAAqB;AAC9B,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B;AAAA,EAGE;AAAA,OAGK;AAMP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAEA,MAAM,kBAAkB,CAC7B,cACA,OAKA,gBACG;AACH,QAAM,iBAAiB,cAAc;AAErC,QAAM,EAAE,OAAO,IAAI,aAAa;AAEhC,MAAI,CAAC,iBAAiB,KAAK,GAAG;AAC5B,WAAO,MAAM,SAAS;AAAA,EACxB;AAEA,QAAM,gBACJ,CAAC,YAAY,MAAM,MAClB,mBAAmB,MAAM,KAAK,kBAAkB,MAAM,KACnD,sBACA;AAEN,MAAI,cACF;AAEF,MAAI,CAAC,YAAY,cAAc,KAAK,CAAC,YAAY,WAAW,GAAG;AAC7D,kBAAc,CAAC,SAA0C;AACvD,YAAM,QAAQ,YAA6B,MAAM,MAAM,aAAa;AACpE,UAAI,YAAY,KAAK,GAAG;AACtB,eAAO;AAAA,MACT;AAEA,YAAM,cACJ,OAAO,UAAU,WAAW,QAAQ,OAAO,YAAY;AAEzD,aAAO,YAAY,WAAW,KAAK;AAAA,IACrC;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,0BAA0B,CACrC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;AAEO,MAAM,4BAA4B,CACvC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;AAEO,MAAM,4BAA4B,CACvC,cACA,OACA,gBACG;AACH,SAAO,gBAAgB,cAAc,OAAO,WAAW;AAGzD;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/map/index.ts"],
4
- "sourcesContent": ["/* eslint-disable-next-line @typescript-eslint/no-deprecated */\nexport { ChartInteractions } from './slots/ChartInteractions.js';\nexport { MapView } from './MapView.js';\nexport { ConnectionLayer } from './slots/ConnectionLayer.js';\nexport { DotLayer } from './slots/DotLayer.js';\nexport { BubbleLayer } from './slots/BubbleLayer.js';\nexport { BaseLayer } from './slots/BaseLayer.js';\nexport { ChoroplethLayer } from './slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './slots/Tooltip.js';\nexport { DownloadCSV } from './slots/DownloadCSV.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './types/map-view.js';\n\nexport type { BaseLayerProps } from './types/base-layer.js';\n\nexport type { MapViewZoomSlotProps } from './slots/Zoom.js';\n\nexport type {\n Connection,\n ConnectionLayerBaseProps,\n ConnectionLayerProps,\n CurvedLine,\n} from './types/connection-layer.js';\n\nexport type { DotLayerBaseProps, DotLayerProps } from './types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './types/choropleth-layer.js';\n\nexport type { Location } from './types/location.js';\nexport type { MapShape } from './types/shapes.js';\nexport type {\n ChartInteractionsProps,\n MapToolbarSlotProps,\n} from './types/toolbar.js';\nexport type { ErrorStateSlotProps } from './slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n ConnectionColorProps,\n} from './types/coloring.js';\n\nexport { SequentialLegend } from './slots/SequentialLegend.js';\nexport { ThresholdLegend } from './slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n DotLayerTooltipData,\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n ChoroplethLayerTooltipData,\n} from './types/tooltip.js';\n\nexport { getAllCountries } from './utils/get-all-countries.js';\n"],
4
+ "sourcesContent": ["/* eslint-disable-next-line @typescript-eslint/no-deprecated */\nexport { ChartInteractions } from './slots/ChartInteractions.js';\nexport { MapView } from './MapView.js';\nexport { ConnectionLayer } from './slots/ConnectionLayer.js';\nexport { DotLayer } from './slots/DotLayer.js';\nexport { BubbleLayer } from './slots/BubbleLayer.js';\nexport { BaseLayer } from './slots/BaseLayer.js';\nexport { ChoroplethLayer } from './slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './slots/Tooltip.js';\nexport { DownloadCSV } from './slots/DownloadCSV.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './types/map-view.js';\n\nexport type { BaseLayerProps } from './types/base-layer.js';\n\nexport type { MapViewZoomSlotProps } from './slots/Zoom.js';\n\nexport type {\n Connection,\n ConnectionColorProps,\n ConnectionLayerBaseProps,\n ConnectionLayerProps,\n CurvedLine,\n} from './types/connection-layer.js';\n\nexport type { DotLayerBaseProps, DotLayerProps } from './types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './types/choropleth-layer.js';\n\nexport type { Location } from './types/location.js';\nexport type { MapShape } from './types/shapes.js';\nexport type {\n ChartInteractionsProps,\n MapToolbarSlotProps,\n} from './types/toolbar.js';\nexport type { ErrorStateSlotProps } from './slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n} from './types/coloring.js';\n\nexport { SequentialLegend } from './slots/SequentialLegend.js';\nexport { ThresholdLegend } from './slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n DotLayerTooltipData,\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n ChoroplethLayerTooltipData,\n} from './types/tooltip.js';\n\nexport { getAllCountries } from './utils/get-all-countries.js';\n"],
5
5
  "mappings": "AACA,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,SAAS,oBAAoB;AACtC,SAAS,mBAAmB;AA2D5B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAkBlC,SAAS,uBAAuB;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import {
2
2
  _ChartTooltipSlots as ChartTooltipSlots,
3
3
  _ChartTooltipAtoms as ChartTooltipAtoms,
4
4
  _ChartTooltipTemplate as ChartTooltipTemplate
5
- } from "@dynatrace/strato-components-preview/charts";
5
+ } from "@dynatrace/strato-components/charts";
6
6
  const Tooltip = {
7
7
  ...ChartTooltipSlots,
8
8
  ...ChartTooltipTemplate
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/slots/Tooltip.tsx"],
4
- "sourcesContent": ["import type { _ChartTooltipAtomsType as ChartTooltipAtomsType } from '@dynatrace/strato-components-preview/charts';\nimport {\n _ChartTooltipSlots as ChartTooltipSlots,\n _ChartTooltipAtoms as ChartTooltipAtoms,\n _ChartTooltipTemplate as ChartTooltipTemplate,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport type { ChartTooltip } from '../types/tooltip.js';\n\n/**\n * Tooltip is responsible for exposing the\n * ChartTooltip props, such as, sections, to the consumer\n * @public\n */\nexport const Tooltip: ChartTooltip = {\n ...ChartTooltipSlots,\n ...ChartTooltipTemplate,\n};\n\n/**\n * TooltipAtoms is responsible for exposing the\n * ChartTooltip atoms.\n * @public\n */\nexport const TooltipAtoms: ChartTooltipAtomsType = { ...ChartTooltipAtoms };\n"],
4
+ "sourcesContent": ["import type { _ChartTooltipAtomsType as ChartTooltipAtomsType } from '@dynatrace/strato-components/charts';\nimport {\n _ChartTooltipSlots as ChartTooltipSlots,\n _ChartTooltipAtoms as ChartTooltipAtoms,\n _ChartTooltipTemplate as ChartTooltipTemplate,\n} from '@dynatrace/strato-components/charts';\n\nimport type { ChartTooltip } from '../types/tooltip.js';\n\n/**\n * Tooltip is responsible for exposing the\n * ChartTooltip props, such as, sections, to the consumer\n * @public\n */\nexport const Tooltip: ChartTooltip = {\n ...ChartTooltipSlots,\n ...ChartTooltipTemplate,\n};\n\n/**\n * TooltipAtoms is responsible for exposing the\n * ChartTooltip atoms.\n * @public\n */\nexport const TooltipAtoms: ChartTooltipAtomsType = { ...ChartTooltipAtoms };\n"],
5
5
  "mappings": "AACA;AAAA,EACE,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,OACpB;AASA,MAAM,UAAwB;AAAA,EACnC,GAAG;AAAA,EACH,GAAG;AACL;AAOO,MAAM,eAAsC,EAAE,GAAG,kBAAkB;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { FormattedMessage } from "react-intl";
3
- import { _EmptyState as EmptyState } from "@dynatrace/strato-components-preview/charts";
3
+ import { _EmptyState as EmptyState } from "@dynatrace/strato-components/charts";
4
4
  const DisabledState = ({ height }) => {
5
5
  const messageNode = /* @__PURE__ */ jsx(
6
6
  FormattedMessage,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/map/slots/states/DisabledState.tsx"],
4
- "sourcesContent": ["import { type ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components-preview/charts';\n\n/**\n * @internal\n */\nexport type DisabledStateProps = { height: string | number };\n\n/**\n * @internal\n */\nexport const DisabledState = ({ height }: DisabledStateProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"TXZNTtB5qReH8XE3\"\n defaultMessage=\"Maps have been disabled in your environment - to enable these, please reach out to your environment administrator.\"\n description=\"Message to display when all maps are hidden.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nDisabledState['displayName'] = 'DisabledState';\n"],
4
+ "sourcesContent": ["import { type ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components/charts';\n\n/**\n * @internal\n */\nexport type DisabledStateProps = { height: string | number };\n\n/**\n * @internal\n */\nexport const DisabledState = ({ height }: DisabledStateProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"TXZNTtB5qReH8XE3\"\n defaultMessage=\"Maps have been disabled in your environment - to enable these, please reach out to your environment administrator.\"\n description=\"Message to display when all maps are hidden.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nDisabledState['displayName'] = 'DisabledState';\n"],
5
5
  "mappings": "AAeI;AAdJ,SAAS,wBAAwB;AAEjC,SAAS,eAAe,kBAAkB;AAUnC,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAA0B;AAC/D,QAAM,cACJ;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,gBAAe;AAAA,MACf,aAAY;AAAA;AAAA,EACd;AAGF,SAAO,oBAAC,cAAW,QAAiB,uBAAY;AAClD;AAEA,cAAc,aAAa,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,5 @@
1
1
  import { createContext } from "react";
2
- import {
3
- createStore
4
- } from "@dynatrace/strato-components-preview/core";
2
+ import { createStore } from "@dynatrace/strato-components/core";
5
3
  const initialSelection = { highlightedSeries: void 0, visible: void 0 };
6
4
  const initialState = {
7
5
  tooltip: {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/store/map-store.context.ts"],
4
- "sourcesContent": ["import { createContext } from 'react';\n\nimport {\n createStore,\n type Store,\n} from '@dynatrace/strato-components-preview/core';\n\nimport type { MapState } from '../types/state.js';\n\nconst initialSelection = { highlightedSeries: undefined, visible: undefined };\n\nexport const initialState: MapState = {\n tooltip: {\n pinned: false,\n visible: false,\n enabled: true,\n pinnedId: undefined,\n location: undefined,\n hoveredLayerId: undefined,\n data: undefined,\n },\n overlay: {\n mouseInBounds: false,\n },\n selection: initialSelection,\n zoom: {\n zoomInEnabled: true,\n zoomOutEnabled: true,\n zoomToFitEnabled: true,\n resetEnabled: false,\n },\n};\n\nexport const MapStore = createContext<Store<MapState>>(\n createStore<MapState>(initialState),\n);\n\nMapStore['displayName'] = 'MapStore';\n"],
5
- "mappings": "AAAA,SAAS,qBAAqB;AAE9B;AAAA,EACE;AAAA,OAEK;AAIP,MAAM,mBAAmB,EAAE,mBAAmB,QAAW,SAAS,OAAU;AAErE,MAAM,eAAyB;AAAA,EACpC,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,eAAe;AAAA,EACjB;AAAA,EACA,WAAW;AAAA,EACX,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,YAAsB,YAAY;AACpC;AAEA,SAAS,aAAa,IAAI;",
4
+ "sourcesContent": ["import { createContext } from 'react';\n\nimport { createStore, type Store } from '@dynatrace/strato-components/core';\n\nimport type { MapState } from '../types/state.js';\n\nconst initialSelection = { highlightedSeries: undefined, visible: undefined };\n\nexport const initialState: MapState = {\n tooltip: {\n pinned: false,\n visible: false,\n enabled: true,\n pinnedId: undefined,\n location: undefined,\n hoveredLayerId: undefined,\n data: undefined,\n },\n overlay: {\n mouseInBounds: false,\n },\n selection: initialSelection,\n zoom: {\n zoomInEnabled: true,\n zoomOutEnabled: true,\n zoomToFitEnabled: true,\n resetEnabled: false,\n },\n};\n\nexport const MapStore = createContext<Store<MapState>>(\n createStore<MapState>(initialState),\n);\n\nMapStore['displayName'] = 'MapStore';\n"],
5
+ "mappings": "AAAA,SAAS,qBAAqB;AAE9B,SAAS,mBAA+B;AAIxC,MAAM,mBAAmB,EAAE,mBAAmB,QAAW,SAAS,OAAU;AAErE,MAAM,eAAyB;AAAA,EACpC,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,IACV,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,eAAe;AAAA,EACjB;AAAA,EACA,WAAW;AAAA,EACX,MAAM;AAAA,IACJ,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,cAAc;AAAA,EAChB;AACF;AAEO,MAAM,WAAW;AAAA,EACtB,YAAsB,YAAY;AACpC;AAEA,SAAS,aAAa,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,8 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useRef } from "react";
3
- import {
4
- createStore
5
- } from "@dynatrace/strato-components-preview/core";
3
+ import { createStore } from "@dynatrace/strato-components/core";
6
4
  import { initialState, MapStore } from "./map-store.context.js";
7
5
  const MapStoreProvider = ({ children }) => {
8
6
  const storeRef = useRef(null);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/store/map-store.provider.tsx"],
4
- "sourcesContent": ["import { type PropsWithChildren, useRef } from 'react';\n\nimport {\n createStore,\n type Store,\n} from '@dynatrace/strato-components-preview/core';\n\nimport { initialState, MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const MapStoreProvider = ({ children }: PropsWithChildren) => {\n const storeRef = useRef<Store<MapState> | null>(null);\n\n storeRef.current ||= createStore(initialState);\n\n return (\n <MapStore.Provider value={storeRef.current}>{children}</MapStore.Provider>\n );\n};\n"],
5
- "mappings": "AAgBI;AAhBJ,SAAiC,cAAc;AAE/C;AAAA,EACE;AAAA,OAEK;AAEP,SAAS,cAAc,gBAAgB;AAGhC,MAAM,mBAAmB,CAAC,EAAE,SAAS,MAAyB;AACnE,QAAM,WAAW,OAA+B,IAAI;AAEpD,WAAS,YAAY,YAAY,YAAY;AAE7C,SACE,oBAAC,SAAS,UAAT,EAAkB,OAAO,SAAS,SAAU,UAAS;AAE1D;",
4
+ "sourcesContent": ["import { type PropsWithChildren, useRef } from 'react';\n\nimport { createStore, type Store } from '@dynatrace/strato-components/core';\n\nimport { initialState, MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const MapStoreProvider = ({ children }: PropsWithChildren) => {\n const storeRef = useRef<Store<MapState> | null>(null);\n\n storeRef.current ||= createStore(initialState);\n\n return (\n <MapStore.Provider value={storeRef.current}>{children}</MapStore.Provider>\n );\n};\n"],
5
+ "mappings": "AAaI;AAbJ,SAAiC,cAAc;AAE/C,SAAS,mBAA+B;AAExC,SAAS,cAAc,gBAAgB;AAGhC,MAAM,mBAAmB,CAAC,EAAE,SAAS,MAAyB;AACnE,QAAM,WAAW,OAA+B,IAAI;AAEpD,WAAS,YAAY,YAAY,YAAY;AAE7C,SACE,oBAAC,SAAS,UAAT,EAAkB,OAAO,SAAS,SAAU,UAAS;AAE1D;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,5 @@
1
1
  import { isEqual } from "lodash-es";
2
- import {
3
- useStoreSelector
4
- } from "@dynatrace/strato-components-preview/core";
2
+ import { useStoreSelector } from "@dynatrace/strato-components/core";
5
3
  import { MapStore } from "./map-store.context.js";
6
4
  const useSelector = (selector) => useStoreSelector(MapStore, selector, isEqual);
7
5
  const useMapSelectionState = () => useSelector(({ selection }) => selection);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/store/selectors.ts"],
4
- "sourcesContent": ["import { isEqual } from 'lodash-es';\nimport { type Context } from 'react';\n\nimport {\n Store,\n useStoreSelector,\n} from '@dynatrace/strato-components-preview/core';\n\nimport { MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const useSelector = <T, O>(selector: (state: MapState<T>) => O): O =>\n useStoreSelector(MapStore as Context<Store<MapState<T>>>, selector, isEqual);\n\nexport const useMapSelectionState = <T>() =>\n useSelector(({ selection }: MapState<T>) => selection);\n\nexport const useMapTooltipState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned, ...tooltipState } = tooltip;\n\n return tooltipState;\n });\n\nexport const useMapTooltipLocationState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => tooltip.location);\n\nexport const useMapTooltipHoveredLayerIdState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => tooltip.hoveredLayerId);\n\nexport const useMapTooltipPinnedState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned } = tooltip;\n\n return pinned;\n });\n\nexport const useMapOverlayState = <T>() =>\n useSelector(({ overlay }: MapState<T>) => overlay);\n\nexport const useMapZoomState = <T>() =>\n useSelector(({ zoom }: MapState<T>) => zoom);\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAGxB;AAAA,EAEE;AAAA,OACK;AAEP,SAAS,gBAAgB;AAGlB,MAAM,cAAc,CAAO,aAChC,iBAAiB,UAAyC,UAAU,OAAO;AAEtE,MAAM,uBAAuB,MAClC,YAAY,CAAC,EAAE,UAAU,MAAmB,SAAS;AAEhD,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,QAAQ,GAAG,aAAa,IAAI;AAEpC,SAAO;AACT,CAAC;AAEI,MAAM,6BAA6B,MACxC,YAAY,CAAC,EAAE,QAAQ,MAAmB,QAAQ,QAAQ;AAErD,MAAM,mCAAmC,MAC9C,YAAY,CAAC,EAAE,QAAQ,MAAmB,QAAQ,cAAc;AAE3D,MAAM,2BAA2B,MACtC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,OAAO,IAAI;AAEnB,SAAO;AACT,CAAC;AAEI,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB,OAAO;AAE5C,MAAM,kBAAkB,MAC7B,YAAY,CAAC,EAAE,KAAK,MAAmB,IAAI;",
4
+ "sourcesContent": ["import { isEqual } from 'lodash-es';\nimport { type Context } from 'react';\n\nimport { Store, useStoreSelector } from '@dynatrace/strato-components/core';\n\nimport { MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const useSelector = <T, O>(selector: (state: MapState<T>) => O): O =>\n useStoreSelector(MapStore as Context<Store<MapState<T>>>, selector, isEqual);\n\nexport const useMapSelectionState = <T>() =>\n useSelector(({ selection }: MapState<T>) => selection);\n\nexport const useMapTooltipState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned, ...tooltipState } = tooltip;\n\n return tooltipState;\n });\n\nexport const useMapTooltipLocationState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => tooltip.location);\n\nexport const useMapTooltipHoveredLayerIdState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => tooltip.hoveredLayerId);\n\nexport const useMapTooltipPinnedState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned } = tooltip;\n\n return pinned;\n });\n\nexport const useMapOverlayState = <T>() =>\n useSelector(({ overlay }: MapState<T>) => overlay);\n\nexport const useMapZoomState = <T>() =>\n useSelector(({ zoom }: MapState<T>) => zoom);\n"],
5
+ "mappings": "AAAA,SAAS,eAAe;AAGxB,SAAgB,wBAAwB;AAExC,SAAS,gBAAgB;AAGlB,MAAM,cAAc,CAAO,aAChC,iBAAiB,UAAyC,UAAU,OAAO;AAEtE,MAAM,uBAAuB,MAClC,YAAY,CAAC,EAAE,UAAU,MAAmB,SAAS;AAEhD,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,QAAQ,GAAG,aAAa,IAAI;AAEpC,SAAO;AACT,CAAC;AAEI,MAAM,6BAA6B,MACxC,YAAY,CAAC,EAAE,QAAQ,MAAmB,QAAQ,QAAQ;AAErD,MAAM,mCAAmC,MAC9C,YAAY,CAAC,EAAE,QAAQ,MAAmB,QAAQ,cAAc;AAE3D,MAAM,2BAA2B,MACtC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,OAAO,IAAI;AAEnB,SAAO;AACT,CAAC;AAEI,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB,OAAO;AAE5C,MAAM,kBAAkB,MAC7B,YAAY,CAAC,EAAE,KAAK,MAAmB,IAAI;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/types/bubble-layer.ts"],
4
- "sourcesContent": ["import type { LegendColorLayerProps, LocationColorProps } from './coloring.js';\nimport type { Location } from './location.js';\n\n/**\n * Base props to configure a BubbleLayer\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface BubbleLayerBaseProps<T extends Location> {\n /**\n * An array of location data items to be displayed as bubbles in the BubbleLayer\n */\n data: T[];\n /**\n * Determines the interpolation mode for bubble size.\n * 'zoom': Bubble size changes with zoom.\n * 'fixed': Constant bubble size regardless of zoom level.\n * @defaultValue 'fixed'\n */\n sizeInterpolation?: 'zoom' | 'fixed';\n}\n\n/**\n * The BubbleLayer props\n * @typeParam T - Object extending Location\n * @public\n */\nexport type BubbleLayerProps<T extends Location> = BubbleLayerBaseProps<T> &\n (LocationColorProps<T> | LegendColorLayerProps) &\n (ScaleRadiusProps<T> | ScaleNoneProps<T>);\n\n/**\n * When there's no scale provided, the radius prop is used as radius size in pixels\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface ScaleNoneProps<T> {\n /**\n * The way to indicate that scale should not be used\n */\n scale: 'none';\n /**\n * The radius property, which determines the size of the bubbles.\n * It can be a constant number or a function that calculates the radius based on the data item\n * @defaultValue 12\n */\n radius?: number | ((item: T) => number);\n}\n\n/**\n * When a scale is provided, all the values in the dataset will be scaled to fit between the `radiusRange`.\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface ScaleRadiusProps<T extends Location> {\n /**\n * The way the radius is scaled.\n * @defaultValue 'linear'\n */\n scale?: 'linear' | 'log';\n /**\n * The radius property, which determines the size of the bubbles.\n * It requires a callback that is used as data accessor.\n */\n radius: (item: T) => number;\n /**\n * It determines the min and max size for the bubble radius\n * @defaultValue [10, 100]\n */\n radiusRange?: [number, number];\n}\n\n/**\n * Type guard to know whether radius should apply the scale\n * @param props - BubbleLayerProps\n */\nexport function isScaleRadius<T extends Location>(\n props: BubbleLayerProps<T>,\n): props is BubbleLayerProps<T> & ScaleRadiusProps<T> {\n return props.scale !== 'none';\n}\n\n/** @internal */\nexport type InternalBubbleLayerProps<T extends Location> = {\n layerId: string;\n} & BubbleLayerProps<T>;\n"],
5
- "mappings": "AA4EO,SAAS,cACd,OACoD;AACpD,SAAO,MAAM,UAAU;AACzB;",
4
+ "sourcesContent": ["import type { BehaviorTrackingProps } from '@dynatrace/strato-components/core';\n\nimport type { LegendColorLayerProps, LocationColorProps } from './coloring.js';\nimport type { Location } from './location.js';\n\n/**\n * Base props to configure a BubbleLayer\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface BubbleLayerBaseProps<T extends Location>\n extends BehaviorTrackingProps {\n /**\n * An array of location data items to be displayed as bubbles in the BubbleLayer\n */\n data: T[];\n /**\n * Determines the interpolation mode for bubble size.\n * 'zoom': Bubble size changes with zoom.\n * 'fixed': Constant bubble size regardless of zoom level.\n * @defaultValue 'fixed'\n */\n sizeInterpolation?: 'zoom' | 'fixed';\n}\n\n/**\n * The BubbleLayer props\n * @typeParam T - Object extending Location\n * @public\n */\nexport type BubbleLayerProps<T extends Location> = BubbleLayerBaseProps<T> &\n (LocationColorProps<T> | LegendColorLayerProps) &\n (ScaleRadiusProps<T> | ScaleNoneProps<T>);\n\n/**\n * When there's no scale provided, the radius prop is used as radius size in pixels\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface ScaleNoneProps<T> {\n /**\n * The way to indicate that scale should not be used\n */\n scale: 'none';\n /**\n * The radius property, which determines the size of the bubbles.\n * It can be a constant number or a function that calculates the radius based on the data item\n * @defaultValue 12\n */\n radius?: number | ((item: T) => number);\n}\n\n/**\n * When a scale is provided, all the values in the dataset will be scaled to fit between the `radiusRange`.\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface ScaleRadiusProps<T extends Location> {\n /**\n * The way the radius is scaled.\n * @defaultValue 'linear'\n */\n scale?: 'linear' | 'log';\n /**\n * The radius property, which determines the size of the bubbles.\n * It requires a callback that is used as data accessor.\n */\n radius: (item: T) => number;\n /**\n * It determines the min and max size for the bubble radius\n * @defaultValue [10, 100]\n */\n radiusRange?: [number, number];\n}\n\n/**\n * Type guard to know whether radius should apply the scale\n * @param props - BubbleLayerProps\n */\nexport function isScaleRadius<T extends Location>(\n props: BubbleLayerProps<T>,\n): props is BubbleLayerProps<T> & ScaleRadiusProps<T> {\n return props.scale !== 'none';\n}\n\n/** @internal */\nexport type InternalBubbleLayerProps<T extends Location> = {\n layerId: string;\n} & BubbleLayerProps<T>;\n"],
5
+ "mappings": "AA+EO,SAAS,cACd,OACoD;AACpD,SAAO,MAAM,UAAU;AACzB;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/types/coloring.ts"],
4
- "sourcesContent": ["import type { Connection } from './connection-layer.js';\nimport type { Location } from './location.js';\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface LocationColorProps<T extends Location> {\n /** Custom color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Props to configure a connection Layer with custom coloring\n * @typeParam T - Object extending Connection\n * @public\n */\nexport interface ConnectionColorProps<T extends Connection> {\n /**\n * Specifies the color of the connection layer.\n * @defaultValue Colors.Charts.Categorical.Color03.Default\n */\n color?: string | ((connection: T) => string);\n}\n\n/**\n * Props to configure any Layer with legend coloring\n * @public\n */\nexport interface LegendColorLayerProps {\n /** When the color prop is set to 'legend', a value accessor is needed */\n color: 'legend';\n /** The value accessor to map data point values to legend color */\n valueAccessor: string;\n}\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending a record of string keys and any type of values\n * @public\n */\nexport interface ChoroplethCustomColorProps<T extends Record<string, unknown>> {\n /** Color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Detects whether color is linked to legend or not\n * @param props - layer color props\n */\nexport function isLegendColoring(\n props:\n | LocationColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n): props is LegendColorLayerProps {\n return props.color === 'legend';\n}\n\n/** @internal */\nexport type ColorParser = (value: string | number) => string | undefined;\n"],
5
- "mappings": "AAmDO,SAAS,iBACd,OAIgC;AAChC,SAAO,MAAM,UAAU;AACzB;",
4
+ "sourcesContent": ["import type { Location } from './location.js';\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending Location\n * @public\n */\nexport interface LocationColorProps<T extends Location> {\n /** Custom color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Props to configure any Layer with legend coloring\n * @public\n */\nexport interface LegendColorLayerProps {\n /** When the color prop is set to 'legend', a value accessor is needed */\n color: 'legend';\n /** The value accessor to map data point values to legend color */\n valueAccessor: string;\n}\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending a record of string keys and any type of values\n * @public\n */\nexport interface ChoroplethCustomColorProps<T extends Record<string, unknown>> {\n /** Color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Detects whether color is linked to legend or not\n * @param props - layer color props\n */\nexport function isLegendColoring(\n props:\n | LocationColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n): props is LegendColorLayerProps {\n return props.color === 'legend';\n}\n\n/** @internal */\nexport type ColorParser = (value: string | number) => string | undefined;\n"],
5
+ "mappings": "AAqCO,SAAS,iBACd,OAIgC;AAChC,SAAO,MAAM,UAAU;AACzB;",
6
6
  "names": []
7
7
  }
@@ -1,4 +1,4 @@
1
- import { _sanitizeSymbol } from "@dynatrace/strato-components-preview/core";
1
+ import { _sanitizeSymbol } from "@dynatrace/strato-components/core";
2
2
  import { attachImageFromShape } from "./attach-image-from-shape.js";
3
3
  import { attachImageFromText } from "./attach-image-from-text.js";
4
4
  import { isValidShape } from "./is-valid-shape.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/attach-image-from-string.ts"],
4
- "sourcesContent": ["import type { MapRef } from '@vis.gl/react-maplibre';\n\nimport { _sanitizeSymbol } from '@dynatrace/strato-components-preview/core';\n\nimport { attachImageFromShape } from './attach-image-from-shape.js';\nimport { attachImageFromText } from './attach-image-from-text.js';\nimport { isValidShape } from './is-valid-shape.js';\nimport type { MapShape } from '../types/shapes.js';\n\nexport const attachImageFromString = (\n map: MapRef,\n shape: MapShape | string,\n suffix = '',\n outputSize?: number,\n) => {\n const isShape = isValidShape(shape);\n const name = isShape ? `${shape}-${suffix}` : `emoji-${suffix}`;\n\n if (isShape) {\n attachImageFromShape(map, shape, name, outputSize);\n } else {\n const sanitizedShape = _sanitizeSymbol(shape);\n attachImageFromText(map, sanitizedShape, name, outputSize);\n }\n};\n"],
4
+ "sourcesContent": ["import type { MapRef } from '@vis.gl/react-maplibre';\n\nimport { _sanitizeSymbol } from '@dynatrace/strato-components/core';\n\nimport { attachImageFromShape } from './attach-image-from-shape.js';\nimport { attachImageFromText } from './attach-image-from-text.js';\nimport { isValidShape } from './is-valid-shape.js';\nimport type { MapShape } from '../types/shapes.js';\n\nexport const attachImageFromString = (\n map: MapRef,\n shape: MapShape | string,\n suffix = '',\n outputSize?: number,\n) => {\n const isShape = isValidShape(shape);\n const name = isShape ? `${shape}-${suffix}` : `emoji-${suffix}`;\n\n if (isShape) {\n attachImageFromShape(map, shape, name, outputSize);\n } else {\n const sanitizedShape = _sanitizeSymbol(shape);\n attachImageFromText(map, sanitizedShape, name, outputSize);\n }\n};\n"],
5
5
  "mappings": "AAEA,SAAS,uBAAuB;AAEhC,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAGtB,MAAM,wBAAwB,CACnC,KACA,OACA,SAAS,IACT,eACG;AACH,QAAM,UAAU,aAAa,KAAK;AAClC,QAAM,OAAO,UAAU,GAAG,KAAK,IAAI,MAAM,KAAK,SAAS,MAAM;AAE7D,MAAI,SAAS;AACX,yBAAqB,KAAK,OAAO,MAAM,UAAU;AAAA,EACnD,OAAO;AACL,UAAM,iBAAiB,gBAAgB,KAAK;AAC5C,wBAAoB,KAAK,gBAAgB,MAAM,UAAU;AAAA,EAC3D;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
- import { CSS_DOWNLOAD_FILENAME } from "@dynatrace/strato-components-preview/charts";
2
- import { _downloadCSV as downloadCSV } from "@dynatrace/strato-components-preview/core";
1
+ import { CSS_DOWNLOAD_FILENAME } from "@dynatrace/strato-components/charts";
2
+ import { _downloadCSV as downloadCSV } from "@dynatrace/strato-components/core";
3
3
  import { tabularizeLayersData } from "./tabularize-layers-data.js";
4
4
  const buildAndDownloadCsv = (rawData) => {
5
5
  const csvString = tabularizeLayersData(rawData);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/build-and-download-csv.ts"],
4
- "sourcesContent": ["import { CSS_DOWNLOAD_FILENAME } from '@dynatrace/strato-components-preview/charts';\nimport { _downloadCSV as downloadCSV } from '@dynatrace/strato-components-preview/core';\n\nimport { tabularizeLayersData } from './tabularize-layers-data.js';\n\n/**\n * Builds CSV from map raw data and downloads the file\n *\n * @param rawData -\n */\nexport const buildAndDownloadCsv = (rawData: Record<string, unknown>[]) => {\n const csvString = tabularizeLayersData(rawData);\n downloadCSV(csvString, CSS_DOWNLOAD_FILENAME);\n};\n"],
4
+ "sourcesContent": ["import { CSS_DOWNLOAD_FILENAME } from '@dynatrace/strato-components/charts';\nimport { _downloadCSV as downloadCSV } from '@dynatrace/strato-components/core';\n\nimport { tabularizeLayersData } from './tabularize-layers-data.js';\n\n/**\n * Builds CSV from map raw data and downloads the file\n *\n * @param rawData -\n */\nexport const buildAndDownloadCsv = (rawData: Record<string, unknown>[]) => {\n const csvString = tabularizeLayersData(rawData);\n downloadCSV(csvString, CSS_DOWNLOAD_FILENAME);\n};\n"],
5
5
  "mappings": "AAAA,SAAS,6BAA6B;AACtC,SAAS,gBAAgB,mBAAmB;AAE5C,SAAS,4BAA4B;AAO9B,MAAM,sBAAsB,CAAC,YAAuC;AACzE,QAAM,YAAY,qBAAqB,OAAO;AAC9C,cAAY,WAAW,qBAAqB;AAC9C;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/build-categorical-scale.ts"],
4
- "sourcesContent": ["import { scaleOrdinal } from 'd3-scale';\n\nimport { type ColorPalette } from '@dynatrace/strato-components-preview/charts';\n\nexport const buildCategoricalScale = (\n colorPalette: ColorPalette | { [key: string]: string },\n) => scaleOrdinal(Object.keys(colorPalette), Object.values(colorPalette));\n"],
4
+ "sourcesContent": ["import { scaleOrdinal } from 'd3-scale';\n\nimport { type ColorPalette } from '@dynatrace/strato-components/charts';\n\nexport const buildCategoricalScale = (\n colorPalette: ColorPalette | { [key: string]: string },\n) => scaleOrdinal(Object.keys(colorPalette), Object.values(colorPalette));\n"],
5
5
  "mappings": "AAAA,SAAS,oBAAoB;AAItB,MAAM,wBAAwB,CACnC,iBACG,aAAa,OAAO,KAAK,YAAY,GAAG,OAAO,OAAO,YAAY,CAAC;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import {
2
2
  _buildQuantizeScaleFromColorPalette as buildQuantizeScaleFromColorPalette,
3
3
  _buildThresholdScaleFromRanges as buildThresholdScaleFromRanges,
4
4
  colorPaletteOptions
5
- } from "@dynatrace/strato-components-preview/charts";
5
+ } from "@dynatrace/strato-components/charts";
6
6
  import { buildCategoricalScale } from "./build-categorical-scale.js";
7
7
  import { DEFAULT_RANGE_COLOR } from "../constants.js";
8
8
  import { createCategoricalColorSchemeFromCustomColorObject } from "./create-categorical-color-scheme-from-custom-color-object.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/build-scale-from-legend-config.ts"],
4
- "sourcesContent": ["import {\n _buildQuantizeScaleFromColorPalette as buildQuantizeScaleFromColorPalette,\n _buildThresholdScaleFromRanges as buildThresholdScaleFromRanges,\n type ColorPalette,\n colorPaletteOptions,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { buildCategoricalScale } from './build-categorical-scale.js';\nimport { DEFAULT_RANGE_COLOR } from '../constants.js';\nimport { createCategoricalColorSchemeFromCustomColorObject } from './create-categorical-color-scheme-from-custom-color-object.js';\nimport { createCategoricalColorSchemeFromLegendProps } from './create-categorical-color-scheme-from-legend-props.js';\nimport type {\n CategoricalLegendConfig,\n MapLegendConfig,\n SequentialLegendConfig,\n ThresholdLegendConfig,\n} from '../types/legend.js';\n\nexport const isThresholdLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is ThresholdLegendConfig => legendConfig.type === 'threshold';\n\nexport const isSequentialLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is SequentialLegendConfig => legendConfig.type === 'sequential';\n\nexport const isCategoricalLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is CategoricalLegendConfig =>\n legendConfig.type === 'categorical';\n\n/**\n * Builds a scale for the corresponding map legend configuration\n */\nexport const buildScaleFromLegendConfig = (\n mapLegendConfig: MapLegendConfig,\n categories?: string[],\n dataMax?: number,\n) => {\n if (isSequentialLegend(mapLegendConfig)) {\n const { min, max, colorPalette } = mapLegendConfig;\n return buildQuantizeScaleFromColorPalette(min, max, colorPalette);\n } else if (isThresholdLegend(mapLegendConfig)) {\n const { ranges } = mapLegendConfig;\n return buildThresholdScaleFromRanges(ranges, DEFAULT_RANGE_COLOR, {\n max: dataMax,\n });\n } else if (isCategoricalLegend(mapLegendConfig)) {\n const isArrayOfColors = Array.isArray(mapLegendConfig.colorPalette);\n const isDefaultColorPalette = colorPaletteOptions.includes(\n mapLegendConfig.colorPalette as (typeof colorPaletteOptions)[number],\n );\n const isCustomColorObject = !(isDefaultColorPalette || isArrayOfColors);\n const colorPaletteObject = isCustomColorObject\n ? createCategoricalColorSchemeFromCustomColorObject(\n mapLegendConfig.colorPalette as {\n [key: string]: string;\n },\n categories ?? [],\n )\n : createCategoricalColorSchemeFromLegendProps(\n mapLegendConfig.colorPalette as string[] | ColorPalette,\n categories ?? [],\n );\n\n return buildCategoricalScale(colorPaletteObject);\n }\n};\n"],
4
+ "sourcesContent": ["import {\n _buildQuantizeScaleFromColorPalette as buildQuantizeScaleFromColorPalette,\n _buildThresholdScaleFromRanges as buildThresholdScaleFromRanges,\n type ColorPalette,\n colorPaletteOptions,\n} from '@dynatrace/strato-components/charts';\n\nimport { buildCategoricalScale } from './build-categorical-scale.js';\nimport { DEFAULT_RANGE_COLOR } from '../constants.js';\nimport { createCategoricalColorSchemeFromCustomColorObject } from './create-categorical-color-scheme-from-custom-color-object.js';\nimport { createCategoricalColorSchemeFromLegendProps } from './create-categorical-color-scheme-from-legend-props.js';\nimport type {\n CategoricalLegendConfig,\n MapLegendConfig,\n SequentialLegendConfig,\n ThresholdLegendConfig,\n} from '../types/legend.js';\n\nexport const isThresholdLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is ThresholdLegendConfig => legendConfig.type === 'threshold';\n\nexport const isSequentialLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is SequentialLegendConfig => legendConfig.type === 'sequential';\n\nexport const isCategoricalLegend = (\n legendConfig: MapLegendConfig,\n): legendConfig is CategoricalLegendConfig =>\n legendConfig.type === 'categorical';\n\n/**\n * Builds a scale for the corresponding map legend configuration\n */\nexport const buildScaleFromLegendConfig = (\n mapLegendConfig: MapLegendConfig,\n categories?: string[],\n dataMax?: number,\n) => {\n if (isSequentialLegend(mapLegendConfig)) {\n const { min, max, colorPalette } = mapLegendConfig;\n return buildQuantizeScaleFromColorPalette(min, max, colorPalette);\n } else if (isThresholdLegend(mapLegendConfig)) {\n const { ranges } = mapLegendConfig;\n return buildThresholdScaleFromRanges(ranges, DEFAULT_RANGE_COLOR, {\n max: dataMax,\n });\n } else if (isCategoricalLegend(mapLegendConfig)) {\n const isArrayOfColors = Array.isArray(mapLegendConfig.colorPalette);\n const isDefaultColorPalette = colorPaletteOptions.includes(\n mapLegendConfig.colorPalette as (typeof colorPaletteOptions)[number],\n );\n const isCustomColorObject = !(isDefaultColorPalette || isArrayOfColors);\n const colorPaletteObject = isCustomColorObject\n ? createCategoricalColorSchemeFromCustomColorObject(\n mapLegendConfig.colorPalette as {\n [key: string]: string;\n },\n categories ?? [],\n )\n : createCategoricalColorSchemeFromLegendProps(\n mapLegendConfig.colorPalette as string[] | ColorPalette,\n categories ?? [],\n );\n\n return buildCategoricalScale(colorPaletteObject);\n }\n};\n"],
5
5
  "mappings": "AAAA;AAAA,EACE,uCAAuC;AAAA,EACvC,kCAAkC;AAAA,EAElC;AAAA,OACK;AAEP,SAAS,6BAA6B;AACtC,SAAS,2BAA2B;AACpC,SAAS,yDAAyD;AAClE,SAAS,mDAAmD;AAQrD,MAAM,oBAAoB,CAC/B,iBAC0C,aAAa,SAAS;AAE3D,MAAM,qBAAqB,CAChC,iBAC2C,aAAa,SAAS;AAE5D,MAAM,sBAAsB,CACjC,iBAEA,aAAa,SAAS;AAKjB,MAAM,6BAA6B,CACxC,iBACA,YACA,YACG;AACH,MAAI,mBAAmB,eAAe,GAAG;AACvC,UAAM,EAAE,KAAK,KAAK,aAAa,IAAI;AACnC,WAAO,mCAAmC,KAAK,KAAK,YAAY;AAAA,EAClE,WAAW,kBAAkB,eAAe,GAAG;AAC7C,UAAM,EAAE,OAAO,IAAI;AACnB,WAAO,8BAA8B,QAAQ,qBAAqB;AAAA,MAChE,KAAK;AAAA,IACP,CAAC;AAAA,EACH,WAAW,oBAAoB,eAAe,GAAG;AAC/C,UAAM,kBAAkB,MAAM,QAAQ,gBAAgB,YAAY;AAClE,UAAM,wBAAwB,oBAAoB;AAAA,MAChD,gBAAgB;AAAA,IAClB;AACA,UAAM,sBAAsB,EAAE,yBAAyB;AACvD,UAAM,qBAAqB,sBACvB;AAAA,MACE,gBAAgB;AAAA,MAGhB,cAAc,CAAC;AAAA,IACjB,IACA;AAAA,MACE,gBAAgB;AAAA,MAChB,cAAc,CAAC;AAAA,IACjB;AAEJ,WAAO,sBAAsB,kBAAkB;AAAA,EACjD;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { interpolateRgb } from "d3-interpolate";
2
- import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components-preview/charts";
2
+ import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components/charts";
3
3
  import Colors from "@dynatrace/strato-design-tokens/colors";
4
4
  const calculateHoveredColor = (color) => {
5
5
  return interpolateRgb(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/calculate-hovered-color.ts"],
4
- "sourcesContent": ["import { interpolateRgb } from 'd3-interpolate';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\nimport Colors from '@dynatrace/strato-design-tokens/colors';\n\nexport const calculateHoveredColor = (color: string) => {\n return interpolateRgb(\n getCanvasColor(color),\n getCanvasColor(Colors.Background.Field.Neutral.DefaultHover),\n )(0.3);\n};\n"],
4
+ "sourcesContent": ["import { interpolateRgb } from 'd3-interpolate';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components/charts';\nimport Colors from '@dynatrace/strato-design-tokens/colors';\n\nexport const calculateHoveredColor = (color: string) => {\n return interpolateRgb(\n getCanvasColor(color),\n getCanvasColor(Colors.Background.Field.Neutral.DefaultHover),\n )(0.3);\n};\n"],
5
5
  "mappings": "AAAA,SAAS,sBAAsB;AAE/B,SAAS,mBAAmB,sBAAsB;AAClD,OAAO,YAAY;AAEZ,MAAM,wBAAwB,CAAC,UAAkB;AACtD,SAAO;AAAA,IACL,eAAe,KAAK;AAAA,IACpB,eAAe,OAAO,WAAW,MAAM,QAAQ,YAAY;AAAA,EAC7D,EAAE,GAAG;AACP;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import { capitalize, isUndefined } from "lodash-es";
2
2
  import {
3
3
  _colorPaletteMap as colorPaletteMap,
4
4
  _isCustomColorPalette as isCustomColorPalette
5
- } from "@dynatrace/strato-components-preview/charts";
5
+ } from "@dynatrace/strato-components/charts";
6
6
  import { DEFAULT_BASIC_SHAPE_COLOR_TOKEN } from "../constants.js";
7
7
  const createCategoricalColorSchemeFromLegendProps = (colorPalette, categories) => {
8
8
  let obj = {};
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/create-categorical-color-scheme-from-legend-props.ts"],
4
- "sourcesContent": ["import { capitalize, isUndefined } from 'lodash-es';\n\nimport {\n _colorPaletteMap as colorPaletteMap,\n _isCustomColorPalette as isCustomColorPalette,\n ColorPalette,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_BASIC_SHAPE_COLOR_TOKEN } from '../constants.js';\n\nexport const createCategoricalColorSchemeFromLegendProps = (\n colorPalette: string[] | ColorPalette,\n categories: string[],\n): ColorPalette | { [key: string]: string } => {\n let obj = {};\n\n if (isCustomColorPalette(colorPalette)) {\n categories.forEach((categoryName, index) => {\n obj = {\n ...obj,\n [categoryName]:\n colorPalette[index] ?? DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default,\n };\n });\n } else {\n const colorsList = Object.values(colorPaletteMap[colorPalette]);\n categories.forEach((categoryName, i) => {\n const colorIndex = i % colorsList.length; // Using module in order to cycle through colorsList\n const colorToken =\n colorPaletteMap[colorPalette][capitalize(categoryName)] ??\n colorsList[colorIndex];\n if (!isUndefined(colorToken)) {\n obj = {\n ...obj,\n [categoryName]: colorToken.Default,\n };\n }\n });\n }\n return obj;\n};\n"],
4
+ "sourcesContent": ["import { capitalize, isUndefined } from 'lodash-es';\n\nimport {\n _colorPaletteMap as colorPaletteMap,\n _isCustomColorPalette as isCustomColorPalette,\n ColorPalette,\n} from '@dynatrace/strato-components/charts';\n\nimport { DEFAULT_BASIC_SHAPE_COLOR_TOKEN } from '../constants.js';\n\nexport const createCategoricalColorSchemeFromLegendProps = (\n colorPalette: string[] | ColorPalette,\n categories: string[],\n): ColorPalette | { [key: string]: string } => {\n let obj = {};\n\n if (isCustomColorPalette(colorPalette)) {\n categories.forEach((categoryName, index) => {\n obj = {\n ...obj,\n [categoryName]:\n colorPalette[index] ?? DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default,\n };\n });\n } else {\n const colorsList = Object.values(colorPaletteMap[colorPalette]);\n categories.forEach((categoryName, i) => {\n const colorIndex = i % colorsList.length; // Using module in order to cycle through colorsList\n const colorToken =\n colorPaletteMap[colorPalette][capitalize(categoryName)] ??\n colorsList[colorIndex];\n if (!isUndefined(colorToken)) {\n obj = {\n ...obj,\n [categoryName]: colorToken.Default,\n };\n }\n });\n }\n return obj;\n};\n"],
5
5
  "mappings": "AAAA,SAAS,YAAY,mBAAmB;AAExC;AAAA,EACE,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,OAEpB;AAEP,SAAS,uCAAuC;AAEzC,MAAM,8CAA8C,CACzD,cACA,eAC6C;AAC7C,MAAI,MAAM,CAAC;AAEX,MAAI,qBAAqB,YAAY,GAAG;AACtC,eAAW,QAAQ,CAAC,cAAc,UAAU;AAC1C,YAAM;AAAA,QACJ,GAAG;AAAA,QACH,CAAC,YAAY,GACX,aAAa,KAAK,KAAK,gCAAgC;AAAA,MAC3D;AAAA,IACF,CAAC;AAAA,EACH,OAAO;AACL,UAAM,aAAa,OAAO,OAAO,gBAAgB,YAAY,CAAC;AAC9D,eAAW,QAAQ,CAAC,cAAc,MAAM;AACtC,YAAM,aAAa,IAAI,WAAW;AAClC,YAAM,aACJ,gBAAgB,YAAY,EAAE,WAAW,YAAY,CAAC,KACtD,WAAW,UAAU;AACvB,UAAI,CAAC,YAAY,UAAU,GAAG;AAC5B,cAAM;AAAA,UACJ,GAAG;AAAA,UACH,CAAC,YAAY,GAAG,WAAW;AAAA,QAC7B;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { Children } from "react";
2
- import { _accessValue as accessValue } from "@dynatrace/strato-components-preview/core";
2
+ import { _accessValue as accessValue } from "@dynatrace/strato-components/core";
3
3
  import { isComponent } from "./is-component.js";
4
4
  import { BubbleLayer } from "../components/BubbleLayer/BubbleLayer.js";
5
5
  import { ChoroplethLayer } from "../components/ChoroplethLayer/ChoroplethLayer.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/get-data-layers-bounding-box.ts"],
4
- "sourcesContent": ["import { Feature } from 'geojson';\nimport { type ReactNode, Children } from 'react';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components-preview/core';\n\nimport { isComponent } from './is-component.js';\nimport { BubbleLayer } from '../components/BubbleLayer/BubbleLayer.js';\nimport { ChoroplethLayer } from '../components/ChoroplethLayer/ChoroplethLayer.js';\nimport { ConnectionLayer } from '../components/ConnectionLayer/ConnectionLayer.js';\nimport { DotLayer } from '../components/DotLayer/DotLayer.js';\nimport {\n MAX_LATITUDE,\n MAX_LONGITUDE,\n MIN_LATITUDE,\n MIN_LONGITUDE,\n} from '../constants.js';\nimport { InternalChoroplethLayerProps } from '../types/choropleth-layer.js';\nimport type { Location } from '../types/location.js';\nimport type { BoundingBoxCoords } from '../types/map-view.js';\n\nconst narrowDownLocationBounds = (\n coordinates: Location[],\n initialBounds: BoundingBoxCoords,\n) => {\n const bounds: BoundingBoxCoords = [...initialBounds];\n coordinates.forEach(({ latitude, longitude }) => {\n bounds[0] = Math.min(bounds[0], longitude);\n bounds[1] = Math.min(bounds[1], latitude);\n bounds[2] = Math.max(bounds[2], longitude);\n bounds[3] = Math.max(bounds[3], latitude);\n });\n\n return bounds;\n};\n\nconst updateChoroplethBounds = (\n locationBounds: BoundingBoxCoords,\n initialBounds: BoundingBoxCoords,\n) => {\n const bounds: BoundingBoxCoords = [...initialBounds];\n bounds[0] = Math.min(bounds[0], locationBounds[0]);\n bounds[1] = Math.min(bounds[1], locationBounds[1]);\n bounds[2] = Math.max(bounds[2], locationBounds[2]);\n bounds[3] = Math.max(bounds[3], locationBounds[3]);\n\n return bounds;\n};\n\nconst narrowDownChoroplethBounds = (\n props: InternalChoroplethLayerProps<Record<string, unknown>>,\n featureCollection: Feature[],\n bounds: BoundingBoxCoords,\n) => {\n const locations = props.data.map((feat) => {\n const accessor = props.regionAccessor;\n if (typeof accessor === 'string') {\n return accessValue<string>(feat, accessor);\n } else {\n return accessor(feat);\n }\n });\n\n let foundLocations = 0;\n for (const feature of featureCollection) {\n if (locations.includes(feature.id as string)) {\n if (feature.properties?.bbox) {\n bounds = updateChoroplethBounds(feature.properties.bbox, bounds);\n foundLocations++;\n }\n }\n if (foundLocations === locations.length) {\n break;\n }\n }\n\n return bounds;\n};\n\nexport const getDataLayersBoundingBox = (\n children: ReactNode,\n featureCollection?: Feature[],\n): BoundingBoxCoords => {\n let bounds: BoundingBoxCoords = [\n MAX_LONGITUDE,\n MAX_LATITUDE,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n ];\n\n Children.forEach(children, (child) => {\n if (isComponent(child, BubbleLayer) || isComponent(child, DotLayer)) {\n const data = child.props.data;\n\n bounds = narrowDownLocationBounds(data, bounds);\n } else if (isComponent(child, ConnectionLayer)) {\n const connectionsProps = child.props;\n connectionsProps.data.forEach(({ path }) => {\n bounds = narrowDownLocationBounds(path, bounds);\n });\n } else if (isComponent(child, ChoroplethLayer)) {\n if (featureCollection !== undefined) {\n bounds = narrowDownChoroplethBounds(\n child.props,\n featureCollection,\n bounds,\n );\n }\n }\n });\n\n return bounds;\n};\n"],
4
+ "sourcesContent": ["import { Feature } from 'geojson';\nimport { type ReactNode, Children } from 'react';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components/core';\n\nimport { isComponent } from './is-component.js';\nimport { BubbleLayer } from '../components/BubbleLayer/BubbleLayer.js';\nimport { ChoroplethLayer } from '../components/ChoroplethLayer/ChoroplethLayer.js';\nimport { ConnectionLayer } from '../components/ConnectionLayer/ConnectionLayer.js';\nimport { DotLayer } from '../components/DotLayer/DotLayer.js';\nimport {\n MAX_LATITUDE,\n MAX_LONGITUDE,\n MIN_LATITUDE,\n MIN_LONGITUDE,\n} from '../constants.js';\nimport { InternalChoroplethLayerProps } from '../types/choropleth-layer.js';\nimport type { Location } from '../types/location.js';\nimport type { BoundingBoxCoords } from '../types/map-view.js';\n\nconst narrowDownLocationBounds = (\n coordinates: Location[],\n initialBounds: BoundingBoxCoords,\n) => {\n const bounds: BoundingBoxCoords = [...initialBounds];\n coordinates.forEach(({ latitude, longitude }) => {\n bounds[0] = Math.min(bounds[0], longitude);\n bounds[1] = Math.min(bounds[1], latitude);\n bounds[2] = Math.max(bounds[2], longitude);\n bounds[3] = Math.max(bounds[3], latitude);\n });\n\n return bounds;\n};\n\nconst updateChoroplethBounds = (\n locationBounds: BoundingBoxCoords,\n initialBounds: BoundingBoxCoords,\n) => {\n const bounds: BoundingBoxCoords = [...initialBounds];\n bounds[0] = Math.min(bounds[0], locationBounds[0]);\n bounds[1] = Math.min(bounds[1], locationBounds[1]);\n bounds[2] = Math.max(bounds[2], locationBounds[2]);\n bounds[3] = Math.max(bounds[3], locationBounds[3]);\n\n return bounds;\n};\n\nconst narrowDownChoroplethBounds = (\n props: InternalChoroplethLayerProps<Record<string, unknown>>,\n featureCollection: Feature[],\n bounds: BoundingBoxCoords,\n) => {\n const locations = props.data.map((feat) => {\n const accessor = props.regionAccessor;\n if (typeof accessor === 'string') {\n return accessValue<string>(feat, accessor);\n } else {\n return accessor(feat);\n }\n });\n\n let foundLocations = 0;\n for (const feature of featureCollection) {\n if (locations.includes(feature.id as string)) {\n if (feature.properties?.bbox) {\n bounds = updateChoroplethBounds(feature.properties.bbox, bounds);\n foundLocations++;\n }\n }\n if (foundLocations === locations.length) {\n break;\n }\n }\n\n return bounds;\n};\n\nexport const getDataLayersBoundingBox = (\n children: ReactNode,\n featureCollection?: Feature[],\n): BoundingBoxCoords => {\n let bounds: BoundingBoxCoords = [\n MAX_LONGITUDE,\n MAX_LATITUDE,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n ];\n\n Children.forEach(children, (child) => {\n if (isComponent(child, BubbleLayer) || isComponent(child, DotLayer)) {\n const data = child.props.data;\n\n bounds = narrowDownLocationBounds(data, bounds);\n } else if (isComponent(child, ConnectionLayer)) {\n const connectionsProps = child.props;\n connectionsProps.data.forEach(({ path }) => {\n bounds = narrowDownLocationBounds(path, bounds);\n });\n } else if (isComponent(child, ChoroplethLayer)) {\n if (featureCollection !== undefined) {\n bounds = narrowDownChoroplethBounds(\n child.props,\n featureCollection,\n bounds,\n );\n }\n }\n });\n\n return bounds;\n};\n"],
5
5
  "mappings": "AACA,SAAyB,gBAAgB;AAEzC,SAAS,gBAAgB,mBAAmB;AAE5C,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,MAAM,2BAA2B,CAC/B,aACA,kBACG;AACH,QAAM,SAA4B,CAAC,GAAG,aAAa;AACnD,cAAY,QAAQ,CAAC,EAAE,UAAU,UAAU,MAAM;AAC/C,WAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,SAAS;AACzC,WAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,QAAQ;AACxC,WAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,SAAS;AACzC,WAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,QAAQ;AAAA,EAC1C,CAAC;AAED,SAAO;AACT;AAEA,MAAM,yBAAyB,CAC7B,gBACA,kBACG;AACH,QAAM,SAA4B,CAAC,GAAG,aAAa;AACnD,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AACjD,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AACjD,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AACjD,SAAO,CAAC,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AAEjD,SAAO;AACT;AAEA,MAAM,6BAA6B,CACjC,OACA,mBACA,WACG;AACH,QAAM,YAAY,MAAM,KAAK,IAAI,CAAC,SAAS;AACzC,UAAM,WAAW,MAAM;AACvB,QAAI,OAAO,aAAa,UAAU;AAChC,aAAO,YAAoB,MAAM,QAAQ;AAAA,IAC3C,OAAO;AACL,aAAO,SAAS,IAAI;AAAA,IACtB;AAAA,EACF,CAAC;AAED,MAAI,iBAAiB;AACrB,aAAW,WAAW,mBAAmB;AACvC,QAAI,UAAU,SAAS,QAAQ,EAAY,GAAG;AAC5C,UAAI,QAAQ,YAAY,MAAM;AAC5B,iBAAS,uBAAuB,QAAQ,WAAW,MAAM,MAAM;AAC/D;AAAA,MACF;AAAA,IACF;AACA,QAAI,mBAAmB,UAAU,QAAQ;AACvC;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;AAEO,MAAM,2BAA2B,CACtC,UACA,sBACsB;AACtB,MAAI,SAA4B;AAAA,IAC9B;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,WAAS,QAAQ,UAAU,CAAC,UAAU;AACpC,QAAI,YAAY,OAAO,WAAW,KAAK,YAAY,OAAO,QAAQ,GAAG;AACnE,YAAM,OAAO,MAAM,MAAM;AAEzB,eAAS,yBAAyB,MAAM,MAAM;AAAA,IAChD,WAAW,YAAY,OAAO,eAAe,GAAG;AAC9C,YAAM,mBAAmB,MAAM;AAC/B,uBAAiB,KAAK,QAAQ,CAAC,EAAE,KAAK,MAAM;AAC1C,iBAAS,yBAAyB,MAAM,MAAM;AAAA,MAChD,CAAC;AAAA,IACH,WAAW,YAAY,OAAO,eAAe,GAAG;AAC9C,UAAI,sBAAsB,QAAW;AACnC,iBAAS;AAAA,UACP,MAAM;AAAA,UACN;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { isEmpty, isUndefined } from "lodash-es";
2
2
  import { Children } from "react";
3
- import { ChartToolbar } from "@dynatrace/strato-components-preview/charts";
3
+ import { ChartToolbar } from "@dynatrace/strato-components/charts";
4
4
  import {
5
5
  DEFAULT_BASE_LAYER_RULES,
6
6
  DEFAULT_MAP_LEGEND_RATIO,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/iterate-config-slots.ts"],
4
- "sourcesContent": ["import { isEmpty, isUndefined } from 'lodash-es';\nimport { Children, type ReactNode } from 'react';\n\nimport { ChartToolbar } from '@dynatrace/strato-components-preview/charts';\n\nimport {\n DEFAULT_BASE_LAYER_RULES,\n DEFAULT_MAP_LEGEND_RATIO,\n DEFAULT_MAP_POSITION,\n DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE,\n} from '../constants.js';\nimport { isSlot } from './is-slot.js';\nimport { replaceInfiniteValuesInRanges } from './replace-infinite-values-in-ranges.js';\nimport { BaseLayer } from '../slots/BaseLayer.js';\nimport { CategoricalLegend } from '../slots/CategoricalLegend.js';\nimport { ChartInteractions } from '../slots/ChartInteractions.js';\nimport { DownloadCSV } from '../slots/DownloadCSV.js';\nimport { SequentialLegend } from '../slots/SequentialLegend.js';\nimport { ThresholdLegend } from '../slots/ThresholdLegend.js';\nimport { sanitizeProps, Toolbar } from '../slots/Toolbar.js';\nimport { Zoom } from '../slots/Zoom.js';\nimport type { MapConfig } from '../types/configuration.js';\nimport type {\n ChartInteractionsConfig,\n MapToolbarConfig,\n} from '../types/toolbar.js';\n\n/**\n * Generate map config based on slots\n * @param children - Map children\n * @param legendDomain - Domain containing min and max value relevant for legend\n * @returns Map slot config\n */\nexport const iterateConfigSlots = (\n children: ReactNode,\n legendDomain: [number, number],\n) => {\n let slots: MapConfig = {\n toolbar: undefined,\n interactions: undefined,\n legend: undefined,\n baseLayer: DEFAULT_BASE_LAYER_RULES,\n };\n\n let slotMapToolbarConfig: MapToolbarConfig = {};\n\n Children.forEach(children, (child) => {\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n if (isSlot(child, ChartInteractions)) {\n const { children, ...previousInteractions } = child.props;\n\n const interactions = iterateChartInteractionsSlots(children);\n\n slots = {\n ...slots,\n interactions: {\n ...previousInteractions,\n ...interactions,\n },\n };\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n } else if (isSlot(child, ChartToolbar)) {\n const { children, ...toolbar } = child.props;\n const childrenToolbar = iterateChartToolbarSlots(children);\n\n slots = {\n ...slots,\n toolbar: {\n ...toolbar,\n ...childrenToolbar,\n },\n };\n } else if (isSlot(child, SequentialLegend)) {\n slots = {\n ...slots,\n legend: {\n type: 'sequential',\n colorPalette: DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE,\n position: DEFAULT_MAP_POSITION,\n ratio: DEFAULT_MAP_LEGEND_RATIO,\n ...child.props,\n min: child.props.min ?? legendDomain[0],\n max: child.props.max ?? legendDomain[1],\n },\n };\n } else if (isSlot(child, CategoricalLegend)) {\n slots = {\n ...slots,\n legend: {\n type: 'categorical',\n position: DEFAULT_MAP_POSITION,\n ...child.props,\n },\n };\n } else if (isSlot(child, ThresholdLegend)) {\n const getDomainValue = (index: number, legendDomainValue: number) =>\n Number.isFinite(legendDomainValue)\n ? legendDomainValue\n : child.props.ranges?.at(index)?.to ?? legendDomainValue;\n\n const ranges = replaceInfiniteValuesInRanges(child.props.ranges, [\n getDomainValue(0, legendDomain[0]),\n getDomainValue(-1, legendDomain[1]),\n ]);\n\n slots = {\n ...slots,\n legend: {\n type: 'threshold',\n position: DEFAULT_MAP_POSITION,\n ratio: DEFAULT_MAP_LEGEND_RATIO,\n ...child.props,\n ranges,\n },\n };\n } else if (isSlot(child, Toolbar)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n ...sanitizeProps(child.props),\n };\n } else if (isSlot(child, DownloadCSV)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n downloadCSV: { enabled: true },\n };\n } else if (isSlot(child, Zoom)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n zoom: { enabled: child.props.disabled !== true },\n };\n } else if (isSlot(child, BaseLayer)) {\n slots = {\n ...slots,\n baseLayer: {\n ...slots.baseLayer,\n ...child.props,\n },\n };\n }\n });\n\n // Enable zoom by default if toolbar config exists, Zoom is not set, and toolbar is visible\n const shouldEnableDefaultZoom =\n isUndefined(slotMapToolbarConfig.zoom) &&\n !isEmpty(slotMapToolbarConfig) &&\n slots.toolbar?.hidden !== true;\n\n if (shouldEnableDefaultZoom) {\n slotMapToolbarConfig.zoom = { enabled: true };\n }\n\n if (!isEmpty(slotMapToolbarConfig)) {\n slots.toolbar = { ...slots.toolbar, ...slotMapToolbarConfig };\n }\n return slots;\n};\n\nconst iterateChartInteractionsSlots = (children: ReactNode) => {\n let interactions: ChartInteractionsConfig = {};\n\n Children.forEach(children, (childInteractions) => {\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n if (isSlot(childInteractions, ChartInteractions.Zoom)) {\n interactions = { ...interactions, zoom: { enabled: true } };\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n } else if (isSlot(childInteractions, ChartInteractions.ZoomToFit)) {\n interactions = { ...interactions, zoomToFit: { enabled: true } };\n }\n });\n\n return interactions;\n};\n\n/**\n * Generates chart config based on slots\n * @param children - CharInteraction children\n * @returns ChartInteraction slot config\n */\nconst iterateChartToolbarSlots = (children: ReactNode) => {\n let toolbar = {};\n\n Children.forEach(children, (childToolbar) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (isSlot(childToolbar, ChartToolbar.DownloadData)) {\n toolbar = {\n ...toolbar,\n downloadCSV: { enabled: true },\n };\n }\n });\n\n return toolbar;\n};\n"],
4
+ "sourcesContent": ["import { isEmpty, isUndefined } from 'lodash-es';\nimport { Children, type ReactNode } from 'react';\n\nimport { ChartToolbar } from '@dynatrace/strato-components/charts';\n\nimport {\n DEFAULT_BASE_LAYER_RULES,\n DEFAULT_MAP_LEGEND_RATIO,\n DEFAULT_MAP_POSITION,\n DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE,\n} from '../constants.js';\nimport { isSlot } from './is-slot.js';\nimport { replaceInfiniteValuesInRanges } from './replace-infinite-values-in-ranges.js';\nimport { BaseLayer } from '../slots/BaseLayer.js';\nimport { CategoricalLegend } from '../slots/CategoricalLegend.js';\nimport { ChartInteractions } from '../slots/ChartInteractions.js';\nimport { DownloadCSV } from '../slots/DownloadCSV.js';\nimport { SequentialLegend } from '../slots/SequentialLegend.js';\nimport { ThresholdLegend } from '../slots/ThresholdLegend.js';\nimport { sanitizeProps, Toolbar } from '../slots/Toolbar.js';\nimport { Zoom } from '../slots/Zoom.js';\nimport type { MapConfig } from '../types/configuration.js';\nimport type {\n ChartInteractionsConfig,\n MapToolbarConfig,\n} from '../types/toolbar.js';\n\n/**\n * Generate map config based on slots\n * @param children - Map children\n * @param legendDomain - Domain containing min and max value relevant for legend\n * @returns Map slot config\n */\nexport const iterateConfigSlots = (\n children: ReactNode,\n legendDomain: [number, number],\n) => {\n let slots: MapConfig = {\n toolbar: undefined,\n interactions: undefined,\n legend: undefined,\n baseLayer: DEFAULT_BASE_LAYER_RULES,\n };\n\n let slotMapToolbarConfig: MapToolbarConfig = {};\n\n Children.forEach(children, (child) => {\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n if (isSlot(child, ChartInteractions)) {\n const { children, ...previousInteractions } = child.props;\n\n const interactions = iterateChartInteractionsSlots(children);\n\n slots = {\n ...slots,\n interactions: {\n ...previousInteractions,\n ...interactions,\n },\n };\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n } else if (isSlot(child, ChartToolbar)) {\n const { children, ...toolbar } = child.props;\n const childrenToolbar = iterateChartToolbarSlots(children);\n\n slots = {\n ...slots,\n toolbar: {\n ...toolbar,\n ...childrenToolbar,\n },\n };\n } else if (isSlot(child, SequentialLegend)) {\n slots = {\n ...slots,\n legend: {\n type: 'sequential',\n colorPalette: DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE,\n position: DEFAULT_MAP_POSITION,\n ratio: DEFAULT_MAP_LEGEND_RATIO,\n ...child.props,\n min: child.props.min ?? legendDomain[0],\n max: child.props.max ?? legendDomain[1],\n },\n };\n } else if (isSlot(child, CategoricalLegend)) {\n slots = {\n ...slots,\n legend: {\n type: 'categorical',\n position: DEFAULT_MAP_POSITION,\n ...child.props,\n },\n };\n } else if (isSlot(child, ThresholdLegend)) {\n const getDomainValue = (index: number, legendDomainValue: number) =>\n Number.isFinite(legendDomainValue)\n ? legendDomainValue\n : child.props.ranges?.at(index)?.to ?? legendDomainValue;\n\n const ranges = replaceInfiniteValuesInRanges(child.props.ranges, [\n getDomainValue(0, legendDomain[0]),\n getDomainValue(-1, legendDomain[1]),\n ]);\n\n slots = {\n ...slots,\n legend: {\n type: 'threshold',\n position: DEFAULT_MAP_POSITION,\n ratio: DEFAULT_MAP_LEGEND_RATIO,\n ...child.props,\n ranges,\n },\n };\n } else if (isSlot(child, Toolbar)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n ...sanitizeProps(child.props),\n };\n } else if (isSlot(child, DownloadCSV)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n downloadCSV: { enabled: true },\n };\n } else if (isSlot(child, Zoom)) {\n slotMapToolbarConfig = {\n ...slotMapToolbarConfig,\n zoom: { enabled: child.props.disabled !== true },\n };\n } else if (isSlot(child, BaseLayer)) {\n slots = {\n ...slots,\n baseLayer: {\n ...slots.baseLayer,\n ...child.props,\n },\n };\n }\n });\n\n // Enable zoom by default if toolbar config exists, Zoom is not set, and toolbar is visible\n const shouldEnableDefaultZoom =\n isUndefined(slotMapToolbarConfig.zoom) &&\n !isEmpty(slotMapToolbarConfig) &&\n slots.toolbar?.hidden !== true;\n\n if (shouldEnableDefaultZoom) {\n slotMapToolbarConfig.zoom = { enabled: true };\n }\n\n if (!isEmpty(slotMapToolbarConfig)) {\n slots.toolbar = { ...slots.toolbar, ...slotMapToolbarConfig };\n }\n return slots;\n};\n\nconst iterateChartInteractionsSlots = (children: ReactNode) => {\n let interactions: ChartInteractionsConfig = {};\n\n Children.forEach(children, (childInteractions) => {\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n if (isSlot(childInteractions, ChartInteractions.Zoom)) {\n interactions = { ...interactions, zoom: { enabled: true } };\n /* eslint-disable-next-line @typescript-eslint/no-deprecated */\n } else if (isSlot(childInteractions, ChartInteractions.ZoomToFit)) {\n interactions = { ...interactions, zoomToFit: { enabled: true } };\n }\n });\n\n return interactions;\n};\n\n/**\n * Generates chart config based on slots\n * @param children - CharInteraction children\n * @returns ChartInteraction slot config\n */\nconst iterateChartToolbarSlots = (children: ReactNode) => {\n let toolbar = {};\n\n Children.forEach(children, (childToolbar) => {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n if (isSlot(childToolbar, ChartToolbar.DownloadData)) {\n toolbar = {\n ...toolbar,\n downloadCSV: { enabled: true },\n };\n }\n });\n\n return toolbar;\n};\n"],
5
5
  "mappings": "AAAA,SAAS,SAAS,mBAAmB;AACrC,SAAS,gBAAgC;AAEzC,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,cAAc;AACvB,SAAS,qCAAqC;AAC9C,SAAS,iBAAiB;AAC1B,SAAS,yBAAyB;AAClC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAC5B,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,eAAe,eAAe;AACvC,SAAS,YAAY;AAad,MAAM,qBAAqB,CAChC,UACA,iBACG;AACH,MAAI,QAAmB;AAAA,IACrB,SAAS;AAAA,IACT,cAAc;AAAA,IACd,QAAQ;AAAA,IACR,WAAW;AAAA,EACb;AAEA,MAAI,uBAAyC,CAAC;AAE9C,WAAS,QAAQ,UAAU,CAAC,UAAU;AAEpC,QAAI,OAAO,OAAO,iBAAiB,GAAG;AACpC,YAAM,EAAE,UAAAA,WAAU,GAAG,qBAAqB,IAAI,MAAM;AAEpD,YAAM,eAAe,8BAA8BA,SAAQ;AAE3D,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,cAAc;AAAA,UACZ,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAAA,IAEF,WAAW,OAAO,OAAO,YAAY,GAAG;AACtC,YAAM,EAAE,UAAAA,WAAU,GAAG,QAAQ,IAAI,MAAM;AACvC,YAAM,kBAAkB,yBAAyBA,SAAQ;AAEzD,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,SAAS;AAAA,UACP,GAAG;AAAA,UACH,GAAG;AAAA,QACL;AAAA,MACF;AAAA,IACF,WAAW,OAAO,OAAO,gBAAgB,GAAG;AAC1C,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,cAAc;AAAA,UACd,UAAU;AAAA,UACV,OAAO;AAAA,UACP,GAAG,MAAM;AAAA,UACT,KAAK,MAAM,MAAM,OAAO,aAAa,CAAC;AAAA,UACtC,KAAK,MAAM,MAAM,OAAO,aAAa,CAAC;AAAA,QACxC;AAAA,MACF;AAAA,IACF,WAAW,OAAO,OAAO,iBAAiB,GAAG;AAC3C,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,UAAU;AAAA,UACV,GAAG,MAAM;AAAA,QACX;AAAA,MACF;AAAA,IACF,WAAW,OAAO,OAAO,eAAe,GAAG;AACzC,YAAM,iBAAiB,CAAC,OAAe,sBACrC,OAAO,SAAS,iBAAiB,IAC7B,oBACA,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM;AAE3C,YAAM,SAAS,8BAA8B,MAAM,MAAM,QAAQ;AAAA,QAC/D,eAAe,GAAG,aAAa,CAAC,CAAC;AAAA,QACjC,eAAe,IAAI,aAAa,CAAC,CAAC;AAAA,MACpC,CAAC;AAED,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,QAAQ;AAAA,UACN,MAAM;AAAA,UACN,UAAU;AAAA,UACV,OAAO;AAAA,UACP,GAAG,MAAM;AAAA,UACT;AAAA,QACF;AAAA,MACF;AAAA,IACF,WAAW,OAAO,OAAO,OAAO,GAAG;AACjC,6BAAuB;AAAA,QACrB,GAAG;AAAA,QACH,GAAG,cAAc,MAAM,KAAK;AAAA,MAC9B;AAAA,IACF,WAAW,OAAO,OAAO,WAAW,GAAG;AACrC,6BAAuB;AAAA,QACrB,GAAG;AAAA,QACH,aAAa,EAAE,SAAS,KAAK;AAAA,MAC/B;AAAA,IACF,WAAW,OAAO,OAAO,IAAI,GAAG;AAC9B,6BAAuB;AAAA,QACrB,GAAG;AAAA,QACH,MAAM,EAAE,SAAS,MAAM,MAAM,aAAa,KAAK;AAAA,MACjD;AAAA,IACF,WAAW,OAAO,OAAO,SAAS,GAAG;AACnC,cAAQ;AAAA,QACN,GAAG;AAAA,QACH,WAAW;AAAA,UACT,GAAG,MAAM;AAAA,UACT,GAAG,MAAM;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AAGD,QAAM,0BACJ,YAAY,qBAAqB,IAAI,KACrC,CAAC,QAAQ,oBAAoB,KAC7B,MAAM,SAAS,WAAW;AAE5B,MAAI,yBAAyB;AAC3B,yBAAqB,OAAO,EAAE,SAAS,KAAK;AAAA,EAC9C;AAEA,MAAI,CAAC,QAAQ,oBAAoB,GAAG;AAClC,UAAM,UAAU,EAAE,GAAG,MAAM,SAAS,GAAG,qBAAqB;AAAA,EAC9D;AACA,SAAO;AACT;AAEA,MAAM,gCAAgC,CAAC,aAAwB;AAC7D,MAAI,eAAwC,CAAC;AAE7C,WAAS,QAAQ,UAAU,CAAC,sBAAsB;AAEhD,QAAI,OAAO,mBAAmB,kBAAkB,IAAI,GAAG;AACrD,qBAAe,EAAE,GAAG,cAAc,MAAM,EAAE,SAAS,KAAK,EAAE;AAAA,IAE5D,WAAW,OAAO,mBAAmB,kBAAkB,SAAS,GAAG;AACjE,qBAAe,EAAE,GAAG,cAAc,WAAW,EAAE,SAAS,KAAK,EAAE;AAAA,IACjE;AAAA,EACF,CAAC;AAED,SAAO;AACT;AAOA,MAAM,2BAA2B,CAAC,aAAwB;AACxD,MAAI,UAAU,CAAC;AAEf,WAAS,QAAQ,UAAU,CAAC,iBAAiB;AAE3C,QAAI,OAAO,cAAc,aAAa,YAAY,GAAG;AACnD,gBAAU;AAAA,QACR,GAAG;AAAA,QACH,aAAa,EAAE,SAAS,KAAK;AAAA,MAC/B;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
6
6
  "names": ["children"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/replace-infinite-values-in-ranges.ts"],
4
- "sourcesContent": ["import { ColoredRange } from '@dynatrace/strato-components-preview/charts';\n\nexport const replaceInfiniteValuesInRanges = (\n ranges: ColoredRange[],\n domain: [number, number],\n) => {\n const replaceInfiniteValues = (value: number) => {\n if (value === -Infinity) {\n if (domain[0] >= 0) {\n return 0;\n } else {\n return domain[0];\n }\n }\n if (value === Infinity) {\n if (domain[1] <= 0) {\n return 0;\n } else {\n return domain[1];\n }\n }\n return value;\n };\n\n return ranges.map((range: ColoredRange) => {\n return {\n ...range,\n from: replaceInfiniteValues(range.from),\n to: replaceInfiniteValues(range.to),\n };\n });\n};\n"],
4
+ "sourcesContent": ["import { ColoredRange } from '@dynatrace/strato-components/charts';\n\nexport const replaceInfiniteValuesInRanges = (\n ranges: ColoredRange[],\n domain: [number, number],\n) => {\n const replaceInfiniteValues = (value: number) => {\n if (value === -Infinity) {\n if (domain[0] >= 0) {\n return 0;\n } else {\n return domain[0];\n }\n }\n if (value === Infinity) {\n if (domain[1] <= 0) {\n return 0;\n } else {\n return domain[1];\n }\n }\n return value;\n };\n\n return ranges.map((range: ColoredRange) => {\n return {\n ...range,\n from: replaceInfiniteValues(range.from),\n to: replaceInfiniteValues(range.to),\n };\n });\n};\n"],
5
5
  "mappings": "AAEO,MAAM,gCAAgC,CAC3C,QACA,WACG;AACH,QAAM,wBAAwB,CAAC,UAAkB;AAC/C,QAAI,UAAU,WAAW;AACvB,UAAI,OAAO,CAAC,KAAK,GAAG;AAClB,eAAO;AAAA,MACT,OAAO;AACL,eAAO,OAAO,CAAC;AAAA,MACjB;AAAA,IACF;AACA,QAAI,UAAU,UAAU;AACtB,UAAI,OAAO,CAAC,KAAK,GAAG;AAClB,eAAO;AAAA,MACT,OAAO;AACL,eAAO,OAAO,CAAC;AAAA,MACjB;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,SAAO,OAAO,IAAI,CAAC,UAAwB;AACzC,WAAO;AAAA,MACL,GAAG;AAAA,MACH,MAAM,sBAAsB,MAAM,IAAI;AAAA,MACtC,IAAI,sBAAsB,MAAM,EAAE;AAAA,IACpC;AAAA,EACF,CAAC;AACH;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import { isObject, isUndefined } from "lodash-es";
2
- import { _accessValue as accessValue } from "@dynatrace/strato-components-preview/core";
2
+ import { _accessValue as accessValue } from "@dynatrace/strato-components/core";
3
3
  const NESTED_LEVELS_SUPPORTED = 2;
4
4
  const buildColumnsHeadersMapping = (columns) => new Map([...columns].map((value, index) => [value, index]));
5
5
  const getObjectHeaders = (data, objectKey = "", nestingLevel = 0) => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/map/utils/tabularize-layers-data.ts"],
4
- "sourcesContent": ["import { isObject, isUndefined } from 'lodash-es';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components-preview/core';\n\nconst NESTED_LEVELS_SUPPORTED = 2;\n\nconst buildColumnsHeadersMapping = (columns: Set<string>) =>\n new Map([...columns].map((value, index) => [value, index]));\n\nconst getObjectHeaders = (\n data: Record<string, unknown>[],\n objectKey = '',\n nestingLevel = 0,\n) => {\n let columnHeaders: string[] = [];\n\n if (nestingLevel <= NESTED_LEVELS_SUPPORTED) {\n for (let i = 0; i < data.length; i++) {\n for (const [key, value] of Object.entries(data[i])) {\n const objectPath = [objectKey, key].filter((a) => a).join('.');\n if (!isObject(value)) {\n columnHeaders.push(objectPath);\n } else if (!Array.isArray(value)) {\n const headers = getObjectHeaders(\n [value as Record<string, unknown>],\n objectPath,\n nestingLevel + 1,\n );\n columnHeaders = columnHeaders.concat(headers);\n }\n }\n }\n }\n return columnHeaders;\n};\n\n/**\n * Returns a set of object keys as column headers\n *\n * @param data - layers data\n */\nexport const getColumnHeaders = (\n data: Record<string, unknown>[],\n): Set<string> => {\n const objectColumnHeaders = getObjectHeaders(data);\n const columnHeadersSet = new Set(objectColumnHeaders);\n const sortedHeaders = ['layer-name', 'latitude', 'longitude'];\n const startingHeaders = sortedHeaders.reduce(\n (headersList: string[], column) => {\n if (columnHeadersSet.has(column)) {\n headersList.push(column);\n }\n return headersList;\n },\n [],\n );\n\n return new Set([...startingHeaders, ...objectColumnHeaders]);\n};\n\n/**\n * Creates a tabular representation of the layer's data\n *\n * @param data - layers data\n */\nexport const tabularizeLayersData = (data: Record<string, unknown>[]) => {\n let csv = '';\n\n if (data.length > 0) {\n const columnHeaders = getColumnHeaders(data);\n csv += `${[...columnHeaders].join(',')}\\n`;\n\n const columnCount = columnHeaders.size;\n const headersMapping = buildColumnsHeadersMapping(columnHeaders);\n\n for (const datum of data) {\n const row: unknown[] = [];\n row.length = columnCount;\n for (const [column, index] of headersMapping) {\n let value = accessValue(datum, column);\n if (!isUndefined(value)) {\n if (typeof value === 'string' && value.includes(',')) {\n value = `\"${value}\"`;\n }\n row[index] = value;\n }\n }\n csv += `${row.join(',')}\\n`;\n }\n }\n\n return csv;\n};\n"],
4
+ "sourcesContent": ["import { isObject, isUndefined } from 'lodash-es';\n\nimport { _accessValue as accessValue } from '@dynatrace/strato-components/core';\n\nconst NESTED_LEVELS_SUPPORTED = 2;\n\nconst buildColumnsHeadersMapping = (columns: Set<string>) =>\n new Map([...columns].map((value, index) => [value, index]));\n\nconst getObjectHeaders = (\n data: Record<string, unknown>[],\n objectKey = '',\n nestingLevel = 0,\n) => {\n let columnHeaders: string[] = [];\n\n if (nestingLevel <= NESTED_LEVELS_SUPPORTED) {\n for (let i = 0; i < data.length; i++) {\n for (const [key, value] of Object.entries(data[i])) {\n const objectPath = [objectKey, key].filter((a) => a).join('.');\n if (!isObject(value)) {\n columnHeaders.push(objectPath);\n } else if (!Array.isArray(value)) {\n const headers = getObjectHeaders(\n [value as Record<string, unknown>],\n objectPath,\n nestingLevel + 1,\n );\n columnHeaders = columnHeaders.concat(headers);\n }\n }\n }\n }\n return columnHeaders;\n};\n\n/**\n * Returns a set of object keys as column headers\n *\n * @param data - layers data\n */\nexport const getColumnHeaders = (\n data: Record<string, unknown>[],\n): Set<string> => {\n const objectColumnHeaders = getObjectHeaders(data);\n const columnHeadersSet = new Set(objectColumnHeaders);\n const sortedHeaders = ['layer-name', 'latitude', 'longitude'];\n const startingHeaders = sortedHeaders.reduce(\n (headersList: string[], column) => {\n if (columnHeadersSet.has(column)) {\n headersList.push(column);\n }\n return headersList;\n },\n [],\n );\n\n return new Set([...startingHeaders, ...objectColumnHeaders]);\n};\n\n/**\n * Creates a tabular representation of the layer's data\n *\n * @param data - layers data\n */\nexport const tabularizeLayersData = (data: Record<string, unknown>[]) => {\n let csv = '';\n\n if (data.length > 0) {\n const columnHeaders = getColumnHeaders(data);\n csv += `${[...columnHeaders].join(',')}\\n`;\n\n const columnCount = columnHeaders.size;\n const headersMapping = buildColumnsHeadersMapping(columnHeaders);\n\n for (const datum of data) {\n const row: unknown[] = [];\n row.length = columnCount;\n for (const [column, index] of headersMapping) {\n let value = accessValue(datum, column);\n if (!isUndefined(value)) {\n if (typeof value === 'string' && value.includes(',')) {\n value = `\"${value}\"`;\n }\n row[index] = value;\n }\n }\n csv += `${row.join(',')}\\n`;\n }\n }\n\n return csv;\n};\n"],
5
5
  "mappings": "AAAA,SAAS,UAAU,mBAAmB;AAEtC,SAAS,gBAAgB,mBAAmB;AAE5C,MAAM,0BAA0B;AAEhC,MAAM,6BAA6B,CAAC,YAClC,IAAI,IAAI,CAAC,GAAG,OAAO,EAAE,IAAI,CAAC,OAAO,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC;AAE5D,MAAM,mBAAmB,CACvB,MACA,YAAY,IACZ,eAAe,MACZ;AACH,MAAI,gBAA0B,CAAC;AAE/B,MAAI,gBAAgB,yBAAyB;AAC3C,aAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,iBAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,KAAK,CAAC,CAAC,GAAG;AAClD,cAAM,aAAa,CAAC,WAAW,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,KAAK,GAAG;AAC7D,YAAI,CAAC,SAAS,KAAK,GAAG;AACpB,wBAAc,KAAK,UAAU;AAAA,QAC/B,WAAW,CAAC,MAAM,QAAQ,KAAK,GAAG;AAChC,gBAAM,UAAU;AAAA,YACd,CAAC,KAAgC;AAAA,YACjC;AAAA,YACA,eAAe;AAAA,UACjB;AACA,0BAAgB,cAAc,OAAO,OAAO;AAAA,QAC9C;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAOO,MAAM,mBAAmB,CAC9B,SACgB;AAChB,QAAM,sBAAsB,iBAAiB,IAAI;AACjD,QAAM,mBAAmB,IAAI,IAAI,mBAAmB;AACpD,QAAM,gBAAgB,CAAC,cAAc,YAAY,WAAW;AAC5D,QAAM,kBAAkB,cAAc;AAAA,IACpC,CAAC,aAAuB,WAAW;AACjC,UAAI,iBAAiB,IAAI,MAAM,GAAG;AAChC,oBAAY,KAAK,MAAM;AAAA,MACzB;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AAEA,SAAO,oBAAI,IAAI,CAAC,GAAG,iBAAiB,GAAG,mBAAmB,CAAC;AAC7D;AAOO,MAAM,uBAAuB,CAAC,SAAoC;AACvE,MAAI,MAAM;AAEV,MAAI,KAAK,SAAS,GAAG;AACnB,UAAM,gBAAgB,iBAAiB,IAAI;AAC3C,WAAO,GAAG,CAAC,GAAG,aAAa,EAAE,KAAK,GAAG,CAAC;AAAA;AAEtC,UAAM,cAAc,cAAc;AAClC,UAAM,iBAAiB,2BAA2B,aAAa;AAE/D,eAAW,SAAS,MAAM;AACxB,YAAM,MAAiB,CAAC;AACxB,UAAI,SAAS;AACb,iBAAW,CAAC,QAAQ,KAAK,KAAK,gBAAgB;AAC5C,YAAI,QAAQ,YAAY,OAAO,MAAM;AACrC,YAAI,CAAC,YAAY,KAAK,GAAG;AACvB,cAAI,OAAO,UAAU,YAAY,MAAM,SAAS,GAAG,GAAG;AACpD,oBAAQ,IAAI,KAAK;AAAA,UACnB;AACA,cAAI,KAAK,IAAI;AAAA,QACf;AAAA,MACF;AACA,aAAO,GAAG,IAAI,KAAK,GAAG,CAAC;AAAA;AAAA,IACzB;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }