sag_components 2.0.0-beta77 → 2.0.0-beta79
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 +29 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +29 -20
- package/dist/index.js.map +1 -1
- package/dist/types/components/BrushChart/BrushChart.stories.d.ts +131 -0
- 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'};
|
|
@@ -31617,7 +31612,9 @@ styleInject(css_248z);
|
|
|
31617
31612
|
|
|
31618
31613
|
const BarLine = props => {
|
|
31619
31614
|
const {
|
|
31620
|
-
brushAreaBarData
|
|
31615
|
+
brushAreaBarData,
|
|
31616
|
+
color,
|
|
31617
|
+
lineColor
|
|
31621
31618
|
} = props;
|
|
31622
31619
|
const MAX_CHARS_PER_LINE = getMaxCharsPerLine(brushAreaBarData.length);
|
|
31623
31620
|
const MAX_LINES = 2;
|
|
@@ -31731,11 +31728,11 @@ const BarLine = props => {
|
|
|
31731
31728
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.Line, {
|
|
31732
31729
|
type: "monotone",
|
|
31733
31730
|
dataKey: "inc_roi",
|
|
31734
|
-
stroke:
|
|
31731
|
+
stroke: lineColor,
|
|
31735
31732
|
strokeWidth: 2,
|
|
31736
31733
|
dot: {
|
|
31737
31734
|
r: 4,
|
|
31738
|
-
fill:
|
|
31735
|
+
fill: lineColor
|
|
31739
31736
|
},
|
|
31740
31737
|
activeDot: false,
|
|
31741
31738
|
name: "INC Sales ROI"
|
|
@@ -31787,7 +31784,7 @@ const BarLine = props => {
|
|
|
31787
31784
|
cursor: brushAreaBarData.length > 80
|
|
31788
31785
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
|
|
31789
31786
|
dataKey: "inc_sales",
|
|
31790
|
-
fill:
|
|
31787
|
+
fill: color,
|
|
31791
31788
|
gap: 4,
|
|
31792
31789
|
barSize: 53,
|
|
31793
31790
|
name: "INC Sales"
|
|
@@ -31810,11 +31807,11 @@ const BarLine = props => {
|
|
|
31810
31807
|
width: "100%",
|
|
31811
31808
|
height: "40px",
|
|
31812
31809
|
legendData: [{
|
|
31813
|
-
iconColor:
|
|
31810
|
+
iconColor: color,
|
|
31814
31811
|
iconType: "Square",
|
|
31815
31812
|
title: "INC Sales"
|
|
31816
31813
|
}, {
|
|
31817
|
-
iconColor:
|
|
31814
|
+
iconColor: lineColor,
|
|
31818
31815
|
iconType: "LegendUnionIcon",
|
|
31819
31816
|
title: "INC Sales ROI"
|
|
31820
31817
|
}]
|
|
@@ -31823,7 +31820,8 @@ const BarLine = props => {
|
|
|
31823
31820
|
|
|
31824
31821
|
const SingleChart = props => {
|
|
31825
31822
|
const {
|
|
31826
|
-
barData
|
|
31823
|
+
barData,
|
|
31824
|
+
color
|
|
31827
31825
|
} = props;
|
|
31828
31826
|
const MAX_CHARS_PER_LINE = getMaxCharsPerLine(barData.length);
|
|
31829
31827
|
const MAX_LINES = 2;
|
|
@@ -31925,7 +31923,7 @@ const SingleChart = props => {
|
|
|
31925
31923
|
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
|
|
31926
31924
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
|
|
31927
31925
|
dataKey: "value",
|
|
31928
|
-
fill:
|
|
31926
|
+
fill: color,
|
|
31929
31927
|
barSize: 53,
|
|
31930
31928
|
name: "INC Sales"
|
|
31931
31929
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
|
|
@@ -31947,7 +31945,7 @@ const SingleChart = props => {
|
|
|
31947
31945
|
width: "100%",
|
|
31948
31946
|
height: "40px",
|
|
31949
31947
|
legendData: [{
|
|
31950
|
-
iconColor:
|
|
31948
|
+
iconColor: color,
|
|
31951
31949
|
iconType: "Square",
|
|
31952
31950
|
title: "INC Units"
|
|
31953
31951
|
}]
|
|
@@ -31956,7 +31954,9 @@ const SingleChart = props => {
|
|
|
31956
31954
|
|
|
31957
31955
|
const InnerBar = props => {
|
|
31958
31956
|
const {
|
|
31959
|
-
brushInnerBarData
|
|
31957
|
+
brushInnerBarData,
|
|
31958
|
+
color,
|
|
31959
|
+
backgroundColor
|
|
31960
31960
|
} = props;
|
|
31961
31961
|
const MAX_CHARS_PER_LINE = getMaxCharsPerLine(brushInnerBarData.length);
|
|
31962
31962
|
const MAX_LINES = 2;
|
|
@@ -31977,7 +31977,7 @@ const InnerBar = props => {
|
|
|
31977
31977
|
y: y,
|
|
31978
31978
|
width: width,
|
|
31979
31979
|
height: height,
|
|
31980
|
-
fill:
|
|
31980
|
+
fill: backgroundColor,
|
|
31981
31981
|
rx: 4,
|
|
31982
31982
|
ry: 4
|
|
31983
31983
|
}), /*#__PURE__*/React__default["default"].createElement("text", {
|
|
@@ -31993,7 +31993,7 @@ const InnerBar = props => {
|
|
|
31993
31993
|
y: innerY,
|
|
31994
31994
|
width: width * 0.6,
|
|
31995
31995
|
height: innerHeight,
|
|
31996
|
-
fill:
|
|
31996
|
+
fill: color,
|
|
31997
31997
|
rx: 2,
|
|
31998
31998
|
ry: 2
|
|
31999
31999
|
}), innerHeight > 16 && /*#__PURE__*/React__default["default"].createElement("text", {
|
|
@@ -32117,11 +32117,11 @@ const InnerBar = props => {
|
|
|
32117
32117
|
width: "100%",
|
|
32118
32118
|
height: "40px",
|
|
32119
32119
|
legendData: [{
|
|
32120
|
-
iconColor:
|
|
32120
|
+
iconColor: backgroundColor,
|
|
32121
32121
|
iconType: "Square",
|
|
32122
32122
|
title: "New Shoppers"
|
|
32123
32123
|
}, {
|
|
32124
|
-
iconColor:
|
|
32124
|
+
iconColor: color,
|
|
32125
32125
|
iconType: "Square",
|
|
32126
32126
|
title: "Repeaters"
|
|
32127
32127
|
}]
|
|
@@ -32137,7 +32137,10 @@ const BrushChart = props => {
|
|
|
32137
32137
|
brushBarBasketData,
|
|
32138
32138
|
brushAreaBarData,
|
|
32139
32139
|
segmentedbuttonOptions,
|
|
32140
|
-
title
|
|
32140
|
+
title,
|
|
32141
|
+
lineChartColor,
|
|
32142
|
+
innerChartColor,
|
|
32143
|
+
barChartColor
|
|
32141
32144
|
} = props;
|
|
32142
32145
|
const [selectedOption, setSelectedOption] = React$1.useState(segmentedbuttonOptions[0]);
|
|
32143
32146
|
return /*#__PURE__*/React__default["default"].createElement(Container, {
|
|
@@ -32155,12 +32158,18 @@ const BrushChart = props => {
|
|
|
32155
32158
|
return setSelectedOption(value);
|
|
32156
32159
|
}
|
|
32157
32160
|
}), /*#__PURE__*/React__default["default"].createElement(ChartContainer, null, selectedOption === "New Shoppers & Repeaters" && /*#__PURE__*/React__default["default"].createElement(InnerBar, {
|
|
32161
|
+
color: innerChartColor,
|
|
32162
|
+
backgroundColor: barChartColor,
|
|
32158
32163
|
brushInnerBarData: brushInnerBarData
|
|
32159
32164
|
}), selectedOption === "INC Sales & ROI" && /*#__PURE__*/React__default["default"].createElement(BarLine, {
|
|
32165
|
+
color: barChartColor,
|
|
32166
|
+
lineColor: lineChartColor,
|
|
32160
32167
|
brushAreaBarData: brushAreaBarData
|
|
32161
32168
|
}), selectedOption === "INC Units" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
|
|
32169
|
+
color: barChartColor,
|
|
32162
32170
|
barData: brushBarIncData
|
|
32163
32171
|
}), selectedOption === "Basket Lift" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
|
|
32172
|
+
color: barChartColor,
|
|
32164
32173
|
barData: brushBarBasketData
|
|
32165
32174
|
})));
|
|
32166
32175
|
};
|