sag_components 2.0.0-beta67 → 2.0.0-beta68

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
@@ -9490,70 +9490,67 @@ const DropdownMain = styled__default["default"].div`
9490
9490
  `;
9491
9491
 
9492
9492
  /* eslint-disable react/prop-types */
9493
- const DropdownNew = _ref => {
9494
- let {
9495
- isMulti,
9496
- label,
9497
- labelEmptyValue,
9498
- options,
9499
- selectedValue,
9500
- placeHolder,
9501
- onChange,
9502
- required,
9503
- disabled,
9504
- width,
9505
- error,
9506
- errorMessage,
9507
- labelColor,
9508
- checkBoxColor,
9509
- xIconShow,
9510
- showLabelOnTop,
9511
- orderBy,
9512
- elementType
9513
- } = _ref;
9514
- return /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9515
- className: "DropdownMain",
9516
- width: width
9517
- }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9518
- className: "DropdownMultiNew",
9519
- placeHolder: placeHolder,
9520
- label: label,
9521
- labelEmptyValue: labelEmptyValue,
9522
- labelColor: labelColor,
9523
- checkBoxColor: checkBoxColor,
9524
- required: required,
9525
- options: options,
9526
- width: width,
9527
- disabled: disabled,
9528
- error: error,
9529
- errorMessage: errorMessage,
9530
- selectedValue: selectedValue,
9531
- xIconShow: xIconShow,
9532
- onChange: onChange,
9533
- showLabelOnTop: showLabelOnTop,
9534
- orderBy: orderBy,
9535
- elementType: elementType
9536
- }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9537
- className: "DropdownSingleNew",
9538
- placeHolder: placeHolder,
9539
- label: label,
9540
- labelEmptyValue: labelEmptyValue,
9541
- labelColor: labelColor,
9542
- checkBoxColor: checkBoxColor,
9543
- required: required,
9544
- options: options,
9545
- width: width,
9546
- disabled: disabled,
9547
- error: error,
9548
- errorMessage: errorMessage,
9549
- selectedValue: selectedValue,
9550
- xIconShow: xIconShow,
9551
- onChange: onChange,
9552
- showLabelOnTop: showLabelOnTop,
9553
- orderBy: orderBy,
9554
- elementType: elementType
9555
- }));
9556
- };
9493
+ const DropdownNew = ({
9494
+ isMulti,
9495
+ label,
9496
+ labelEmptyValue,
9497
+ options,
9498
+ selectedValue,
9499
+ placeHolder,
9500
+ onChange,
9501
+ required,
9502
+ disabled,
9503
+ width,
9504
+ error,
9505
+ errorMessage,
9506
+ labelColor,
9507
+ checkBoxColor,
9508
+ xIconShow,
9509
+ showLabelOnTop,
9510
+ orderBy,
9511
+ elementType
9512
+ }) => /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9513
+ className: "DropdownMain",
9514
+ width: width
9515
+ }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9516
+ className: "DropdownMultiNew",
9517
+ placeHolder: placeHolder,
9518
+ label: label,
9519
+ labelEmptyValue: labelEmptyValue,
9520
+ labelColor: labelColor,
9521
+ checkBoxColor: checkBoxColor,
9522
+ required: required,
9523
+ options: options,
9524
+ width: width,
9525
+ disabled: disabled,
9526
+ error: error,
9527
+ errorMessage: errorMessage,
9528
+ selectedValue: selectedValue,
9529
+ xIconShow: xIconShow,
9530
+ onChange: onChange,
9531
+ showLabelOnTop: showLabelOnTop,
9532
+ orderBy: orderBy,
9533
+ elementType: elementType
9534
+ }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9535
+ className: "DropdownSingleNew",
9536
+ placeHolder: placeHolder,
9537
+ label: label,
9538
+ labelEmptyValue: labelEmptyValue,
9539
+ labelColor: labelColor,
9540
+ checkBoxColor: checkBoxColor,
9541
+ required: required,
9542
+ options: options,
9543
+ width: width,
9544
+ disabled: disabled,
9545
+ error: error,
9546
+ errorMessage: errorMessage,
9547
+ selectedValue: selectedValue,
9548
+ xIconShow: xIconShow,
9549
+ onChange: onChange,
9550
+ showLabelOnTop: showLabelOnTop,
9551
+ orderBy: orderBy,
9552
+ elementType: elementType
9553
+ }));
9557
9554
  DropdownNew.propTypes = {
9558
9555
  placeHolder: PropTypes.string,
9559
9556
  label: PropTypes.string,
@@ -24140,22 +24137,21 @@ const DeleteIcon = styled__default["default"].div`
24140
24137
  position: absolute;
24141
24138
  `;
24142
24139
 
24143
- const QuickFilterDropdownSingle = _ref => {
24144
- let {
24145
- label,
24146
- hoverColor,
24147
- options,
24148
- selectedValue,
24149
- placeHolder,
24150
- onChange,
24151
- disabled,
24152
- width,
24153
- error,
24154
- errorMessage,
24155
- xIconShow,
24156
- labelColor,
24157
- showLabelOnTop
24158
- } = _ref;
24140
+ const QuickFilterDropdownSingle = ({
24141
+ label,
24142
+ hoverColor,
24143
+ options,
24144
+ selectedValue,
24145
+ placeHolder,
24146
+ onChange,
24147
+ disabled,
24148
+ width,
24149
+ error,
24150
+ errorMessage,
24151
+ xIconShow,
24152
+ labelColor,
24153
+ showLabelOnTop
24154
+ }) => {
24159
24155
  const [isFocused, setIsFocused] = React$1.useState(false);
24160
24156
  const [showOptions, setShowOptions] = React$1.useState(false);
24161
24157
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24553,24 +24549,23 @@ const IconContainer$2 = styled__default["default"].div`
24553
24549
  cursor: pointer;
24554
24550
  `;
24555
24551
 
24556
- const QuickFilterDropdownMultiSelection = _ref => {
24557
- let {
24558
- label,
24559
- labelEmptyValue,
24560
- options,
24561
- selectedValue,
24562
- placeHolder,
24563
- onChange,
24564
- required,
24565
- disabled,
24566
- width,
24567
- error,
24568
- errorMessage,
24569
- labelColor,
24570
- xIconShow,
24571
- checkBoxColor,
24572
- showLabelOnTop
24573
- } = _ref;
24552
+ const QuickFilterDropdownMultiSelection = ({
24553
+ label,
24554
+ labelEmptyValue,
24555
+ options,
24556
+ selectedValue,
24557
+ placeHolder,
24558
+ onChange,
24559
+ required,
24560
+ disabled,
24561
+ width,
24562
+ error,
24563
+ errorMessage,
24564
+ labelColor,
24565
+ xIconShow,
24566
+ checkBoxColor,
24567
+ showLabelOnTop
24568
+ }) => {
24574
24569
  const [isFocused, setIsFocused] = React$1.useState(false);
24575
24570
  const [showOptions, setShowOptions] = React$1.useState(false);
24576
24571
  const [inputValue, setInputValue] = React$1.useState('');
@@ -30440,6 +30435,8 @@ const BubbleChart = _ref => {
30440
30435
  backgroundColor = 'white',
30441
30436
  showAxis = false
30442
30437
  } = _ref;
30438
+ const [curosrMouse, setCurosrMouse] = React$1.useState("default");
30439
+
30443
30440
  // Calculate the medians and domain for raw X, Y, and Z values
30444
30441
  const {
30445
30442
  xMedian,
@@ -30524,6 +30521,7 @@ const BubbleChart = _ref => {
30524
30521
  // Refs for the chart container
30525
30522
  const containerRef = React$1.useRef(null);
30526
30523
  const scatterChartRef = React$1.useRef(null);
30524
+ const scatterFullChartRef = React$1.useRef(null);
30527
30525
 
30528
30526
  // Set up initial domain
30529
30527
  React$1.useEffect(() => {
@@ -30696,9 +30694,9 @@ const BubbleChart = _ref => {
30696
30694
  e.preventDefault();
30697
30695
  }
30698
30696
  }, [viewDomain]); // Add viewDomain as dependency to capture current value
30699
-
30700
30697
  // Handle mouse move for dragging
30701
30698
  const handleMouseMove = React$1.useCallback(e => {
30699
+ /* cursor feedback */
30702
30700
  if (!isDragging) return;
30703
30701
  const dx = e.clientX - dragStart.x;
30704
30702
  const dy = e.clientY - dragStart.y;
@@ -30807,6 +30805,7 @@ const BubbleChart = _ref => {
30807
30805
 
30808
30806
  // Handle mouse wheel
30809
30807
  const handleWheel = React$1.useCallback(e => {
30808
+ if (!e.ctrlKey) return; // Only zoom with Ctrl key
30810
30809
  e.preventDefault();
30811
30810
  if (e.deltaY < 0) {
30812
30811
  handleZoomIn();
@@ -30895,7 +30894,11 @@ const BubbleChart = _ref => {
30895
30894
  const formattedY = formatUnits(yMedian);
30896
30895
  return `${formattedX}, ${formattedY}`;
30897
30896
  }, [xMedian, yMedian]);
30898
-
30897
+ const handleChartMouseMove = e => {
30898
+ if (!scatterFullChartRef.current) return;
30899
+ const temp = isDragging ? 'move' : 'zoom-in';
30900
+ setCurosrMouse(temp);
30901
+ };
30899
30902
  // Render the component
30900
30903
  return /*#__PURE__*/React__default["default"].createElement(BubbleChartContainer, {
30901
30904
  width: width,
@@ -30920,6 +30923,9 @@ const BubbleChart = _ref => {
30920
30923
  height: "100%",
30921
30924
  "data-testid": "responsive-container"
30922
30925
  }, /*#__PURE__*/React__default["default"].createElement(recharts.ScatterChart, {
30926
+ ref: scatterFullChartRef,
30927
+ onMouseMove: handleChartMouseMove,
30928
+ cursor: curosrMouse,
30923
30929
  margin: {
30924
30930
  top: 60,
30925
30931
  right: 190,