@gooddata/sdk-ui-geo 11.11.0-alpha.2 → 11.11.0-alpha.3
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/next/GeoAreaChart.d.ts +33 -0
- package/esm/next/GeoAreaChart.d.ts.map +1 -0
- package/esm/next/GeoAreaChart.js +65 -0
- package/esm/next/GeoAreaChart.js.map +1 -0
- package/esm/next/GeoPushpinChartNext.js +2 -2
- package/esm/next/GeoPushpinChartNext.js.map +1 -1
- package/esm/next/RenderGeoAreaChart.d.ts +15 -0
- package/esm/next/RenderGeoAreaChart.d.ts.map +1 -0
- package/esm/next/RenderGeoAreaChart.js +104 -0
- package/esm/next/RenderGeoAreaChart.js.map +1 -0
- package/esm/next/RenderGeoPushpinChart.d.ts.map +1 -1
- package/esm/next/RenderGeoPushpinChart.js.map +1 -1
- package/esm/next/components/legends/Legend.js +1 -1
- package/esm/next/components/legends/Legend.js.map +1 -1
- package/esm/next/components/legends/types.d.ts +2 -2
- package/esm/next/components/legends/types.d.ts.map +1 -1
- package/esm/next/context/GeoAreaCollectionContext.d.ts +24 -0
- package/esm/next/context/GeoAreaCollectionContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaCollectionContext.js +39 -0
- package/esm/next/context/GeoAreaCollectionContext.js.map +1 -0
- package/esm/next/context/GeoAreaDataContext.d.ts +69 -0
- package/esm/next/context/GeoAreaDataContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaDataContext.js +87 -0
- package/esm/next/context/GeoAreaDataContext.js.map +1 -0
- package/esm/next/context/GeoAreaPropsContext.d.ts +47 -0
- package/esm/next/context/GeoAreaPropsContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaPropsContext.js +84 -0
- package/esm/next/context/GeoAreaPropsContext.js.map +1 -0
- package/esm/next/context/GeoDataContext.d.ts +13 -19
- package/esm/next/context/GeoDataContext.d.ts.map +1 -1
- package/esm/next/context/GeoDataContext.js +7 -53
- package/esm/next/context/GeoDataContext.js.map +1 -1
- package/esm/next/context/GeoPushpinDataContext.d.ts +14 -0
- package/esm/next/context/GeoPushpinDataContext.d.ts.map +1 -0
- package/esm/next/context/GeoPushpinDataContext.js +51 -0
- package/esm/next/context/GeoPushpinDataContext.js.map +1 -0
- package/esm/next/features/clustering/clustering.d.ts +2 -2
- package/esm/next/features/clustering/clustering.d.ts.map +1 -1
- package/esm/next/features/clustering/clustering.js.map +1 -1
- package/esm/next/features/coloring/areaColorStrategy.d.ts +22 -0
- package/esm/next/features/coloring/areaColorStrategy.d.ts.map +1 -0
- package/esm/next/features/coloring/areaColorStrategy.js +83 -0
- package/esm/next/features/coloring/areaColorStrategy.js.map +1 -0
- package/esm/next/features/coloring/areaPalette.d.ts +28 -0
- package/esm/next/features/coloring/areaPalette.d.ts.map +1 -0
- package/esm/next/features/coloring/areaPalette.js +41 -0
- package/esm/next/features/coloring/areaPalette.js.map +1 -0
- package/esm/next/features/coloring/colorStrategy.d.ts +2 -2
- package/esm/next/features/coloring/colorStrategy.d.ts.map +1 -1
- package/esm/next/features/coloring/colorStrategy.js +2 -2
- package/esm/next/features/coloring/colorStrategy.js.map +1 -1
- package/esm/next/features/data/areaTransformation.d.ts +60 -0
- package/esm/next/features/data/areaTransformation.d.ts.map +1 -0
- package/esm/next/features/data/areaTransformation.js +248 -0
- package/esm/next/features/data/areaTransformation.js.map +1 -0
- package/esm/next/features/data/dataSourceManagement.d.ts +2 -2
- package/esm/next/features/data/dataSourceManagement.d.ts.map +1 -1
- package/esm/next/features/data/dataSourceManagement.js.map +1 -1
- package/esm/next/features/data/pushpinTransformation.d.ts +72 -0
- package/esm/next/features/data/pushpinTransformation.d.ts.map +1 -0
- package/esm/next/features/data/{transformation.js → pushpinTransformation.js} +21 -70
- package/esm/next/features/data/pushpinTransformation.js.map +1 -0
- package/esm/next/features/data/transformationCommon.d.ts +21 -0
- package/esm/next/features/data/transformationCommon.d.ts.map +1 -0
- package/esm/next/features/data/transformationCommon.js +52 -0
- package/esm/next/features/data/transformationCommon.js.map +1 -0
- package/esm/next/features/map/areaLayerManagement.d.ts +51 -0
- package/esm/next/features/map/areaLayerManagement.d.ts.map +1 -0
- package/esm/next/features/map/areaLayerManagement.js +81 -0
- package/esm/next/features/map/areaLayerManagement.js.map +1 -0
- package/esm/next/features/map/layerManagement.d.ts +3 -3
- package/esm/next/features/map/layerManagement.d.ts.map +1 -1
- package/esm/next/features/map/layerManagement.js.map +1 -1
- package/esm/next/features/map/viewportManagement.d.ts +13 -0
- package/esm/next/features/map/viewportManagement.d.ts.map +1 -1
- package/esm/next/features/map/viewportManagement.js +30 -0
- package/esm/next/features/map/viewportManagement.js.map +1 -1
- package/esm/next/features/tooltip/tooltipManagement.d.ts +1 -1
- package/esm/next/features/tooltip/tooltipManagement.d.ts.map +1 -1
- package/esm/next/features/tooltip/tooltipManagement.js +11 -7
- package/esm/next/features/tooltip/tooltipManagement.js.map +1 -1
- package/esm/next/helpers/areaAttributeResolver.d.ts +10 -0
- package/esm/next/helpers/areaAttributeResolver.d.ts.map +1 -0
- package/esm/next/helpers/areaAttributeResolver.js +26 -0
- package/esm/next/helpers/areaAttributeResolver.js.map +1 -0
- package/esm/next/hooks/init/useInitExecution.d.ts +5 -2
- package/esm/next/hooks/init/useInitExecution.d.ts.map +1 -1
- package/esm/next/hooks/init/useInitExecution.js +32 -16
- package/esm/next/hooks/init/useInitExecution.js.map +1 -1
- package/esm/next/hooks/legend/useAreaLegendItems.d.ts +27 -0
- package/esm/next/hooks/legend/useAreaLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/legend/useAreaLegendItems.js +33 -0
- package/esm/next/hooks/legend/useAreaLegendItems.js.map +1 -0
- package/esm/next/hooks/legend/useLegendDetails.d.ts +2 -2
- package/esm/next/hooks/legend/useLegendDetails.d.ts.map +1 -1
- package/esm/next/hooks/legend/useLegendDetails.js.map +1 -1
- package/esm/next/hooks/legend/useLegendProps.d.ts +2 -2
- package/esm/next/hooks/legend/useLegendProps.d.ts.map +1 -1
- package/esm/next/hooks/legend/useLegendProps.js.map +1 -1
- package/esm/next/hooks/legend/{useLegendItems.d.ts → usePushpinLegendItems.d.ts} +3 -3
- package/esm/next/hooks/legend/usePushpinLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/legend/usePushpinLegendItems.js +33 -0
- package/esm/next/hooks/legend/usePushpinLegendItems.js.map +1 -0
- package/esm/next/hooks/map/useAreaMapDataSync.d.ts +9 -0
- package/esm/next/hooks/map/useAreaMapDataSync.d.ts.map +1 -0
- package/esm/next/hooks/map/useAreaMapDataSync.js +71 -0
- package/esm/next/hooks/map/useAreaMapDataSync.js.map +1 -0
- package/esm/next/hooks/map/useMapDataSync.d.ts +2 -2
- package/esm/next/hooks/map/useMapDataSync.d.ts.map +1 -1
- package/esm/next/hooks/map/useMapDataSync.js.map +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.d.ts +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.d.ts.map +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.js +3 -3
- package/esm/next/hooks/map/useTooltipHandlers.js.map +1 -1
- package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts +17 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts.map +1 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.js +86 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.js.map +1 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts +43 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.js +213 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.js.map +1 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.d.ts +21 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.js +25 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.js.map +1 -0
- package/esm/next/hooks/shared/useAreaPushData.d.ts +11 -0
- package/esm/next/hooks/shared/useAreaPushData.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaPushData.js +20 -0
- package/esm/next/hooks/shared/useAreaPushData.js.map +1 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts +4 -18
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts.map +1 -1
- package/esm/next/hooks/shared/useGeoDataTransformation.js +5 -22
- package/esm/next/hooks/shared/useGeoDataTransformation.js.map +1 -1
- package/esm/next/hooks/shared/useGeoPushData.d.ts +20 -0
- package/esm/next/hooks/shared/useGeoPushData.d.ts.map +1 -0
- package/esm/next/hooks/shared/useGeoPushData.js +36 -0
- package/esm/next/hooks/shared/useGeoPushData.js.map +1 -0
- package/esm/next/hooks/shared/usePushData.d.ts.map +1 -1
- package/esm/next/hooks/shared/usePushData.js +5 -26
- package/esm/next/hooks/shared/usePushData.js.map +1 -1
- package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts +23 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts.map +1 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.js +27 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.d.ts +16 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.d.ts.map +1 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.js +36 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts +8 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts.map +1 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.js +11 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedProps.d.ts.map +1 -1
- package/esm/next/hooks/shared/useResolvedProps.js +3 -3
- package/esm/next/hooks/shared/useResolvedProps.js.map +1 -1
- package/esm/next/hooks/shared/useSegmentLegendItems.d.ts +17 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.js +33 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.js.map +1 -0
- package/esm/next/index.d.ts +4 -0
- package/esm/next/index.d.ts.map +1 -1
- package/esm/next/index.js +1 -0
- package/esm/next/index.js.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts +2 -2
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayers.js.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts +41 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.js +83 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts +2 -2
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts +34 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.js +209 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreTooltip.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreTooltip.js +20 -4
- package/esm/next/providers/maplibre/maplibreTooltip.js.map +1 -1
- package/esm/next/types/areaConfig.d.ts +68 -0
- package/esm/next/types/areaConfig.d.ts.map +1 -0
- package/esm/next/types/areaConfig.js +3 -0
- package/esm/next/types/areaConfig.js.map +1 -0
- package/esm/next/types/areaInternal.d.ts +13 -0
- package/esm/next/types/areaInternal.d.ts.map +1 -0
- package/esm/next/types/areaInternal.js +3 -0
- package/esm/next/types/areaInternal.js.map +1 -0
- package/esm/next/types/areaPublic.d.ts +68 -0
- package/esm/next/types/areaPublic.d.ts.map +1 -0
- package/esm/next/types/areaPublic.js +3 -0
- package/esm/next/types/areaPublic.js.map +1 -0
- package/esm/next/types/shared.d.ts +57 -21
- package/esm/next/types/shared.d.ts.map +1 -1
- package/esm/next/utils/geoCollection.d.ts +40 -0
- package/esm/next/utils/geoCollection.d.ts.map +1 -0
- package/esm/next/utils/geoCollection.js +102 -0
- package/esm/next/utils/geoCollection.js.map +1 -0
- package/package.json +10 -9
- package/styles/css/main.css +18 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/geo-area-next.scss +24 -0
- package/styles/scss/main.scss +1 -0
- package/esm/next/features/data/transformation.d.ts +0 -99
- package/esm/next/features/data/transformation.d.ts.map +0 -1
- package/esm/next/features/data/transformation.js.map +0 -1
- package/esm/next/hooks/legend/useLegendItems.d.ts.map +0 -1
- package/esm/next/hooks/legend/useLegendItems.js +0 -54
- package/esm/next/hooks/legend/useLegendItems.js.map +0 -1
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
import { getAreaAreaColors } from "../../features/coloring/areaPalette.js";
|
|
3
|
+
function toMaplibreProperties(base, updates) {
|
|
4
|
+
return {
|
|
5
|
+
...(base ?? {}),
|
|
6
|
+
...updates,
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function extractString(value) {
|
|
10
|
+
if (typeof value === "string" && value.length > 0) {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
if (typeof value === "number") {
|
|
14
|
+
return String(value);
|
|
15
|
+
}
|
|
16
|
+
if (value && typeof value === "object" && "value" in value) {
|
|
17
|
+
const nested = value.value;
|
|
18
|
+
return extractString(nested);
|
|
19
|
+
}
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
function collectFeatureKeys(feature) {
|
|
23
|
+
const props = (feature.properties ?? {});
|
|
24
|
+
const unique = new Set();
|
|
25
|
+
const addCandidate = (candidate) => {
|
|
26
|
+
if (candidate) {
|
|
27
|
+
unique.add(candidate);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const prioritizedKeys = [
|
|
31
|
+
"matchingValue",
|
|
32
|
+
"matchingValues",
|
|
33
|
+
"id",
|
|
34
|
+
"areaId",
|
|
35
|
+
"areaCode",
|
|
36
|
+
"areaUri",
|
|
37
|
+
"region",
|
|
38
|
+
"code",
|
|
39
|
+
];
|
|
40
|
+
for (const key of prioritizedKeys) {
|
|
41
|
+
addCandidate(extractString(props[key]));
|
|
42
|
+
}
|
|
43
|
+
addCandidate(extractString(feature.id));
|
|
44
|
+
for (const value of Object.values(props)) {
|
|
45
|
+
addCandidate(extractString(value));
|
|
46
|
+
}
|
|
47
|
+
return Array.from(unique);
|
|
48
|
+
}
|
|
49
|
+
function buildFeatureIndex(features) {
|
|
50
|
+
const map = new Map();
|
|
51
|
+
if (!features) {
|
|
52
|
+
return map;
|
|
53
|
+
}
|
|
54
|
+
for (const feature of features) {
|
|
55
|
+
for (const key of collectFeatureKeys(feature)) {
|
|
56
|
+
if (!map.has(key)) {
|
|
57
|
+
map.set(key, feature);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return map;
|
|
62
|
+
}
|
|
63
|
+
function toMaplibreFeature(feature) {
|
|
64
|
+
if (!feature) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const geometry = feature.geometry;
|
|
68
|
+
const properties = feature.properties;
|
|
69
|
+
return {
|
|
70
|
+
type: "Feature",
|
|
71
|
+
geometry: geometry ?? {
|
|
72
|
+
type: "Polygon",
|
|
73
|
+
coordinates: [[]],
|
|
74
|
+
},
|
|
75
|
+
properties: properties ?? {},
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function createPlaceholderGeometry() {
|
|
79
|
+
return {
|
|
80
|
+
type: "Polygon",
|
|
81
|
+
coordinates: [[]],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function buildAreaProperties(args) {
|
|
85
|
+
const { index, areaIdentifier, areaUri, areaNameTitle, tooltipValue, colorTitle, colorValue, colorFormat, areaColorFill, segmentTitle, segmentValue, segmentUri, } = args;
|
|
86
|
+
const properties = {
|
|
87
|
+
areaId: areaIdentifier,
|
|
88
|
+
areaUri,
|
|
89
|
+
color_fill: areaColorFill,
|
|
90
|
+
locationName: {
|
|
91
|
+
title: areaNameTitle,
|
|
92
|
+
value: areaIdentifier,
|
|
93
|
+
},
|
|
94
|
+
locationIndex: index,
|
|
95
|
+
color: {
|
|
96
|
+
fill: areaColorFill,
|
|
97
|
+
title: colorTitle ?? "",
|
|
98
|
+
value: colorValue,
|
|
99
|
+
format: colorFormat ?? "",
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
if (tooltipValue !== undefined) {
|
|
103
|
+
properties["tooltipText"] = {
|
|
104
|
+
value: tooltipValue,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (segmentTitle !== undefined || segmentValue !== undefined || segmentUri !== undefined) {
|
|
108
|
+
properties["segment"] = {
|
|
109
|
+
title: segmentTitle ?? "",
|
|
110
|
+
value: segmentValue,
|
|
111
|
+
uri: segmentUri,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return properties;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Transforms area data to GeoJSON features
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* This function creates GeoJSON features with polygon geometries for area visualization.
|
|
121
|
+
* In a production implementation, this would load actual boundary geometries (from GeoJSON files
|
|
122
|
+
* or a boundaries service) and match them with data values.
|
|
123
|
+
*
|
|
124
|
+
* For this initial implementation, we create placeholder geometries that will be replaced
|
|
125
|
+
* with actual boundary data from a GeoJSON boundaries provider.
|
|
126
|
+
*
|
|
127
|
+
* @param config - Area configuration
|
|
128
|
+
* @param geoData - Area geographic data
|
|
129
|
+
* @param colorStrategy - Color strategy for area styling
|
|
130
|
+
* @returns Array of GeoJSON features
|
|
131
|
+
*
|
|
132
|
+
* @internal
|
|
133
|
+
*/
|
|
134
|
+
function transformAreaDataSource({ geoData, colorStrategy, features, }) {
|
|
135
|
+
const { color, area, segment, tooltipText } = geoData;
|
|
136
|
+
if (!area) {
|
|
137
|
+
return [];
|
|
138
|
+
}
|
|
139
|
+
const areaNameTitle = area.name || "";
|
|
140
|
+
const colorTitle = color ? color.name : "";
|
|
141
|
+
const segmentTitle = segment ? segment.name : undefined;
|
|
142
|
+
const areaIdentifiers = area.data;
|
|
143
|
+
const areaUris = area.uris;
|
|
144
|
+
const tooltipTextData = tooltipText?.data ?? [];
|
|
145
|
+
const segmentData = segment?.data ?? [];
|
|
146
|
+
const segmentUris = segment?.uris ?? [];
|
|
147
|
+
const colorData = color?.data ?? [];
|
|
148
|
+
const colorFormat = color?.format ?? "";
|
|
149
|
+
const areaColors = getAreaAreaColors(colorData, segmentData, colorStrategy);
|
|
150
|
+
const featureIndex = buildFeatureIndex(features);
|
|
151
|
+
return areaIdentifiers.reduce((result, areaIdentifier, index) => {
|
|
152
|
+
if (!areaIdentifier) {
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
155
|
+
const colorValue = colorData[index];
|
|
156
|
+
const segmentValue = segmentData[index];
|
|
157
|
+
const segmentUri = segmentUris[index];
|
|
158
|
+
const areaColor = areaColors[index] || areaColors[0] || { fill: "#20B2E2" };
|
|
159
|
+
const tooltipValue = tooltipTextData[index];
|
|
160
|
+
const areaUri = areaUris[index];
|
|
161
|
+
const matchingFeature = featureIndex.get(areaIdentifier) || (areaUri ? featureIndex.get(areaUri) : undefined);
|
|
162
|
+
const baseFeature = toMaplibreFeature(matchingFeature);
|
|
163
|
+
const geometry = baseFeature?.geometry ?? createPlaceholderGeometry();
|
|
164
|
+
const properties = buildAreaProperties({
|
|
165
|
+
index,
|
|
166
|
+
areaIdentifier,
|
|
167
|
+
areaUri,
|
|
168
|
+
areaNameTitle,
|
|
169
|
+
tooltipValue,
|
|
170
|
+
colorTitle,
|
|
171
|
+
colorValue: typeof colorValue === "number" ? colorValue : undefined,
|
|
172
|
+
colorFormat,
|
|
173
|
+
areaColorFill: areaColor.fill,
|
|
174
|
+
segmentTitle,
|
|
175
|
+
segmentValue,
|
|
176
|
+
segmentUri,
|
|
177
|
+
});
|
|
178
|
+
result.push({
|
|
179
|
+
type: "Feature",
|
|
180
|
+
geometry,
|
|
181
|
+
properties: toMaplibreProperties(baseFeature?.properties, properties),
|
|
182
|
+
});
|
|
183
|
+
return result;
|
|
184
|
+
}, []);
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Creates a GeoJSON data source for area visualization
|
|
188
|
+
*
|
|
189
|
+
* @remarks
|
|
190
|
+
* Creates a GeoJSON source with polygon features for area-based visualization.
|
|
191
|
+
* In production, this should integrate with a boundaries provider to load
|
|
192
|
+
* actual geographic polygon data.
|
|
193
|
+
*
|
|
194
|
+
* @param dataSourceProps - Properties containing area data, config, and styling
|
|
195
|
+
* @returns GeoJSON source specification for MapLibre
|
|
196
|
+
*
|
|
197
|
+
* @alpha
|
|
198
|
+
*/
|
|
199
|
+
export const createAreaDataSource = (dataSourceProps) => {
|
|
200
|
+
const features = transformAreaDataSource(dataSourceProps);
|
|
201
|
+
return {
|
|
202
|
+
type: "geojson",
|
|
203
|
+
data: {
|
|
204
|
+
type: "FeatureCollection",
|
|
205
|
+
features,
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
//# sourceMappingURL=maplibreDataSourceArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maplibreDataSourceArea.js","sourceRoot":"","sources":["../../../../src/next/providers/maplibre/maplibreDataSourceArea.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAOhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAmB3E,SAAS,oBAAoB,CACzB,IAA2C,EAC3C,OAAkC;IAElC,OAAO;QACH,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;QACf,G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MAAM,CAAC;AAuCrC;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,OAAO,CAAC,iBAAiB,GAAG,SAAS,GAAG,OAAO,CAY/F;AAQD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC1B,aAAa,EAAE,OAAO,CAAC,iBAAiB,EACxC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,WAAW,EACxB,cAAc,CAAC,EAAE,gBAAgB,EAAE,EACnC,IAAI,CAAC,EAAE,SAAS,GACjB,MAAM,CAiBR;AAkBD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,GAChC,GAAG,aAAa,EAChB,KAAK,WAAW,EAChB,SAAS,KAAK,EACd,QAAQ,0BAA0B,EAClC,iBAAiB,gBAAgB,EAAE,EACnC,OAAO,SAAS,KACjB,IA8CF,CAAC;AAqBF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,GAChC,IAAI,aAAa,EACjB,KAAK,WAAW,EAChB,SAAS,KAAK,EACd,QAAQ,0BAA0B,KACnC,IAOF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// (C) 2025 GoodData Corporation
|
|
2
2
|
import { escape, isEmpty } from "lodash-es";
|
|
3
3
|
import { DEFAULT_PUSHPIN_COLOR_VALUE, NULL_TOOLTIP_VALUE } from "../../constants/geoChart.js";
|
|
4
|
-
import {
|
|
4
|
+
import { parsePushpinGeoProperties } from "../../features/data/pushpinTransformation.js";
|
|
5
5
|
import { formatValueForTooltip, getTooltipContentWidth } from "../../features/tooltip/formatting.js";
|
|
6
6
|
const TOOLTIP_FULLSCREEN_THRESHOLD = 480;
|
|
7
7
|
export const TOOLTIP_MAX_WIDTH = 320;
|
|
@@ -123,20 +123,36 @@ export const handlePushpinMouseEnter = (e, map, tooltip, config, drillableItems,
|
|
|
123
123
|
}
|
|
124
124
|
const [feature] = features;
|
|
125
125
|
const { properties } = feature;
|
|
126
|
-
const parsedProps =
|
|
126
|
+
const parsedProps = parsePushpinGeoProperties(properties);
|
|
127
127
|
if (!shouldShowTooltip(parsedProps)) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const canvas = map.getCanvas();
|
|
131
131
|
canvas.style.cursor = "pointer";
|
|
132
|
-
const coordinates = feature.geometry
|
|
133
|
-
|
|
132
|
+
const coordinates = resolveTooltipCoordinates(feature.geometry, e);
|
|
133
|
+
if (!coordinates) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const tooltipStroke = parsedProps?.["color"]?.fill ?? DEFAULT_PUSHPIN_COLOR_VALUE;
|
|
134
137
|
const isFullScreenTooltip = isTooltipShownInFullScreen();
|
|
135
138
|
const chartWidth = canvas.clientWidth;
|
|
136
139
|
const maxTooltipContentWidth = getTooltipContentWidth(isFullScreenTooltip, chartWidth, TOOLTIP_MAX_WIDTH);
|
|
137
140
|
const tooltipHtml = getTooltipHtml(parsedProps, tooltipStroke, maxTooltipContentWidth, separators, drillableItems, intl);
|
|
138
141
|
tooltip.setLngLat(coordinates).setHTML(tooltipHtml).setMaxWidth(`${maxTooltipContentWidth}px`).addTo(map);
|
|
139
142
|
};
|
|
143
|
+
function resolveTooltipCoordinates(geometry, event) {
|
|
144
|
+
if (geometry && geometry.type === "Point") {
|
|
145
|
+
const coords = geometry.coordinates.slice(0, 2);
|
|
146
|
+
if (coords.length === 2 && Number.isFinite(coords[0]) && Number.isFinite(coords[1])) {
|
|
147
|
+
return coords;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
const lngLat = event.lngLat;
|
|
151
|
+
if (lngLat) {
|
|
152
|
+
return [lngLat.lng, lngLat.lat];
|
|
153
|
+
}
|
|
154
|
+
return undefined;
|
|
155
|
+
}
|
|
140
156
|
/**
|
|
141
157
|
* Handle pushpin mouse leave event to hide tooltip
|
|
142
158
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maplibreTooltip.js","sourceRoot":"","sources":["../../../../src/next/providers/maplibre/maplibreTooltip.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAO5C,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"maplibreTooltip.js","sourceRoot":"","sources":["../../../../src/next/providers/maplibre/maplibreTooltip.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAO5C,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAIrG,MAAM,4BAA4B,GAAG,GAAG,CAAC;AACzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,SAAS,kBAAkB,CAAC,IAAqB;IAC7C,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAsB;IAChD,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,aAAa,CAAC,IAAqB,EAAE,UAAwB;IAClE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACtC,OAAO;QACH,KAAK;QACL,KAAK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ui-vis-commons";
|
|
4
|
+
import { IGeoConfigViewportNext, IGeoLegendConfigNext } from "./config.js";
|
|
5
|
+
import { IGeoLngLat } from "./shared.js";
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for area styling in area maps
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export interface IGeoAreasConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Opacity of filled areas (0-1)
|
|
14
|
+
* @defaultValue 0.7
|
|
15
|
+
*/
|
|
16
|
+
fillOpacity?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Color of area borders
|
|
19
|
+
* @defaultValue "#FFFFFF"
|
|
20
|
+
*/
|
|
21
|
+
borderColor?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Width of area borders in pixels
|
|
24
|
+
* @defaultValue 1
|
|
25
|
+
*/
|
|
26
|
+
borderWidth?: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Configuration for GeoAreaChart component
|
|
30
|
+
*
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
export interface IGeoAreaChartConfig {
|
|
34
|
+
center?: IGeoLngLat;
|
|
35
|
+
isExportMode?: boolean;
|
|
36
|
+
legend?: IGeoLegendConfigNext;
|
|
37
|
+
limit?: number;
|
|
38
|
+
selectedSegmentItems?: string[];
|
|
39
|
+
tooltipText?: IAttribute;
|
|
40
|
+
zoom?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Custom map style URL or style object for the base map layer
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* Allows configuring custom map styles, including AWS Location Service, Mapbox, MapTiler, or any
|
|
46
|
+
* MapLibre-compatible style. Can be a URL string pointing to a style JSON or a style object.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* AWS Location Service:
|
|
50
|
+
* ```typescript
|
|
51
|
+
* mapStyle: `https://maps.geo.us-east-1.amazonaws.com/v2/styles/Standard/descriptor?key=${API_KEY}`
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* @alpha
|
|
55
|
+
*/
|
|
56
|
+
mapStyle?: string | object;
|
|
57
|
+
separators?: ISeparators;
|
|
58
|
+
viewport?: IGeoConfigViewportNext;
|
|
59
|
+
areas?: IGeoAreasConfig;
|
|
60
|
+
colors?: string[];
|
|
61
|
+
colorPalette?: IColorPalette;
|
|
62
|
+
colorMapping?: IColorMapping[];
|
|
63
|
+
showLabels?: boolean;
|
|
64
|
+
cooperativeGestures?: boolean;
|
|
65
|
+
enableExecutionCancelling?: boolean;
|
|
66
|
+
respectLegendPosition?: boolean;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=areaConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaConfig.d.ts","sourceRoot":"","sources":["../../../src/next/types/areaConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;IAChC,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,YAAY,CAAC,EAAE,aAAa,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaConfig.js","sourceRoot":"","sources":["../../../src/next/types/areaConfig.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IAttribute } from "@gooddata/sdk-model";
|
|
2
|
+
import { IDataVisualizationProps } from "@gooddata/sdk-ui";
|
|
3
|
+
import { IGeoAreaChartBaseProps } from "./areaPublic.js";
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface ICoreGeoAreaChartProps extends IGeoAreaChartBaseProps, IDataVisualizationProps {
|
|
8
|
+
/**
|
|
9
|
+
* Area attribute used to resolve geo collection metadata.
|
|
10
|
+
*/
|
|
11
|
+
area?: IAttribute;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=areaInternal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaInternal.d.ts","sourceRoot":"","sources":["../../../src/next/types/areaInternal.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB,EAAE,uBAAuB;IAC3F;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaInternal.js","sourceRoot":"","sources":["../../../src/next/types/areaInternal.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
2
|
+
import { IAttribute, IAttributeOrMeasure, IExecutionConfig, INullableFilter, ISortItem, ITheme } from "@gooddata/sdk-model";
|
|
3
|
+
import { IVisualizationCallbacks, IVisualizationProps } from "@gooddata/sdk-ui";
|
|
4
|
+
import { IGeoAreaChartConfig } from "./areaConfig.js";
|
|
5
|
+
import { CenterPositionChangedCallback, ZoomChangedCallback } from "./shared.js";
|
|
6
|
+
/**
|
|
7
|
+
* Base props for GeoAreaChart (without required area)
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export interface IGeoAreaChartBaseProps extends IVisualizationProps, IVisualizationCallbacks {
|
|
12
|
+
/**
|
|
13
|
+
* Backend to execute against
|
|
14
|
+
*/
|
|
15
|
+
backend?: IAnalyticalBackend;
|
|
16
|
+
/**
|
|
17
|
+
* Workspace to execute in
|
|
18
|
+
*/
|
|
19
|
+
workspace?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Measure that determines the color fill of the geographic areas
|
|
22
|
+
*/
|
|
23
|
+
color?: IAttributeOrMeasure;
|
|
24
|
+
/**
|
|
25
|
+
* Specifies how to segment data
|
|
26
|
+
*/
|
|
27
|
+
segmentBy?: IAttribute;
|
|
28
|
+
/**
|
|
29
|
+
* Specifies filters to apply to the data
|
|
30
|
+
*/
|
|
31
|
+
filters?: INullableFilter[];
|
|
32
|
+
/**
|
|
33
|
+
* Specifies how to sort the data
|
|
34
|
+
*/
|
|
35
|
+
sortBy?: ISortItem[];
|
|
36
|
+
/**
|
|
37
|
+
* Specifies the theme to use for the chart
|
|
38
|
+
*/
|
|
39
|
+
theme?: ITheme;
|
|
40
|
+
/**
|
|
41
|
+
* Area-specific configuration
|
|
42
|
+
*/
|
|
43
|
+
config?: IGeoAreaChartConfig;
|
|
44
|
+
/**
|
|
45
|
+
* Execution configuration
|
|
46
|
+
*/
|
|
47
|
+
execConfig?: IExecutionConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Called when map center position changes
|
|
50
|
+
*/
|
|
51
|
+
onCenterPositionChanged?: CenterPositionChangedCallback;
|
|
52
|
+
/**
|
|
53
|
+
* Called when map zoom changes
|
|
54
|
+
*/
|
|
55
|
+
onZoomChanged?: ZoomChangedCallback;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Props for GeoAreaChart with area attribute
|
|
59
|
+
*
|
|
60
|
+
* @alpha
|
|
61
|
+
*/
|
|
62
|
+
export interface IGeoAreaChartProps extends IGeoAreaChartBaseProps {
|
|
63
|
+
/**
|
|
64
|
+
* Geographic area attribute (regions, countries, states)
|
|
65
|
+
*/
|
|
66
|
+
area: IAttribute;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=areaPublic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaPublic.d.ts","sourceRoot":"","sources":["../../../src/next/types/areaPublic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACH,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,MAAM,EACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAEhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEjF;;;;GAIG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB,EAAE,uBAAuB;IACxF;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAE7B;;OAEG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IAExD;;OAEG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACvC;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,sBAAsB;IAC9D;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaPublic.js","sourceRoot":"","sources":["../../../src/next/types/areaPublic.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
|
|
@@ -116,7 +116,7 @@ export interface IGeoSegmentItem extends IGeoAttributeItem {
|
|
|
116
116
|
*
|
|
117
117
|
* @alpha
|
|
118
118
|
*/
|
|
119
|
-
export interface
|
|
119
|
+
export interface IPushpinLocationItem extends IGeoDataItem {
|
|
120
120
|
/**
|
|
121
121
|
* Array of coordinates for each location
|
|
122
122
|
*/
|
|
@@ -137,6 +137,25 @@ export interface IGeoMeasureItem extends IGeoDataItem {
|
|
|
137
137
|
*/
|
|
138
138
|
data: number[];
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Common subset of geo data used by legends
|
|
142
|
+
*
|
|
143
|
+
* @alpha
|
|
144
|
+
*/
|
|
145
|
+
export interface IGeoCommonData {
|
|
146
|
+
/**
|
|
147
|
+
* Color measure data (determines pushpin or area color)
|
|
148
|
+
*/
|
|
149
|
+
color?: IGeoMeasureItem;
|
|
150
|
+
/**
|
|
151
|
+
* Segment data (for categorization and drilling)
|
|
152
|
+
*/
|
|
153
|
+
segment?: IGeoSegmentItem;
|
|
154
|
+
/**
|
|
155
|
+
* Additional tooltip text attribute
|
|
156
|
+
*/
|
|
157
|
+
tooltipText?: IGeoAttributeItem;
|
|
158
|
+
}
|
|
140
159
|
/**
|
|
141
160
|
* Complete geo data structure
|
|
142
161
|
*
|
|
@@ -146,27 +165,15 @@ export interface IGeoMeasureItem extends IGeoDataItem {
|
|
|
146
165
|
*
|
|
147
166
|
* @alpha
|
|
148
167
|
*/
|
|
149
|
-
export interface
|
|
168
|
+
export interface IPushpinGeoData extends IGeoCommonData {
|
|
150
169
|
/**
|
|
151
170
|
* Location coordinates for pushpins
|
|
152
171
|
*/
|
|
153
|
-
location?:
|
|
172
|
+
location?: IPushpinLocationItem;
|
|
154
173
|
/**
|
|
155
174
|
* Size measure data (determines pushpin size)
|
|
156
175
|
*/
|
|
157
176
|
size?: IGeoMeasureItem;
|
|
158
|
-
/**
|
|
159
|
-
* Color measure data (determines pushpin color)
|
|
160
|
-
*/
|
|
161
|
-
color?: IGeoMeasureItem;
|
|
162
|
-
/**
|
|
163
|
-
* Segment data (for categorization and drilling)
|
|
164
|
-
*/
|
|
165
|
-
segment?: IGeoSegmentItem;
|
|
166
|
-
/**
|
|
167
|
-
* Additional tooltip text attribute
|
|
168
|
-
*/
|
|
169
|
-
tooltipText?: IGeoAttributeItem;
|
|
170
177
|
}
|
|
171
178
|
/**
|
|
172
179
|
* Metadata about available legend types
|
|
@@ -187,21 +194,50 @@ export interface IAvailableLegends {
|
|
|
187
194
|
hasColorLegend: boolean;
|
|
188
195
|
/**
|
|
189
196
|
* Whether to show size legend (based on size measure)
|
|
197
|
+
*
|
|
198
|
+
* @remarks
|
|
199
|
+
* Optional because area charts never expose size data.
|
|
190
200
|
*/
|
|
191
|
-
hasSizeLegend
|
|
201
|
+
hasSizeLegend?: boolean;
|
|
192
202
|
}
|
|
193
203
|
/**
|
|
194
|
-
*
|
|
204
|
+
* Represents a geographic area item with polygon/boundary data
|
|
195
205
|
*
|
|
196
|
-
* @
|
|
206
|
+
* @alpha
|
|
207
|
+
*/
|
|
208
|
+
export interface IGeoAreaItem extends IGeoDataItem {
|
|
209
|
+
/**
|
|
210
|
+
* Geographic identifiers for areas (e.g., ISO country codes, region IDs)
|
|
211
|
+
*/
|
|
212
|
+
data: string[];
|
|
213
|
+
/**
|
|
214
|
+
* URIs corresponding to area values for drilling functionality
|
|
215
|
+
*/
|
|
216
|
+
uris: string[];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Complete area geo data structure
|
|
220
|
+
*
|
|
221
|
+
* @remarks
|
|
222
|
+
* Contains all data needed to render the geo area chart including
|
|
223
|
+
* geographic areas, color values, segments, and tooltip text
|
|
197
224
|
*
|
|
198
225
|
* @alpha
|
|
199
226
|
*/
|
|
200
|
-
export
|
|
227
|
+
export interface IAreaGeoData extends IGeoCommonData {
|
|
228
|
+
/**
|
|
229
|
+
* Geographic area identifiers
|
|
230
|
+
*/
|
|
231
|
+
area?: IGeoAreaItem;
|
|
232
|
+
}
|
|
201
233
|
/**
|
|
202
|
-
* Callback function invoked when map
|
|
234
|
+
* Callback function invoked when map center position changes.
|
|
203
235
|
*
|
|
204
|
-
* @
|
|
236
|
+
* @alpha
|
|
237
|
+
*/
|
|
238
|
+
export type CenterPositionChangedCallback = (center: IGeoLngLat) => void;
|
|
239
|
+
/**
|
|
240
|
+
* Callback function invoked when map zoom level changes.
|
|
205
241
|
*
|
|
206
242
|
* @alpha
|
|
207
243
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/next/types/shared.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;IACtB;;OAEG;IACH,SAAS,EAAE,UAAU,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,YAAY;IACnD;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACtD;;OAEG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"sh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