@dynatrace/strato-geo 2.4.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -6
- package/esm/map/components/ConnectionLayer/ConnectionLayerDirection.js.map +2 -2
- package/esm/map/components/ConnectionLayer/ConnectionLayerLine.js.map +2 -2
- package/esm/map/components/DefaultTooltip/utils/get-default-actions.js.map +2 -2
- package/esm/map/components/MapContent.js.map +2 -2
- package/esm/map/components/toolbar/MapToolbar.js.map +2 -2
- package/package.json +17 -5
package/README.md
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
-
# Strato
|
|
1
|
+
# Strato geo
|
|
2
2
|
|
|
3
|
-
This package
|
|
3
|
+
This package contains an advanced Strato component that renders a map with different geospatial data layers. See [About Strato](https://developer.dynatrace.com/design/about-strato-design-system/) to learn about Strato's design foundations and patterns and the complete Strato React component library.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Documentation
|
|
6
|
+
|
|
7
|
+
Explore use cases with code and props in [Strato geo](https://developer.dynatrace.com/design/geo/).
|
|
6
8
|
|
|
7
|
-
##
|
|
9
|
+
## Installation
|
|
8
10
|
|
|
9
11
|
```sh
|
|
10
12
|
npm install @dynatrace/strato-geo
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
##
|
|
15
|
+
## Releases
|
|
16
|
+
|
|
17
|
+
The Strato geo package follows the same release cadence as the Strato components preview package. Non-breaking changes are released every two weeks. Breaking changes can be expected once every three months.
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
- Learn about [Strato versioning](https://developer.dynatrace.com/design/strato-versioning/).
|
|
20
|
+
- Check the [release notes](https://developer.dynatrace.com/release-notes/design-system/geo-changelog).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/ConnectionLayer/ConnectionLayerDirection.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Layer, Source } from '@vis.gl/react-maplibre';\n\nimport { SorterIcon } from '@dynatrace/strato-icons';\n\nimport { parseDirectionDataToGeoJSON } from './utils/parse-direction-data-to-geo-json.js';\nimport {\n DIRECTION_ICON_OUTPUT_SIZE,\n DIRECTION_ICON_SHRINK_RATIO,\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n} from '../../constants.js';\nimport { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport type {\n Connection,\n InternalConnectionLayerProps,\n} from '../../types/connection-layer.js';\n\ninterface ConnectionLayerDirectionProps<T extends Connection>\n extends Required<\n Pick<InternalConnectionLayerProps<T>, 'layerId' | 'directionIndicator'>\n > {\n geoJsonData: GeoJSON.FeatureCollection;\n}\n\nexport const ConnectionLayerDirection = <T extends Connection>(\n props: ConnectionLayerDirectionProps<T>,\n) => {\n const { geoJsonData, layerId: connectionLayerId, directionIndicator } = props;\n\n const layerId = `${connectionLayerId}-direction`;\n const sourceId = `source-${layerId}`;\n\n // To get an image with enough quality instead of creating a tiny pic\n // and enlarge it, we create a huge image to shrink it\n const { symbolName } = useLoadSymbolIntoMap(\n <SorterIcon />,\n layerId,\n DIRECTION_ICON_OUTPUT_SIZE,\n );\n\n const parsedGeoJsonData = parseDirectionDataToGeoJSON({\n geoJsonData,\n directionIndicator,\n });\n\n /**\n * This value is necessary due to the icon\n * that comes from the '\\@dynatrace/strato-icons'\n * SorterIcon points downwards, but it should point upwards\n * for the sake of the angle calculation.\n */\n const iconRotationDegrees = 180;\n\n return (\n <Source\n id={sourceId}\n type=\"geojson\"\n data={parsedGeoJsonData}\n promoteId
|
|
5
|
-
"mappings": "AAmCI;AAnCJ,SAAS,OAAO,cAAc;AAE9B,SAAS,kBAAkB;AAE3B,SAAS,mCAAmC;AAC5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AAa9B,MAAM,2BAA2B,CACtC,UACG;AACH,QAAM,EAAE,aAAa,SAAS,mBAAmB,mBAAmB,IAAI;AAExE,QAAM,UAAU,GAAG,iBAAiB;AACpC,QAAM,WAAW,UAAU,OAAO;AAIlC,QAAM,EAAE,WAAW,IAAI;AAAA,IACrB,oBAAC,cAAW;AAAA,IACZ;AAAA,IACA;AAAA,EACF;AAEA,QAAM,oBAAoB,4BAA4B;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAQD,QAAM,sBAAsB;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,MAAM;AAAA,MACN,
|
|
4
|
+
"sourcesContent": ["import { Layer, Source } from '@vis.gl/react-maplibre';\n\nimport { SorterIcon } from '@dynatrace/strato-icons';\n\nimport { parseDirectionDataToGeoJSON } from './utils/parse-direction-data-to-geo-json.js';\nimport {\n DIRECTION_ICON_OUTPUT_SIZE,\n DIRECTION_ICON_SHRINK_RATIO,\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n} from '../../constants.js';\nimport { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport type {\n Connection,\n InternalConnectionLayerProps,\n} from '../../types/connection-layer.js';\n\ninterface ConnectionLayerDirectionProps<T extends Connection>\n extends Required<\n Pick<InternalConnectionLayerProps<T>, 'layerId' | 'directionIndicator'>\n > {\n geoJsonData: GeoJSON.FeatureCollection;\n}\n\nexport const ConnectionLayerDirection = <T extends Connection>(\n props: ConnectionLayerDirectionProps<T>,\n) => {\n const { geoJsonData, layerId: connectionLayerId, directionIndicator } = props;\n\n const layerId = `${connectionLayerId}-direction`;\n const sourceId = `source-${layerId}`;\n\n // To get an image with enough quality instead of creating a tiny pic\n // and enlarge it, we create a huge image to shrink it\n const { symbolName } = useLoadSymbolIntoMap(\n <SorterIcon />,\n layerId,\n DIRECTION_ICON_OUTPUT_SIZE,\n );\n\n const parsedGeoJsonData = parseDirectionDataToGeoJSON({\n geoJsonData,\n directionIndicator,\n });\n\n /**\n * This value is necessary due to the icon\n * that comes from the '\\@dynatrace/strato-icons'\n * SorterIcon points downwards, but it should point upwards\n * for the sake of the angle calculation.\n */\n const iconRotationDegrees = 180;\n\n return (\n <Source\n id={sourceId}\n type=\"geojson\"\n data={parsedGeoJsonData}\n promoteId=\"id\"\n >\n <Layer\n id={layerId}\n beforeId={connectionLayerId}\n type=\"symbol\"\n layout={{\n 'symbol-placement': 'point',\n 'icon-image': symbolName,\n 'icon-rotate': ['+', ['get', '__angle'], iconRotationDegrees],\n 'icon-rotation-alignment': 'map',\n 'icon-allow-overlap': true,\n 'icon-ignore-placement': true,\n 'icon-size': [\n '*',\n ['get', '__lineWidth'],\n DIRECTION_ICON_SHRINK_RATIO,\n ],\n }}\n paint={{\n 'icon-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__lineHoveredColor'],\n ['get', '__lineColor'],\n ],\n 'icon-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n ],\n }}\n />\n </Source>\n );\n};\n\nConnectionLayerDirection['displayName'] = 'ConnectionLayerDirection';\n"],
|
|
5
|
+
"mappings": "AAmCI;AAnCJ,SAAS,OAAO,cAAc;AAE9B,SAAS,kBAAkB;AAE3B,SAAS,mCAAmC;AAC5C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AAa9B,MAAM,2BAA2B,CACtC,UACG;AACH,QAAM,EAAE,aAAa,SAAS,mBAAmB,mBAAmB,IAAI;AAExE,QAAM,UAAU,GAAG,iBAAiB;AACpC,QAAM,WAAW,UAAU,OAAO;AAIlC,QAAM,EAAE,WAAW,IAAI;AAAA,IACrB,oBAAC,cAAW;AAAA,IACZ;AAAA,IACA;AAAA,EACF;AAEA,QAAM,oBAAoB,4BAA4B;AAAA,IACpD;AAAA,IACA;AAAA,EACF,CAAC;AAQD,QAAM,sBAAsB;AAE5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,MAAM;AAAA,MACN,WAAU;AAAA,MAEV;AAAA,QAAC;AAAA;AAAA,UACC,IAAI;AAAA,UACJ,UAAU;AAAA,UACV,MAAK;AAAA,UACL,QAAQ;AAAA,YACN,oBAAoB;AAAA,YACpB,cAAc;AAAA,YACd,eAAe,CAAC,KAAK,CAAC,OAAO,SAAS,GAAG,mBAAmB;AAAA,YAC5D,2BAA2B;AAAA,YAC3B,sBAAsB;AAAA,YACtB,yBAAyB;AAAA,YACzB,aAAa;AAAA,cACX;AAAA,cACA,CAAC,OAAO,aAAa;AAAA,cACrB;AAAA,YACF;AAAA,UACF;AAAA,UACA,OAAO;AAAA,YACL,cAAc;AAAA,cACZ;AAAA,cACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,cAC7C,CAAC,OAAO,oBAAoB;AAAA,cAC5B,CAAC,OAAO,aAAa;AAAA,YACvB;AAAA,YACA,gBAAgB;AAAA,cACd;AAAA,cACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,cAClD;AAAA,cACA;AAAA,YACF;AAAA,UACF;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,yBAAyB,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/ConnectionLayer/ConnectionLayerLine.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Layer, Source } from '@vis.gl/react-maplibre';\n\nimport {\n DEFAULT_LINE_CAP,\n DEFAULT_LINE_DASH_ARRAY,\n DEFAULT_LINE_JOIN,\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n} from '../../constants.js';\nimport type {\n Connection,\n InternalConnectionLayerProps,\n} from '../../types/connection-layer.js';\n\ninterface ConnectionLayerLineProps<T extends Connection>\n extends Required<Pick<InternalConnectionLayerProps<T>, 'layerId'>> {\n geoJsonData: GeoJSON.FeatureCollection;\n sourceId: string;\n line: 'dashed' | 'solid' | undefined;\n}\n\nexport const ConnectionLayerLine = <T extends Connection>(\n props: ConnectionLayerLineProps<T>,\n) => {\n const { geoJsonData, layerId, sourceId, line } = props;\n\n return (\n <Source id={sourceId} type=\"geojson\" data={geoJsonData} promoteId
|
|
5
|
-
"mappings": "AA4BM;AA5BN,SAAS,OAAO,cAAc;AAE9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaA,MAAM,sBAAsB,CACjC,UACG;AACH,QAAM,EAAE,aAAa,SAAS,UAAU,KAAK,IAAI;AAEjD,SACE,oBAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,
|
|
4
|
+
"sourcesContent": ["import { Layer, Source } from '@vis.gl/react-maplibre';\n\nimport {\n DEFAULT_LINE_CAP,\n DEFAULT_LINE_DASH_ARRAY,\n DEFAULT_LINE_JOIN,\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n} from '../../constants.js';\nimport type {\n Connection,\n InternalConnectionLayerProps,\n} from '../../types/connection-layer.js';\n\ninterface ConnectionLayerLineProps<T extends Connection>\n extends Required<Pick<InternalConnectionLayerProps<T>, 'layerId'>> {\n geoJsonData: GeoJSON.FeatureCollection;\n sourceId: string;\n line: 'dashed' | 'solid' | undefined;\n}\n\nexport const ConnectionLayerLine = <T extends Connection>(\n props: ConnectionLayerLineProps<T>,\n) => {\n const { geoJsonData, layerId, sourceId, line } = props;\n\n return (\n <Source id={sourceId} type=\"geojson\" data={geoJsonData} promoteId=\"id\">\n <Layer\n type=\"line\"\n id={layerId}\n layout={{\n 'line-cap': DEFAULT_LINE_CAP,\n 'line-join': DEFAULT_LINE_JOIN,\n }}\n paint={{\n 'line-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__lineHoveredColor'],\n ['get', '__lineColor'],\n ],\n 'line-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY_DEFAULT,\n SHAPE_OPACITY_DIMMED,\n ],\n 'line-width': ['get', '__lineWidth'],\n ...(line && line === 'dashed'\n ? { 'line-dasharray': DEFAULT_LINE_DASH_ARRAY }\n : null),\n }}\n />\n </Source>\n );\n};\n\nConnectionLayerLine['displayName'] = 'ConnectionLayerLine';\n"],
|
|
5
|
+
"mappings": "AA4BM;AA5BN,SAAS,OAAO,cAAc;AAE9B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaA,MAAM,sBAAsB,CACjC,UACG;AACH,QAAM,EAAE,aAAa,SAAS,UAAU,KAAK,IAAI;AAEjD,SACE,oBAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,WAAU,MAChE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,IAAI;AAAA,MACJ,QAAQ;AAAA,QACN,YAAY;AAAA,QACZ,aAAa;AAAA,MACf;AAAA,MACA,OAAO;AAAA,QACL,cAAc;AAAA,UACZ;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,oBAAoB;AAAA,UAC5B,CAAC,OAAO,aAAa;AAAA,QACvB;AAAA,QACA,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,QACA,cAAc,CAAC,OAAO,aAAa;AAAA,QACnC,GAAI,QAAQ,SAAS,WACjB,EAAE,kBAAkB,wBAAwB,IAC5C;AAAA,MACN;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,oBAAoB,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/components/DefaultTooltip/utils/get-default-actions.tsx"],
|
|
4
|
-
"sourcesContent": ["import { type PropsWithChildren, type ReactElement } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { ChartSeriesAction } from '@dynatrace/strato-components-preview/charts';\nimport { CopyIcon } from '@dynatrace/strato-icons';\n\nimport { COPY_TO_CLIPBOARD_MESSAGES } from '../../../constants.js';\n\nexport const getDefaultActions = (\n onSelectCallback: () => void,\n): ReactElement<PropsWithChildren> => (\n <ChartSeriesAction>\n <ChartSeriesAction.Item key
|
|
5
|
-
"mappings": "AAYI,SAEI,KAFJ;AAXJ,SAAS,wBAAwB;AAEjC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAEzB,SAAS,kCAAkC;AAEpC,MAAM,oBAAoB,CAC/B,qBAEA,oBAAC,qBACC,+BAAC,kBAAkB,MAAlB,
|
|
4
|
+
"sourcesContent": ["import { type PropsWithChildren, type ReactElement } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { ChartSeriesAction } from '@dynatrace/strato-components-preview/charts';\nimport { CopyIcon } from '@dynatrace/strato-icons';\n\nimport { COPY_TO_CLIPBOARD_MESSAGES } from '../../../constants.js';\n\nexport const getDefaultActions = (\n onSelectCallback: () => void,\n): ReactElement<PropsWithChildren> => (\n <ChartSeriesAction>\n <ChartSeriesAction.Item key=\"default-action\" onSelect={onSelectCallback}>\n <ChartSeriesAction.ItemIcon>\n <CopyIcon />\n </ChartSeriesAction.ItemIcon>\n <FormattedMessage {...COPY_TO_CLIPBOARD_MESSAGES.copyActionCoords} />\n </ChartSeriesAction.Item>\n </ChartSeriesAction>\n);\n"],
|
|
5
|
+
"mappings": "AAYI,SAEI,KAFJ;AAXJ,SAAS,wBAAwB;AAEjC,SAAS,yBAAyB;AAClC,SAAS,gBAAgB;AAEzB,SAAS,kCAAkC;AAEpC,MAAM,oBAAoB,CAC/B,qBAEA,oBAAC,qBACC,+BAAC,kBAAkB,MAAlB,EAA4C,UAAU,kBACrD;AAAA,sBAAC,kBAAkB,UAAlB,EACC,8BAAC,YAAS,GACZ;AAAA,EACA,oBAAC,oBAAkB,GAAG,2BAA2B,kBAAkB;AAAA,KAJzC,gBAK5B,GACF;",
|
|
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 {\n Layer,\n type LayerProps,\n Map,\n Source,\n type ViewStateChangeEvent,\n} from '@vis.gl/react-maplibre';\nimport { isUndefined } from 'lodash-es';\nimport type { MapLayerMouseEvent } from 'maplibre-gl';\nimport {\n forwardRef,\n type PropsWithChildren,\n useContext,\n useRef,\n useState,\n} from 'react';\n\nimport { _useGraphSize as useGraphSize } from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport {\n BASE_LAYER_FILL_ID,\n BASE_LAYER_LINE_ID,\n DEFAULT_BOUNDARIES_BORDER_COLOR,\n DEFAULT_COUNTRIES_FILL_COLOR,\n REGION_BORDER_WIDTH,\n COUNTRY_BORDER_WIDTH,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n MAX_LONGITUDE,\n MAX_LATITUDE,\n} from '../constants.js';\nimport { useMapZoomState, useSetStateZoom } from '../store/store.js';\nimport { MapToolbar } from './toolbar/MapToolbar.js';\nimport { LayerIdsContext } from '../contexts/layer-ids.context.js';\nimport { MapDataBoundingBoxContext } from '../contexts/map-data-bounding-box.context.js';\nimport { useActiveInteraction } from '../hooks/use-active-interaction.js';\nimport { useHoverInteraction } from '../hooks/use-hover-interaction.js';\nimport { useMapBaseLayerFeatures } from '../hooks/use-map-base-layer-features.js';\nimport { useMapConfig } from '../hooks/use-map-config.js';\nimport { useMapLoading } from '../hooks/use-map-loading.js';\nimport { useMapPerformance } from '../hooks/use-map-performance.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 { MapViewImperativeHandler } from '../providers/imperative-handler.provider.js';\nimport type {\n MapViewProps,\n MapViewRef,\n ViewStateRequired,\n} from '../types/map-view.js';\nimport { getColorFromToken } from '../utils/get-color-from-token.js';\nimport { getDataLayersBoundingBox } from '../utils/get-data-layers-bounding-box.js';\nimport { toMapBoxInitialViewState } from '../utils/to-mapbox-initial-view-state.js';\nimport { useSetMapInitialConfiguration } from '../utils/use-set-map-initial-configuration.js';\nimport { generateNewZoomState } from './toolbar/utils/zoom-state-utils.js';\n\nconst lineLayer: LayerProps = {\n id: BASE_LAYER_LINE_ID,\n type: 'line',\n};\n\nconst fillLayer: LayerProps = {\n id: BASE_LAYER_FILL_ID,\n type: 'fill',\n};\n\nconst MapSource = () => {\n const baseLayerFeatures = useMapBaseLayerFeatures();\n return (\n baseLayerFeatures && (\n <Source id=\"data\" type=\"geojson\" data={baseLayerFeatures}>\n <Layer\n {...fillLayer}\n paint={{\n 'fill-color': getColorFromToken(DEFAULT_COUNTRIES_FILL_COLOR),\n }}\n />\n <Layer\n {...lineLayer}\n type
|
|
5
|
-
"mappings": "AAuEM,SAoLQ,UAnLN,KADF;AAvEN;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,mBAAmB;AAE5B;AAAA,EACE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB,uBAAuB;AACjD,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAChC,SAAS,iCAAiC;AAC1C,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,+BAA+B;AACxC,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,oBAAoB;AAC7B,SAAS,gCAAgC;AAMzC,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,gCAAgC;AACzC,SAAS,qCAAqC;AAC9C,SAAS,4BAA4B;AAErC,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,oBAAoB,wBAAwB;AAClD,SACE,qBACE,qBAAC,UAAO,IAAG,QAAO,MAAK,WAAU,MAAM,mBACrC;AAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,OAAO;AAAA,UACL,cAAc,kBAAkB,4BAA4B;AAAA,QAC9D;AAAA;AAAA,IACF;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,
|
|
4
|
+
"sourcesContent": ["import {\n Layer,\n type LayerProps,\n Map,\n Source,\n type ViewStateChangeEvent,\n} from '@vis.gl/react-maplibre';\nimport { isUndefined } from 'lodash-es';\nimport type { MapLayerMouseEvent } from 'maplibre-gl';\nimport {\n forwardRef,\n type PropsWithChildren,\n useContext,\n useRef,\n useState,\n} from 'react';\n\nimport { _useGraphSize as useGraphSize } from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport {\n BASE_LAYER_FILL_ID,\n BASE_LAYER_LINE_ID,\n DEFAULT_BOUNDARIES_BORDER_COLOR,\n DEFAULT_COUNTRIES_FILL_COLOR,\n REGION_BORDER_WIDTH,\n COUNTRY_BORDER_WIDTH,\n MIN_LONGITUDE,\n MIN_LATITUDE,\n MAX_LONGITUDE,\n MAX_LATITUDE,\n} from '../constants.js';\nimport { useMapZoomState, useSetStateZoom } from '../store/store.js';\nimport { MapToolbar } from './toolbar/MapToolbar.js';\nimport { LayerIdsContext } from '../contexts/layer-ids.context.js';\nimport { MapDataBoundingBoxContext } from '../contexts/map-data-bounding-box.context.js';\nimport { useActiveInteraction } from '../hooks/use-active-interaction.js';\nimport { useHoverInteraction } from '../hooks/use-hover-interaction.js';\nimport { useMapBaseLayerFeatures } from '../hooks/use-map-base-layer-features.js';\nimport { useMapConfig } from '../hooks/use-map-config.js';\nimport { useMapLoading } from '../hooks/use-map-loading.js';\nimport { useMapPerformance } from '../hooks/use-map-performance.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 { MapViewImperativeHandler } from '../providers/imperative-handler.provider.js';\nimport type {\n MapViewProps,\n MapViewRef,\n ViewStateRequired,\n} from '../types/map-view.js';\nimport { getColorFromToken } from '../utils/get-color-from-token.js';\nimport { getDataLayersBoundingBox } from '../utils/get-data-layers-bounding-box.js';\nimport { toMapBoxInitialViewState } from '../utils/to-mapbox-initial-view-state.js';\nimport { useSetMapInitialConfiguration } from '../utils/use-set-map-initial-configuration.js';\nimport { generateNewZoomState } from './toolbar/utils/zoom-state-utils.js';\n\nconst lineLayer: LayerProps = {\n id: BASE_LAYER_LINE_ID,\n type: 'line',\n};\n\nconst fillLayer: LayerProps = {\n id: BASE_LAYER_FILL_ID,\n type: 'fill',\n};\n\nconst MapSource = () => {\n const baseLayerFeatures = useMapBaseLayerFeatures();\n return (\n baseLayerFeatures && (\n <Source id=\"data\" type=\"geojson\" data={baseLayerFeatures}>\n <Layer\n {...fillLayer}\n paint={{\n 'fill-color': getColorFromToken(DEFAULT_COUNTRIES_FILL_COLOR),\n }}\n />\n <Layer\n {...lineLayer}\n type=\"line\"\n filter={[\n 'any',\n ['==', 'region_type', 'COUNTRY'],\n ['==', 'region_type', 'REGION'],\n ]}\n paint={{\n 'line-color': getColorFromToken(DEFAULT_BOUNDARIES_BORDER_COLOR),\n 'line-width': [\n 'case',\n ['==', ['get', 'region_type'], 'REGION'],\n REGION_BORDER_WIDTH,\n COUNTRY_BORDER_WIDTH,\n ],\n }}\n />\n </Source>\n )\n );\n};\n\nconst MapInteractions = ({ children }: PropsWithChildren) => {\n useHoverInteraction();\n useActiveInteraction();\n\n return children;\n};\ntype MapContentProps = MapViewProps & {\n onMapLoad: () => void;\n};\n\nexport const MapContent = forwardRef<\n MapViewRef,\n PropsWithChildren<MapContentProps>\n>((props, forwardedRef) => {\n const {\n initialViewState: initialViewStateProp,\n children,\n style,\n mapStyle = defaultStyle,\n onViewStateChange,\n onMapLoad,\n ...remaining\n } = props;\n\n const loading = useMapLoading();\n const setZoomState = useSetStateZoom();\n const [savedInitialViewState, setSavedInitialViewState] = useState<\n ViewStateRequired | undefined\n >();\n\n const mapContainerRef = useRef<HTMLDivElement>(null);\n const mergedRefs = useMergeRefs<MapViewRef | HTMLDivElement>([\n mapContainerRef,\n forwardedRef,\n ]);\n\n const baseFeatureCollection = useMapBaseLayerFeatures();\n\n const dataLayersBBox = getDataLayersBoundingBox(\n children,\n baseFeatureCollection?.features,\n );\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 = initialViewStateProp ?? dataLayersBBox;\n\n const { onLoadHandler, onRenderHandler } = useMapPerformance(mapContainerRef);\n const calculatedInitialViewState = toMapBoxInitialViewState(initialViewState);\n\n const { zoomToFitInProgress } = useMapZoomState();\n\n const handleZoomEnd = (event: ViewStateChangeEvent) => {\n if (savedInitialViewState) {\n const zoomState = generateNewZoomState(\n event,\n savedInitialViewState,\n zoomToFitInProgress,\n );\n\n setZoomState(zoomState);\n }\n };\n\n const handleDragEnd = (event: ViewStateChangeEvent) => {\n if (savedInitialViewState) {\n const zoomState = generateNewZoomState(\n event,\n savedInitialViewState,\n zoomToFitInProgress,\n );\n\n setZoomState(zoomState);\n }\n };\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={calculatedInitialViewState}\n style={{\n width: graphWidth,\n height: `${graphHeight}px`,\n ...style,\n }}\n mapStyle={mapStyle}\n dragRotate={false}\n fadeDuration={0}\n renderWorldCopies={false}\n interactiveLayerIds={layerIds}\n maxBounds={[\n [MIN_LONGITUDE, MIN_LATITUDE],\n [MAX_LONGITUDE, MAX_LATITUDE],\n ]}\n onMouseMove={(e) => handleMouseMove(e as MapLayerMouseEvent)}\n onClick={(e) => handleMouseClick(e as MapLayerMouseEvent)}\n onZoom={handleZoom}\n onZoomEnd={handleZoomEnd}\n onDrag={handleDrag}\n onDragEnd={handleDragEnd}\n attributionControl={false}\n onRender={() => onRenderHandler && onRenderHandler()}\n onLoad={(e) => {\n onMapLoad();\n onLoadHandler && onLoadHandler();\n\n const initialCenter = e.target.getCenter();\n\n setSavedInitialViewState({\n latitude: initialCenter.lat,\n longitude: initialCenter.lng,\n zoom: e.target.getZoom(),\n });\n }}\n ref={useSetMapInitialConfiguration()}\n interactive\n {...remaining}\n >\n <MapDataBoundingBoxContext.Provider value={dataLayersBBox}>\n <MapViewImperativeHandler\n forwardedRef={forwardedRef}\n containerRef={mapContainerRef}\n >\n <MapSource />\n {loading ? null : (\n <>\n <MapInteractions>{children}</MapInteractions>\n {shouldRenderToolbar ? <MapToolbar /> : null}\n </>\n )}\n </MapViewImperativeHandler>\n </MapDataBoundingBoxContext.Provider>\n </Map>\n </div>\n );\n});\n\n(MapContent as typeof MapContent & { displayName: string }).displayName =\n 'MapContent';\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/toolbar/MapToolbar.tsx"],
|
|
4
|
-
"sourcesContent": ["import { _ChartToolbarRenderer as ChartToolbarRenderer } from '@dynatrace/strato-components-preview/charts';\n\nimport { MapDownloadDataButton } from './buttons/MapDownloadDataButton.js';\nimport { MapResetButton } from './buttons/MapResetButton.js';\nimport { MapZoomInOutButtons } from './buttons/MapZoomInOutButtons.js';\nimport { MapZoomToFitButton } from './buttons/MapZoomToFitButton.js';\nimport { initialA11yToolbarTabIndexContext } from './constants.js';\nimport { useMapConfig } from '../../hooks/use-map-config.js';\nimport { MapInitialViewProvider } from '../../providers/map-initial-view.provider.js';\nimport { useMapOverlayState } from '../../store/selectors.js';\nimport { useSetStateTooltip } from '../../store/store.js';\n\nconst defaultToolbarPlacement = 'top-right';\n\nexport const MapToolbar = () => {\n const { toolbar: toolbarConfig, interactions: interactionsConfig } =\n useMapConfig();\n\n const { mouseInBounds } = useMapOverlayState();\n const setTooltipState = useSetStateTooltip();\n\n const isZoomEnabled = interactionsConfig?.zoom?.enabled ?? false;\n const isZoomToFitEnabled = interactionsConfig?.zoomToFit?.enabled ?? false;\n const isDownloadDataEnabled = toolbarConfig?.downloadData ?? false;\n\n const hasControls =\n isZoomEnabled || isZoomToFitEnabled || isDownloadDataEnabled;\n\n const handleMouseEnter = () => {\n setTooltipState({\n enabled: false,\n });\n };\n\n const handleMouseLeave = () => {\n setTooltipState({\n enabled: true,\n });\n };\n\n return hasControls ? (\n <MapInitialViewProvider>\n <ChartToolbarRenderer\n visible={mouseInBounds}\n collapsed={toolbarConfig?.collapsed}\n draggable={toolbarConfig?.draggable}\n placement={toolbarConfig?.placement ?? defaultToolbarPlacement}\n initialA11yState={initialA11yToolbarTabIndexContext}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n menuDisplayMode
|
|
5
|
-
"mappings": "AA0CM,SAUoB,KAVpB;AA1CN,SAAS,yBAAyB,4BAA4B;AAE9D,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,yCAAyC;AAClD,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AAEnC,MAAM,0BAA0B;AAEzB,MAAM,aAAa,MAAM;AAC9B,QAAM,EAAE,SAAS,eAAe,cAAc,mBAAmB,IAC/D,aAAa;AAEf,QAAM,EAAE,cAAc,IAAI,mBAAmB;AAC7C,QAAM,kBAAkB,mBAAmB;AAE3C,QAAM,gBAAgB,oBAAoB,MAAM,WAAW;AAC3D,QAAM,qBAAqB,oBAAoB,WAAW,WAAW;AACrE,QAAM,wBAAwB,eAAe,gBAAgB;AAE7D,QAAM,cACJ,iBAAiB,sBAAsB;AAEzC,QAAM,mBAAmB,MAAM;AAC7B,oBAAgB;AAAA,MACd,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM;AAC7B,oBAAgB;AAAA,MACd,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAEA,SAAO,cACL,oBAAC,0BACC;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW,eAAe;AAAA,MAC1B,WAAW,eAAe;AAAA,MAC1B,WAAW,eAAe,aAAa;AAAA,MACvC,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,cAAc;AAAA,MACd,
|
|
4
|
+
"sourcesContent": ["import { _ChartToolbarRenderer as ChartToolbarRenderer } from '@dynatrace/strato-components-preview/charts';\n\nimport { MapDownloadDataButton } from './buttons/MapDownloadDataButton.js';\nimport { MapResetButton } from './buttons/MapResetButton.js';\nimport { MapZoomInOutButtons } from './buttons/MapZoomInOutButtons.js';\nimport { MapZoomToFitButton } from './buttons/MapZoomToFitButton.js';\nimport { initialA11yToolbarTabIndexContext } from './constants.js';\nimport { useMapConfig } from '../../hooks/use-map-config.js';\nimport { MapInitialViewProvider } from '../../providers/map-initial-view.provider.js';\nimport { useMapOverlayState } from '../../store/selectors.js';\nimport { useSetStateTooltip } from '../../store/store.js';\n\nconst defaultToolbarPlacement = 'top-right';\n\nexport const MapToolbar = () => {\n const { toolbar: toolbarConfig, interactions: interactionsConfig } =\n useMapConfig();\n\n const { mouseInBounds } = useMapOverlayState();\n const setTooltipState = useSetStateTooltip();\n\n const isZoomEnabled = interactionsConfig?.zoom?.enabled ?? false;\n const isZoomToFitEnabled = interactionsConfig?.zoomToFit?.enabled ?? false;\n const isDownloadDataEnabled = toolbarConfig?.downloadData ?? false;\n\n const hasControls =\n isZoomEnabled || isZoomToFitEnabled || isDownloadDataEnabled;\n\n const handleMouseEnter = () => {\n setTooltipState({\n enabled: false,\n });\n };\n\n const handleMouseLeave = () => {\n setTooltipState({\n enabled: true,\n });\n };\n\n return hasControls ? (\n <MapInitialViewProvider>\n <ChartToolbarRenderer\n visible={mouseInBounds}\n collapsed={toolbarConfig?.collapsed}\n draggable={toolbarConfig?.draggable}\n placement={toolbarConfig?.placement ?? defaultToolbarPlacement}\n initialA11yState={initialA11yToolbarTabIndexContext}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n menuDisplayMode=\"never\"\n >\n {isZoomEnabled && <MapZoomInOutButtons />}\n {isZoomEnabled && <MapResetButton />}\n {isZoomToFitEnabled && <MapZoomToFitButton />}\n {isDownloadDataEnabled && <MapDownloadDataButton />}\n </ChartToolbarRenderer>\n </MapInitialViewProvider>\n ) : null;\n};\n\nMapToolbar['displayName'] = 'MapToolbar';\n"],
|
|
5
|
+
"mappings": "AA0CM,SAUoB,KAVpB;AA1CN,SAAS,yBAAyB,4BAA4B;AAE9D,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,yCAAyC;AAClD,SAAS,oBAAoB;AAC7B,SAAS,8BAA8B;AACvC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AAEnC,MAAM,0BAA0B;AAEzB,MAAM,aAAa,MAAM;AAC9B,QAAM,EAAE,SAAS,eAAe,cAAc,mBAAmB,IAC/D,aAAa;AAEf,QAAM,EAAE,cAAc,IAAI,mBAAmB;AAC7C,QAAM,kBAAkB,mBAAmB;AAE3C,QAAM,gBAAgB,oBAAoB,MAAM,WAAW;AAC3D,QAAM,qBAAqB,oBAAoB,WAAW,WAAW;AACrE,QAAM,wBAAwB,eAAe,gBAAgB;AAE7D,QAAM,cACJ,iBAAiB,sBAAsB;AAEzC,QAAM,mBAAmB,MAAM;AAC7B,oBAAgB;AAAA,MACd,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAEA,QAAM,mBAAmB,MAAM;AAC7B,oBAAgB;AAAA,MACd,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAEA,SAAO,cACL,oBAAC,0BACC;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,WAAW,eAAe;AAAA,MAC1B,WAAW,eAAe;AAAA,MAC1B,WAAW,eAAe,aAAa;AAAA,MACvC,kBAAkB;AAAA,MAClB,cAAc;AAAA,MACd,cAAc;AAAA,MACd,iBAAgB;AAAA,MAEf;AAAA,yBAAiB,oBAAC,uBAAoB;AAAA,QACtC,iBAAiB,oBAAC,kBAAe;AAAA,QACjC,sBAAsB,oBAAC,sBAAmB;AAAA,QAC1C,yBAAyB,oBAAC,yBAAsB;AAAA;AAAA;AAAA,EACnD,GACF,IACE;AACN;AAEA,WAAW,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/strato-geo",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"strato",
|
|
8
|
+
"design-system",
|
|
9
|
+
"component-library",
|
|
10
|
+
"css",
|
|
11
|
+
"dynatrace",
|
|
12
|
+
"dynatrace-ui",
|
|
13
|
+
"map",
|
|
14
|
+
"mapping",
|
|
15
|
+
"geospatial",
|
|
16
|
+
"visualization"
|
|
17
|
+
],
|
|
6
18
|
"lang": "lang/uncompiled",
|
|
7
19
|
"supportedLocales": [
|
|
8
20
|
"en",
|
|
@@ -46,10 +58,10 @@
|
|
|
46
58
|
"react-dom": "^18.0.0",
|
|
47
59
|
"react-intl": "^6.0.8 || ^7.0.0",
|
|
48
60
|
"react-is": "^18.0.0",
|
|
49
|
-
"@dynatrace/strato-components": "^1.
|
|
50
|
-
"@dynatrace/strato-
|
|
51
|
-
"@dynatrace/strato-components-preview": "^2.
|
|
52
|
-
"@dynatrace/strato-
|
|
61
|
+
"@dynatrace/strato-components": "^1.11.0",
|
|
62
|
+
"@dynatrace/strato-design-tokens": "^1.1.3",
|
|
63
|
+
"@dynatrace/strato-components-preview": "^2.6.0",
|
|
64
|
+
"@dynatrace/strato-icons": "^1.8.0"
|
|
53
65
|
},
|
|
54
66
|
"sideEffects": [
|
|
55
67
|
"./map/styles/react-mapgl-styles.css",
|