sag_components 2.0.0-beta78 → 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 CHANGED
@@ -31602,7 +31602,9 @@ styleInject(css_248z);
31602
31602
 
31603
31603
  const BarLine = props => {
31604
31604
  const {
31605
- brushAreaBarData
31605
+ brushAreaBarData,
31606
+ color,
31607
+ lineColor
31606
31608
  } = props;
31607
31609
  const MAX_CHARS_PER_LINE = getMaxCharsPerLine(brushAreaBarData.length);
31608
31610
  const MAX_LINES = 2;
@@ -31716,11 +31718,11 @@ const BarLine = props => {
31716
31718
  }), /*#__PURE__*/React$1.createElement(Line, {
31717
31719
  type: "monotone",
31718
31720
  dataKey: "inc_roi",
31719
- stroke: "#F8CD00",
31721
+ stroke: lineColor,
31720
31722
  strokeWidth: 2,
31721
31723
  dot: {
31722
31724
  r: 4,
31723
- fill: "#F8CD00"
31725
+ fill: lineColor
31724
31726
  },
31725
31727
  activeDot: false,
31726
31728
  name: "INC Sales ROI"
@@ -31772,7 +31774,7 @@ const BarLine = props => {
31772
31774
  cursor: brushAreaBarData.length > 80
31773
31775
  }), /*#__PURE__*/React$1.createElement(Bar, {
31774
31776
  dataKey: "inc_sales",
31775
- fill: "#CCDCDD",
31777
+ fill: color,
31776
31778
  gap: 4,
31777
31779
  barSize: 53,
31778
31780
  name: "INC Sales"
@@ -31795,11 +31797,11 @@ const BarLine = props => {
31795
31797
  width: "100%",
31796
31798
  height: "40px",
31797
31799
  legendData: [{
31798
- iconColor: "#CCDCDD",
31800
+ iconColor: color,
31799
31801
  iconType: "Square",
31800
31802
  title: "INC Sales"
31801
31803
  }, {
31802
- iconColor: "#F8CD00",
31804
+ iconColor: lineColor,
31803
31805
  iconType: "LegendUnionIcon",
31804
31806
  title: "INC Sales ROI"
31805
31807
  }]
@@ -31808,7 +31810,8 @@ const BarLine = props => {
31808
31810
 
31809
31811
  const SingleChart = props => {
31810
31812
  const {
31811
- barData
31813
+ barData,
31814
+ color
31812
31815
  } = props;
31813
31816
  const MAX_CHARS_PER_LINE = getMaxCharsPerLine(barData.length);
31814
31817
  const MAX_LINES = 2;
@@ -31910,7 +31913,7 @@ const SingleChart = props => {
31910
31913
  content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
31911
31914
  }), /*#__PURE__*/React$1.createElement(Bar, {
31912
31915
  dataKey: "value",
31913
- fill: "#CCDCDD",
31916
+ fill: color,
31914
31917
  barSize: 53,
31915
31918
  name: "INC Sales"
31916
31919
  }, /*#__PURE__*/React$1.createElement(LabelList, {
@@ -31932,7 +31935,7 @@ const SingleChart = props => {
31932
31935
  width: "100%",
31933
31936
  height: "40px",
31934
31937
  legendData: [{
31935
- iconColor: "#CCDCDD",
31938
+ iconColor: color,
31936
31939
  iconType: "Square",
31937
31940
  title: "INC Units"
31938
31941
  }]
@@ -31941,7 +31944,9 @@ const SingleChart = props => {
31941
31944
 
31942
31945
  const InnerBar = props => {
31943
31946
  const {
31944
- brushInnerBarData
31947
+ brushInnerBarData,
31948
+ color,
31949
+ backgroundColor
31945
31950
  } = props;
31946
31951
  const MAX_CHARS_PER_LINE = getMaxCharsPerLine(brushInnerBarData.length);
31947
31952
  const MAX_LINES = 2;
@@ -31962,7 +31967,7 @@ const InnerBar = props => {
31962
31967
  y: y,
31963
31968
  width: width,
31964
31969
  height: height,
31965
- fill: "#d0e6ea",
31970
+ fill: backgroundColor,
31966
31971
  rx: 4,
31967
31972
  ry: 4
31968
31973
  }), /*#__PURE__*/React$1.createElement("text", {
@@ -31978,7 +31983,7 @@ const InnerBar = props => {
31978
31983
  y: innerY,
31979
31984
  width: width * 0.6,
31980
31985
  height: innerHeight,
31981
- fill: "#07575b",
31986
+ fill: color,
31982
31987
  rx: 2,
31983
31988
  ry: 2
31984
31989
  }), innerHeight > 16 && /*#__PURE__*/React$1.createElement("text", {
@@ -32102,11 +32107,11 @@ const InnerBar = props => {
32102
32107
  width: "100%",
32103
32108
  height: "40px",
32104
32109
  legendData: [{
32105
- iconColor: "#CCDCDD",
32110
+ iconColor: backgroundColor,
32106
32111
  iconType: "Square",
32107
32112
  title: "New Shoppers"
32108
32113
  }, {
32109
- iconColor: "#07575b",
32114
+ iconColor: color,
32110
32115
  iconType: "Square",
32111
32116
  title: "Repeaters"
32112
32117
  }]
@@ -32122,7 +32127,10 @@ const BrushChart = props => {
32122
32127
  brushBarBasketData,
32123
32128
  brushAreaBarData,
32124
32129
  segmentedbuttonOptions,
32125
- title
32130
+ title,
32131
+ lineChartColor,
32132
+ innerChartColor,
32133
+ barChartColor
32126
32134
  } = props;
32127
32135
  const [selectedOption, setSelectedOption] = useState(segmentedbuttonOptions[0]);
32128
32136
  return /*#__PURE__*/React$1.createElement(Container, {
@@ -32140,12 +32148,18 @@ const BrushChart = props => {
32140
32148
  return setSelectedOption(value);
32141
32149
  }
32142
32150
  }), /*#__PURE__*/React$1.createElement(ChartContainer, null, selectedOption === "New Shoppers & Repeaters" && /*#__PURE__*/React$1.createElement(InnerBar, {
32151
+ color: innerChartColor,
32152
+ backgroundColor: barChartColor,
32143
32153
  brushInnerBarData: brushInnerBarData
32144
32154
  }), selectedOption === "INC Sales & ROI" && /*#__PURE__*/React$1.createElement(BarLine, {
32155
+ color: barChartColor,
32156
+ lineColor: lineChartColor,
32145
32157
  brushAreaBarData: brushAreaBarData
32146
32158
  }), selectedOption === "INC Units" && /*#__PURE__*/React$1.createElement(SingleChart, {
32159
+ color: barChartColor,
32147
32160
  barData: brushBarIncData
32148
32161
  }), selectedOption === "Basket Lift" && /*#__PURE__*/React$1.createElement(SingleChart, {
32162
+ color: barChartColor,
32149
32163
  barData: brushBarBasketData
32150
32164
  })));
32151
32165
  };