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.d.ts
CHANGED
|
@@ -1079,7 +1079,7 @@ declare function LinkButton({ text, type, size, height, width, disabled, textCol
|
|
|
1079
1079
|
rightIcon?: string;
|
|
1080
1080
|
}): react_jsx_runtime.JSX.Element;
|
|
1081
1081
|
|
|
1082
|
-
declare function BubbleChart({ data, title, subtitle, leftHeader, rightHeader, topHeader, bottomHeader, colorPalette, height, width, backgroundColor, showAxis, }: {
|
|
1082
|
+
declare function BubbleChart({ data, title, subtitle, leftHeader, rightHeader, topHeader, bottomHeader, colorPalette, height, width, backgroundColor, showAxis, noDataText, }: {
|
|
1083
1083
|
data?: any[];
|
|
1084
1084
|
title?: string;
|
|
1085
1085
|
subtitle?: string;
|
|
@@ -1092,6 +1092,7 @@ declare function BubbleChart({ data, title, subtitle, leftHeader, rightHeader, t
|
|
|
1092
1092
|
width?: string;
|
|
1093
1093
|
backgroundColor?: string;
|
|
1094
1094
|
showAxis?: boolean;
|
|
1095
|
+
noDataText?: string;
|
|
1095
1096
|
}): react_jsx_runtime.JSX.Element;
|
|
1096
1097
|
|
|
1097
1098
|
declare function BatteryChart(props: any): react_jsx_runtime.JSX.Element;
|
package/dist/index.esm.js
CHANGED
|
@@ -9463,67 +9463,70 @@ const DropdownMain = styled.div`
|
|
|
9463
9463
|
`;
|
|
9464
9464
|
|
|
9465
9465
|
/* eslint-disable react/prop-types */
|
|
9466
|
-
const DropdownNew =
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
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
|
-
|
|
9466
|
+
const DropdownNew = _ref => {
|
|
9467
|
+
let {
|
|
9468
|
+
isMulti,
|
|
9469
|
+
label,
|
|
9470
|
+
labelEmptyValue,
|
|
9471
|
+
options,
|
|
9472
|
+
selectedValue,
|
|
9473
|
+
placeHolder,
|
|
9474
|
+
onChange,
|
|
9475
|
+
required,
|
|
9476
|
+
disabled,
|
|
9477
|
+
width,
|
|
9478
|
+
error,
|
|
9479
|
+
errorMessage,
|
|
9480
|
+
labelColor,
|
|
9481
|
+
checkBoxColor,
|
|
9482
|
+
xIconShow,
|
|
9483
|
+
showLabelOnTop,
|
|
9484
|
+
orderBy,
|
|
9485
|
+
elementType
|
|
9486
|
+
} = _ref;
|
|
9487
|
+
return /*#__PURE__*/React$1.createElement(DropdownMain, {
|
|
9488
|
+
className: "DropdownMain",
|
|
9489
|
+
width: width
|
|
9490
|
+
}, isMulti ? /*#__PURE__*/React$1.createElement(DropdownMultiNew, {
|
|
9491
|
+
className: "DropdownMultiNew",
|
|
9492
|
+
placeHolder: placeHolder,
|
|
9493
|
+
label: label,
|
|
9494
|
+
labelEmptyValue: labelEmptyValue,
|
|
9495
|
+
labelColor: labelColor,
|
|
9496
|
+
checkBoxColor: checkBoxColor,
|
|
9497
|
+
required: required,
|
|
9498
|
+
options: options,
|
|
9499
|
+
width: width,
|
|
9500
|
+
disabled: disabled,
|
|
9501
|
+
error: error,
|
|
9502
|
+
errorMessage: errorMessage,
|
|
9503
|
+
selectedValue: selectedValue,
|
|
9504
|
+
xIconShow: xIconShow,
|
|
9505
|
+
onChange: onChange,
|
|
9506
|
+
showLabelOnTop: showLabelOnTop,
|
|
9507
|
+
orderBy: orderBy,
|
|
9508
|
+
elementType: elementType
|
|
9509
|
+
}) : /*#__PURE__*/React$1.createElement(DropdownSingleNew, {
|
|
9510
|
+
className: "DropdownSingleNew",
|
|
9511
|
+
placeHolder: placeHolder,
|
|
9512
|
+
label: label,
|
|
9513
|
+
labelEmptyValue: labelEmptyValue,
|
|
9514
|
+
labelColor: labelColor,
|
|
9515
|
+
checkBoxColor: checkBoxColor,
|
|
9516
|
+
required: required,
|
|
9517
|
+
options: options,
|
|
9518
|
+
width: width,
|
|
9519
|
+
disabled: disabled,
|
|
9520
|
+
error: error,
|
|
9521
|
+
errorMessage: errorMessage,
|
|
9522
|
+
selectedValue: selectedValue,
|
|
9523
|
+
xIconShow: xIconShow,
|
|
9524
|
+
onChange: onChange,
|
|
9525
|
+
showLabelOnTop: showLabelOnTop,
|
|
9526
|
+
orderBy: orderBy,
|
|
9527
|
+
elementType: elementType
|
|
9528
|
+
}));
|
|
9529
|
+
};
|
|
9527
9530
|
DropdownNew.propTypes = {
|
|
9528
9531
|
placeHolder: PropTypes.string,
|
|
9529
9532
|
label: PropTypes.string,
|
|
@@ -9951,20 +9954,21 @@ const DatePicker = ({
|
|
|
9951
9954
|
};
|
|
9952
9955
|
|
|
9953
9956
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
9954
|
-
const RangePicker =
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9957
|
+
const RangePicker = _ref => {
|
|
9958
|
+
let {
|
|
9959
|
+
label,
|
|
9960
|
+
onChange,
|
|
9961
|
+
borderRadius,
|
|
9962
|
+
required,
|
|
9963
|
+
width,
|
|
9964
|
+
height,
|
|
9965
|
+
placeholder,
|
|
9966
|
+
disabled,
|
|
9967
|
+
borderColor,
|
|
9968
|
+
borderColorFocus,
|
|
9969
|
+
textColor,
|
|
9970
|
+
selectedValue
|
|
9971
|
+
} = _ref;
|
|
9968
9972
|
const [isFocused, setIsFocused] = useState(false);
|
|
9969
9973
|
const [isOpen, setIsOpen] = useState(false);
|
|
9970
9974
|
const [value, setValue] = useState(''); // Added value state
|
|
@@ -10388,23 +10392,24 @@ const QuarterPopupPicker = ({
|
|
|
10388
10392
|
};
|
|
10389
10393
|
|
|
10390
10394
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10391
|
-
const QuarterPicker =
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10395
|
+
const QuarterPicker = _ref => {
|
|
10396
|
+
let {
|
|
10397
|
+
availableQuarters,
|
|
10398
|
+
// ["Q1-2024"]
|
|
10399
|
+
label,
|
|
10400
|
+
onChange,
|
|
10401
|
+
borderRadius,
|
|
10402
|
+
required,
|
|
10403
|
+
width,
|
|
10404
|
+
height,
|
|
10405
|
+
placeholder,
|
|
10406
|
+
disabled,
|
|
10407
|
+
borderColor,
|
|
10408
|
+
borderColorFocus,
|
|
10409
|
+
textColor,
|
|
10410
|
+
selectedValue,
|
|
10411
|
+
startYear
|
|
10412
|
+
} = _ref;
|
|
10408
10413
|
const [isFocused, setIsFocused] = useState(false);
|
|
10409
10414
|
const [isOpen, setIsOpen] = useState(false);
|
|
10410
10415
|
const [value, setValue] = useState('');
|
|
@@ -10846,22 +10851,23 @@ const MonthPopupPicker = ({
|
|
|
10846
10851
|
};
|
|
10847
10852
|
|
|
10848
10853
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
10849
|
-
const MonthPicker =
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
10858
|
-
|
|
10859
|
-
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10854
|
+
const MonthPicker = _ref => {
|
|
10855
|
+
let {
|
|
10856
|
+
availableMonths,
|
|
10857
|
+
label,
|
|
10858
|
+
onChange,
|
|
10859
|
+
borderRadius,
|
|
10860
|
+
required,
|
|
10861
|
+
width,
|
|
10862
|
+
height,
|
|
10863
|
+
placeholder,
|
|
10864
|
+
disabled,
|
|
10865
|
+
borderColor,
|
|
10866
|
+
borderColorFocus,
|
|
10867
|
+
textColor,
|
|
10868
|
+
selectedValue,
|
|
10869
|
+
startYear
|
|
10870
|
+
} = _ref;
|
|
10865
10871
|
const [isFocused, setIsFocused] = useState(false);
|
|
10866
10872
|
const [isOpen, setIsOpen] = useState(false);
|
|
10867
10873
|
const [value, setValue] = useState('');
|
|
@@ -28796,7 +28802,7 @@ const DoubleBarSingleLine = props => {
|
|
|
28796
28802
|
width,
|
|
28797
28803
|
height,
|
|
28798
28804
|
title,
|
|
28799
|
-
hasScroll,
|
|
28805
|
+
//hasScroll,
|
|
28800
28806
|
dataState,
|
|
28801
28807
|
data,
|
|
28802
28808
|
lineType,
|
|
@@ -28999,21 +29005,32 @@ const DoubleBarSingleLine = props => {
|
|
|
28999
29005
|
}));
|
|
29000
29006
|
};
|
|
29001
29007
|
const transformedData = transformDataForLineChart(data);
|
|
29008
|
+
|
|
29009
|
+
// Calculate responsive width based on container size and zoom
|
|
29010
|
+
const itemWidth = 178; // Base item width at 100% zoom
|
|
29011
|
+
const itemsCanFit = Math.floor(containerWidth / itemWidth);
|
|
29012
|
+
const needsScroll = data.length > itemsCanFit;
|
|
29013
|
+
const dynamicWidth = needsScroll ? `${data.length * itemWidth}px` : '100%';
|
|
29002
29014
|
return /*#__PURE__*/React$1.createElement(DoubleBarSingleLineContainer, {
|
|
29003
29015
|
ref: containerRef,
|
|
29004
29016
|
className: className,
|
|
29005
29017
|
height: height,
|
|
29006
29018
|
width: width,
|
|
29007
|
-
hasScroll:
|
|
29019
|
+
hasScroll: needsScroll
|
|
29008
29020
|
}, data.length === 0 ? /*#__PURE__*/React$1.createElement(NoDataFoundMessage, {
|
|
29009
29021
|
noDataText: noDataText
|
|
29010
29022
|
}) : /*#__PURE__*/React$1.createElement(Controls$6, {
|
|
29011
29023
|
className: "Controls"
|
|
29012
29024
|
}, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$8, null, title), /*#__PURE__*/React$1.createElement(ChartsWrapper, {
|
|
29013
|
-
width: hasScroll ? `${data.length * 178}px` : 'auto'
|
|
29025
|
+
width: dynamicWidth //{hasScroll ? `${data.length * 178}px` : 'auto'}
|
|
29014
29026
|
}, /*#__PURE__*/React$1.createElement(LineChartWrapper, null, /*#__PURE__*/React$1.createElement(ResponsiveContainer, null, /*#__PURE__*/React$1.createElement(LineChart, _extends({
|
|
29015
29027
|
data: transformedData
|
|
29016
|
-
}, syncCharts
|
|
29028
|
+
}, syncCharts, {
|
|
29029
|
+
margin: {
|
|
29030
|
+
...syncCharts.margin,
|
|
29031
|
+
top: 20
|
|
29032
|
+
}
|
|
29033
|
+
}), /*#__PURE__*/React$1.createElement(XAxis, {
|
|
29017
29034
|
dataKey: "label",
|
|
29018
29035
|
tick: false,
|
|
29019
29036
|
axisLine: false,
|
|
@@ -30269,7 +30286,8 @@ const BubbleChart = _ref => {
|
|
|
30269
30286
|
height = '600px',
|
|
30270
30287
|
width = '100%',
|
|
30271
30288
|
backgroundColor = 'white',
|
|
30272
|
-
showAxis = false
|
|
30289
|
+
showAxis = false,
|
|
30290
|
+
noDataText = ''
|
|
30273
30291
|
} = _ref;
|
|
30274
30292
|
const [curosrMouse, setCurosrMouse] = useState("default");
|
|
30275
30293
|
|
|
@@ -30758,7 +30776,11 @@ const BubbleChart = _ref => {
|
|
|
30758
30776
|
},
|
|
30759
30777
|
backgroundColor: backgroundColor,
|
|
30760
30778
|
"data-testid": "bubble-chart-container"
|
|
30761
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
30779
|
+
}, !data || data.length === 0 ? /*#__PURE__*/React$1.createElement(NoDataFoundMessage, {
|
|
30780
|
+
noDataText: noDataText,
|
|
30781
|
+
width: width,
|
|
30782
|
+
height: height
|
|
30783
|
+
}) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(HeaderContainer, {
|
|
30762
30784
|
"data-testid": "header-container"
|
|
30763
30785
|
}, /*#__PURE__*/React$1.createElement(ChartTitle, {
|
|
30764
30786
|
"data-testid": "chart-title"
|
|
@@ -31003,7 +31025,7 @@ const BubbleChart = _ref => {
|
|
|
31003
31025
|
}, "+"), /*#__PURE__*/React$1.createElement(ZoomResetButton, {
|
|
31004
31026
|
onClick: handleReset,
|
|
31005
31027
|
"data-testid": "zoom-reset-button"
|
|
31006
|
-
}, "Reset")));
|
|
31028
|
+
}, "Reset"))));
|
|
31007
31029
|
};
|
|
31008
31030
|
|
|
31009
31031
|
const BatteryChartContainer = styled.div`
|