sag_components 2.0.0-beta76 → 2.0.0-beta78
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.esm.js +47 -25
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23894,7 +23894,6 @@ const Label$2 = styled__default["default"].label`
|
|
|
23894
23894
|
font-size: 14px;
|
|
23895
23895
|
font-weight: 500;
|
|
23896
23896
|
color: ${props => props.disabled ? '#D0D0D0' : '212121'};
|
|
23897
|
-
font-family: "Poppins";
|
|
23898
23897
|
white-space: nowrap;
|
|
23899
23898
|
`;
|
|
23900
23899
|
const InputContainer$1 = styled__default["default"].div`
|
|
@@ -23906,7 +23905,6 @@ const InputContainer$1 = styled__default["default"].div`
|
|
|
23906
23905
|
overflow: hidden;
|
|
23907
23906
|
padding: 6px 16px;
|
|
23908
23907
|
margin-bottom: 8px;
|
|
23909
|
-
width: 256px;
|
|
23910
23908
|
height: 24px;
|
|
23911
23909
|
border: 1px solid
|
|
23912
23910
|
${props => props.disabled ? '#bdbdbd' : props.error ? 'red' : '#B1B1B1'};
|
|
@@ -23966,7 +23964,6 @@ const OptionsSubContainer$1 = styled__default["default"].ul`
|
|
|
23966
23964
|
left: 0;
|
|
23967
23965
|
z-index: 101;
|
|
23968
23966
|
width: calc(100% - 23px);
|
|
23969
|
-
font-family: "Poppins";
|
|
23970
23967
|
border-radius: 4px;
|
|
23971
23968
|
background-color: white;
|
|
23972
23969
|
display: ${props => props.showoptions && props.filteredoptions?.length > 0 ? 'block' : 'none'};
|
|
@@ -23978,9 +23975,7 @@ const OptionItem$1 = styled__default["default"].li`
|
|
|
23978
23975
|
padding: 10px;
|
|
23979
23976
|
cursor: pointer;
|
|
23980
23977
|
color: #212121;
|
|
23981
|
-
font-family: "Poppins";
|
|
23982
23978
|
font-size: 14px;
|
|
23983
|
-
font-style: normal;
|
|
23984
23979
|
font-weight: 400;
|
|
23985
23980
|
transition: background-color 0.3s;
|
|
23986
23981
|
background-color: ${props => props.selected ? '#C7E4FF' : '#fff'};
|
|
@@ -24005,21 +24000,22 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24005
24000
|
position: absolute;
|
|
24006
24001
|
`;
|
|
24007
24002
|
|
|
24008
|
-
const QuickFilterDropdownSingle =
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
|
|
24019
|
-
|
|
24020
|
-
|
|
24021
|
-
|
|
24022
|
-
|
|
24003
|
+
const QuickFilterDropdownSingle = _ref => {
|
|
24004
|
+
let {
|
|
24005
|
+
label,
|
|
24006
|
+
hoverColor,
|
|
24007
|
+
options,
|
|
24008
|
+
selectedValue,
|
|
24009
|
+
placeHolder,
|
|
24010
|
+
onChange,
|
|
24011
|
+
disabled,
|
|
24012
|
+
width,
|
|
24013
|
+
error,
|
|
24014
|
+
errorMessage,
|
|
24015
|
+
xIconShow,
|
|
24016
|
+
labelColor,
|
|
24017
|
+
showLabelOnTop
|
|
24018
|
+
} = _ref;
|
|
24023
24019
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24024
24020
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24025
24021
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -30358,6 +30354,13 @@ const BubbleChart = _ref => {
|
|
|
30358
30354
|
const distance = Math.max(Math.abs(max - median), Math.abs(min - median));
|
|
30359
30355
|
return [median - distance, median + distance];
|
|
30360
30356
|
};
|
|
30357
|
+
|
|
30358
|
+
// const calculateDomainBasedOnMedian = (min, max, median) => {
|
|
30359
|
+
// // Always include all data points, and add a small padding
|
|
30360
|
+
// const padding = (max - min) * 0.1 || 1; // fallback to 1 if min==max
|
|
30361
|
+
// return [min - padding, max + padding];
|
|
30362
|
+
// };
|
|
30363
|
+
|
|
30361
30364
|
const xDom = calculateDomainBasedOnMedian(minX, maxX, medianX);
|
|
30362
30365
|
const yDom = calculateDomainBasedOnMedian(minY, maxY, medianY);
|
|
30363
30366
|
|
|
@@ -30799,10 +30802,10 @@ const BubbleChart = _ref => {
|
|
|
30799
30802
|
onMouseMove: handleChartMouseMove,
|
|
30800
30803
|
cursor: curosrMouse,
|
|
30801
30804
|
margin: {
|
|
30802
|
-
top:
|
|
30805
|
+
top: 80,
|
|
30803
30806
|
right: 190,
|
|
30804
|
-
bottom:
|
|
30805
|
-
left:
|
|
30807
|
+
bottom: 80,
|
|
30808
|
+
left: 190
|
|
30806
30809
|
},
|
|
30807
30810
|
"data-testid": "scatter-chart"
|
|
30808
30811
|
}, renderGradients(), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
|
|
@@ -30858,7 +30861,7 @@ const BubbleChart = _ref => {
|
|
|
30858
30861
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30859
30862
|
value: topHeader,
|
|
30860
30863
|
position: "top",
|
|
30861
|
-
offset:
|
|
30864
|
+
offset: 60,
|
|
30862
30865
|
fill: '#484A4C',
|
|
30863
30866
|
fontSize: 16,
|
|
30864
30867
|
fontWeight: 500
|
|
@@ -30884,7 +30887,7 @@ const BubbleChart = _ref => {
|
|
|
30884
30887
|
label: xMedian >= viewDomain.x[0] && xMedian <= viewDomain.x[1] ? {
|
|
30885
30888
|
value: bottomHeader,
|
|
30886
30889
|
position: "bottom",
|
|
30887
|
-
offset:
|
|
30890
|
+
offset: 60,
|
|
30888
30891
|
fill: '#484A4C',
|
|
30889
30892
|
fontSize: 16,
|
|
30890
30893
|
fontWeight: 500
|
|
@@ -30997,6 +31000,25 @@ const BubbleChart = _ref => {
|
|
|
30997
31000
|
// Calculate the exact position of the median point in the SVG
|
|
30998
31001
|
const xPos = viewBox.x + (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]) * viewBox.width;
|
|
30999
31002
|
const yPos = viewBox.y + (1 - (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0])) * viewBox.height;
|
|
31003
|
+
|
|
31004
|
+
// Calculate normalized position of median in domain
|
|
31005
|
+
// const xNorm = (xMedian - viewDomain.x[0]) / (viewDomain.x[1] - viewDomain.x[0]);
|
|
31006
|
+
// const yNorm = (yMedian - viewDomain.y[0]) / (viewDomain.y[1] - viewDomain.y[0]);
|
|
31007
|
+
|
|
31008
|
+
// // If median is within 2% of the edge, center the label
|
|
31009
|
+
// const isXEdge = xNorm < 0.02 || xNorm > 0.98;
|
|
31010
|
+
// const isYEdge = yNorm < 0.02 || yNorm > 0.98;
|
|
31011
|
+
|
|
31012
|
+
// let xPos, yPos;
|
|
31013
|
+
// if (isXEdge || isYEdge) {
|
|
31014
|
+
// // Center of SVG
|
|
31015
|
+
// xPos = viewBox.x + viewBox.width / 2;
|
|
31016
|
+
// yPos = viewBox.y + viewBox.height / 2;
|
|
31017
|
+
// } else {
|
|
31018
|
+
// // Median's data position
|
|
31019
|
+
// xPos = viewBox.x + xNorm * viewBox.width;
|
|
31020
|
+
// yPos = viewBox.y + (1 - yNorm) * viewBox.height;
|
|
31021
|
+
// }
|
|
31000
31022
|
return /*#__PURE__*/React__default["default"].createElement("text", {
|
|
31001
31023
|
x: xPos,
|
|
31002
31024
|
y: yPos,
|