@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.
Files changed (209) hide show
  1. package/esm/next/GeoAreaChart.d.ts +33 -0
  2. package/esm/next/GeoAreaChart.d.ts.map +1 -0
  3. package/esm/next/GeoAreaChart.js +65 -0
  4. package/esm/next/GeoAreaChart.js.map +1 -0
  5. package/esm/next/GeoPushpinChartNext.js +2 -2
  6. package/esm/next/GeoPushpinChartNext.js.map +1 -1
  7. package/esm/next/RenderGeoAreaChart.d.ts +15 -0
  8. package/esm/next/RenderGeoAreaChart.d.ts.map +1 -0
  9. package/esm/next/RenderGeoAreaChart.js +104 -0
  10. package/esm/next/RenderGeoAreaChart.js.map +1 -0
  11. package/esm/next/RenderGeoPushpinChart.d.ts.map +1 -1
  12. package/esm/next/RenderGeoPushpinChart.js.map +1 -1
  13. package/esm/next/components/legends/Legend.js +1 -1
  14. package/esm/next/components/legends/Legend.js.map +1 -1
  15. package/esm/next/components/legends/types.d.ts +2 -2
  16. package/esm/next/components/legends/types.d.ts.map +1 -1
  17. package/esm/next/context/GeoAreaCollectionContext.d.ts +24 -0
  18. package/esm/next/context/GeoAreaCollectionContext.d.ts.map +1 -0
  19. package/esm/next/context/GeoAreaCollectionContext.js +39 -0
  20. package/esm/next/context/GeoAreaCollectionContext.js.map +1 -0
  21. package/esm/next/context/GeoAreaDataContext.d.ts +69 -0
  22. package/esm/next/context/GeoAreaDataContext.d.ts.map +1 -0
  23. package/esm/next/context/GeoAreaDataContext.js +87 -0
  24. package/esm/next/context/GeoAreaDataContext.js.map +1 -0
  25. package/esm/next/context/GeoAreaPropsContext.d.ts +47 -0
  26. package/esm/next/context/GeoAreaPropsContext.d.ts.map +1 -0
  27. package/esm/next/context/GeoAreaPropsContext.js +84 -0
  28. package/esm/next/context/GeoAreaPropsContext.js.map +1 -0
  29. package/esm/next/context/GeoDataContext.d.ts +13 -19
  30. package/esm/next/context/GeoDataContext.d.ts.map +1 -1
  31. package/esm/next/context/GeoDataContext.js +7 -53
  32. package/esm/next/context/GeoDataContext.js.map +1 -1
  33. package/esm/next/context/GeoPushpinDataContext.d.ts +14 -0
  34. package/esm/next/context/GeoPushpinDataContext.d.ts.map +1 -0
  35. package/esm/next/context/GeoPushpinDataContext.js +51 -0
  36. package/esm/next/context/GeoPushpinDataContext.js.map +1 -0
  37. package/esm/next/features/clustering/clustering.d.ts +2 -2
  38. package/esm/next/features/clustering/clustering.d.ts.map +1 -1
  39. package/esm/next/features/clustering/clustering.js.map +1 -1
  40. package/esm/next/features/coloring/areaColorStrategy.d.ts +22 -0
  41. package/esm/next/features/coloring/areaColorStrategy.d.ts.map +1 -0
  42. package/esm/next/features/coloring/areaColorStrategy.js +83 -0
  43. package/esm/next/features/coloring/areaColorStrategy.js.map +1 -0
  44. package/esm/next/features/coloring/areaPalette.d.ts +28 -0
  45. package/esm/next/features/coloring/areaPalette.d.ts.map +1 -0
  46. package/esm/next/features/coloring/areaPalette.js +41 -0
  47. package/esm/next/features/coloring/areaPalette.js.map +1 -0
  48. package/esm/next/features/coloring/colorStrategy.d.ts +2 -2
  49. package/esm/next/features/coloring/colorStrategy.d.ts.map +1 -1
  50. package/esm/next/features/coloring/colorStrategy.js +2 -2
  51. package/esm/next/features/coloring/colorStrategy.js.map +1 -1
  52. package/esm/next/features/data/areaTransformation.d.ts +60 -0
  53. package/esm/next/features/data/areaTransformation.d.ts.map +1 -0
  54. package/esm/next/features/data/areaTransformation.js +248 -0
  55. package/esm/next/features/data/areaTransformation.js.map +1 -0
  56. package/esm/next/features/data/dataSourceManagement.d.ts +2 -2
  57. package/esm/next/features/data/dataSourceManagement.d.ts.map +1 -1
  58. package/esm/next/features/data/dataSourceManagement.js.map +1 -1
  59. package/esm/next/features/data/pushpinTransformation.d.ts +72 -0
  60. package/esm/next/features/data/pushpinTransformation.d.ts.map +1 -0
  61. package/esm/next/features/data/{transformation.js → pushpinTransformation.js} +21 -70
  62. package/esm/next/features/data/pushpinTransformation.js.map +1 -0
  63. package/esm/next/features/data/transformationCommon.d.ts +21 -0
  64. package/esm/next/features/data/transformationCommon.d.ts.map +1 -0
  65. package/esm/next/features/data/transformationCommon.js +52 -0
  66. package/esm/next/features/data/transformationCommon.js.map +1 -0
  67. package/esm/next/features/map/areaLayerManagement.d.ts +51 -0
  68. package/esm/next/features/map/areaLayerManagement.d.ts.map +1 -0
  69. package/esm/next/features/map/areaLayerManagement.js +81 -0
  70. package/esm/next/features/map/areaLayerManagement.js.map +1 -0
  71. package/esm/next/features/map/layerManagement.d.ts +3 -3
  72. package/esm/next/features/map/layerManagement.d.ts.map +1 -1
  73. package/esm/next/features/map/layerManagement.js.map +1 -1
  74. package/esm/next/features/map/viewportManagement.d.ts +13 -0
  75. package/esm/next/features/map/viewportManagement.d.ts.map +1 -1
  76. package/esm/next/features/map/viewportManagement.js +30 -0
  77. package/esm/next/features/map/viewportManagement.js.map +1 -1
  78. package/esm/next/features/tooltip/tooltipManagement.d.ts +1 -1
  79. package/esm/next/features/tooltip/tooltipManagement.d.ts.map +1 -1
  80. package/esm/next/features/tooltip/tooltipManagement.js +11 -7
  81. package/esm/next/features/tooltip/tooltipManagement.js.map +1 -1
  82. package/esm/next/helpers/areaAttributeResolver.d.ts +10 -0
  83. package/esm/next/helpers/areaAttributeResolver.d.ts.map +1 -0
  84. package/esm/next/helpers/areaAttributeResolver.js +26 -0
  85. package/esm/next/helpers/areaAttributeResolver.js.map +1 -0
  86. package/esm/next/hooks/init/useInitExecution.d.ts +5 -2
  87. package/esm/next/hooks/init/useInitExecution.d.ts.map +1 -1
  88. package/esm/next/hooks/init/useInitExecution.js +32 -16
  89. package/esm/next/hooks/init/useInitExecution.js.map +1 -1
  90. package/esm/next/hooks/legend/useAreaLegendItems.d.ts +27 -0
  91. package/esm/next/hooks/legend/useAreaLegendItems.d.ts.map +1 -0
  92. package/esm/next/hooks/legend/useAreaLegendItems.js +33 -0
  93. package/esm/next/hooks/legend/useAreaLegendItems.js.map +1 -0
  94. package/esm/next/hooks/legend/useLegendDetails.d.ts +2 -2
  95. package/esm/next/hooks/legend/useLegendDetails.d.ts.map +1 -1
  96. package/esm/next/hooks/legend/useLegendDetails.js.map +1 -1
  97. package/esm/next/hooks/legend/useLegendProps.d.ts +2 -2
  98. package/esm/next/hooks/legend/useLegendProps.d.ts.map +1 -1
  99. package/esm/next/hooks/legend/useLegendProps.js.map +1 -1
  100. package/esm/next/hooks/legend/{useLegendItems.d.ts → usePushpinLegendItems.d.ts} +3 -3
  101. package/esm/next/hooks/legend/usePushpinLegendItems.d.ts.map +1 -0
  102. package/esm/next/hooks/legend/usePushpinLegendItems.js +33 -0
  103. package/esm/next/hooks/legend/usePushpinLegendItems.js.map +1 -0
  104. package/esm/next/hooks/map/useAreaMapDataSync.d.ts +9 -0
  105. package/esm/next/hooks/map/useAreaMapDataSync.d.ts.map +1 -0
  106. package/esm/next/hooks/map/useAreaMapDataSync.js +71 -0
  107. package/esm/next/hooks/map/useAreaMapDataSync.js.map +1 -0
  108. package/esm/next/hooks/map/useMapDataSync.d.ts +2 -2
  109. package/esm/next/hooks/map/useMapDataSync.d.ts.map +1 -1
  110. package/esm/next/hooks/map/useMapDataSync.js.map +1 -1
  111. package/esm/next/hooks/map/useTooltipHandlers.d.ts +1 -1
  112. package/esm/next/hooks/map/useTooltipHandlers.d.ts.map +1 -1
  113. package/esm/next/hooks/map/useTooltipHandlers.js +3 -3
  114. package/esm/next/hooks/map/useTooltipHandlers.js.map +1 -1
  115. package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts +17 -0
  116. package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts.map +1 -0
  117. package/esm/next/hooks/shared/geoCollectionBoundingBox.js +86 -0
  118. package/esm/next/hooks/shared/geoCollectionBoundingBox.js.map +1 -0
  119. package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts +43 -0
  120. package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts.map +1 -0
  121. package/esm/next/hooks/shared/useAreaCollectionFeatures.js +213 -0
  122. package/esm/next/hooks/shared/useAreaCollectionFeatures.js.map +1 -0
  123. package/esm/next/hooks/shared/useAreaDataTransformation.d.ts +21 -0
  124. package/esm/next/hooks/shared/useAreaDataTransformation.d.ts.map +1 -0
  125. package/esm/next/hooks/shared/useAreaDataTransformation.js +25 -0
  126. package/esm/next/hooks/shared/useAreaDataTransformation.js.map +1 -0
  127. package/esm/next/hooks/shared/useAreaPushData.d.ts +11 -0
  128. package/esm/next/hooks/shared/useAreaPushData.d.ts.map +1 -0
  129. package/esm/next/hooks/shared/useAreaPushData.js +20 -0
  130. package/esm/next/hooks/shared/useAreaPushData.js.map +1 -0
  131. package/esm/next/hooks/shared/useGeoDataTransformation.d.ts +4 -18
  132. package/esm/next/hooks/shared/useGeoDataTransformation.d.ts.map +1 -1
  133. package/esm/next/hooks/shared/useGeoDataTransformation.js +5 -22
  134. package/esm/next/hooks/shared/useGeoDataTransformation.js.map +1 -1
  135. package/esm/next/hooks/shared/useGeoPushData.d.ts +20 -0
  136. package/esm/next/hooks/shared/useGeoPushData.d.ts.map +1 -0
  137. package/esm/next/hooks/shared/useGeoPushData.js +36 -0
  138. package/esm/next/hooks/shared/useGeoPushData.js.map +1 -0
  139. package/esm/next/hooks/shared/usePushData.d.ts.map +1 -1
  140. package/esm/next/hooks/shared/usePushData.js +5 -26
  141. package/esm/next/hooks/shared/usePushData.js.map +1 -1
  142. package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts +23 -0
  143. package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts.map +1 -0
  144. package/esm/next/hooks/shared/usePushpinDataTransformation.js +27 -0
  145. package/esm/next/hooks/shared/usePushpinDataTransformation.js.map +1 -0
  146. package/esm/next/hooks/shared/useResolvedAreaProps.d.ts +16 -0
  147. package/esm/next/hooks/shared/useResolvedAreaProps.d.ts.map +1 -0
  148. package/esm/next/hooks/shared/useResolvedAreaProps.js +36 -0
  149. package/esm/next/hooks/shared/useResolvedAreaProps.js.map +1 -0
  150. package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts +8 -0
  151. package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts.map +1 -0
  152. package/esm/next/hooks/shared/useResolvedPlaceholderValues.js +11 -0
  153. package/esm/next/hooks/shared/useResolvedPlaceholderValues.js.map +1 -0
  154. package/esm/next/hooks/shared/useResolvedProps.d.ts.map +1 -1
  155. package/esm/next/hooks/shared/useResolvedProps.js +3 -3
  156. package/esm/next/hooks/shared/useResolvedProps.js.map +1 -1
  157. package/esm/next/hooks/shared/useSegmentLegendItems.d.ts +17 -0
  158. package/esm/next/hooks/shared/useSegmentLegendItems.d.ts.map +1 -0
  159. package/esm/next/hooks/shared/useSegmentLegendItems.js +33 -0
  160. package/esm/next/hooks/shared/useSegmentLegendItems.js.map +1 -0
  161. package/esm/next/index.d.ts +4 -0
  162. package/esm/next/index.d.ts.map +1 -1
  163. package/esm/next/index.js +1 -0
  164. package/esm/next/index.js.map +1 -1
  165. package/esm/next/providers/maplibre/maplibreDataLayers.d.ts +2 -2
  166. package/esm/next/providers/maplibre/maplibreDataLayers.d.ts.map +1 -1
  167. package/esm/next/providers/maplibre/maplibreDataLayers.js.map +1 -1
  168. package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts +41 -0
  169. package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts.map +1 -0
  170. package/esm/next/providers/maplibre/maplibreDataLayersArea.js +83 -0
  171. package/esm/next/providers/maplibre/maplibreDataLayersArea.js.map +1 -0
  172. package/esm/next/providers/maplibre/maplibreDataSource.d.ts +2 -2
  173. package/esm/next/providers/maplibre/maplibreDataSource.d.ts.map +1 -1
  174. package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts +34 -0
  175. package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts.map +1 -0
  176. package/esm/next/providers/maplibre/maplibreDataSourceArea.js +209 -0
  177. package/esm/next/providers/maplibre/maplibreDataSourceArea.js.map +1 -0
  178. package/esm/next/providers/maplibre/maplibreTooltip.d.ts.map +1 -1
  179. package/esm/next/providers/maplibre/maplibreTooltip.js +20 -4
  180. package/esm/next/providers/maplibre/maplibreTooltip.js.map +1 -1
  181. package/esm/next/types/areaConfig.d.ts +68 -0
  182. package/esm/next/types/areaConfig.d.ts.map +1 -0
  183. package/esm/next/types/areaConfig.js +3 -0
  184. package/esm/next/types/areaConfig.js.map +1 -0
  185. package/esm/next/types/areaInternal.d.ts +13 -0
  186. package/esm/next/types/areaInternal.d.ts.map +1 -0
  187. package/esm/next/types/areaInternal.js +3 -0
  188. package/esm/next/types/areaInternal.js.map +1 -0
  189. package/esm/next/types/areaPublic.d.ts +68 -0
  190. package/esm/next/types/areaPublic.d.ts.map +1 -0
  191. package/esm/next/types/areaPublic.js +3 -0
  192. package/esm/next/types/areaPublic.js.map +1 -0
  193. package/esm/next/types/shared.d.ts +57 -21
  194. package/esm/next/types/shared.d.ts.map +1 -1
  195. package/esm/next/utils/geoCollection.d.ts +40 -0
  196. package/esm/next/utils/geoCollection.d.ts.map +1 -0
  197. package/esm/next/utils/geoCollection.js +102 -0
  198. package/esm/next/utils/geoCollection.js.map +1 -0
  199. package/package.json +10 -9
  200. package/styles/css/main.css +18 -0
  201. package/styles/css/main.css.map +1 -1
  202. package/styles/scss/geo-area-next.scss +24 -0
  203. package/styles/scss/main.scss +1 -0
  204. package/esm/next/features/data/transformation.d.ts +0 -99
  205. package/esm/next/features/data/transformation.d.ts.map +0 -1
  206. package/esm/next/features/data/transformation.js.map +0 -1
  207. package/esm/next/hooks/legend/useLegendItems.d.ts.map +0 -1
  208. package/esm/next/hooks/legend/useLegendItems.js +0 -54
  209. package/esm/next/hooks/legend/useLegendItems.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ // (C) 2025 GoodData Corporation
