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.d.ts +2 -1
- package/dist/index.esm.js +137 -115
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +137 -115
- package/dist/index.js.map +1 -1
- package/dist/types/components/BubbleChart/BubbleChart.d.ts +2 -1
- package/dist/types/components/BubbleChart/BubbleChart.stories.d.ts +7 -0
- package/package.json +1 -1
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
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
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
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
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
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
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
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10865
|
-
|
|
10866
|
-
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
|
|
10873
|
-
|
|
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:
|
|
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
|
|
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(
|
|
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`
|