@gooddata/sdk-ui-geo 11.6.0-alpha.6 → 11.6.0
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/GeoPushpinChartNext.d.ts +12 -0
- package/esm/next/GeoPushpinChartNext.d.ts.map +1 -0
- package/esm/next/GeoPushpinChartNext.js +42 -0
- package/esm/next/GeoPushpinChartNext.js.map +1 -0
- package/esm/next/RenderGeoPushpinChart.d.ts +15 -0
- package/esm/next/RenderGeoPushpinChart.d.ts.map +1 -0
- package/esm/next/RenderGeoPushpinChart.js +97 -0
- package/esm/next/RenderGeoPushpinChart.js.map +1 -0
- package/esm/next/components/ErrorComponent.d.ts +13 -0
- package/esm/next/components/ErrorComponent.d.ts.map +1 -0
- package/esm/next/components/ErrorComponent.js +19 -0
- package/esm/next/components/ErrorComponent.js.map +1 -0
- package/esm/next/components/LoadingComponent.d.ts +5 -0
- package/esm/next/components/LoadingComponent.d.ts.map +1 -0
- package/esm/next/components/LoadingComponent.js +13 -0
- package/esm/next/components/LoadingComponent.js.map +1 -0
- package/esm/next/components/legends/Legend.d.ts +28 -0
- package/esm/next/components/legends/Legend.d.ts.map +1 -0
- package/esm/next/components/legends/Legend.js +54 -0
- package/esm/next/components/legends/Legend.js.map +1 -0
- package/esm/next/components/legends/LegendBody.d.ts +12 -0
- package/esm/next/components/legends/LegendBody.d.ts.map +1 -0
- package/esm/next/components/legends/LegendBody.js +30 -0
- package/esm/next/components/legends/LegendBody.js.map +1 -0
- package/esm/next/components/legends/legendPropsAdapter.d.ts +14 -0
- package/esm/next/components/legends/legendPropsAdapter.d.ts.map +1 -0
- package/esm/next/components/legends/legendPropsAdapter.js +34 -0
- package/esm/next/components/legends/legendPropsAdapter.js.map +1 -0
- package/esm/next/components/legends/types.d.ts +16 -0
- package/esm/next/components/legends/types.d.ts.map +1 -0
- package/esm/next/components/legends/types.js +3 -0
- package/esm/next/components/legends/types.js.map +1 -0
- package/esm/next/constants/geoChart.d.ts +108 -0
- package/esm/next/constants/geoChart.d.ts.map +1 -0
- package/esm/next/constants/geoChart.js +130 -0
- package/esm/next/constants/geoChart.js.map +1 -0
- package/esm/next/constants/internal.d.ts +19 -0
- package/esm/next/constants/internal.d.ts.map +1 -0
- package/esm/next/constants/internal.js +20 -0
- package/esm/next/constants/internal.js.map +1 -0
- package/esm/next/context/GeoDataContext.d.ts +69 -0
- package/esm/next/context/GeoDataContext.d.ts.map +1 -0
- package/esm/next/context/GeoDataContext.js +80 -0
- package/esm/next/context/GeoDataContext.js.map +1 -0
- package/esm/next/context/GeoLegendContext.d.ts +78 -0
- package/esm/next/context/GeoLegendContext.d.ts.map +1 -0
- package/esm/next/context/GeoLegendContext.js +74 -0
- package/esm/next/context/GeoLegendContext.js.map +1 -0
- package/esm/next/context/GeoPushpinPropsContext.d.ts +47 -0
- package/esm/next/context/GeoPushpinPropsContext.d.ts.map +1 -0
- package/esm/next/context/GeoPushpinPropsContext.js +81 -0
- package/esm/next/context/GeoPushpinPropsContext.js.map +1 -0
- package/esm/next/context/InitialExecutionContext.d.ts +43 -0
- package/esm/next/context/InitialExecutionContext.d.ts.map +1 -0
- package/esm/next/context/InitialExecutionContext.js +45 -0
- package/esm/next/context/InitialExecutionContext.js.map +1 -0
- package/esm/next/context/MapInstanceContext.d.ts +42 -0
- package/esm/next/context/MapInstanceContext.d.ts.map +1 -0
- package/esm/next/context/MapInstanceContext.js +62 -0
- package/esm/next/context/MapInstanceContext.js.map +1 -0
- package/esm/next/features/clustering/clustering.d.ts +23 -0
- package/esm/next/features/clustering/clustering.d.ts.map +1 -0
- package/esm/next/features/clustering/clustering.js +26 -0
- package/esm/next/features/clustering/clustering.js.map +1 -0
- package/esm/next/features/coloring/colorStrategy.d.ts +22 -0
- package/esm/next/features/coloring/colorStrategy.d.ts.map +1 -0
- package/esm/next/features/coloring/colorStrategy.js +83 -0
- package/esm/next/features/coloring/colorStrategy.js.map +1 -0
- package/esm/next/features/coloring/palette.d.ts +81 -0
- package/esm/next/features/coloring/palette.d.ts.map +1 -0
- package/esm/next/features/coloring/palette.js +233 -0
- package/esm/next/features/coloring/palette.js.map +1 -0
- package/esm/next/features/data/dataSourceManagement.d.ts +20 -0
- package/esm/next/features/data/dataSourceManagement.d.ts.map +1 -0
- package/esm/next/features/data/dataSourceManagement.js +30 -0
- package/esm/next/features/data/dataSourceManagement.js.map +1 -0
- package/esm/next/features/data/transformation.d.ts +99 -0
- package/esm/next/features/data/transformation.d.ts.map +1 -0
- package/esm/next/features/data/transformation.js +369 -0
- package/esm/next/features/data/transformation.js.map +1 -0
- package/esm/next/features/map/initializeMap.d.ts +30 -0
- package/esm/next/features/map/initializeMap.d.ts.map +1 -0
- package/esm/next/features/map/initializeMap.js +58 -0
- package/esm/next/features/map/initializeMap.js.map +1 -0
- package/esm/next/features/map/layerManagement.d.ts +51 -0
- package/esm/next/features/map/layerManagement.d.ts.map +1 -0
- package/esm/next/features/map/layerManagement.js +95 -0
- package/esm/next/features/map/layerManagement.js.map +1 -0
- package/esm/next/features/map/viewportManagement.d.ts +76 -0
- package/esm/next/features/map/viewportManagement.d.ts.map +1 -0
- package/esm/next/features/map/viewportManagement.js +193 -0
- package/esm/next/features/map/viewportManagement.js.map +1 -0
- package/esm/next/features/size/calculations.d.ts +32 -0
- package/esm/next/features/size/calculations.d.ts.map +1 -0
- package/esm/next/features/size/calculations.js +37 -0
- package/esm/next/features/size/calculations.js.map +1 -0
- package/esm/next/features/tooltip/formatting.d.ts +28 -0
- package/esm/next/features/tooltip/formatting.d.ts.map +1 -0
- package/esm/next/features/tooltip/formatting.js +51 -0
- package/esm/next/features/tooltip/formatting.js.map +1 -0
- package/esm/next/features/tooltip/tooltipManagement.d.ts +47 -0
- package/esm/next/features/tooltip/tooltipManagement.d.ts.map +1 -0
- package/esm/next/features/tooltip/tooltipManagement.js +73 -0
- package/esm/next/features/tooltip/tooltipManagement.js.map +1 -0
- package/esm/next/hooks/init/useInitExecution.d.ts +29 -0
- package/esm/next/hooks/init/useInitExecution.d.ts.map +1 -0
- package/esm/next/hooks/init/useInitExecution.js +91 -0
- package/esm/next/hooks/init/useInitExecution.js.map +1 -0
- package/esm/next/hooks/init/useInitExecutionResult.d.ts +17 -0
- package/esm/next/hooks/init/useInitExecutionResult.d.ts.map +1 -0
- package/esm/next/hooks/init/useInitExecutionResult.js +44 -0
- package/esm/next/hooks/init/useInitExecutionResult.js.map +1 -0
- package/esm/next/hooks/legend/useLegendConfig.d.ts +35 -0
- package/esm/next/hooks/legend/useLegendConfig.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendConfig.js +25 -0
- package/esm/next/hooks/legend/useLegendConfig.js.map +1 -0
- package/esm/next/hooks/legend/useLegendDetails.d.ts +27 -0
- package/esm/next/hooks/legend/useLegendDetails.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendDetails.js +39 -0
- package/esm/next/hooks/legend/useLegendDetails.js.map +1 -0
- package/esm/next/hooks/legend/useLegendItemClick.d.ts +16 -0
- package/esm/next/hooks/legend/useLegendItemClick.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendItemClick.js +23 -0
- package/esm/next/hooks/legend/useLegendItemClick.js.map +1 -0
- package/esm/next/hooks/legend/useLegendItems.d.ts +27 -0
- package/esm/next/hooks/legend/useLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendItems.js +54 -0
- package/esm/next/hooks/legend/useLegendItems.js.map +1 -0
- package/esm/next/hooks/legend/useLegendItemsWithState.d.ts +21 -0
- package/esm/next/hooks/legend/useLegendItemsWithState.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendItemsWithState.js +42 -0
- package/esm/next/hooks/legend/useLegendItemsWithState.js.map +1 -0
- package/esm/next/hooks/legend/useLegendProps.d.ts +53 -0
- package/esm/next/hooks/legend/useLegendProps.d.ts.map +1 -0
- package/esm/next/hooks/legend/useLegendProps.js +38 -0
- package/esm/next/hooks/legend/useLegendProps.js.map +1 -0
- package/esm/next/hooks/legend/useSelectedSegments.d.ts +17 -0
- package/esm/next/hooks/legend/useSelectedSegments.d.ts.map +1 -0
- package/esm/next/hooks/legend/useSelectedSegments.js +32 -0
- package/esm/next/hooks/legend/useSelectedSegments.js.map +1 -0
- package/esm/next/hooks/map/useAfterRender.d.ts +19 -0
- package/esm/next/hooks/map/useAfterRender.d.ts.map +1 -0
- package/esm/next/hooks/map/useAfterRender.js +99 -0
- package/esm/next/hooks/map/useAfterRender.js.map +1 -0
- package/esm/next/hooks/map/useMapCallbacks.d.ts +20 -0
- package/esm/next/hooks/map/useMapCallbacks.d.ts.map +1 -0
- package/esm/next/hooks/map/useMapCallbacks.js +44 -0
- package/esm/next/hooks/map/useMapCallbacks.js.map +1 -0
- package/esm/next/hooks/map/useMapDataSync.d.ts +44 -0
- package/esm/next/hooks/map/useMapDataSync.d.ts.map +1 -0
- package/esm/next/hooks/map/useMapDataSync.js +87 -0
- package/esm/next/hooks/map/useMapDataSync.js.map +1 -0
- package/esm/next/hooks/map/useMapInitialization.d.ts +56 -0
- package/esm/next/hooks/map/useMapInitialization.d.ts.map +1 -0
- package/esm/next/hooks/map/useMapInitialization.js +121 -0
- package/esm/next/hooks/map/useMapInitialization.js.map +1 -0
- package/esm/next/hooks/map/useTooltipHandlers.d.ts +22 -0
- package/esm/next/hooks/map/useTooltipHandlers.d.ts.map +1 -0
- package/esm/next/hooks/map/useTooltipHandlers.js +28 -0
- package/esm/next/hooks/map/useTooltipHandlers.js.map +1 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts +23 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts.map +1 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.js +37 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.js.map +1 -0
- package/esm/next/hooks/shared/usePushData.d.ts +8 -0
- package/esm/next/hooks/shared/usePushData.d.ts.map +1 -0
- package/esm/next/hooks/shared/usePushData.js +36 -0
- package/esm/next/hooks/shared/usePushData.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedProps.d.ts +16 -0
- package/esm/next/hooks/shared/useResolvedProps.d.ts.map +1 -0
- package/esm/next/hooks/shared/useResolvedProps.js +40 -0
- package/esm/next/hooks/shared/useResolvedProps.js.map +1 -0
- package/esm/next/index.d.ts +5 -0
- package/esm/next/index.d.ts.map +1 -0
- package/esm/next/index.js +3 -0
- package/esm/next/index.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreConfig.d.ts +68 -0
- package/esm/next/providers/maplibre/maplibreConfig.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreConfig.js +104 -0
- package/esm/next/providers/maplibre/maplibreConfig.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts +51 -0
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataLayers.js +195 -0
- package/esm/next/providers/maplibre/maplibreDataLayers.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts +28 -0
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSource.js +117 -0
- package/esm/next/providers/maplibre/maplibreDataSource.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreTooltip.d.ts +54 -0
- package/esm/next/providers/maplibre/maplibreTooltip.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreTooltip.js +158 -0
- package/esm/next/providers/maplibre/maplibreTooltip.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreViewport.d.ts +45 -0
- package/esm/next/providers/maplibre/maplibreViewport.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreViewport.js +92 -0
- package/esm/next/providers/maplibre/maplibreViewport.js.map +1 -0
- package/esm/next/providers/maplibre/style.d.ts +3 -0
- package/esm/next/providers/maplibre/style.d.ts.map +1 -0
- package/esm/next/providers/maplibre/style.js +8361 -0
- package/esm/next/providers/maplibre/style.js.map +1 -0
- package/esm/next/types/config.d.ts +89 -0
- package/esm/next/types/config.d.ts.map +1 -0
- package/esm/next/types/config.js +3 -0
- package/esm/next/types/config.js.map +1 -0
- package/esm/next/types/internal.d.ts +17 -0
- package/esm/next/types/internal.d.ts.map +1 -0
- package/esm/next/types/internal.js +3 -0
- package/esm/next/types/internal.js.map +1 -0
- package/esm/next/types/mapProvider.d.ts +122 -0
- package/esm/next/types/mapProvider.d.ts.map +1 -0
- package/esm/next/types/mapProvider.js +3 -0
- package/esm/next/types/mapProvider.js.map +1 -0
- package/esm/next/types/public.d.ts +84 -0
- package/esm/next/types/public.d.ts.map +1 -0
- package/esm/next/types/public.js +15 -0
- package/esm/next/types/public.js.map +1 -0
- package/esm/next/types/shared.d.ts +209 -0
- package/esm/next/types/shared.d.ts.map +1 -0
- package/esm/next/types/shared.js +3 -0
- package/esm/next/types/shared.js.map +1 -0
- package/esm/next/utils/mapLocale.d.ts +26 -0
- package/esm/next/utils/mapLocale.d.ts.map +1 -0
- package/esm/next/utils/mapLocale.js +22 -0
- package/esm/next/utils/mapLocale.js.map +1 -0
- package/package.json +13 -10
- package/styles/css/main.css +925 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/_geo-pushpin-next-legend.scss +166 -0
- package/styles/scss/_maplibre-overrides.scss +64 -0
- package/styles/scss/geo-pushpin-next.scss +58 -0
- package/styles/scss/main.scss +1 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ICoreGeoPushpinChartNextProps } from "./types/internal.js";
|
|
3
|
+
import { IGeoPushpinChartNextProps } from "./types/public.js";
|
|
4
|
+
/**
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export declare function GeoPushpinChartNext(props: IGeoPushpinChartNextProps): ReactElement;
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function GeoPushpinChartNextImplementation(props: ICoreGeoPushpinChartNextProps): ReactElement;
|
|
12
|
+
//# sourceMappingURL=GeoPushpinChartNext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoPushpinChartNext.d.ts","sourceRoot":"","sources":["../../src/next/GeoPushpinChartNext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAgBrC,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,yBAAyB,GAAG,YAAY,CAIlF;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,6BAA6B,GAAG,YAAY,CAYpG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IntlWrapper } from "@gooddata/sdk-ui";
|
|
3
|
+
import { ThemeContextProvider } from "@gooddata/sdk-ui-theme-provider";
|
|
4
|
+
import { ErrorComponent } from "./components/ErrorComponent.js";
|
|
5
|
+
import { LoadingComponent } from "./components/LoadingComponent.js";
|
|
6
|
+
import { GeoDataProvider } from "./context/GeoDataContext.js";
|
|
7
|
+
import { GeoLegendProvider } from "./context/GeoLegendContext.js";
|
|
8
|
+
import { GeoPushpinPropsProvider } from "./context/GeoPushpinPropsContext.js";
|
|
9
|
+
import { InitialExecutionContextProvider } from "./context/InitialExecutionContext.js";
|
|
10
|
+
import { MapInstanceProvider } from "./context/MapInstanceContext.js";
|
|
11
|
+
import { useInitExecution } from "./hooks/init/useInitExecution.js";
|
|
12
|
+
import { useInitExecutionResult } from "./hooks/init/useInitExecutionResult.js";
|
|
13
|
+
import { useResolvedProps } from "./hooks/shared/useResolvedProps.js";
|
|
14
|
+
import { RenderGeoPushpinChart } from "./RenderGeoPushpinChart.js";
|
|
15
|
+
/**
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export function GeoPushpinChartNext(props) {
|
|
19
|
+
const resolvedProps = useResolvedProps(props);
|
|
20
|
+
const execution = useInitExecution(resolvedProps);
|
|
21
|
+
return _jsx(GeoPushpinChartNextImplementation, { ...resolvedProps, execution: execution });
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export function GeoPushpinChartNextImplementation(props) {
|
|
27
|
+
return (_jsx(IntlWrapper, { locale: props.locale, children: _jsx(ThemeContextProvider, { theme: props.theme || {}, themeIsLoading: false, children: _jsx(GeoPushpinPropsProvider, { ...props, children: _jsx(MapInstanceProvider, { children: _jsx(GeoPushpinChartNextWithInitialization, {}) }) }) }) }));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
function GeoPushpinChartNextWithInitialization() {
|
|
33
|
+
const { result: dataView, status, error } = useInitExecutionResult();
|
|
34
|
+
if (status === "error") {
|
|
35
|
+
return _jsx(ErrorComponent, { error: error });
|
|
36
|
+
}
|
|
37
|
+
if (status === "pending" || status === "loading") {
|
|
38
|
+
return _jsx(LoadingComponent, {});
|
|
39
|
+
}
|
|
40
|
+
return (_jsx(InitialExecutionContextProvider, { initialDataView: dataView, children: _jsx(GeoDataProvider, { children: _jsx(GeoLegendProvider, { children: _jsx(RenderGeoPushpinChart, {}) }) }) }));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=GeoPushpinChartNext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoPushpinChartNext.js","sourceRoot":"","sources":["../../src/next/GeoPushpinChartNext.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC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,CAAC;QACrB,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,CAAC;IAC5C,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC/C,OAAO,KAAC,gBAAgB,KAAG,CAAC;IAChC,CAAC;IAED,OAAO,CACH,KAAC,+BAA+B,IAAC,eAAe,EAAE,QAAQ,YACtD,KAAC,eAAe,cACZ,KAAC,iBAAiB,cACd,KAAC,qBAAqB,KAAG,GACT,GACN,GACY,CACrC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Rendering layer - displays the map
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* This is the final rendering layer that:
|
|
7
|
+
* - Creates the map container
|
|
8
|
+
* - Initializes the map
|
|
9
|
+
* - Syncs data to the map
|
|
10
|
+
* - Handles map interactions
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare function RenderGeoPushpinChart(): ReactElement;
|
|
15
|
+
//# sourceMappingURL=RenderGeoPushpinChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderGeoPushpinChart.d.ts","sourceRoot":"","sources":["../../src/next/RenderGeoPushpinChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAA6B,MAAM,OAAO,CAAC;AA4BhE;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,IAAI,YAAY,CA8GpD"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { useMemo, useRef, useState } from "react";
|
|
4
|
+
import { defaultImport } from "default-import";
|
|
5
|
+
import { useIntl } from "react-intl";
|
|
6
|
+
import ReactMeasure from "react-measure";
|
|
7
|
+
import { convertDrillableItemsToPredicates } from "@gooddata/sdk-ui";
|
|
8
|
+
import { Legend } from "./components/legends/Legend.js";
|
|
9
|
+
import { useGeoData } from "./context/GeoDataContext.js";
|
|
10
|
+
import { useGeoPushpinProps } from "./context/GeoPushpinPropsContext.js";
|
|
11
|
+
import { useInitialExecution } from "./context/InitialExecutionContext.js";
|
|
12
|
+
import { calculateViewport } from "./features/map/viewportManagement.js";
|
|
13
|
+
import { useLegendConfig } from "./hooks/legend/useLegendConfig.js";
|
|
14
|
+
import { useLegendItemsWithState } from "./hooks/legend/useLegendItemsWithState.js";
|
|
15
|
+
import { useSelectedSegments } from "./hooks/legend/useSelectedSegments.js";
|
|
16
|
+
import { useAfterRender } from "./hooks/map/useAfterRender.js";
|
|
17
|
+
import { useMapCallbacks } from "./hooks/map/useMapCallbacks.js";
|
|
18
|
+
import { getValidLocations, useMapDataSync } from "./hooks/map/useMapDataSync.js";
|
|
19
|
+
import { useMapInitialization } from "./hooks/map/useMapInitialization.js";
|
|
20
|
+
import { useTooltipHandlers } from "./hooks/map/useTooltipHandlers.js";
|
|
21
|
+
import { usePushData } from "./hooks/shared/usePushData.js";
|
|
22
|
+
// There are known compatibility issues between CommonJS (CJS) and ECMAScript modules (ESM).
|
|
23
|
+
// In ESM, default exports of CJS modules are wrapped in default properties instead of being exposed directly.
|
|
24
|
+
// https://github.com/microsoft/TypeScript/issues/52086#issuecomment-1385978414
|
|
25
|
+
const Measure = defaultImport(ReactMeasure);
|
|
26
|
+
/**
|
|
27
|
+
* Rendering layer - displays the map
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This is the final rendering layer that:
|
|
31
|
+
* - Creates the map container
|
|
32
|
+
* - Initializes the map
|
|
33
|
+
* - Syncs data to the map
|
|
34
|
+
* - Handles map interactions
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export function RenderGeoPushpinChart() {
|
|
39
|
+
const intl = useIntl();
|
|
40
|
+
const props = useGeoPushpinProps();
|
|
41
|
+
const { initialDataView } = useInitialExecution();
|
|
42
|
+
const mapContainerRef = useRef(null);
|
|
43
|
+
// Track chart container dimensions for legend responsive behavior
|
|
44
|
+
const [chartContainerRect, setChartContainerRect] = useState(null);
|
|
45
|
+
// Get all computed data from context (no transformations needed here)
|
|
46
|
+
const { geoData, colorStrategy, baseLegendItems, colorPalette } = useGeoData();
|
|
47
|
+
// Calculate initial viewport from data (before map initialization)
|
|
48
|
+
// This prevents the "world view -> zoom to data" transition
|
|
49
|
+
const initialViewport = useMemo(() => {
|
|
50
|
+
if (!geoData?.location?.data || !props.config) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const validLocations = getValidLocations(geoData.location.data);
|
|
54
|
+
if (validLocations.length === 0) {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return calculateViewport(validLocations, props.config);
|
|
58
|
+
}, [geoData?.location?.data, props.config]);
|
|
59
|
+
// Initialize map with pre-calculated viewport
|
|
60
|
+
const { map, tooltip, isMapReady } = useMapInitialization(mapContainerRef, intl, props.config, initialViewport);
|
|
61
|
+
// Merge base items with visibility state from context
|
|
62
|
+
const legendItems = useLegendItemsWithState(baseLegendItems);
|
|
63
|
+
// Get selected segments for filtering (use items with state)
|
|
64
|
+
const selectedSegmentItems = useSelectedSegments(legendItems);
|
|
65
|
+
// Create config with selected segments for filtering
|
|
66
|
+
const configWithSegments = useMemo(() => ({
|
|
67
|
+
...props.config,
|
|
68
|
+
selectedSegmentItems,
|
|
69
|
+
}), [props.config, selectedSegmentItems]);
|
|
70
|
+
// Sync data to map
|
|
71
|
+
useMapDataSync(map, geoData, configWithSegments, colorStrategy, isMapReady, initialDataView);
|
|
72
|
+
// Set up map interaction callbacks
|
|
73
|
+
useMapCallbacks(map, {
|
|
74
|
+
onCenterPositionChanged: props.onCenterPositionChanged,
|
|
75
|
+
onZoomChanged: props.onZoomChanged,
|
|
76
|
+
});
|
|
77
|
+
const drillablePredicates = useMemo(() => convertDrillableItemsToPredicates(props.drillableItems ?? []), [props.drillableItems]);
|
|
78
|
+
// Set up tooltip handlers
|
|
79
|
+
useTooltipHandlers(map, tooltip, props.config, drillablePredicates, intl);
|
|
80
|
+
// Call afterRender and onLoadingChanged when map finishes rendering
|
|
81
|
+
useAfterRender(map, props.afterRender, props.execution);
|
|
82
|
+
// Push data to analytical designer for configuration panel
|
|
83
|
+
usePushData(colorStrategy, colorPalette);
|
|
84
|
+
// Get legend configuration
|
|
85
|
+
const legendConfig = useLegendConfig(props.config);
|
|
86
|
+
const { position } = legendConfig;
|
|
87
|
+
// Determine if legend should be rendered first (top or left position)
|
|
88
|
+
const isLegendRenderedFirst = position === "top" || position === "left";
|
|
89
|
+
// Container class based on legend position
|
|
90
|
+
// Include gd-geo-component for legacy legend CSS support
|
|
91
|
+
const isRow = position === "left" || position === "right";
|
|
92
|
+
const flexDirection = isRow ? "flex-direction-row" : "flex-direction-column";
|
|
93
|
+
const containerClass = `gd-geo-pushpin-next__container gd-geo-component ${flexDirection} ${isRow ? "gd-geo-pushpin-next__container--flex-row" : "gd-geo-pushpin-next__container--flex-column"}`;
|
|
94
|
+
const legendComponent = (_jsx(Legend, { colorStrategy: colorStrategy, config: props.config, categoryItems: legendItems, containerId: "geo-pushpin-chart-next", chartContainerRect: chartContainerRect ?? undefined }));
|
|
95
|
+
return (_jsx(Measure, { client: true, onResize: setChartContainerRect, children: ({ measureRef }) => (_jsxs("div", { id: "geo-pushpin-chart-next", "data-testid": "geo-pushpin-chart-next", className: containerClass, ref: measureRef, children: [isLegendRenderedFirst ? legendComponent : null, _jsx("div", { ref: mapContainerRef, className: "gd-geo-pushpin-next__map" }), isLegendRenderedFirst ? null : legendComponent] })) }));
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=RenderGeoPushpinChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RenderGeoPushpinChart.js","sourceRoot":"","sources":["../../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M,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,uBAAuB,CAAC;IAC7E,MAAM,cAAc,GAAG,mDAAmD,aAAa,IAAI,KAAK,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC,CAAC,6CAA6C,EAAE,CAAC;IAEhM,MAAM,eAAe,GAAG,CACpB,KAAC,MAAM,IACH,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,aAAa,EAAE,WAAW,EAC1B,WAAW,EAAC,wBAAwB,EACpC,kBAAkB,EAAE,kBAAkB,IAAI,SAAS,GACrD,CACL,CAAC;IAEF,OAAO,CACH,KAAC,OAAO,IAAC,MAAM,QAAC,QAAQ,EAAE,qBAAqB,YAC1C,CAAC,EAAE,UAAU,EAA0B,EAAE,EAAE,CAAC,CACzC,eACI,EAAE,EAAC,wBAAwB,iBACf,wBAAwB,EACpC,SAAS,EAAE,cAAc,EACzB,GAAG,EAAE,UAAU,aAEd,qBAAqB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,EAC/C,cAAK,GAAG,EAAE,eAAe,EAAE,SAAS,EAAC,0BAA0B,GAAG,EACjE,qBAAqB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,IAC7C,CACT,GACK,CACb,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GoodDataSdkError } from "@gooddata/sdk-ui";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
interface IErrorComponentProps {
|
|
6
|
+
error: GoodDataSdkError;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function ErrorComponent({ error }: IErrorComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ErrorComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorComponent.d.ts","sourceRoot":"","sources":["../../../src/next/components/ErrorComponent.tsx"],"names":[],"mappings":"AAIA,OAAO,EAGH,gBAAgB,EAEnB,MAAM,kBAAkB,CAAC;AAM1B;;GAEG;AACH,UAAU,oBAAoB;IAC1B,KAAK,EAAE,gBAAgB,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CAW7D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { useIntl } from "react-intl";
|
|
4
|
+
import { ErrorComponent as DefaultErrorComponent, ErrorCodes, newErrorMapping, } from "@gooddata/sdk-ui";
|
|
5
|
+
import { useGeoPushpinProps } from "../context/GeoPushpinPropsContext.js";
|
|
6
|
+
const UNKNOWN_ERROR_CODE = ErrorCodes.UNKNOWN_ERROR;
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export function ErrorComponent({ error }) {
|
|
11
|
+
const intl = useIntl();
|
|
12
|
+
const errorMap = newErrorMapping(intl);
|
|
13
|
+
const { ErrorComponent } = useGeoPushpinProps();
|
|
14
|
+
const Error = ErrorComponent ?? DefaultErrorComponent;
|
|
15
|
+
const code = error.getErrorCode?.() ?? UNKNOWN_ERROR_CODE;
|
|
16
|
+
const errorProps = errorMap[code] ?? errorMap[UNKNOWN_ERROR_CODE];
|
|
17
|
+
return _jsx(Error, { code: code, ...errorProps });
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ErrorComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorComponent.js","sourceRoot":"","sources":["../../../src/next/components/ErrorComponent.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EACH,cAAc,IAAI,qBAAqB,EACvC,UAAU,EAEV,eAAe,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E,MAAM,kBAAkB,GAAG,UAAU,CAAC,aAAa,CAAC;AASpD;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAwB;IAC1D,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEvC,MAAM,EAAE,cAAc,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAChD,MAAM,KAAK,GAAG,cAAc,IAAI,qBAAqB,CAAC;IAEtD,MAAM,IAAI,GAAG,KAAK,CAAC,YAAY,EAAE,EAAE,IAAI,kBAAkB,CAAC;IAC1D,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAElE,OAAO,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,KAAM,UAAU,GAAI,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingComponent.d.ts","sourceRoot":"","sources":["../../../src/next/components/LoadingComponent.tsx"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,gBAAgB,4CAK/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { LoadingComponent as DefaultLoadingComponent } from "@gooddata/sdk-ui";
|
|
4
|
+
import { useGeoPushpinProps } from "../context/GeoPushpinPropsContext.js";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export function LoadingComponent() {
|
|
9
|
+
const { LoadingComponent } = useGeoPushpinProps();
|
|
10
|
+
const Loading = LoadingComponent ?? DefaultLoadingComponent;
|
|
11
|
+
return _jsx(Loading, {});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=LoadingComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingComponent.js","sourceRoot":"","sources":["../../../src/next/components/LoadingComponent.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAE,gBAAgB,IAAI,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE1E;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,EAAE,gBAAgB,EAAE,GAAG,kBAAkB,EAAE,CAAC;IAClD,MAAM,OAAO,GAAG,gBAAgB,IAAI,uBAAuB,CAAC;IAE5D,OAAO,KAAC,OAAO,KAAG,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ContentRect } from "react-measure";
|
|
3
|
+
import { IColorStrategy, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
+
import { IGeoPushpinChartNextConfig } from "../../types/config.js";
|
|
5
|
+
/**
|
|
6
|
+
* Props for Legend component.
|
|
7
|
+
*
|
|
8
|
+
* @alpha
|
|
9
|
+
*/
|
|
10
|
+
export interface ILegendProps {
|
|
11
|
+
colorStrategy: IColorStrategy | null;
|
|
12
|
+
config: IGeoPushpinChartNextConfig | undefined;
|
|
13
|
+
categoryItems: IPushpinCategoryLegendItem[];
|
|
14
|
+
containerId: string;
|
|
15
|
+
chartContainerRect?: ContentRect;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Orchestrates legend rendering by preparing props and delegating to the proven
|
|
19
|
+
* GeoChartLegendRenderer implementation (via LegendBody adapter).
|
|
20
|
+
*
|
|
21
|
+
* This component bridges the new chart's context-based architecture with the
|
|
22
|
+
* old legend implementation, ensuring consistent and reliable legend behavior.
|
|
23
|
+
*
|
|
24
|
+
* Note: The old GeoChartLegendRenderer handles its own measurement and container
|
|
25
|
+
* styling, so we don't need LegendLayout wrapper here.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Legend({ colorStrategy, config, categoryItems, containerId, chartContainerRect, }: ILegendProps): ReactElement | null;
|
|
28
|
+
//# sourceMappingURL=Legend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Legend.d.ts","sourceRoot":"","sources":["../../../../src/next/components/legends/Legend.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAW,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAQ1F,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IACzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,MAAM,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAC/C,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,WAAW,CAAC;CACpC;AAED;;;;;;;;;GASG;AACH,wBAAgB,MAAM,CAAC,EACnB,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,EACX,kBAAkB,GACrB,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CA0CpC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { LegendBody } from "./LegendBody.js";
|
|
5
|
+
import { useGeoData } from "../../context/GeoDataContext.js";
|
|
6
|
+
import { useLegendConfig } from "../../hooks/legend/useLegendConfig.js";
|
|
7
|
+
import { useLegendDetails } from "../../hooks/legend/useLegendDetails.js";
|
|
8
|
+
import { useLegendItemClick } from "../../hooks/legend/useLegendItemClick.js";
|
|
9
|
+
/**
|
|
10
|
+
* Orchestrates legend rendering by preparing props and delegating to the proven
|
|
11
|
+
* GeoChartLegendRenderer implementation (via LegendBody adapter).
|
|
12
|
+
*
|
|
13
|
+
* This component bridges the new chart's context-based architecture with the
|
|
14
|
+
* old legend implementation, ensuring consistent and reliable legend behavior.
|
|
15
|
+
*
|
|
16
|
+
* Note: The old GeoChartLegendRenderer handles its own measurement and container
|
|
17
|
+
* styling, so we don't need LegendLayout wrapper here.
|
|
18
|
+
*/
|
|
19
|
+
export function Legend({ colorStrategy, config, categoryItems, containerId, chartContainerRect, }) {
|
|
20
|
+
const legendConfig = useLegendConfig(config);
|
|
21
|
+
const { geoData, availableLegends } = useGeoData();
|
|
22
|
+
const colorLegendValue = colorStrategy?.getColorByIndex(0) ?? null;
|
|
23
|
+
const categoryItemUris = useMemo(() => categoryItems.map((item) => item.uri), [categoryItems]);
|
|
24
|
+
const handleCategoryLegendItemClick = useLegendItemClick(categoryItemUris);
|
|
25
|
+
// Use chart container dimensions for responsive legend behavior (popup mode detection)
|
|
26
|
+
const legendDetails = useLegendDetails(config, geoData, chartContainerRect);
|
|
27
|
+
// Check if legend should be shown at all
|
|
28
|
+
const { hasCategoryLegend, hasColorLegend, hasSizeLegend } = availableLegends;
|
|
29
|
+
const hasAnyLegend = hasCategoryLegend || hasColorLegend || hasSizeLegend;
|
|
30
|
+
if (!legendConfig.enabled || !hasAnyLegend) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
// The old renderer uses chartContainerRect dimensions directly
|
|
34
|
+
const legendWidth = chartContainerRect?.client?.width ?? 800;
|
|
35
|
+
const legendHeight = chartContainerRect?.client?.height ?? 400;
|
|
36
|
+
// Fluid layout is ONLY used when responsive === true (not for "autoPositionWithPopup")
|
|
37
|
+
// This matches the old implementation's isFluidLegend logic
|
|
38
|
+
const isFluidLayout = legendConfig.responsive === true;
|
|
39
|
+
const legendBodyProps = {
|
|
40
|
+
containerId,
|
|
41
|
+
legendDetails,
|
|
42
|
+
categoryItems,
|
|
43
|
+
geoData,
|
|
44
|
+
availableLegends,
|
|
45
|
+
colorLegendValue,
|
|
46
|
+
legendWidth,
|
|
47
|
+
legendHeight,
|
|
48
|
+
isFluidLayout,
|
|
49
|
+
responsive: legendConfig.responsive,
|
|
50
|
+
onCategoryItemClick: handleCategoryLegendItemClick,
|
|
51
|
+
};
|
|
52
|
+
return _jsx(LegendBody, { ...legendBodyProps });
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=Legend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../../src/next/components/legends/Legend.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAgB,OAAO,EAAE,MAAM,OAAO,CAAC;AAM9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAgB9E;;;;;;;;;GASG;AACH,MAAM,UAAU,MAAM,CAAC,EACnB,aAAa,EACb,MAAM,EACN,aAAa,EACb,WAAW,EACX,kBAAkB,GACP;IACX,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,UAAU,EAAE,CAAC;IAEnD,MAAM,gBAAgB,GAAG,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;IACnE,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC;IAC/F,MAAM,6BAA6B,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAE3E,uFAAuF;IACvF,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;IAE5E,yCAAyC;IACzC,MAAM,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC;IAC9E,MAAM,YAAY,GAAG,iBAAiB,IAAI,cAAc,IAAI,aAAa,CAAC;IAE1E,IAAI,CAAC,YAAY,CAAC,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,+DAA+D;IAC/D,MAAM,WAAW,GAAG,kBAAkB,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,CAAC;IAC7D,MAAM,YAAY,GAAG,kBAAkB,EAAE,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC;IAE/D,uFAAuF;IACvF,4DAA4D;IAC5D,MAAM,aAAa,GAAG,YAAY,CAAC,UAAU,KAAK,IAAI,CAAC;IAEvD,MAAM,eAAe,GAAqB;QACtC,WAAW;QACX,aAAa;QACb,aAAa;QACb,OAAO;QACP,gBAAgB;QAChB,gBAAgB;QAChB,WAAW;QACX,YAAY;QACZ,aAAa;QACb,UAAU,EAAE,YAAY,CAAC,UAAU;QACnC,mBAAmB,EAAE,6BAA6B;KACrD,CAAC;IAEF,OAAO,KAAC,UAAU,OAAK,eAAe,GAAI,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { ILegendBodyProps } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Responsible for rendering the legend using the proven GeoChartLegendRenderer
|
|
5
|
+
* from the old implementation. This component acts as an adapter between the new
|
|
6
|
+
* chart's context architecture and the old legend renderer.
|
|
7
|
+
*
|
|
8
|
+
* The component wraps GeoChartLegendRenderer with IntlTranslationsProvider to
|
|
9
|
+
* provide numericSymbols required for number formatting in legends.
|
|
10
|
+
*/
|
|
11
|
+
export declare function LegendBody(props: ILegendBodyProps): ReactElement;
|
|
12
|
+
//# sourceMappingURL=LegendBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendBody.d.ts","sourceRoot":"","sources":["../../../../src/next/components/legends/LegendBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAOrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CA4BhE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { IntlTranslationsProvider } from "@gooddata/sdk-ui";
|
|
3
|
+
import { adaptLegendPropsToOldRenderer } from "./legendPropsAdapter.js";
|
|
4
|
+
import GeoChartLegendRenderer from "../../../core/geoChart/GeoChartLegendRenderer.js";
|
|
5
|
+
/**
|
|
6
|
+
* Responsible for rendering the legend using the proven GeoChartLegendRenderer
|
|
7
|
+
* from the old implementation. This component acts as an adapter between the new
|
|
8
|
+
* chart's context architecture and the old legend renderer.
|
|
9
|
+
*
|
|
10
|
+
* The component wraps GeoChartLegendRenderer with IntlTranslationsProvider to
|
|
11
|
+
* provide numericSymbols required for number formatting in legends.
|
|
12
|
+
*/
|
|
13
|
+
export function LegendBody(props) {
|
|
14
|
+
const { legendWidth, legendHeight } = props;
|
|
15
|
+
// Create ContentRect for the old renderer (it expects react-measure format)
|
|
16
|
+
const contentRect = {
|
|
17
|
+
client: {
|
|
18
|
+
width: legendWidth,
|
|
19
|
+
height: legendHeight,
|
|
20
|
+
top: 0,
|
|
21
|
+
left: 0,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
// Adapt new props format to old renderer props format
|
|
25
|
+
const oldRendererProps = adaptLegendPropsToOldRenderer(props, contentRect);
|
|
26
|
+
// Wrap with IntlTranslationsProvider to provide numericSymbols
|
|
27
|
+
// (same pattern as old implementation in GeoChartInner.tsx)
|
|
28
|
+
return (_jsx(IntlTranslationsProvider, { children: (translationProps) => (_jsx(GeoChartLegendRenderer, { ...oldRendererProps, numericSymbols: translationProps.numericSymbols })) }));
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=LegendBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegendBody.js","sourceRoot":"","sources":["../../../../src/next/components/legends/LegendBody.tsx"],"names":[],"mappings":";AAMA,OAAO,EAA+B,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,sBAAsB,MAAM,kDAAkD,CAAC;AAEtF;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,KAAuB;IAC9C,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAE5C,4EAA4E;IAC5E,MAAM,WAAW,GAAgB;QAC7B,MAAM,EAAE;YACJ,KAAK,EAAE,WAAW;YAClB,MAAM,EAAE,YAAY;YACpB,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,CAAC;SACV;KACJ,CAAC;IAEF,sDAAsD;IACtD,MAAM,gBAAgB,GAAG,6BAA6B,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAE3E,+DAA+D;IAC/D,4DAA4D;IAC5D,OAAO,CACH,KAAC,wBAAwB,cACpB,CAAC,gBAA6C,EAAE,EAAE,CAAC,CAChD,KAAC,sBAAsB,OACf,gBAAgB,EACpB,cAAc,EAAE,gBAAgB,CAAC,cAAc,GACjD,CACL,GACsB,CAC9B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ContentRect } from "react-measure";
|
|
2
|
+
import { ILegendBodyProps } from "./types.js";
|
|
3
|
+
import type { IGeoChartLegendRendererProps } from "../../../core/geoChart/GeoChartLegendRenderer.js";
|
|
4
|
+
/**
|
|
5
|
+
* Adapts props from the new GeoPushpinChartNext legend context
|
|
6
|
+
* to the format expected by the old GeoChartLegendRenderer.
|
|
7
|
+
*
|
|
8
|
+
* This adapter allows us to reuse the proven, working legend implementation
|
|
9
|
+
* from the old chart while maintaining the new chart's context architecture.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function adaptLegendPropsToOldRenderer(props: ILegendBodyProps, contentRect: ContentRect): IGeoChartLegendRendererProps;
|
|
14
|
+
//# sourceMappingURL=legendPropsAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legendPropsAdapter.d.ts","sourceRoot":"","sources":["../../../../src/next/components/legends/legendPropsAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAErG;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CACzC,KAAK,EAAE,gBAAgB,EACvB,WAAW,EAAE,WAAW,GACzB,4BAA4B,CAgC9B"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
/**
|
|
3
|
+
* Adapts props from the new GeoPushpinChartNext legend context
|
|
4
|
+
* to the format expected by the old GeoChartLegendRenderer.
|
|
5
|
+
*
|
|
6
|
+
* This adapter allows us to reuse the proven, working legend implementation
|
|
7
|
+
* from the old chart while maintaining the new chart's context architecture.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export function adaptLegendPropsToOldRenderer(props, contentRect) {
|
|
12
|
+
const { legendDetails, categoryItems, geoData, colorLegendValue, isFluidLayout, responsive, onCategoryItemClick, } = props;
|
|
13
|
+
// Map legend details to old renderer props
|
|
14
|
+
const position = legendDetails?.position ?? "top";
|
|
15
|
+
const renderPopUp = legendDetails?.renderPopUp ?? false;
|
|
16
|
+
const maxRows = legendDetails?.maxRows;
|
|
17
|
+
const name = legendDetails?.name;
|
|
18
|
+
return {
|
|
19
|
+
categoryItems,
|
|
20
|
+
geoData: geoData ?? undefined,
|
|
21
|
+
colorLegendValue: colorLegendValue ?? "",
|
|
22
|
+
position,
|
|
23
|
+
responsive,
|
|
24
|
+
isFluidLegend: isFluidLayout,
|
|
25
|
+
renderPopUp,
|
|
26
|
+
maxRows,
|
|
27
|
+
name,
|
|
28
|
+
containerId: props.containerId,
|
|
29
|
+
onItemClick: onCategoryItemClick,
|
|
30
|
+
contentRect,
|
|
31
|
+
// numericSymbols will be provided by IntlTranslationsProvider wrapper
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=legendPropsAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legendPropsAdapter.js","sourceRoot":"","sources":["../../../../src/next/components/legends/legendPropsAdapter.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAShC;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CACzC,KAAuB,EACvB,WAAwB;IAExB,MAAM,EACF,aAAa,EACb,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,mBAAmB,GACtB,GAAG,KAAK,CAAC;IAEV,2CAA2C;IAC3C,MAAM,QAAQ,GAAG,aAAa,EAAE,QAAQ,IAAI,KAAK,CAAC;IAClD,MAAM,WAAW,GAAG,aAAa,EAAE,WAAW,IAAI,KAAK,CAAC;IACxD,MAAM,OAAO,GAAG,aAAa,EAAE,OAAO,CAAC;IACvC,MAAM,IAAI,GAAG,aAAa,EAAE,IAAI,CAAC;IAEjC,OAAO;QACH,aAAa;QACb,OAAO,EAAE,OAAO,IAAI,SAAS;QAC7B,gBAAgB,EAAE,gBAAgB,IAAI,EAAE;QACxC,QAAQ;QACR,UAAU;QACV,aAAa,EAAE,aAAa;QAC5B,WAAW;QACX,OAAO;QACP,IAAI;QACJ,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,mBAA+E;QAC5F,WAAW;QACX,sEAAsE;KACzE,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ILegendDetails, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
|
|
2
|
+
import { IAvailableLegends, IGeoData } from "../../types/shared.js";
|
|
3
|
+
export interface ILegendBodyProps {
|
|
4
|
+
containerId: string;
|
|
5
|
+
legendDetails: ILegendDetails | null;
|
|
6
|
+
categoryItems: IPushpinCategoryLegendItem[];
|
|
7
|
+
geoData: IGeoData | null;
|
|
8
|
+
availableLegends: IAvailableLegends;
|
|
9
|
+
colorLegendValue: string | null;
|
|
10
|
+
legendWidth: number;
|
|
11
|
+
legendHeight: number;
|
|
12
|
+
isFluidLayout: boolean;
|
|
13
|
+
responsive: boolean | "autoPositionWithPopup";
|
|
14
|
+
onCategoryItemClick: (item: IPushpinCategoryLegendItem) => void;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/next/components/legends/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,aAAa,EAAE,0BAA0B,EAAE,CAAC;IAC5C,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC9C,mBAAmB,EAAE,CAAC,IAAI,EAAE,0BAA0B,KAAK,IAAI,CAAC;CACnE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/next/components/legends/types.ts"],"names":[],"mappings":"AAAA,gCAAgC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pushpin size mapping for different size options
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* Defines minimum and maximum pushpin sizes for each size preset
|
|
6
|
+
*/
|
|
7
|
+
export declare const PUSHPIN_SIZE_OPTIONS_MAP: {
|
|
8
|
+
readonly min: {
|
|
9
|
+
readonly default: 8;
|
|
10
|
+
readonly "0.5x": 4;
|
|
11
|
+
readonly "0.75x": 6;
|
|
12
|
+
readonly normal: 8;
|
|
13
|
+
readonly "1.25x": 10;
|
|
14
|
+
readonly "1.5x": 12;
|
|
15
|
+
};
|
|
16
|
+
readonly max: {
|
|
17
|
+
readonly default: 60;
|
|
18
|
+
readonly "0.5x": 30;
|
|
19
|
+
readonly "0.75x": 45;
|
|
20
|
+
readonly normal: 60;
|
|
21
|
+
readonly "1.25x": 75;
|
|
22
|
+
readonly "1.5x": 90;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Default border color for pushpins
|
|
27
|
+
*/
|
|
28
|
+
export declare const DEFAULT_PUSHPIN_BORDER_COLOR_VALUE = "rgb(233,237,241)";
|
|
29
|
+
/**
|
|
30
|
+
* Default opacity for pushpin colors
|
|
31
|
+
*/
|
|
32
|
+
export declare const DEFAULT_PUSHPIN_COLOR_OPACITY = 0.7;
|
|
33
|
+
/**
|
|
34
|
+
* Number of color scale steps for color gradients
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Used for creating color palettes. Should be less than 20 for performance.
|
|
38
|
+
*/
|
|
39
|
+
export declare const DEFAULT_PUSHPIN_COLOR_SCALE = 6;
|
|
40
|
+
/**
|
|
41
|
+
* Default color value for pushpins
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* Used as fallback color when no color mapping is defined
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_PUSHPIN_COLOR_VALUE = "rgb(20,178,226)";
|
|
47
|
+
/**
|
|
48
|
+
* Maximum zoom level at which to cluster points
|
|
49
|
+
*/
|
|
50
|
+
export declare const DEFAULT_CLUSTER_MAX_ZOOM = 14;
|
|
51
|
+
/**
|
|
52
|
+
* Radius in pixels within which points will be clustered
|
|
53
|
+
*/
|
|
54
|
+
export declare const DEFAULT_CLUSTER_RADIUS = 50;
|
|
55
|
+
/**
|
|
56
|
+
* Default name for the pushpin data source
|
|
57
|
+
*/
|
|
58
|
+
export declare const DEFAULT_DATA_SOURCE_NAME = "gdcPushpinsData";
|
|
59
|
+
/**
|
|
60
|
+
* Default name for the pushpin layer
|
|
61
|
+
*/
|
|
62
|
+
export declare const DEFAULT_LAYER_NAME = "gdcPushpins";
|
|
63
|
+
/**
|
|
64
|
+
* Default name for the cluster layer
|
|
65
|
+
*/
|
|
66
|
+
export declare const DEFAULT_CLUSTER_LAYER_NAME = "gdcClusters";
|
|
67
|
+
/**
|
|
68
|
+
* Suffix for label layers
|
|
69
|
+
*/
|
|
70
|
+
export declare const LAYER_STYLE_LABEL_PREFIX = "-label";
|
|
71
|
+
/**
|
|
72
|
+
* Pushpin circle style type
|
|
73
|
+
*/
|
|
74
|
+
export declare const PUSHPIN_STYLE_CIRCLE = "circle";
|
|
75
|
+
/**
|
|
76
|
+
* Pushpin circle color property
|
|
77
|
+
*/
|
|
78
|
+
export declare const PUSHPIN_STYLE_CIRCLE_COLOR = "circle-color";
|
|
79
|
+
/**
|
|
80
|
+
* Pushpin circle size property
|
|
81
|
+
*/
|
|
82
|
+
export declare const PUSHPIN_STYLE_CIRCLE_SIZE = "circle-radius";
|
|
83
|
+
/**
|
|
84
|
+
* Pushpin circle stroke color property
|
|
85
|
+
*/
|
|
86
|
+
export declare const PUSHPIN_STYLE_CIRCLE_STROKE_COLOR = "circle-stroke-color";
|
|
87
|
+
/**
|
|
88
|
+
* Maximum number of data points to render
|
|
89
|
+
*
|
|
90
|
+
* @remarks
|
|
91
|
+
* Limits are in place for performance reasons
|
|
92
|
+
*/
|
|
93
|
+
export declare const DEFAULT_DATA_POINTS_LIMIT = 25000;
|
|
94
|
+
/**
|
|
95
|
+
* Default options for pushpin styling
|
|
96
|
+
*/
|
|
97
|
+
export declare const DEFAULT_PUSHPIN_OPTIONS: {
|
|
98
|
+
readonly "circle-stroke-width": 1;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Value to display when data is null
|
|
102
|
+
*/
|
|
103
|
+
export declare const NULL_TOOLTIP_VALUE = "-";
|
|
104
|
+
/**
|
|
105
|
+
* Value used for empty segment filters
|
|
106
|
+
*/
|
|
107
|
+
export declare const EMPTY_SEGMENT_VALUE = "empty-segment-filter";
|
|
108
|
+
//# sourceMappingURL=geoChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geoChart.d.ts","sourceRoot":"","sources":["../../../src/next/constants/geoChart.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CAiB3B,CAAC;AAMX;;GAEG;AACH,eAAO,MAAM,kCAAkC,qBAAqB,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,6BAA6B,MAAM,CAAC;AAEjD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,oBAAoB,CAAC;AAM7D;;GAEG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAMzC;;GAEG;AACH,eAAO,MAAM,wBAAwB,oBAAoB,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,0BAA0B,gBAAgB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAMjD;;GAEG;AACH,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,iCAAiC,wBAAwB,CAAC;AAMvE;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAAQ,CAAC;AAM/C;;GAEG;AACH,eAAO,MAAM,uBAAuB;;CAE1B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;GAEG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC"}
|