@dynatrace/strato-geo 0.9.25 → 0.10.2
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/index.js +2 -0
- package/esm/index.js.map +2 -2
- package/esm/map/MapView.js +7 -10
- package/esm/map/MapView.js.map +2 -2
- package/esm/map/components/BubbleLayer/BubbleLayer.js +6 -2
- package/esm/map/components/BubbleLayer/BubbleLayer.js.map +2 -2
- package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js +4 -4
- package/esm/map/components/ChoroplethLayer/ChoroplethLayer.js.map +2 -2
- package/esm/map/components/DefaultTooltip/DefaultTooltip.js +15 -10
- package/esm/map/components/DefaultTooltip/DefaultTooltip.js.map +2 -2
- package/esm/map/components/DotLayer/BackgroundLayer.js +3 -7
- package/esm/map/components/DotLayer/BackgroundLayer.js.map +2 -2
- package/esm/map/components/DotLayer/DotLayer.js +13 -4
- package/esm/map/components/DotLayer/DotLayer.js.map +2 -2
- package/esm/map/components/DotLayer/functions/parse-dot-data-to-geo-json.js +5 -1
- package/esm/map/components/DotLayer/functions/parse-dot-data-to-geo-json.js.map +2 -2
- package/esm/map/components/DotLayer/functions/resolve-icon-background.js +21 -8
- package/esm/map/components/DotLayer/functions/resolve-icon-background.js.map +2 -2
- package/esm/map/components/MapContent.js +8 -6
- package/esm/map/components/MapContent.js.map +2 -2
- package/esm/map/components/legend/CategoricalLegendRenderer.js +2 -2
- package/esm/map/components/legend/CategoricalLegendRenderer.js.map +2 -2
- package/esm/map/constants.js +9 -1
- package/esm/map/constants.js.map +2 -2
- package/esm/map/contexts/layer-coloring-strategy.context.js +2 -2
- package/esm/map/contexts/layer-coloring-strategy.context.js.map +2 -2
- package/esm/map/contexts/map-base-layer.context.js +6 -0
- package/esm/map/contexts/map-base-layer.context.js.map +7 -0
- package/esm/map/contexts/map-configuration.context.js +2 -1
- package/esm/map/contexts/map-configuration.context.js.map +2 -2
- package/esm/map/contexts/map-raw-data.context.js +3 -1
- package/esm/map/contexts/map-raw-data.context.js.map +2 -2
- package/esm/map/functions/apply-feature-filter-rules.js +20 -0
- package/esm/map/functions/apply-feature-filter-rules.js.map +7 -0
- package/esm/map/functions/associated-features.js.map +2 -2
- package/esm/map/functions/base-layer-rules.js +32 -0
- package/esm/map/functions/base-layer-rules.js.map +7 -0
- package/esm/map/functions/build-categorical-scale.js.map +2 -2
- package/esm/map/functions/extract-layers-data.js +34 -45
- package/esm/map/functions/extract-layers-data.js.map +2 -2
- package/esm/map/functions/fetch-base-layer-features.js +20 -0
- package/esm/map/functions/fetch-base-layer-features.js.map +7 -0
- package/esm/map/functions/get-base-layer-shapes-request-config.js +25 -0
- package/esm/map/functions/get-base-layer-shapes-request-config.js.map +7 -0
- package/esm/map/functions/get-countries-geo-code.js.map +2 -2
- package/esm/map/functions/is-component.js +8 -0
- package/esm/map/functions/is-component.js.map +7 -0
- package/esm/map/functions/iterate-config-slots.js +14 -1
- package/esm/map/functions/iterate-config-slots.js.map +2 -2
- package/esm/map/functions/merge-feature-collections.js +14 -0
- package/esm/map/functions/merge-feature-collections.js.map +7 -0
- package/esm/map/functions/parse-tooltip-data.js.map +2 -2
- package/esm/map/functions/to-mapbox-initial-view-state.js.map +2 -2
- package/esm/map/functions/tooltip-type-guards.js +2 -2
- package/esm/map/functions/tooltip-type-guards.js.map +2 -2
- package/esm/map/hooks/use-load-map-base-layer.js +74 -0
- package/esm/map/hooks/use-load-map-base-layer.js.map +7 -0
- package/esm/map/hooks/use-map-base-layer-features.js +7 -0
- package/esm/map/hooks/use-map-base-layer-features.js.map +7 -0
- package/esm/map/hooks/use-resolve-color.js +14 -5
- package/esm/map/hooks/use-resolve-color.js.map +2 -2
- package/esm/map/hooks/use-safe-svg-parser.js.map +2 -2
- package/esm/map/hooks/use-tooltip-template.js.map +1 -1
- package/esm/map/hooks/useAutoLegendRefresh.js.map +1 -1
- package/esm/map/map-styles/default-style.js +1 -2
- package/esm/map/map-styles/default-style.js.map +2 -2
- package/esm/map/providers/layer-color-strategy.provider.js +10 -5
- package/esm/map/providers/layer-color-strategy.provider.js.map +2 -2
- package/esm/map/slots/BaseLayer.js +6 -0
- package/esm/map/slots/BaseLayer.js.map +7 -0
- package/esm/map/sources/countries.js.map +2 -2
- package/esm/map/store/map-store.context.js.map +2 -2
- package/esm/map/store/map-store.provider.js.map +2 -2
- package/esm/map/store/selectors.js +3 -1
- package/esm/map/store/selectors.js.map +2 -2
- package/esm/map/types/base-layer-shapes-request-config.js +1 -0
- package/esm/map/types/base-layer-shapes-request-config.js.map +7 -0
- package/esm/map/types/base-layer.js +1 -0
- package/esm/map/types/base-layer.js.map +7 -0
- package/esm/map/types/coloring.js.map +1 -1
- package/index.d.ts +2 -0
- package/index.js +2 -0
- package/map/MapView.js +7 -10
- package/map/components/BubbleLayer/BubbleLayer.js +5 -1
- package/map/components/ChoroplethLayer/ChoroplethLayer.js +3 -3
- package/map/components/DefaultTooltip/DefaultTooltip.js +15 -10
- package/map/components/DotLayer/BackgroundLayer.d.ts +1 -1
- package/map/components/DotLayer/BackgroundLayer.js +3 -7
- package/map/components/DotLayer/DotLayer.js +12 -3
- package/map/components/DotLayer/functions/parse-dot-data-to-geo-json.d.ts +3 -1
- package/map/components/DotLayer/functions/parse-dot-data-to-geo-json.js +5 -1
- package/map/components/DotLayer/functions/resolve-icon-background.d.ts +7 -4
- package/map/components/DotLayer/functions/resolve-icon-background.js +21 -8
- package/map/components/MapContent.js +6 -6
- package/map/constants.d.ts +4 -0
- package/map/constants.js +9 -1
- package/map/contexts/layer-coloring-strategy.context.d.ts +3 -2
- package/map/contexts/layer-coloring-strategy.context.js +12 -2
- package/map/contexts/map-base-layer.context.d.ts +3 -0
- package/map/contexts/map-base-layer.context.js +34 -0
- package/map/contexts/map-configuration.context.js +2 -1
- package/map/contexts/map-raw-data.context.d.ts +1 -1
- package/map/contexts/map-raw-data.context.js +3 -1
- package/map/functions/apply-feature-filter-rules.d.ts +3 -0
- package/map/functions/apply-feature-filter-rules.js +38 -0
- package/map/functions/base-layer-rules.d.ts +4 -0
- package/map/functions/base-layer-rules.js +50 -0
- package/map/functions/extract-layers-data.d.ts +1 -1
- package/map/functions/extract-layers-data.js +34 -45
- package/map/functions/fetch-base-layer-features.d.ts +3 -0
- package/map/functions/fetch-base-layer-features.js +38 -0
- package/map/functions/get-base-layer-shapes-request-config.d.ts +2 -0
- package/map/functions/get-base-layer-shapes-request-config.js +43 -0
- package/map/functions/get-countries-geo-code.d.ts +2 -1
- package/map/functions/is-component.d.ts +2 -0
- package/map/functions/is-component.js +26 -0
- package/map/functions/iterate-config-slots.js +14 -1
- package/map/functions/merge-feature-collections.d.ts +2 -0
- package/map/functions/merge-feature-collections.js +32 -0
- package/map/functions/to-mapbox-initial-view-state.d.ts +7 -1
- package/map/functions/tooltip-type-guards.js +2 -2
- package/map/hooks/use-layer-coloring-strategy.d.ts +1 -1
- package/map/hooks/use-load-map-base-layer.d.ts +8 -0
- package/map/hooks/use-load-map-base-layer.js +85 -0
- package/map/hooks/use-map-base-layer-features.d.ts +1 -0
- package/map/hooks/use-map-base-layer-features.js +25 -0
- package/map/hooks/use-map-raw-data.d.ts +1 -1
- package/map/hooks/use-map-source.d.ts +1 -1
- package/map/hooks/use-resolve-color.d.ts +5 -1
- package/map/hooks/use-resolve-color.js +11 -4
- package/map/hooks/use-safe-svg-parser.d.ts +1 -1
- package/map/hooks/use-tooltip-template.d.ts +1 -1
- package/map/hooks/useAutoLegendRefresh.d.ts +1 -1
- package/map/map-styles/default-style.d.ts +2 -2
- package/map/map-styles/default-style.js +1 -2
- package/map/providers/layer-color-strategy.provider.d.ts +2 -1
- package/map/providers/layer-color-strategy.provider.js +10 -5
- package/map/slots/BaseLayer.d.ts +6 -0
- package/map/slots/BaseLayer.js +24 -0
- package/map/sources/countries.d.ts +2 -26
- package/map/store/map-store.context.d.ts +17 -1
- package/map/types/base-layer-shapes-request-config.d.ts +7 -0
- package/map/types/base-layer-shapes-request-config.js +15 -0
- package/map/types/base-layer.d.ts +8 -0
- package/map/types/base-layer.js +15 -0
- package/map/types/coloring.d.ts +2 -0
- package/map/types/configuration.d.ts +2 -0
- package/map/types/dot-layer.d.ts +1 -1
- package/map/types/map-view.d.ts +2 -2
- package/map/types/state.d.ts +1 -1
- package/package.json +3 -3
- package/esm/map/hooks/use-map-settings.js +0 -23
- package/esm/map/hooks/use-map-settings.js.map +0 -7
- package/map/hooks/use-map-settings.d.ts +0 -5
- package/map/hooks/use-map-settings.js +0 -41
package/esm/index.js
CHANGED
|
@@ -3,12 +3,14 @@ import { MapView } from "./map/MapView.js";
|
|
|
3
3
|
import { ConnectionLayer } from "./map/slots/ConnectionLayer.js";
|
|
4
4
|
import { DotLayer } from "./map/slots/DotLayer.js";
|
|
5
5
|
import { BubbleLayer } from "./map/slots/BubbleLayer.js";
|
|
6
|
+
import { BaseLayer } from "./map/slots/BaseLayer.js";
|
|
6
7
|
import { ChoroplethLayer } from "./map/slots/ChoroplethLayer.js";
|
|
7
8
|
import { Tooltip, TooltipAtoms } from "./map/slots/Tooltip.js";
|
|
8
9
|
import { SequentialLegend } from "./map/slots/SequentialLegend.js";
|
|
9
10
|
import { ThresholdLegend } from "./map/slots/ThresholdLegend.js";
|
|
10
11
|
import { CategoricalLegend } from "./map/slots/CategoricalLegend.js";
|
|
11
12
|
export {
|
|
13
|
+
BaseLayer,
|
|
12
14
|
BubbleLayer,
|
|
13
15
|
CategoricalLegend,
|
|
14
16
|
ChartInteractions,
|
package/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { ChartInteractions } from './map/slots/ChartInteractions.js';\nexport { MapView } from './map/MapView.js';\nexport { ConnectionLayer } from './map/slots/ConnectionLayer.js';\nexport { DotLayer } from './map/slots/DotLayer.js';\nexport { BubbleLayer } from './map/slots/BubbleLayer.js';\nexport { ChoroplethLayer } from './map/slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './map/slots/Tooltip.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './map/types/map-view.js';\n\nexport type {\n Connection,\n ConnectionLayerProps,\n CurvedLine,\n} from './map/types/connection-layer.js';\n\nexport type {\n DotLayerBaseProps,\n DotLayerProps,\n} from './map/types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './map/types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './map/types/choropleth-layer.js';\n\nexport type { Location } from './map/types/location.js';\nexport type { MapShape } from './map/types/shapes.js';\nexport type { ChartInteractionsProps } from './map/types/toolbar.js';\nexport type { ErrorStateSlotProps } from './map/slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './map/types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n} from './map/types/coloring.js';\n\nexport { SequentialLegend } from './map/slots/SequentialLegend.js';\nexport { ThresholdLegend } from './map/slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './map/slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n DotLayerTooltipData,\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n ChoroplethLayerTooltipData,\n} from './map/types/tooltip.js';\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,SAAS,oBAAoB;
|
|
4
|
+
"sourcesContent": ["export { ChartInteractions } from './map/slots/ChartInteractions.js';\nexport { MapView } from './map/MapView.js';\nexport { ConnectionLayer } from './map/slots/ConnectionLayer.js';\nexport { DotLayer } from './map/slots/DotLayer.js';\nexport { BubbleLayer } from './map/slots/BubbleLayer.js';\nexport { BaseLayer } from './map/slots/BaseLayer.js';\nexport { ChoroplethLayer } from './map/slots/ChoroplethLayer.js';\nexport { Tooltip, TooltipAtoms } from './map/slots/Tooltip.js';\n\nexport type {\n MapViewProps,\n MapViewBaseProps,\n MapViewUncontrolledProps,\n MapViewControlledProps,\n DisallowAll,\n ViewState,\n MapViewRef,\n} from './map/types/map-view.js';\n\nexport type { BaseLayerProps } from './map/types/base-layer.js';\n\nexport type {\n Connection,\n ConnectionLayerProps,\n CurvedLine,\n} from './map/types/connection-layer.js';\n\nexport type {\n DotLayerBaseProps,\n DotLayerProps,\n} from './map/types/dot-layer.js';\n\nexport type {\n BubbleLayerBaseProps,\n BubbleLayerProps,\n ScaleNoneProps,\n ScaleRadiusProps,\n} from './map/types/bubble-layer.js';\n\nexport type {\n ChoroplethLayerBaseProps,\n ChoroplethLayerProps,\n} from './map/types/choropleth-layer.js';\n\nexport type { Location } from './map/types/location.js';\nexport type { MapShape } from './map/types/shapes.js';\nexport type { ChartInteractionsProps } from './map/types/toolbar.js';\nexport type { ErrorStateSlotProps } from './map/slots/states/ErrorStateSlot.js';\n\nexport type {\n BaseLegendProps,\n CategoricalLegendProps,\n SequentialLegendProps,\n ThresholdLegendProps,\n} from './map/types/legend.js';\n\nexport type {\n LocationColorProps,\n LegendColorLayerProps,\n ChoroplethCustomColorProps,\n} from './map/types/coloring.js';\n\nexport { SequentialLegend } from './map/slots/SequentialLegend.js';\nexport { ThresholdLegend } from './map/slots/ThresholdLegend.js';\nexport { CategoricalLegend } from './map/slots/CategoricalLegend.js';\n\nexport type {\n BubbleLayerTooltipHandler,\n BubbleLayerTooltipHandlerProps,\n DotLayerTooltipHandler,\n DotLayerTooltipHandlerProps,\n ConnectionLayerTooltipHandler,\n ConnectionLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandlerProps,\n ChoroplethLayerTooltipHandler,\n ChartTooltip,\n DotLayerTooltipData,\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n ChoroplethLayerTooltipData,\n} from './map/types/tooltip.js';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,yBAAyB;AAClC,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,uBAAuB;AAChC,SAAS,SAAS,oBAAoB;AAuDtC,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/esm/map/MapView.js
CHANGED
|
@@ -12,8 +12,8 @@ import { MapLegendRenderer } from "./components/legend/MapLegendRenderer.js";
|
|
|
12
12
|
import { MapContent } from "./components/MapContent.js";
|
|
13
13
|
import { DEFAULT_LEGEND_SIZES, DEFAULT_MAP_HEIGHT } from "./constants.js";
|
|
14
14
|
import { LayerIdsContext } from "./contexts/layer-ids.context.js";
|
|
15
|
+
import { MapBaseLayerFeaturesContext } from "./contexts/map-base-layer.context.js";
|
|
15
16
|
import { MapConfigurationContext } from "./contexts/map-configuration.context.js";
|
|
16
|
-
import { MapCountryCodeContext } from "./contexts/map-country-code.context.js";
|
|
17
17
|
import { MapDataBoundingBoxContext } from "./contexts/map-data-bounding-box.context.js";
|
|
18
18
|
import { MapRawDataContext } from "./contexts/map-raw-data.context.js";
|
|
19
19
|
import { buildAndDownloadCsv } from "./functions/build-and-download-csv.js";
|
|
@@ -22,7 +22,7 @@ import { getDataLayersBoundingBox } from "./functions/get-data-layers-bounding-b
|
|
|
22
22
|
import { getMapStatesTemplates } from "./functions/get-map-states-template.js";
|
|
23
23
|
import { iterateConfigSlots } from "./functions/iterate-config-slots.js";
|
|
24
24
|
import { setLayersId } from "./functions/set-layers-id.js";
|
|
25
|
-
import {
|
|
25
|
+
import { useLoadMapBaseLayer } from "./hooks/use-load-map-base-layer.js";
|
|
26
26
|
import { useAutoLegendRefresh } from "./hooks/useAutoLegendRefresh.js";
|
|
27
27
|
import { ColorScaleProvider } from "./providers/color-scale.provider.js";
|
|
28
28
|
import { LayerColorStrategyProvider } from "./providers/layer-color-strategy.provider.js";
|
|
@@ -58,12 +58,8 @@ const _MapView = forwardRef(
|
|
|
58
58
|
const legendPosition = config.legend?.position;
|
|
59
59
|
const legendRatio = config.legend?.ratio;
|
|
60
60
|
const legendOnRatioChange = config.legend?.onRatioChange;
|
|
61
|
+
const { isMapEnabled, isLoading, baseFeatureCollection, error } = useLoadMapBaseLayer(config.baseLayer);
|
|
61
62
|
const { errorState } = getMapStatesTemplates(children);
|
|
62
|
-
const {
|
|
63
|
-
isLoading: isLoadingSettings,
|
|
64
|
-
isMapEnabled,
|
|
65
|
-
countryCode
|
|
66
|
-
} = useMapSettings();
|
|
67
63
|
const chartHeight = coerceSizeValue(props.height) || DEFAULT_MAP_HEIGHT;
|
|
68
64
|
const containerStyles = { width: "100%", ...costumerStyle };
|
|
69
65
|
const chartLayoutRef = useAutoLegendRefresh(layersData);
|
|
@@ -74,15 +70,16 @@ const _MapView = forwardRef(
|
|
|
74
70
|
className: customerClassNames,
|
|
75
71
|
"data-testid": "mapview-container"
|
|
76
72
|
},
|
|
77
|
-
|
|
73
|
+
// TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response
|
|
74
|
+
!isLoading && !isMapEnabled || error ? /* @__PURE__ */ React.createElement(DisabledState, { height: chartHeight }) : /* @__PURE__ */ React.createElement(MapBaseLayerFeaturesContext.Provider, { value: baseFeatureCollection }, /* @__PURE__ */ React.createElement(MapConfigurationContext.Provider, { value: config }, /* @__PURE__ */ React.createElement(LayerIdsContext.Provider, { value: layerIds }, /* @__PURE__ */ React.createElement(MapRawDataContext.Provider, { value: layersData }, /* @__PURE__ */ React.createElement(MapDataBoundingBoxContext.Provider, { value: dataLayersBBox }, /* @__PURE__ */ React.createElement(MapStoreProvider, null, /* @__PURE__ */ React.createElement(ColorScaleProvider, null, /* @__PURE__ */ React.createElement(LayerColorStrategyProvider, null, /* @__PURE__ */ React.createElement(
|
|
78
75
|
ChartLayout,
|
|
79
76
|
{
|
|
80
77
|
ref: chartLayoutRef,
|
|
81
78
|
chartHeight,
|
|
82
79
|
errorState,
|
|
83
|
-
showLoader: loading ||
|
|
80
|
+
showLoader: loading || isLoading
|
|
84
81
|
},
|
|
85
|
-
/* @__PURE__ */ React.createElement(ChartLayout.Graph, null, !
|
|
82
|
+
/* @__PURE__ */ React.createElement(ChartLayout.Graph, null, !isLoading && /* @__PURE__ */ React.createElement(MapContent, { ref: rootRef, ...remaining }, parsedChildren)),
|
|
86
83
|
!isLegendHidden && /* @__PURE__ */ React.createElement(
|
|
87
84
|
ChartLayout.Legend,
|
|
88
85
|
{
|
package/esm/map/MapView.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/map/MapView.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, {\n forwardRef,\n type PropsWithChildren,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport {\n _ChartLayout as ChartLayout,\n _coerceSizeValue as coerceSizeValue,\n} from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport { MapLegendRenderer } from './components/legend/MapLegendRenderer.js';\nimport { MapContent } from './components/MapContent.js';\nimport { DEFAULT_LEGEND_SIZES, DEFAULT_MAP_HEIGHT } from './constants.js';\nimport { LayerIdsContext } from './contexts/layer-ids.context.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO;AAAA,EACL;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,OACf;AACP,SAAS,oBAAoB;AAE7B,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB,0BAA0B;AACzD,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AACxC,SAAS,
|
|
4
|
+
"sourcesContent": ["import React, {\n forwardRef,\n type PropsWithChildren,\n useImperativeHandle,\n useRef,\n} from 'react';\n\nimport {\n _ChartLayout as ChartLayout,\n _coerceSizeValue as coerceSizeValue,\n} from '@dynatrace/strato-components-preview/charts';\nimport { useMergeRefs } from '@dynatrace/strato-components-preview/core';\n\nimport { MapLegendRenderer } from './components/legend/MapLegendRenderer.js';\nimport { MapContent } from './components/MapContent.js';\nimport { DEFAULT_LEGEND_SIZES, DEFAULT_MAP_HEIGHT } from './constants.js';\nimport { LayerIdsContext } from './contexts/layer-ids.context.js';\nimport { MapBaseLayerFeaturesContext } from './contexts/map-base-layer.context.js';\nimport { MapConfigurationContext } from './contexts/map-configuration.context.js';\nimport { MapDataBoundingBoxContext } from './contexts/map-data-bounding-box.context.js';\nimport { MapRawDataContext } from './contexts/map-raw-data.context.js';\nimport { buildAndDownloadCsv } from './functions/build-and-download-csv.js';\nimport { extractLayersData } from './functions/extract-layers-data.js';\nimport { getDataLayersBoundingBox } from './functions/get-data-layers-bounding-box.js';\nimport { getMapStatesTemplates } from './functions/get-map-states-template.js';\nimport { iterateConfigSlots } from './functions/iterate-config-slots.js';\nimport { setLayersId } from './functions/set-layers-id.js';\nimport { useLoadMapBaseLayer } from './hooks/use-load-map-base-layer.js';\nimport { useAutoLegendRefresh } from './hooks/useAutoLegendRefresh.js';\nimport { ColorScaleProvider } from './providers/color-scale.provider.js';\nimport { LayerColorStrategyProvider } from './providers/layer-color-strategy.provider.js';\nimport { DisabledState } from './slots/states/DisabledState.js';\nimport { ErrorStateSlot } from './slots/states/ErrorStateSlot.js';\nimport { MapStoreProvider } from './store/map-store.provider.js';\n// eslint-disable-next-line no-restricted-imports\nimport './styles/react-mapgl-styles.css';\nimport type { MapViewProps, MapViewRef } from './types/map-view.js';\n\n/**\n * MapView Component\n */\nconst _MapView = forwardRef<MapViewRef, PropsWithChildren<MapViewProps>>(\n (props, forwardedRef) => {\n const {\n children,\n loading = false,\n style: costumerStyle,\n className: customerClassNames,\n ...remaining\n } = props;\n const { layerIds, parsedChildren } = setLayersId(children);\n\n const layersData = extractLayersData(parsedChildren);\n const dataLayersBBox = getDataLayersBoundingBox(children);\n\n const containerRef = useRef<HTMLDivElement>(null);\n const rootRef = useMergeRefs<MapViewRef | HTMLDivElement>([\n forwardedRef,\n containerRef,\n ]);\n\n useImperativeHandle(forwardedRef, () => ({\n element: containerRef.current,\n downloadData: () => {\n buildAndDownloadCsv(layersData);\n },\n }));\n\n const config = iterateConfigSlots(children);\n\n const isLegendHidden = !config.legend || !!config.legend.hidden;\n const legendPosition = config.legend?.position;\n const legendRatio = config.legend?.ratio;\n const legendOnRatioChange = config.legend?.onRatioChange;\n\n const { isMapEnabled, isLoading, baseFeatureCollection, error } =\n useLoadMapBaseLayer(config.baseLayer);\n\n const { errorState } = getMapStatesTemplates(children);\n\n const chartHeight = coerceSizeValue(props.height) || DEFAULT_MAP_HEIGHT;\n\n const containerStyles = { width: '100%', ...costumerStyle };\n\n const chartLayoutRef = useAutoLegendRefresh(layersData);\n\n return (\n <div\n style={containerStyles}\n className={customerClassNames}\n data-testid=\"mapview-container\"\n >\n {\n // TODO: Error boundaries global fix needed - this error state only purpose is to make map not rendering when there error in response\n (!isLoading && !isMapEnabled) || error ? (\n <DisabledState height={chartHeight} />\n ) : (\n <MapBaseLayerFeaturesContext.Provider value={baseFeatureCollection}>\n <MapConfigurationContext.Provider value={config}>\n <LayerIdsContext.Provider value={layerIds}>\n <MapRawDataContext.Provider value={layersData}>\n <MapDataBoundingBoxContext.Provider value={dataLayersBBox}>\n <MapStoreProvider>\n <ColorScaleProvider>\n <LayerColorStrategyProvider>\n <ChartLayout\n ref={chartLayoutRef}\n chartHeight={chartHeight}\n errorState={errorState}\n showLoader={loading || isLoading}\n >\n <ChartLayout.Graph>\n {!isLoading && (\n <MapContent ref={rootRef} {...remaining}>\n {parsedChildren}\n </MapContent>\n )}\n </ChartLayout.Graph>\n {!isLegendHidden && (\n <ChartLayout.Legend\n position={legendPosition}\n ratio={legendRatio}\n ratioBoundaries={DEFAULT_LEGEND_SIZES}\n onResize={legendOnRatioChange}\n >\n <MapLegendRenderer />\n </ChartLayout.Legend>\n )}\n </ChartLayout>\n </LayerColorStrategyProvider>\n </ColorScaleProvider>\n </MapStoreProvider>\n </MapDataBoundingBoxContext.Provider>\n </MapRawDataContext.Provider>\n </LayerIdsContext.Provider>\n </MapConfigurationContext.Provider>\n </MapBaseLayerFeaturesContext.Provider>\n )\n }\n </div>\n );\n },\n);\n\n(_MapView as typeof _MapView & { displayName: string })['displayName'] =\n 'MapView';\n\n/**\n * The `MapView` is a component that renders a map with various geospatial data layers.\n * @beta\n */\nexport const MapView = Object.assign(_MapView, {\n ErrorState: ErrorStateSlot,\n});\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO;AAAA,EACL;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE,gBAAgB;AAAA,EAChB,oBAAoB;AAAA,OACf;AACP,SAAS,oBAAoB;AAE7B,SAAS,yBAAyB;AAClC,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB,0BAA0B;AACzD,SAAS,uBAAuB;AAChC,SAAS,mCAAmC;AAC5C,SAAS,+BAA+B;AACxC,SAAS,iCAAiC;AAC1C,SAAS,yBAAyB;AAClC,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAClC,SAAS,gCAAgC;AACzC,SAAS,6BAA6B;AACtC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B,SAAS,2BAA2B;AACpC,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,SAAS,kCAAkC;AAC3C,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAEjC,OAAO;AAMP,MAAM,WAAW;AAAA,EACf,CAAC,OAAO,iBAAiB;AACvB,UAAM;AAAA,MACJ;AAAA,MACA,UAAU;AAAA,MACV,OAAO;AAAA,MACP,WAAW;AAAA,MACX,GAAG;AAAA,IACL,IAAI;AACJ,UAAM,EAAE,UAAU,eAAe,IAAI,YAAY,QAAQ;AAEzD,UAAM,aAAa,kBAAkB,cAAc;AACnD,UAAM,iBAAiB,yBAAyB,QAAQ;AAExD,UAAM,eAAe,OAAuB,IAAI;AAChD,UAAM,UAAU,aAA0C;AAAA,MACxD;AAAA,MACA;AAAA,IACF,CAAC;AAED,wBAAoB,cAAc,OAAO;AAAA,MACvC,SAAS,aAAa;AAAA,MACtB,cAAc,MAAM;AAClB,4BAAoB,UAAU;AAAA,MAChC;AAAA,IACF,EAAE;AAEF,UAAM,SAAS,mBAAmB,QAAQ;AAE1C,UAAM,iBAAiB,CAAC,OAAO,UAAU,CAAC,CAAC,OAAO,OAAO;AACzD,UAAM,iBAAiB,OAAO,QAAQ;AACtC,UAAM,cAAc,OAAO,QAAQ;AACnC,UAAM,sBAAsB,OAAO,QAAQ;AAE3C,UAAM,EAAE,cAAc,WAAW,uBAAuB,MAAM,IAC5D,oBAAoB,OAAO,SAAS;AAEtC,UAAM,EAAE,WAAW,IAAI,sBAAsB,QAAQ;AAErD,UAAM,cAAc,gBAAgB,MAAM,MAAM,KAAK;AAErD,UAAM,kBAAkB,EAAE,OAAO,QAAQ,GAAG,cAAc;AAE1D,UAAM,iBAAiB,qBAAqB,UAAU;AAEtD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,QACP,WAAW;AAAA,QACX,eAAY;AAAA;AAAA;AAAA,MAIT,CAAC,aAAa,CAAC,gBAAiB,QAC/B,oCAAC,iBAAc,QAAQ,aAAa,IAEpC,oCAAC,4BAA4B,UAA5B,EAAqC,OAAO,yBAC3C,oCAAC,wBAAwB,UAAxB,EAAiC,OAAO,UACvC,oCAAC,gBAAgB,UAAhB,EAAyB,OAAO,YAC/B,oCAAC,kBAAkB,UAAlB,EAA2B,OAAO,cACjC,oCAAC,0BAA0B,UAA1B,EAAmC,OAAO,kBACzC,oCAAC,wBACC,oCAAC,0BACC,oCAAC,kCACC;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL;AAAA,UACA;AAAA,UACA,YAAY,WAAW;AAAA;AAAA,QAEvB,oCAAC,YAAY,OAAZ,MACE,CAAC,aACA,oCAAC,cAAW,KAAK,SAAU,GAAG,aAC3B,cACH,CAEJ;AAAA,QACC,CAAC,kBACA;AAAA,UAAC,YAAY;AAAA,UAAZ;AAAA,YACC,UAAU;AAAA,YACV,OAAO;AAAA,YACP,iBAAiB;AAAA,YACjB,UAAU;AAAA;AAAA,UAEV,oCAAC,uBAAkB;AAAA,QACrB;AAAA,MAEJ,CACF,CACF,CACF,CACF,CACF,CACF,CACF,CACF;AAAA,IAGN;AAAA,EAEJ;AACF;AAEC,SAAuD,aAAa,IACnE;AAMK,MAAM,UAAU,OAAO,OAAO,UAAU;AAAA,EAC7C,YAAY;AACd,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ import { isBubbleTooltipTemplate } from "../../functions/tooltip-type-guards.js"
|
|
|
11
11
|
import { useLayerColoringStrategy } from "../../hooks/use-layer-coloring-strategy.js";
|
|
12
12
|
import { useLegendInteractionHighlighting } from "../../hooks/use-legend-interaction-highlighting.js";
|
|
13
13
|
import { useLegendInteractionVisibility } from "../../hooks/use-legend-interaction-visibility.js";
|
|
14
|
-
import {
|
|
14
|
+
import { useResolveLocationColor } from "../../hooks/use-resolve-color.js";
|
|
15
15
|
import { useTooltipTemplate } from "../../hooks/use-tooltip-template.js";
|
|
16
16
|
import { BubbleLayerTooltip as BubbleLayerTooltipSlot } from "../../slots/BubbleLayerTooltip.js";
|
|
17
17
|
import {
|
|
@@ -26,7 +26,11 @@ const BubbleLayer = (props) => {
|
|
|
26
26
|
sizeInterpolation = "fixed"
|
|
27
27
|
} = props;
|
|
28
28
|
const colorParser = useLayerColoringStrategy();
|
|
29
|
-
const bubbleColor =
|
|
29
|
+
const bubbleColor = useResolveLocationColor(
|
|
30
|
+
DEFAULT_BUBBLE_COLOR,
|
|
31
|
+
props,
|
|
32
|
+
colorParser
|
|
33
|
+
);
|
|
30
34
|
const sourceId = `source-${layerId}`;
|
|
31
35
|
useLegendInteractionHighlighting(props, sourceId);
|
|
32
36
|
useLegendInteractionVisibility(props, layerId);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/BubbleLayer/BubbleLayer.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Source } from 'react-map-gl/maplibre';\n\nimport { BubbleCircleLayer } from './BubbleCircleLayer.js';\nimport { BubbleLayerTooltip } from './BubbleLayerTooltip.js';\nimport { BubbleOutlineLayer } from './BubbleOutlineLayer.js';\nimport { SizeInterpolationContext } from './contexts/size-interpolation.context.js';\nimport { buildRadiusScale } from './functions/build-radius-scale.js';\nimport { parseBubbleDataToGeoJSON } from './functions/parse-bubble-data-to-geo-json.js';\nimport { DEFAULT_BUBBLE_COLOR, DEFAULT_RADIUS } from '../../constants.js';\nimport { isBubbleTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,cAAc;AAEvB,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB,sBAAsB;AACrD,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS
|
|
4
|
+
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Source } from 'react-map-gl/maplibre';\n\nimport { BubbleCircleLayer } from './BubbleCircleLayer.js';\nimport { BubbleLayerTooltip } from './BubbleLayerTooltip.js';\nimport { BubbleOutlineLayer } from './BubbleOutlineLayer.js';\nimport { SizeInterpolationContext } from './contexts/size-interpolation.context.js';\nimport { buildRadiusScale } from './functions/build-radius-scale.js';\nimport { parseBubbleDataToGeoJSON } from './functions/parse-bubble-data-to-geo-json.js';\nimport { DEFAULT_BUBBLE_COLOR, DEFAULT_RADIUS } from '../../constants.js';\nimport { isBubbleTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useResolveLocationColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { BubbleLayerTooltip as BubbleLayerTooltipSlot } from '../../slots/BubbleLayerTooltip.js';\nimport {\n type InternalBubbleLayerProps,\n isScaleRadius,\n} from '../../types/bubble-layer.js';\nimport type { Location } from '../../types/location.js';\n\nexport const BubbleLayer = <T extends Location>(\n props: PropsWithChildren<InternalBubbleLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n radius = DEFAULT_RADIUS,\n children,\n sizeInterpolation = 'fixed',\n } = props;\n\n const colorParser = useLayerColoringStrategy();\n const bubbleColor = useResolveLocationColor(\n DEFAULT_BUBBLE_COLOR,\n props,\n colorParser,\n );\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n let radiusScale = (value: number) => value;\n\n if (isScaleRadius(props)) {\n const { radiusRange = [10, 100], radius, scale = 'linear' } = props;\n\n radiusScale = buildRadiusScale(data, radius, scale, radiusRange);\n }\n\n const dataGeoJson = parseBubbleDataToGeoJSON(\n data,\n bubbleColor,\n radius,\n radiusScale,\n );\n\n const tooltipTemplate = useTooltipTemplate(children, BubbleLayerTooltipSlot);\n\n return (\n <>\n <SizeInterpolationContext.Provider value={sizeInterpolation}>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <BubbleCircleLayer id={layerId} source={sourceId} />\n <BubbleOutlineLayer beforeId={layerId} source={sourceId} />\n </Source>\n </SizeInterpolationContext.Provider>\n\n <BubbleLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isBubbleTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nBubbleLayer['displayName'] = 'BubbleLayer';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,cAAc;AAEvB,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,0BAA0B;AACnC,SAAS,gCAAgC;AACzC,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;AACzC,SAAS,sBAAsB,sBAAsB;AACrD,SAAS,+BAA+B;AACxC,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB,8BAA8B;AAC7D;AAAA,EAEE;AAAA,OACK;AAGA,MAAM,cAAc,CACzB,UACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,oBAAoB;AAAA,EACtB,IAAI;AAEJ,QAAM,cAAc,yBAAyB;AAC7C,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,WAAW,UAAU,OAAO;AAClC,mCAAiC,OAAO,QAAQ;AAChD,iCAA+B,OAAO,OAAO;AAE7C,MAAI,cAAc,CAAC,UAAkB;AAErC,MAAI,cAAc,KAAK,GAAG;AACxB,UAAM,EAAE,cAAc,CAAC,IAAI,GAAG,GAAG,QAAAA,SAAQ,QAAQ,SAAS,IAAI;AAE9D,kBAAc,iBAAiB,MAAMA,SAAQ,OAAO,WAAW;AAAA,EACjE;AAEA,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,kBAAkB,mBAAmB,UAAU,sBAAsB;AAE3E,SACE,0DACE,oCAAC,yBAAyB,UAAzB,EAAkC,OAAO,qBACxC,oCAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,YAAU,QAChE,oCAAC,qBAAkB,IAAI,SAAS,QAAQ,UAAU,GAClD,oCAAC,sBAAmB,UAAU,SAAS,QAAQ,UAAU,CAC3D,CACF,GAEA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,iBACE,wBAAwB,eAAe,IAAI,kBAAkB;AAAA;AAAA,EAEjE,CACF;AAEJ;AAEA,YAAY,aAAa,IAAI;",
|
|
6
6
|
"names": ["radius"]
|
|
7
7
|
}
|
|
@@ -16,15 +16,15 @@ import { isChoroplethTooltipTemplate } from "../../functions/tooltip-type-guards
|
|
|
16
16
|
import { useLayerColoringStrategy } from "../../hooks/use-layer-coloring-strategy.js";
|
|
17
17
|
import { useLegendInteractionHighlighting } from "../../hooks/use-legend-interaction-highlighting.js";
|
|
18
18
|
import { useLegendInteractionVisibility } from "../../hooks/use-legend-interaction-visibility.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
19
|
+
import { useMapBaseLayerFeatures } from "../../hooks/use-map-base-layer-features.js";
|
|
20
|
+
import { useResolveChoroplethColor } from "../../hooks/use-resolve-color.js";
|
|
21
21
|
import { useTooltipTemplate } from "../../hooks/use-tooltip-template.js";
|
|
22
22
|
import { ChoroplethLayerTooltip as ChoroplethLayerTooltipSlot } from "../../slots/ChoroplethLayerTooltip.js";
|
|
23
23
|
const ChoroplethLayer = (props) => {
|
|
24
24
|
const { layerId, data, regionAccessor, children } = props;
|
|
25
|
-
const mapSource =
|
|
25
|
+
const mapSource = useMapBaseLayerFeatures();
|
|
26
26
|
const colorParser = useLayerColoringStrategy();
|
|
27
|
-
const choroplethColor =
|
|
27
|
+
const choroplethColor = useResolveChoroplethColor(
|
|
28
28
|
DEFAULT_CHOROPLETH_COLOR,
|
|
29
29
|
props,
|
|
30
30
|
colorParser
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/ChoroplethLayer/ChoroplethLayer.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { ChoroplethLayerTooltip } from './ChoroplethLayerTooltip.js';\nimport { parseRegionDataToGeoJSON } from './functions/parse-region-data-to-geo-json.js';\nimport {\n ACTIVE_COLOR,\n ACTIVE_STATE_BORDERS_WIDTH,\n DEFAULT_CHOROPLETH_COLOR,\n DEFAULT_COUNTRIES_BORDER_COLOR,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n TRANSPARENT_BORDER_COLOR,\n} from '../../constants.js';\nimport { isChoroplethTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,OAAO,cAAc;AAE9B,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,8BAA8B;AACvC,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mCAAmC;AAC5C,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS
|
|
4
|
+
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { ChoroplethLayerTooltip } from './ChoroplethLayerTooltip.js';\nimport { parseRegionDataToGeoJSON } from './functions/parse-region-data-to-geo-json.js';\nimport {\n ACTIVE_COLOR,\n ACTIVE_STATE_BORDERS_WIDTH,\n DEFAULT_CHOROPLETH_COLOR,\n DEFAULT_COUNTRIES_BORDER_COLOR,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n TRANSPARENT_BORDER_COLOR,\n} from '../../constants.js';\nimport { isChoroplethTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useMapBaseLayerFeatures } from '../../hooks/use-map-base-layer-features.js';\nimport { useResolveChoroplethColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { ChoroplethLayerTooltip as ChoroplethLayerTooltipSlot } from '../../slots/ChoroplethLayerTooltip.js';\nimport type { InternalChoroplethLayerProps } from '../../types/choropleth-layer.js';\n\nexport const ChoroplethLayer = <T extends Record<string, unknown>>(\n props: PropsWithChildren<InternalChoroplethLayerProps<T>>,\n) => {\n const { layerId, data, regionAccessor, children } = props;\n\n const mapSource = useMapBaseLayerFeatures();\n\n const colorParser = useLayerColoringStrategy();\n const choroplethColor = useResolveChoroplethColor(\n DEFAULT_CHOROPLETH_COLOR,\n props,\n colorParser,\n );\n const sourceId = layerId.replace('layer', 'source');\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n const dataGeoJSON = parseRegionDataToGeoJSON(\n mapSource!,\n data,\n regionAccessor,\n choroplethColor,\n );\n\n const tooltipTemplate = useTooltipTemplate(\n children,\n ChoroplethLayerTooltipSlot,\n );\n\n return (\n <>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJSON} generateId>\n <Layer\n id={layerId}\n type=\"fill\"\n source={sourceId}\n paint={{\n 'fill-color': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n ['get', '__color'],\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredColor'],\n ['get', '__color'],\n ],\n 'fill-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n }}\n />\n <Layer\n type=\"line\"\n source={sourceId}\n paint={{\n 'line-color': getCanvasColor(DEFAULT_COUNTRIES_BORDER_COLOR),\n }}\n />\n <Layer\n type=\"line\"\n source={sourceId}\n paint={{\n 'line-color': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n getCanvasColor(ACTIVE_COLOR),\n getCanvasColor(TRANSPARENT_BORDER_COLOR),\n ],\n 'line-width': ACTIVE_STATE_BORDERS_WIDTH,\n }}\n />\n </Source>\n\n <ChoroplethLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isChoroplethTooltipTemplate(tooltipTemplate)\n ? tooltipTemplate\n : undefined\n }\n />\n </>\n );\n};\n\nChoroplethLayer['displayName'] = 'ChoroplethLayer';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,OAAO,cAAc;AAE9B,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,8BAA8B;AACvC,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mCAAmC;AAC5C,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,+BAA+B;AACxC,SAAS,iCAAiC;AAC1C,SAAS,0BAA0B;AACnC,SAAS,0BAA0B,kCAAkC;AAG9D,MAAM,kBAAkB,CAC7B,UACG;AACH,QAAM,EAAE,SAAS,MAAM,gBAAgB,SAAS,IAAI;AAEpD,QAAM,YAAY,wBAAwB;AAE1C,QAAM,cAAc,yBAAyB;AAC7C,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,QAAM,WAAW,QAAQ,QAAQ,SAAS,QAAQ;AAClD,mCAAiC,OAAO,QAAQ;AAChD,iCAA+B,OAAO,OAAO;AAE7C,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,kBAAkB;AAAA,IACtB;AAAA,IACA;AAAA,EACF;AAEA,SACE,0DACE,oCAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,YAAU,QAChE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI;AAAA,MACJ,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAc;AAAA,UACZ;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,QAAQ,GAAG,KAAK;AAAA,UAC9C,CAAC,OAAO,SAAS;AAAA,UACjB,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,gBAAgB;AAAA,UACxB,CAAC,OAAO,SAAS;AAAA,QACnB;AAAA,QACA,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF,GACA;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAc,eAAe,8BAA8B;AAAA,MAC7D;AAAA;AAAA,EACF,GACA;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,OAAO;AAAA,QACL,cAAc;AAAA,UACZ;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,QAAQ,GAAG,KAAK;AAAA,UAC9C,eAAe,YAAY;AAAA,UAC3B,eAAe,wBAAwB;AAAA,QACzC;AAAA,QACA,cAAc;AAAA,MAChB;AAAA;AAAA,EACF,CACF,GAEA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,iBACE,4BAA4B,eAAe,IACvC,kBACA;AAAA;AAAA,EAER,CACF;AAEJ;AAEA,gBAAgB,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { isNil } from "lodash-es";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { _ChartTooltip as ChartTooltip } from "@dynatrace/strato-components-preview/charts";
|
|
3
4
|
import { getDefaultActions } from "./utils/get-default-actions.js";
|
|
4
5
|
import { handleCopyToClipboard } from "./utils/handle-copy-to-clipboard.js";
|
|
5
6
|
import { isConnection, isRegion } from "../../functions/tooltip-type-guards.js";
|
|
7
|
+
const isChoroplethTooltip = (props) => isRegion(props.closestPoint);
|
|
8
|
+
const isConnectionTooltip = (props) => isConnection(props.closestPoint);
|
|
9
|
+
const isBubbleTooltip = (props) => !isNil(props.layerData);
|
|
10
|
+
const isDotTooltip = (props) => true;
|
|
6
11
|
const DefaultTooltip = (props) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
let locations = [];
|
|
13
|
+
if (isChoroplethTooltip(props)) {
|
|
14
|
+
const { closestPoint } = props;
|
|
10
15
|
return /* @__PURE__ */ React.createElement(ChartTooltip.Body, { "data-testid": "default-tooltip-template" }, /* @__PURE__ */ React.createElement(
|
|
11
16
|
ChartTooltip.SeriesItem,
|
|
12
17
|
{
|
|
@@ -15,13 +20,13 @@ const DefaultTooltip = (props) => {
|
|
|
15
20
|
value: closestPoint.data.value && closestPoint.data.value.toString() ? closestPoint.data.value.toString() : void 0
|
|
16
21
|
}
|
|
17
22
|
));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
locations = layerData === void 0 || layerData === null || layerData.length === 0 ? [closestPoint.data] : layerData.map(
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
} else if (isConnectionTooltip(props)) {
|
|
24
|
+
locations = props.closestPoint.data.path;
|
|
25
|
+
} else if (isBubbleTooltip(props)) {
|
|
26
|
+
const { closestPoint, layerData } = props;
|
|
27
|
+
locations = layerData === void 0 || layerData === null || layerData.length === 0 ? [closestPoint.data] : layerData.map((point) => point.data);
|
|
28
|
+
} else if (isDotTooltip(props)) {
|
|
29
|
+
locations = [props.closestPoint.data];
|
|
25
30
|
}
|
|
26
31
|
return /* @__PURE__ */ React.createElement(
|
|
27
32
|
ChartTooltip.Body,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/DefaultTooltip/DefaultTooltip.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\n\nimport { _ChartTooltip as ChartTooltip } from '@dynatrace/strato-components-preview/charts';\n\nimport { getDefaultActions } from './utils/get-default-actions.js';\nimport { handleCopyToClipboard } from './utils/handle-copy-to-clipboard.js';\nimport { isConnection, isRegion } from '../../functions/tooltip-type-guards.js';\nimport type { Location } from '../../types/location.js';\nimport type {\n BubbleLayerTooltipData,\n DotLayerTooltipData,\n LayerTooltipData,\n} from '../../types/tooltip.js';\n\
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAElB,SAAS,iBAAiB,oBAAoB;AAE9C,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,cAAc,gBAAgB;
|
|
4
|
+
"sourcesContent": ["import { isNil } from 'lodash-es';\nimport React from 'react';\n\nimport { _ChartTooltip as ChartTooltip } from '@dynatrace/strato-components-preview/charts';\n\nimport { getDefaultActions } from './utils/get-default-actions.js';\nimport { handleCopyToClipboard } from './utils/handle-copy-to-clipboard.js';\nimport { isConnection, isRegion } from '../../functions/tooltip-type-guards.js';\nimport type { Location } from '../../types/location.js';\nimport type {\n BubbleLayerTooltipData,\n ConnectionLayerTooltipData,\n DotLayerTooltipData,\n LayerTooltipData,\n} from '../../types/tooltip.js';\nimport { ChoroplethLayerTooltipData } from '../../types/tooltip.js';\n\nconst isChoroplethTooltip = (\n props: DefaultTooltipProps,\n): props is {\n closestPoint: ChoroplethLayerTooltipData;\n} => isRegion(props.closestPoint);\nconst isConnectionTooltip = (\n props: DefaultTooltipProps,\n): props is {\n closestPoint: ConnectionLayerTooltipData;\n} => isConnection(props.closestPoint);\nconst isBubbleTooltip = (\n props: DefaultTooltipProps,\n): props is {\n closestPoint: BubbleLayerTooltipData;\n layerData: BubbleLayerTooltipData[];\n} => !isNil(props.layerData);\n\nconst isDotTooltip = (\n props: DefaultTooltipProps,\n): props is {\n closestPoint: DotLayerTooltipData;\n} => true; // if it's not any of the other tooltips, it will be Dot\n\ninterface DefaultTooltipProps {\n closestPoint: LayerTooltipData;\n layerData?: LayerTooltipData[];\n}\n\nexport const DefaultTooltip = (props: DefaultTooltipProps) => {\n let locations: Location[] = [];\n\n if (isChoroplethTooltip(props)) {\n const { closestPoint } = props;\n\n return (\n <ChartTooltip.Body data-testid=\"default-tooltip-template\">\n <ChartTooltip.SeriesItem\n color={closestPoint.color}\n name={closestPoint.name}\n value={\n closestPoint.data.value && closestPoint.data.value.toString()\n ? closestPoint.data.value.toString()\n : undefined\n }\n />\n </ChartTooltip.Body>\n );\n } else if (isConnectionTooltip(props)) {\n locations = props.closestPoint.data.path;\n } else if (isBubbleTooltip(props)) {\n const { closestPoint, layerData } = props;\n locations =\n layerData === undefined || layerData === null || layerData.length === 0\n ? [closestPoint.data]\n : layerData.map((point) => point.data);\n } else if (isDotTooltip(props)) {\n locations = [props.closestPoint.data];\n }\n\n return (\n <ChartTooltip.Body\n data-testid=\"default-tooltip-template\"\n virtualization={false}\n >\n {locations.map((location) => (\n <ChartTooltip.GeoItem\n key={`${location.latitude}-${location.longitude}`}\n latitude={location.latitude}\n longitude={location.longitude}\n actions={() =>\n getDefaultActions(() => handleCopyToClipboard(location))\n }\n ></ChartTooltip.GeoItem>\n ))}\n </ChartTooltip.Body>\n );\n};\n\nDefaultTooltip['displayName'] = 'DefaultTooltip';\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,aAAa;AACtB,OAAO,WAAW;AAElB,SAAS,iBAAiB,oBAAoB;AAE9C,SAAS,yBAAyB;AAClC,SAAS,6BAA6B;AACtC,SAAS,cAAc,gBAAgB;AAUvC,MAAM,sBAAsB,CAC1B,UAGG,SAAS,MAAM,YAAY;AAChC,MAAM,sBAAsB,CAC1B,UAGG,aAAa,MAAM,YAAY;AACpC,MAAM,kBAAkB,CACtB,UAIG,CAAC,MAAM,MAAM,SAAS;AAE3B,MAAM,eAAe,CACnB,UAGG;AAOE,MAAM,iBAAiB,CAAC,UAA+B;AAC5D,MAAI,YAAwB,CAAC;AAE7B,MAAI,oBAAoB,KAAK,GAAG;AAC9B,UAAM,EAAE,aAAa,IAAI;AAEzB,WACE,oCAAC,aAAa,MAAb,EAAkB,eAAY,8BAC7B;AAAA,MAAC,aAAa;AAAA,MAAb;AAAA,QACC,OAAO,aAAa;AAAA,QACpB,MAAM,aAAa;AAAA,QACnB,OACE,aAAa,KAAK,SAAS,aAAa,KAAK,MAAM,SAAS,IACxD,aAAa,KAAK,MAAM,SAAS,IACjC;AAAA;AAAA,IAER,CACF;AAAA,EAEJ,WAAW,oBAAoB,KAAK,GAAG;AACrC,gBAAY,MAAM,aAAa,KAAK;AAAA,EACtC,WAAW,gBAAgB,KAAK,GAAG;AACjC,UAAM,EAAE,cAAc,UAAU,IAAI;AACpC,gBACE,cAAc,UAAa,cAAc,QAAQ,UAAU,WAAW,IAClE,CAAC,aAAa,IAAI,IAClB,UAAU,IAAI,CAAC,UAAU,MAAM,IAAI;AAAA,EAC3C,WAAW,aAAa,KAAK,GAAG;AAC9B,gBAAY,CAAC,MAAM,aAAa,IAAI;AAAA,EACtC;AAEA,SACE;AAAA,IAAC,aAAa;AAAA,IAAb;AAAA,MACC,eAAY;AAAA,MACZ,gBAAgB;AAAA;AAAA,IAEf,UAAU,IAAI,CAAC,aACd;AAAA,MAAC,aAAa;AAAA,MAAb;AAAA,QACC,KAAK,GAAG,SAAS,QAAQ,IAAI,SAAS,SAAS;AAAA,QAC/C,UAAU,SAAS;AAAA,QACnB,WAAW,SAAS;AAAA,QACpB,SAAS,MACP,kBAAkB,MAAM,sBAAsB,QAAQ,CAAC;AAAA;AAAA,IAE1D,CACF;AAAA,EACH;AAEJ;AAEA,eAAe,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Layer } from "react-map-gl";
|
|
3
3
|
import { calculateCircleTranslate } from "./functions/calculate-circle-translate.js";
|
|
4
|
-
import { resolveIconBackground } from "./functions/resolve-icon-background.js";
|
|
5
4
|
import {
|
|
6
5
|
BUBBLE_OUTLINE_STROKE,
|
|
7
6
|
ICON_BACKGROUND_OPACITY
|
|
8
7
|
} from "../../constants.js";
|
|
9
|
-
import { calculateHoveredColor } from "../../functions/calculate-hovered-color.js";
|
|
10
8
|
const BackgroundLayer = (props) => {
|
|
11
9
|
const { background, beforeId, source, radius, iconAnchor } = props;
|
|
12
|
-
const iconBackground = resolveIconBackground(background);
|
|
13
|
-
const hoveredColor = calculateHoveredColor(iconBackground.color);
|
|
14
10
|
const circleTranslate = calculateCircleTranslate(iconAnchor, radius);
|
|
15
11
|
return /* @__PURE__ */ React.createElement(
|
|
16
12
|
Layer,
|
|
@@ -22,13 +18,13 @@ const BackgroundLayer = (props) => {
|
|
|
22
18
|
"circle-color": [
|
|
23
19
|
"case",
|
|
24
20
|
["boolean", ["feature-state", "hover"], false],
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
["get", "__hoveredBackgroundColor"],
|
|
22
|
+
["get", "__backgroundColor"]
|
|
27
23
|
],
|
|
28
24
|
"circle-radius": radius,
|
|
29
25
|
"circle-opacity": [
|
|
30
26
|
"case",
|
|
31
|
-
["boolean",
|
|
27
|
+
["boolean", background, false],
|
|
32
28
|
ICON_BACKGROUND_OPACITY,
|
|
33
29
|
["boolean", ["feature-state", "hover"], false],
|
|
34
30
|
ICON_BACKGROUND_OPACITY,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/DotLayer/BackgroundLayer.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { Layer } from 'react-map-gl';\n\nimport { calculateCircleTranslate } from './functions/calculate-circle-translate.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,aAAa;AAEtB,SAAS,gCAAgC;AACzC
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { Layer } from 'react-map-gl';\n\nimport { calculateCircleTranslate } from './functions/calculate-circle-translate.js';\nimport {\n BUBBLE_OUTLINE_STROKE,\n ICON_BACKGROUND_OPACITY,\n} from '../../constants.js';\n\ninterface BackgroundLayerProps {\n background: boolean;\n beforeId: string;\n source: string;\n radius: number;\n iconAnchor: 'bottom' | 'center';\n}\n\nexport const BackgroundLayer = (props: BackgroundLayerProps) => {\n const { background, beforeId, source, radius, iconAnchor } = props;\n const circleTranslate = calculateCircleTranslate(iconAnchor, radius);\n\n return (\n <Layer\n type=\"circle\"\n beforeId={beforeId}\n source={source}\n paint={{\n 'circle-color': [\n 'case',\n ['boolean', ['feature-state', 'hover'], false],\n ['get', '__hoveredBackgroundColor'],\n ['get', '__backgroundColor'],\n ],\n 'circle-radius': radius,\n 'circle-opacity': [\n 'case',\n ['boolean', background, false],\n ICON_BACKGROUND_OPACITY,\n ['boolean', ['feature-state', 'hover'], false],\n ICON_BACKGROUND_OPACITY,\n 0,\n ],\n 'circle-stroke-width': [\n 'case',\n ['boolean', ['feature-state', 'active'], false],\n BUBBLE_OUTLINE_STROKE,\n 0,\n ],\n 'circle-translate': circleTranslate,\n }}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,aAAa;AAEtB,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAUA,MAAM,kBAAkB,CAAC,UAAgC;AAC9D,QAAM,EAAE,YAAY,UAAU,QAAQ,QAAQ,WAAW,IAAI;AAC7D,QAAM,kBAAkB,yBAAyB,YAAY,MAAM;AAEnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C,CAAC,OAAO,0BAA0B;AAAA,UAClC,CAAC,OAAO,mBAAmB;AAAA,QAC7B;AAAA,QACA,iBAAiB;AAAA,QACjB,kBAAkB;AAAA,UAChB;AAAA,UACA,CAAC,WAAW,YAAY,KAAK;AAAA,UAC7B;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,OAAO,GAAG,KAAK;AAAA,UAC7C;AAAA,UACA;AAAA,QACF;AAAA,QACA,uBAAuB;AAAA,UACrB;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,QAAQ,GAAG,KAAK;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AAAA,QACA,oBAAoB;AAAA,MACtB;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,7 +16,7 @@ import { useLayerColoringStrategy } from "../../hooks/use-layer-coloring-strateg
|
|
|
16
16
|
import { useLegendInteractionHighlighting } from "../../hooks/use-legend-interaction-highlighting.js";
|
|
17
17
|
import { useLegendInteractionVisibility } from "../../hooks/use-legend-interaction-visibility.js";
|
|
18
18
|
import { useLoadSymbolIntoMap } from "../../hooks/use-load-symbol-into-map.js";
|
|
19
|
-
import {
|
|
19
|
+
import { useResolveLocationColor } from "../../hooks/use-resolve-color.js";
|
|
20
20
|
import { useTooltipTemplate } from "../../hooks/use-tooltip-template.js";
|
|
21
21
|
import { DotLayerTooltip as DotLayerTooltipSlot } from "../../slots/DotLayerTooltip.js";
|
|
22
22
|
const DotLayer = (props) => {
|
|
@@ -36,12 +36,21 @@ const DotLayer = (props) => {
|
|
|
36
36
|
);
|
|
37
37
|
const defaultSymbolColor = symbolType === "shape" ? DEFAULT_SHAPE_COLOR : DEFAULT_ICON_COLOR;
|
|
38
38
|
const colorParser = useLayerColoringStrategy();
|
|
39
|
-
const shapeColor =
|
|
39
|
+
const shapeColor = useResolveLocationColor(
|
|
40
|
+
defaultSymbolColor,
|
|
41
|
+
props,
|
|
42
|
+
colorParser
|
|
43
|
+
);
|
|
40
44
|
const tooltipTemplate = useTooltipTemplate(children, DotLayerTooltipSlot);
|
|
41
45
|
const sourceId = `source-${layerId}`;
|
|
42
46
|
useLegendInteractionHighlighting(props, sourceId);
|
|
43
47
|
useLegendInteractionVisibility(props, layerId);
|
|
44
|
-
const dataGeoJson = parseDotDataToGeoJSON(
|
|
48
|
+
const dataGeoJson = parseDotDataToGeoJSON(
|
|
49
|
+
data,
|
|
50
|
+
shapeColor,
|
|
51
|
+
bearing,
|
|
52
|
+
background
|
|
53
|
+
);
|
|
45
54
|
const iconAnchor = shape === "pin" ? "bottom" : "center";
|
|
46
55
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Source, { id: sourceId, type: "geojson", data: dataGeoJson, generateId: true }, /* @__PURE__ */ React.createElement(
|
|
47
56
|
Layer,
|
|
@@ -69,7 +78,7 @@ const DotLayer = (props) => {
|
|
|
69
78
|
), /* @__PURE__ */ React.createElement(
|
|
70
79
|
BackgroundLayer,
|
|
71
80
|
{
|
|
72
|
-
background,
|
|
81
|
+
background: Boolean(background),
|
|
73
82
|
beforeId: layerId,
|
|
74
83
|
source: sourceId,
|
|
75
84
|
radius: shapeSize / 2,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/map/components/DotLayer/DotLayer.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { BackgroundLayer } from './BackgroundLayer.js';\nimport { DotLayerTooltip } from './DotLayerTooltip.js';\nimport { parseDotDataToGeoJSON } from './functions/parse-dot-data-to-geo-json.js';\nimport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE_RATIO,\n DEFAULT_SHAPE_COLOR,\n DEFAULT_SYMBOL_SIZE,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n} from '../../constants.js';\nimport { isDotTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport {
|
|
5
|
-
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,OAAO,cAAc;AAE9B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,4BAA4B;AACrC,SAAS
|
|
4
|
+
"sourcesContent": ["import React, { type PropsWithChildren } from 'react';\nimport { Layer, Source } from 'react-map-gl/maplibre';\n\nimport { BackgroundLayer } from './BackgroundLayer.js';\nimport { DotLayerTooltip } from './DotLayerTooltip.js';\nimport { parseDotDataToGeoJSON } from './functions/parse-dot-data-to-geo-json.js';\nimport {\n DEFAULT_ICON_COLOR,\n DEFAULT_ICON_SIZE_RATIO,\n DEFAULT_SHAPE_COLOR,\n DEFAULT_SYMBOL_SIZE,\n LEGEND_DIM_OPACITY,\n SHAPE_OPACITY,\n} from '../../constants.js';\nimport { isDotTooltipTemplate } from '../../functions/tooltip-type-guards.js';\nimport { useLayerColoringStrategy } from '../../hooks/use-layer-coloring-strategy.js';\nimport { useLegendInteractionHighlighting } from '../../hooks/use-legend-interaction-highlighting.js';\nimport { useLegendInteractionVisibility } from '../../hooks/use-legend-interaction-visibility.js';\nimport { useLoadSymbolIntoMap } from '../../hooks/use-load-symbol-into-map.js';\nimport { useResolveLocationColor } from '../../hooks/use-resolve-color.js';\nimport { useTooltipTemplate } from '../../hooks/use-tooltip-template.js';\nimport { DotLayerTooltip as DotLayerTooltipSlot } from '../../slots/DotLayerTooltip.js';\nimport type { InternalDotLayerProps } from '../../types/dot-layer.js';\nimport type { Location } from '../../types/location.js';\n\n/**\n * DotLayer Component\n */\nexport const DotLayer = <T extends Location>(\n props: PropsWithChildren<InternalDotLayerProps<T>>,\n) => {\n const {\n data,\n layerId,\n bearing = 0,\n children,\n shape = 'pin',\n background = false,\n shapeSize = DEFAULT_SYMBOL_SIZE,\n } = props;\n\n const { symbolName, symbolType } = useLoadSymbolIntoMap(\n shape,\n layerId,\n shapeSize,\n );\n\n const defaultSymbolColor =\n symbolType === 'shape' ? DEFAULT_SHAPE_COLOR : DEFAULT_ICON_COLOR;\n\n const colorParser = useLayerColoringStrategy();\n const shapeColor = useResolveLocationColor(\n defaultSymbolColor,\n props,\n colorParser,\n );\n\n const tooltipTemplate = useTooltipTemplate(children, DotLayerTooltipSlot);\n\n const sourceId = `source-${layerId}`;\n useLegendInteractionHighlighting(props, sourceId);\n useLegendInteractionVisibility(props, layerId);\n\n const dataGeoJson = parseDotDataToGeoJSON(\n data,\n shapeColor,\n bearing,\n background,\n );\n\n const iconAnchor = shape === 'pin' ? 'bottom' : 'center';\n\n return (\n <>\n <Source id={sourceId} type=\"geojson\" data={dataGeoJson} generateId>\n <Layer\n type=\"symbol\"\n id={layerId}\n layout={{\n 'icon-image': symbolName,\n 'icon-size': DEFAULT_ICON_SIZE_RATIO,\n 'icon-rotate': ['get', '__bearing'],\n // https://maplibre.org/maplibre-style-spec/layers/#layout-symbol-icon-ignore-placement\n 'icon-ignore-placement': true,\n 'icon-anchor': iconAnchor,\n }}\n paint={{\n 'icon-color': ['get', '__color'],\n 'icon-opacity': [\n 'case',\n ['boolean', ['feature-state', 'legendHover'], true],\n SHAPE_OPACITY,\n LEGEND_DIM_OPACITY,\n ],\n }}\n />\n <BackgroundLayer\n background={Boolean(background)}\n beforeId={layerId}\n source={sourceId}\n radius={shapeSize / 2}\n iconAnchor={iconAnchor}\n />\n </Source>\n\n <DotLayerTooltip\n layerId={layerId}\n tooltipTemplate={\n isDotTooltipTemplate(tooltipTemplate) ? tooltipTemplate : undefined\n }\n />\n </>\n );\n};\n\nDotLayer['displayName'] = 'DotLayer';\n"],
|
|
5
|
+
"mappings": "AAAA,OAAO,WAAuC;AAC9C,SAAS,OAAO,cAAc;AAE9B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AACtC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,4BAA4B;AACrC,SAAS,gCAAgC;AACzC,SAAS,wCAAwC;AACjD,SAAS,sCAAsC;AAC/C,SAAS,4BAA4B;AACrC,SAAS,+BAA+B;AACxC,SAAS,0BAA0B;AACnC,SAAS,mBAAmB,2BAA2B;AAOhD,MAAM,WAAW,CACtB,UACG;AACH,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,YAAY;AAAA,EACd,IAAI;AAEJ,QAAM,EAAE,YAAY,WAAW,IAAI;AAAA,IACjC;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,qBACJ,eAAe,UAAU,sBAAsB;AAEjD,QAAM,cAAc,yBAAyB;AAC7C,QAAM,aAAa;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,kBAAkB,mBAAmB,UAAU,mBAAmB;AAExE,QAAM,WAAW,UAAU,OAAO;AAClC,mCAAiC,OAAO,QAAQ;AAChD,iCAA+B,OAAO,OAAO;AAE7C,QAAM,cAAc;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAEA,QAAM,aAAa,UAAU,QAAQ,WAAW;AAEhD,SACE,0DACE,oCAAC,UAAO,IAAI,UAAU,MAAK,WAAU,MAAM,aAAa,YAAU,QAChE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,IAAI;AAAA,MACJ,QAAQ;AAAA,QACN,cAAc;AAAA,QACd,aAAa;AAAA,QACb,eAAe,CAAC,OAAO,WAAW;AAAA;AAAA,QAElC,yBAAyB;AAAA,QACzB,eAAe;AAAA,MACjB;AAAA,MACA,OAAO;AAAA,QACL,cAAc,CAAC,OAAO,SAAS;AAAA,QAC/B,gBAAgB;AAAA,UACd;AAAA,UACA,CAAC,WAAW,CAAC,iBAAiB,aAAa,GAAG,IAAI;AAAA,UAClD;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA;AAAA,EACF,GACA;AAAA,IAAC;AAAA;AAAA,MACC,YAAY,QAAQ,UAAU;AAAA,MAC9B,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,QAAQ,YAAY;AAAA,MACpB;AAAA;AAAA,EACF,CACF,GAEA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,iBACE,qBAAqB,eAAe,IAAI,kBAAkB;AAAA;AAAA,EAE9D,CACF;AAEJ;AAEA,SAAS,aAAa,IAAI;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components-preview/charts";
|
|
2
2
|
import { defineBearing } from "./define-bearing.js";
|
|
3
|
+
import { resolveIconBackground } from "./resolve-icon-background.js";
|
|
3
4
|
import { calculateHoveredColor } from "../../../functions/calculate-hovered-color.js";
|
|
4
5
|
import { defineColor } from "../../../functions/define-color.js";
|
|
5
|
-
const parseDotDataToGeoJSON = (data, color, bearing) => {
|
|
6
|
+
const parseDotDataToGeoJSON = (data, color, bearing, backgroundColor) => {
|
|
6
7
|
return {
|
|
7
8
|
type: "FeatureCollection",
|
|
8
9
|
features: data.map((feature) => {
|
|
9
10
|
const { longitude, latitude, ...properties } = feature;
|
|
10
11
|
const canvasColor = getCanvasColor(defineColor(color, feature));
|
|
11
12
|
const hoveredColor = calculateHoveredColor(canvasColor);
|
|
13
|
+
const { parsedBackgroundColor, parsedHoveredBackgroundColor } = resolveIconBackground(feature, backgroundColor);
|
|
12
14
|
return {
|
|
13
15
|
type: "Feature",
|
|
14
16
|
properties: {
|
|
@@ -16,6 +18,8 @@ const parseDotDataToGeoJSON = (data, color, bearing) => {
|
|
|
16
18
|
...properties,
|
|
17
19
|
__color: canvasColor,
|
|
18
20
|
__hoveredColor: hoveredColor,
|
|
21
|
+
__backgroundColor: parsedBackgroundColor,
|
|
22
|
+
__hoveredBackgroundColor: parsedHoveredBackgroundColor,
|
|
19
23
|
__bearing: defineBearing(bearing, feature)
|
|
20
24
|
},
|
|
21
25
|
geometry: { type: "Point", coordinates: [longitude, latitude] }
|
|
@@ -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 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
|
-
"mappings": "AAAA,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,mBAAmB;AAGrB,MAAM,wBAAwB,CACnC,MACA,OACA,
|
|
4
|
+
"sourcesContent": ["import { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { defineBearing } from './define-bearing.js';\nimport { resolveIconBackground } from './resolve-icon-background.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 backgroundColor: boolean | string | ((item: T) => string),\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 const { parsedBackgroundColor, parsedHoveredBackgroundColor } =\n resolveIconBackground(feature, backgroundColor);\n\n return {\n type: 'Feature',\n properties: {\n data: feature,\n ...properties,\n __color: canvasColor,\n __hoveredColor: hoveredColor,\n __backgroundColor: parsedBackgroundColor,\n __hoveredBackgroundColor: parsedHoveredBackgroundColor,\n __bearing: defineBearing(bearing, feature),\n },\n geometry: { type: 'Point', coordinates: [longitude, latitude] },\n };\n }),\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,qBAAqB;AAC9B,SAAS,6BAA6B;AACtC,SAAS,6BAA6B;AACtC,SAAS,mBAAmB;AAGrB,MAAM,wBAAwB,CACnC,MACA,OACA,SACA,oBACG;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,YAAM,EAAE,uBAAuB,6BAA6B,IAC1D,sBAAsB,SAAS,eAAe;AAEhD,aAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,UACV,MAAM;AAAA,UACN,GAAG;AAAA,UACH,SAAS;AAAA,UACT,gBAAgB;AAAA,UAChB,mBAAmB;AAAA,UACnB,0BAA0B;AAAA,UAC1B,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,15 +1,28 @@
|
|
|
1
|
+
import { isEmpty } from "lodash-es";
|
|
1
2
|
import { _getCanvasColor as getCanvasColor } from "@dynatrace/strato-components-preview/charts";
|
|
2
3
|
import { DEFAULT_ICON_BACKGROUND_COLOR } from "../../../constants.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
import { calculateHoveredColor } from "../../../functions/calculate-hovered-color.js";
|
|
5
|
+
import { defineColor } from "../../../functions/define-color.js";
|
|
6
|
+
const resolveIconBackground = (datapoint, backgroundColor) => {
|
|
7
|
+
let parsedBackgroundColor = getCanvasColor(DEFAULT_ICON_BACKGROUND_COLOR);
|
|
8
|
+
let parsedHoveredBackgroundColor = calculateHoveredColor(
|
|
9
|
+
parsedBackgroundColor
|
|
10
|
+
);
|
|
11
|
+
if (typeof backgroundColor !== "boolean") {
|
|
12
|
+
const definedBgColor = defineColor(backgroundColor, datapoint);
|
|
13
|
+
if (!isEmpty(definedBgColor)) {
|
|
14
|
+
parsedBackgroundColor = getCanvasColor(
|
|
15
|
+
definedBgColor,
|
|
16
|
+
DEFAULT_ICON_BACKGROUND_COLOR
|
|
17
|
+
);
|
|
18
|
+
parsedHoveredBackgroundColor = calculateHoveredColor(
|
|
19
|
+
parsedBackgroundColor
|
|
20
|
+
);
|
|
21
|
+
}
|
|
9
22
|
}
|
|
10
23
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
24
|
+
parsedBackgroundColor,
|
|
25
|
+
parsedHoveredBackgroundColor
|
|
13
26
|
};
|
|
14
27
|
};
|
|
15
28
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/map/components/DotLayer/functions/resolve-icon-background.ts"],
|
|
4
|
-
"sourcesContent": ["import { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_ICON_BACKGROUND_COLOR } from '../../../constants.js';\n\nexport const resolveIconBackground = (
|
|
5
|
-
"mappings": "AAAA,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,qCAAqC;
|
|
4
|
+
"sourcesContent": ["import { isEmpty } from 'lodash-es';\n\nimport { _getCanvasColor as getCanvasColor } from '@dynatrace/strato-components-preview/charts';\n\nimport { DEFAULT_ICON_BACKGROUND_COLOR } from '../../../constants.js';\nimport { calculateHoveredColor } from '../../../functions/calculate-hovered-color.js';\nimport { defineColor } from '../../../functions/define-color.js';\nimport { Location } from '../../../types/location.js';\n\ninterface ResolvedIconBackgroundColor {\n parsedBackgroundColor: string;\n parsedHoveredBackgroundColor: string;\n}\n\nexport const resolveIconBackground = <T extends Location>(\n datapoint: T,\n backgroundColor: boolean | string | ((item: T) => string),\n): ResolvedIconBackgroundColor => {\n let parsedBackgroundColor = getCanvasColor(DEFAULT_ICON_BACKGROUND_COLOR);\n let parsedHoveredBackgroundColor = calculateHoveredColor(\n parsedBackgroundColor,\n );\n\n if (typeof backgroundColor !== 'boolean') {\n const definedBgColor = defineColor(backgroundColor, datapoint);\n\n // check if the background color was successfully extracted out of the feature\n if (!isEmpty(definedBgColor)) {\n parsedBackgroundColor = getCanvasColor(\n definedBgColor,\n DEFAULT_ICON_BACKGROUND_COLOR,\n );\n parsedHoveredBackgroundColor = calculateHoveredColor(\n parsedBackgroundColor,\n );\n }\n }\n\n return {\n parsedBackgroundColor: parsedBackgroundColor,\n parsedHoveredBackgroundColor: parsedHoveredBackgroundColor,\n };\n};\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,mBAAmB,sBAAsB;AAElD,SAAS,qCAAqC;AAC9C,SAAS,6BAA6B;AACtC,SAAS,mBAAmB;AAQrB,MAAM,wBAAwB,CACnC,WACA,oBACgC;AAChC,MAAI,wBAAwB,eAAe,6BAA6B;AACxE,MAAI,+BAA+B;AAAA,IACjC;AAAA,EACF;AAEA,MAAI,OAAO,oBAAoB,WAAW;AACxC,UAAM,iBAAiB,YAAY,iBAAiB,SAAS;AAG7D,QAAI,CAAC,QAAQ,cAAc,GAAG;AAC5B,8BAAwB;AAAA,QACtB;AAAA,QACA;AAAA,MACF;AACA,qCAA+B;AAAA,QAC7B;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|