@gooddata/sdk-ui-geo 11.6.0-alpha.5 → 11.6.0-alpha.7

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 (231) hide show
  1. package/esm/next/GeoPushpinChartNext.d.ts +12 -0
  2. package/esm/next/GeoPushpinChartNext.d.ts.map +1 -0
  3. package/esm/next/GeoPushpinChartNext.js +42 -0
  4. package/esm/next/GeoPushpinChartNext.js.map +1 -0
  5. package/esm/next/RenderGeoPushpinChart.d.ts +15 -0
  6. package/esm/next/RenderGeoPushpinChart.d.ts.map +1 -0
  7. package/esm/next/RenderGeoPushpinChart.js +97 -0
  8. package/esm/next/RenderGeoPushpinChart.js.map +1 -0
  9. package/esm/next/components/ErrorComponent.d.ts +13 -0
  10. package/esm/next/components/ErrorComponent.d.ts.map +1 -0
  11. package/esm/next/components/ErrorComponent.js +19 -0
  12. package/esm/next/components/ErrorComponent.js.map +1 -0
  13. package/esm/next/components/LoadingComponent.d.ts +5 -0
  14. package/esm/next/components/LoadingComponent.d.ts.map +1 -0
  15. package/esm/next/components/LoadingComponent.js +13 -0
  16. package/esm/next/components/LoadingComponent.js.map +1 -0
  17. package/esm/next/components/legends/Legend.d.ts +28 -0
  18. package/esm/next/components/legends/Legend.d.ts.map +1 -0
  19. package/esm/next/components/legends/Legend.js +54 -0
  20. package/esm/next/components/legends/Legend.js.map +1 -0
  21. package/esm/next/components/legends/LegendBody.d.ts +12 -0
  22. package/esm/next/components/legends/LegendBody.d.ts.map +1 -0
  23. package/esm/next/components/legends/LegendBody.js +30 -0
  24. package/esm/next/components/legends/LegendBody.js.map +1 -0
  25. package/esm/next/components/legends/legendPropsAdapter.d.ts +14 -0
  26. package/esm/next/components/legends/legendPropsAdapter.d.ts.map +1 -0
  27. package/esm/next/components/legends/legendPropsAdapter.js +34 -0
  28. package/esm/next/components/legends/legendPropsAdapter.js.map +1 -0
  29. package/esm/next/components/legends/types.d.ts +16 -0
  30. package/esm/next/components/legends/types.d.ts.map +1 -0
  31. package/esm/next/components/legends/types.js +3 -0
  32. package/esm/next/components/legends/types.js.map +1 -0
  33. package/esm/next/constants/geoChart.d.ts +108 -0
  34. package/esm/next/constants/geoChart.d.ts.map +1 -0
  35. package/esm/next/constants/geoChart.js +130 -0
  36. package/esm/next/constants/geoChart.js.map +1 -0
  37. package/esm/next/constants/internal.d.ts +19 -0
  38. package/esm/next/constants/internal.d.ts.map +1 -0
  39. package/esm/next/constants/internal.js +20 -0
  40. package/esm/next/constants/internal.js.map +1 -0
  41. package/esm/next/context/GeoDataContext.d.ts +69 -0
  42. package/esm/next/context/GeoDataContext.d.ts.map +1 -0
  43. package/esm/next/context/GeoDataContext.js +80 -0
  44. package/esm/next/context/GeoDataContext.js.map +1 -0
  45. package/esm/next/context/GeoLegendContext.d.ts +78 -0
  46. package/esm/next/context/GeoLegendContext.d.ts.map +1 -0
  47. package/esm/next/context/GeoLegendContext.js +74 -0
  48. package/esm/next/context/GeoLegendContext.js.map +1 -0
  49. package/esm/next/context/GeoPushpinPropsContext.d.ts +47 -0
  50. package/esm/next/context/GeoPushpinPropsContext.d.ts.map +1 -0
  51. package/esm/next/context/GeoPushpinPropsContext.js +81 -0
  52. package/esm/next/context/GeoPushpinPropsContext.js.map +1 -0
  53. package/esm/next/context/InitialExecutionContext.d.ts +43 -0
  54. package/esm/next/context/InitialExecutionContext.d.ts.map +1 -0
  55. package/esm/next/context/InitialExecutionContext.js +45 -0
  56. package/esm/next/context/InitialExecutionContext.js.map +1 -0
  57. package/esm/next/context/MapInstanceContext.d.ts +42 -0
  58. package/esm/next/context/MapInstanceContext.d.ts.map +1 -0
  59. package/esm/next/context/MapInstanceContext.js +62 -0
  60. package/esm/next/context/MapInstanceContext.js.map +1 -0
  61. package/esm/next/features/clustering/clustering.d.ts +23 -0
  62. package/esm/next/features/clustering/clustering.d.ts.map +1 -0
  63. package/esm/next/features/clustering/clustering.js +26 -0
  64. package/esm/next/features/clustering/clustering.js.map +1 -0
  65. package/esm/next/features/coloring/colorStrategy.d.ts +22 -0
  66. package/esm/next/features/coloring/colorStrategy.d.ts.map +1 -0
  67. package/esm/next/features/coloring/colorStrategy.js +83 -0
  68. package/esm/next/features/coloring/colorStrategy.js.map +1 -0
  69. package/esm/next/features/coloring/palette.d.ts +81 -0
  70. package/esm/next/features/coloring/palette.d.ts.map +1 -0
  71. package/esm/next/features/coloring/palette.js +233 -0
  72. package/esm/next/features/coloring/palette.js.map +1 -0
  73. package/esm/next/features/data/dataSourceManagement.d.ts +20 -0
  74. package/esm/next/features/data/dataSourceManagement.d.ts.map +1 -0
  75. package/esm/next/features/data/dataSourceManagement.js +30 -0
  76. package/esm/next/features/data/dataSourceManagement.js.map +1 -0
  77. package/esm/next/features/data/transformation.d.ts +99 -0
  78. package/esm/next/features/data/transformation.d.ts.map +1 -0
  79. package/esm/next/features/data/transformation.js +369 -0
  80. package/esm/next/features/data/transformation.js.map +1 -0
  81. package/esm/next/features/map/initializeMap.d.ts +30 -0
  82. package/esm/next/features/map/initializeMap.d.ts.map +1 -0
  83. package/esm/next/features/map/initializeMap.js +58 -0
  84. package/esm/next/features/map/initializeMap.js.map +1 -0
  85. package/esm/next/features/map/layerManagement.d.ts +51 -0
  86. package/esm/next/features/map/layerManagement.d.ts.map +1 -0
  87. package/esm/next/features/map/layerManagement.js +95 -0
  88. package/esm/next/features/map/layerManagement.js.map +1 -0
  89. package/esm/next/features/map/viewportManagement.d.ts +76 -0
  90. package/esm/next/features/map/viewportManagement.d.ts.map +1 -0
  91. package/esm/next/features/map/viewportManagement.js +193 -0
  92. package/esm/next/features/map/viewportManagement.js.map +1 -0
  93. package/esm/next/features/size/calculations.d.ts +32 -0
  94. package/esm/next/features/size/calculations.d.ts.map +1 -0
  95. package/esm/next/features/size/calculations.js +37 -0
  96. package/esm/next/features/size/calculations.js.map +1 -0
  97. package/esm/next/features/tooltip/formatting.d.ts +28 -0
  98. package/esm/next/features/tooltip/formatting.d.ts.map +1 -0
  99. package/esm/next/features/tooltip/formatting.js +51 -0
  100. package/esm/next/features/tooltip/formatting.js.map +1 -0
  101. package/esm/next/features/tooltip/tooltipManagement.d.ts +47 -0
  102. package/esm/next/features/tooltip/tooltipManagement.d.ts.map +1 -0
  103. package/esm/next/features/tooltip/tooltipManagement.js +73 -0
  104. package/esm/next/features/tooltip/tooltipManagement.js.map +1 -0
  105. package/esm/next/hooks/init/useInitExecution.d.ts +29 -0
  106. package/esm/next/hooks/init/useInitExecution.d.ts.map +1 -0
  107. package/esm/next/hooks/init/useInitExecution.js +91 -0
  108. package/esm/next/hooks/init/useInitExecution.js.map +1 -0
  109. package/esm/next/hooks/init/useInitExecutionResult.d.ts +17 -0
  110. package/esm/next/hooks/init/useInitExecutionResult.d.ts.map +1 -0
  111. package/esm/next/hooks/init/useInitExecutionResult.js +44 -0
  112. package/esm/next/hooks/init/useInitExecutionResult.js.map +1 -0
  113. package/esm/next/hooks/legend/useLegendConfig.d.ts +35 -0
  114. package/esm/next/hooks/legend/useLegendConfig.d.ts.map +1 -0
  115. package/esm/next/hooks/legend/useLegendConfig.js +25 -0
  116. package/esm/next/hooks/legend/useLegendConfig.js.map +1 -0
  117. package/esm/next/hooks/legend/useLegendDetails.d.ts +27 -0
  118. package/esm/next/hooks/legend/useLegendDetails.d.ts.map +1 -0
  119. package/esm/next/hooks/legend/useLegendDetails.js +39 -0
  120. package/esm/next/hooks/legend/useLegendDetails.js.map +1 -0
  121. package/esm/next/hooks/legend/useLegendItemClick.d.ts +16 -0
  122. package/esm/next/hooks/legend/useLegendItemClick.d.ts.map +1 -0
  123. package/esm/next/hooks/legend/useLegendItemClick.js +23 -0
  124. package/esm/next/hooks/legend/useLegendItemClick.js.map +1 -0
  125. package/esm/next/hooks/legend/useLegendItems.d.ts +27 -0
  126. package/esm/next/hooks/legend/useLegendItems.d.ts.map +1 -0
  127. package/esm/next/hooks/legend/useLegendItems.js +54 -0
  128. package/esm/next/hooks/legend/useLegendItems.js.map +1 -0
  129. package/esm/next/hooks/legend/useLegendItemsWithState.d.ts +21 -0
  130. package/esm/next/hooks/legend/useLegendItemsWithState.d.ts.map +1 -0
  131. package/esm/next/hooks/legend/useLegendItemsWithState.js +42 -0
  132. package/esm/next/hooks/legend/useLegendItemsWithState.js.map +1 -0
  133. package/esm/next/hooks/legend/useLegendProps.d.ts +53 -0
  134. package/esm/next/hooks/legend/useLegendProps.d.ts.map +1 -0
  135. package/esm/next/hooks/legend/useLegendProps.js +38 -0
  136. package/esm/next/hooks/legend/useLegendProps.js.map +1 -0
  137. package/esm/next/hooks/legend/useSelectedSegments.d.ts +17 -0
  138. package/esm/next/hooks/legend/useSelectedSegments.d.ts.map +1 -0
  139. package/esm/next/hooks/legend/useSelectedSegments.js +32 -0
  140. package/esm/next/hooks/legend/useSelectedSegments.js.map +1 -0
  141. package/esm/next/hooks/map/useAfterRender.d.ts +19 -0
  142. package/esm/next/hooks/map/useAfterRender.d.ts.map +1 -0
  143. package/esm/next/hooks/map/useAfterRender.js +99 -0
  144. package/esm/next/hooks/map/useAfterRender.js.map +1 -0
  145. package/esm/next/hooks/map/useMapCallbacks.d.ts +20 -0
  146. package/esm/next/hooks/map/useMapCallbacks.d.ts.map +1 -0
  147. package/esm/next/hooks/map/useMapCallbacks.js +44 -0
  148. package/esm/next/hooks/map/useMapCallbacks.js.map +1 -0
  149. package/esm/next/hooks/map/useMapDataSync.d.ts +44 -0
  150. package/esm/next/hooks/map/useMapDataSync.d.ts.map +1 -0
  151. package/esm/next/hooks/map/useMapDataSync.js +87 -0
  152. package/esm/next/hooks/map/useMapDataSync.js.map +1 -0
  153. package/esm/next/hooks/map/useMapInitialization.d.ts +56 -0
  154. package/esm/next/hooks/map/useMapInitialization.d.ts.map +1 -0
  155. package/esm/next/hooks/map/useMapInitialization.js +121 -0
  156. package/esm/next/hooks/map/useMapInitialization.js.map +1 -0
  157. package/esm/next/hooks/map/useTooltipHandlers.d.ts +22 -0
  158. package/esm/next/hooks/map/useTooltipHandlers.d.ts.map +1 -0
  159. package/esm/next/hooks/map/useTooltipHandlers.js +28 -0
  160. package/esm/next/hooks/map/useTooltipHandlers.js.map +1 -0
  161. package/esm/next/hooks/shared/useGeoDataTransformation.d.ts +23 -0
  162. package/esm/next/hooks/shared/useGeoDataTransformation.d.ts.map +1 -0
  163. package/esm/next/hooks/shared/useGeoDataTransformation.js +37 -0
  164. package/esm/next/hooks/shared/useGeoDataTransformation.js.map +1 -0
  165. package/esm/next/hooks/shared/usePushData.d.ts +8 -0
  166. package/esm/next/hooks/shared/usePushData.d.ts.map +1 -0
  167. package/esm/next/hooks/shared/usePushData.js +36 -0
  168. package/esm/next/hooks/shared/usePushData.js.map +1 -0
  169. package/esm/next/hooks/shared/useResolvedProps.d.ts +16 -0
  170. package/esm/next/hooks/shared/useResolvedProps.d.ts.map +1 -0
  171. package/esm/next/hooks/shared/useResolvedProps.js +40 -0
  172. package/esm/next/hooks/shared/useResolvedProps.js.map +1 -0
  173. package/esm/next/index.d.ts +5 -0
  174. package/esm/next/index.d.ts.map +1 -0
  175. package/esm/next/index.js +3 -0
  176. package/esm/next/index.js.map +1 -0
  177. package/esm/next/providers/maplibre/maplibreConfig.d.ts +68 -0
  178. package/esm/next/providers/maplibre/maplibreConfig.d.ts.map +1 -0
  179. package/esm/next/providers/maplibre/maplibreConfig.js +104 -0
  180. package/esm/next/providers/maplibre/maplibreConfig.js.map +1 -0
  181. package/esm/next/providers/maplibre/maplibreDataLayers.d.ts +51 -0
  182. package/esm/next/providers/maplibre/maplibreDataLayers.d.ts.map +1 -0
  183. package/esm/next/providers/maplibre/maplibreDataLayers.js +195 -0
  184. package/esm/next/providers/maplibre/maplibreDataLayers.js.map +1 -0
  185. package/esm/next/providers/maplibre/maplibreDataSource.d.ts +28 -0
  186. package/esm/next/providers/maplibre/maplibreDataSource.d.ts.map +1 -0
  187. package/esm/next/providers/maplibre/maplibreDataSource.js +117 -0
  188. package/esm/next/providers/maplibre/maplibreDataSource.js.map +1 -0
  189. package/esm/next/providers/maplibre/maplibreTooltip.d.ts +54 -0
  190. package/esm/next/providers/maplibre/maplibreTooltip.d.ts.map +1 -0
  191. package/esm/next/providers/maplibre/maplibreTooltip.js +158 -0
  192. package/esm/next/providers/maplibre/maplibreTooltip.js.map +1 -0
  193. package/esm/next/providers/maplibre/maplibreViewport.d.ts +45 -0
  194. package/esm/next/providers/maplibre/maplibreViewport.d.ts.map +1 -0
  195. package/esm/next/providers/maplibre/maplibreViewport.js +92 -0
  196. package/esm/next/providers/maplibre/maplibreViewport.js.map +1 -0
  197. package/esm/next/providers/maplibre/style.d.ts +3 -0
  198. package/esm/next/providers/maplibre/style.d.ts.map +1 -0
  199. package/esm/next/providers/maplibre/style.js +8361 -0
  200. package/esm/next/providers/maplibre/style.js.map +1 -0
  201. package/esm/next/types/config.d.ts +89 -0
  202. package/esm/next/types/config.d.ts.map +1 -0
  203. package/esm/next/types/config.js +3 -0
  204. package/esm/next/types/config.js.map +1 -0
  205. package/esm/next/types/internal.d.ts +17 -0
  206. package/esm/next/types/internal.d.ts.map +1 -0
  207. package/esm/next/types/internal.js +3 -0
  208. package/esm/next/types/internal.js.map +1 -0
  209. package/esm/next/types/mapProvider.d.ts +122 -0
  210. package/esm/next/types/mapProvider.d.ts.map +1 -0
  211. package/esm/next/types/mapProvider.js +3 -0
  212. package/esm/next/types/mapProvider.js.map +1 -0
  213. package/esm/next/types/public.d.ts +84 -0
  214. package/esm/next/types/public.d.ts.map +1 -0
  215. package/esm/next/types/public.js +15 -0
  216. package/esm/next/types/public.js.map +1 -0
  217. package/esm/next/types/shared.d.ts +209 -0
  218. package/esm/next/types/shared.d.ts.map +1 -0
  219. package/esm/next/types/shared.js +3 -0
  220. package/esm/next/types/shared.js.map +1 -0
  221. package/esm/next/utils/mapLocale.d.ts +26 -0
  222. package/esm/next/utils/mapLocale.d.ts.map +1 -0
  223. package/esm/next/utils/mapLocale.js +22 -0
  224. package/esm/next/utils/mapLocale.js.map +1 -0
  225. package/package.json +13 -10
  226. package/styles/css/main.css +925 -0
  227. package/styles/css/main.css.map +1 -1
  228. package/styles/scss/_geo-pushpin-next-legend.scss +166 -0
  229. package/styles/scss/_maplibre-overrides.scss +64 -0
  230. package/styles/scss/geo-pushpin-next.scss +58 -0
  231. package/styles/scss/main.scss +1 -0
