sag_components 2.0.0-beta94 → 2.0.0-beta96

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
@@ -9473,67 +9473,70 @@ const DropdownMain = styled__default["default"].div`
9473
9473
  `;
9474
9474
 
9475
9475
  /* eslint-disable react/prop-types */
9476
- const DropdownNew = ({
9477
- isMulti,
9478
- label,
9479
- labelEmptyValue,
9480
- options,
9481
- selectedValue,
9482
- placeHolder,
9483
- onChange,
9484
- required,
9485
- disabled,
9486
- width,
9487
- error,
9488
- errorMessage,
9489
- labelColor,
9490
- checkBoxColor,
9491
- xIconShow,
9492
- showLabelOnTop,
9493
- orderBy,
9494
- elementType
9495
- }) => /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9496
- className: "DropdownMain",
9497
- width: width
9498
- }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9499
- className: "DropdownMultiNew",
9500
- placeHolder: placeHolder,
9501
- label: label,
9502
- labelEmptyValue: labelEmptyValue,
9503
- labelColor: labelColor,
9504
- checkBoxColor: checkBoxColor,
9505
- required: required,
9506
- options: options,
9507
- width: width,
9508
- disabled: disabled,
9509
- error: error,
9510
- errorMessage: errorMessage,
9511
- selectedValue: selectedValue,
9512
- xIconShow: xIconShow,
9513
- onChange: onChange,
9514
- showLabelOnTop: showLabelOnTop,
9515
- orderBy: orderBy,
9516
- elementType: elementType
9517
- }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9518
- className: "DropdownSingleNew",
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
- }));
9476
+ const DropdownNew = _ref => {
9477
+ let {
9478
+ isMulti,
9479
+ label,
9480
+ labelEmptyValue,
9481
+ options,
9482
+ selectedValue,
9483
+ placeHolder,
9484
+ onChange,
9485
+ required,
9486
+ disabled,
9487
+ width,
9488
+ error,
9489
+ errorMessage,
9490
+ labelColor,
9491
+ checkBoxColor,
9492
+ xIconShow,
9493
+ showLabelOnTop,
9494
+ orderBy,
9495
+ elementType
9496
+ } = _ref;
9497
+ return /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9498
+ className: "DropdownMain",
9499
+ width: width
9500
+ }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9501
+ className: "DropdownMultiNew",
9502
+ placeHolder: placeHolder,
9503
+ label: label,
9504
+ labelEmptyValue: labelEmptyValue,
9505
+ labelColor: labelColor,
9506
+ checkBoxColor: checkBoxColor,
9507
+ required: required,
9508
+ options: options,
9509
+ width: width,
9510
+ disabled: disabled,
9511
+ error: error,
9512
+ errorMessage: errorMessage,
9513
+ selectedValue: selectedValue,
9514
+ xIconShow: xIconShow,
9515
+ onChange: onChange,
9516
+ showLabelOnTop: showLabelOnTop,
9517
+ orderBy: orderBy,
9518
+ elementType: elementType
9519
+ }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9520
+ className: "DropdownSingleNew",
9521
+ placeHolder: placeHolder,
9522
+ label: label,
9523
+ labelEmptyValue: labelEmptyValue,
9524
+ labelColor: labelColor,
9525
+ checkBoxColor: checkBoxColor,
9526
+ required: required,
9527
+ options: options,
9528
+ width: width,
9529
+ disabled: disabled,
9530
+ error: error,
9531
+ errorMessage: errorMessage,
9532
+ selectedValue: selectedValue,
9533
+ xIconShow: xIconShow,
9534
+ onChange: onChange,
9535
+ showLabelOnTop: showLabelOnTop,
9536
+ orderBy: orderBy,
9537
+ elementType: elementType
9538
+ }));
9539
+ };
9537
9540
  DropdownNew.propTypes = {
9538
9541
  placeHolder: PropTypes.string,
9539
9542
  label: PropTypes.string,
@@ -9961,20 +9964,21 @@ const DatePicker = ({
9961
9964
  };
9962
9965
 
9963
9966
  /* eslint-disable import/no-extraneous-dependencies */
9964
- const RangePicker = ({
9965
- label,
9966
- onChange,
9967
- borderRadius,
9968
- required,
9969
- width,
9970
- height,
9971
- placeholder,
9972
- disabled,
9973
- borderColor,
9974
- borderColorFocus,
9975
- textColor,
9976
- selectedValue
9977
- }) => {
9967
+ const RangePicker = _ref => {
9968
+ let {
9969
+ label,
9970
+ onChange,
9971
+ borderRadius,
9972
+ required,
9973
+ width,
9974
+ height,
9975
+ placeholder,
9976
+ disabled,
9977
+ borderColor,
9978
+ borderColorFocus,
9979
+ textColor,
9980
+ selectedValue
9981
+ } = _ref;
9978
9982
  const [isFocused, setIsFocused] = React$1.useState(false);
9979
9983
  const [isOpen, setIsOpen] = React$1.useState(false);
9980
9984
  const [value, setValue] = React$1.useState(''); // Added value state
@@ -10398,23 +10402,24 @@ const QuarterPopupPicker = ({
10398
10402
  };
10399
10403
 
10400
10404
  /* eslint-disable import/no-extraneous-dependencies */
10401
- const QuarterPicker = ({
10402
- availableQuarters,
10403
- // ["Q1-2024"]
10404
- label,
10405
- onChange,
10406
- borderRadius,
10407
- required,
10408
- width,
10409
- height,
10410
- placeholder,
10411
- disabled,
10412
- borderColor,
10413
- borderColorFocus,
10414
- textColor,
10415
- selectedValue,
10416
- startYear
10417
- }) => {
10405
+ const QuarterPicker = _ref => {
10406
+ let {
10407
+ availableQuarters,
10408
+ // ["Q1-2024"]
10409
+ label,
10410
+ onChange,
10411
+ borderRadius,
10412
+ required,
10413
+ width,
10414
+ height,
10415
+ placeholder,
10416
+ disabled,
10417
+ borderColor,
10418
+ borderColorFocus,
10419
+ textColor,
10420
+ selectedValue,
10421
+ startYear
10422
+ } = _ref;
10418
10423
  const [isFocused, setIsFocused] = React$1.useState(false);
10419
10424
  const [isOpen, setIsOpen] = React$1.useState(false);
10420
10425
  const [value, setValue] = React$1.useState('');
@@ -10856,22 +10861,23 @@ const MonthPopupPicker = ({
10856
10861
  };
10857
10862
 
10858
10863
  /* eslint-disable import/no-extraneous-dependencies */
10859
- const MonthPicker = ({
10860
- availableMonths,
10861
- label,
10862
- onChange,
10863
- borderRadius,
10864
- required,
10865
- width,
10866
- height,
10867
- placeholder,
10868
- disabled,
10869
- borderColor,
10870
- borderColorFocus,
10871
- textColor,
10872
- selectedValue,
10873
- startYear
10874
- }) => {
10864
+ const MonthPicker = _ref => {
10865
+ let {
10866
+ availableMonths,
10867
+ label,
10868
+ onChange,
10869
+ borderRadius,
10870
+ required,
10871
+ width,
10872
+ height,
10873
+ placeholder,
10874
+ disabled,
10875
+ borderColor,
10876
+ borderColorFocus,
10877
+ textColor,
10878
+ selectedValue,
10879
+ startYear
10880
+ } = _ref;
10875
10881
  const [isFocused, setIsFocused] = React$1.useState(false);
10876
10882
  const [isOpen, setIsOpen] = React$1.useState(false);
10877
10883
  const [value, setValue] = React$1.useState('');
@@ -28806,7 +28812,7 @@ const DoubleBarSingleLine = props => {
28806
28812
  width,
28807
28813
  height,
28808
28814
  title,
28809
- hasScroll,
28815
+ //hasScroll,
28810
28816
  dataState,
28811
28817
  data,
28812
28818
  lineType,
@@ -29009,21 +29015,32 @@ const DoubleBarSingleLine = props => {
29009
29015
  }));
29010
29016
  };
29011
29017
  const transformedData = transformDataForLineChart(data);
29018
+
29019
+ // Calculate responsive width based on container size and zoom
29020
+ const itemWidth = 178; // Base item width at 100% zoom
29021
+ const itemsCanFit = Math.floor(containerWidth / itemWidth);
29022
+ const needsScroll = data.length > itemsCanFit;
29023
+ const dynamicWidth = needsScroll ? `${data.length * itemWidth}px` : '100%';
29012
29024
  return /*#__PURE__*/React__default["default"].createElement(DoubleBarSingleLineContainer, {
29013
29025
  ref: containerRef,
29014
29026
  className: className,
29015
29027
  height: height,
29016
29028
  width: width,
29017
- hasScroll: hasScroll
29029
+ hasScroll: needsScroll
29018
29030
  }, data.length === 0 ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
29019
29031
  noDataText: noDataText
29020
29032
  }) : /*#__PURE__*/React__default["default"].createElement(Controls$6, {
29021
29033
  className: "Controls"
29022
29034
  }, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$8, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
29023
- width: hasScroll ? `${data.length * 178}px` : 'auto'
29035
+ width: dynamicWidth //{hasScroll ? `${data.length * 178}px` : 'auto'}
29024
29036
  }, /*#__PURE__*/React__default["default"].createElement(LineChartWrapper, null, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, null, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, _extends({
29025
29037
  data: transformedData
29026
- }, syncCharts), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
29038
+ }, syncCharts, {
29039
+ margin: {
29040
+ ...syncCharts.margin,
29041
+ top: 20
29042
+ }
29043
+ }), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
29027
29044
  dataKey: "label",
29028
29045
  tick: false,
29029
29046
  axisLine: false,
@@ -30279,7 +30296,8 @@ const BubbleChart = _ref => {
30279
30296
  height = '600px',
30280
30297
  width = '100%',
30281
30298
  backgroundColor = 'white',
30282
- showAxis = false
30299
+ showAxis = false,
30300
+ noDataText = ''
30283
30301
  } = _ref;
30284
30302
  const [curosrMouse, setCurosrMouse] = React$1.useState("default");
30285
30303
 
@@ -30768,7 +30786,11 @@ const BubbleChart = _ref => {
30768
30786
  },
30769
30787
  backgroundColor: backgroundColor,
30770
30788
  "data-testid": "bubble-chart-container"
30771
- }, /*#__PURE__*/React__default["default"].createElement(HeaderContainer, {
30789
+ }, !data || data.length === 0 ? /*#__PURE__*/React__default["default"].createElement(NoDataFoundMessage, {
30790
+ noDataText: noDataText,
30791
+ width: width,
30792
+ height: height
30793
+ }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeaderContainer, {
30772
30794
  "data-testid": "header-container"
30773
30795
  }, /*#__PURE__*/React__default["default"].createElement(ChartTitle, {
30774
30796
  "data-testid": "chart-title"
@@ -31013,7 +31035,7 @@ const BubbleChart = _ref => {
31013
31035
  }, "+"), /*#__PURE__*/React__default["default"].createElement(ZoomResetButton, {
31014
31036
  onClick: handleReset,
31015
31037
  "data-testid": "zoom-reset-button"
31016
- }, "Reset")));
31038
+ }, "Reset"))));
31017
31039
  };
31018
31040
 
31019
31041
  const BatteryChartContainer = styled__default["default"].div`