@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/slots/ThresholdLegend.ts"],
|
|
4
|
-
"sourcesContent": ["import { ThresholdLegendProps } from '../types/legend.js';\n\n/** The sequential legend slot component */\nexport const ThresholdLegend = (props: ThresholdLegendProps) => null;\n\nThresholdLegend['displayName'] = 'ThresholdLegend';\n"],
|
|
4
|
+
"sourcesContent": ["import type { ThresholdLegendProps } from '../types/legend.js';\n\n/** The sequential legend slot component */\nexport const ThresholdLegend = (props: ThresholdLegendProps) => null;\n\nThresholdLegend['displayName'] = 'ThresholdLegend';\n"],
|
|
5
5
|
"mappings": "AAGO,MAAM,kBAAkB,CAAC,UAAgC;AAEhE,gBAAgB,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/slots/Tooltip.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n _ChartTooltipSlots as ChartTooltipSlots,\n _ChartTooltipAtoms as ChartTooltipAtoms,\n
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import type { _ChartTooltipAtomsType as ChartTooltipAtomsType } from '@dynatrace/strato-components-preview/charts';\nimport {\n _ChartTooltipSlots as ChartTooltipSlots,\n _ChartTooltipAtoms as ChartTooltipAtoms,\n _ChartTooltipTemplate as ChartTooltipTemplate,\n} from '@dynatrace/strato-components-preview/charts';\n\nimport type { ChartTooltip } from '../types/tooltip.js';\n\n/**\n * @public\n * Tooltip is responsible for exposing the\n * ChartTooltip props, such as, sections, to the consumer\n */\nexport const Tooltip: ChartTooltip = {\n ...ChartTooltipSlots,\n ...ChartTooltipTemplate,\n};\n\n/**\n * @public\n * TooltipAtoms is responsible for exposing the\n * ChartTooltip atoms.\n */\nexport const TooltipAtoms: ChartTooltipAtomsType = { ...ChartTooltipAtoms };\n"],
|
|
5
|
+
"mappings": "AACA;AAAA,EACE,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,OACpB;AASA,MAAM,UAAwB;AAAA,EACnC,GAAG;AAAA,EACH,GAAG;AACL;AAOO,MAAM,eAAsC,EAAE,GAAG,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/slots/states/DisabledState.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components-preview/charts';\n\n/**\n * @internal\n */\nexport type DisabledStateProps = { height: string | number };\n\n/**\n * @internal\n */\nexport const DisabledState = ({ height }: DisabledStateProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"TXZNTtB5qReH8XE3\"\n defaultMessage=\"Maps have been disabled in your environment - to enable these, please reach out to your environment administrator.\"\n description=\"Message to display when all maps are hidden.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nDisabledState['displayName'] = 'DisabledState';\n"],
|
|
5
|
-
"mappings": "AAAA,OAAO,
|
|
4
|
+
"sourcesContent": ["import React, { type ReactNode } from 'react';\nimport { FormattedMessage } from 'react-intl';\n\nimport { _EmptyState as EmptyState } from '@dynatrace/strato-components-preview/charts';\n\n/**\n * @internal\n */\nexport type DisabledStateProps = { height: string | number };\n\n/**\n * @internal\n */\nexport const DisabledState = ({ height }: DisabledStateProps) => {\n const messageNode: ReactNode = (\n <FormattedMessage\n id=\"TXZNTtB5qReH8XE3\"\n defaultMessage=\"Maps have been disabled in your environment - to enable these, please reach out to your environment administrator.\"\n description=\"Message to display when all maps are hidden.\"\n />\n );\n\n return <EmptyState height={height}>{messageNode}</EmptyState>;\n};\n\nDisabledState['displayName'] = 'DisabledState';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAA+B;AACtC,SAAS,wBAAwB;AAEjC,SAAS,eAAe,kBAAkB;AAUnC,MAAM,gBAAgB,CAAC,EAAE,OAAO,MAA0B;AAC/D,QAAM,cACJ;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,gBAAe;AAAA,MACf,aAAY;AAAA;AAAA,EACd;AAGF,SAAO,oCAAC,cAAW,UAAiB,WAAY;AAClD;AAEA,cAAc,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/slots/states/ErrorStateSlot.tsx"],
|
|
4
|
-
"sourcesContent": ["import
|
|
4
|
+
"sourcesContent": ["import type { ReactNode } from 'react';\n\nexport interface ErrorStateSlotProps {\n children: ReactNode | ((errorMessage: string) => JSX.Element);\n}\n\nexport const ErrorStateSlot = (props: ErrorStateSlotProps) => null;\n"],
|
|
5
5
|
"mappings": "AAMO,MAAM,iBAAiB,CAAC,UAA+B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
createStore
|
|
4
|
+
} from "@dynatrace/strato-components-preview/core";
|
|
3
5
|
const initialSelection = { highlightedSeries: void 0, visible: void 0 };
|
|
4
6
|
const initialState = {
|
|
5
7
|
tooltip: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/store/map-store.context.ts"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAElB,
|
|
4
|
+
"sourcesContent": ["import React from 'react';\n\nimport {\n createStore,\n type Store,\n} from '@dynatrace/strato-components-preview/core';\n\nimport type { MapState } from '../types/state.js';\n\nconst initialSelection = { highlightedSeries: undefined, visible: undefined };\n\nexport const initialState: MapState<unknown> = {\n tooltip: {\n pinned: false,\n visible: false,\n enabled: true,\n hoveredLayerId: undefined,\n data: undefined,\n position: undefined,\n },\n overlay: {\n mouseInBounds: false,\n },\n selection: initialSelection,\n};\n\nexport const MapStore = React.createContext<Store<MapState<unknown>>>(\n createStore<MapState<unknown>>(initialState),\n);\n\nMapStore['displayName'] = 'MapStore';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAElB;AAAA,EACE;AAAA,OAEK;AAIP,MAAM,mBAAmB,EAAE,mBAAmB,QAAW,SAAS,OAAU;AAErE,MAAM,eAAkC;AAAA,EAC7C,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AAAA,EACA,SAAS;AAAA,IACP,eAAe;AAAA,EACjB;AAAA,EACA,WAAW;AACb;AAEO,MAAM,WAAW,MAAM;AAAA,EAC5B,YAA+B,YAAY;AAC7C;AAEA,SAAS,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React, { useRef } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
createStore
|
|
4
|
+
} from "@dynatrace/strato-components-preview/core";
|
|
3
5
|
import { initialState, MapStore } from "./map-store.context.js";
|
|
4
6
|
const MapStoreProvider = ({ children }) => {
|
|
5
7
|
const storeRef = useRef();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/store/map-store.provider.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {
|
|
5
|
-
"mappings": "AAAA,OAAO,
|
|
4
|
+
"sourcesContent": ["import React, { useRef, type PropsWithChildren } from 'react';\n\nimport {\n createStore,\n type Store,\n} from '@dynatrace/strato-components-preview/core';\n\nimport { initialState, MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const MapStoreProvider = ({ children }: PropsWithChildren) => {\n const storeRef = useRef<Store<MapState<unknown>>>();\n\n storeRef.current = createStore(initialState);\n\n return (\n <MapStore.Provider value={storeRef.current}>{children}</MapStore.Provider>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,SAAS,cAAsC;AAEtD;AAAA,EACE;AAAA,OAEK;AAEP,SAAS,cAAc,gBAAgB;AAGhC,MAAM,mBAAmB,CAAC,EAAE,SAAS,MAAyB;AACnE,QAAM,WAAW,OAAiC;AAElD,WAAS,UAAU,YAAY,YAAY;AAE3C,SACE,oCAAC,SAAS,UAAT,EAAkB,OAAO,SAAS,WAAU,QAAS;AAE1D;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/store/selectors.ts"],
|
|
4
|
-
"sourcesContent": ["import { isEqual } from 'lodash-es';\n\nimport { useStoreSelector } from '@dynatrace/strato-components-preview/core';\n\nimport { MapStore } from './map-store.context.js';\nimport { MapState } from '../types/state.js';\n\nexport const useSelector = <T, O>(selector: (state: MapState<T>) => O): O =>\n useStoreSelector(MapStore, selector, isEqual);\n\nexport const useMapSelectionState = <T>() =>\n useSelector(({ selection }: MapState<T>) => selection);\n\nexport const useMapTooltipState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned, ...tooltipState } = tooltip;\n\n return tooltipState;\n });\n\nexport const useMapTooltipPinnedState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned } = tooltip;\n\n return pinned;\n });\n\nexport const useMapOverlayState = <T>() =>\n useSelector(({ overlay }: MapState<T>) => overlay);\n"],
|
|
4
|
+
"sourcesContent": ["import { isEqual } from 'lodash-es';\n\nimport { useStoreSelector } from '@dynatrace/strato-components-preview/core';\n\nimport { MapStore } from './map-store.context.js';\nimport type { MapState } from '../types/state.js';\n\nexport const useSelector = <T, O>(selector: (state: MapState<T>) => O): O =>\n useStoreSelector(MapStore, selector, isEqual);\n\nexport const useMapSelectionState = <T>() =>\n useSelector(({ selection }: MapState<T>) => selection);\n\nexport const useMapTooltipState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned, ...tooltipState } = tooltip;\n\n return tooltipState;\n });\n\nexport const useMapTooltipPinnedState = <T>() =>\n useSelector(({ tooltip }: MapState<T>) => {\n const { pinned } = tooltip;\n\n return pinned;\n });\n\nexport const useMapOverlayState = <T>() =>\n useSelector(({ overlay }: MapState<T>) => overlay);\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,wBAAwB;AAEjC,SAAS,gBAAgB;AAGlB,MAAM,cAAc,CAAO,aAChC,iBAAiB,UAAU,UAAU,OAAO;AAEvC,MAAM,uBAAuB,MAClC,YAAY,CAAC,EAAE,UAAU,MAAmB,SAAS;AAEhD,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,QAAQ,GAAG,aAAa,IAAI;AAEpC,SAAO;AACT,CAAC;AAEI,MAAM,2BAA2B,MACtC,YAAY,CAAC,EAAE,QAAQ,MAAmB;AACxC,QAAM,EAAE,OAAO,IAAI;AAEnB,SAAO;AACT,CAAC;AAEI,MAAM,qBAAqB,MAChC,YAAY,CAAC,EAAE,QAAQ,MAAmB,OAAO;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/store/store.ts"],
|
|
4
|
-
"sourcesContent": ["import { useContext } from 'react';\n\nimport { MapStore } from './map-store.context.js';\nimport {\n MapOverlayState,\n MapSelectionState,\n MapTooltipState,\n} from '../types/state.js';\n\nexport const useSetState = () => {\n const { setState } = useContext(MapStore);\n\n return setState;\n};\n\nexport * from './selectors.js';\n\nexport const useSetStateSelection = () => {\n const setState = useSetState();\n\n return (newSelectionState: Partial<MapSelectionState>) => {\n setState((prev) => ({\n ...prev,\n selection: {\n ...prev.selection,\n ...newSelectionState,\n },\n }));\n };\n};\n\nexport const useSetStateTooltip = <T>() => {\n const setState = useSetState();\n\n return (newTooltipState: Partial<MapTooltipState<T>>) => {\n setState((prev) => ({\n ...prev,\n tooltip: {\n ...prev.tooltip,\n ...newTooltipState,\n },\n }));\n };\n};\n\nexport const useSetStateOverlay = () => {\n const setState = useSetState();\n\n return (newOverlayState: Partial<MapOverlayState>) => {\n setState((prev) => ({\n ...prev,\n overlay: {\n ...prev.overlay,\n ...newOverlayState,\n },\n }));\n };\n};\n\nexport const useToggleStatePinnedTooltip = () => {\n const setState = useSetState();\n\n return () => {\n setState((prev) => {\n if (prev.tooltip.visible || prev.tooltip.pinned) {\n return {\n ...prev,\n tooltip: {\n ...prev.tooltip,\n pinned: !prev.tooltip.pinned,\n },\n };\n }\n return { ...prev };\n });\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { useContext } from 'react';\n\nimport { MapStore } from './map-store.context.js';\nimport type {\n MapOverlayState,\n MapSelectionState,\n MapTooltipState,\n} from '../types/state.js';\n\nexport const useSetState = () => {\n const { setState } = useContext(MapStore);\n\n return setState;\n};\n\nexport * from './selectors.js';\n\nexport const useSetStateSelection = () => {\n const setState = useSetState();\n\n return (newSelectionState: Partial<MapSelectionState>) => {\n setState((prev) => ({\n ...prev,\n selection: {\n ...prev.selection,\n ...newSelectionState,\n },\n }));\n };\n};\n\nexport const useSetStateTooltip = <T>() => {\n const setState = useSetState();\n\n return (newTooltipState: Partial<MapTooltipState<T>>) => {\n setState((prev) => ({\n ...prev,\n tooltip: {\n ...prev.tooltip,\n ...newTooltipState,\n },\n }));\n };\n};\n\nexport const useSetStateOverlay = () => {\n const setState = useSetState();\n\n return (newOverlayState: Partial<MapOverlayState>) => {\n setState((prev) => ({\n ...prev,\n overlay: {\n ...prev.overlay,\n ...newOverlayState,\n },\n }));\n };\n};\n\nexport const useToggleStatePinnedTooltip = () => {\n const setState = useSetState();\n\n return () => {\n setState((prev) => {\n if (prev.tooltip.visible || prev.tooltip.pinned) {\n return {\n ...prev,\n tooltip: {\n ...prev.tooltip,\n pinned: !prev.tooltip.pinned,\n },\n };\n }\n return { ...prev };\n });\n };\n};\n"],
|
|
5
5
|
"mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,gBAAgB;AAOlB,MAAM,cAAc,MAAM;AAC/B,QAAM,EAAE,SAAS,IAAI,WAAW,QAAQ;AAExC,SAAO;AACT;AAEA,cAAc;AAEP,MAAM,uBAAuB,MAAM;AACxC,QAAM,WAAW,YAAY;AAE7B,SAAO,CAAC,sBAAkD;AACxD,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,WAAW;AAAA,QACT,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL;AAAA,IACF,EAAE;AAAA,EACJ;AACF;AAEO,MAAM,qBAAqB,MAAS;AACzC,QAAM,WAAW,YAAY;AAE7B,SAAO,CAAC,oBAAiD;AACvD,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,SAAS;AAAA,QACP,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL;AAAA,IACF,EAAE;AAAA,EACJ;AACF;AAEO,MAAM,qBAAqB,MAAM;AACtC,QAAM,WAAW,YAAY;AAE7B,SAAO,CAAC,oBAA8C;AACpD,aAAS,CAAC,UAAU;AAAA,MAClB,GAAG;AAAA,MACH,SAAS;AAAA,QACP,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL;AAAA,IACF,EAAE;AAAA,EACJ;AACF;AAEO,MAAM,8BAA8B,MAAM;AAC/C,QAAM,WAAW,YAAY;AAE7B,SAAO,MAAM;AACX,aAAS,CAAC,SAAS;AACjB,UAAI,KAAK,QAAQ,WAAW,KAAK,QAAQ,QAAQ;AAC/C,eAAO;AAAA,UACL,GAAG;AAAA,UACH,SAAS;AAAA,YACP,GAAG,KAAK;AAAA,YACR,QAAQ,CAAC,KAAK,QAAQ;AAAA,UACxB;AAAA,QACF;AAAA,MACF;AACA,aAAO,EAAE,GAAG,KAAK;AAAA,IACnB,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/types/bubble-layer.ts"],
|
|
4
|
-
"sourcesContent": ["import { LegendColorLayerProps, LocationColorProps } from './coloring.js';\nimport { Location } from './location.js';\n\n/**\n * Base props to configure a BubbleLayer\n * @typeParam T - Object extending Location\n */\nexport interface BubbleLayerBaseProps<T extends Location> {\n /**\n * An array of location data items to be displayed as bubbles in the BubbleLayer\n */\n data: T[];\n /**\n * Determines the interpolation mode for bubble size.\n * 'zoom': Bubble size changes with zoom.\n * 'fixed': Constant bubble size regardless of zoom level.\n * @defaultValue 'fixed'\n */\n sizeInterpolation?: 'zoom' | 'fixed';\n}\n\n/**\n * The BubbleLayer props\n * @typeParam T - Object extending Location\n */\nexport type BubbleLayerProps<T extends Location> = BubbleLayerBaseProps<T> &\n (LocationColorProps<T> | LegendColorLayerProps) &\n (ScaleRadiusProps<T> | ScaleNoneProps<T>);\n\n/**\n * When there's no scale provided, the radius prop is used as radius size in pixels\n * @typeParam T - Object extending Location\n */\nexport interface ScaleNoneProps<T> {\n /**\n * The way to indicate that scale should not be used\n */\n scale: 'none';\n /**\n * The radius property, which determines the size of the bubbles.\n * It can be a constant number or a function that calculates the radius based on the data item\n * @defaultValue 12\n */\n radius?: number | ((item: T) => number);\n}\n\n/**\n * When a scale is provided, all the values in the dataset will be scaled to fit between the `radiusRange`.\n * @typeParam T - Object extending Location\n */\nexport interface ScaleRadiusProps<T extends Location> {\n /**\n * The way the radius is scaled.\n * @defaultValue 'linear'\n */\n scale?: 'linear' | 'log';\n /**\n * The radius property, which determines the size of the bubbles.\n * It requires a callback that is used as data accessor.\n */\n radius: (item: T) => number;\n /**\n * It determines the min and max size for the bubble radius\n * @defaultValue [10, 100]\n */\n radiusRange?: [number, number];\n}\n\n/**\n * Type guard to know whether radius should apply the scale\n * @param props - BubbleLayerProps\n */\nexport function isScaleRadius<T extends Location>(\n props: BubbleLayerProps<T>,\n): props is BubbleLayerProps<T> & ScaleRadiusProps<T> {\n return props.scale !== 'none';\n}\n\n/** @internal */\nexport type InternalBubbleLayerProps<T extends Location> = {\n layerId: string;\n} & BubbleLayerProps<T>;\n"],
|
|
4
|
+
"sourcesContent": ["import type { LegendColorLayerProps, LocationColorProps } from './coloring.js';\nimport type { Location } from './location.js';\n\n/**\n * Base props to configure a BubbleLayer\n * @typeParam T - Object extending Location\n */\nexport interface BubbleLayerBaseProps<T extends Location> {\n /**\n * An array of location data items to be displayed as bubbles in the BubbleLayer\n */\n data: T[];\n /**\n * Determines the interpolation mode for bubble size.\n * 'zoom': Bubble size changes with zoom.\n * 'fixed': Constant bubble size regardless of zoom level.\n * @defaultValue 'fixed'\n */\n sizeInterpolation?: 'zoom' | 'fixed';\n}\n\n/**\n * The BubbleLayer props\n * @typeParam T - Object extending Location\n */\nexport type BubbleLayerProps<T extends Location> = BubbleLayerBaseProps<T> &\n (LocationColorProps<T> | LegendColorLayerProps) &\n (ScaleRadiusProps<T> | ScaleNoneProps<T>);\n\n/**\n * When there's no scale provided, the radius prop is used as radius size in pixels\n * @typeParam T - Object extending Location\n */\nexport interface ScaleNoneProps<T> {\n /**\n * The way to indicate that scale should not be used\n */\n scale: 'none';\n /**\n * The radius property, which determines the size of the bubbles.\n * It can be a constant number or a function that calculates the radius based on the data item\n * @defaultValue 12\n */\n radius?: number | ((item: T) => number);\n}\n\n/**\n * When a scale is provided, all the values in the dataset will be scaled to fit between the `radiusRange`.\n * @typeParam T - Object extending Location\n */\nexport interface ScaleRadiusProps<T extends Location> {\n /**\n * The way the radius is scaled.\n * @defaultValue 'linear'\n */\n scale?: 'linear' | 'log';\n /**\n * The radius property, which determines the size of the bubbles.\n * It requires a callback that is used as data accessor.\n */\n radius: (item: T) => number;\n /**\n * It determines the min and max size for the bubble radius\n * @defaultValue [10, 100]\n */\n radiusRange?: [number, number];\n}\n\n/**\n * Type guard to know whether radius should apply the scale\n * @param props - BubbleLayerProps\n */\nexport function isScaleRadius<T extends Location>(\n props: BubbleLayerProps<T>,\n): props is BubbleLayerProps<T> & ScaleRadiusProps<T> {\n return props.scale !== 'none';\n}\n\n/** @internal */\nexport type InternalBubbleLayerProps<T extends Location> = {\n layerId: string;\n} & BubbleLayerProps<T>;\n"],
|
|
5
5
|
"mappings": "AAwEO,SAAS,cACd,OACoD;AACpD,SAAO,MAAM,UAAU;AACzB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/map/types/coloring.ts"],
|
|
4
|
-
"sourcesContent": ["import { Location } from './location.js';\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending Location\n */\nexport interface LocationColorProps<T extends Location> {\n /** Custom color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Props to configure any Layer with legend coloring\n */\nexport interface LegendColorLayerProps {\n /** When the color prop is set to 'legend', a value accessor is needed */\n color: 'legend';\n /** The value accesor to map data point values to legend color */\n valueAccessor: string;\n}\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending a record of string keys and any type of values\n */\nexport interface ChoroplethCustomColorProps<T extends Record<string, unknown>> {\n /** Color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Detects whether color is linked to legend or not\n * @param props - layer color props\n */\nexport function isLegendColoring(\n props:\n | LocationColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n): props is LegendColorLayerProps {\n return props.color === 'legend';\n}\n"],
|
|
4
|
+
"sourcesContent": ["import type { Location } from './location.js';\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending Location\n */\nexport interface LocationColorProps<T extends Location> {\n /** Custom color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Props to configure any Layer with legend coloring\n */\nexport interface LegendColorLayerProps {\n /** When the color prop is set to 'legend', a value accessor is needed */\n color: 'legend';\n /** The value accesor to map data point values to legend color */\n valueAccessor: string;\n}\n\n/**\n * Props to configure any Layer with custom coloring\n * @typeParam T - Object extending a record of string keys and any type of values\n */\nexport interface ChoroplethCustomColorProps<T extends Record<string, unknown>> {\n /** Color to apply to the layer */\n color?: string | ((item: T) => string);\n}\n\n/**\n * Detects whether color is linked to legend or not\n * @param props - layer color props\n */\nexport function isLegendColoring(\n props:\n | LocationColorProps<never>\n | ChoroplethCustomColorProps<never>\n | LegendColorLayerProps,\n): props is LegendColorLayerProps {\n return props.color === 'legend';\n}\n"],
|
|
5
5
|
"mappings": "AAkCO,SAAS,iBACd,OAIgC;AAChC,SAAO,MAAM,UAAU;AACzB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/map/MapView.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/react-mapgl-styles.css';
|
|
3
|
-
import { MapViewProps, MapViewRef } from './types/map-view.js';
|
|
3
|
+
import type { MapViewProps, MapViewRef } from './types/map-view.js';
|
|
4
4
|
/**
|
|
5
5
|
* The `MapView` is a component that renders a map with various geospatial data layers.
|
|
6
6
|
* @beta
|
package/map/MapView.js
CHANGED
|
@@ -78,18 +78,16 @@ const _MapView = (0, import_react.forwardRef)(
|
|
|
78
78
|
}
|
|
79
79
|
}));
|
|
80
80
|
const config = (0, import_iterate_config_slots.iterateConfigSlots)(children);
|
|
81
|
-
const
|
|
81
|
+
const isLegendHidden = !config.legend || !!config.legend.hidden;
|
|
82
|
+
const legendPosition = config.legend?.position;
|
|
83
|
+
const legendRatio = config.legend?.ratio;
|
|
84
|
+
const legendOnRatioChange = config.legend?.onRatioChange;
|
|
82
85
|
const { errorState } = (0, import_get_map_states_template.getMapStatesTemplates)(children);
|
|
83
86
|
const {
|
|
84
87
|
isLoading: isLoadingSettings,
|
|
85
88
|
isMapEnabled,
|
|
86
89
|
countryCode
|
|
87
90
|
} = (0, import_use_map_settings.useMapSettings)();
|
|
88
|
-
const legendConfig = {
|
|
89
|
-
orientation: config?.legend?.position,
|
|
90
|
-
sizes: import_constants.DEFAULT_LEGEND_SIZES,
|
|
91
|
-
ratio: config?.legend?.type === "sequential" || config?.legend?.type === "threshold" ? import_constants.DEFAULT_MAP_LEGEND_RATIO : void 0
|
|
92
|
-
};
|
|
93
91
|
const chartHeight = (0, import_charts._coerceSizeValue)(props.height) || import_constants.DEFAULT_MAP_HEIGHT;
|
|
94
92
|
const containerStyles = { width: "100%", ...costumerStyle };
|
|
95
93
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -103,12 +101,20 @@ const _MapView = (0, import_react.forwardRef)(
|
|
|
103
101
|
import_charts._ChartLayout,
|
|
104
102
|
{
|
|
105
103
|
chartHeight,
|
|
106
|
-
legendConfig,
|
|
107
104
|
errorState,
|
|
108
105
|
showLoader: loading || isLoadingSettings
|
|
109
106
|
},
|
|
110
107
|
/* @__PURE__ */ import_react.default.createElement(import_charts._ChartLayout.Graph, null, !isLoadingSettings && /* @__PURE__ */ import_react.default.createElement(import_MapContent.MapContent, { ref: rootRef, ...remaining }, parsedChildren)),
|
|
111
|
-
|
|
108
|
+
!isLegendHidden && /* @__PURE__ */ import_react.default.createElement(
|
|
109
|
+
import_charts._ChartLayout.Legend,
|
|
110
|
+
{
|
|
111
|
+
position: legendPosition,
|
|
112
|
+
ratio: legendRatio,
|
|
113
|
+
ratioBoundaries: import_constants.DEFAULT_LEGEND_SIZES,
|
|
114
|
+
onResize: legendOnRatioChange
|
|
115
|
+
},
|
|
116
|
+
/* @__PURE__ */ import_react.default.createElement(import_MapLegendRenderer.MapLegendRenderer, null)
|
|
117
|
+
)
|
|
112
118
|
)))))))))
|
|
113
119
|
);
|
|
114
120
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { InternalBubbleLayerProps } from '../../types/bubble-layer.js';
|
|
3
|
-
import { Location } from '../../types/location.js';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type InternalBubbleLayerProps } from '../../types/bubble-layer.js';
|
|
3
|
+
import type { Location } from '../../types/location.js';
|
|
4
4
|
export declare const BubbleLayer: {
|
|
5
5
|
<T extends Location>(props: React.PropsWithChildren<InternalBubbleLayerProps<T>>): React.JSX.Element;
|
|
6
6
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BubbleLayerTooltipHandler } from '../../types/tooltip.js';
|
|
2
|
+
import type { BubbleLayerTooltipHandler } from '../../types/tooltip.js';
|
|
3
3
|
export interface BubbleLayerTooltipProps {
|
|
4
4
|
layerId: string;
|
|
5
5
|
tooltipTemplate?: BubbleLayerTooltipHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
1
|
+
import type { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
2
2
|
/**
|
|
3
3
|
* It modifies the radius size expression to take the bubble outline stroke size into account
|
|
4
4
|
* @param expression - radius expression
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ScaleLinear, ScaleLogarithmic } from 'd3-scale';
|
|
2
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import { type ScaleLinear, type ScaleLogarithmic } from 'd3-scale';
|
|
2
|
+
import type { Location } from '../../../types/location.js';
|
|
3
3
|
export declare const buildRadiusScale: <T extends Location>(data: T[], radius: (item: T) => number, scale: 'linear' | 'log', range: [number, number]) => ScaleLinear<number, number> | ScaleLogarithmic<number, number>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataDrivenPropertyValueSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
1
|
+
import type { DataDrivenPropertyValueSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
2
2
|
/**
|
|
3
3
|
* Builds the circle stick to distance expression.
|
|
4
4
|
* It creates an exponential interpolation between the radius size at the minimum zoom level and the maximum zoom level
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import type { Location } from '../../../types/location.js';
|
|
2
2
|
export declare function defineRadius<T extends Location>(radius: number | ((item: T) => number), feature: T): number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ScaleLinear, ScaleLogarithmic } from 'd3-scale';
|
|
2
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import type { ScaleLinear, ScaleLogarithmic } from 'd3-scale';
|
|
2
|
+
import type { Location } from '../../../types/location.js';
|
|
3
3
|
type RadiusScale = ScaleLinear<number, number> | ScaleLogarithmic<number, number> | ((value: number) => number);
|
|
4
4
|
export declare const parseBubbleDataToGeoJSON: <T extends Location>(data: T[], color: string | ((item: T) => string), radius: number | ((item: T) => number), scale: RadiusScale) => {
|
|
5
5
|
type: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { InternalChoroplethLayerProps } from '../../types/choropleth-layer.js';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { InternalChoroplethLayerProps } from '../../types/choropleth-layer.js';
|
|
3
3
|
export declare const ChoroplethLayer: {
|
|
4
4
|
<T extends Record<string, unknown>>(props: React.PropsWithChildren<InternalChoroplethLayerProps<T>>): React.JSX.Element;
|
|
5
5
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChoroplethLayerTooltipHandler } from '../../types/tooltip.js';
|
|
2
|
+
import type { ChoroplethLayerTooltipHandler } from '../../types/tooltip.js';
|
|
3
3
|
export interface ChoroplethLayerTooltipProps {
|
|
4
4
|
layerId: string;
|
|
5
5
|
tooltipTemplate?: ChoroplethLayerTooltipHandler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { InternalConnectionLayerProps,
|
|
2
|
+
import type { InternalConnectionLayerProps, Connection } from '../../types/connection-layer.js';
|
|
3
3
|
export declare const ConnectionLayer: {
|
|
4
4
|
<T extends Connection>(props: React.PropsWithChildren<InternalConnectionLayerProps<T>>): React.JSX.Element[];
|
|
5
5
|
displayName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { InternalConnectionLayerProps,
|
|
2
|
+
import type { InternalConnectionLayerProps, Connection } from '../../types/connection-layer.js';
|
|
3
3
|
interface ConnectionLayerDirectionProps<T extends Connection> extends Required<Pick<InternalConnectionLayerProps<T>, 'layerId' | 'directionIndicator'>> {
|
|
4
4
|
geoJsonData: GeoJSON.FeatureCollection;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ConnectionLayerTooltipHandler } from '../../types/tooltip.js';
|
|
2
|
+
import type { ConnectionLayerTooltipHandler } from '../../types/tooltip.js';
|
|
3
3
|
export interface ConnectionLayerTooltipProps {
|
|
4
4
|
layerId: string;
|
|
5
5
|
tooltipTemplate?: ConnectionLayerTooltipHandler;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type GeoJSON from 'geojson';
|
|
2
|
-
import { FeatureProperties } from '../../../types/connection-layer.js';
|
|
3
|
-
import { Location } from '../../../types/location.js';
|
|
2
|
+
import type { FeatureProperties } from '../../../types/connection-layer.js';
|
|
3
|
+
import type { Location } from '../../../types/location.js';
|
|
4
4
|
export declare const getArcLineFeatures: (path: Location[], featureProperties: FeatureProperties) => GeoJSON.Feature<GeoJSON.LineString>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type GeoJSON from 'geojson';
|
|
2
|
-
import { FeatureProperties } from '../../../types/connection-layer.js';
|
|
3
|
-
import { Location } from '../../../types/location.js';
|
|
2
|
+
import type { FeatureProperties } from '../../../types/connection-layer.js';
|
|
3
|
+
import type { Location } from '../../../types/location.js';
|
|
4
4
|
export declare const getStraightLineFeatures: (path: Location[], featureProperties: FeatureProperties) => GeoJSON.Feature[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type GeoJSON from 'geojson';
|
|
2
|
-
import { Connection,
|
|
2
|
+
import type { Connection, CurvedLine } from '../../../types/connection-layer.js';
|
|
3
3
|
export declare const parseConnectionDataToGeoJSON: <T extends Connection>(data: T[], thickness: number, color: string | ((connection: T) => string), curve?: CurvedLine) => GeoJSON.FeatureCollection[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InternalConnectionLayerProps,
|
|
1
|
+
import type { InternalConnectionLayerProps, Connection } from '../../../types/connection-layer.js';
|
|
2
2
|
interface ParseGeoJsonDataProps<T extends Connection> extends Required<Pick<InternalConnectionLayerProps<T>, 'directionIndicator'>> {
|
|
3
3
|
geoJsonData: GeoJSON.FeatureCollection;
|
|
4
4
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import type { Location } from '../../../types/location.js';
|
|
2
2
|
export declare const handleCopyToClipboard: (location: Location) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { InternalDotLayerProps } from '../../types/dot-layer.js';
|
|
3
|
-
import { Location } from '../../types/location.js';
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { InternalDotLayerProps } from '../../types/dot-layer.js';
|
|
3
|
+
import type { Location } from '../../types/location.js';
|
|
4
4
|
/**
|
|
5
5
|
* DotLayer Component
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DotLayerTooltipHandler } from '../../types/tooltip.js';
|
|
2
|
+
import type { DotLayerTooltipHandler } from '../../types/tooltip.js';
|
|
3
3
|
export interface DotLayerTooltipProps {
|
|
4
4
|
layerId: string;
|
|
5
5
|
tooltipTemplate?: DotLayerTooltipHandler;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import type { Location } from '../../../types/location.js';
|
|
2
2
|
export declare function defineBearing<T extends Location>(bearing: number | ((item: T) => number), feature: T): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Location } from '../../../types/location.js';
|
|
1
|
+
import type { Location } from '../../../types/location.js';
|
|
2
2
|
export declare const parseDotDataToGeoJSON: <T extends Location>(data: T[], color: string | ((item: T) => string), bearing: number | ((item: T) => number)) => {
|
|
3
3
|
type: string;
|
|
4
4
|
features: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MapViewProps } from '../types/map-view.js';
|
|
2
|
+
import type { MapViewProps } from '../types/map-view.js';
|
|
3
3
|
export declare const MapContent: (props: React.PropsWithChildren<MapViewProps> & React.RefAttributes<HTMLDivElement>) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A11yToolbarTabIndex } from '../../types/toolbar.js';
|
|
1
|
+
import type { A11yToolbarTabIndex } from '../../types/toolbar.js';
|
|
2
2
|
export declare const initialA11yToolbarTabIndexContext: A11yToolbarTabIndex[];
|
|
3
3
|
export declare const TOOLBAR_MESSAGES: {
|
|
4
4
|
zoomActionZoomIn: {
|
package/map/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
1
|
+
import type { ExpressionSpecification } from '@maplibre/maplibre-gl-style-spec';
|
|
2
2
|
export declare const DEFAULT_COUNTRIES_FILL_COLOR: string;
|
|
3
3
|
export declare const DEFAULT_COUNTRIES_BORDER_COLOR: string;
|
|
4
4
|
export declare const TRANSPARENT_BORDER_COLOR = "#00000000";
|
|
@@ -11,8 +11,9 @@ export declare const DEFAULT_COUNTRY_CODE = "default";
|
|
|
11
11
|
export declare const FIT_BOUNDS_OPTIONS: {
|
|
12
12
|
padding: number;
|
|
13
13
|
};
|
|
14
|
-
export declare const DEFAULT_MAP_HEIGHT =
|
|
14
|
+
export declare const DEFAULT_MAP_HEIGHT = 400;
|
|
15
15
|
export declare const DEFAULT_MAP_LEGEND_RATIO = 12;
|
|
16
|
+
export declare const DEFAULT_MAP_POSITION = "auto";
|
|
16
17
|
export declare const DEFAULT_INPUT_ICON_SIZE = 20;
|
|
17
18
|
export declare const ACTIVE_COLOR: string;
|
|
18
19
|
export declare const BASE_LAYER_IDS: string[];
|
package/map/constants.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(constants_exports, {
|
|
|
53
53
|
DEFAULT_LINE_THICKNESS: () => DEFAULT_LINE_THICKNESS,
|
|
54
54
|
DEFAULT_MAP_HEIGHT: () => DEFAULT_MAP_HEIGHT,
|
|
55
55
|
DEFAULT_MAP_LEGEND_RATIO: () => DEFAULT_MAP_LEGEND_RATIO,
|
|
56
|
+
DEFAULT_MAP_POSITION: () => DEFAULT_MAP_POSITION,
|
|
56
57
|
DEFAULT_RADIUS: () => DEFAULT_RADIUS,
|
|
57
58
|
DEFAULT_RADIUS_EXPRESSION: () => DEFAULT_RADIUS_EXPRESSION,
|
|
58
59
|
DEFAULT_RANGE_COLOR: () => DEFAULT_RANGE_COLOR,
|
|
@@ -93,8 +94,9 @@ const WHOLE_WORLD_VIEW_BOUNDARIES = [
|
|
|
93
94
|
];
|
|
94
95
|
const DEFAULT_COUNTRY_CODE = "default";
|
|
95
96
|
const FIT_BOUNDS_OPTIONS = { padding: 20 };
|
|
96
|
-
const DEFAULT_MAP_HEIGHT =
|
|
97
|
+
const DEFAULT_MAP_HEIGHT = 400;
|
|
97
98
|
const DEFAULT_MAP_LEGEND_RATIO = 12;
|
|
99
|
+
const DEFAULT_MAP_POSITION = "auto";
|
|
98
100
|
const DEFAULT_INPUT_ICON_SIZE = 20;
|
|
99
101
|
const ACTIVE_COLOR = import_colors.default.Border.Neutral.AccentActive;
|
|
100
102
|
const BASE_LAYER_IDS = ["geojson-line", "geojson-fill"];
|
|
@@ -140,7 +142,7 @@ const DEFAULT_LINE_DASH_ARRAY = [5, 2.5];
|
|
|
140
142
|
const MIN_LINE_THICKNESS = 1;
|
|
141
143
|
const MAX_LINE_THICKNESS = 64;
|
|
142
144
|
const DIRECTION_ICON_OUTPUT_SIZE = 128;
|
|
143
|
-
const DIRECTION_ICON_SHRINK_RATIO = 1 /
|
|
145
|
+
const DIRECTION_ICON_SHRINK_RATIO = 1 / 15;
|
|
144
146
|
const ACTIVE_STATE_BORDERS_WIDTH = 1.8;
|
|
145
147
|
const DEFAULT_CHOROPLETH_COLOR = import_colors.default.Charts.Sequential.Blue.Color05.Default;
|
|
146
148
|
const COPY_TO_CLIPBOARD_MESSAGES = (0, import_react_intl.defineMessages)({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScaleQuantize, ScaleThreshold, ScaleOrdinal } from 'd3-scale';
|
|
1
|
+
import type { ScaleQuantize, ScaleThreshold, ScaleOrdinal } from 'd3-scale';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export type ColorScaleContextProps = ScaleQuantize<string> | ScaleThreshold<number, string> | ScaleOrdinal<string, string>;
|
|
4
4
|
export declare const ColorScaleContext: React.Context<ColorScaleContextProps | undefined>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MapRef } from 'react-map-gl/maplibre';
|
|
2
|
-
import { MapShape } from '../types/shapes.js';
|
|
1
|
+
import type { MapRef } from 'react-map-gl/maplibre';
|
|
2
|
+
import type { MapShape } from '../types/shapes.js';
|
|
3
3
|
export declare const attachImageFromShape: (map: MapRef, shape: MapShape, name: string, outputSize?: number) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MapRef } from 'react-map-gl/maplibre';
|
|
2
|
-
import { MapShape } from '../types/shapes.js';
|
|
1
|
+
import type { MapRef } from 'react-map-gl/maplibre';
|
|
2
|
+
import type { MapShape } from '../types/shapes.js';
|
|
3
3
|
export declare const attachImageFromString: (map: MapRef, shape: MapShape | string, suffix?: string, outputSize?: number) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MapRef } from 'react-map-gl/maplibre';
|
|
1
|
+
import type { MapRef } from 'react-map-gl/maplibre';
|
|
2
2
|
export declare const attachImageFromText: (map: MapRef, text: string, name: string, outputSize?: number) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MapRef } from 'react-map-gl/maplibre';
|
|
1
|
+
import type { MapRef } from 'react-map-gl/maplibre';
|
|
2
2
|
export declare const attachImageToMap: (map: MapRef, bitmap: ImageBitmap | HTMLImageElement, iconName: string, sdf?: boolean) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ColorPalette } from '@dynatrace/strato-components-preview/charts';
|
|
1
|
+
import { type ColorPalette } from '@dynatrace/strato-components-preview/charts';
|
|
2
2
|
export declare const buildCategoricalScale: (categories: string[], colorPalette: string[] | ColorPalette) => import("d3-scale").ScaleOrdinal<string, string, never>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { MapShape } from '../types/shapes.js';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { MapShape } from '../types/shapes.js';
|
|
3
3
|
export declare const isValidShape: (shape: MapShape | ReactNode) => shape is MapShape;
|