@@ -0,0 +1,43 @@
1
+ import { ReactNode } from "react";
2
+ import { DataViewFacade } from "@gooddata/sdk-ui";
3
+ /**
4
+ * Initial execution context data
5
+ *
6
+ * @internal
7
+ */
8
+ export interface IInitialExecutionContext {
9
+ /**
10
+ * Initial data view facade for easy data access
11
+ */
12
+ initialDataView: DataViewFacade;
13
+ }
14
+ /**
15
+ * Provider for initial execution context
16
+ *
17
+ * @remarks
18
+ * This context provides access to the initial execution result and data view
19
+ * throughout the component tree. It's created after successful data fetching
20
+ * and before rendering the map visualization.
21
+ *
22
+ * The context value is deeply memoized to prevent unnecessary re-renders.
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function InitialExecutionContextProvider({ initialDataView, children, }: IInitialExecutionContext & {
27
+ children: ReactNode;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ /**
30
+ * Hook to access initial execution context
31
+ *
32
+ * @remarks
33
+ * Returns the initial execution result and data view. These values are
34
+ * available after successful data fetching and remain stable throughout
35
+ * the component lifecycle.
36
+ *
37
+ * @returns Initial execution result and data view
38
+ * @throws Error if used outside InitialExecutionContextProvider
39
+ *
40
+ * @internal
41
+ */
42
+ export declare function useInitialExecution(): IInitialExecutionContext;
43
+ //# sourceMappingURL=InitialExecutionContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitialExecutionContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/InitialExecutionContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACrC;;OAEG;IACH,eAAe,EAAE,cAAc,CAAC;CACnC;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAAC,EAC5C,eAAe,EACf,QAAQ,GACX,EAAE,wBAAwB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAMpD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,IAAI,wBAAwB,CAQ9D"}
@@ -0,0 +1,45 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2025 GoodData Corporation
3
+ import { createContext, useContext } from "react";
4
+ /**
5
+ * Context for providing initial execution result and data view
6
+ *
7
+ * @internal
8
+ */
9
+ const InitialExecutionContext = createContext(undefined);
10
+ /**
11
+ * Provider for initial execution context
12
+ *
13
+ * @remarks
14
+ * This context provides access to the initial execution result and data view
15
+ * throughout the component tree. It's created after successful data fetching
16
+ * and before rendering the map visualization.
17
+ *
18
+ * The context value is deeply memoized to prevent unnecessary re-renders.
19
+ *
20
+ * @internal
21
+ */
22
+ export function InitialExecutionContextProvider({ initialDataView, children, }) {
23
+ return (_jsx(InitialExecutionContext.Provider, { value: { initialDataView }, children: children }));
24
+ }
25
+ /**
26
+ * Hook to access initial execution context
27
+ *
28
+ * @remarks
29
+ * Returns the initial execution result and data view. These values are
30
+ * available after successful data fetching and remain stable throughout
31
+ * the component lifecycle.
32
+ *
33
+ * @returns Initial execution result and data view
34
+ * @throws Error if used outside InitialExecutionContextProvider
35
+ *
36
+ * @internal
37
+ */
38
+ export function useInitialExecution() {
39
+ const context = useContext(InitialExecutionContext);
40
+ if (context === undefined) {
41
+ throw new Error("useInitialExecution must be used within InitialExecutionContextProvider");
42
+ }
43
+ return context;
44
+ }
45
+ //# sourceMappingURL=InitialExecutionContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InitialExecutionContext.js","sourceRoot":"","sources":["../../../src/next/context/InitialExecutionContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAgB7D;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,aAAa,CAAuC,SAAS,CAAC,CAAC;AAE/F;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,+BAA+B,CAAC,EAC5C,eAAe,EACf,QAAQ,GACyC;IACjD,OAAO,CACH,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,eAAe,EAAE,YACvD,QAAQ,GACsB,CACtC,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB;IAC/B,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IAEpD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,yEAAyE,CAAC,CAAC;IAC/F,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { ReactNode } from "react";
2
+ import type { Map as MapLibreMap } from "maplibre-gl";
3
+ /**
4
+ * Provider for map instance context
5
+ *
6
+ * @remarks
7
+ * This context provides access to the MapLibre map instance across
8
+ * the component tree. It's used by hooks and components that need
9
+ * to interact with the map.
10
+ *
11
+ * @internal
12
+ */
13
+ export declare function MapInstanceProvider({ children }: {
14
+ children: ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ /**
17
+ * Hook to access map instance from context
18
+ *
19
+ * @remarks
20
+ * Returns the current MapLibre map instance, or null if not yet initialized.
21
+ * Components using this hook will re-render when the map instance changes.
22
+ *
23
+ * @returns Current map instance or null
24
+ * @throws Error if used outside MapInstanceProvider
25
+ *
26
+ * @internal
27
+ */
28
+ export declare function useMapInstance(): MapLibreMap | null;
29
+ /**
30
+ * Hook to set map instance in context
31
+ *
32
+ * @remarks
33
+ * Returns a function to update the map instance in context.
34
+ * Typically called once during map initialization.
35
+ *
36
+ * @returns Function to set map instance
37
+ * @throws Error if used outside MapInstanceProvider
38
+ *
39
+ * @internal
40
+ */
41
+ export declare function useSetMapInstance(): (map: MapLibreMap | null) => void;
42
+ //# sourceMappingURL=MapInstanceContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapInstanceContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/MapInstanceContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,aAAa,CAAC;AAetD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAIxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAQnD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,IAAI,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAQrE"}
@@ -0,0 +1,62 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2025 GoodData Corporation
3
+ import { createContext, useContext, useState } from "react";
4
+ /**
5
+ * Context for sharing map instance across components
6
+ *
7
+ * @internal
8
+ */
9
+ const MapInstanceContext = createContext(undefined);
10
+ /**
11
+ * Provider for map instance context
12
+ *
13
+ * @remarks
14
+ * This context provides access to the MapLibre map instance across
15
+ * the component tree. It's used by hooks and components that need
16
+ * to interact with the map.
17
+ *
18
+ * @internal
19
+ */
20
+ export function MapInstanceProvider({ children }) {
21
+ const [map, setMap] = useState(null);
22
+ return _jsx(MapInstanceContext.Provider, { value: { map, setMap }, children: children });
23
+ }
24
+ /**
25
+ * Hook to access map instance from context
26
+ *
27
+ * @remarks
28
+ * Returns the current MapLibre map instance, or null if not yet initialized.
29
+ * Components using this hook will re-render when the map instance changes.
30
+ *
31
+ * @returns Current map instance or null
32
+ * @throws Error if used outside MapInstanceProvider
33
+ *
34
+ * @internal
35
+ */
36
+ export function useMapInstance() {
37
+ const context = useContext(MapInstanceContext);
38
+ if (context === undefined) {
39
+ throw new Error("useMapInstance must be used within MapInstanceProvider");
40
+ }
41
+ return context.map;
42
+ }
43
+ /**
44
+ * Hook to set map instance in context
45
+ *
46
+ * @remarks
47
+ * Returns a function to update the map instance in context.
48
+ * Typically called once during map initialization.
49
+ *
50
+ * @returns Function to set map instance
51
+ * @throws Error if used outside MapInstanceProvider
52
+ *
53
+ * @internal
54
+ */
55
+ export function useSetMapInstance() {
56
+ const context = useContext(MapInstanceContext);
57
+ if (context === undefined) {
58
+ throw new Error("useSetMapInstance must be used within MapInstanceProvider");
59
+ }
60
+ return context.setMap;
61
+ }
62
+ //# sourceMappingURL=MapInstanceContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapInstanceContext.js","sourceRoot":"","sources":["../../../src/next/context/MapInstanceContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIvE;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,aAAa,CAMtC,SAAS,CAAC,CAAC;AAEb;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAA2B;IACrE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAqB,IAAI,CAAC,CAAC;IAEzD,OAAO,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,YAAG,QAAQ,GAA+B,CAAC;AACzG,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc;IAC1B,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAE/C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC9E,CAAC;IAED,OAAO,OAAO,CAAC,GAAG,CAAC;AACvB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,iBAAiB;IAC7B,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAE/C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,OAAO,CAAC,MAAM,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { IGeoData } from "../../types/shared.js";
2
+ /**
3
+ * Clustering functionality for GeoPushpinChartNext
4
+ *
5
+ * @internal
6
+ */
7
+ /**
8
+ * Determines if clustering should be enabled based on geo data configuration
9
+ *
10
+ * @remarks
11
+ * Clustering is only allowed when:
12
+ * - groupNearbyPoints is enabled
13
+ * - location data exists
14
+ * - no color, segment, or size measures are present
15
+ *
16
+ * @param geoData - Geo data configuration
17
+ * @param groupNearbyPoints - Whether clustering is enabled in config
18
+ * @returns True if clustering should be enabled
19
+ *
20
+ * @internal
21
+ */
22
+ export declare function isClusteringAllowed(geoData: IGeoData, groupNearbyPoints?: boolean): boolean;
23
+ //# sourceMappingURL=clustering.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clustering.d.ts","sourceRoot":"","sources":["../../../../src/next/features/clustering/clustering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD;;;;GAIG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,QAAQ,EAAE,iBAAiB,UAAO,GAAG,OAAO,CAGxF"}
@@ -0,0 +1,26 @@
1
+ // (C) 2025 GoodData Corporation
2
+ /**
3
+ * Clustering functionality for GeoPushpinChartNext
4
+ *
5
+ * @internal
6
+ */
7
+ /**
8
+ * Determines if clustering should be enabled based on geo data configuration
9
+ *
10
+ * @remarks
11
+ * Clustering is only allowed when:
12
+ * - groupNearbyPoints is enabled
13
+ * - location data exists
14
+ * - no color, segment, or size measures are present
15
+ *
16
+ * @param geoData - Geo data configuration
17
+ * @param groupNearbyPoints - Whether clustering is enabled in config
18
+ * @returns True if clustering should be enabled
19
+ *
20
+ * @internal
21
+ */
22
+ export function isClusteringAllowed(geoData, groupNearbyPoints = true) {
23
+ const { color, location, segment, size } = geoData;
24
+ return Boolean(groupNearbyPoints && location && !(color || segment || size));
25
+ }
26
+ //# sourceMappingURL=clustering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clustering.js","sourceRoot":"","sources":["../../../../src/next/features/clustering/clustering.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAIhC;;;;GAIG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAiB,EAAE,iBAAiB,GAAG,IAAI;IAC3E,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;IACnD,OAAO,OAAO,CAAC,iBAAiB,IAAI,QAAQ,IAAI,CAAC,CAAC,KAAK,IAAI,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC;AACjF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { IColorPalette } from "@gooddata/sdk-model";
2
+ import { DataViewFacade } from "@gooddata/sdk-ui";
3
+ import { IColorMapping, IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
4
+ import { IGeoData } from "../../types/shared.js";
5
+ /**
6
+ * Creates and returns a color strategy for geo chart
7
+ *
8
+ * @remarks
9
+ * The color strategy determines how colors are assigned to pushpins based on:
10
+ * - Segment attribute (if present): Each segment gets a different color
11
+ * - Location attribute (otherwise): All locations use the same color
12
+ *
13
+ * @param colorPalette - Color palette to use
14
+ * @param colorMapping - Custom color mappings
15
+ * @param geoData - Geo data structure
16
+ * @param dv - Data view facade
17
+ * @returns Color strategy instance
18
+ *
19
+ * @internal
20
+ */
21
+ export declare function getColorStrategy(colorPalette: IColorPalette, colorMapping: IColorMapping[], geoData: IGeoData, dv: DataViewFacade): IColorStrategy;
22
+ //# sourceMappingURL=colorStrategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorStrategy.d.ts","sourceRoot":"","sources":["../../../../src/next/features/coloring/colorStrategy.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgC,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,cAAc,EAAoB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAGH,aAAa,EACb,cAAc,EAIjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AA4FjD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,EAAE,EAC7B,OAAO,EAAE,QAAQ,EACjB,EAAE,EAAE,cAAc,GACnB,cAAc,CAiBhB"}
@@ -0,0 +1,83 @@
1
+ // (C) 2025 GoodData Corporation
2
+ import { omit } from "lodash-es";
3
+ import { AttributeColorStrategy, ColorStrategy, getColorFromMapping, isValidMappedColor, } from "@gooddata/sdk-ui-vis-commons";
4
+ import { findGeoAttributesInDimension } from "../data/transformation.js";
5
+ /**
6
+ * Color strategy for GeoPushpinChartNext
7
+ *
8
+ * @remarks
9
+ * Manages color assignment for geo charts based on either location or segment attributes.
10
+ * Extends the base ColorStrategy from vis-commons with geo-specific logic.
11
+ *
12
+ * @internal
13
+ */
14
+ class GeoChartColorStrategy extends ColorStrategy {
15
+ /**
16
+ * Creates color assignment based on geo attributes
17
+ *
18
+ * @remarks
19
+ * - If segment attribute exists, colors are assigned by segment
20
+ * - Otherwise, colors are assigned by location
21
+ */
22
+ createColorAssignment(colorPalette, colorMapping, locationAttribute, segmentByAttribute, dv) {
23
+ // Color follows SegmentBy attribute
24
+ if (segmentByAttribute) {
25
+ return {
26
+ fullColorAssignment: this.getColorStrategyForSegmentBy(colorPalette, colorMapping, segmentByAttribute, dv),
27
+ };
28
+ }
29
+ // Color follows Location attribute
30
+ return {
31
+ fullColorAssignment: [
32
+ this.getColorStrategyForLocation(colorPalette, colorMapping, locationAttribute, dv),
33
+ ],
34
+ };
35
+ }
36
+ /**
37
+ * Creates color strategy for segment-based coloring
38
+ */
39
+ getColorStrategyForSegmentBy(colorPalette, colorMapping, segmentByAttribute, dv) {
40
+ const colorStrategy = new AttributeColorStrategy(colorPalette, colorMapping, null, segmentByAttribute, dv);
41
+ return colorStrategy.getColorAssignment();
42
+ }
43
+ /**
44
+ * Creates color strategy for location-based coloring
45
+ */
46
+ getColorStrategyForLocation(colorPalette, colorMapping, locationAttribute, dv) {
47
+ const mappedColor = getColorFromMapping(locationAttribute, colorMapping, dv);
48
+ const color = mappedColor !== undefined && isValidMappedColor(mappedColor, colorPalette)
49
+ ? mappedColor
50
+ : {
51
+ type: "guid",
52
+ value: colorPalette[0].guid,
53
+ };
54
+ return {
55
+ headerItem: locationAttribute,
56
+ color,
57
+ };
58
+ }
59
+ }
60
+ /**
61
+ * Creates and returns a color strategy for geo chart
62
+ *
63
+ * @remarks
64
+ * The color strategy determines how colors are assigned to pushpins based on:
65
+ * - Segment attribute (if present): Each segment gets a different color
66
+ * - Location attribute (otherwise): All locations use the same color
67
+ *
68
+ * @param colorPalette - Color palette to use
69
+ * @param colorMapping - Custom color mappings
70
+ * @param geoData - Geo data structure
71
+ * @param dv - Data view facade
72
+ * @returns Color strategy instance
73
+ *
74
+ * @internal
75
+ */
76
+ export function getColorStrategy(colorPalette, colorMapping, geoData, dv) {
77
+ const { locationAttribute, segmentByAttribute } = findGeoAttributesInDimension(dv, geoData);
78
+ const locationAttributeHeader = {
79
+ attributeHeader: omit(locationAttribute, "items"),
80
+ };
81
+ return new GeoChartColorStrategy(colorPalette, colorMapping, locationAttributeHeader, segmentByAttribute, dv);
82
+ }
83
+ //# sourceMappingURL=colorStrategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorStrategy.js","sourceRoot":"","sources":["../../../../src/next/features/coloring/colorStrategy.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EACH,sBAAsB,EACtB,aAAa,EAIb,mBAAmB,EACnB,kBAAkB,GACrB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAA6B,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAEpG;;;;;;;;GAQG;AACH,MAAM,qBAAsB,SAAQ,aAAa;IAC7C;;;;;;OAMG;IACO,qBAAqB,CAC3B,YAA2B,EAC3B,YAA6B,EAC7B,iBAAuC,EACvC,kBAA+C,EAC/C,EAAkB;QAElB,oCAAoC;QACpC,IAAI,kBAAkB,EAAE,CAAC;YACrB,OAAO;gBACH,mBAAmB,EAAE,IAAI,CAAC,4BAA4B,CAClD,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,EAAE,CACL;aACJ,CAAC;QACN,CAAC;QAED,mCAAmC;QACnC,OAAO;YACH,mBAAmB,EAAE;gBACjB,IAAI,CAAC,2BAA2B,CAAC,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,EAAE,CAAC;aACtF;SACJ,CAAC;IACN,CAAC;IAED;;OAEG;IACK,4BAA4B,CAChC,YAA2B,EAC3B,YAA6B,EAC7B,kBAAwC,EACxC,EAAkB;QAElB,MAAM,aAAa,GAAmB,IAAI,sBAAsB,CAC5D,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,kBAAkB,EAClB,EAAE,CACL,CAAC;QAEF,OAAO,aAAa,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACK,2BAA2B,CAC/B,YAA2B,EAC3B,YAA6B,EAC7B,iBAAuC,EACvC,EAAkB;QAElB,MAAM,WAAW,GAAG,mBAAmB,CAAC,iBAAiB,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;QAC7E,MAAM,KAAK,GACP,WAAW,KAAK,SAAS,IAAI,kBAAkB,CAAC,WAAW,EAAE,YAAY,CAAC;YACtE,CAAC,CAAC,WAAW;YACb,CAAC,CAAC;gBACI,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;aAC9B,CAAC;QAEZ,OAAO;YACH,UAAU,EAAE,iBAAiB;YAC7B,KAAK;SACR,CAAC;IACN,CAAC;CACJ;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,gBAAgB,CAC5B,YAA2B,EAC3B,YAA6B,EAC7B,OAAiB,EACjB,EAAkB;IAElB,MAAM,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAA8B,4BAA4B,CACrG,EAAE,EACF,OAAO,CACV,CAAC;IAEF,MAAM,uBAAuB,GAAyB;QAClD,eAAe,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC;KACpD,CAAC;IAEF,OAAO,IAAI,qBAAqB,CAC5B,YAAY,EACZ,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,EAAE,CACL,CAAC;AACN,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { IRgbColorValue } from "@gooddata/sdk-model";
2
+ import { IColorLegendItem, IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
3
+ import { IPushpinColor } from "../../types/shared.js";
4
+ /**
5
+ * Generates a color palette from a base color
6
+ *
7
+ * @remarks
8
+ * Creates a gradient palette with lighter shades, useful for color scales
9
+ *
10
+ * @param baseColor - Base color as RGB string or object
11
+ * @param opacity - Opacity value (0-1)
12
+ * @returns Array of color strings from light to dark
13
+ *
14
+ * @internal
15
+ */
16
+ export declare function getColorPalette(baseColor: string | IRgbColorValue, opacity?: number): string[];
17
+ /**
18
+ * Converts RGB color to RGBA with opacity
19
+ *
20
+ * @param color - RGB color string
21
+ * @param opacity - Opacity value (0-1)
22
+ * @returns RGBA color string
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function rgbToRgba(color: string, opacity?: number): string;
27
+ /**
28
+ * Gets the color palette index for a given value
29
+ *
30
+ * @param value - Value to map to palette
31
+ * @param min - Minimum value in range
32
+ * @param max - Maximum value in range
33
+ * @returns Index in the color palette (0 to DEFAULT_PUSHPIN_COLOR_SCALE - 1)
34
+ *
35
+ * @internal
36
+ */
37
+ export declare function getColorIndexInPalette(value: number | null, min: number, max: number): number;
38
+ /**
39
+ * Type for color palette mapping by segment name
40
+ */
41
+ type ColorPaletteMapping = {
42
+ [itemName: string]: string[];
43
+ };
44
+ /**
45
+ * Creates a mapping of segment names to color palettes
46
+ *
47
+ * @param colorStrategy - Color strategy from visualization
48
+ * @returns Map of segment names to color palettes
49
+ *
50
+ * @internal
51
+ */
52
+ export declare function getColorPaletteMapping(colorStrategy: IColorStrategy): ColorPaletteMapping;
53
+ /**
54
+ * Generates pushpin colors based on color and segment values
55
+ *
56
+ * @remarks
57
+ * Determines border and background colors for each pushpin based on:
58
+ * - Color measure values
59
+ * - Segment values
60
+ * - Color strategy
61
+ *
62
+ * @param colorValues - Array of color measure values (can be null)
63
+ * @param segmentValues - Array of segment names
64
+ * @param colorStrategy - Color strategy for palette generation
65
+ * @returns Array of pushpin color configurations
66
+ *
67
+ * @internal
68
+ */
69
+ export declare function getPushpinColors(colorValues: Array<number | null>, segmentValues: string[] | undefined, colorStrategy: IColorStrategy): IPushpinColor[];
70
+ /**
71
+ * Generates legend color data for a color measure
72
+ *
73
+ * @param colorSeries - Array of color values
74
+ * @param colorString - Base color as string
75
+ * @returns Array of color legend items with ranges
76
+ *
77
+ * @internal
78
+ */
79
+ export declare function generateLegendColorData(colorSeries: number[], colorString: string): IColorLegendItem[];
80
+ export {};
81
+ //# sourceMappingURL=palette.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../../src/next/features/coloring/palette.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAkD,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAOhF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAiEtD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,EAAE,OAAO,SAAI,GAAG,MAAM,EAAE,CAOzF;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CAG5D;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAiB7F;AAED;;GAEG;AACH,KAAK,mBAAmB,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,cAAc,GAAG,mBAAmB,CAsBzF;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,WAAW,EAAE,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,EACjC,aAAa,EAAE,MAAM,EAAE,YAAK,EAC5B,aAAa,EAAE,cAAc,GAC9B,aAAa,EAAE,CAwDjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAwBtG"}