2
+ import { useSegmentLegendItems } from "../shared/useSegmentLegendItems.js";
3
+ /**
4
+ * Creates legend items from area geo data for segment-based coloring.
5
+ *
6
+ * @remarks
7
+ * This hook creates category legend items when the visualization uses segment-based
8
+ * coloring (attribute-based). Each unique segment value gets a legend item with:
9
+ * - name: Display name of the segment value
10
+ * - uri: URI of the segment value for identification
11
+ * - color: Color from the color strategy
12
+ * - legendIndex: Index for consistent ordering
13
+ * - isVisible: Visibility state (all visible by default)
14
+ *
15
+ * Legend items are used to display the category legend and to filter visible areas
16
+ * by toggling legend items on/off.
17
+ *
18
+ * @param dataView - Data view facade for attribute metadata
19
+ * @param geoData - Transformed area geographic data containing segment information
20
+ * @param colorStrategy - Color strategy to get colors for legend items
21
+ * @returns Array of category legend items, empty if no segments
22
+ *
23
+ * @alpha
24
+ */
25
+ export function useAreaLegendItems(dataView, geoData, colorStrategy) {
26
+ return useSegmentLegendItems({
27
+ type: "area",
28
+ dataView,
29
+ geoData,
30
+ colorStrategy,
31
+ });
32
+ }
33
+ //# sourceMappingURL=useAreaLegendItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAreaLegendItems.js","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useAreaLegendItems.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAMhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,kBAAkB,CAC9B,QAA+B,EAC/B,OAA4B,EAC5B,aAAoC;IAEpC,OAAO,qBAAqB,CAAC;QACzB,IAAI,EAAE,MAAM;QACZ,QAAQ;QACR,OAAO;QACP,aAAa;KAChB,CAAC,CAAC;AACP,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { ContentRect } from "react-measure";
2
2
  import { ILegendDetails } from "@gooddata/sdk-ui-vis-commons";
