@gooddata/sdk-ui-geo 11.54.0-alpha.4 → 11.54.0-alpha.6
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/package.json +11 -11
- package/esm/next/context/GeoDataContext.d.ts +0 -16
- package/esm/next/context/GeoDataContext.d.ts.map +0 -1
- package/esm/next/context/GeoDataContext.js +0 -19
- package/esm/next/context/createGeoContext.d.ts +0 -36
- package/esm/next/context/createGeoContext.d.ts.map +0 -1
- package/esm/next/context/createGeoContext.js +0 -44
- package/esm/next/types/common/drilling.d.ts +0 -10
- package/esm/next/types/common/drilling.d.ts.map +0 -1
- package/esm/next/types/common/drilling.js +0 -2
- package/esm/next/types/props/areaChart/internal.d.ts +0 -43
- package/esm/next/types/props/areaChart/internal.d.ts.map +0 -1
- package/esm/next/types/props/areaChart/internal.js +0 -2
- package/esm/next/types/props/pushpinChart/internal.d.ts +0 -43
- package/esm/next/types/props/pushpinChart/internal.d.ts.map +0 -1
- package/esm/next/types/props/pushpinChart/internal.js +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-geo",
|
|
3
|
-
"version": "11.54.0-alpha.
|
|
3
|
+
"version": "11.54.0-alpha.6",
|
|
4
4
|
"description": "GoodData.UI SDK - Geo Charts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"ts-invariant": "0.10.3",
|
|
44
44
|
"tslib": "2.8.1",
|
|
45
45
|
"uuid": "11.1.1",
|
|
46
|
-
"@gooddata/sdk-backend-spi": "11.54.0-alpha.
|
|
47
|
-
"@gooddata/sdk-model": "11.54.0-alpha.
|
|
48
|
-
"@gooddata/sdk-ui": "11.54.0-alpha.
|
|
49
|
-
"@gooddata/sdk-ui-kit": "11.54.0-alpha.
|
|
50
|
-
"@gooddata/sdk-ui-theme-provider": "11.54.0-alpha.
|
|
51
|
-
"@gooddata/sdk-ui-vis-commons": "11.54.0-alpha.
|
|
46
|
+
"@gooddata/sdk-backend-spi": "11.54.0-alpha.6",
|
|
47
|
+
"@gooddata/sdk-model": "11.54.0-alpha.6",
|
|
48
|
+
"@gooddata/sdk-ui": "11.54.0-alpha.6",
|
|
49
|
+
"@gooddata/sdk-ui-kit": "11.54.0-alpha.6",
|
|
50
|
+
"@gooddata/sdk-ui-theme-provider": "11.54.0-alpha.6",
|
|
51
|
+
"@gooddata/sdk-ui-vis-commons": "11.54.0-alpha.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
"typescript": "5.9.3",
|
|
92
92
|
"vitest": "4.1.8",
|
|
93
93
|
"vitest-dom": "0.1.1",
|
|
94
|
-
"@gooddata/eslint-config": "11.54.0-alpha.
|
|
95
|
-
"@gooddata/
|
|
96
|
-
"@gooddata/
|
|
97
|
-
"@gooddata/stylelint-config": "11.54.0-alpha.
|
|
94
|
+
"@gooddata/eslint-config": "11.54.0-alpha.6",
|
|
95
|
+
"@gooddata/oxlint-config": "11.54.0-alpha.6",
|
|
96
|
+
"@gooddata/sdk-backend-mockingbird": "11.54.0-alpha.6",
|
|
97
|
+
"@gooddata/stylelint-config": "11.54.0-alpha.6"
|
|
98
98
|
},
|
|
99
99
|
"peerDependencies": {
|
|
100
100
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type IColorStrategy } from "@gooddata/sdk-ui-vis-commons";
|
|
2
|
-
import { type IAvailableLegends, type IGeoLegendItem } from "../types/common/legends.js";
|
|
3
|
-
import type { IGeoCommonData } from "../types/geoData/common.js";
|
|
4
|
-
export interface IGeoDataContext<TGeoData extends IGeoCommonData = IGeoCommonData> {
|
|
5
|
-
geoData: TGeoData | null;
|
|
6
|
-
colorStrategy: IColorStrategy | null;
|
|
7
|
-
baseLegendItems: IGeoLegendItem[];
|
|
8
|
-
availableLegends: IAvailableLegends;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Hook to access geographic data derived from the primary layer.
|
|
12
|
-
*
|
|
13
|
-
* @internal
|
|
14
|
-
*/
|
|
15
|
-
export declare function useGeoData(): IGeoDataContext;
|
|
16
|
-
//# sourceMappingURL=GeoDataContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GeoDataContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/GeoDataContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc;IAC7E,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC;IACzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,gBAAgB,EAAE,iBAAiB,CAAC;CACvC;AAED;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,eAAe,CAa5C"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// (C) 2025-2026 GoodData Corporation
|
|
2
|
-
import { useGeoLayers } from "./GeoLayersContext.js";
|
|
3
|
-
/**
|
|
4
|
-
* Hook to access geographic data derived from the primary layer.
|
|
5
|
-
*
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export function useGeoData() {
|
|
9
|
-
const { primaryLayer } = useGeoLayers();
|
|
10
|
-
if (!primaryLayer) {
|
|
11
|
-
throw new Error("useGeoData requires a primary layer in GeoLayersContext");
|
|
12
|
-
}
|
|
13
|
-
return {
|
|
14
|
-
geoData: primaryLayer.geoData ?? null,
|
|
15
|
-
colorStrategy: primaryLayer.colorStrategy,
|
|
16
|
-
baseLegendItems: primaryLayer.baseLegendItems,
|
|
17
|
-
availableLegends: primaryLayer.availableLegends,
|
|
18
|
-
};
|
|
19
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type Context } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Creates a typed context with a custom hook that throws if used outside provider.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This factory reduces boilerplate for creating React contexts with the common pattern:
|
|
7
|
-
* 1. Create context with undefined default
|
|
8
|
-
* 2. Create a useHook that throws if context is undefined
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```typescript
|
|
12
|
-
* interface IMyContext {
|
|
13
|
-
* value: string;
|
|
14
|
-
* }
|
|
15
|
-
*
|
|
16
|
-
* const { Context: MyContext, useContextValue: useMyContext } = createGeoContext<IMyContext>("MyContext");
|
|
17
|
-
*
|
|
18
|
-
* // In provider component:
|
|
19
|
-
* <MyContext.Provider value={{ value: "hello" }}>
|
|
20
|
-
* {children}
|
|
21
|
-
* </MyContext.Provider>
|
|
22
|
-
*
|
|
23
|
-
* // In consumer:
|
|
24
|
-
* const { value } = useMyContext(); // throws if not inside provider
|
|
25
|
-
* ```
|
|
26
|
-
*
|
|
27
|
-
* @param name - Name for the context (used in error messages)
|
|
28
|
-
* @returns Object with Context and useContextValue hook
|
|
29
|
-
*
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
export declare function createGeoContext<T>(name: string): {
|
|
33
|
-
Context: Context<T | undefined>;
|
|
34
|
-
useContextValue: () => T;
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=createGeoContext.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createGeoContext.d.ts","sourceRoot":"","sources":["../../../src/next/context/createGeoContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAA6B,MAAM,OAAO,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG;IAC/C,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC,CAAC;CAC5B,CAaA"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// (C) 2025 GoodData Corporation
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
3
|
-
/**
|
|
4
|
-
* Creates a typed context with a custom hook that throws if used outside provider.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* This factory reduces boilerplate for creating React contexts with the common pattern:
|
|
8
|
-
* 1. Create context with undefined default
|
|
9
|
-
* 2. Create a useHook that throws if context is undefined
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```typescript
|
|
13
|
-
* interface IMyContext {
|
|
14
|
-
* value: string;
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
* const { Context: MyContext, useContextValue: useMyContext } = createGeoContext<IMyContext>("MyContext");
|
|
18
|
-
*
|
|
19
|
-
* // In provider component:
|
|
20
|
-
* <MyContext.Provider value={{ value: "hello" }}>
|
|
21
|
-
* {children}
|
|
22
|
-
* </MyContext.Provider>
|
|
23
|
-
*
|
|
24
|
-
* // In consumer:
|
|
25
|
-
* const { value } = useMyContext(); // throws if not inside provider
|
|
26
|
-
* ```
|
|
27
|
-
*
|
|
28
|
-
* @param name - Name for the context (used in error messages)
|
|
29
|
-
* @returns Object with Context and useContextValue hook
|
|
30
|
-
*
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export function createGeoContext(name) {
|
|
34
|
-
const Context = createContext(undefined);
|
|
35
|
-
Context.displayName = name;
|
|
36
|
-
function useContextValue() {
|
|
37
|
-
const value = useContext(Context);
|
|
38
|
-
if (value === undefined) {
|
|
39
|
-
throw new Error(`use${name} must be used within a ${name}Provider`);
|
|
40
|
-
}
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
return { Context, useContextValue };
|
|
44
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ObjRef } from "@gooddata/sdk-model";
|
|
2
|
-
/**
|
|
3
|
-
* Parent attribute information extracted from a coordinate display form.
|
|
4
|
-
*/
|
|
5
|
-
export interface IParentAttributeInfo {
|
|
6
|
-
ref: ObjRef;
|
|
7
|
-
name: string;
|
|
8
|
-
key: string;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=drilling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drilling.d.ts","sourceRoot":"","sources":["../../../../src/next/types/common/drilling.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACf"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal Props for GeoAreaChart
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* This module contains internal types used by the GeoAreaChart implementation.
|
|
6
|
-
* These types are **not part of the public API** and may change without notice.
|
|
7
|
-
*
|
|
8
|
-
* **Why are these internal?**
|
|
9
|
-
* - `ICoreGeoAreaChartProps` uses the `IDataVisualizationProps` pattern with
|
|
10
|
-
* pre-built executions. The area attribute is not included because it is
|
|
11
|
-
* resolved from the execution context (not passed as a prop).
|
|
12
|
-
*
|
|
13
|
-
* **When might you need these?**
|
|
14
|
-
* - Building custom wrappers around the core area chart
|
|
15
|
-
* - Testing internal components
|
|
16
|
-
*
|
|
17
|
-
* **Public alternatives:**
|
|
18
|
-
* - Use {@link IGeoAreaChartProps} from `./public.js` for component props
|
|
19
|
-
* - Use {@link IGeoAreaChartBaseProps} for props without required area
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
import { type IDataVisualizationProps } from "@gooddata/sdk-ui";
|
|
25
|
-
import { type IGeoAreaChartBaseProps } from "./public.js";
|
|
26
|
-
/**
|
|
27
|
-
* Internal props for GeoAreaChart component.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This type extends `IDataVisualizationProps` to provide the `execution` and
|
|
31
|
-
* `executions` props pattern used by GoodData.UI visualization internals.
|
|
32
|
-
*
|
|
33
|
-
* Unlike the public `IGeoAreaChartProps`, this interface does not include
|
|
34
|
-
* the area attribute. In the internal/pluggable vis context, the area is
|
|
35
|
-
* resolved from the execution context rather than passed as a prop.
|
|
36
|
-
*
|
|
37
|
-
* Use {@link IGeoAreaChartProps} for the public-facing props interface.
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
export interface ICoreGeoAreaChartProps extends IGeoAreaChartBaseProps, IDataVisualizationProps {
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../src/next/types/props/areaChart/internal.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,sBAAuB,SAAQ,sBAAsB,EAAE,uBAAuB;CAAG"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal props for GeoPushpinChart
|
|
3
|
-
*
|
|
4
|
-
* @remarks
|
|
5
|
-
* This module contains internal types used by the GeoPushpinChart implementation.
|
|
6
|
-
* These types are **not part of the public API** and may change without notice.
|
|
7
|
-
*
|
|
8
|
-
* **Why are these internal?**
|
|
9
|
-
* - `ICoreGeoPushpinChartProps` uses the `IDataVisualizationProps` pattern with
|
|
10
|
-
* pre-built executions. The latitude/longitude attributes are not included because
|
|
11
|
-
* they are resolved from the execution context (not passed as props).
|
|
12
|
-
*
|
|
13
|
-
* **When might you need these?**
|
|
14
|
-
* - Building custom wrappers around the core pushpin chart
|
|
15
|
-
* - Testing internal components
|
|
16
|
-
*
|
|
17
|
-
* **Public alternatives:**
|
|
18
|
-
* - Use {@link IGeoPushpinChartProps} from `./public.js` for component props
|
|
19
|
-
* - Use {@link IGeoPushpinChartBaseProps} for props without required latitude/longitude
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
* @internal
|
|
23
|
-
*/
|
|
24
|
-
import { type IDataVisualizationProps } from "@gooddata/sdk-ui";
|
|
25
|
-
import { type IGeoPushpinChartBaseProps } from "./public.js";
|
|
26
|
-
/**
|
|
27
|
-
* Internal props for GeoPushpinChart component.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This type extends `IDataVisualizationProps` to provide the `execution` and
|
|
31
|
-
* `executions` props pattern used by GoodData.UI visualization internals.
|
|
32
|
-
*
|
|
33
|
-
* Unlike the public `IGeoPushpinChartProps`, this interface does not include
|
|
34
|
-
* the latitude and longitude attributes. In the internal/pluggable vis context,
|
|
35
|
-
* these are resolved from the execution context rather than passed as props.
|
|
36
|
-
*
|
|
37
|
-
* Use {@link IGeoPushpinChartProps} for the public-facing props interface.
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
export interface ICoreGeoPushpinChartProps extends IGeoPushpinChartBaseProps, IDataVisualizationProps {
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../../../src/next/types/props/pushpinChart/internal.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,yBAA0B,SAAQ,yBAAyB,EAAE,uBAAuB;CAAG"}
|