@dynatrace/strato-geo 0.8.13 → 0.9.17
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.
- package/esm/map/MapView.js +15 -13
- package/esm/map/MapView.js.map +2 -2
- package/esm/map/components/BubbleLayer/BubbleLayer.js.map +2 -2
- package/esm/map/components/BubbleLayer/BubbleLayerTooltip.js.map +1 -1
- package/esm/map/components/BubbleLayer/functions/add-outline-size.js.map +1 -1
- package/esm/map/components/BubbleLayer/functions/build-radius-scale.js +4 -1
- package/esm/map/components/BubbleLayer/functions/build-radius-scale.js.map +2 -2
- package/esm/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.js.map +1 -1
- package/esm/map/components/BubbleLayer/functions/define-radius.js.map +1 -1
- package/esm/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.js.map +1 -1
- package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js.map +2 -2
- package/esm/map/components/ChoroplethLayer/ChoroplethLayerTooltip.js.map +1 -1
- package/esm/map/components/ConnectionLayer/ConnectionLayer.js.map +1 -1
- package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js.map +1 -1
- package/esm/map/components/ConnectionLayer/ConnectionLayerTooltip.js.map +1 -1
- package/esm/map/components/ConnectionLayer/functions/get-arc-line-features.js.map +1 -1
- package/esm/map/components/ConnectionLayer/functions/get-straight-line-features.js.map +1 -1
- package/esm/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.js.map +1 -1
- package/esm/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.js.map +1 -1
- package/esm/map/components/DefaultTooltip/DefaultTooltip.js.map +1 -1
- package/esm/map/components/DefaultTooltip/utils/handle-copy-to-clipboard.js.map +1 -1
- package/esm/map/components/DotLayer/DotLayer.js +1 -1
- package/esm/map/components/DotLayer/DotLayer.js.map +2 -2
- package/esm/map/components/DotLayer/DotLayerTooltip.js.map +1 -1
- package/esm/map/components/DotLayer/functions/define-bearing.js.map +1 -1
- package/esm/map/components/DotLayer/functions/parse-dot-data-to-geo-json.js.map +1 -1
- package/esm/map/components/MapContent.js.map +2 -2
- package/esm/map/components/legend/CategoricalLegendRenderer.js.map +2 -2
- package/esm/map/components/legend/SequentialLegendRenderer.js.map +1 -1
- package/esm/map/components/legend/ThresholdLegendRenderer.js.map +1 -1
- package/esm/map/components/legend/functions/resolve-color.js.map +1 -1
- package/esm/map/components/toolbar/constants.js.map +1 -1
- package/esm/map/components/toolbar/functions/a11y-toolbar-controls.js.map +1 -1
- package/esm/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.js.map +1 -1
- package/esm/map/constants.js +4 -2
- package/esm/map/constants.js.map +2 -2
- package/esm/map/contexts/a11y-toolbar-tab-index.context.js.map +1 -1
- package/esm/map/contexts/color-scale.context.js.map +1 -1
- package/esm/map/contexts/map-configuration.context.js.map +1 -1
- package/esm/map/contexts/map-initial-view.context.js.map +1 -1
- package/esm/map/functions/__test__/fixtures/business-locations.js.map +1 -1
- package/esm/map/functions/__test__/fixtures/events-locations.js.map +1 -1
- package/esm/map/functions/__test__/fixtures/facilities-locations.js.map +1 -1
- package/esm/map/functions/__test__/fixtures/flight-connections.js.map +1 -1
- package/esm/map/functions/attach-image-from-shape.js.map +1 -1
- package/esm/map/functions/attach-image-from-string.js.map +1 -1
- package/esm/map/functions/attach-image-from-text.js.map +1 -1
- package/esm/map/functions/attach-image-to-map.js.map +1 -1
- package/esm/map/functions/build-categorical-scale.js.map +1 -1
- package/esm/map/functions/extract-layers-data.js.map +1 -1
- package/esm/map/functions/get-client-settings.js.map +1 -1
- package/esm/map/functions/get-data-layers-bounding-box.js.map +1 -1
- package/esm/map/functions/is-valid-shape.js.map +1 -1
- package/esm/map/functions/iterate-config-slots.js +10 -1
- package/esm/map/functions/iterate-config-slots.js.map +2 -2
- package/esm/map/functions/parse-tooltip-data.js.map +1 -1
- package/esm/map/functions/set-layers-id.js +1 -0
- package/esm/map/functions/set-layers-id.js.map +2 -2
- package/esm/map/functions/tooltip-type-guards.js.map +1 -1
- package/esm/map/hooks/use-active-interaction.js.map +1 -1
- package/esm/map/hooks/use-attach-image-from-icon.js.map +2 -2
- package/esm/map/hooks/use-attach-symbol-to-map.js.map +1 -1
- package/esm/map/hooks/use-color-scale.js.map +1 -1
- package/esm/map/hooks/use-hover-interaction.js.map +2 -2
- package/esm/map/hooks/use-initial-view-state.js.map +1 -1
- package/esm/map/hooks/use-legend-interaction-highlighting.js.map +1 -1
- package/esm/map/hooks/use-legend-interaction-visibility.js.map +1 -1
- package/esm/map/hooks/use-load-symbol-into-map.js.map +1 -1
- package/esm/map/hooks/use-map-performance.js +0 -15
- package/esm/map/hooks/use-map-performance.js.map +2 -2
- package/esm/map/hooks/use-overlay-events.js.map +1 -1
- package/esm/map/hooks/use-tooltip-template.js.map +2 -2
- package/esm/map/providers/color-scale.provider.js.map +2 -2
- package/esm/map/providers/layer-color-strategy.provider.js.map +2 -2
- package/esm/map/providers/map-initial-view.provider.js.map +2 -2
- package/esm/map/shapes/shape-picker.js.map +1 -1
- package/esm/map/slots/BubbleLayer.js.map +1 -1
- package/esm/map/slots/BubbleLayerTooltip.js.map +1 -1
- package/esm/map/slots/CategoricalLegend.js.map +1 -1
- package/esm/map/slots/ChartInteractions.js.map +1 -1
- package/esm/map/slots/ChoroplethLayer.js.map +1 -1
- package/esm/map/slots/ChoroplethLayerTooltip.js.map +1 -1
- package/esm/map/slots/ConnectionLayer.js.map +1 -1
- package/esm/map/slots/ConnectionLayerTooltip.js.map +1 -1
- package/esm/map/slots/DotLayer.js.map +1 -1
- package/esm/map/slots/DotLayerTooltip.js.map +1 -1
- package/esm/map/slots/SequentialLegend.js.map +1 -1
- package/esm/map/slots/ThresholdLegend.js.map +1 -1
- package/esm/map/slots/Tooltip.js.map +2 -2
- package/esm/map/slots/states/DisabledState.js.map +2 -2
- package/esm/map/slots/states/ErrorStateSlot.js.map +1 -1
- package/esm/map/store/map-store.context.js +3 -1
- package/esm/map/store/map-store.context.js.map +2 -2
- package/esm/map/store/map-store.provider.js +3 -1
- package/esm/map/store/map-store.provider.js.map +2 -2
- package/esm/map/store/selectors.js.map +1 -1
- package/esm/map/store/store.js.map +1 -1
- package/esm/map/types/bubble-layer.js.map +1 -1
- package/esm/map/types/coloring.js.map +1 -1
- package/map/MapView.d.ts +1 -1
- package/map/MapView.js +14 -8
- package/map/components/BubbleLayer/BubbleLayer.d.ts +3 -3
- package/map/components/BubbleLayer/BubbleLayerTooltip.d.ts +1 -1
- package/map/components/BubbleLayer/functions/add-outline-size.d.ts +1 -1
- package/map/components/BubbleLayer/functions/build-radius-scale.d.ts +2 -2
- package/map/components/BubbleLayer/functions/build-stick-to-distance-expressions.d.ts +1 -1
- package/map/components/BubbleLayer/functions/define-radius.d.ts +1 -1
- package/map/components/BubbleLayer/functions/parse-bubble-data-to-geo-json.d.ts +2 -2
- package/map/components/ChoroplethLayer/ChoroplethLayer.d.ts +2 -2
- package/map/components/ChoroplethLayer/ChoroplethLayerTooltip.d.ts +1 -1
- package/map/components/ConnectionLayer/ConnectionLayer.d.ts +1 -1
- package/map/components/ConnectionLayer/ConnectionLayerDirection.d.ts +1 -1
- package/map/components/ConnectionLayer/ConnectionLayerTooltip.d.ts +1 -1
- package/map/components/ConnectionLayer/functions/get-arc-line-features.d.ts +2 -2
- package/map/components/ConnectionLayer/functions/get-straight-line-features.d.ts +2 -2
- package/map/components/ConnectionLayer/functions/parse-connection-data-to-geo-json.d.ts +1 -1
- package/map/components/ConnectionLayer/functions/parse-direction-data-to-geo-json.d.ts +1 -1
- package/map/components/DefaultTooltip/DefaultTooltip.d.ts +1 -1
- package/map/components/DefaultTooltip/utils/handle-copy-to-clipboard.d.ts +1 -1
- package/map/components/DotLayer/DotLayer.d.ts +3 -3
- package/map/components/DotLayer/DotLayer.js +1 -1
- package/map/components/DotLayer/DotLayerTooltip.d.ts +1 -1
- package/map/components/DotLayer/functions/define-bearing.d.ts +1 -1
- package/map/components/DotLayer/functions/parse-dot-data-to-geo-json.d.ts +1 -1
- package/map/components/MapContent.d.ts +1 -1
- package/map/components/legend/functions/resolve-color.d.ts +1 -1
- package/map/components/toolbar/constants.d.ts +1 -1
- package/map/components/toolbar/functions/a11y-toolbar-controls.d.ts +1 -1
- package/map/components/toolbar/hooks/use-a11y-toolbar-tab-index.d.ts +1 -1
- package/map/constants.d.ts +3 -2
- package/map/constants.js +4 -2
- package/map/contexts/a11y-toolbar-tab-index.context.d.ts +1 -1
- package/map/contexts/color-scale.context.d.ts +1 -1
- package/map/contexts/map-configuration.context.d.ts +1 -1
- package/map/contexts/map-initial-view.context.d.ts +1 -1
- package/map/functions/__test__/fixtures/business-locations.d.ts +1 -1
- package/map/functions/__test__/fixtures/events-locations.d.ts +1 -1
- package/map/functions/__test__/fixtures/facilities-locations.d.ts +1 -1
- package/map/functions/__test__/fixtures/flight-connections.d.ts +1 -1
- package/map/functions/attach-image-from-shape.d.ts +2 -2
- package/map/functions/attach-image-from-string.d.ts +2 -2
- package/map/functions/attach-image-from-text.d.ts +1 -1
- package/map/functions/attach-image-to-map.d.ts +1 -1
- package/map/functions/build-categorical-scale.d.ts +1 -1
- package/map/functions/is-valid-shape.d.ts +2 -2
- package/map/functions/iterate-config-slots.d.ts +1 -1
- package/map/functions/iterate-config-slots.js +5 -0
- package/map/functions/parse-tooltip-data.d.ts +1 -1
- package/map/functions/set-layers-id.js +1 -0
- package/map/functions/tooltip-type-guards.d.ts +1 -1
- package/map/hooks/use-attach-image-from-icon.d.ts +2 -2
- package/map/hooks/use-attach-symbol-to-map.d.ts +2 -2
- package/map/hooks/use-color-scale.d.ts +1 -1
- package/map/hooks/use-initial-view-state.d.ts +1 -1
- package/map/hooks/use-legend-interaction-highlighting.d.ts +4 -4
- package/map/hooks/use-legend-interaction-visibility.d.ts +4 -4
- package/map/hooks/use-load-symbol-into-map.d.ts +2 -2
- package/map/hooks/use-map-performance.d.ts +0 -15
- package/map/hooks/use-map-performance.js +0 -15
- package/map/hooks/use-overlay-events.d.ts +1 -1
- package/map/hooks/use-tooltip-template.d.ts +2 -2
- package/map/providers/color-scale.provider.d.ts +1 -1
- package/map/providers/layer-color-strategy.provider.d.ts +3 -3
- package/map/providers/map-initial-view.provider.d.ts +2 -2
- package/map/shapes/shape-picker.d.ts +1 -1
- package/map/slots/BubbleLayer.d.ts +5 -5
- package/map/slots/BubbleLayerTooltip.d.ts +1 -1
- package/map/slots/CategoricalLegend.d.ts +1 -1
- package/map/slots/ChartInteractions.d.ts +2 -2
- package/map/slots/ChoroplethLayer.d.ts +3 -3
- package/map/slots/ChoroplethLayerTooltip.d.ts +1 -1
- package/map/slots/ConnectionLayer.d.ts +3 -3
- package/map/slots/ConnectionLayerTooltip.d.ts +1 -1
- package/map/slots/DotLayer.d.ts +5 -5
- package/map/slots/DotLayerTooltip.d.ts +1 -1
- package/map/slots/SequentialLegend.d.ts +1 -1
- package/map/slots/ThresholdLegend.d.ts +1 -1
- package/map/slots/Tooltip.d.ts +1 -1
- package/map/slots/states/ErrorStateSlot.d.ts +2 -2
- package/map/store/map-store.context.d.ts +2 -2
- package/map/store/map-store.provider.d.ts +1 -1
- package/map/store/selectors.d.ts +1 -1
- package/map/store/store.d.ts +1 -1
- package/map/types/bubble-layer.d.ts +2 -2
- package/map/types/choropleth-layer.d.ts +1 -1
- package/map/types/coloring.d.ts +1 -1
- package/map/types/configuration.d.ts +2 -2
- package/map/types/connection-layer.d.ts +1 -1
- package/map/types/dot-layer.d.ts +5 -5
- package/map/types/legend.d.ts +3 -25
- package/map/types/map-view.d.ts +3 -3
- package/map/types/state.d.ts +1 -1
- package/map/types/toolbar.d.ts +1 -1
- package/map/types/tooltip.d.ts +2 -2
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/components/DotLayer/functions/parse-dot-data-to-geo-json.ts"],
|
|
4
|
-
"sourcesContent": ["import { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { defineBearing } from './define-bearing.js';\nimport { calculateHoveredColor } from '../../../functions/calculate-hovered-color.js';\nimport { defineColor } from '../../../functions/define-color.js';\nimport { Location } from '../../../types/location.js';\n\nexport const parseDotDataToGeoJSON = <T extends Location>(\n data: T[],\n color: string | ((item: T) => string),\n bearing: number | ((item: T) => number),\n) => {\n return {\n type: 'FeatureCollection',\n features: data.map((feature) => {\n const { longitude, latitude, ...properties } = feature;\n const canvasColor = getCanvasColor(defineColor(color, feature));\n const hoveredColor = calculateHoveredColor(canvasColor);\n\n return {\n type: 'Feature',\n properties: {\n data: feature,\n ...properties,\n __color: canvasColor,\n __hoveredColor: hoveredColor,\n __bearing: defineBearing(bearing, feature),\n },\n geometry: { type: 'Point', coordinates: [longitude, latitude] },\n };\n }),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { defineBearing } from './define-bearing.js';\nimport { calculateHoveredColor } from '../../../functions/calculate-hovered-color.js';\nimport { defineColor } from '../../../functions/define-color.js';\nimport type { Location } from '../../../types/location.js';\n\nexport const parseDotDataToGeoJSON = <T extends Location>(\n data: T[],\n color: string | ((item: T) => string),\n bearing: number | ((item: T) => number),\n) => {\n return {\n type: 'FeatureCollection',\n features: data.map((feature) => {\n const { longitude, latitude, ...properties } = feature;\n const canvasColor = getCanvasColor(defineColor(color, feature));\n const hoveredColor = calculateHoveredColor(canvasColor);\n\n return {\n type: 'Feature',\n properties: {\n data: feature,\n ...properties,\n __color: canvasColor,\n __hoveredColor: hoveredColor,\n __bearing: defineBearing(bearing, feature),\n },\n geometry: { type: 'Point', coordinates: [longitude, latitude] },\n };\n }),\n };\n};\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB;AAGrB,MAAM,wBAAwB,CACnC,MACA,OACA,YACG;AACH,SAAO;AAAA,IACL,MAAM;AAAA,IACN,UAAU,KAAK,IAAI,CAAC,YAAY;AAC9B,YAAM,EAAE,WAAW,UAAU,GAAG,WAAW,IAAI;AAC/C,YAAM,cAAc,eAAe,YAAY,OAAO,OAAO,CAAC;AAC9D,YAAM,eAAe,sBAAsB,WAAW;AAEtD,aAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,MAAM;AAAA,UACN,GAAG;AAAA,UACH,SAAS;AAAA,UACT,gBAAgB;AAAA,UAChB,WAAW,cAAc,SAAS,OAAO;AAAA,QAC3C;AAAA,QACA,UAAU,EAAE,MAAM,SAAS,aAAa,CAAC,WAAW,QAAQ,EAAE;AAAA,MAChE;AAAA,IACF,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/components/MapContent.tsx"],
|
|
4
|
-
"sourcesContent": ["import { isUndefined } from 'lodash-es';\nimport { MapLayerMouseEvent } from 'maplibre-gl';\nimport React, {\n forwardRef,\n PropsWithChildren,\n useContext,\n useRef,\n} from 'react';\nimport { Layer,
|
|
5
|
-
"mappings": "AAAA,SAAS,mBAAmB;AAE5B,OAAO;AAAA,EACL;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,SAAS,
|
|
4
|
+
"sourcesContent": ["import { isUndefined } from 'lodash-es';\nimport type { MapLayerMouseEvent } from 'maplibre-gl';\nimport React, {\n forwardRef,\n type PropsWithChildren,\n useContext,\n useRef,\n} from 'react';\nimport { Layer, Map, Source, type LayerProps } from 'react-map-gl/maplibre';\n\nimport { _useGraphSize as useGraphSize } from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport { MapToolbar } from './toolbar/MapToolbar.js';\nimport {\n DEFAULT_COUNTRIES_BORDER_COLOR,\n DEFAULT_COUNTRIES_FILL_COLOR,\n} from '../constants.js';\nimport { LayerIdsContext } from '../contexts/layer-ids.context.js';\nimport { getColorFromToken } from '../functions/get-color-from-token.js';\nimport { toMapBoxInitialViewState } from '../functions/to-mapbox-initial-view-state.js';\nimport { useActiveInteraction } from '../hooks/use-active-interaction.js';\nimport { useHoverInteraction } from '../hooks/use-hover-interaction.js';\nimport { useInitialViewState } from '../hooks/use-initial-view-state.js';\nimport { useMapConfig } from '../hooks/use-map-config.js';\nimport { useMapPerformance } from '../hooks/use-map-performance.js';\nimport { useMapSource } from '../hooks/use-map-source.js';\nimport { useOverlayEvents } from '../hooks/use-overlay-events.js';\nimport { useTooltipEventListeners } from '../hooks/use-tooltip-event-listeners.js';\nimport { defaultStyle } from '../map-styles/default-style.js';\nimport type { MapViewProps } from '../types/map-view.js';\n\nconst lineLayer: LayerProps = {\n id: 'geojson-line',\n type: 'line',\n};\n\nconst fillLayer: LayerProps = {\n id: 'geojson-fill',\n type: 'fill',\n};\n\nconst MapSource = () => {\n const mapData = useMapSource();\n\n return (\n <Source id=\"data\" type=\"geojson\" data={mapData}>\n <Layer\n {...fillLayer}\n paint={{\n 'fill-color': getColorFromToken(DEFAULT_COUNTRIES_FILL_COLOR),\n }}\n ></Layer>\n <Layer\n {...lineLayer}\n paint={{\n 'line-color': getColorFromToken(DEFAULT_COUNTRIES_BORDER_COLOR),\n }}\n ></Layer>\n </Source>\n );\n};\n\nconst MapInteractions = ({ children }: PropsWithChildren) => {\n useHoverInteraction();\n useActiveInteraction();\n\n return children;\n};\n\nexport const MapContent = forwardRef<\n HTMLDivElement,\n PropsWithChildren<MapViewProps>\n>((props, forwardedRef) => {\n const {\n initialViewState: initialViewStateProp,\n children,\n style,\n mapStyle = defaultStyle,\n onViewStateChange,\n ...remaining\n } = props;\n\n const mapContainerRef = useRef<HTMLDivElement>(null);\n const mergedRefs = useMergeRefs([mapContainerRef, forwardedRef]);\n\n useTooltipEventListeners();\n\n const { toolbar: toolbarConfig, interactions: interactionsConfig } =\n useMapConfig();\n const layerIds = useContext(LayerIdsContext);\n const shouldRenderToolbar =\n !isUndefined(toolbarConfig) || !isUndefined(interactionsConfig);\n\n const { height: graphHeight, width: graphWidth } = useGraphSize();\n\n const {\n handleMouseEnter,\n handleMouseMove,\n handleMouseLeave,\n handleMouseClick,\n handleZoom,\n handleDrag,\n } = useOverlayEvents();\n\n const initialViewState = useInitialViewState(initialViewStateProp);\n\n const { onLoadHandler, onRenderHandler } = useMapPerformance(mapContainerRef);\n\n return (\n <div\n data-testid=\"map-container\"\n ref={mergedRefs}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n <Map\n onMove={(evt) => {\n onViewStateChange?.(evt.viewState);\n }}\n initialViewState={toMapBoxInitialViewState(initialViewState)}\n style={{\n width: graphWidth,\n height: `${graphHeight}px`,\n ...style,\n }}\n mapStyle={mapStyle}\n dragRotate={false}\n fadeDuration={0}\n RTLTextPlugin={false}\n renderWorldCopies={false}\n interactiveLayerIds={layerIds}\n onMouseMove={(e) => handleMouseMove(e as MapLayerMouseEvent)}\n onClick={(e) => handleMouseClick(e as MapLayerMouseEvent)}\n onZoom={handleZoom}\n onDrag={handleDrag}\n onRender={() => onRenderHandler && onRenderHandler()}\n onLoad={() => onLoadHandler && onLoadHandler()}\n interactive\n {...remaining}\n >\n <MapSource />\n <MapInteractions>{children}</MapInteractions>\n {shouldRenderToolbar ? <MapToolbar /> : null}\n </Map>\n </div>\n );\n});\n\nMapContent['displayName'] = 'MapContent';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAE5B,OAAO;AAAA,EACL;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AACP,SAAS,OAAO,KAAK,cAA+B;AAEpD,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB;AAC3B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,2BAA2B;AACpC,SAAS,oBAAoB;AAC7B,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,oBAAoB;AAG7B,MAAM,YAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,MAAM;AACR;AAEA,MAAM,YAAwB;AAAA,EAC5B,IAAI;AAAA,EACJ,MAAM;AACR;AAEA,MAAM,YAAY,MAAM;AACtB,QAAM,UAAU,aAAa;AAE7B,SACE,oCAAC,UAAO,IAAG,QAAO,MAAK,WAAU,MAAM,WACrC;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,cAAc,kBAAkB,4BAA4B;AAAA,MAC9D;AAAA;AAAA,EACD,GACD;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,QACL,cAAc,kBAAkB,8BAA8B;AAAA,MAChE;AAAA;AAAA,EACD,CACH;AAEJ;AAEA,MAAM,kBAAkB,CAAC,EAAE,SAAS,MAAyB;AAC3D,sBAAoB;AACpB,uBAAqB;AAErB,SAAO;AACT;AAEO,MAAM,aAAa,WAGxB,CAAC,OAAO,iBAAiB;AACzB,QAAM;AAAA,IACJ,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,kBAAkB,OAAuB,IAAI;AACnD,QAAM,aAAa,aAAa,CAAC,iBAAiB,YAAY,CAAC;AAE/D,2BAAyB;AAEzB,QAAM,EAAE,SAAS,eAAe,cAAc,mBAAmB,IAC/D,aAAa;AACf,QAAM,WAAW,WAAW,eAAe;AAC3C,QAAM,sBACJ,CAAC,YAAY,aAAa,KAAK,CAAC,YAAY,kBAAkB;AAEhE,QAAM,EAAE,QAAQ,aAAa,OAAO,WAAW,IAAI,aAAa;AAEhE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,iBAAiB;AAErB,QAAM,mBAAmB,oBAAoB,oBAAoB;AAEjE,QAAM,EAAE,eAAe,gBAAgB,IAAI,kBAAkB,eAAe;AAE5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,KAAK;AAAA,MACL,cAAc;AAAA,MACd,cAAc;AAAA;AAAA,IAEd;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC,QAAQ;AACf,8BAAoB,IAAI,SAAS;AAAA,QACnC;AAAA,QACA,kBAAkB,yBAAyB,gBAAgB;AAAA,QAC3D,OAAO;AAAA,UACL,OAAO;AAAA,UACP,QAAQ,GAAG,WAAW;AAAA,UACtB,GAAG;AAAA,QACL;AAAA,QACA;AAAA,QACA,YAAY;AAAA,QACZ,cAAc;AAAA,QACd,eAAe;AAAA,QACf,mBAAmB;AAAA,QACnB,qBAAqB;AAAA,QACrB,aAAa,CAAC,MAAM,gBAAgB,CAAuB;AAAA,QAC3D,SAAS,CAAC,MAAM,iBAAiB,CAAuB;AAAA,QACxD,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU,MAAM,mBAAmB,gBAAgB;AAAA,QACnD,QAAQ,MAAM,iBAAiB,cAAc;AAAA,QAC7C,aAAW;AAAA,QACV,GAAG;AAAA;AAAA,MAEJ,oCAAC,eAAU;AAAA,MACX,oCAAC,uBAAiB,QAAS;AAAA,MAC1B,sBAAsB,oCAAC,gBAAW,IAAK;AAAA,IAC1C;AAAA,EACF;AAEJ,CAAC;AAED,WAAW,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/legend/CategoricalLegendRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ScaleOrdinal } from 'd3-scale';\nimport React from 'react';\n\nimport {\n _ChartLegend as ChartLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n _getLegendOrientation as getLegendOrientation,\n
|
|
5
|
-
"mappings": "AACA,OAAO,WAAW;
|
|
4
|
+
"sourcesContent": ["import type { ScaleOrdinal } from 'd3-scale';\nimport React from 'react';\n\nimport type { _LegendItem as LegendItem } from '@dynatrace/strato-components-preview/charts';\nimport {\n _ChartLegend as ChartLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n _getLegendOrientation as getLegendOrientation,\n _buildCategoricalItemsFromScale as buildCategoricalItemsFromScale,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { useColorScale } from '../../hooks/use-color-scale.js';\nimport { useSetStateSelection } from '../../store/store.js';\n\nexport const CategoricalLegendRenderer = () => {\n const { orientation: layoutOrientation } = useChartLayoutOrientation();\n const scale = useColorScale() as ScaleOrdinal<string, string>;\n const updateStateSelection = useSetStateSelection();\n const orientation = getLegendOrientation(layoutOrientation);\n const items = buildCategoricalItemsFromScale(scale);\n\n const handleHover = (items: LegendItem[]) => {\n updateStateSelection({ highlightedSeries: items });\n };\n\n function handleClick(items: LegendItem[]) {\n updateStateSelection({ visible: items });\n }\n\n return (\n <ChartLegend\n items={items}\n orientation={orientation}\n onClick={handleClick}\n onHover={handleHover}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,WAAW;AAGlB;AAAA,EACE,gBAAgB;AAAA,EAChB,8BAA8B;AAAA,EAC9B,yBAAyB;AAAA,EACzB,mCAAmC;AAAA,OAC9B;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AAE9B,MAAM,4BAA4B,MAAM;AAC7C,QAAM,EAAE,aAAa,kBAAkB,IAAI,0BAA0B;AACrE,QAAM,QAAQ,cAAc;AAC5B,QAAM,uBAAuB,qBAAqB;AAClD,QAAM,cAAc,qBAAqB,iBAAiB;AAC1D,QAAM,QAAQ,+BAA+B,KAAK;AAElD,QAAM,cAAc,CAACA,WAAwB;AAC3C,yBAAqB,EAAE,mBAAmBA,OAAM,CAAC;AAAA,EACnD;AAEA,WAAS,YAAYA,QAAqB;AACxC,yBAAqB,EAAE,SAASA,OAAM,CAAC;AAAA,EACzC;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA;AAAA,EACX;AAEJ;",
|
|
6
6
|
"names": ["items"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/legend/SequentialLegendRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ScaleQuantize } from 'd3-scale';\nimport { isUndefined } from 'lodash-es';\nimport React from 'react';\n\nimport {\n _buildQuantizedRangeItems as buildQuantizedRangeItems,\n _getLegendOrientation as getLegendOrientation,\n _RangeLegend as RangeLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_FORMATTER } from '../../constants.js';\nimport { useColorScale } from '../../hooks/use-color-scale.js';\n\nexport const SequentialLegendRenderer = () => {\n const { orientation: layoutOrientation } = useChartLayoutOrientation();\n const scale = useColorScale() as ScaleQuantize<string>;\n if (isUndefined(scale)) {\n return null;\n }\n\n const orientation = getLegendOrientation(layoutOrientation);\n const invertItems = orientation === 'vertical';\n const items = buildQuantizedRangeItems(scale, invertItems);\n\n return (\n <RangeLegend\n items={items}\n orientation={orientation}\n formatter={DEFAULT_FORMATTER}\n />\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type { ScaleQuantize } from 'd3-scale';\nimport { isUndefined } from 'lodash-es';\nimport React from 'react';\n\nimport {\n _buildQuantizedRangeItems as buildQuantizedRangeItems,\n _getLegendOrientation as getLegendOrientation,\n _RangeLegend as RangeLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_FORMATTER } from '../../constants.js';\nimport { useColorScale } from '../../hooks/use-color-scale.js';\n\nexport const SequentialLegendRenderer = () => {\n const { orientation: layoutOrientation } = useChartLayoutOrientation();\n const scale = useColorScale() as ScaleQuantize<string>;\n if (isUndefined(scale)) {\n return null;\n }\n\n const orientation = getLegendOrientation(layoutOrientation);\n const invertItems = orientation === 'vertical';\n const items = buildQuantizedRangeItems(scale, invertItems);\n\n return (\n <RangeLegend\n items={items}\n orientation={orientation}\n formatter={DEFAULT_FORMATTER}\n />\n );\n};\n"],
|
|
5
5
|
"mappings": "AACA,SAAS,mBAAmB;AAC5B,OAAO,WAAW;AAElB;AAAA,EACE,6BAA6B;AAAA,EAC7B,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,8BAA8B;AAAA,OACzB;AAEP,SAAS,yBAAyB;AAClC,SAAS,qBAAqB;AAEvB,MAAM,2BAA2B,MAAM;AAC5C,QAAM,EAAE,aAAa,kBAAkB,IAAI,0BAA0B;AACrE,QAAM,QAAQ,cAAc;AAC5B,MAAI,YAAY,KAAK,GAAG;AACtB,WAAO;AAAA,EACT;AAEA,QAAM,cAAc,qBAAqB,iBAAiB;AAC1D,QAAM,cAAc,gBAAgB;AACpC,QAAM,QAAQ,yBAAyB,OAAO,WAAW;AAEzD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA;AAAA,EACb;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/legend/ThresholdLegendRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport {\n _buildLegendItemsFromRange as buildLegendItemsFromRange,\n _getLegendOrientation as getLegendOrientation,\n _RangeLegend as RangeLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_FORMATTER, DEFAULT_RANGE_COLOR } from '../../constants.js';\nimport { useMapConfig } from '../../hooks/use-map-config.js';\nimport { ThresholdLegendConfig } from '../../types/legend.js';\n\nexport const ThresholdLegendRenderer = () => {\n const { orientation: layoutOrientation } = useChartLayoutOrientation();\n\n const { legend } = useMapConfig();\n\n const { ranges } = legend as ThresholdLegendConfig;\n\n const orientation = getLegendOrientation(layoutOrientation);\n const invertItems = orientation === 'vertical';\n const items = buildLegendItemsFromRange(ranges, DEFAULT_RANGE_COLOR);\n invertItems && items.reverse();\n\n return (\n <RangeLegend\n items={items}\n orientation={orientation}\n formatter={DEFAULT_FORMATTER}\n />\n );\n};\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport {\n _buildLegendItemsFromRange as buildLegendItemsFromRange,\n _getLegendOrientation as getLegendOrientation,\n _RangeLegend as RangeLegend,\n _useChartLayoutOrientation as useChartLayoutOrientation,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_FORMATTER, DEFAULT_RANGE_COLOR } from '../../constants.js';\nimport { useMapConfig } from '../../hooks/use-map-config.js';\nimport type { ThresholdLegendConfig } from '../../types/legend.js';\n\nexport const ThresholdLegendRenderer = () => {\n const { orientation: layoutOrientation } = useChartLayoutOrientation();\n\n const { legend } = useMapConfig();\n\n const { ranges } = legend as ThresholdLegendConfig;\n\n const orientation = getLegendOrientation(layoutOrientation);\n const invertItems = orientation === 'vertical';\n const items = buildLegendItemsFromRange(ranges, DEFAULT_RANGE_COLOR);\n invertItems && items.reverse();\n\n return (\n <RangeLegend\n items={items}\n orientation={orientation}\n formatter={DEFAULT_FORMATTER}\n />\n );\n};\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,WAAW;AAElB;AAAA,EACE,8BAA8B;AAAA,EAC9B,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,8BAA8B;AAAA,OACzB;AAEP,SAAS,mBAAmB,2BAA2B;AACvD,SAAS,oBAAoB;AAGtB,MAAM,0BAA0B,MAAM;AAC3C,QAAM,EAAE,aAAa,kBAAkB,IAAI,0BAA0B;AAErE,QAAM,EAAE,OAAO,IAAI,aAAa;AAEhC,QAAM,EAAE,OAAO,IAAI;AAEnB,QAAM,cAAc,qBAAqB,iBAAiB;AAC1D,QAAM,cAAc,gBAAgB;AACpC,QAAM,QAAQ,0BAA0B,QAAQ,mBAAmB;AACnE,iBAAe,MAAM,QAAQ;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW;AAAA;AAAA,EACb;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/components/legend/functions/resolve-color.ts"],
|
|
4
|
-
"sourcesContent": ["import { ScaleOrdinal, ScaleQuantize, ScaleThreshold } from 'd3-scale';\n\n/**\n * Resolves a color inside the given scale just if it fits its domain\n *\n * @param scale - given scale\n * @param value - given value\n */\nexport const resolveColor = (\n scale:\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>\n | ScaleOrdinal<string, string>,\n value: number | string | undefined,\n) => {\n if (typeof value === 'string') {\n const castedScale = scale as ScaleOrdinal<string, string>;\n const categories = castedScale.domain();\n\n if (categories.includes(value)) {\n return castedScale(value);\n }\n }\n\n if (typeof value === 'number') {\n const castedScale = scale as\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>;\n const [min, max] = castedScale.domain();\n if (value && value >= min && value <= max) {\n return castedScale(value);\n }\n }\n\n return undefined;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type { ScaleOrdinal, ScaleQuantize, ScaleThreshold } from 'd3-scale';\n\n/**\n * Resolves a color inside the given scale just if it fits its domain\n *\n * @param scale - given scale\n * @param value - given value\n */\nexport const resolveColor = (\n scale:\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>\n | ScaleOrdinal<string, string>,\n value: number | string | undefined,\n) => {\n if (typeof value === 'string') {\n const castedScale = scale as ScaleOrdinal<string, string>;\n const categories = castedScale.domain();\n\n if (categories.includes(value)) {\n return castedScale(value);\n }\n }\n\n if (typeof value === 'number') {\n const castedScale = scale as\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>;\n const [min, max] = castedScale.domain();\n if (value && value >= min && value <= max) {\n return castedScale(value);\n }\n }\n\n return undefined;\n};\n"],
|
|
5
5
|
"mappings": "AAQO,MAAM,eAAe,CAC1B,OAIA,UACG;AACH,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,cAAc;AACpB,UAAM,aAAa,YAAY,OAAO;AAEtC,QAAI,WAAW,SAAS,KAAK,GAAG;AAC9B,aAAO,YAAY,KAAK;AAAA,IAC1B;AAAA,EACF;AAEA,MAAI,OAAO,UAAU,UAAU;AAC7B,UAAM,cAAc;AAGpB,UAAM,CAAC,KAAK,GAAG,IAAI,YAAY,OAAO;AACtC,QAAI,SAAS,SAAS,OAAO,SAAS,KAAK;AACzC,aAAO,YAAY,KAAK;AAAA,IAC1B;AAAA,EACF;AAEA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/toolbar/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineMessages } from 'react-intl';\n\nimport { A11yToolbarTabIndex } from '../../types/toolbar.js';\n\nexport const initialA11yToolbarTabIndexContext: A11yToolbarTabIndex[] = [\n { 'zoom-in': 0 },\n { 'zoom-out': -1 },\n { reset: -1 },\n { 'zoom-to-fit': -1 },\n { 'download-data': -1 },\n];\n\nexport const TOOLBAR_MESSAGES = defineMessages({\n zoomActionZoomIn: {\n id: '11eDVd4MkXWk8Bok',\n defaultMessage: 'Zoom in',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom in\" action in the geo map chart toolbar',\n },\n zoomActionZoomOut: {\n id: '5DTYqeFoXLMaXUHR',\n defaultMessage: 'Zoom out',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom out\" action in the geo map chart toolbar',\n },\n zoomActionReset: {\n id: 'hVE7x0G0Q7/ih93A',\n defaultMessage: 'Reset',\n description:\n 'Text in a tooltip shown when hovering the \"Reset\" action in the geo map chart toolbar',\n },\n zoomActionZoomToFit: {\n id: 'EhcEZc1+Xc9wYsXg',\n defaultMessage: 'Zoom to fit',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom to fit\" action in the geo map chart toolbar',\n },\n downloadData: {\n id: 'hlwWx47trlDMOy+V',\n defaultMessage: 'Download Data as CSV',\n description:\n 'Text in a tooltip shown when hovering the \"Download Data\" action in the geo map chart toolbar',\n },\n});\n"],
|
|
4
|
+
"sourcesContent": ["import { defineMessages } from 'react-intl';\n\nimport type { A11yToolbarTabIndex } from '../../types/toolbar.js';\n\nexport const initialA11yToolbarTabIndexContext: A11yToolbarTabIndex[] = [\n { 'zoom-in': 0 },\n { 'zoom-out': -1 },\n { reset: -1 },\n { 'zoom-to-fit': -1 },\n { 'download-data': -1 },\n];\n\nexport const TOOLBAR_MESSAGES = defineMessages({\n zoomActionZoomIn: {\n id: '11eDVd4MkXWk8Bok',\n defaultMessage: 'Zoom in',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom in\" action in the geo map chart toolbar',\n },\n zoomActionZoomOut: {\n id: '5DTYqeFoXLMaXUHR',\n defaultMessage: 'Zoom out',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom out\" action in the geo map chart toolbar',\n },\n zoomActionReset: {\n id: 'hVE7x0G0Q7/ih93A',\n defaultMessage: 'Reset',\n description:\n 'Text in a tooltip shown when hovering the \"Reset\" action in the geo map chart toolbar',\n },\n zoomActionZoomToFit: {\n id: 'EhcEZc1+Xc9wYsXg',\n defaultMessage: 'Zoom to fit',\n description:\n 'Text in a tooltip shown when hovering the \"Zoom to fit\" action in the geo map chart toolbar',\n },\n downloadData: {\n id: 'hlwWx47trlDMOy+V',\n defaultMessage: 'Download Data as CSV',\n description:\n 'Text in a tooltip shown when hovering the \"Download Data\" action in the geo map chart toolbar',\n },\n});\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,sBAAsB;AAIxB,MAAM,oCAA2D;AAAA,EACtE,EAAE,WAAW,EAAE;AAAA,EACf,EAAE,YAAY,GAAG;AAAA,EACjB,EAAE,OAAO,GAAG;AAAA,EACZ,EAAE,eAAe,GAAG;AAAA,EACpB,EAAE,iBAAiB,GAAG;AACxB;AAEO,MAAM,mBAAmB,eAAe;AAAA,EAC7C,kBAAkB;AAAA,IAChB,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AAAA,EACA,mBAAmB;AAAA,IACjB,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACf,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AAAA,EACA,qBAAqB;AAAA,IACnB,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AAAA,EACA,cAAc;AAAA,IACZ,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/components/toolbar/functions/a11y-toolbar-controls.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n A11yToolbarTabIndex,\n ToolbarInteractionModes,\n} from '../../../types/toolbar.js';\n\n/**\n * Get value from ToolbarTabIndex [key]: number\n *\n * @param tabIndex - toolbar control tab index [key]: number\n */\nexport function getTabIndexKey(\n tabIndex: A11yToolbarTabIndex,\n): ToolbarInteractionModes {\n return Object.keys(tabIndex)[0] as ToolbarInteractionModes;\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type {\n A11yToolbarTabIndex,\n ToolbarInteractionModes,\n} from '../../../types/toolbar.js';\n\n/**\n * Get value from ToolbarTabIndex [key]: number\n *\n * @param tabIndex - toolbar control tab index [key]: number\n */\nexport function getTabIndexKey(\n tabIndex: A11yToolbarTabIndex,\n): ToolbarInteractionModes {\n return Object.keys(tabIndex)[0] as ToolbarInteractionModes;\n}\n"],
|
|
5
5
|
"mappings": "AAUO,SAAS,eACd,UACyB;AACzB,SAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -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 {\n A11yToolbarTabIndex,\n ToolbarInteractionModes,\n} from '../../../types/toolbar.js';\nimport { getTabIndexKey } from '../functions/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-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 '../functions/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
|
}
|
package/esm/map/constants.js
CHANGED
|
@@ -15,8 +15,9 @@ const WHOLE_WORLD_VIEW_BOUNDARIES = [
|
|
|
15
15
|
];
|
|
16
16
|
const DEFAULT_COUNTRY_CODE = "default";
|
|
17
17
|
const FIT_BOUNDS_OPTIONS = { padding: 20 };
|
|
18
|
-
const DEFAULT_MAP_HEIGHT =
|
|
18
|
+
const DEFAULT_MAP_HEIGHT = 400;
|
|
19
19
|
const DEFAULT_MAP_LEGEND_RATIO = 12;
|
|
20
|
+
const DEFAULT_MAP_POSITION = "auto";
|
|
20
21
|
const DEFAULT_INPUT_ICON_SIZE = 20;
|
|
21
22
|
const ACTIVE_COLOR = Colors.Border.Neutral.AccentActive;
|
|
22
23
|
const BASE_LAYER_IDS = ["geojson-line", "geojson-fill"];
|
|
@@ -62,7 +63,7 @@ const DEFAULT_LINE_DASH_ARRAY = [5, 2.5];
|
|
|
62
63
|
const MIN_LINE_THICKNESS = 1;
|
|
63
64
|
const MAX_LINE_THICKNESS = 64;
|
|
64
65
|
const DIRECTION_ICON_OUTPUT_SIZE = 128;
|
|
65
|
-
const DIRECTION_ICON_SHRINK_RATIO = 1 /
|
|
66
|
+
const DIRECTION_ICON_SHRINK_RATIO = 1 / 15;
|
|
66
67
|
const ACTIVE_STATE_BORDERS_WIDTH = 1.8;
|
|
67
68
|
const DEFAULT_CHOROPLETH_COLOR = Colors.Charts.Sequential.Blue.Color05.Default;
|
|
68
69
|
const COPY_TO_CLIPBOARD_MESSAGES = defineMessages({
|
|
@@ -99,6 +100,7 @@ export {
|
|
|
99
100
|
DEFAULT_LINE_THICKNESS,
|
|
100
101
|
DEFAULT_MAP_HEIGHT,
|
|
101
102
|
DEFAULT_MAP_LEGEND_RATIO,
|
|
103
|
+
DEFAULT_MAP_POSITION,
|
|
102
104
|
DEFAULT_RADIUS,
|
|
103
105
|
DEFAULT_RADIUS_EXPRESSION,
|
|
104
106
|
DEFAULT_RANGE_COLOR,
|
package/esm/map/constants.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/map/constants.ts"],
|
|
4
|
-
"sourcesContent": ["import { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';\nimport { defineMessages } from 'react-intl';\n\nimport Colors from '@dynatrace/strato-design-tokens/colors';\n\n//region GENERAL\nexport const DEFAULT_COUNTRIES_FILL_COLOR = Colors.Theme.Neutral['50'];\nexport const DEFAULT_COUNTRIES_BORDER_COLOR = Colors.Background.Surface.Default;\nexport const TRANSPARENT_BORDER_COLOR = '#00000000';\nexport const MAX_LATITUDE = 90;\nexport const MIN_LATITUDE = -90;\nexport const MAX_LONGITUDE = 180;\nexport const MIN_LONGITUDE = -180;\nexport const WHOLE_WORLD_VIEW_BOUNDARIES: [number, number, number, number] = [\n MAX_LONGITUDE,\n MAX_LATITUDE,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n];\nexport const DEFAULT_COUNTRY_CODE = 'default';\nexport const FIT_BOUNDS_OPTIONS = { padding: 20 };\nexport const DEFAULT_MAP_HEIGHT =
|
|
5
|
-
"mappings": "AACA,SAAS,sBAAsB;AAE/B,OAAO,YAAY;AAGZ,MAAM,+BAA+B,OAAO,MAAM,QAAQ,IAAI;AAC9D,MAAM,iCAAiC,OAAO,WAAW,QAAQ;AACjE,MAAM,2BAA2B;AACjC,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,8BAAgE;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB,EAAE,SAAS,GAAG;AACzC,MAAM,qBAAqB;AAC3B,MAAM,2BAA2B;AACjC,MAAM,0BAA0B;AAChC,MAAM,eAAe,OAAO,OAAO,QAAQ;AAC3C,MAAM,iBAAiB,CAAC,gBAAgB,cAAc;AACtD,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;AAI5B,MAAM,kCACX,OAAO,OAAO,kBAAkB,WAAW;AACtC,MAAM,uBAAuB;AAAA;AAAA,EAElC,UAAU;AAAA;AAAA,EAEV,WAAW;AAAA;AAAA,EAEX,UAAU;AAAA;AAAA,EAEV,WAAW;AACb;AACO,MAAM,oBAAoB;AAAA,EAC/B,uBAAuB;AACzB;AACO,MAAM,sBAAsB,OAAO,WAAW,MAAM,QAAQ;AAC5D,MAAM,qBAAqB;AAC3B,MAAM,0CAA0C;AAIhD,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,gCACX,OAAO,WAAW,UAAU,QAAQ;AAC/B,MAAM,0BAA0B;AAChC,MAAM,sBAAsB,OAAO,OAAO,YAAY,QAAQ;AAC9D,MAAM,qBAAqB,OAAO,KAAK,QAAQ;AAI/C,MAAM,uBAAuB,OAAO,OAAO,YAAY,QAAQ;AAC/D,MAAM,iBAAiB;AACvB,MAAM,yBAAyB;AAC/B,MAAM,gBAAgB;AACtB,MAAM,wBAAwB;AAC9B,MAAM,4BAAqD;AAAA,EAChE;AAAA,EACA;AACF;AAIO,MAAM,oBAAiD;AACvD,MAAM,mBAAgD;AACtD,MAAM,yBAAyB;AAC/B,MAAM,qBAAqB,OAAO,OAAO,YAAY,QAAQ;AAC7D,MAAM,0BAA0B,CAAC,GAAG,GAAG;AACvC,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,6BAA6B;AACnC,MAAM,8BAA8B,IAAI;AAKxC,MAAM,6BAA6B;AAEnC,MAAM,2BACX,OAAO,OAAO,WAAW,KAAK,QAAQ;AAEjC,MAAM,6BAA6B,eAAe;AAAA,EACvD,kBAAkB;AAAA,IAChB,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AACF,CAAC;",
|
|
4
|
+
"sourcesContent": ["import type { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';\nimport { defineMessages } from 'react-intl';\n\nimport Colors from '@dynatrace/strato-design-tokens/colors';\n\n//region GENERAL\nexport const DEFAULT_COUNTRIES_FILL_COLOR = Colors.Theme.Neutral['50'];\nexport const DEFAULT_COUNTRIES_BORDER_COLOR = Colors.Background.Surface.Default;\nexport const TRANSPARENT_BORDER_COLOR = '#00000000';\nexport const MAX_LATITUDE = 90;\nexport const MIN_LATITUDE = -90;\nexport const MAX_LONGITUDE = 180;\nexport const MIN_LONGITUDE = -180;\nexport const WHOLE_WORLD_VIEW_BOUNDARIES: [number, number, number, number] = [\n MAX_LONGITUDE,\n MAX_LATITUDE,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n];\nexport const DEFAULT_COUNTRY_CODE = 'default';\nexport const FIT_BOUNDS_OPTIONS = { padding: 20 };\nexport const DEFAULT_MAP_HEIGHT = 400;\nexport const DEFAULT_MAP_LEGEND_RATIO = 12;\nexport const DEFAULT_MAP_POSITION = 'auto';\nexport const DEFAULT_INPUT_ICON_SIZE = 20;\nexport const ACTIVE_COLOR = Colors.Border.Neutral.AccentActive;\nexport const BASE_LAYER_IDS = ['geojson-line', 'geojson-fill'];\nexport const SHAPE_OPACITY = 1;\nexport const DEFAULT_SYMBOL_SIZE = 32;\n//endregion\n\n//region LEGEND\nexport const DEFAULT_BASIC_SHAPE_COLOR_TOKEN =\n Colors.Charts.CategoricalThemed.PurpleRain.Color01;\nexport const DEFAULT_LEGEND_SIZES = {\n // Minimum size in which the legend can be resized (vertical layout)\n minWidth: 0.1,\n // Minimum size in which the legend can be resized (horizontal layout)\n minHeight: 0.1,\n // Maximum size in which the legend can be resized (vertical layout). 80% represent 4 / 5ths of the container.\n maxWidth: 0.8,\n // Maximum size in which the legend can be resized (horizontal layout). 80% represent 4 / 5ths of the container.\n maxHeight: 0.8,\n};\nexport const DEFAULT_FORMATTER = {\n maximumFractionDigits: 1,\n};\nexport const DEFAULT_RANGE_COLOR = Colors.Background.Field.Neutral.Disabled;\nexport const LEGEND_DIM_OPACITY = 0.2;\nexport const DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE = 'blue';\n//endregion\n\n//region DOT LAYER\nexport const ICON_BACKGROUND_OPACITY = 0.7;\nexport const ICON_BACKGROUND_RADIUS = 16;\nexport const DEFAULT_ICON_BACKGROUND_COLOR =\n Colors.Background.Container.Neutral.Subdued;\nexport const DEFAULT_ICON_SIZE_RATIO = 0.6;\nexport const DEFAULT_SHAPE_COLOR = Colors.Charts.Categorical.Color15.Default;\nexport const DEFAULT_ICON_COLOR = Colors.Icon.Neutral.Default;\n//endregion\n\n//region BUBBLE LAYER\nexport const DEFAULT_BUBBLE_COLOR = Colors.Charts.Categorical.Color07.Default;\nexport const DEFAULT_RADIUS = 12;\nexport const BUBBLE_DEFAULT_OPACITY = 0.4;\nexport const BUBBLE_STROKE = 1;\nexport const BUBBLE_OUTLINE_STROKE = 1;\nexport const DEFAULT_RADIUS_EXPRESSION: ExpressionSpecification = [\n 'get',\n '__radius',\n];\n//endregion\n\n//region CONNECTION LAYER\nexport const DEFAULT_LINE_JOIN: 'bevel' | 'round' | 'miter' = 'miter';\nexport const DEFAULT_LINE_CAP: 'butt' | 'round' | 'square' = 'butt';\nexport const DEFAULT_LINE_THICKNESS = 2;\nexport const DEFAULT_LINE_COLOR = Colors.Charts.Categorical.Color03.Default;\nexport const DEFAULT_LINE_DASH_ARRAY = [5, 2.5];\nexport const MIN_LINE_THICKNESS = 1;\nexport const MAX_LINE_THICKNESS = 64;\nexport const DIRECTION_ICON_OUTPUT_SIZE = 128;\nexport const DIRECTION_ICON_SHRINK_RATIO = 1 / 15;\n//endregion\n\n//region CHOROPLETH LAYER\n\nexport const ACTIVE_STATE_BORDERS_WIDTH = 1.8;\n\nexport const DEFAULT_CHOROPLETH_COLOR =\n Colors.Charts.Sequential.Blue.Color05.Default;\n\nexport const COPY_TO_CLIPBOARD_MESSAGES = defineMessages({\n copyActionCoords: {\n id: 'g2qESM+ibB5sUyjf',\n defaultMessage: 'Copy coordinates',\n description:\n 'Text in a tooltip shown when hovering a tooltip item and hovering the copy button next to its coordinates',\n },\n});\n//endregion\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,sBAAsB;AAE/B,OAAO,YAAY;AAGZ,MAAM,+BAA+B,OAAO,MAAM,QAAQ,IAAI;AAC9D,MAAM,iCAAiC,OAAO,WAAW,QAAQ;AACjE,MAAM,2BAA2B;AACjC,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,8BAAgE;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACO,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB,EAAE,SAAS,GAAG;AACzC,MAAM,qBAAqB;AAC3B,MAAM,2BAA2B;AACjC,MAAM,uBAAuB;AAC7B,MAAM,0BAA0B;AAChC,MAAM,eAAe,OAAO,OAAO,QAAQ;AAC3C,MAAM,iBAAiB,CAAC,gBAAgB,cAAc;AACtD,MAAM,gBAAgB;AACtB,MAAM,sBAAsB;AAI5B,MAAM,kCACX,OAAO,OAAO,kBAAkB,WAAW;AACtC,MAAM,uBAAuB;AAAA;AAAA,EAElC,UAAU;AAAA;AAAA,EAEV,WAAW;AAAA;AAAA,EAEX,UAAU;AAAA;AAAA,EAEV,WAAW;AACb;AACO,MAAM,oBAAoB;AAAA,EAC/B,uBAAuB;AACzB;AACO,MAAM,sBAAsB,OAAO,WAAW,MAAM,QAAQ;AAC5D,MAAM,qBAAqB;AAC3B,MAAM,0CAA0C;AAIhD,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;AAC/B,MAAM,gCACX,OAAO,WAAW,UAAU,QAAQ;AAC/B,MAAM,0BAA0B;AAChC,MAAM,sBAAsB,OAAO,OAAO,YAAY,QAAQ;AAC9D,MAAM,qBAAqB,OAAO,KAAK,QAAQ;AAI/C,MAAM,uBAAuB,OAAO,OAAO,YAAY,QAAQ;AAC/D,MAAM,iBAAiB;AACvB,MAAM,yBAAyB;AAC/B,MAAM,gBAAgB;AACtB,MAAM,wBAAwB;AAC9B,MAAM,4BAAqD;AAAA,EAChE;AAAA,EACA;AACF;AAIO,MAAM,oBAAiD;AACvD,MAAM,mBAAgD;AACtD,MAAM,yBAAyB;AAC/B,MAAM,qBAAqB,OAAO,OAAO,YAAY,QAAQ;AAC7D,MAAM,0BAA0B,CAAC,GAAG,GAAG;AACvC,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,6BAA6B;AACnC,MAAM,8BAA8B,IAAI;AAKxC,MAAM,6BAA6B;AAEnC,MAAM,2BACX,OAAO,OAAO,WAAW,KAAK,QAAQ;AAEjC,MAAM,6BAA6B,eAAe;AAAA,EACvD,kBAAkB;AAAA,IAChB,IAAI;AAAA,IACJ,gBAAgB;AAAA,IAChB,aACE;AAAA,EACJ;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/contexts/a11y-toolbar-tab-index.context.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport { A11yToolbarTabIndex } from '../types/toolbar.js';\n\nexport const A11yToolbarTabIndexContext = React.createContext<\n A11yToolbarTabIndex[]\n>([]);\n\nA11yToolbarTabIndexContext['displayName'] = 'A11yToolbarTabIndexContext';\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport type { A11yToolbarTabIndex } from '../types/toolbar.js';\n\nexport const A11yToolbarTabIndexContext = React.createContext<\n A11yToolbarTabIndex[]\n>([]);\n\nA11yToolbarTabIndexContext['displayName'] = 'A11yToolbarTabIndexContext';\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,WAAW;AAIX,MAAM,6BAA6B,MAAM,cAE9C,CAAC,CAAC;AAEJ,2BAA2B,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/contexts/color-scale.context.ts"],
|
|
4
|
-
"sourcesContent": ["import { ScaleQuantize, ScaleThreshold, ScaleOrdinal } from 'd3-scale';\nimport React from 'react';\n\nexport type ColorScaleContextProps =\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>\n | ScaleOrdinal<string, string>;\n\nexport const ColorScaleContext = React.createContext<\n ColorScaleContextProps | undefined\n>(undefined);\n"],
|
|
4
|
+
"sourcesContent": ["import type { ScaleQuantize, ScaleThreshold, ScaleOrdinal } from 'd3-scale';\nimport React from 'react';\n\nexport type ColorScaleContextProps =\n | ScaleQuantize<string>\n | ScaleThreshold<number, string>\n | ScaleOrdinal<string, string>;\n\nexport const ColorScaleContext = React.createContext<\n ColorScaleContextProps | undefined\n>(undefined);\n"],
|
|
5
5
|
"mappings": "AACA,OAAO,WAAW;AAOX,MAAM,oBAAoB,MAAM,cAErC,MAAS;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/contexts/map-configuration.context.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport { MapConfig } from '../types/configuration.js';\n\nexport const MapConfigurationContext = React.createContext<MapConfig>({\n toolbar: undefined,\n interactions: undefined,\n legend: undefined,\n});\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport type { MapConfig } from '../types/configuration.js';\n\nexport const MapConfigurationContext = React.createContext<MapConfig>({\n toolbar: undefined,\n interactions: undefined,\n legend: undefined,\n});\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,WAAW;AAIX,MAAM,0BAA0B,MAAM,cAAyB;AAAA,EACpE,SAAS;AAAA,EACT,cAAc;AAAA,EACd,QAAQ;AACV,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/contexts/map-initial-view.context.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport { ViewState } from '../types/map-view.js';\n\nexport const MapInitialViewContext = React.createContext<ViewState>({\n latitude: 0,\n longitude: 0,\n zoom: 0,\n});\n"],
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport type { ViewState } from '../types/map-view.js';\n\nexport const MapInitialViewContext = React.createContext<ViewState>({\n latitude: 0,\n longitude: 0,\n zoom: 0,\n});\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,WAAW;AAIX,MAAM,wBAAwB,MAAM,cAAyB;AAAA,EAClE,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AACR,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/functions/__test__/fixtures/business-locations.ts"],
|
|
4
|
-
"sourcesContent": ["import { Location } from '../../../types/location.js';\n\ninterface BusinessLocation extends Location {\n id: number;\n revenue: number;\n name: string;\n}\n\nexport const businessLocations: BusinessLocation[] = [\n {\n id: 6601,\n revenue: 20000,\n name: \"Sam's Club\",\n latitude: 61.14076995,\n longitude: -149.86001586,\n },\n {\n id: 6602,\n revenue: 2000000,\n name: \"Xavi's Club\",\n latitude: 61.23107872,\n longitude: -149.74084407,\n },\n {\n id: 2074,\n revenue: 2000,\n name: \"Manu's Soccer Court\",\n latitude: 61.568752,\n longitude: -149.36364699,\n },\n {\n id: 2070,\n revenue: 20000,\n name: \"Maty's Grill\",\n latitude: 61.192337,\n longitude: -149.880356,\n },\n {\n id: 2071,\n revenue: 10000,\n name: 'Georg Concert Hall',\n latitude: 61.14026299,\n longitude: -149.86883499,\n },\n];\n\nexport const businessLocationsCsvData = [\n {\n id: 6601,\n revenue: 20000,\n name: \"Sam's Club\",\n latitude: 61.14076995,\n longitude: -149.86001586,\n 'layer-name': 'bubble-0',\n },\n {\n id: 6602,\n revenue: 2000000,\n name: \"Xavi's Club\",\n latitude: 61.23107872,\n longitude: -149.74084407,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2074,\n revenue: 2000,\n name: \"Manu's Soccer Court\",\n latitude: 61.568752,\n longitude: -149.36364699,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2070,\n revenue: 20000,\n name: \"Maty's Grill\",\n latitude: 61.192337,\n longitude: -149.880356,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2071,\n revenue: 10000,\n name: 'Georg Concert Hall',\n latitude: 61.14026299,\n longitude: -149.86883499,\n 'layer-name': 'bubble-0',\n },\n];\n"],
|
|
4
|
+
"sourcesContent": ["import type { Location } from '../../../types/location.js';\n\ninterface BusinessLocation extends Location {\n id: number;\n revenue: number;\n name: string;\n}\n\nexport const businessLocations: BusinessLocation[] = [\n {\n id: 6601,\n revenue: 20000,\n name: \"Sam's Club\",\n latitude: 61.14076995,\n longitude: -149.86001586,\n },\n {\n id: 6602,\n revenue: 2000000,\n name: \"Xavi's Club\",\n latitude: 61.23107872,\n longitude: -149.74084407,\n },\n {\n id: 2074,\n revenue: 2000,\n name: \"Manu's Soccer Court\",\n latitude: 61.568752,\n longitude: -149.36364699,\n },\n {\n id: 2070,\n revenue: 20000,\n name: \"Maty's Grill\",\n latitude: 61.192337,\n longitude: -149.880356,\n },\n {\n id: 2071,\n revenue: 10000,\n name: 'Georg Concert Hall',\n latitude: 61.14026299,\n longitude: -149.86883499,\n },\n];\n\nexport const businessLocationsCsvData = [\n {\n id: 6601,\n revenue: 20000,\n name: \"Sam's Club\",\n latitude: 61.14076995,\n longitude: -149.86001586,\n 'layer-name': 'bubble-0',\n },\n {\n id: 6602,\n revenue: 2000000,\n name: \"Xavi's Club\",\n latitude: 61.23107872,\n longitude: -149.74084407,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2074,\n revenue: 2000,\n name: \"Manu's Soccer Court\",\n latitude: 61.568752,\n longitude: -149.36364699,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2070,\n revenue: 20000,\n name: \"Maty's Grill\",\n latitude: 61.192337,\n longitude: -149.880356,\n 'layer-name': 'bubble-0',\n },\n {\n id: 2071,\n revenue: 10000,\n name: 'Georg Concert Hall',\n latitude: 61.14026299,\n longitude: -149.86883499,\n 'layer-name': 'bubble-0',\n },\n];\n"],
|
|
5
5
|
"mappings": "AAQO,MAAM,oBAAwC;AAAA,EACnD;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AACF;AAEO,MAAM,2BAA2B;AAAA,EACtC;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,cAAc;AAAA,EAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/functions/__test__/fixtures/events-locations.ts"],
|
|
4
|
-
"sourcesContent": ["import { Location } from '../../../types/location.js';\n\ninterface EventLocation extends Location {\n name: string;\n\n date: string;\n\n time: string;\n}\n\nexport const eventLocations: EventLocation[] = [\n {\n name: \"John's Birthday Party\",\n latitude: 40.7128,\n longitude: -74.006,\n date: '2023-05-20',\n time: '19:00:00',\n },\n {\n name: 'Downtown Theater Show',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-06-15',\n time: '20:30:00',\n },\n {\n name: 'Summer Music Concert',\n latitude: 51.5074,\n longitude: -0.1278,\n date: '2023-07-10',\n time: '18:00:00',\n },\n {\n name: 'Modern Art Exhibition',\n latitude: 48.8566,\n longitude: 2.3522,\n date: '2023-08-05',\n time: '10:00:00',\n },\n {\n name: 'Basketball Championship',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-09-02',\n time: '16:30:00',\n },\n];\n\nexport const eventLocationsCsvData = [\n {\n name: \"John's Birthday Party\",\n latitude: 40.7128,\n longitude: -74.006,\n date: '2023-05-20',\n time: '19:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Downtown Theater Show',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-06-15',\n time: '20:30:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Summer Music Concert',\n latitude: 51.5074,\n longitude: -0.1278,\n date: '2023-07-10',\n time: '18:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Modern Art Exhibition',\n latitude: 48.8566,\n longitude: 2.3522,\n date: '2023-08-05',\n time: '10:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Basketball Championship',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-09-02',\n time: '16:30:00',\n 'layer-name': 'dot-2',\n },\n];\n"],
|
|
4
|
+
"sourcesContent": ["import type { Location } from '../../../types/location.js';\n\ninterface EventLocation extends Location {\n name: string;\n\n date: string;\n\n time: string;\n}\n\nexport const eventLocations: EventLocation[] = [\n {\n name: \"John's Birthday Party\",\n latitude: 40.7128,\n longitude: -74.006,\n date: '2023-05-20',\n time: '19:00:00',\n },\n {\n name: 'Downtown Theater Show',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-06-15',\n time: '20:30:00',\n },\n {\n name: 'Summer Music Concert',\n latitude: 51.5074,\n longitude: -0.1278,\n date: '2023-07-10',\n time: '18:00:00',\n },\n {\n name: 'Modern Art Exhibition',\n latitude: 48.8566,\n longitude: 2.3522,\n date: '2023-08-05',\n time: '10:00:00',\n },\n {\n name: 'Basketball Championship',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-09-02',\n time: '16:30:00',\n },\n];\n\nexport const eventLocationsCsvData = [\n {\n name: \"John's Birthday Party\",\n latitude: 40.7128,\n longitude: -74.006,\n date: '2023-05-20',\n time: '19:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Downtown Theater Show',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-06-15',\n time: '20:30:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Summer Music Concert',\n latitude: 51.5074,\n longitude: -0.1278,\n date: '2023-07-10',\n time: '18:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Modern Art Exhibition',\n latitude: 48.8566,\n longitude: 2.3522,\n date: '2023-08-05',\n time: '10:00:00',\n 'layer-name': 'dot-2',\n },\n {\n name: 'Basketball Championship',\n latitude: 34.0522,\n longitude: -118.2437,\n date: '2023-09-02',\n time: '16:30:00',\n 'layer-name': 'dot-2',\n },\n];\n"],
|
|
5
5
|
"mappings": "AAUO,MAAM,iBAAkC;AAAA,EAC7C;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,EACR;AACF;AAEO,MAAM,wBAAwB;AAAA,EACnC;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,cAAc;AAAA,EAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/functions/__test__/fixtures/facilities-locations.ts"],
|
|
4
|
-
"sourcesContent": ["import { Location } from '../../../types/location.js';\n\ninterface Review {\n author: string;\n comment: string;\n}\n\ninterface FacilityLocation extends Location {\n facilityName: string;\n comments: string;\n ratio: number;\n reviews: Review[];\n}\n\nexport const facilityLocations: FacilityLocation[] = [\n {\n facilityName: 'Military Reserve Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Not Fenced',\n ratio: 15,\n longitude: -116.18414234589588,\n latitude: 43.61582009133616,\n reviews: [\n {\n author: 'John Doe',\n comment: 'Lots of fun',\n },\n ],\n },\n {\n facilityName: 'Morris Hill Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 20,\n longitude: -116.23150023369409,\n latitude: 43.60484585840266,\n reviews: [\n {\n author: 'Jane Doe',\n comment: 'Clean place',\n },\n ],\n },\n {\n facilityName: 'Pine Grove Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 5,\n longitude: -116.29242370608995,\n latitude: 43.59790446943602,\n reviews: [\n {\n author: 'Homer Simpson',\n comment: \"D'oh!\",\n },\n ],\n },\n {\n facilityName: 'Sterling Site Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 25,\n longitude: -116.30578970938058,\n latitude: 43.61547413945589,\n reviews: [],\n },\n];\n\nexport const facilityLocationsCsvData = [\n {\n facilityName: 'Military Reserve Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Not Fenced',\n ratio: 15,\n longitude: -116.18414234589588,\n latitude: 43.61582009133616,\n reviews: [\n {\n author: 'John Doe',\n comment: 'Lots of fun',\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Morris Hill Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 20,\n longitude: -116.23150023369409,\n latitude: 43.60484585840266,\n reviews: [\n {\n author: 'Jane Doe',\n comment: 'Clean place',\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Pine Grove Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 5,\n longitude: -116.29242370608995,\n latitude: 43.59790446943602,\n reviews: [\n {\n author: 'Homer Simpson',\n comment: \"D'oh!\",\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Sterling Site Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 25,\n longitude: -116.30578970938058,\n latitude: 43.61547413945589,\n reviews: [],\n 'layer-name': 'dot-1',\n },\n];\n"],
|
|
4
|
+
"sourcesContent": ["import type { Location } from '../../../types/location.js';\n\ninterface Review {\n author: string;\n comment: string;\n}\n\ninterface FacilityLocation extends Location {\n facilityName: string;\n comments: string;\n ratio: number;\n reviews: Review[];\n}\n\nexport const facilityLocations: FacilityLocation[] = [\n {\n facilityName: 'Military Reserve Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Not Fenced',\n ratio: 15,\n longitude: -116.18414234589588,\n latitude: 43.61582009133616,\n reviews: [\n {\n author: 'John Doe',\n comment: 'Lots of fun',\n },\n ],\n },\n {\n facilityName: 'Morris Hill Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 20,\n longitude: -116.23150023369409,\n latitude: 43.60484585840266,\n reviews: [\n {\n author: 'Jane Doe',\n comment: 'Clean place',\n },\n ],\n },\n {\n facilityName: 'Pine Grove Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 5,\n longitude: -116.29242370608995,\n latitude: 43.59790446943602,\n reviews: [\n {\n author: 'Homer Simpson',\n comment: \"D'oh!\",\n },\n ],\n },\n {\n facilityName: 'Sterling Site Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 25,\n longitude: -116.30578970938058,\n latitude: 43.61547413945589,\n reviews: [],\n },\n];\n\nexport const facilityLocationsCsvData = [\n {\n facilityName: 'Military Reserve Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Not Fenced',\n ratio: 15,\n longitude: -116.18414234589588,\n latitude: 43.61582009133616,\n reviews: [\n {\n author: 'John Doe',\n comment: 'Lots of fun',\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Morris Hill Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 20,\n longitude: -116.23150023369409,\n latitude: 43.60484585840266,\n reviews: [\n {\n author: 'Jane Doe',\n comment: 'Clean place',\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Pine Grove Park Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 5,\n longitude: -116.29242370608995,\n latitude: 43.59790446943602,\n reviews: [\n {\n author: 'Homer Simpson',\n comment: \"D'oh!\",\n },\n ],\n 'layer-name': 'dot-1',\n },\n {\n facilityName: 'Sterling Site Dog Off-Leash Park',\n comments: 'Hours: Sunrise to Sunset, Fenced',\n ratio: 25,\n longitude: -116.30578970938058,\n latitude: 43.61547413945589,\n reviews: [],\n 'layer-name': 'dot-1',\n },\n];\n"],
|
|
5
5
|
"mappings": "AAcO,MAAM,oBAAwC;AAAA,EACnD;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,EACZ;AACF;AAEO,MAAM,2BAA2B;AAAA,EACtC;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,QACR,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,cAAc;AAAA,IACd,UAAU;AAAA,IACV,OAAO;AAAA,IACP,WAAW;AAAA,IACX,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,cAAc;AAAA,EAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/functions/__test__/fixtures/flight-connections.ts"],
|
|
4
|
-
"sourcesContent": ["import { Connection } from '../../../types/connection-layer.js';\n\ninterface Airport {\n name: string;\n city: string;\n country: string;\n latitude: number;\n longitude: number;\n}\n\ninterface FlightRoute extends Connection {\n airports: Airport[];\n}\n\nconst europeAirports: Airport[] = [\n {\n latitude: 49.0097,\n longitude: 2.5479,\n name: 'Charles de Gaulle Airport',\n city: 'Paris',\n country: 'France',\n },\n {\n latitude: 51.47,\n longitude: -0.4543,\n name: 'Heathrow Airport',\n city: 'London',\n country: 'United Kingdom',\n },\n {\n latitude: 41.8003,\n longitude: 12.2388,\n name: 'Leonardo da Vinci\u2013Fiumicino Airport',\n city: 'Rome',\n country: 'Italy',\n },\n {\n latitude: 52.5597,\n longitude: 13.2877,\n name: 'Berlin Brandenburg Airport',\n city: 'Berlin',\n country: 'Germany',\n },\n {\n latitude: 55.9726,\n longitude: 37.4145,\n name: 'Sheremetyevo International Airport',\n city: 'Moscow',\n country: 'Russia',\n },\n];\n\nconst northAmericaAirports: Airport[] = [\n {\n latitude: 33.6407,\n longitude: -84.4277,\n name: 'Hartsfield-Jackson Atlanta International Airport',\n city: 'Atlanta',\n country: 'USA',\n },\n {\n latitude: 32.8975,\n longitude: -97.037,\n name: 'Dallas/Fort Worth International Airport',\n city: 'Dallas',\n country: 'USA',\n },\n {\n latitude: 40.6413,\n longitude: -73.7781,\n name: 'John F. Kennedy International Airport',\n city: 'New York City',\n country: 'USA',\n },\n {\n latitude: 37.7749,\n longitude: -122.4194,\n name: 'San Francisco International Airport',\n city: 'San Francisco',\n country: 'USA',\n },\n {\n latitude: 45.5887,\n longitude: -122.5976,\n name: 'Portland International Airport',\n city: 'Portland',\n country: 'USA',\n },\n {\n latitude: 43.6777,\n longitude: -79.6248,\n name: 'Toronto Pearson International Airport',\n city: 'Toronto',\n country: 'Canada',\n },\n {\n latitude: 49.193,\n longitude: -123.1837,\n name: 'Vancouver International Airport',\n city: 'Vancouver',\n country: 'Canada',\n },\n];\n\nexport const europeFlightRoutes: FlightRoute = europeAirports.reduce(\n (final, curr) => {\n final.airports.push(curr);\n final.path.push({ latitude: curr.latitude, longitude: curr.longitude });\n\n return final;\n },\n { airports: [], path: [] } as FlightRoute,\n);\n\nexport const northAmericaRoutes: FlightRoute = northAmericaAirports.reduce(\n (final, curr) => {\n final.airports.push(curr);\n final.path.push({ latitude: curr.latitude, longitude: curr.longitude });\n\n return final;\n },\n { airports: [], path: [] } as FlightRoute,\n);\n"],
|
|
4
|
+
"sourcesContent": ["import type { Connection } from '../../../types/connection-layer.js';\n\ninterface Airport {\n name: string;\n city: string;\n country: string;\n latitude: number;\n longitude: number;\n}\n\ninterface FlightRoute extends Connection {\n airports: Airport[];\n}\n\nconst europeAirports: Airport[] = [\n {\n latitude: 49.0097,\n longitude: 2.5479,\n name: 'Charles de Gaulle Airport',\n city: 'Paris',\n country: 'France',\n },\n {\n latitude: 51.47,\n longitude: -0.4543,\n name: 'Heathrow Airport',\n city: 'London',\n country: 'United Kingdom',\n },\n {\n latitude: 41.8003,\n longitude: 12.2388,\n name: 'Leonardo da Vinci\u2013Fiumicino Airport',\n city: 'Rome',\n country: 'Italy',\n },\n {\n latitude: 52.5597,\n longitude: 13.2877,\n name: 'Berlin Brandenburg Airport',\n city: 'Berlin',\n country: 'Germany',\n },\n {\n latitude: 55.9726,\n longitude: 37.4145,\n name: 'Sheremetyevo International Airport',\n city: 'Moscow',\n country: 'Russia',\n },\n];\n\nconst northAmericaAirports: Airport[] = [\n {\n latitude: 33.6407,\n longitude: -84.4277,\n name: 'Hartsfield-Jackson Atlanta International Airport',\n city: 'Atlanta',\n country: 'USA',\n },\n {\n latitude: 32.8975,\n longitude: -97.037,\n name: 'Dallas/Fort Worth International Airport',\n city: 'Dallas',\n country: 'USA',\n },\n {\n latitude: 40.6413,\n longitude: -73.7781,\n name: 'John F. Kennedy International Airport',\n city: 'New York City',\n country: 'USA',\n },\n {\n latitude: 37.7749,\n longitude: -122.4194,\n name: 'San Francisco International Airport',\n city: 'San Francisco',\n country: 'USA',\n },\n {\n latitude: 45.5887,\n longitude: -122.5976,\n name: 'Portland International Airport',\n city: 'Portland',\n country: 'USA',\n },\n {\n latitude: 43.6777,\n longitude: -79.6248,\n name: 'Toronto Pearson International Airport',\n city: 'Toronto',\n country: 'Canada',\n },\n {\n latitude: 49.193,\n longitude: -123.1837,\n name: 'Vancouver International Airport',\n city: 'Vancouver',\n country: 'Canada',\n },\n];\n\nexport const europeFlightRoutes: FlightRoute = europeAirports.reduce(\n (final, curr) => {\n final.airports.push(curr);\n final.path.push({ latitude: curr.latitude, longitude: curr.longitude });\n\n return final;\n },\n { airports: [], path: [] } as FlightRoute,\n);\n\nexport const northAmericaRoutes: FlightRoute = northAmericaAirports.reduce(\n (final, curr) => {\n final.airports.push(curr);\n final.path.push({ latitude: curr.latitude, longitude: curr.longitude });\n\n return final;\n },\n { airports: [], path: [] } as FlightRoute,\n);\n"],
|
|
5
5
|
"mappings": "AAcA,MAAM,iBAA4B;AAAA,EAChC;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;AAEA,MAAM,uBAAkC;AAAA,EACtC;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,UAAU;AAAA,IACV,WAAW;AAAA,IACX,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF;AAEO,MAAM,qBAAkC,eAAe;AAAA,EAC5D,CAAC,OAAO,SAAS;AACf,UAAM,SAAS,KAAK,IAAI;AACxB,UAAM,KAAK,KAAK,EAAE,UAAU,KAAK,UAAU,WAAW,KAAK,UAAU,CAAC;AAEtE,WAAO;AAAA,EACT;AAAA,EACA,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,EAAE;AAC3B;AAEO,MAAM,qBAAkC,qBAAqB;AAAA,EAClE,CAAC,OAAO,SAAS;AACf,UAAM,SAAS,KAAK,IAAI;AACxB,UAAM,KAAK,KAAK,EAAE,UAAU,KAAK,UAAU,WAAW,KAAK,UAAU,CAAC;AAEtE,WAAO;AAAA,EACT;AAAA,EACA,EAAE,UAAU,CAAC,GAAG,MAAM,CAAC,EAAE;AAC3B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/attach-image-from-shape.ts"],
|
|
4
|
-
"sourcesContent": ["import { MapRef } from 'react-map-gl/maplibre';\n\nimport { attachImageToMap } from './attach-image-to-map.js';\nimport { createBitmapConfigOptions } from './create-bitmap-config-options.js';\nimport { getDataUri } from './get-data-uri.js';\nimport { DEFAULT_INPUT_ICON_SIZE } from '../constants.js';\nimport { getShape } from '../shapes/shape-picker.js';\nimport { MapShape } from '../types/shapes.js';\n\nexport const attachImageFromShape = (\n map: MapRef,\n shape: MapShape,\n name: string,\n outputSize?: number,\n) => {\n const pickedShape = getShape(shape);\n const stringUrl = getDataUri(encodeURIComponent(pickedShape));\n const img = new Image(DEFAULT_INPUT_ICON_SIZE, DEFAULT_INPUT_ICON_SIZE);\n img.addEventListener('load', () => {\n createImageBitmap(\n img,\n 0,\n 0,\n DEFAULT_INPUT_ICON_SIZE,\n DEFAULT_INPUT_ICON_SIZE,\n createBitmapConfigOptions(outputSize),\n ).then((bitmap) => {\n attachImageToMap(map, bitmap, name);\n });\n });\n img.src = stringUrl;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type { MapRef } from 'react-map-gl/maplibre';\n\nimport { attachImageToMap } from './attach-image-to-map.js';\nimport { createBitmapConfigOptions } from './create-bitmap-config-options.js';\nimport { getDataUri } from './get-data-uri.js';\nimport { DEFAULT_INPUT_ICON_SIZE } from '../constants.js';\nimport { getShape } from '../shapes/shape-picker.js';\nimport type { MapShape } from '../types/shapes.js';\n\nexport const attachImageFromShape = (\n map: MapRef,\n shape: MapShape,\n name: string,\n outputSize?: number,\n) => {\n const pickedShape = getShape(shape);\n const stringUrl = getDataUri(encodeURIComponent(pickedShape));\n const img = new Image(DEFAULT_INPUT_ICON_SIZE, DEFAULT_INPUT_ICON_SIZE);\n img.addEventListener('load', () => {\n createImageBitmap(\n img,\n 0,\n 0,\n DEFAULT_INPUT_ICON_SIZE,\n DEFAULT_INPUT_ICON_SIZE,\n createBitmapConfigOptions(outputSize),\n ).then((bitmap) => {\n attachImageToMap(map, bitmap, name);\n });\n });\n img.src = stringUrl;\n};\n"],
|
|
5
5
|
"mappings": "AAEA,SAAS,wBAAwB;AACjC,SAAS,iCAAiC;AAC1C,SAAS,kBAAkB;AAC3B,SAAS,+BAA+B;AACxC,SAAS,gBAAgB;AAGlB,MAAM,uBAAuB,CAClC,KACA,OACA,MACA,eACG;AACH,QAAM,cAAc,SAAS,KAAK;AAClC,QAAM,YAAY,WAAW,mBAAmB,WAAW,CAAC;AAC5D,QAAM,MAAM,IAAI,MAAM,yBAAyB,uBAAuB;AACtE,MAAI,iBAAiB,QAAQ,MAAM;AACjC;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,0BAA0B,UAAU;AAAA,IACtC,EAAE,KAAK,CAAC,WAAW;AACjB,uBAAiB,KAAK,QAAQ,IAAI;AAAA,IACpC,CAAC;AAAA,EACH,CAAC;AACD,MAAI,MAAM;AACZ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/attach-image-from-string.ts"],
|
|
4
|
-
"sourcesContent": ["import { MapRef } from 'react-map-gl/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 { 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 'react-map-gl/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"],
|
|
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/attach-image-from-text.ts"],
|
|
4
|
-
"sourcesContent": ["import { MapRef } from 'react-map-gl/maplibre';\n\nimport { attachImageToMap } from './attach-image-to-map.js';\nimport { getScaledSymbolSize } from './get-scaled-symbol-size.js';\n\nexport const attachImageFromText = (\n map: MapRef,\n text: string,\n name: string,\n outputSize?: number,\n) => {\n const scaledTextSymbolSize = getScaledSymbolSize(outputSize);\n const canvas = document.createElement('canvas');\n // Create a canvas with the default icon size (dpr for retina displays)\n canvas.width = scaledTextSymbolSize;\n canvas.height = scaledTextSymbolSize;\n const ctx = canvas.getContext('2d') ?? new CanvasRenderingContext2D();\n ctx.imageSmoothingEnabled = false;\n ctx.font = `${scaledTextSymbolSize}px DynatraceFlow`;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(text, scaledTextSymbolSize / 2, scaledTextSymbolSize / 2);\n\n const img = new Image(scaledTextSymbolSize, scaledTextSymbolSize);\n img.addEventListener('load', () => {\n attachImageToMap(map, img, name, false);\n });\n img.src = canvas.toDataURL('image/png');\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type { MapRef } from 'react-map-gl/maplibre';\n\nimport { attachImageToMap } from './attach-image-to-map.js';\nimport { getScaledSymbolSize } from './get-scaled-symbol-size.js';\n\nexport const attachImageFromText = (\n map: MapRef,\n text: string,\n name: string,\n outputSize?: number,\n) => {\n const scaledTextSymbolSize = getScaledSymbolSize(outputSize);\n const canvas = document.createElement('canvas');\n // Create a canvas with the default icon size (dpr for retina displays)\n canvas.width = scaledTextSymbolSize;\n canvas.height = scaledTextSymbolSize;\n const ctx = canvas.getContext('2d') ?? new CanvasRenderingContext2D();\n ctx.imageSmoothingEnabled = false;\n ctx.font = `${scaledTextSymbolSize}px DynatraceFlow`;\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.fillText(text, scaledTextSymbolSize / 2, scaledTextSymbolSize / 2);\n\n const img = new Image(scaledTextSymbolSize, scaledTextSymbolSize);\n img.addEventListener('load', () => {\n attachImageToMap(map, img, name, false);\n });\n img.src = canvas.toDataURL('image/png');\n};\n"],
|
|
5
5
|
"mappings": "AAEA,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AAE7B,MAAM,sBAAsB,CACjC,KACA,MACA,MACA,eACG;AACH,QAAM,uBAAuB,oBAAoB,UAAU;AAC3D,QAAM,SAAS,SAAS,cAAc,QAAQ;AAE9C,SAAO,QAAQ;AACf,SAAO,SAAS;AAChB,QAAM,MAAM,OAAO,WAAW,IAAI,KAAK,IAAI,yBAAyB;AACpE,MAAI,wBAAwB;AAC5B,MAAI,OAAO,GAAG,oBAAoB;AAClC,MAAI,YAAY;AAChB,MAAI,eAAe;AACnB,MAAI,SAAS,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAErE,QAAM,MAAM,IAAI,MAAM,sBAAsB,oBAAoB;AAChE,MAAI,iBAAiB,QAAQ,MAAM;AACjC,qBAAiB,KAAK,KAAK,MAAM,KAAK;AAAA,EACxC,CAAC;AACD,MAAI,MAAM,OAAO,UAAU,WAAW;AACxC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/attach-image-to-map.ts"],
|
|
4
|
-
"sourcesContent": ["import { MapRef } from 'react-map-gl/maplibre';\n\nexport const attachImageToMap = (\n map: MapRef,\n bitmap: ImageBitmap | HTMLImageElement,\n iconName: string,\n sdf = true,\n) => {\n const pixelRatio = devicePixelRatio;\n if (!map.hasImage(iconName)) {\n map.addImage(iconName, bitmap, { sdf: sdf, pixelRatio });\n } else {\n // Update doesn't work until you make some move in the map, so we need to\n // remove it and add it to make the render right away\n map.removeImage(iconName);\n map.addImage(iconName, bitmap, { sdf: sdf, pixelRatio });\n }\n};\n"],
|
|
4
|
+
"sourcesContent": ["import type { MapRef } from 'react-map-gl/maplibre';\n\nexport const attachImageToMap = (\n map: MapRef,\n bitmap: ImageBitmap | HTMLImageElement,\n iconName: string,\n sdf = true,\n) => {\n const pixelRatio = devicePixelRatio;\n if (!map.hasImage(iconName)) {\n map.addImage(iconName, bitmap, { sdf: sdf, pixelRatio });\n } else {\n // Update doesn't work until you make some move in the map, so we need to\n // remove it and add it to make the render right away\n map.removeImage(iconName);\n map.addImage(iconName, bitmap, { sdf: sdf, pixelRatio });\n }\n};\n"],
|
|
5
5
|
"mappings": "AAEO,MAAM,mBAAmB,CAC9B,KACA,QACA,UACA,MAAM,SACH;AACH,QAAM,aAAa;AACnB,MAAI,CAAC,IAAI,SAAS,QAAQ,GAAG;AAC3B,QAAI,SAAS,UAAU,QAAQ,EAAE,KAAU,WAAW,CAAC;AAAA,EACzD,OAAO;AAGL,QAAI,YAAY,QAAQ;AACxB,QAAI,SAAS,UAAU,QAAQ,EAAE,KAAU,WAAW,CAAC;AAAA,EACzD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/build-categorical-scale.ts"],
|
|
4
|
-
"sourcesContent": ["import { scaleOrdinal } from 'd3-scale';\nimport { isUndefined } from 'lodash-es';\n\nimport {\n _colorPaletteMap as colorPaletteMap,\n ColorPalette,\n _isCustomColorPalette as isCustomColorPalette,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_BASIC_SHAPE_COLOR_TOKEN } from '../constants.js';\n\nexport const buildCategoricalScale = (\n categories: string[],\n colorPalette: string[] | ColorPalette,\n) => {\n const colors: string[] = [];\n\n if (isCustomColorPalette(colorPalette)) {\n categories.forEach((categoryName, index) => {\n const color =\n index < colorPalette.length\n ? colorPalette[index]\n : DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default;\n colors.push(color);\n });\n\n if (categories.length < colorPalette.length) {\n colors.push(DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default);\n }\n } else {\n categories.forEach((dataName) => {\n const colorToken = colorPaletteMap[colorPalette][dataName];\n if (!isUndefined(colorToken)) {\n colors.push(colorToken.Default);\n }\n });\n }\n\n return scaleOrdinal(categories, colors);\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { scaleOrdinal } from 'd3-scale';\nimport { isUndefined } from 'lodash-es';\n\nimport {\n _colorPaletteMap as colorPaletteMap,\n type ColorPalette,\n _isCustomColorPalette as isCustomColorPalette,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_BASIC_SHAPE_COLOR_TOKEN } from '../constants.js';\n\nexport const buildCategoricalScale = (\n categories: string[],\n colorPalette: string[] | ColorPalette,\n) => {\n const colors: string[] = [];\n\n if (isCustomColorPalette(colorPalette)) {\n categories.forEach((categoryName, index) => {\n const color =\n index < colorPalette.length\n ? colorPalette[index]\n : DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default;\n colors.push(color);\n });\n\n if (categories.length < colorPalette.length) {\n colors.push(DEFAULT_BASIC_SHAPE_COLOR_TOKEN.Default);\n }\n } else {\n categories.forEach((dataName) => {\n const colorToken = colorPaletteMap[colorPalette][dataName];\n if (!isUndefined(colorToken)) {\n colors.push(colorToken.Default);\n }\n });\n }\n\n return scaleOrdinal(categories, colors);\n};\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAE5B;AAAA,EACE,oBAAoB;AAAA,EAEpB,yBAAyB;AAAA,OACpB;AAEP,SAAS,uCAAuC;AAEzC,MAAM,wBAAwB,CACnC,YACA,iBACG;AACH,QAAM,SAAmB,CAAC;AAE1B,MAAI,qBAAqB,YAAY,GAAG;AACtC,eAAW,QAAQ,CAAC,cAAc,UAAU;AAC1C,YAAM,QACJ,QAAQ,aAAa,SACjB,aAAa,KAAK,IAClB,gCAAgC;AACtC,aAAO,KAAK,KAAK;AAAA,IACnB,CAAC;AAED,QAAI,WAAW,SAAS,aAAa,QAAQ;AAC3C,aAAO,KAAK,gCAAgC,OAAO;AAAA,IACrD;AAAA,EACF,OAAO;AACL,eAAW,QAAQ,CAAC,aAAa;AAC/B,YAAM,aAAa,gBAAgB,YAAY,EAAE,QAAQ;AACzD,UAAI,CAAC,YAAY,UAAU,GAAG;AAC5B,eAAO,KAAK,WAAW,OAAO;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SAAO,aAAa,YAAY,MAAM;AACxC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/extract-layers-data.ts"],
|
|
4
|
-
"sourcesContent": ["import { isString } from 'lodash-es';\nimport React from 'react';\nimport { isElement } from 'react-is';\n\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 { ChoroplethLayerProps } from '../types/choropleth-layer.js';\n\n/**\n * Extract layers data\n * @param children - MapView children\n * @returns flattened data array\n */\nexport const extractLayersData = (children: React.ReactNode) => {\n let flattenData = [];\n\n React.Children.forEach(children, (child) => {\n if (isElement(child)) {\n const layerId = child.props.layerId;\n switch (child.type) {\n case BubbleLayer:\n case DotLayer: {\n const data = child.props.data;\n\n data.forEach((dataPoint) => {\n const extendedDataPoint = {\n ...dataPoint,\n 'layer-name': layerId,\n };\n flattenData = flattenData.concat(extendedDataPoint);\n });\n break;\n }\n case ConnectionLayer: {\n const data = child.props.data;\n\n data.forEach((connection, connectionIndex) => {\n connection.path.forEach((path, pathIndex) => {\n const parsedPath = {\n ...path,\n 'connection-name': `connection-${connectionIndex + 1}`,\n 'connection-item-index': pathIndex,\n 'layer-name': layerId,\n };\n\n flattenData.push(parsedPath as never);\n });\n });\n break;\n }\n case ChoroplethLayer: {\n const { data, regionAccessor } = child.props as ChoroplethLayerProps<\n Record<string, unknown>\n >;\n\n data.forEach((dataEntry) => {\n const region = isString(regionAccessor)\n ? dataEntry[regionAccessor]\n : regionAccessor(dataEntry);\n\n const choroplethLayerData = {\n ...dataEntry,\n region,\n 'layer-name': layerId,\n };\n flattenData.push(choroplethLayerData as never);\n });\n break;\n }\n }\n }\n });\n return flattenData;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { isString } from 'lodash-es';\nimport React from 'react';\nimport { isElement } from 'react-is';\n\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 type { ChoroplethLayerProps } from '../types/choropleth-layer.js';\n\n/**\n * Extract layers data\n * @param children - MapView children\n * @returns flattened data array\n */\nexport const extractLayersData = (children: React.ReactNode) => {\n let flattenData = [];\n\n React.Children.forEach(children, (child) => {\n if (isElement(child)) {\n const layerId = child.props.layerId;\n switch (child.type) {\n case BubbleLayer:\n case DotLayer: {\n const data = child.props.data;\n\n data.forEach((dataPoint) => {\n const extendedDataPoint = {\n ...dataPoint,\n 'layer-name': layerId,\n };\n flattenData = flattenData.concat(extendedDataPoint);\n });\n break;\n }\n case ConnectionLayer: {\n const data = child.props.data;\n\n data.forEach((connection, connectionIndex) => {\n connection.path.forEach((path, pathIndex) => {\n const parsedPath = {\n ...path,\n 'connection-name': `connection-${connectionIndex + 1}`,\n 'connection-item-index': pathIndex,\n 'layer-name': layerId,\n };\n\n flattenData.push(parsedPath as never);\n });\n });\n break;\n }\n case ChoroplethLayer: {\n const { data, regionAccessor } = child.props as ChoroplethLayerProps<\n Record<string, unknown>\n >;\n\n data.forEach((dataEntry) => {\n const region = isString(regionAccessor)\n ? dataEntry[regionAccessor]\n : regionAccessor(dataEntry);\n\n const choroplethLayerData = {\n ...dataEntry,\n region,\n 'layer-name': layerId,\n };\n flattenData.push(choroplethLayerData as never);\n });\n break;\n }\n }\n }\n });\n return flattenData;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,gBAAgB;AACzB,OAAO,WAAW;AAClB,SAAS,iBAAiB;AAE1B,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AAQlB,MAAM,oBAAoB,CAAC,aAA8B;AAC9D,MAAI,cAAc,CAAC;AAEnB,QAAM,SAAS,QAAQ,UAAU,CAAC,UAAU;AAC1C,QAAI,UAAU,KAAK,GAAG;AACpB,YAAM,UAAU,MAAM,MAAM;AAC5B,cAAQ,MAAM,MAAM;AAAA,QAClB,KAAK;AAAA,QACL,KAAK,UAAU;AACb,gBAAM,OAAO,MAAM,MAAM;AAEzB,eAAK,QAAQ,CAAC,cAAc;AAC1B,kBAAM,oBAAoB;AAAA,cACxB,GAAG;AAAA,cACH,cAAc;AAAA,YAChB;AACA,0BAAc,YAAY,OAAO,iBAAiB;AAAA,UACpD,CAAC;AACD;AAAA,QACF;AAAA,QACA,KAAK,iBAAiB;AACpB,gBAAM,OAAO,MAAM,MAAM;AAEzB,eAAK,QAAQ,CAAC,YAAY,oBAAoB;AAC5C,uBAAW,KAAK,QAAQ,CAAC,MAAM,cAAc;AAC3C,oBAAM,aAAa;AAAA,gBACjB,GAAG;AAAA,gBACH,mBAAmB,cAAc,kBAAkB,CAAC;AAAA,gBACpD,yBAAyB;AAAA,gBACzB,cAAc;AAAA,cAChB;AAEA,0BAAY,KAAK,UAAmB;AAAA,YACtC,CAAC;AAAA,UACH,CAAC;AACD;AAAA,QACF;AAAA,QACA,KAAK,iBAAiB;AACpB,gBAAM,EAAE,MAAM,eAAe,IAAI,MAAM;AAIvC,eAAK,QAAQ,CAAC,cAAc;AAC1B,kBAAM,SAAS,SAAS,cAAc,IAClC,UAAU,cAAc,IACxB,eAAe,SAAS;AAE5B,kBAAM,sBAAsB;AAAA,cAC1B,GAAG;AAAA,cACH;AAAA,cACA,cAAc;AAAA,YAChB;AACA,wBAAY,KAAK,mBAA4B;AAAA,UAC/C,CAAC;AACD;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAC;AACD,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/get-client-settings.ts"],
|
|
4
|
-
"sourcesContent": ["import {\n ObjectsList,\n settingsObjectsClient,\n} from '@dynatrace-sdk/client-classic-environment-v2';\n\nexport const getClientSettings = (): Promise<boolean> =>\n settingsObjectsClient\n .getSettingsObjects({\n schemaIds: 'builtin:geo-settings',\n scopes: 'environment',\n fields: 'value',\n })\n .then((data: ObjectsList) => {\n if (data) {\n const displayWorldmapItem = data.items.find(\n (item) => item.value?.displayWorldmap !== undefined,\n );\n\n if (\n displayWorldmapItem !== undefined &&\n displayWorldmapItem.value !== undefined\n ) {\n return displayWorldmapItem.value.displayWorldmap as boolean;\n }\n }\n return true;\n })\n .catch((_) => {\n return true;\n });\n"],
|
|
4
|
+
"sourcesContent": ["import {\n type ObjectsList,\n settingsObjectsClient,\n} from '@dynatrace-sdk/client-classic-environment-v2';\n\nexport const getClientSettings = (): Promise<boolean> =>\n settingsObjectsClient\n .getSettingsObjects({\n schemaIds: 'builtin:geo-settings',\n scopes: 'environment',\n fields: 'value',\n })\n .then((data: ObjectsList) => {\n if (data) {\n const displayWorldmapItem = data.items.find(\n (item) => item.value?.displayWorldmap !== undefined,\n );\n\n if (\n displayWorldmapItem !== undefined &&\n displayWorldmapItem.value !== undefined\n ) {\n return displayWorldmapItem.value.displayWorldmap as boolean;\n }\n }\n return true;\n })\n .catch((_) => {\n return true;\n });\n"],
|
|
5
5
|
"mappings": "AAAA;AAAA,EAEE;AAAA,OACK;AAEA,MAAM,oBAAoB,MAC/B,sBACG,mBAAmB;AAAA,EAClB,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,QAAQ;AACV,CAAC,EACA,KAAK,CAAC,SAAsB;AAC3B,MAAI,MAAM;AACR,UAAM,sBAAsB,KAAK,MAAM;AAAA,MACrC,CAAC,SAAS,KAAK,OAAO,oBAAoB;AAAA,IAC5C;AAEA,QACE,wBAAwB,UACxB,oBAAoB,UAAU,QAC9B;AACA,aAAO,oBAAoB,MAAM;AAAA,IACnC;AAAA,EACF;AACA,SAAO;AACT,CAAC,EACA,MAAM,CAAC,MAAM;AACZ,SAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/get-data-layers-bounding-box.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { isElement } from 'react-is';\n\nimport {\n MAX_LATITUDE,\n MAX_LONGITUDE,\n MIN_LATITUDE,\n MIN_LONGITUDE,\n} from '../constants.js';\nimport { BubbleLayer } from '../slots/BubbleLayer.js';\nimport { ConnectionLayer } from '../slots/ConnectionLayer.js';\nimport { DotLayer } from '../slots/DotLayer.js';\nimport {\n ConnectionLayerProps,\n
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { isElement } from 'react-is';\n\nimport {\n MAX_LATITUDE,\n MAX_LONGITUDE,\n MIN_LATITUDE,\n MIN_LONGITUDE,\n} from '../constants.js';\nimport { BubbleLayer } from '../slots/BubbleLayer.js';\nimport { ConnectionLayer } from '../slots/ConnectionLayer.js';\nimport { DotLayer } from '../slots/DotLayer.js';\nimport type {\n ConnectionLayerProps,\n Connection,\n} from '../types/connection-layer.js';\nimport type { Location } from '../types/location.js';\n\nconst narrowDownBounds = (\n coordinates: Location[],\n initialBounds: [number, number, number, number],\n) => {\n const bounds: [number, number, number, number] = [...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\nexport const getDataLayersBoundingBox = (\n children: React.ReactNode,\n): [number, number, number, number] => {\n let bounds: [number, number, number, number] = [\n MAX_LONGITUDE,\n MAX_LATITUDE,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n ];\n\n React.Children.forEach(children, (child) => {\n if (isElement(child)) {\n if (child.type === BubbleLayer || child.type === DotLayer) {\n const data = child.props.data as Location[];\n\n bounds = narrowDownBounds(data, bounds);\n } else if (child.type === ConnectionLayer) {\n const connectionsProps =\n child.props as ConnectionLayerProps<Connection>;\n connectionsProps.data.forEach(({ path }) => {\n bounds = narrowDownBounds(path, bounds);\n });\n }\n }\n });\n\n return bounds;\n};\n"],
|
|
5
5
|
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,iBAAiB;AAE1B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AAOzB,MAAM,mBAAmB,CACvB,aACA,kBACG;AACH,QAAM,SAA2C,CAAC,GAAG,aAAa;AAClE,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;AAEO,MAAM,2BAA2B,CACtC,aACqC;AACrC,MAAI,SAA2C;AAAA,IAC7C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,SAAS,QAAQ,UAAU,CAAC,UAAU;AAC1C,QAAI,UAAU,KAAK,GAAG;AACpB,UAAI,MAAM,SAAS,eAAe,MAAM,SAAS,UAAU;AACzD,cAAM,OAAO,MAAM,MAAM;AAEzB,iBAAS,iBAAiB,MAAM,MAAM;AAAA,MACxC,WAAW,MAAM,SAAS,iBAAiB;AACzC,cAAM,mBACJ,MAAM;AACR,yBAAiB,KAAK,QAAQ,CAAC,EAAE,KAAK,MAAM;AAC1C,mBAAS,iBAAiB,MAAM,MAAM;AAAA,QACxC,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF,CAAC;AAED,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/functions/is-valid-shape.ts"],
|
|
4
|
-
"sourcesContent": ["import { ReactNode } from 'react';\n\nimport { MapShape } from '../types/shapes.js';\n\nexport const isValidShape = (shape: MapShape | ReactNode): shape is MapShape =>\n typeof shape === 'string' &&\n [\n 'circle',\n 'square',\n 'diamond',\n 'heart',\n 'star',\n 'cross',\n 'triangle',\n 'pin',\n ].includes(shape);\n"],
|
|
4
|
+
"sourcesContent": ["import type { ReactNode } from 'react';\n\nimport type { MapShape } from '../types/shapes.js';\n\nexport const isValidShape = (shape: MapShape | ReactNode): shape is MapShape =>\n typeof shape === 'string' &&\n [\n 'circle',\n 'square',\n 'diamond',\n 'heart',\n 'star',\n 'cross',\n 'triangle',\n 'pin',\n ].includes(shape);\n"],
|
|
5
5
|
"mappings": "AAIO,MAAM,eAAe,CAAC,UAC3B,OAAO,UAAU,YACjB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,EAAE,SAAS,KAAK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { isElement } from "react-is";
|
|
3
3
|
import { ChartToolbar } from "@dynatrace/strato-components-preview/charts";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
DEFAULT_MAP_LEGEND_RATIO,
|
|
6
|
+
DEFAULT_MAP_POSITION,
|
|
7
|
+
DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE
|
|
8
|
+
} from "../constants.js";
|
|
5
9
|
import { CategoricalLegend } from "../slots/CategoricalLegend.js";
|
|
6
10
|
import { ChartInteractions } from "../slots/ChartInteractions.js";
|
|
7
11
|
import { SequentialLegend } from "../slots/SequentialLegend.js";
|
|
@@ -46,6 +50,8 @@ const iterateConfigSlots = (children) => {
|
|
|
46
50
|
legend: {
|
|
47
51
|
type: "sequential",
|
|
48
52
|
colorPalette: DEFAULT_SEQUENTIAL_LEGEND_COLOR_PALETTE,
|
|
53
|
+
position: DEFAULT_MAP_POSITION,
|
|
54
|
+
ratio: DEFAULT_MAP_LEGEND_RATIO,
|
|
49
55
|
...legend
|
|
50
56
|
}
|
|
51
57
|
};
|
|
@@ -57,6 +63,7 @@ const iterateConfigSlots = (children) => {
|
|
|
57
63
|
...slots,
|
|
58
64
|
legend: {
|
|
59
65
|
type: "categorical",
|
|
66
|
+
position: DEFAULT_MAP_POSITION,
|
|
60
67
|
...legend
|
|
61
68
|
}
|
|
62
69
|
};
|
|
@@ -68,6 +75,8 @@ const iterateConfigSlots = (children) => {
|
|
|
68
75
|
...slots,
|
|
69
76
|
legend: {
|
|
70
77
|
type: "threshold",
|
|
78
|
+
position: DEFAULT_MAP_POSITION,
|
|
79
|
+
ratio: DEFAULT_MAP_LEGEND_RATIO,
|
|
71
80
|
...legend
|
|
72
81
|
}
|
|
73
82
|
};
|