3
3
  import { IGeoPushpinChartNextConfig } from "../../types/config.js";
4
- import { IGeoData } from "../../types/shared.js";
4
+ import { IGeoCommonData } from "../../types/shared.js";
5
5
  /**
6
6
  * Hook to extract legend details from configuration.
7
7
  *
@@ -23,5 +23,5 @@ import { IGeoData } from "../../types/shared.js";
23
23
  *
24
24
  * @alpha
25
25
  */
26
- export declare function useLegendDetails(config: IGeoPushpinChartNextConfig | undefined, geoData: IGeoData | null, contentRect: ContentRect | undefined): ILegendDetails | null;
26
+ export declare function useLegendDetails(config: IGeoPushpinChartNextConfig | undefined, geoData: IGeoCommonData | null, contentRect: ContentRect | undefined): ILegendDetails | null;
27
27
  //# sourceMappingURL=useLegendDetails.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLegendDetails.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useLegendDetails.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACH,cAAc,EAIjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,0BAA0B,GAAG,SAAS,EAC9C,OAAO,EAAE,QAAQ,GAAG,IAAI,EACxB,WAAW,EAAE,WAAW,GAAG,SAAS,GACrC,cAAc,GAAG,IAAI,CA2BvB"}
1
+ {"version":3,"file":"useLegendDetails.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useLegendDetails.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EACH,cAAc,EAIjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,0BAA0B,GAAG,SAAS,EAC9C,OAAO,EAAE,cAAc,GA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B,OAAO,EAAE,OAAO,EAAE,IAAI;QACtB,WAAW;KACd,CAAC,CAAC;AACP,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { IColorStrategy, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
2
2
  import { IGeoPushpinChartNextConfig } from "../../types/config.js";
3
- import { IGeoData } from "../../types/shared.js";
3
+ import { IPushpinGeoData } from "../../types/shared.js";
4
4
  /**
5
5
  * Props for legend renderer components.
6
6
  *
@@ -10,7 +10,7 @@ export interface ILegendProps {
10
10
  /**
11
11
  * Geographic data for rendering color and size legends
12
12
  */
13
- geoData: IGeoData | null;
13
+ geoData: IPushpinGeoData | null;
14
14
  /**
15
15
  * Category items for rendering category legend
16
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useLegendProps.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useLegendProps.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAE5C;;OAEG;IACH,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC1B,aAAa,EAAE,cAAc,GAAG,IAAI,EACpC,MAAM,EAAE,0BAA0B,GAAG,SAAS,EAC9C,aAAa,EAAE,0BAA0B,EAAE,GAC5C,YAAY,CAmBd"}
1
+ {"version":3,"file":"useLegendProps.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useLegendProps.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAE5C;;OAEG;IACH,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAE3B;;OAEG;IACH,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC1B,aAAa,EAAE,cAAc,GAAG,IAAI,EACpC,MAAM,EAAE,0BAA0B,GAAG,SAAS,EAC9C,aAAa,EAAE,0BAA0B,EAAE,GAC5C,YAAY,CAmBd"}
@@ -1 +1 @@
1
- {"version":3,"file":"useLegendProps.js","sourceRoot":"","sources":["../../../../src/next/hooks/legend/useLegendProps.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAIhC,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAyC7D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAC1B,aAAoC,EACpC,MAA8C,EAC9C,aAA2C;IAE3C,MAAM,EAAE,OAAO,EAAE,GAAG,UA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AAO;YACP,aAAa;YACb,aAAa;YACb,gBAAgB;YAChB,MAAM;YACN,MAAM;SACT,CAAC;IACN,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;AACxD,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { DataViewFacade } from "@gooddata/sdk-ui";
2
2
  import { IColorStrategy, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
3
- import { IGeoData } from "../../types/shared.js";
3
+ import { IPushpinGeoData } from "../../types/shared.js";
4
4
  /**
5
5
  * Creates legend items from geo data for segment-based coloring.
6
6
  *
@@ -23,5 +23,5 @@ import { IGeoData } from "../../types/shared.js";
23
23
  *
24
24
  * @alpha
25
25
  */
26
- export declare function useLegendItems(dataView: DataViewFacade | null, geoData: IGeoData | null, colorStrategy: IColorStrategy | null): IPushpinCategoryLegendItem[];
27
- //# sourceMappingURL=useLegendItems.d.ts.map
26
+ export declare function usePushpinLegendItems(dataView: DataViewFacade | null, geoData: IPushpinGeoData | null, colorStrategy: IColorStrategy | null): IPushpinCategoryLegendItem[];
27
+ //# sourceMappingURL=usePushpinLegendItems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePushpinLegendItems.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/legend/usePushpinLegendItems.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CACjC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,aAAa,EAAE,cAAc,GAAG,IAAI,GACrC,0BAA0B,EAAE,CAO9B"}
@@ -0,0 +1,33 @@
1
+ // (C) 2025 GoodData Corporation
2
+ import { useSegmentLegendItems } from "../shared/useSegmentLegendItems.js";
3
+ /**
4
+ * Creates legend items from geo data for segment-based coloring.
5
+ *
6
+ * @remarks
7
+ * This hook creates category legend items when the visualization uses segment-based
8
+ * coloring (attribute-based). Each unique segment value gets a legend item with:
9
+ * - name: Display name of the segment value
10
+ * - uri: URI of the segment value for identification
11
+ * - color: Color from the color strategy
12
+ * - legendIndex: Index for consistent ordering
13
+ * - isVisible: Visibility state (all visible by default)
14
+ *
15
+ * Legend items are used to display the category legend and to filter visible pushpins
16
+ * by toggling legend items on/off.
17
+ *
18
+ * @param dataView - Data view facade for attribute metadata
19
+ * @param geoData - Transformed geographic data containing segment information
20
+ * @param colorStrategy - Color strategy to get colors for legend items
21
+ * @returns Array of category legend items, empty if no segments
22
+ *
23
+ * @alpha
24
+ */
25
+ export function usePushpinLegendItems(dataView, geoData, colorStrategy) {
26
+ return useSegmentLegendItems({
27
+ type: "pushpin",
28
+ dataView,
29
+ geoData,
30
+ colorStrategy,
31
+ });
32
+ }
33
+ //# sourceMappingURL=usePushpinLegendItems.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePushpinLegendItems.js","sourceRoot":"","sources":["../../../../src/next/hooks/legend/usePushpinLegendItems.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAMhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,qBAAqB,CACjC,QAA+B,EAC/B,OAA+B,EAC/B,aAAoC;IAEpC,OAAO,qBAAqB,CAAC;QACzB,IAAI,EAAE,SAAS;QACf,QAAQ;QACR,OAAO;QACP,aAAa;KAChB,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Map as MapLibreMap } from "maplibre-gl";
2
+ import { DataViewFacade } from "@gooddata/sdk-ui";
3
+ import { IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
4
+ import { IGeoAreaChartConfig } from "../../types/areaConfig.js";
5
+ import { IMapViewport } from "../../types/mapProvider.js";
6
+ import { IAreaGeoData } from "../../types/shared.js";
7
+ import { IAreaCollectionFeatures } from "../shared/useAreaCollectionFeatures.js";
8
+ export declare function useAreaMapDataSync(map: MapLibreMap | null, geoData: IAreaGeoData | null, config: IGeoAreaChartConfig | null, colorStrategy: IColorStrategy | null, isMapReady: boolean, result: DataViewFacade | null, collection: IAreaCollectionFeatures, viewport: Partial<IMapViewport> | null): void;
9
+ //# sourceMappingURL=useAreaMapDataSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAreaMapDataSync.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/map/useAreaMapDataSync.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AA4BjF,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,WAAW,GAAG,IAAI,EACvB,OAAO,EAAE,YAAY,GAAG,IAAI,EAC5B,MAAM,EAAE,mBAAmB,GAAG,IAAI,EAClC,aAAa,EAAE,cAAc,GAAG,IAAI,EACpC,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,cAAc,GAAG,IAAI,EAC7B,UAAU,EAAE,uBAAuB,EACnC,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,GACvC,IAAI,CAmDN"}
@@ -0,0 +1,71 @@
1
+ // (C) 2025 GoodData Corporation
2
+ import { useEffect, useRef } from "react";
3
+ import { updateAreaMapLayers } from "../../features/map/areaLayerManagement.js";
4
+ import { applyViewportSafely } from "../../features/map/viewportManagement.js";
5
+ /**
6
+ * Synchronize area geo data with map layers
7
+ *
8
+ * @remarks
9
+ * This hook updates map layers when area data, config, or color strategy changes.
10
+ * It handles:
11
+ * - Removing old layers
12
+ * - Creating new data source
13
+ * - Adding fill and outline layers
14
+ *
15
+ * The hook waits for the map to be ready before attempting any updates and
16
+ * reapplies viewport bounds from geo collection metadata when available.
17
+ *
18
+ * @param map - MapLibre map instance (null if not initialized)
19
+ * @param geoData - Area geographic data to display (null if not loaded)
20
+ * @param config - Map configuration (null if not ready)
21
+ * @param colorStrategy - Color strategy for styling (null if not ready)
22
+ * @param isMapReady - Whether map is ready for updates
23
+ * @param result - Execution result for data access
24
+ *
25
+ * @internal
26
+ */
27
+ function isViewportFrozen(config) {
28
+ return Boolean(config.viewport?.frozen);
29
+ }
30
+ export function useAreaMapDataSync(map, geoData, config, colorStrategy, isMapReady, result, collection, viewport) {
31
+ // Track first render
32
+ const isFirstRenderRef = useRef(true);
33
+ useEffect(() => {
34
+ if (collection.status === "error" && collection.error) {
35
+ console.warn("[GeoAreaChart] Failed to load geo collection items for area rendering.", collection.error);
36
+ }
37
+ }, [collection.status, collection.error]);
38
+ useEffect(() => {
39
+ // Guard: ensure all dependencies are ready
40
+ if (!map || !isMapReady || !geoData || !config || !colorStrategy || !result) {
41
+ return undefined;
42
+ }
43
+ if (collection.metadata && collection.status === "loading") {
44
+ return undefined;
45
+ }
46
+ // Update layers with new area data
47
+ updateAreaMapLayers(map, geoData, config, colorStrategy, {
48
+ features: collection.status === "success" ? collection.features : undefined,
49
+ });
50
+ let cleanup;
51
+ if (!isFirstRenderRef.current && viewport && !isViewportFrozen(config)) {
52
+ map.resize();
53
+ cleanup = applyViewportSafely(map, viewport);
54
+ }
55
+ // Mark that first render has completed
56
+ isFirstRenderRef.current = false;
57
+ return cleanup;
58
+ }, [
59
+ map,
60
+ geoData,
61
+ config,
62
+ colorStrategy,
63
+ result,
64
+ isMapReady,
65
+ collection.status,
66
+ collection.features,
67
+ collection.metadata,
68
+ viewport,
69
+ ]);
70
+ }
71
+ //# sourceMappingURL=useAreaMapDataSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAreaMapDataSync.js","sourceRoot":"","sources":["../../../../src/next/hooks/map/useAreaMapDataSync.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAO1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAM/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,SAAS,gBAAgB,CAAC,MAA2B;IACjD,OAAO,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAC9B,GAAuB,EACvB,OAA4B,EAC5B,MAAkC,EAClC,aAAoC,EACpC,UAAmB,EACnB,MAA6B,EAC7B,UAAmC,EACnC,QAAsC;IAEtC,qBAAqB;IACrB,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IAEtC,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,UAAU,CAAC,MAAM,KAAK,OAAO,IAAI,UAAU,CAAC,KAAK,EAAE,CAAC;YACpD,OAAO,CAAC,IAAI,CACR,wEAAwE,EACxE,UAAU,CAAC,KAAK,CACnB,CAAC;QACN,CAAC;IACL,CAAC,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAE1C,SAAS,CAAC,GAAG,EAAE;QACX,2CAA2C;QAC3C,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM,EAAE,CAAC;YAC1E,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YACzD,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,mCAAmC;QACnC,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE;YACrD,QAAQ,EAAE,UAAU,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SAC9E,CAAC,CAAC;QAEH,IAAI,OAAiC,CAAC;QAEtC,IAAI,CAAC,gBAAgB,CAAC,OAAO,IAAI,QAAQ,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;YACrE,GAAG,CAAC,MAAM,EAAE,CAAC;YACb,OAAO,GAAG,mBAAmB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACjD,CAAC;QAED,uCAAuC;QACvC,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC;QAEjC,OAAO,OAAO,CAAC;IACnB,CAAC,EAAE;QACC,GAAG;QACH,OAAO;QACP,MAAM;QACN,aAAa;QACb,MAAM;QACN,UAAU;QACV,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;QACnB,QAAQ;KACX,CAAC,CAAC;AACP,CAAC"}
@@ -2,7 +2,7 @@ import type { Map as MapLibreMap } from "maplibre-gl";
2
2
  import { DataViewFacade } from "@gooddata/sdk-ui";
3
3
  import { IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
4
4
  import { IMapConfig } from "../../types/mapProvider.js";
5
- import { IGeoData, IGeoLngLat } from "../../types/shared.js";
5
+ import { IGeoLngLat, IPushpinGeoData } from "../../types/shared.js";
6
6
  /**
7
7
  * Filter out invalid coordinates
8
8
  *
@@ -40,5 +40,5 @@ export declare function getValidLocations(locations: Array<IGeoLngLat | null | u
40
40
  *
41
41
  * @internal
42
42
  */
43
- export declare function useMapDataSync(map: MapLibreMap | null, geoData: IGeoData | null, config: IMapConfig | null, colorStrategy: IColorStrategy | null, isMapReady: boolean, result: DataViewFacade | null): void;
43
+ export declare function useMapDataSync(map: MapLibreMap | null, geoData: IPushpinGeoData | null, config: IMapConfig | null, colorStrategy: IColorStrategy | null, isMapReady: boolean, result: DataViewFacade | null): void;
44
44
  //# sourceMappingURL=useMapDataSync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMapDataSync.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/map/useMapDataSync.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,UAAU,EAAE,CAQ/F;AAkBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAC1B,GAAG,EAAE,WAAW,GAAG,IAAI,EACvB,OAAO,EAAE,QAAQ,GAAG,IAAI,EACxB,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,aAAa,EAAE,cAAc,GAAG,IAAI,EACpC,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,cAAc,GAAG,IAAI,GAC9B,IAAI,CAqCN"}
1
+ {"version":3,"file":"useMapDataSync.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/map/useMapDataSync.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,UAAU,EAAE,CAQ/F;AAkBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAC1B,GAAG,EAAE,WAAW,GAAG,IAAI,EACvB,OAAO,EAAE,eAAe,GAAG,IAAI,EAC/B,MAAM,EAAE,UAAU,GAAG,IAAI,EACzB,aAAa,EAAE,cAAc,GAAG,IAAI,EACpC,UAAU,EAAE,OAAO,EACnB,MAAM,EAAE,cAAc,GAAG,IAAI,GAC9B,IAAI,CAqCN"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMapDataSync.js","sourceRoot":"","sources":["../../../../src/next/hooks/map/useMapDataSync.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAOnD,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,0CAA0C,CAAC;AAIlG;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB,CAAC,SAA+C;IAC7E,OAAO,SAAS,CAAC,MAAM,CACnB,CAAC,MAAM,EAAwB,EAAE,CAC7B,MAAM,KAAK,IAAI;QACf,MAAM,KAAK,SAAS;QACpB,M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C;QAC9C,CAAC;QAED,uCAAuC;QACvC,gBAAgB,CAAC,OAAO,GAAG,KAAK,CAAC;QAEjC,OAAO,SAAS,CAAC;IACrB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC5E,CAAC"}
@@ -18,5 +18,5 @@ import { IMapConfig } from "../../types/mapProvider.js";
18
18
  *
19
19
  * @internal
20
20
  */
21
- export declare function useTooltipHandlers(map: MapLibreMap | null, tooltip: Popup | null, config: IMapConfig | undefined, drillablePredicates: IHeaderPredicate[], intl: IntlShape): void;
21
+ export declare function useTooltipHandlers(map: MapLibreMap | null, tooltip: Popup | null, config: IMapConfig | undefined, drillablePredicates: IHeaderPredicate[], intl: IntlShape, layerId?: string): void;
22
22
  //# sourceMappingURL=useTooltipHandlers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTooltipHandlers.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/map/useTooltipHandlers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,WAAW,GAAG,IAAI,EACvB,OAAO,EAAE,KAAK,GAAG,IAAI,EACrB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,mBAAmB,EAAE,gBAAgB,EAAE,EACvC,IAAI,EAAE,SAAS,GAChB,IAAI,CAQN"}
1
+ {"version":3,"file":"useTooltipHandlers.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/map/useTooltipHandlers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAC9B,GAAG,EAAE,WAAW,GAAG,IAAI,EACvB,OAAO,EAAE,KAAK,GAAG,IAAI,EACrB,MAAM,EAAE,UAAU,GAAG,SAAS,EAC9B,mBAAmB,EAAE,gBAAgB,EAAE,EACvC,IAAI,EAAE,SAAS,EACf,OAAO,CAAC,EAAE,MAAM,GACjB,IAAI,CAQN"}
@@ -17,12 +17,12 @@ import { setupTooltipHandlers } from "../../features/tooltip/tooltipManagement.j
17
17
  *
18
18
  * @internal
19
19
  */
20
- export function useTooltipHandlers(map, tooltip, config, drillablePredicates, intl) {
20
+ export function useTooltipHandlers(map, tooltip, config, drillablePredicates, intl, layerId) {
21
21
  useEffect(() => {
22
22
  if (!map || !tooltip || !config) {
23
23
  return undefined;
24
24
  }
25
- return setupTooltipHandlers(map, tooltip, config, drillablePredicates, intl);
26
- }, [map, tooltip, config, drillablePredicates, intl]);
25
+ return setupTooltipHandlers(map, tooltip, config, drillablePredicates, intl, layerId);
26
+ }, [map, tooltip, config, drillablePredicates, intl, layerId]);
27
27
  }
28
28
  //# sourceMappingURL=useTooltipHandlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTooltipHandlers.js","sourceRoot":"","sources":["../../../../src/next/hooks/map/useTooltipHandlers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGnF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAC9B,GAAuB,EACvB,OAAqB,EACrB,MAA8B,EAC9B,mBAAuC,EACvC,IAAe;IAEf,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAC;IACjF,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC"}
1
+ {"version":3,"file":"useTooltipHandlers.js","sourceRoot":"","sources":["../../../../src/next/hooks/map/useTooltipHandlers.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AAGnF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,kBAAkB,CAC9B,GAAuB,EACvB,OAAqB,EACrB,MAA8B,EAC9B,mBAAuC,EACvC,IAAe,EACf,OAAgB;IAEhB,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { IGeoJsonFeature } from "@gooddata/sdk-model";
2
+ /**
3
+ * Resolves a bounding box for geo collection features.
4
+ *
5
+ * @remarks
6
+ * - Prefers explicit bounding boxes returned by the backend
7
+ * - Falls back to feature-level bbox definitions
8
+ * - Calculates geometry-based bounds when bbox metadata is missing
9
+ *
10
+ * @param features - GeoJSON features returned from the backend
11
+ * @param fallback - Bounding box provided by the backend response
12
+ * @returns Bounding box represented as [minLng, minLat, maxLng, maxLat] or undefined
13
+ *
14
+ * @internal
15
+ */
16
+ export declare function deriveCollectionBoundingBox(features: IGeoJsonFeature[] | undefined, fallback?: number[]): number[] | undefined;
17
+ //# sourceMappingURL=geoCollectionBoundingBox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoCollectionBoundingBox.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/shared/geoCollectionBoundingBox.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAiFtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,2BAA2B,CACvC,QAAQ,EAAE,eAAe,EAAE,GAAG,SAAS,EACvC,QAAQ,CAAC,EAAE,MAAM,EAAE,GACpB,MAAM,EAAE,GAAG,SAAS,CAoBtB"}
@@ -0,0 +1,86 @@
1
+ // (C) 2025 GoodData Corporation
2
+ function normalizeBoundingBox(bbox) {
3
+ if (!bbox || bbox.length < 4) {
4
+ return undefined;
5
+ }
6
+ const [minLng, minLat, maxLng, maxLat] = bbox;
7
+ const values = [minLng, minLat, maxLng, maxLat];
8
+ if (!values.every((value) => Number.isFinite(value))) {
9
+ return undefined;
10
+ }
11
+ return [minLng, minLat, maxLng, maxLat];
12
+ }
13
+ function cloneNormalizedBoundingBox(bbox) {
14
+ return bbox ? [...bbox] : undefined;
15
+ }
16
+ function mergeNormalizedBoundingBoxes(a, b) {
17
+ if (!a) {
18
+ return cloneNormalizedBoundingBox(b);
19
+ }
20
+ if (!b) {
21
+ return cloneNormalizedBoundingBox(a);
22
+ }
23
+ return [Math.min(a[0], b[0]), Math.min(a[1], b[1]), Math.max(a[2], b[2]), Math.max(a[3], b[3])];
24
+ }
25
+ function coordsToBoundingBox(value) {
26
+ if (!Array.isArray(value) || value.length === 0) {
27
+ return undefined;
28
+ }
29
+ const typed = value;
30
+ const looksLikePosition = typed.length >= 2 && typed.every((entry) => typeof entry === "number" && Number.isFinite(entry));
31
+ if (looksLikePosition) {
32
+ const [lng, lat] = typed;
33
+ if (!Number.isFinite(lng) || !Number.isFinite(lat)) {
34
+ return undefined;
35
+ }
36
+ const normalizedLng = lng;
37
+ const normalizedLat = lat;
38
+ return [normalizedLng, normalizedLat, normalizedLng, normalizedLat];
39
+ }
40
+ return typed.reduce((acc, entry) => {
41
+ const child = coordsToBoundingBox(entry);
42
+ return mergeNormalizedBoundingBoxes(acc, child);
43
+ }, undefined);
44
+ }
45
+ function geometryToBoundingBox(geometry) {
46
+ if (!geometry) {
47
+ return undefined;
48
+ }
49
+ if (geometry.type === "GeometryCollection") {
50
+ return geometry.geometries.reduce((acc, child) => {
51
+ const childBbox = geometryToBoundingBox(child);
52
+ return mergeNormalizedBoundingBoxes(acc, childBbox);
53
+ }, undefined);
54
+ }
55
+ return coordsToBoundingBox(geometry.coordinates);
56
+ }
57
+ /**
58
+ * Resolves a bounding box for geo collection features.
59
+ *
60
+ * @remarks
61
+ * - Prefers explicit bounding boxes returned by the backend
62
+ * - Falls back to feature-level bbox definitions
63
+ * - Calculates geometry-based bounds when bbox metadata is missing
64
+ *
65
+ * @param features - GeoJSON features returned from the backend
66
+ * @param fallback - Bounding box provided by the backend response
67
+ * @returns Bounding box represented as [minLng, minLat, maxLng, maxLat] or undefined
68
+ *
69
+ * @internal
70
+ */
71
+ export function deriveCollectionBoundingBox(features, fallback) {
72
+ const initial = normalizeBoundingBox(fallback);
73
+ if (!features || features.length === 0) {
74
+ return cloneNormalizedBoundingBox(initial);
75
+ }
76
+ const resolved = features.reduce((acc, feature) => {
77
+ const featureBbox = normalizeBoundingBox(feature.bbox) ??
78
+ geometryToBoundingBox(feature.geometry);
79
+ if (!featureBbox) {
80
+ return acc;
81
+ }
82
+ return mergeNormalizedBoundingBoxes(acc, featureBbox);
83
+ }, initial);
84
+ return cloneNormalizedBoundingBox(resolved);
85
+ }
86
+ //# sourceMappingURL=geoCollectionBoundingBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoCollectionBoundingBox.js","sourceRoot":"","sources":["../../../../src/next/hooks/shared/geoCollectionBoundingBox.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAMhC,SAAS,oBAAoB,CAAC,IAAe;IACzC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC9C,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAEhD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,MAAgB,EAAE,MAAgB,EAAE,MAAgB,EAAE,MAAgB,CAAC,CAAC;AACpF,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAgC;IAChE,OAAO,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,IAAI,CAAoB,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5D,CAAC;AAED,SAAS,4BAA4B,CAAC,CAAkB,EAAE,CAAkB;IACxE,IAAI,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,0BAA0B,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IA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ED,OAAO,4BAA4B,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAC1D,CAAC,EAAE,OAAO,CAAC,CAAC;IAEZ,OAAO,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
2
+ import { IAttribute, IGeoJsonFeature } from "@gooddata/sdk-model";
3
+ import { DataViewFacade } from "@gooddata/sdk-ui";
4
+ import { IGeoCollectionMetadata } from "../../utils/geoCollection.js";
5
+ type CollectionStatus = "idle" | "loading" | "success" | "error";
6
+ export interface IAreaCollectionFeatures {
7
+ /**
8
+ * Fetch status of the geo collection request.
9
+ */
10
+ status: CollectionStatus;
11
+ /**
12
+ * Loaded geo collection metadata (if any).
13
+ */
14
+ metadata?: IGeoCollectionMetadata;
15
+ /**
16
+ * Resolved GeoJSON features from the backend.
17
+ */
18
+ features?: IGeoJsonFeature[];
19
+ /**
20
+ * Bounding box covering the fetched features.
21
+ */
22
+ bbox?: number[];
23
+ /**
24
+ * Error from the last fetch attempt (if any).
25
+ */
26
+ error?: unknown;
27
+ }
28
+ /**
29
+ * Loads geo collection geometries for the area location attribute.
30
+ *
31
+ * @remarks
32
+ * The hook deduplicates requests using a local cache keyed by the execution fingerprint and collection metadata.
33
+ * If the necessary metadata are missing, the hook stays idle and returns no features.
34
+ *
35
+ * @param dataView - Initial execution data view
36
+ * @param locationAttribute - Attribute used for area locations
37
+ * @returns collection features state
38
+ *
39
+ * @alpha
40
+ */
41
+ export declare function useAreaCollectionFeatures(dataView: DataViewFacade | null, locationAttribute: IAttribute | undefined, backendOrUndefined?: IAnalyticalBackend, workspaceOrUndefined?: string): IAreaCollectionFeatures;
42
+ export {};
43
+ //# sourceMappingURL=useAreaCollectionFeatures.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAreaCollectionFeatures.d.ts","sourceRoot":"","sources":["../../../../src/next/hooks/shared/useAreaCollectionFeatures.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAA0B,MAAM,2BAA2B,CAAC;AACvF,OAAO,EACH,UAAU,EACV,eAAe,EAKlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAA4B,MAAM,kBAAkB,CAAC;AAG5E,OAAO,EAAE,sBAAsB,EAAiC,MAAM,8BAA8B,CAAC;AAwBrG,KAAK,gBAAgB,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAQjE,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB;AAwMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CACrC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,iBAAiB,EAAE,UAAU,GAAG,SAAS,EACzC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,oBAAoB,CAAC,EAAE,MAAM,GAC9B,uBAAuB,CA0DzB"}