@gooddata/sdk-ui-vis-commons 11.58.0-alpha.2 → 11.58.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.
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Lookup-key helpers shared by
|
|
2
|
+
* Lookup-key helpers shared by {@link buildLookupTable} and the chart-family hover-time
|
|
3
3
|
* key builders. Both sides must produce identical strings.
|
|
4
4
|
*
|
|
5
|
-
* Format: `${
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
5
|
+
* Format: `${localIdentifier}:${uri}` per attribute, joined by `|` after lexicographic sort.
|
|
6
|
+
*
|
|
7
|
+
* The identity is the attribute's `localIdentifier`, not its display form identifier. An LDM
|
|
8
|
+
* identifier is unique only within an object type, so a label and a computed attribute may
|
|
9
|
+
* share one. Keying by display form identifier would then put two segments with the same
|
|
10
|
+
* identifier into one key, and because the segments are sorted, the attribute-to-value
|
|
11
|
+
* pairing is lost: two rows whose values are swaps of each other collapse onto the same key.
|
|
12
|
+
* A `localIdentifier` is unique within an execution, so it cannot collide.
|
|
13
|
+
*
|
|
14
|
+
* Both sides agree on it because {@link buildTooltipExecution} slices the tooltip execution
|
|
15
|
+
* by the chart's own attributes with their `localIdentifier`s preserved, and because
|
|
16
|
+
* {@link IAttributeDescriptor}'s `localIdentifier` references back to the attribute that was
|
|
17
|
+
* on the input to the execution.
|
|
18
|
+
*
|
|
19
|
+
* Name is omitted: the backend substitutes null/empty names with localized strings only on
|
|
20
|
+
* the display side, so including them here causes lookup-vs-hover mismatches on null/empty
|
|
21
|
+
* rows.
|
|
12
22
|
*/
|
|
13
23
|
/**
|
|
14
24
|
* @internal
|
|
15
25
|
*/
|
|
16
|
-
export declare function buildKeySegment(
|
|
26
|
+
export declare function buildKeySegment(localIdentifier: string, uri: string): string;
|
|
17
27
|
/**
|
|
18
28
|
* @internal
|
|
19
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltipKey.d.ts","sourceRoot":"","sources":["../../src/customTooltip/tooltipKey.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"tooltipKey.d.ts","sourceRoot":"","sources":["../../src/customTooltip/tooltipKey.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;GAEG;AACH,wBAAgB,eAAe,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEhE"}
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
// (C) 2026 GoodData Corporation
|
|
2
2
|
/**
|
|
3
|
-
* Lookup-key helpers shared by
|
|
3
|
+
* Lookup-key helpers shared by {@link buildLookupTable} and the chart-family hover-time
|
|
4
4
|
* key builders. Both sides must produce identical strings.
|
|
5
5
|
*
|
|
6
|
-
* Format: `${
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* Format: `${localIdentifier}:${uri}` per attribute, joined by `|` after lexicographic sort.
|
|
7
|
+
*
|
|
8
|
+
* The identity is the attribute's `localIdentifier`, not its display form identifier. An LDM
|
|
9
|
+
* identifier is unique only within an object type, so a label and a computed attribute may
|
|
10
|
+
* share one. Keying by display form identifier would then put two segments with the same
|
|
11
|
+
* identifier into one key, and because the segments are sorted, the attribute-to-value
|
|
12
|
+
* pairing is lost: two rows whose values are swaps of each other collapse onto the same key.
|
|
13
|
+
* A `localIdentifier` is unique within an execution, so it cannot collide.
|
|
14
|
+
*
|
|
15
|
+
* Both sides agree on it because {@link buildTooltipExecution} slices the tooltip execution
|
|
16
|
+
* by the chart's own attributes with their `localIdentifier`s preserved, and because
|
|
17
|
+
* {@link IAttributeDescriptor}'s `localIdentifier` references back to the attribute that was
|
|
18
|
+
* on the input to the execution.
|
|
19
|
+
*
|
|
20
|
+
* Name is omitted: the backend substitutes null/empty names with localized strings only on
|
|
21
|
+
* the display side, so including them here causes lookup-vs-hover mismatches on null/empty
|
|
22
|
+
* rows.
|
|
13
23
|
*/
|
|
14
24
|
/**
|
|
15
25
|
* @internal
|
|
16
26
|
*/
|
|
17
|
-
export function buildKeySegment(
|
|
18
|
-
return `${
|
|
27
|
+
export function buildKeySegment(localIdentifier, uri) {
|
|
28
|
+
return `${localIdentifier}:${uri}`;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
* @internal
|
|
@@ -28,9 +28,9 @@ export function buildLookupTable(dataView, meta, separators) {
|
|
|
28
28
|
const header = sliceHeaders[i];
|
|
29
29
|
const descriptor = dimDescriptors[i];
|
|
30
30
|
if (header && isResultAttributeHeader(header) && descriptor && "attributeHeader" in descriptor) {
|
|
31
|
-
const
|
|
31
|
+
const localId = descriptor.attributeHeader.localIdentifier;
|
|
32
32
|
const uri = header.attributeHeaderItem.uri ?? "";
|
|
33
|
-
keyParts.push(buildKeySegment(
|
|
33
|
+
keyParts.push(buildKeySegment(localId, uri));
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
const pointKey = joinKeySegments(keyParts);
|
|
@@ -39,21 +39,31 @@ export declare class AttributeColorStrategy extends ColorStrategy {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* Lookup-key helpers shared by
|
|
42
|
+
* Lookup-key helpers shared by {@link buildLookupTable} and the chart-family hover-time
|
|
43
43
|
* key builders. Both sides must produce identical strings.
|
|
44
44
|
*
|
|
45
|
-
* Format: `${
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
45
|
+
* Format: `${localIdentifier}:${uri}` per attribute, joined by `|` after lexicographic sort.
|
|
46
|
+
*
|
|
47
|
+
* The identity is the attribute's `localIdentifier`, not its display form identifier. An LDM
|
|
48
|
+
* identifier is unique only within an object type, so a label and a computed attribute may
|
|
49
|
+
* share one. Keying by display form identifier would then put two segments with the same
|
|
50
|
+
* identifier into one key, and because the segments are sorted, the attribute-to-value
|
|
51
|
+
* pairing is lost: two rows whose values are swaps of each other collapse onto the same key.
|
|
52
|
+
* A `localIdentifier` is unique within an execution, so it cannot collide.
|
|
53
|
+
*
|
|
54
|
+
* Both sides agree on it because {@link buildTooltipExecution} slices the tooltip execution
|
|
55
|
+
* by the chart's own attributes with their `localIdentifier`s preserved, and because
|
|
56
|
+
* {@link IAttributeDescriptor}'s `localIdentifier` references back to the attribute that was
|
|
57
|
+
* on the input to the execution.
|
|
58
|
+
*
|
|
59
|
+
* Name is omitted: the backend substitutes null/empty names with localized strings only on
|
|
60
|
+
* the display side, so including them here causes lookup-vs-hover mismatches on null/empty
|
|
61
|
+
* rows.
|
|
52
62
|
*/
|
|
53
63
|
/**
|
|
54
64
|
* @internal
|
|
55
65
|
*/
|
|
56
|
-
export declare function buildKeySegment(
|
|
66
|
+
export declare function buildKeySegment(localIdentifier: string, uri: string): string;
|
|
57
67
|
|
|
58
68
|
/**
|
|
59
69
|
* Build a per-data-point lookup keyed by `${displayFormId}:${uri}` segments
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-vis-commons",
|
|
3
|
-
"version": "11.58.0-alpha.
|
|
3
|
+
"version": "11.58.0-alpha.4",
|
|
4
4
|
"description": "GoodData.UI SDK - common functionality for different types of visualizations",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"react-intl": "10.1.25",
|
|
37
37
|
"react-measure": "^2.5.2",
|
|
38
38
|
"tslib": "2.8.1",
|
|
39
|
-
"@gooddata/sdk-backend-spi": "11.58.0-alpha.
|
|
40
|
-
"@gooddata/sdk-model": "11.58.0-alpha.
|
|
41
|
-
"@gooddata/sdk-ui": "11.58.0-alpha.
|
|
42
|
-
"@gooddata/sdk-ui-
|
|
43
|
-
"@gooddata/sdk-ui-
|
|
39
|
+
"@gooddata/sdk-backend-spi": "11.58.0-alpha.4",
|
|
40
|
+
"@gooddata/sdk-model": "11.58.0-alpha.4",
|
|
41
|
+
"@gooddata/sdk-ui": "11.58.0-alpha.4",
|
|
42
|
+
"@gooddata/sdk-ui-theme-provider": "11.58.0-alpha.4",
|
|
43
|
+
"@gooddata/sdk-ui-kit": "11.58.0-alpha.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-documenter": "7.30.10",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
"typescript": "7.0.2",
|
|
78
78
|
"vitest": "4.1.11",
|
|
79
79
|
"vitest-dom": "0.1.1",
|
|
80
|
-
"@gooddata/eslint-config": "11.58.0-alpha.
|
|
81
|
-
"@gooddata/oxlint-config": "11.58.0-alpha.
|
|
82
|
-
"@gooddata/reference-workspace": "11.58.0-alpha.
|
|
83
|
-
"@gooddata/
|
|
84
|
-
"@gooddata/
|
|
80
|
+
"@gooddata/eslint-config": "11.58.0-alpha.4",
|
|
81
|
+
"@gooddata/oxlint-config": "11.58.0-alpha.4",
|
|
82
|
+
"@gooddata/reference-workspace": "11.58.0-alpha.4",
|
|
83
|
+
"@gooddata/sdk-backend-mockingbird": "11.58.0-alpha.4",
|
|
84
|
+
"@gooddata/stylelint-config": "11.58.0-alpha.4"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"react": "^18.0.0 || ^19.0.0",
|