@gooddata/sdk-ui-geo 11.11.0-alpha.2 → 11.11.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/next/GeoAreaChart.d.ts +33 -0
- package/esm/next/GeoAreaChart.d.ts.map +1 -0
- package/esm/next/GeoAreaChart.js +65 -0
- package/esm/next/GeoAreaChart.js.map +1 -0
- package/esm/next/GeoPushpinChartNext.js +2 -2
- package/esm/next/GeoPushpinChartNext.js.map +1 -1
- package/esm/next/RenderGeoAreaChart.d.ts +15 -0
- package/esm/next/RenderGeoAreaChart.d.ts.map +1 -0
- package/esm/next/RenderGeoAreaChart.js +104 -0
- package/esm/next/RenderGeoAreaChart.js.map +1 -0
- package/esm/next/RenderGeoPushpinChart.d.ts.map +1 -1
- package/esm/next/RenderGeoPushpinChart.js.map +1 -1
- package/esm/next/components/legends/Legend.js +1 -1
- package/esm/next/components/legends/Legend.js.map +1 -1
- package/esm/next/components/legends/types.d.ts +2 -2
- package/esm/next/components/legends/types.d.ts.map +1 -1
- package/esm/next/context/GeoAreaCollectionContext.d.ts +24 -0
- package/esm/next/context/GeoAreaCollectionContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaCollectionContext.js +39 -0
- package/esm/next/context/GeoAreaCollectionContext.js.map +1 -0
- package/esm/next/context/GeoAreaDataContext.d.ts +69 -0
- package/esm/next/context/GeoAreaDataContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaDataContext.js +87 -0
- package/esm/next/context/GeoAreaDataContext.js.map +1 -0
- package/esm/next/context/GeoAreaPropsContext.d.ts +47 -0
- package/esm/next/context/GeoAreaPropsContext.d.ts.map +1 -0
- package/esm/next/context/GeoAreaPropsContext.js +84 -0
- package/esm/next/context/GeoAreaPropsContext.js.map +1 -0
- package/esm/next/context/GeoDataContext.d.ts +13 -19
- package/esm/next/context/GeoDataContext.d.ts.map +1 -1
- package/esm/next/context/GeoDataContext.js +7 -53
- package/esm/next/context/GeoDataContext.js.map +1 -1
- package/esm/next/context/GeoPushpinDataContext.d.ts +14 -0
- package/esm/next/context/GeoPushpinDataContext.d.ts.map +1 -0
- package/esm/next/context/GeoPushpinDataContext.js +51 -0
- package/esm/next/context/GeoPushpinDataContext.js.map +1 -0
- package/esm/next/features/clustering/clustering.d.ts +2 -2
- package/esm/next/features/clustering/clustering.d.ts.map +1 -1
- package/esm/next/features/clustering/clustering.js.map +1 -1
- package/esm/next/features/coloring/areaColorStrategy.d.ts +22 -0
- package/esm/next/features/coloring/areaColorStrategy.d.ts.map +1 -0
- package/esm/next/features/coloring/areaColorStrategy.js +83 -0
- package/esm/next/features/coloring/areaColorStrategy.js.map +1 -0
- package/esm/next/features/coloring/areaPalette.d.ts +28 -0
- package/esm/next/features/coloring/areaPalette.d.ts.map +1 -0
- package/esm/next/features/coloring/areaPalette.js +41 -0
- package/esm/next/features/coloring/areaPalette.js.map +1 -0
- package/esm/next/features/coloring/colorStrategy.d.ts +2 -2
- package/esm/next/features/coloring/colorStrategy.d.ts.map +1 -1
- package/esm/next/features/coloring/colorStrategy.js +2 -2
- package/esm/next/features/coloring/colorStrategy.js.map +1 -1
- package/esm/next/features/data/areaTransformation.d.ts +60 -0
- package/esm/next/features/data/areaTransformation.d.ts.map +1 -0
- package/esm/next/features/data/areaTransformation.js +248 -0
- package/esm/next/features/data/areaTransformation.js.map +1 -0
- package/esm/next/features/data/dataSourceManagement.d.ts +2 -2
- package/esm/next/features/data/dataSourceManagement.d.ts.map +1 -1
- package/esm/next/features/data/dataSourceManagement.js.map +1 -1
- package/esm/next/features/data/pushpinTransformation.d.ts +72 -0
- package/esm/next/features/data/pushpinTransformation.d.ts.map +1 -0
- package/esm/next/features/data/{transformation.js → pushpinTransformation.js} +21 -70
- package/esm/next/features/data/pushpinTransformation.js.map +1 -0
- package/esm/next/features/data/transformationCommon.d.ts +21 -0
- package/esm/next/features/data/transformationCommon.d.ts.map +1 -0
- package/esm/next/features/data/transformationCommon.js +52 -0
- package/esm/next/features/data/transformationCommon.js.map +1 -0
- package/esm/next/features/map/areaLayerManagement.d.ts +51 -0
- package/esm/next/features/map/areaLayerManagement.d.ts.map +1 -0
- package/esm/next/features/map/areaLayerManagement.js +81 -0
- package/esm/next/features/map/areaLayerManagement.js.map +1 -0
- package/esm/next/features/map/layerManagement.d.ts +3 -3
- package/esm/next/features/map/layerManagement.d.ts.map +1 -1
- package/esm/next/features/map/layerManagement.js.map +1 -1
- package/esm/next/features/map/viewportManagement.d.ts +13 -0
- package/esm/next/features/map/viewportManagement.d.ts.map +1 -1
- package/esm/next/features/map/viewportManagement.js +30 -0
- package/esm/next/features/map/viewportManagement.js.map +1 -1
- package/esm/next/features/tooltip/tooltipManagement.d.ts +1 -1
- package/esm/next/features/tooltip/tooltipManagement.d.ts.map +1 -1
- package/esm/next/features/tooltip/tooltipManagement.js +11 -7
- package/esm/next/features/tooltip/tooltipManagement.js.map +1 -1
- package/esm/next/helpers/areaAttributeResolver.d.ts +10 -0
- package/esm/next/helpers/areaAttributeResolver.d.ts.map +1 -0
- package/esm/next/helpers/areaAttributeResolver.js +26 -0
- package/esm/next/helpers/areaAttributeResolver.js.map +1 -0
- package/esm/next/hooks/init/useInitExecution.d.ts +5 -2
- package/esm/next/hooks/init/useInitExecution.d.ts.map +1 -1
- package/esm/next/hooks/init/useInitExecution.js +32 -16
- package/esm/next/hooks/init/useInitExecution.js.map +1 -1
- package/esm/next/hooks/legend/useAreaLegendItems.d.ts +27 -0
- package/esm/next/hooks/legend/useAreaLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/legend/useAreaLegendItems.js +33 -0
- package/esm/next/hooks/legend/useAreaLegendItems.js.map +1 -0
- package/esm/next/hooks/legend/useLegendDetails.d.ts +2 -2
- package/esm/next/hooks/legend/useLegendDetails.d.ts.map +1 -1
- package/esm/next/hooks/legend/useLegendDetails.js.map +1 -1
- package/esm/next/hooks/legend/useLegendProps.d.ts +2 -2
- package/esm/next/hooks/legend/useLegendProps.d.ts.map +1 -1
- package/esm/next/hooks/legend/useLegendProps.js.map +1 -1
- package/esm/next/hooks/legend/{useLegendItems.d.ts → usePushpinLegendItems.d.ts} +3 -3
- package/esm/next/hooks/legend/usePushpinLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/legend/usePushpinLegendItems.js +33 -0
- package/esm/next/hooks/legend/usePushpinLegendItems.js.map +1 -0
- package/esm/next/hooks/map/useAreaMapDataSync.d.ts +9 -0
- package/esm/next/hooks/map/useAreaMapDataSync.d.ts.map +1 -0
- package/esm/next/hooks/map/useAreaMapDataSync.js +71 -0
- package/esm/next/hooks/map/useAreaMapDataSync.js.map +1 -0
- package/esm/next/hooks/map/useMapDataSync.d.ts +2 -2
- package/esm/next/hooks/map/useMapDataSync.d.ts.map +1 -1
- package/esm/next/hooks/map/useMapDataSync.js.map +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.d.ts +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.d.ts.map +1 -1
- package/esm/next/hooks/map/useTooltipHandlers.js +3 -3
- package/esm/next/hooks/map/useTooltipHandlers.js.map +1 -1
- package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts +17 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.d.ts.map +1 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.js +86 -0
- package/esm/next/hooks/shared/geoCollectionBoundingBox.js.map +1 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts +43 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.js +213 -0
- package/esm/next/hooks/shared/useAreaCollectionFeatures.js.map +1 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.d.ts +21 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.js +25 -0
- package/esm/next/hooks/shared/useAreaDataTransformation.js.map +1 -0
- package/esm/next/hooks/shared/useAreaPushData.d.ts +11 -0
- package/esm/next/hooks/shared/useAreaPushData.d.ts.map +1 -0
- package/esm/next/hooks/shared/useAreaPushData.js +20 -0
- package/esm/next/hooks/shared/useAreaPushData.js.map +1 -0
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts +4 -18
- package/esm/next/hooks/shared/useGeoDataTransformation.d.ts.map +1 -1
- package/esm/next/hooks/shared/useGeoDataTransformation.js +5 -22
- package/esm/next/hooks/shared/useGeoDataTransformation.js.map +1 -1
- package/esm/next/hooks/shared/useGeoPushData.d.ts +20 -0
- package/esm/next/hooks/shared/useGeoPushData.d.ts.map +1 -0
- package/esm/next/hooks/shared/useGeoPushData.js +36 -0
- package/esm/next/hooks/shared/useGeoPushData.js.map +1 -0
- package/esm/next/hooks/shared/usePushData.d.ts.map +1 -1
- package/esm/next/hooks/shared/usePushData.js +5 -26
- package/esm/next/hooks/shared/usePushData.js.map +1 -1
- package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts +23 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.d.ts.map +1 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.js +27 -0
- package/esm/next/hooks/shared/usePushpinDataTransformation.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.d.ts +16 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.d.ts.map +1 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.js +36 -0
- package/esm/next/hooks/shared/useResolvedAreaProps.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts +8 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.d.ts.map +1 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.js +11 -0
- package/esm/next/hooks/shared/useResolvedPlaceholderValues.js.map +1 -0
- package/esm/next/hooks/shared/useResolvedProps.d.ts.map +1 -1
- package/esm/next/hooks/shared/useResolvedProps.js +3 -3
- package/esm/next/hooks/shared/useResolvedProps.js.map +1 -1
- package/esm/next/hooks/shared/useSegmentLegendItems.d.ts +17 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.d.ts.map +1 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.js +33 -0
- package/esm/next/hooks/shared/useSegmentLegendItems.js.map +1 -0
- package/esm/next/index.d.ts +4 -0
- package/esm/next/index.d.ts.map +1 -1
- package/esm/next/index.js +1 -0
- package/esm/next/index.js.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts +2 -2
- package/esm/next/providers/maplibre/maplibreDataLayers.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayers.js.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts +41 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.js +83 -0
- package/esm/next/providers/maplibre/maplibreDataLayersArea.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts +2 -2
- package/esm/next/providers/maplibre/maplibreDataSource.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts +34 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.d.ts.map +1 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.js +209 -0
- package/esm/next/providers/maplibre/maplibreDataSourceArea.js.map +1 -0
- package/esm/next/providers/maplibre/maplibreTooltip.d.ts.map +1 -1
- package/esm/next/providers/maplibre/maplibreTooltip.js +20 -4
- package/esm/next/providers/maplibre/maplibreTooltip.js.map +1 -1
- package/esm/next/types/areaConfig.d.ts +68 -0
- package/esm/next/types/areaConfig.d.ts.map +1 -0
- package/esm/next/types/areaConfig.js +3 -0
- package/esm/next/types/areaConfig.js.map +1 -0
- package/esm/next/types/areaInternal.d.ts +13 -0
- package/esm/next/types/areaInternal.d.ts.map +1 -0
- package/esm/next/types/areaInternal.js +3 -0
- package/esm/next/types/areaInternal.js.map +1 -0
- package/esm/next/types/areaPublic.d.ts +68 -0
- package/esm/next/types/areaPublic.d.ts.map +1 -0
- package/esm/next/types/areaPublic.js +3 -0
- package/esm/next/types/areaPublic.js.map +1 -0
- package/esm/next/types/shared.d.ts +57 -21
- package/esm/next/types/shared.d.ts.map +1 -1
- package/esm/next/utils/geoCollection.d.ts +40 -0
- package/esm/next/utils/geoCollection.d.ts.map +1 -0
- package/esm/next/utils/geoCollection.js +102 -0
- package/esm/next/utils/geoCollection.js.map +1 -0
- package/package.json +10 -9
- package/styles/css/main.css +18 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/geo-area-next.scss +24 -0
- package/styles/scss/main.scss +1 -0
- package/esm/next/features/data/transformation.d.ts +0 -99
- package/esm/next/features/data/transformation.d.ts.map +0 -1
- package/esm/next/features/data/transformation.js.map +0 -1
- package/esm/next/hooks/legend/useLegendItems.d.ts.map +0 -1
- package/esm/next/hooks/legend/useLegendItems.js +0 -54
- package/esm/next/hooks/legend/useLegendItems.js.map +0 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { IGeoAreaChartConfig } from "../types/areaConfig.js";
|
|
3
|
+
import { ICoreGeoAreaChartProps } from "../types/areaInternal.js";
|
|
4
|
+
/**
|
|
5
|
+
* Provider for GeoAreaChart component props.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This context provides access to all props passed to the GeoAreaChart component
|
|
9
|
+
* including configuration, data properties, and callback handlers.
|
|
10
|
+
*
|
|
11
|
+
* @alpha
|
|
12
|
+
*/
|
|
13
|
+
export declare function GeoAreaPropsProvider({ children, ...props }: ICoreGeoAreaChartProps & {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;
|
|
17
|
+
type ConfigDefaults = "areas" | "legend";
|
|
18
|
+
type ConfigWithDefaults = WithRequired<IGeoAreaChartConfig, ConfigDefaults>;
|
|
19
|
+
type RootPropsDefaults = "drillableItems" | "filters" | "sortBy" | "config" | "execConfig";
|
|
20
|
+
type RootPropsWithDefaults = WithRequired<ICoreGeoAreaChartProps, RootPropsDefaults>;
|
|
21
|
+
type GeoAreaPropsWithDefaults = RootPropsWithDefaults & {
|
|
22
|
+
config: ConfigWithDefaults;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Applies default values to GeoAreaChart props.
|
|
26
|
+
*
|
|
27
|
+
* @param props - The component props
|
|
28
|
+
* @returns Props with defaults applied
|
|
29
|
+
*
|
|
30
|
+
* @alpha
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyGeoAreaDefaultProps(props: ICoreGeoAreaChartProps): GeoAreaPropsWithDefaults;
|
|
33
|
+
/**
|
|
34
|
+
* Hook to access GeoAreaChart component props.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* This hook provides access to all component props with default values applied
|
|
38
|
+
* and deep memoization for stable references across renders.
|
|
39
|
+
*
|
|
40
|
+
* @returns Component props with defaults
|
|
41
|
+
* @throws Error if used outside of GeoAreaPropsProvider
|
|
42
|
+
*
|
|
43
|
+
* @alpha
|
|
44
|
+
*/
|
|
45
|
+
export declare function useGeoAreaProps(): GeoAreaPropsWithDefaults;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=GeoAreaPropsContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoAreaPropsContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/GeoAreaPropsContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAM7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,EACjC,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,sBAAsB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAElD;AAED,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnE,KAAK,cAAc,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEzC,KAAK,kBAAkB,GAAG,YAAY,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;AAE5E,KAAK,iBAAiB,GAAG,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE3F,KAAK,qBAAqB,GAAG,YAAY,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAC;AAErF,KAAK,wBAAwB,GAAG,qBAAqB,GAAG;IACpD,MAAM,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,GAAG,wBAAwB,CA2BhG;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,wBAAwB,CAmB1D"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { useDeepMemo } from "@gooddata/sdk-ui/internal";
|
|
5
|
+
import { EMPTY_DRILLS, EMPTY_FILTERS, EMPTY_OBJECT, EMPTY_SORT_BY } from "../constants/internal.js";
|
|
6
|
+
import { resolveEffectiveAreaAttribute } from "../helpers/areaAttributeResolver.js";
|
|
7
|
+
const GeoAreaPropsContext = createContext(undefined);
|
|
8
|
+
/**
|
|
9
|
+
* Provider for GeoAreaChart component props.
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This context provides access to all props passed to the GeoAreaChart component
|
|
13
|
+
* including configuration, data properties, and callback handlers.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
16
|
+
*/
|
|
17
|
+
export function GeoAreaPropsProvider({ children, ...props }) {
|
|
18
|
+
return _jsx(GeoAreaPropsContext.Provider, { value: props, children: children });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Applies default values to GeoAreaChart props.
|
|
22
|
+
*
|
|
23
|
+
* @param props - The component props
|
|
24
|
+
* @returns Props with defaults applied
|
|
25
|
+
*
|
|
26
|
+
* @alpha
|
|
27
|
+
*/
|
|
28
|
+
export function applyGeoAreaDefaultProps(props) {
|
|
29
|
+
const area = resolveEffectiveAreaAttribute(props.area, props.execution?.definition);
|
|
30
|
+
return {
|
|
31
|
+
...props,
|
|
32
|
+
area,
|
|
33
|
+
drillableItems: props.drillableItems ?? EMPTY_DRILLS,
|
|
34
|
+
filters: props.filters ?? EMPTY_FILTERS,
|
|
35
|
+
sortBy: props.sortBy ?? EMPTY_SORT_BY,
|
|
36
|
+
config: {
|
|
37
|
+
...(props.config ?? {}),
|
|
38
|
+
center: props.config?.center,
|
|
39
|
+
zoom: props.config?.zoom,
|
|
40
|
+
areas: {
|
|
41
|
+
...(props.config?.areas ?? {}),
|
|
42
|
+
fillOpacity: props.config?.areas?.fillOpacity ?? 0.7,
|
|
43
|
+
borderColor: props.config?.areas?.borderColor ?? "#FFFFFF",
|
|
44
|
+
borderWidth: props.config?.areas?.borderWidth ?? 1,
|
|
45
|
+
},
|
|
46
|
+
legend: {
|
|
47
|
+
...(props.config?.legend ?? {}),
|
|
48
|
+
enabled: props.config?.legend?.enabled ?? true,
|
|
49
|
+
position: props.config?.legend?.position ?? "top",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
execConfig: props.execConfig ?? EMPTY_OBJECT,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Hook to access GeoAreaChart component props.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This hook provides access to all component props with default values applied
|
|
60
|
+
* and deep memoization for stable references across renders.
|
|
61
|
+
*
|
|
62
|
+
* @returns Component props with defaults
|
|
63
|
+
* @throws Error if used outside of GeoAreaPropsProvider
|
|
64
|
+
*
|
|
65
|
+
* @alpha
|
|
66
|
+
*/
|
|
67
|
+
export function useGeoAreaProps() {
|
|
68
|
+
const context = useContext(GeoAreaPropsContext);
|
|
69
|
+
const memoizeDeep = useDeepMemo();
|
|
70
|
+
if (context === undefined) {
|
|
71
|
+
throw new Error("useGeoAreaProps must be used within a GeoAreaPropsProvider");
|
|
72
|
+
}
|
|
73
|
+
const baseProps = applyGeoAreaDefaultProps(context);
|
|
74
|
+
// Recursively memoize nested properties to maintain stable references
|
|
75
|
+
return {
|
|
76
|
+
...baseProps,
|
|
77
|
+
drillableItems: memoizeDeep("drillableItems", baseProps.drillableItems),
|
|
78
|
+
filters: memoizeDeep("filters", baseProps.filters),
|
|
79
|
+
sortBy: memoizeDeep("sortBy", baseProps.sortBy),
|
|
80
|
+
execConfig: memoizeDeep("execConfig", baseProps.execConfig),
|
|
81
|
+
config: memoizeDeep("config", baseProps.config),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=GeoAreaPropsContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoAreaPropsContext.js","sourceRoot":"","sources":["../../../src/next/context/GeoAreaPropsContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAIpF,MAAM,mBAAmB,GAAG,aAAa,CAAqC,SAAS,CAAC,CAAC;AAEzF;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACjC,QAAQ,EACR,GAAG,KAAK,EACuC;IAC/C,OAAO,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAAgC,CAAC;AACjG,CAAC;AAgBD;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAA6B;IAClE,MAAM,IAAI,GAAG,6BAA6B,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAEpF,OAAO;QACH,GAAG,KAAK;QACR,IAAI;QACJ,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,YAAY;QACpD,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,aAAa;QACvC,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,aAAa;QACrC,MAAM,EAAE;YACJ,GAAG,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC;YACvB,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM;YAC5B,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,IAAI;YACxB,KAAK,EAAE;gBACH,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;gBAC9B,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,IAAI,GAAG;gBACpD,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,IAAI,SAAS;gBAC1D,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,IAAI,CAAC;aACrD;YACD,MAAM,EAAE;gBACJ,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,IAAI,EAAE,CAAC;gBAC/B,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,IAAI,IAAI;gBAC9C,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,IAAI,KAAK;aACpD;SACJ;QACD,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,YAAY;KAC/C,CAAC;AACN,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,eAAe;IAC3B,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAElC,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAClF,CAAC;IAED,MAAM,SAAS,GAAG,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAEpD,sEAAsE;IACtE,OAAO;QACH,GAAG,SAAS;QACZ,cAAc,EAAE,WAAW,CAAC,gBAAgB,EAAE,SAAS,CAAC,cAAc,CAAC;QACvE,OAAO,EAAE,WAAW,CAAC,SAAS,EAAE,SAAS,CAAC,OAAO,CAAC;QAClD,MAAM,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC;QAC/C,UAAU,EAAE,WAAW,CAAC,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC;QAC3D,MAAM,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,CAAC;KAClD,CAAC;AACN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { IColorPalette } from "@gooddata/sdk-model";
|
|
3
3
|
import { IColorStrategy, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
-
import { IAvailableLegends,
|
|
4
|
+
import { IAvailableLegends, type IGeoCommonData } from "../types/shared.js";
|
|
5
5
|
/**
|
|
6
6
|
* Context for geographic data and derived values.
|
|
7
7
|
*
|
|
@@ -12,11 +12,11 @@ import { IAvailableLegends, IGeoData } from "../types/shared.js";
|
|
|
12
12
|
*
|
|
13
13
|
* @alpha
|
|
14
14
|
*/
|
|
15
|
-
interface IGeoDataContext {
|
|
15
|
+
export interface IGeoDataContext<TGeoData extends IGeoCommonData = IGeoCommonData> {
|
|
16
16
|
/**
|
|
17
17
|
* Transformed geographic data
|
|
18
18
|
*/
|
|
19
|
-
geoData:
|
|
19
|
+
geoData: TGeoData | null;
|
|
20
20
|
/**
|
|
21
21
|
* Color strategy used for visualization
|
|
22
22
|
*/
|
|
@@ -34,24 +34,18 @@ interface IGeoDataContext {
|
|
|
34
34
|
*/
|
|
35
35
|
availableLegends: IAvailableLegends;
|
|
36
36
|
}
|
|
37
|
+
interface IGeoDataContextProviderProps {
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
value: IGeoDataContext;
|
|
40
|
+
}
|
|
37
41
|
/**
|
|
38
|
-
* Provider for geographic data.
|
|
39
|
-
*
|
|
40
42
|
* @remarks
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* - Creates color strategy
|
|
44
|
-
* - Generates legend items
|
|
45
|
-
* - Determines available legends
|
|
43
|
+
* Use specialized providers (for example pushpin or area charts) to compute the value
|
|
44
|
+
* and pass it through this wrapper so that all consumers can rely on {@link useGeoData}.
|
|
46
45
|
*
|
|
47
|
-
*
|
|
48
|
-
* No useEffect or state synchronization needed.
|
|
49
|
-
*
|
|
50
|
-
* @alpha
|
|
46
|
+
* @internal
|
|
51
47
|
*/
|
|
52
|
-
export declare function
|
|
53
|
-
children: ReactNode;
|
|
54
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export declare function GeoDataContextProvider({ children, value }: IGeoDataContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
55
49
|
/**
|
|
56
50
|
* Hook to access geographic data.
|
|
57
51
|
*
|
|
@@ -60,10 +54,10 @@ export declare function GeoDataProvider({ children }: {
|
|
|
60
54
|
* All values are already computed and memoized.
|
|
61
55
|
*
|
|
62
56
|
* @returns Geographic data context
|
|
63
|
-
* @throws Error if used outside of
|
|
57
|
+
* @throws Error if used outside of GeoDataContextProvider
|
|
64
58
|
*
|
|
65
59
|
* @alpha
|
|
66
60
|
*/
|
|
67
|
-
export declare function useGeoData(): IGeoDataContext
|
|
61
|
+
export declare function useGeoData<TGeoData extends IGeoCommonData = IGeoCommonData>(): IGeoDataContext<TGeoData>;
|
|
68
62
|
export {};
|
|
69
63
|
//# sourceMappingURL=GeoDataContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoDataContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/GeoDataContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"GeoDataContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/GeoDataContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE5E;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc;IAC7E;;OAEG;IACH,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,YAAY,EAAE,aAAa,CAAC;IAE5B;;OAEG;IACH,eAAe,EAAE,0BAA0B,EAAE,CAAC;IAE9C;;OAEG;IACH,gBAAgB,EAAE,iBAAiB,CAAC;CACvC;AAID,UAAU,4BAA4B;IAClC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,eAAe,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,4BAA4B,2CAEvF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,KAAK,eAAe,CAAC,QAAQ,CAAC,CAQxG"}
|
|
@@ -1,61 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2025 GoodData Corporation
|
|
3
|
-
import { createContext, useContext
|
|
4
|
-
import { DefaultColorPalette } from "@gooddata/sdk-ui";
|
|
5
|
-
import { useGeoPushpinProps } from "./GeoPushpinPropsContext.js";
|
|
6
|
-
import { useInitialExecution } from "./InitialExecutionContext.js";
|
|
7
|
-
import { getColorStrategy } from "../features/coloring/colorStrategy.js";
|
|
8
|
-
import { getAvailableLegends } from "../features/data/transformation.js";
|
|
9
|
-
import { useLegendItems } from "../hooks/legend/useLegendItems.js";
|
|
10
|
-
import { useGeoDataTransformation } from "../hooks/shared/useGeoDataTransformation.js";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
11
4
|
const GeoDataContext = createContext(undefined);
|
|
12
|
-
const EMPTY_AVAILABLE_LEGENDS = {
|
|
13
|
-
hasCategoryLegend: false,
|
|
14
|
-
hasColorLegend: false,
|
|
15
|
-
hasSizeLegend: false,
|
|
16
|
-
};
|
|
17
5
|
/**
|
|
18
|
-
* Provider for geographic data.
|
|
19
|
-
*
|
|
20
6
|
* @remarks
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* - Creates color strategy
|
|
24
|
-
* - Generates legend items
|
|
25
|
-
* - Determines available legends
|
|
26
|
-
*
|
|
27
|
-
* All computations use useMemo and happen once per data change.
|
|
28
|
-
* No useEffect or state synchronization needed.
|
|
7
|
+
* Use specialized providers (for example pushpin or area charts) to compute the value
|
|
8
|
+
* and pass it through this wrapper so that all consumers can rely on {@link useGeoData}.
|
|
29
9
|
*
|
|
30
|
-
* @
|
|
10
|
+
* @internal
|
|
31
11
|
*/
|
|
32
|
-
export function
|
|
33
|
-
const props = useGeoPushpinProps();
|
|
34
|
-
const { initialDataView } = useInitialExecution();
|
|
35
|
-
// Transform execution data to geo format
|
|
36
|
-
const geoData = useGeoDataTransformation(initialDataView);
|
|
37
|
-
// Create color strategy (memoized to prevent infinite loops)
|
|
38
|
-
const colorPalette = useMemo(() => props.config?.colorPalette || DefaultColorPalette, [props.config?.colorPalette]);
|
|
39
|
-
const colorMapping = useMemo(() => props.config?.colorMapping || [], [props.config?.colorMapping]);
|
|
40
|
-
const colorStrategy = useMemo(() => geoData && initialDataView
|
|
41
|
-
? getColorStrategy(colorPalette, colorMapping, geoData, initialDataView)
|
|
42
|
-
: null, [colorPalette, colorMapping, geoData, initialDataView]);
|
|
43
|
-
// Get base legend items (with colors, but always isVisible: true)
|
|
44
|
-
const baseLegendItems = useLegendItems(initialDataView, geoData, colorStrategy);
|
|
45
|
-
// Compute available legends
|
|
46
|
-
const availableLegends = useMemo(() => {
|
|
47
|
-
if (!geoData) {
|
|
48
|
-
return EMPTY_AVAILABLE_LEGENDS;
|
|
49
|
-
}
|
|
50
|
-
return getAvailableLegends(baseLegendItems, geoData);
|
|
51
|
-
}, [baseLegendItems, geoData]);
|
|
52
|
-
const value = useMemo(() => ({
|
|
53
|
-
geoData,
|
|
54
|
-
colorStrategy,
|
|
55
|
-
colorPalette,
|
|
56
|
-
baseLegendItems,
|
|
57
|
-
availableLegends,
|
|
58
|
-
}), [geoData, colorStrategy, colorPalette, baseLegendItems, availableLegends]);
|
|
12
|
+
export function GeoDataContextProvider({ children, value }) {
|
|
59
13
|
return _jsx(GeoDataContext.Provider, { value: value, children: children });
|
|
60
14
|
}
|
|
61
15
|
/**
|
|
@@ -66,14 +20,14 @@ export function GeoDataProvider({ children }) {
|
|
|
66
20
|
* All values are already computed and memoized.
|
|
67
21
|
*
|
|
68
22
|
* @returns Geographic data context
|
|
69
|
-
* @throws Error if used outside of
|
|
23
|
+
* @throws Error if used outside of GeoDataContextProvider
|
|
70
24
|
*
|
|
71
25
|
* @alpha
|
|
72
26
|
*/
|
|
73
27
|
export function useGeoData() {
|
|
74
28
|
const context = useContext(GeoDataContext);
|
|
75
29
|
if (context === undefined) {
|
|
76
|
-
throw new Error("useGeoData must be used within a
|
|
30
|
+
throw new Error("useGeoData must be used within a GeoDataContextProvider");
|
|
77
31
|
}
|
|
78
32
|
return context;
|
|
79
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoDataContext.js","sourceRoot":"","sources":["../../../src/next/context/GeoDataContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"GeoDataContext.js","sourceRoot":"","sources":["../../../src/next/context/GeoDataContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA4C7D,MAAM,cAAc,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAO7E;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAgC;IACpF,OAAO,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA2B,CAAC;AACvF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,UAAU;IACtB,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAE3C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,OAAoC,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Provider that computes pushpin-specific geo data and exposes it through {@link useGeoData}.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* All computations are memoized so the derived values are calculated only when the execution result
|
|
7
|
+
* changes.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export declare function GeoPushpinDataProvider({ children }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=GeoPushpinDataContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoPushpinDataContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/GeoPushpinDataContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAoB3C;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAwC3E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2025 GoodData Corporation
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { DefaultColorPalette } from "@gooddata/sdk-ui";
|
|
5
|
+
import { GeoDataContextProvider } from "./GeoDataContext.js";
|
|
6
|
+
import { useGeoPushpinProps } from "./GeoPushpinPropsContext.js";
|
|
7
|
+
import { useInitialExecution } from "./InitialExecutionContext.js";
|
|
8
|
+
import { getColorStrategy } from "../features/coloring/colorStrategy.js";
|
|
9
|
+
import { getPushpinAvailableLegends } from "../features/data/pushpinTransformation.js";
|
|
10
|
+
import { usePushpinLegendItems } from "../hooks/legend/usePushpinLegendItems.js";
|
|
11
|
+
import { usePushpinDataTransformation } from "../hooks/shared/usePushpinDataTransformation.js";
|
|
12
|
+
const EMPTY_AVAILABLE_LEGENDS = {
|
|
13
|
+
hasCategoryLegend: false,
|
|
14
|
+
hasColorLegend: false,
|
|
15
|
+
hasSizeLegend: false,
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Provider that computes pushpin-specific geo data and exposes it through {@link useGeoData}.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* All computations are memoized so the derived values are calculated only when the execution result
|
|
22
|
+
* changes.
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
export function GeoPushpinDataProvider({ children }) {
|
|
27
|
+
const props = useGeoPushpinProps();
|
|
28
|
+
const { initialDataView } = useInitialExecution();
|
|
29
|
+
const geoData = usePushpinDataTransformation(initialDataView);
|
|
30
|
+
const colorPalette = useMemo(() => props.config?.colorPalette || DefaultColorPalette, [props.config?.colorPalette]);
|
|
31
|
+
const colorMapping = useMemo(() => props.config?.colorMapping || [], [props.config?.colorMapping]);
|
|
32
|
+
const colorStrategy = useMemo(() => geoData && initialDataView
|
|
33
|
+
? getColorStrategy(colorPalette, colorMapping, geoData, initialDataView)
|
|
34
|
+
: null, [colorPalette, colorMapping, geoData, initialDataView]);
|
|
35
|
+
const baseLegendItems = usePushpinLegendItems(initialDataView, geoData, colorStrategy);
|
|
36
|
+
const availableLegends = useMemo(() => {
|
|
37
|
+
if (!geoData) {
|
|
38
|
+
return EMPTY_AVAILABLE_LEGENDS;
|
|
39
|
+
}
|
|
40
|
+
return getPushpinAvailableLegends(baseLegendItems, geoData);
|
|
41
|
+
}, [baseLegendItems, geoData]);
|
|
42
|
+
const value = useMemo(() => ({
|
|
43
|
+
geoData,
|
|
44
|
+
colorStrategy,
|
|
45
|
+
colorPalette,
|
|
46
|
+
baseLegendItems,
|
|
47
|
+
availableLegends,
|
|
48
|
+
}), [geoData, colorStrategy, colorPalette, baseLegendItems, availableLegends]);
|
|
49
|
+
return _jsx(GeoDataContextProvider, { value: value, children: children });
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=GeoPushpinDataContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GeoPushpinDataContext.js","sourceRoot":"","sources":["../../../src/next/context/GeoPushpinDataContext.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAa,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,sBAAsB,EAAmB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAG/F,MAAM,uBAAuB,GAAsB;IAC/C,iBAAiB,EAAE,KAAK;IACxB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,KAAK;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAE,QAAQ,EAA2B;IACxE,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,EAAE,eAAe,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAElD,MAAM,OAAO,GAAG,4BAA4B,CAAC,eAAe,CAAC,CAAC;IAE9D,MAAM,YAAY,GAAG,OAAO,CACxB,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,IAAI,mBAAmB,EACvD,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAC/B,CAAC;IACF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IACnG,MAAM,aAAa,GAAG,OAAO,CACzB,GAAG,EAAE,CACD,OAAO,IAAI,eAAe;QACtB,CAAC,CAAC,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,CAAC;QACxE,CAAC,CAAC,IAAI,EACd,CAAC,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,eAAe,CAAC,CACzD,CAAC;IAEF,MAAM,eAAe,GAAG,qBAAqB,CAAC,eAAe,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAEvF,MAAM,gBAAgB,GAAG,OAAO,CAAC,GAAG,EAAE;QAClC,IAAI,CAAC,OAAO,EAAE,CAAC;YACX,OAAO,uBAAuB,CAAC;QACnC,CAAC;QACD,OAAO,0BAA0B,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;IAE/B,MAAM,KAAK,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC;QACH,OAAO;QACP,aAAa;QACb,YAAY;QACZ,eAAe;QACf,gBAAgB;KACnB,CAAC,EACF,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,CAAC,CAC5E,CAAC;IAEF,OAAO,KAAC,sBAAsB,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA0B,CAAC;AACrF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IPushpinGeoData } from "../../types/shared.js";
|
|
2
2
|
/**
|
|
3
3
|
* Clustering functionality for GeoPushpinChartNext
|
|
4
4
|
*
|
|
@@ -19,5 +19,5 @@ import { IGeoData } from "../../types/shared.js";
|
|
|
19
19
|
*
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare function isClusteringAllowed(geoData:
|
|
22
|
+
export declare function isClusteringAllowed(geoData: IPushpinGeoData, groupNearbyPoints?: boolean): boolean;
|
|
23
23
|
//# sourceMappingURL=clustering.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clustering.d.ts","sourceRoot":"","sources":["../../../../src/next/features/clustering/clustering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"clustering.d.ts","sourceRoot":"","sources":["../../../../src/next/features/clustering/clustering.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;GAIG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,eAAe,EAAE,iBAAiB,UAAO,GAAG,OAAO,CAG/F"}
|
|
@@ -1 +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,
|
|
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,OAAwB,EAAE,iBAAiB,GAAG,IAAI;IAClF,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 { IAreaGeoData } from "../../types/shared.js";
|
|
5
|
+
/**
|
|
6
|
+
* Creates and returns a color strategy for area chart
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* The color strategy determines how colors are assigned to areas 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 - Area geo data structure
|
|
16
|
+
* @param dv - Data view facade
|
|
17
|
+
* @returns Color strategy instance
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAreaColorStrategy(colorPalette: IColorPalette, colorMapping: IColorMapping[], geoData: IAreaGeoData, dv: DataViewFacade): IColorStrategy;
|
|
22
|
+
//# sourceMappingURL=areaColorStrategy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaColorStrategy.d.ts","sourceRoot":"","sources":["../../../../src/next/features/coloring/areaColorStrategy.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,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA4FrD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAChC,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,EAAE,EAC7B,OAAO,EAAE,YAAY,EACrB,EAAE,EAAE,cAAc,GACnB,cAAc,CAWhB"}
|
|
@@ -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 { findAreaAttributesInDimension } from "../data/areaTransformation.js";
|
|
5
|
+
/**
|
|
6
|
+
* Color strategy for GeoAreaChart
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* Manages color assignment for area charts based on either location or segment attributes.
|
|
10
|
+
* Extends the base ColorStrategy from vis-commons with area-specific logic.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
class AreaColorStrategy extends ColorStrategy {
|
|
15
|
+
/**
|
|
16
|
+
* Creates color assignment based on area attributes
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* - If segment attribute exists, colors are assigned by segment
|
|
20
|
+
* - Otherwise, colors are assigned by location (area)
|
|
21
|
+
*/
|
|
22
|
+
createColorAssignment(colorPalette, colorMapping, areaAttribute, 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, areaAttribute, 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, areaAttribute, dv) {
|
|
47
|
+
const mappedColor = getColorFromMapping(areaAttribute, 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: areaAttribute,
|
|
56
|
+
color,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Creates and returns a color strategy for area chart
|
|
62
|
+
*
|
|
63
|
+
* @remarks
|
|
64
|
+
* The color strategy determines how colors are assigned to areas 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 - Area geo data structure
|
|
71
|
+
* @param dv - Data view facade
|
|
72
|
+
* @returns Color strategy instance
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export function getAreaColorStrategy(colorPalette, colorMapping, geoData, dv) {
|
|
77
|
+
const { areaAttribute, segmentByAttribute } = findAreaAttributesInDimension(dv, geoData);
|
|
78
|
+
const areaAttributeHeader = {
|
|
79
|
+
attributeHeader: omit(areaAttribute, "items"),
|
|
80
|
+
};
|
|
81
|
+
return new AreaColorStrategy(colorPalette, colorMapping, areaAttributeHeader, segmentByAttribute, dv);
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=areaColorStrategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaColorStrategy.js","sourceRoot":"","sources":["../../../../src/next/features/coloring/areaColorStrategy.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,EAA8B,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE1G;;;;;;;;GAQG;AACH,MAAM,iBAAkB,SAAQ,aAAa;IACzC;;;;;;OAMG;IACO,qBAAqB,CAC3B,YAA2B,EAC3B,YAA6B,EAC7B,aAAmC,EACnC,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,aAAa,EAAE,EAAE,CAAC;aAClF;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,aAAmC,EACnC,EAAkB;QAElB,MAAM,WAAW,GAAG,mBAAmB,CAAC,aAAa,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;QACzE,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,aAAa;YACzB,KAAK;SACR,CAAC;IACN,CAAC;CACJ;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,oBAAoB,CAChC,YAA2B,EAC3B,YAA6B,EAC7B,OAAqB,EACrB,EAAkB;IAElB,MAAM,EAAE,aAAa,EAAE,kBAAkB,EAAE,GAA+B,6BAA6B,CACnG,EAAE,EACF,OAAO,CACV,CAAC;IAEF,MAAM,mBAAmB,GAAyB;QAC9C,eAAe,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;KAChD,CAAC;IAEF,OAAO,IAAI,iBAAiB,CAAC,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAC1G,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
|
|
2
|
+
/**
|
|
3
|
+
* Color for filled geographic areas
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export interface IAreaAreaColor {
|
|
8
|
+
/**
|
|
9
|
+
* Fill color for the area (CSS color string or RGB color value)
|
|
10
|
+
*/
|
|
11
|
+
fill: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets colors for geographic areas based on color strategy
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Retrieves fill colors for geographic areas from the color strategy.
|
|
18
|
+
* If segments exist, uses segment-based coloring. Otherwise, uses color measure values for gradients.
|
|
19
|
+
*
|
|
20
|
+
* @param colorData - Array of color measure values
|
|
21
|
+
* @param segmentData - Array of segment values
|
|
22
|
+
* @param colorStrategy - Color strategy to use
|
|
23
|
+
* @returns Array of area colors matching the data
|
|
24
|
+
*
|
|
25
|
+
* @alpha
|
|
26
|
+
*/
|
|
27
|
+
export declare function getAreaAreaColors(colorData: number[], segmentData: string[], colorStrategy: IColorStrategy | null): IAreaAreaColor[];
|
|
28
|
+
//# sourceMappingURL=areaPalette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaPalette.d.ts","sourceRoot":"","sources":["../../../../src/next/features/coloring/areaPalette.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,MAAM,EAAE,EACnB,WAAW,EAAE,MAAM,EAAE,EACrB,aAAa,EAAE,cAAc,GAAG,IAAI,GACrC,cAAc,EAAE,CAiBlB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// (C) 2025 GoodData Corporation
|
|
2
|
+
import { getPushpinColors } from "./palette.js";
|
|
3
|
+
const DEFAULT_AREA_COLOR = "#20B2E2";
|
|
4
|
+
function mapPushpinColorsToAreas(pushpinColors) {
|
|
5
|
+
if (pushpinColors.length === 0) {
|
|
6
|
+
return [{ fill: DEFAULT_AREA_COLOR }];
|
|
7
|
+
}
|
|
8
|
+
return pushpinColors.map((pushpinColor) => ({
|
|
9
|
+
fill: pushpinColor.background ?? DEFAULT_AREA_COLOR,
|
|
10
|
+
}));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets colors for geographic areas based on color strategy
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Retrieves fill colors for geographic areas from the color strategy.
|
|
17
|
+
* If segments exist, uses segment-based coloring. Otherwise, uses color measure values for gradients.
|
|
18
|
+
*
|
|
19
|
+
* @param colorData - Array of color measure values
|
|
20
|
+
* @param segmentData - Array of segment values
|
|
21
|
+
* @param colorStrategy - Color strategy to use
|
|
22
|
+
* @returns Array of area colors matching the data
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
export function getAreaAreaColors(colorData, segmentData, colorStrategy) {
|
|
27
|
+
if (!colorStrategy) {
|
|
28
|
+
return [{ fill: DEFAULT_AREA_COLOR }];
|
|
29
|
+
}
|
|
30
|
+
if (segmentData.length > 0) {
|
|
31
|
+
// Segment-based coloring should provide a stable color per category.
|
|
32
|
+
const pushpinColors = getPushpinColors([], segmentData, colorStrategy);
|
|
33
|
+
return mapPushpinColorsToAreas(pushpinColors);
|
|
34
|
+
}
|
|
35
|
+
if (colorData.length > 0) {
|
|
36
|
+
const pushpinColors = getPushpinColors(colorData, [], colorStrategy);
|
|
37
|
+
return mapPushpinColorsToAreas(pushpinColors);
|
|
38
|
+
}
|
|
39
|
+
return [{ fill: DEFAULT_AREA_COLOR }];
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=areaPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"areaPalette.js","sourceRoot":"","sources":["../../../../src/next/features/coloring/areaPalette.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAIhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAehD,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC,SAAS,uBAAuB,CAAC,aAA8B;IAC3D,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;QACxC,IAAI,EAAE,YAAY,CAAC,UAAU,IAAI,kBAAkB;KACtD,CAAC,CAAC,CAAC;AACR,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAC7B,SAAmB,EACnB,WAAqB,EACrB,aAAoC;IAEpC,IAAI,CAAC,aAAa,EAAE,CAAC;QACjB,OAAO,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,qEAAqE;QACrE,MAAM,aAAa,GAAG,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;QACvE,OAAO,uBAAuB,CAAC,aAAa,CAAC,CAAC;IAClD,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,aAAa,GAAG,gBAAgB,CAAC,SAAiC,EAAE,EAAE,EAAE,aAAa,CAAC,CAAC;QAC7F,OAAO,uBAAuB,CAAC,aAAa,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IColorPalette } from "@gooddata/sdk-model";
|
|
2
2
|
import { DataViewFacade } from "@gooddata/sdk-ui";
|
|
3
3
|
import { IColorMapping, IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
-
import {
|
|
4
|
+
import { IPushpinGeoData } from "../../types/shared.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates and returns a color strategy for geo chart
|
|
7
7
|
*
|
|
@@ -18,5 +18,5 @@ import { IGeoData } from "../../types/shared.js";
|
|
|
18
18
|
*
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
export declare function getColorStrategy(colorPalette: IColorPalette, colorMapping: IColorMapping[], geoData:
|
|
21
|
+
export declare function getColorStrategy(colorPalette: IColorPalette, colorMapping: IColorMapping[], geoData: IPushpinGeoData, dv: DataViewFacade): IColorStrategy;
|
|
22
22
|
//# sourceMappingURL=colorStrategy.d.ts.map
|
|
@@ -1 +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,
|
|
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,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA+FxD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,EAAE,EAC7B,OAAO,EAAE,eAAe,EACxB,EAAE,EAAE,cAAc,GACnB,cAAc,CAehB"}
|