sag_components 2.0.0-beta63 → 2.0.0-beta65

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
@@ -31478,15 +31478,15 @@ const SeparatedLineBarChart = ({
31478
31478
  payload
31479
31479
  } = props;
31480
31480
  const label = payload.value;
31481
- const words = label.split(' ');
31481
+ const words = label.split(" ");
31482
31482
  const chunks = [];
31483
- let currentChunk = '';
31483
+ let currentChunk = "";
31484
31484
  words.forEach(word => {
31485
31485
  if (currentChunk.length + word.length > 15) {
31486
31486
  chunks.push(currentChunk.trim());
31487
31487
  currentChunk = word;
31488
31488
  } else {
31489
- currentChunk += (currentChunk ? ' ' : '') + word;
31489
+ currentChunk += (currentChunk ? " " : "") + word;
31490
31490
  }
31491
31491
  });
31492
31492
  if (currentChunk) {
@@ -31533,11 +31533,11 @@ const SeparatedLineBarChart = ({
31533
31533
  return /*#__PURE__*/React$1.createElement("div", {
31534
31534
  style: {
31535
31535
  width: "100%",
31536
- height: "700px"
31536
+ height: "100%"
31537
31537
  }
31538
31538
  }, /*#__PURE__*/React$1.createElement("div", {
31539
31539
  style: {
31540
- height: "40%"
31540
+ height: "25%"
31541
31541
  }
31542
31542
  }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
31543
31543
  width: "100%",
@@ -31577,7 +31577,7 @@ const SeparatedLineBarChart = ({
31577
31577
  }, /*#__PURE__*/React$1.createElement(LabelList, {
31578
31578
  dataKey: "inc_roi",
31579
31579
  position: "top",
31580
- formatter: value => value.toFixed(1),
31580
+ formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
31581
31581
  fill: "#212121",
31582
31582
  fontSize: 12,
31583
31583
  fontWeight: "400",
@@ -31594,7 +31594,7 @@ const SeparatedLineBarChart = ({
31594
31594
  hide: true
31595
31595
  })))), /*#__PURE__*/React$1.createElement("div", {
31596
31596
  style: {
31597
- height: "60%"
31597
+ height: "70%"
31598
31598
  }
31599
31599
  }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
31600
31600
  width: "100%",
@@ -31630,7 +31630,7 @@ const SeparatedLineBarChart = ({
31630
31630
  }, /*#__PURE__*/React$1.createElement(LabelList, {
31631
31631
  dataKey: "inc_sales",
31632
31632
  position: "top",
31633
- formatter: value => `${value / 1000}k`,
31633
+ formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
31634
31634
  fill: "#212121",
31635
31635
  fontSize: 12,
31636
31636
  fontWeight: "400",
@@ -31641,10 +31641,11 @@ const SeparatedLineBarChart = ({
31641
31641
  stroke: "#212121",
31642
31642
  startIndex: 0,
31643
31643
  endIndex: Math.min(6, processedData.length - 1),
31644
- y: 330,
31645
31644
  travellerWidth: 10,
31646
31645
  tickFormatter: (value, index) => index + 1
31647
- })), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31646
+ })), /*#__PURE__*/React$1.createElement("div", null)), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31647
+ width: "100%",
31648
+ height: "40px",
31648
31649
  legendData: [{
31649
31650
  iconColor: "#CCDCDD",
31650
31651
  iconType: "Square",
@@ -31654,7 +31655,7 @@ const SeparatedLineBarChart = ({
31654
31655
  iconType: "LegendUnionIcon",
31655
31656
  title: "INC Sales ROI"
31656
31657
  }]
31657
- })))));
31658
+ })));
31658
31659
  };
31659
31660
 
31660
31661
  function SingleChart({
@@ -31714,11 +31715,12 @@ function SingleChart({
31714
31715
  };
31715
31716
  return /*#__PURE__*/React$1.createElement("div", {
31716
31717
  style: {
31717
- width: "100%"
31718
+ width: "100%",
31719
+ height: "100%"
31718
31720
  }
31719
31721
  }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
31720
- width: width,
31721
- height: height
31722
+ width: "100%",
31723
+ height: "95%"
31722
31724
  }, /*#__PURE__*/React$1.createElement(ComposedChart, {
31723
31725
  data: dataWithIndex,
31724
31726
  margin: {
@@ -31755,7 +31757,7 @@ function SingleChart({
31755
31757
  }, /*#__PURE__*/React$1.createElement(LabelList, {
31756
31758
  dataKey: "value",
31757
31759
  position: "top",
31758
- formatter: value => `$${value / 1000}k`,
31760
+ formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
31759
31761
  fill: "#212121",
31760
31762
  fontSize: 12,
31761
31763
  fontWeight: "400",
@@ -31764,15 +31766,16 @@ function SingleChart({
31764
31766
  height: 30,
31765
31767
  travellerWidth: 10,
31766
31768
  startIndex: 0,
31767
- endIndex: Math.min(6, barData.length - 1),
31768
- y: 380
31769
- })), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31769
+ endIndex: Math.min(6, barData.length - 1)
31770
+ }))), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31771
+ width: "100%",
31772
+ height: "40px",
31770
31773
  legendData: [{
31771
31774
  iconColor: "#CCDCDD",
31772
31775
  iconType: "Square",
31773
31776
  title: "INC Units"
31774
31777
  }]
31775
- })));
31778
+ }));
31776
31779
  }
31777
31780
 
31778
31781
  styled.div`
@@ -32070,15 +32073,15 @@ function InnerBarChart({
32070
32073
  const label = payload.value;
32071
32074
 
32072
32075
  // Split the label into chunks of words
32073
- const words = label.split(' ');
32076
+ const words = label.split(" ");
32074
32077
  const chunks = [];
32075
- let currentChunk = '';
32078
+ let currentChunk = "";
32076
32079
  words.forEach(word => {
32077
32080
  if (currentChunk.length + word.length > 15) {
32078
32081
  chunks.push(currentChunk.trim());
32079
32082
  currentChunk = word;
32080
32083
  } else {
32081
- currentChunk += ' ' + word;
32084
+ currentChunk += " " + word;
32082
32085
  }
32083
32086
  });
32084
32087
  if (currentChunk) {
@@ -32100,9 +32103,14 @@ function InnerBarChart({
32100
32103
  dy: i === 0 ? "0.71em" : "1.2em"
32101
32104
  }, chunk))));
32102
32105
  };
32103
- return /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
32106
+ return /*#__PURE__*/React$1.createElement("div", {
32107
+ style: {
32108
+ width: "100%",
32109
+ height: "100%"
32110
+ }
32111
+ }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
32104
32112
  width: "100%",
32105
- height: "100%"
32113
+ height: "95%"
32106
32114
  }, /*#__PURE__*/React$1.createElement(BarChart$1, {
32107
32115
  data: brushInnerBarData,
32108
32116
  margin: {
@@ -32134,7 +32142,19 @@ function InnerBarChart({
32134
32142
  travellerWidth: 10,
32135
32143
  startIndex: 0,
32136
32144
  endIndex: Math.min(6, brushInnerBarData.length - 1)
32137
- })));
32145
+ }))), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
32146
+ width: "100%",
32147
+ height: "40px",
32148
+ legendData: [{
32149
+ iconColor: "#CCDCDD",
32150
+ iconType: "Square",
32151
+ title: "New Shoppers"
32152
+ }, {
32153
+ iconColor: "#07575b",
32154
+ iconType: "Square",
32155
+ title: "Repeaters"
32156
+ }]
32157
+ }));
32138
32158
  }
32139
32159
 
32140
32160
  const BrushChart = props => {