@gooddata/sdk-ui-vis-commons 10.23.0-alpha.8 → 10.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDialog.d.ts","sourceRoot":"","sources":["../../../src/legend/PopUpLegend/LegendDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendDialog.d.ts","sourceRoot":"","sources":["../../../src/legend/PopUpLegend/LegendDialog.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AA4C1B,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2BrD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// (C) 2007-
|
|
1
|
+
// (C) 2007-2025 GoodData Corporation
|
|
2
2
|
import React from "react";
|
|
3
|
-
import
|
|
3
|
+
import cx from "classnames";
|
|
4
|
+
import { ZoomAwareOverlay, useMediaQuery, useIsZoomed, ZOOM_THRESHOLD } from "@gooddata/sdk-ui-kit";
|
|
4
5
|
import { legendDialogAlignPoints, legendMobileDialogAlignPoints } from "./alignPoints.js";
|
|
5
6
|
const LegendDialogWrapper = ({ children }) => {
|
|
6
7
|
const isMobile = useMediaQuery("<sm");
|
|
@@ -8,11 +9,15 @@ const LegendDialogWrapper = ({ children }) => {
|
|
|
8
9
|
};
|
|
9
10
|
const LegendDialogContent = (props) => {
|
|
10
11
|
const { title, onCloseDialog, children } = props;
|
|
12
|
+
const isZoomed = useIsZoomed(ZOOM_THRESHOLD);
|
|
11
13
|
const onClose = (e) => {
|
|
12
14
|
e.preventDefault();
|
|
13
15
|
onCloseDialog();
|
|
14
16
|
};
|
|
15
|
-
|
|
17
|
+
const className = cx("legend-popup-dialog", "legend-popup-dialog-content", {
|
|
18
|
+
zoomed: isZoomed,
|
|
19
|
+
});
|
|
20
|
+
return (React.createElement("div", { className: className },
|
|
16
21
|
React.createElement("div", { className: "legend-header" },
|
|
17
22
|
React.createElement("div", { className: "legend-header-title" }, title),
|
|
18
23
|
React.createElement("div", { className: "s-legend-close legend-close gd-icon-cross gd-button-link gd-button-icon-only", onClick: onClose })),
|
|
@@ -24,7 +29,7 @@ export const LegendDialog = (props) => {
|
|
|
24
29
|
return null;
|
|
25
30
|
}
|
|
26
31
|
return (React.createElement(LegendDialogWrapper, null, (isMobile) => {
|
|
27
|
-
return (React.createElement(
|
|
32
|
+
return (React.createElement(ZoomAwareOverlay, { alignTo: alignTo, alignPoints: isMobile ? legendMobileDialogAlignPoints : legendDialogAlignPoints, closeOnOutsideClick: !isMobile, onClose: onCloseDialog, className: "kpi-alert-dialog-overlay", ensureVisibility: true },
|
|
28
33
|
React.createElement(LegendDialogContent, { title: name, onCloseDialog: onCloseDialog }, children)));
|
|
29
34
|
}));
|
|
30
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendDialog.js","sourceRoot":"","sources":["../../../src/legend/PopUpLegend/LegendDialog.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendDialog.js","sourceRoot":"","sources":["../../../src/legend/PopUpLegend/LegendDialog.tsx"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,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ACV,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,oBAAC,mBAAmB,QACf,CAAC,QAAQ,EAAE,EAAE;QACV,OAAO,CACH,oBAAC,gBAAgB,IACb,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,uBAAuB,EAC/E,mBAAmB,EAAE,CAAC,QAAQ,EAC9B,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,0BAA0B,EACpC,gBAAgB,EAAE,IAAI;YAEtB,oBAAC,mBAAmB,IAAC,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,aAAa,IACzD,QAAQ,CACS,CACP,CACtB,CAAC;IACN,CAAC,CACiB,CACzB,CAAC;AACN,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-vis-commons",
|
|
3
|
-
"version": "10.23.0
|
|
3
|
+
"version": "10.23.0",
|
|
4
4
|
"description": "GoodData.UI SDK - common functionality for different types of visualizations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"react-intl": "^6.4.1",
|
|
37
37
|
"react-measure": "^2.5.2",
|
|
38
38
|
"tslib": "^2.5.0",
|
|
39
|
-
"@gooddata/sdk-backend-spi": "10.23.0
|
|
40
|
-
"@gooddata/sdk-ui": "10.23.0
|
|
41
|
-
"@gooddata/sdk-model": "10.23.0
|
|
42
|
-
"@gooddata/sdk-ui-kit": "10.23.0
|
|
43
|
-
"@gooddata/sdk-ui-theme-provider": "10.23.0
|
|
39
|
+
"@gooddata/sdk-backend-spi": "10.23.0",
|
|
40
|
+
"@gooddata/sdk-ui": "10.23.0",
|
|
41
|
+
"@gooddata/sdk-model": "10.23.0",
|
|
42
|
+
"@gooddata/sdk-ui-kit": "10.23.0",
|
|
43
|
+
"@gooddata/sdk-ui-theme-provider": "10.23.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^16.10.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"typescript": "5.3.3",
|
|
86
86
|
"vitest": "1.0.4",
|
|
87
87
|
"vitest-dom": "0.1.1",
|
|
88
|
-
"@gooddata/
|
|
89
|
-
"@gooddata/
|
|
88
|
+
"@gooddata/sdk-backend-mockingbird": "10.23.0",
|
|
89
|
+
"@gooddata/reference-workspace": "10.23.0"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"clean": "rm -rf ci dist esm coverage styles/css *.log tsconfig.tsbuildinfo",
|
package/styles/scss/legend.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// (C) 2007-
|
|
1
|
+
// (C) 2007-2025 GoodData Corporation
|
|
2
2
|
@use "sass:color";
|
|
3
3
|
@use "@gooddata/sdk-ui-kit/styles/scss/Button/_variables" as button-variables;
|
|
4
4
|
@use "@gooddata/sdk-ui-kit/styles/scss/Bubble/_variables" as bubble-variables;
|
|
@@ -200,6 +200,7 @@ $legend-content-background: var(--gd-chart-backgroundColor, var(--gd-palette-com
|
|
|
200
200
|
|
|
201
201
|
&.position-dialog {
|
|
202
202
|
margin-left: 0;
|
|
203
|
+
overflow-x: auto;
|
|
203
204
|
|
|
204
205
|
.circle-min-value {
|
|
205
206
|
margin-left: 10px;
|
|
@@ -634,6 +635,18 @@ $legend-content-background: var(--gd-chart-backgroundColor, var(--gd-palette-com
|
|
|
634
635
|
}
|
|
635
636
|
}
|
|
636
637
|
|
|
638
|
+
.truncated {
|
|
639
|
+
.legend-popup-dialog-content.zoomed {
|
|
640
|
+
width: 100%;
|
|
641
|
+
height: 100%;
|
|
642
|
+
.legend-content {
|
|
643
|
+
width: 100%;
|
|
644
|
+
height: 100%;
|
|
645
|
+
overflow: auto;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
637
650
|
.target-cc.self-cr {
|
|
638
651
|
.legend-popup-dialog-content {
|
|
639
652
|
&::before,
|