@gooddata/sdk-ui-geo 10.37.0 → 10.38.0-alpha.1
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/core/MapboxTokenProvider.d.ts.map +1 -1
- package/esm/core/MapboxTokenProvider.js +5 -9
- package/esm/core/MapboxTokenProvider.js.map +1 -1
- package/esm/core/geoChart/GeoChartOptionsWrapper.d.ts +1 -11
- package/esm/core/geoChart/GeoChartOptionsWrapper.d.ts.map +1 -1
- package/esm/core/geoChart/GeoChartOptionsWrapper.js +50 -61
- package/esm/core/geoChart/GeoChartOptionsWrapper.js.map +1 -1
- package/esm/core/geoChart/GeoChartRenderer.d.ts +1 -43
- package/esm/core/geoChart/GeoChartRenderer.d.ts.map +1 -1
- package/esm/core/geoChart/GeoChartRenderer.js +350 -264
- package/esm/core/geoChart/GeoChartRenderer.js.map +1 -1
- package/esm/core/geoChart/GeoValidatorHOC.d.ts +4 -1
- package/esm/core/geoChart/GeoValidatorHOC.d.ts.map +1 -1
- package/esm/core/geoChart/GeoValidatorHOC.js +74 -99
- package/esm/core/geoChart/GeoValidatorHOC.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapboxTokenProvider.d.ts","sourceRoot":"","sources":["../../src/core/MapboxTokenProvider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,kBAAkB;iBAAsC,MAAM,GAAG,SAAS;EAErF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAOvF,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,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 2021-2025 GoodData Corporation
|
|
2
2
|
import React, { useContext } from "react";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
4
|
/**
|
|
@@ -17,14 +17,10 @@ export const MapboxTokenProvider = ({ token, children, }) => {
|
|
|
17
17
|
* @internal
|
|
18
18
|
*/
|
|
19
19
|
export function withMapboxToken(InnerComponent) {
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const props = this.props;
|
|
25
|
-
return (React.createElement(React.Fragment, null,
|
|
26
|
-
React.createElement(InnerComponent, { ...props, config: enrichMapboxToken(props.config, mapboxToken) })));
|
|
27
|
-
}
|
|
20
|
+
return function MapboxTokenHOC(props) {
|
|
21
|
+
const { mapboxToken } = useContext(MapboxTokenContext);
|
|
22
|
+
return (React.createElement(React.Fragment, null,
|
|
23
|
+
React.createElement(InnerComponent, { ...props, config: enrichMapboxToken(props.config, mapboxToken) })));
|
|
28
24
|
};
|
|
29
25
|
}
|
|
30
26
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapboxTokenProvider.js","sourceRoot":"","sources":["../../src/core/MapboxTokenProvider.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAsC;IACvF,WAAW,EAAE,SAAS;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA4D,CAAC,EACzF,KAAK,EACL,QAAQ,GACX,EAAE,EAAE;IACD,OAAO,CACH,oBAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,IAAG,QAAQ,CAA+B,CACvG,CAAC;AACN,CAAC,CAAC;AAEF;;GA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B,CAAC,WAAoB;IACrD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;IACjD,SAAS,CAAC,KAAK,EAAE,8EAA8E,CAAC,CAAC;IAEjG,OAAO,KAAK,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,WAAoB;IAC/C,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAE/C,OAAO,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;AAC9C,CAAC"}
|
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IGeoChartInnerProps } from "./GeoChartInner.js";
|
|
3
3
|
import { IColorStrategy, IPushpinCategoryLegendItem } from "@gooddata/sdk-ui-vis-commons";
|
|
4
|
-
export declare
|
|
5
|
-
private readonly emptyHeaderString;
|
|
6
|
-
private readonly nullHeaderString;
|
|
7
|
-
private readonly errorMap;
|
|
8
|
-
constructor(props: IGeoChartInnerProps);
|
|
9
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
10
|
-
renderVisualization(): React.ReactNode;
|
|
11
|
-
private buildGeoChartOptions;
|
|
12
|
-
private getCategoryLegendItems;
|
|
13
|
-
private validateData;
|
|
14
|
-
}
|
|
4
|
+
export declare function GeoChartOptionsWrapper(props: IGeoChartInnerProps): React.JSX.Element | null;
|
|
15
5
|
export declare function createCategoryLegendItems(colorStrategy: IColorStrategy, emptyHeaderString: string, nullHeaderString: string): IPushpinCategoryLegendItem[];
|
|
16
6
|
//# sourceMappingURL=GeoChartOptionsWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoChartOptionsWrapper.d.ts","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartOptionsWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"GeoChartOptionsWrapper.d.ts","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartOptionsWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,OAAO,EAAwC,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAU/F,OAAO,EAEH,cAAc,EACd,0BAA0B,EAC7B,MAAM,8BAA8B,CAAC;AAGtC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,mBAAmB,4BAsGhE;AAED,wBAAgB,yBAAyB,CACrC,aAAa,EAAE,cAAc,EAC7B,iBAAiB,EAAE,MAAM,EACzB,gBAAgB,EAAE,MAAM,GACzB,0BAA0B,EAAE,CAe9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2020-2025 GoodData Corporation
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { invariant } from "ts-invariant";
|
|
4
4
|
import { getGeoAttributeHeaderItems, isDataOfReasonableSize } from "./helpers/geoChart/common.js";
|
|
5
5
|
import { getGeoData } from "./helpers/geoChart/data.js";
|
|
@@ -9,80 +9,69 @@ import { DataViewFacade, ErrorCodes, newErrorMapping, ErrorComponent as DefaultE
|
|
|
9
9
|
import { isResultAttributeHeader } from "@gooddata/sdk-model";
|
|
10
10
|
import { getValidColorPalette, } from "@gooddata/sdk-ui-vis-commons";
|
|
11
11
|
import { getColorStrategy } from "./colorStrategy/geoChart.js";
|
|
12
|
-
export
|
|
13
|
-
emptyHeaderString;
|
|
14
|
-
nullHeaderString
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.errorMap = newErrorMapping(props.intl);
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const { dataView, error, isLoading } = this.props;
|
|
24
|
-
// if explicitly null, do not default the components to allow them to be disabled
|
|
25
|
-
const ErrorComponent = this.props.ErrorComponent === null ? null : (this.props.ErrorComponent ?? DefaultErrorComponent);
|
|
26
|
-
const LoadingComponent = this.props.LoadingComponent === null
|
|
27
|
-
? null
|
|
28
|
-
: (this.props.LoadingComponent ?? DefaultLoadingComponent);
|
|
29
|
-
if (error) {
|
|
30
|
-
const errorProps = this.errorMap[Object.prototype.hasOwnProperty.call(this.errorMap, error)
|
|
31
|
-
? error
|
|
32
|
-
: ErrorCodes.UNKNOWN_ERROR];
|
|
33
|
-
return ErrorComponent ? React.createElement(ErrorComponent, { code: error, ...errorProps }) : null;
|
|
34
|
-
}
|
|
35
|
-
if (isLoading || !dataView) {
|
|
36
|
-
return LoadingComponent ? React.createElement(LoadingComponent, null) : null;
|
|
12
|
+
export function GeoChartOptionsWrapper(props) {
|
|
13
|
+
const emptyHeaderString = useMemo(() => props.intl.formatMessage({ id: "visualization.emptyValue" }), [props.intl]);
|
|
14
|
+
const nullHeaderString = useMemo(() => props.intl.formatMessage({ id: "visualization.emptyValue" }), // TODO: RAIL-4360 replace by proper null header string id when available
|
|
15
|
+
[props.intl]);
|
|
16
|
+
const errorMap = useMemo(() => newErrorMapping(props.intl), [props.intl]);
|
|
17
|
+
const validateData = useCallback((geoData, props) => {
|
|
18
|
+
if (!props.dataView) {
|
|
19
|
+
return;
|
|
37
20
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
renderVisualization() {
|
|
41
|
-
const { dataView, onDataTooLarge } = this.props;
|
|
21
|
+
const { dataView } = props;
|
|
22
|
+
const limit = props.config?.limit ?? DEFAULT_DATA_POINTS_LIMIT;
|
|
42
23
|
const dv = DataViewFacade.for(dataView);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const errorMessage = `LocationData limit: ${limit} actual: ${locationData.length}`;
|
|
52
|
-
onDataTooLarge(undefined, errorMessage);
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
const geoChartOptions = this.buildGeoChartOptions(geoData, this.props);
|
|
56
|
-
return React.createElement(GeoChartInner, { ...this.props, geoChartOptions: geoChartOptions });
|
|
57
|
-
}
|
|
58
|
-
buildGeoChartOptions = (geoData, props) => {
|
|
24
|
+
return {
|
|
25
|
+
isDataTooLarge: !isDataOfReasonableSize(dv, geoData, limit),
|
|
26
|
+
};
|
|
27
|
+
}, []);
|
|
28
|
+
const getCategoryLegendItems = useCallback((colorStrategy) => {
|
|
29
|
+
return createCategoryLegendItems(colorStrategy, emptyHeaderString, nullHeaderString);
|
|
30
|
+
}, [emptyHeaderString, nullHeaderString]);
|
|
31
|
+
const buildGeoChartOptions = useCallback((geoData, props) => {
|
|
59
32
|
const { segment } = geoData;
|
|
60
33
|
const { config: { colors = [], colorPalette = [], colorMapping = [] } = {}, dataView } = props;
|
|
61
34
|
const dv = DataViewFacade.for(dataView);
|
|
62
35
|
const palette = getValidColorPalette(colors, colorPalette);
|
|
63
36
|
const colorStrategy = getColorStrategy(palette, colorMapping, geoData, dv);
|
|
64
|
-
const categoryItems = segment ?
|
|
37
|
+
const categoryItems = segment ? getCategoryLegendItems(colorStrategy) : [];
|
|
65
38
|
return {
|
|
66
39
|
geoData,
|
|
67
40
|
categoryItems,
|
|
68
41
|
colorStrategy,
|
|
69
42
|
colorPalette: palette,
|
|
70
43
|
};
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
validateData = (geoData, props) => {
|
|
76
|
-
if (!props.dataView) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
const { dataView } = props;
|
|
80
|
-
const limit = props.config?.limit ?? DEFAULT_DATA_POINTS_LIMIT;
|
|
44
|
+
}, [getCategoryLegendItems]);
|
|
45
|
+
const renderVisualization = useCallback(() => {
|
|
46
|
+
const { dataView, onDataTooLarge } = props;
|
|
81
47
|
const dv = DataViewFacade.for(dataView);
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
48
|
+
const geoData = getGeoData(dv, emptyHeaderString, nullHeaderString);
|
|
49
|
+
const validationResult = validateData(geoData, props);
|
|
50
|
+
if (validationResult?.isDataTooLarge) {
|
|
51
|
+
invariant(onDataTooLarge, "GeoChart's onDataTooLarge callback is missing.");
|
|
52
|
+
const { location } = geoData;
|
|
53
|
+
const attributeHeaderItems = getGeoAttributeHeaderItems(dv, geoData);
|
|
54
|
+
const locationData = location !== undefined ? attributeHeaderItems[location.index] : [];
|
|
55
|
+
const limit = props.config?.limit ?? DEFAULT_DATA_POINTS_LIMIT;
|
|
56
|
+
const errorMessage = `LocationData limit: ${limit} actual: ${locationData.length}`;
|
|
57
|
+
onDataTooLarge(undefined, errorMessage);
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const geoChartOptions = buildGeoChartOptions(geoData, props);
|
|
61
|
+
return React.createElement(GeoChartInner, { ...props, geoChartOptions: geoChartOptions });
|
|
62
|
+
}, [buildGeoChartOptions, emptyHeaderString, nullHeaderString, props, validateData]);
|
|
63
|
+
const { dataView, error, isLoading } = props;
|
|
64
|
+
// if explicitly null, do not default the components to allow them to be disabled
|
|
65
|
+
const ErrorComponent = props.ErrorComponent === null ? null : (props.ErrorComponent ?? DefaultErrorComponent);
|
|
66
|
+
const LoadingComponent = props.LoadingComponent === null ? null : (props.LoadingComponent ?? DefaultLoadingComponent);
|
|
67
|
+
if (error) {
|
|
68
|
+
const errorProps = errorMap[Object.prototype.hasOwnProperty.call(errorMap, error) ? error : ErrorCodes.UNKNOWN_ERROR];
|
|
69
|
+
return ErrorComponent ? React.createElement(ErrorComponent, { code: error, ...errorProps }) : null;
|
|
70
|
+
}
|
|
71
|
+
if (isLoading || !dataView) {
|
|
72
|
+
return LoadingComponent ? React.createElement(LoadingComponent, null) : null;
|
|
73
|
+
}
|
|
74
|
+
return renderVisualization();
|
|
86
75
|
}
|
|
87
76
|
export function createCategoryLegendItems(colorStrategy, emptyHeaderString, nullHeaderString) {
|
|
88
77
|
const colorAssignment = colorStrategy.getColorAssignment();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoChartOptionsWrapper.js","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartOptionsWrapper.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GeoChartOptionsWrapper.js","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartOptionsWrapper.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,aAAa,EAA8C,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EACH,cAAc,EACd,UAAU,EACV,eAAe,EACf,cAAc,IAAI,qBAAqB,EACvC,gBAAgB,IAAI,uBAAuB,GAC9C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACH,oBAAoB,GAGvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,MAAM,UAAU,sBAAsB,CAAC,KAA0B;IAC7D,MAAM,iBAAiB,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,0BAA0B,EAAE,CAAC,EAClE,CAAC,KAAK,CAAC,IAAI,CAAC,CACf,CAAC;IACF,MAAM,gBAAgB,GAAG,OAAO,CAC5B,GAAG,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AC,CAAC,oBAAC,gBAAgB,OAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAC1D,CAAC;IAED,OAAO,mBAAmB,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,yBAAyB,CACrC,aAA6B,EAC7B,iBAAyB,EACzB,gBAAwB;IAExB,MAAM,eAAe,GAAG,aAAa,CAAC,kBAAkB,EAAE,CAAC;IAC3D,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,EAA8B,EAAE;QACzE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,uBAAuB,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1D,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,mBAAmB;YACrC,CAAC,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;QAC1D,MAAM,KAAK,GAAG,aAAa,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACzD,OAAO;YACH,GAAG,EAAE,GAAG,IAAI,gBAAgB;YAC5B,IAAI,EAAE,IAAI,IAAI,gBAAgB;YAC9B,KAAK;YACL,WAAW;YACX,SAAS,EAAE,IAAI;SAClB,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -19,48 +19,6 @@ export interface IGeoChartRendererProps extends WrappedComponentProps {
|
|
|
19
19
|
onZoomChanged(zoom: number): void;
|
|
20
20
|
onError?: OnError;
|
|
21
21
|
}
|
|
22
|
-
declare
|
|
23
|
-
static defaultProps: Pick<IGeoChartRendererProps, "config" | "afterRender" | "onZoomChanged" | "onCenterPositionChanged">;
|
|
24
|
-
private chart;
|
|
25
|
-
private tooltip;
|
|
26
|
-
private navigationControlButton;
|
|
27
|
-
private chartRef;
|
|
28
|
-
constructor(props: IGeoChartRendererProps);
|
|
29
|
-
componentDidUpdate(prevProps: IGeoChartRendererProps): void;
|
|
30
|
-
componentDidMount(): void;
|
|
31
|
-
componentWillUnmount(): void;
|
|
32
|
-
setChartRef: (ref: HTMLElement | null) => void;
|
|
33
|
-
private fullMapInit;
|
|
34
|
-
private generateLocale;
|
|
35
|
-
createMap: () => void;
|
|
36
|
-
render(): React.JSX.Element;
|
|
37
|
-
private updateMapWithConfig;
|
|
38
|
-
private resetMap;
|
|
39
|
-
private shouldResetMap;
|
|
40
|
-
private isViewportFrozen;
|
|
41
|
-
private createMapControls;
|
|
42
|
-
private removeMapControls;
|
|
43
|
-
private addMapControls;
|
|
44
|
-
private toggleMapControls;
|
|
45
|
-
private toggleInteractionEvents;
|
|
46
|
-
private updatePanAndZoom;
|
|
47
|
-
private updateViewport;
|
|
48
|
-
private setFilterMap;
|
|
49
|
-
private handleMapEvent;
|
|
50
|
-
private handleMapIdle;
|
|
51
|
-
private setupMap;
|
|
52
|
-
private adjustChartHeight;
|
|
53
|
-
private handleLayerLoaded;
|
|
54
|
-
private createTooltip;
|
|
55
|
-
private cleanupMap;
|
|
56
|
-
private removeLayer;
|
|
57
|
-
private removeMap;
|
|
58
|
-
private handlePushpinMoveEnd;
|
|
59
|
-
private handlePushpinZoomEnd;
|
|
60
|
-
private handleMapboxError;
|
|
61
|
-
private handleMapClick;
|
|
62
|
-
private handlePushpinMouseEnter;
|
|
63
|
-
private handlePushpinMouseLeave;
|
|
64
|
-
}
|
|
22
|
+
declare const GeoChartRenderer: React.FC<IGeoChartRendererProps>;
|
|
65
23
|
export default GeoChartRenderer;
|
|
66
24
|
//# sourceMappingURL=GeoChartRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoChartRenderer.d.ts","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"GeoChartRenderer.d.ts","sourceRoot":"","sources":["../../../src/core/geoChart/GeoChartRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAyB9D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AASrE,OAAO,EACH,YAAY,EACZ,gBAAgB,EAEhB,OAAO,EAEV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,qBAAqB;IACjE,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,WAAW,EAAE,YAAY,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,QAAQ,CAAC;IAClB,aAAa,EAAE,cAAc,CAAC;IAC9B,WAAW,IAAI,IAAI,CAAC;IACpB,uBAAuB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAClD,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqkBtD,CAAC;AAWF,eAAe,gBAAgB,CAAC"}
|