sag_components 2.0.0-beta67 → 2.0.0-beta69
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/dist/index.js
CHANGED
|
@@ -30440,6 +30440,8 @@ const BubbleChart = _ref => {
|
|
|
30440
30440
|
backgroundColor = 'white',
|
|
30441
30441
|
showAxis = false
|
|
30442
30442
|
} = _ref;
|
|
30443
|
+
const [curosrMouse, setCurosrMouse] = React$1.useState("default");
|
|
30444
|
+
|
|
30443
30445
|
// Calculate the medians and domain for raw X, Y, and Z values
|
|
30444
30446
|
const {
|
|
30445
30447
|
xMedian,
|
|
@@ -30524,6 +30526,7 @@ const BubbleChart = _ref => {
|
|
|
30524
30526
|
// Refs for the chart container
|
|
30525
30527
|
const containerRef = React$1.useRef(null);
|
|
30526
30528
|
const scatterChartRef = React$1.useRef(null);
|
|
30529
|
+
const scatterFullChartRef = React$1.useRef(null);
|
|
30527
30530
|
|
|
30528
30531
|
// Set up initial domain
|
|
30529
30532
|
React$1.useEffect(() => {
|
|
@@ -30696,9 +30699,9 @@ const BubbleChart = _ref => {
|
|
|
30696
30699
|
e.preventDefault();
|
|
30697
30700
|
}
|
|
30698
30701
|
}, [viewDomain]); // Add viewDomain as dependency to capture current value
|
|
30699
|
-
|
|
30700
30702
|
// Handle mouse move for dragging
|
|
30701
30703
|
const handleMouseMove = React$1.useCallback(e => {
|
|
30704
|
+
/* cursor feedback */
|
|
30702
30705
|
if (!isDragging) return;
|
|
30703
30706
|
const dx = e.clientX - dragStart.x;
|
|
30704
30707
|
const dy = e.clientY - dragStart.y;
|
|
@@ -30807,6 +30810,7 @@ const BubbleChart = _ref => {
|
|
|
30807
30810
|
|
|
30808
30811
|
// Handle mouse wheel
|
|
30809
30812
|
const handleWheel = React$1.useCallback(e => {
|
|
30813
|
+
if (!e.ctrlKey) return; // Only zoom with Ctrl key
|
|
30810
30814
|
e.preventDefault();
|
|
30811
30815
|
if (e.deltaY < 0) {
|
|
30812
30816
|
handleZoomIn();
|
|
@@ -30895,7 +30899,11 @@ const BubbleChart = _ref => {
|
|
|
30895
30899
|
const formattedY = formatUnits(yMedian);
|
|
30896
30900
|
return `${formattedX}, ${formattedY}`;
|
|
30897
30901
|
}, [xMedian, yMedian]);
|
|
30898
|
-
|
|
30902
|
+
const handleChartMouseMove = e => {
|
|
30903
|
+
if (!scatterFullChartRef.current) return;
|
|
30904
|
+
const temp = isDragging ? 'move' : 'zoom-in';
|
|
30905
|
+
setCurosrMouse(temp);
|
|
30906
|
+
};
|
|
30899
30907
|
// Render the component
|
|
30900
30908
|
return /*#__PURE__*/React__default["default"].createElement(BubbleChartContainer, {
|
|
30901
30909
|
width: width,
|
|
@@ -30920,6 +30928,9 @@ const BubbleChart = _ref => {
|
|
|
30920
30928
|
height: "100%",
|
|
30921
30929
|
"data-testid": "responsive-container"
|
|
30922
30930
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ScatterChart, {
|
|
30931
|
+
ref: scatterFullChartRef,
|
|
30932
|
+
onMouseMove: handleChartMouseMove,
|
|
30933
|
+
cursor: curosrMouse,
|
|
30923
30934
|
margin: {
|
|
30924
30935
|
top: 60,
|
|
30925
30936
|
right: 190,
|
|
@@ -32296,10 +32307,8 @@ const VisibleCardsContainer = styled__default["default"].div`
|
|
|
32296
32307
|
|
|
32297
32308
|
.prev-card,
|
|
32298
32309
|
.next-card {
|
|
32299
|
-
background: #
|
|
32300
|
-
|
|
32301
|
-
opacity: 0.5;
|
|
32302
|
-
}
|
|
32310
|
+
background: #E7E7E7;
|
|
32311
|
+
opacity: 0.9;
|
|
32303
32312
|
}
|
|
32304
32313
|
|
|
32305
32314
|
.prev-card {
|
|
@@ -32322,9 +32331,9 @@ const VisibleCardsContainer = styled__default["default"].div`
|
|
|
32322
32331
|
`;
|
|
32323
32332
|
const Card = styled__default["default"].div`
|
|
32324
32333
|
position: absolute;
|
|
32325
|
-
width:
|
|
32334
|
+
width: 56%;
|
|
32335
|
+
min-width: 600px;
|
|
32326
32336
|
height: 100%;
|
|
32327
|
-
max-width: 755px;
|
|
32328
32337
|
background: #ffffff;
|
|
32329
32338
|
border-radius: 16px;
|
|
32330
32339
|
padding: 20px 50px;
|
|
@@ -32409,6 +32418,7 @@ const Dot = styled__default["default"].button`
|
|
|
32409
32418
|
|
|
32410
32419
|
const InsightsCarousel = _ref => {
|
|
32411
32420
|
let {
|
|
32421
|
+
className,
|
|
32412
32422
|
children,
|
|
32413
32423
|
onClose,
|
|
32414
32424
|
title = "Insights:",
|
|
@@ -32435,7 +32445,9 @@ const InsightsCarousel = _ref => {
|
|
|
32435
32445
|
};
|
|
32436
32446
|
const prevIndex = (currentIndex - 1 + totalChildren) % totalChildren;
|
|
32437
32447
|
const nextIndex = (currentIndex + 1) % totalChildren;
|
|
32438
|
-
return /*#__PURE__*/React__default["default"].createElement(Overlay,
|
|
32448
|
+
return /*#__PURE__*/React__default["default"].createElement(Overlay, {
|
|
32449
|
+
className: className
|
|
32450
|
+
}, /*#__PURE__*/React__default["default"].createElement(ModalContent, null, /*#__PURE__*/React__default["default"].createElement(Header, null, /*#__PURE__*/React__default["default"].createElement(Title, {
|
|
32439
32451
|
$titleColor: titleColor
|
|
32440
32452
|
}, /*#__PURE__*/React__default["default"].cloneElement(icon, {
|
|
32441
32453
|
fill: iconColor
|