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.d.ts CHANGED
@@ -1220,7 +1220,8 @@ declare function PerformanceAnalyticsLegend(props: any): react_jsx_runtime.JSX.E
1220
1220
 
1221
1221
  declare function BrushChart(props: any): react_jsx_runtime.JSX.Element;
1222
1222
 
1223
- declare function InsightsCarousel({ children, onClose, title, icon, titleColor, iconColor, navColor, }: {
1223
+ declare function InsightsCarousel({ className, children, onClose, title, icon, titleColor, iconColor, navColor, }: {
1224
+ className: any;
1224
1225
  children: any;
1225
1226
  onClose: any;
1226
1227
  title?: string;
package/dist/index.esm.js CHANGED
@@ -30430,6 +30430,8 @@ const BubbleChart = _ref => {
30430
30430
  backgroundColor = 'white',
30431
30431
  showAxis = false
30432
30432
  } = _ref;
30433
+ const [curosrMouse, setCurosrMouse] = useState("default");
30434
+
30433
30435
  // Calculate the medians and domain for raw X, Y, and Z values
30434
30436
  const {
30435
30437
  xMedian,
@@ -30514,6 +30516,7 @@ const BubbleChart = _ref => {
30514
30516
  // Refs for the chart container
30515
30517
  const containerRef = useRef(null);
30516
30518
  const scatterChartRef = useRef(null);
30519
+ const scatterFullChartRef = useRef(null);
30517
30520
 
30518
30521
  // Set up initial domain
30519
30522
  useEffect(() => {
@@ -30686,9 +30689,9 @@ const BubbleChart = _ref => {
30686
30689
  e.preventDefault();
30687
30690
  }
30688
30691
  }, [viewDomain]); // Add viewDomain as dependency to capture current value
30689
-
30690
30692
  // Handle mouse move for dragging
30691
30693
  const handleMouseMove = useCallback(e => {
30694
+ /* cursor feedback */
30692
30695
  if (!isDragging) return;
30693
30696
  const dx = e.clientX - dragStart.x;
30694
30697
  const dy = e.clientY - dragStart.y;
@@ -30797,6 +30800,7 @@ const BubbleChart = _ref => {
30797
30800
 
30798
30801
  // Handle mouse wheel
30799
30802
  const handleWheel = useCallback(e => {
30803
+ if (!e.ctrlKey) return; // Only zoom with Ctrl key
30800
30804
  e.preventDefault();
30801
30805
  if (e.deltaY < 0) {
30802
30806
  handleZoomIn();
@@ -30885,7 +30889,11 @@ const BubbleChart = _ref => {
30885
30889
  const formattedY = formatUnits(yMedian);
30886
30890
  return `${formattedX}, ${formattedY}`;
30887
30891
  }, [xMedian, yMedian]);
30888
-
30892
+ const handleChartMouseMove = e => {
30893
+ if (!scatterFullChartRef.current) return;
30894
+ const temp = isDragging ? 'move' : 'zoom-in';
30895
+ setCurosrMouse(temp);
30896
+ };
30889
30897
  // Render the component
30890
30898
  return /*#__PURE__*/React$1.createElement(BubbleChartContainer, {
30891
30899
  width: width,
@@ -30910,6 +30918,9 @@ const BubbleChart = _ref => {
30910
30918
  height: "100%",
30911
30919
  "data-testid": "responsive-container"
30912
30920
  }, /*#__PURE__*/React$1.createElement(ScatterChart, {
30921
+ ref: scatterFullChartRef,
30922
+ onMouseMove: handleChartMouseMove,
30923
+ cursor: curosrMouse,
30913
30924
  margin: {
30914
30925
  top: 60,
30915
30926
  right: 190,
@@ -32286,10 +32297,8 @@ const VisibleCardsContainer = styled.div`
32286
32297
 
32287
32298
  .prev-card,
32288
32299
  .next-card {
32289
- background: #d3d3d3;
32290
- > * {
32291
- opacity: 0.5;
32292
- }
32300
+ background: #E7E7E7;
32301
+ opacity: 0.9;
32293
32302
  }
32294
32303
 
32295
32304
  .prev-card {
@@ -32312,9 +32321,9 @@ const VisibleCardsContainer = styled.div`
32312
32321
  `;
32313
32322
  const Card = styled.div`
32314
32323
  position: absolute;
32315
- width: 60%;
32324
+ width: 56%;
32325
+ min-width: 600px;
32316
32326
  height: 100%;
32317
- max-width: 755px;
32318
32327
  background: #ffffff;
32319
32328
  border-radius: 16px;
32320
32329
  padding: 20px 50px;
@@ -32399,6 +32408,7 @@ const Dot = styled.button`
32399
32408
 
32400
32409
  const InsightsCarousel = _ref => {
32401
32410
  let {
32411
+ className,
32402
32412
  children,
32403
32413
  onClose,
32404
32414
  title = "Insights:",
@@ -32425,7 +32435,9 @@ const InsightsCarousel = _ref => {
32425
32435
  };
32426
32436
  const prevIndex = (currentIndex - 1 + totalChildren) % totalChildren;
32427
32437
  const nextIndex = (currentIndex + 1) % totalChildren;
32428
- return /*#__PURE__*/React$1.createElement(Overlay, null, /*#__PURE__*/React$1.createElement(ModalContent, null, /*#__PURE__*/React$1.createElement(Header, null, /*#__PURE__*/React$1.createElement(Title, {
32438
+ return /*#__PURE__*/React$1.createElement(Overlay, {
32439
+ className: className
32440
+ }, /*#__PURE__*/React$1.createElement(ModalContent, null, /*#__PURE__*/React$1.createElement(Header, null, /*#__PURE__*/React$1.createElement(Title, {
32429
32441
  $titleColor: titleColor
32430
32442
  }, /*#__PURE__*/React$1.cloneElement(icon, {
32431
32443
  fill: iconColor