sag_components 2.0.0-beta57 → 2.0.0-beta58

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
@@ -1933,7 +1933,7 @@ const TitleAndValueContainer$4 = styled.div`
1933
1933
  flex-direction: column;
1934
1934
  padding: 0 20px;
1935
1935
  `;
1936
- const Title$d = styled.h4`
1936
+ const Title$f = styled.h4`
1937
1937
  font-weight: 400;
1938
1938
  font-size: 18px;
1939
1939
  margin: 0 0 8px;
@@ -2068,7 +2068,7 @@ const AvarageDelimiter = styled.div`
2068
2068
  `;
2069
2069
 
2070
2070
  /* Custom properties */
2071
- const TooltipContainer$3 = styled.div`
2071
+ const TooltipContainer$4 = styled.div`
2072
2072
  --tooltip-text-color: black;
2073
2073
  --tooltip-background-color: white;
2074
2074
  --tooltip-margin: 40px;
@@ -2182,7 +2182,7 @@ const Tooltip$1 = props => {
2182
2182
  clearInterval(timeout);
2183
2183
  setActive(false);
2184
2184
  };
2185
- return /*#__PURE__*/React$1.createElement(TooltipContainer$3, null, /*#__PURE__*/React$1.createElement(TooltipWrapper$2, {
2185
+ return /*#__PURE__*/React$1.createElement(TooltipContainer$4, null, /*#__PURE__*/React$1.createElement(TooltipWrapper$2, {
2186
2186
  onMouseEnter: showTip,
2187
2187
  onMouseLeave: hideTip
2188
2188
  }, children, active && /*#__PURE__*/React$1.createElement(TooltipTip$1, {
@@ -2413,7 +2413,7 @@ const PieChart = props => {
2413
2413
  width: width
2414
2414
  }, !hideTitleAndValue && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$4, {
2415
2415
  className: "TitleAndValueContainer"
2416
- }, /*#__PURE__*/React$1.createElement(Title$d, {
2416
+ }, /*#__PURE__*/React$1.createElement(Title$f, {
2417
2417
  className: "Title"
2418
2418
  }, title), /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer$2, {
2419
2419
  className: "CurrencySignAndFormattedValueContainer"
@@ -9484,70 +9484,67 @@ const DropdownMain = styled.div`
9484
9484
  `;
9485
9485
 
9486
9486
  /* eslint-disable react/prop-types */
9487
- const DropdownNew = _ref => {
9488
- let {
9489
- isMulti,
9490
- label,
9491
- labelEmptyValue,
9492
- options,
9493
- selectedValue,
9494
- placeHolder,
9495
- onChange,
9496
- required,
9497
- disabled,
9498
- width,
9499
- error,
9500
- errorMessage,
9501
- labelColor,
9502
- checkBoxColor,
9503
- xIconShow,
9504
- showLabelOnTop,
9505
- orderBy,
9506
- elementType
9507
- } = _ref;
9508
- return /*#__PURE__*/React$1.createElement(DropdownMain, {
9509
- className: "DropdownMain",
9510
- width: width
9511
- }, isMulti ? /*#__PURE__*/React$1.createElement(DropdownMultiNew, {
9512
- className: "DropdownMultiNew",
9513
- placeHolder: placeHolder,
9514
- label: label,
9515
- labelEmptyValue: labelEmptyValue,
9516
- labelColor: labelColor,
9517
- checkBoxColor: checkBoxColor,
9518
- required: required,
9519
- options: options,
9520
- width: width,
9521
- disabled: disabled,
9522
- error: error,
9523
- errorMessage: errorMessage,
9524
- selectedValue: selectedValue,
9525
- xIconShow: xIconShow,
9526
- onChange: onChange,
9527
- showLabelOnTop: showLabelOnTop,
9528
- orderBy: orderBy,
9529
- elementType: elementType
9530
- }) : /*#__PURE__*/React$1.createElement(DropdownSingleNew, {
9531
- className: "DropdownSingleNew",
9532
- placeHolder: placeHolder,
9533
- label: label,
9534
- labelEmptyValue: labelEmptyValue,
9535
- labelColor: labelColor,
9536
- checkBoxColor: checkBoxColor,
9537
- required: required,
9538
- options: options,
9539
- width: width,
9540
- disabled: disabled,
9541
- error: error,
9542
- errorMessage: errorMessage,
9543
- selectedValue: selectedValue,
9544
- xIconShow: xIconShow,
9545
- onChange: onChange,
9546
- showLabelOnTop: showLabelOnTop,
9547
- orderBy: orderBy,
9548
- elementType: elementType
9549
- }));
9550
- };
9487
+ const DropdownNew = ({
9488
+ isMulti,
9489
+ label,
9490
+ labelEmptyValue,
9491
+ options,
9492
+ selectedValue,
9493
+ placeHolder,
9494
+ onChange,
9495
+ required,
9496
+ disabled,
9497
+ width,
9498
+ error,
9499
+ errorMessage,
9500
+ labelColor,
9501
+ checkBoxColor,
9502
+ xIconShow,
9503
+ showLabelOnTop,
9504
+ orderBy,
9505
+ elementType
9506
+ }) => /*#__PURE__*/React$1.createElement(DropdownMain, {
9507
+ className: "DropdownMain",
9508
+ width: width
9509
+ }, isMulti ? /*#__PURE__*/React$1.createElement(DropdownMultiNew, {
9510
+ className: "DropdownMultiNew",
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
+ }) : /*#__PURE__*/React$1.createElement(DropdownSingleNew, {
9529
+ className: "DropdownSingleNew",
9530
+ placeHolder: placeHolder,
9531
+ label: label,
9532
+ labelEmptyValue: labelEmptyValue,
9533
+ labelColor: labelColor,
9534
+ checkBoxColor: checkBoxColor,
9535
+ required: required,
9536
+ options: options,
9537
+ width: width,
9538
+ disabled: disabled,
9539
+ error: error,
9540
+ errorMessage: errorMessage,
9541
+ selectedValue: selectedValue,
9542
+ xIconShow: xIconShow,
9543
+ onChange: onChange,
9544
+ showLabelOnTop: showLabelOnTop,
9545
+ orderBy: orderBy,
9546
+ elementType: elementType
9547
+ }));
9551
9548
  DropdownNew.propTypes = {
9552
9549
  placeHolder: PropTypes.string,
9553
9550
  label: PropTypes.string,
@@ -9720,35 +9717,41 @@ const OptionsContainer$4 = styled.div`
9720
9717
  padding-top: 8px;
9721
9718
  `;
9722
9719
 
9723
- const ChervronRightIcon = ({
9724
- width = "8",
9725
- height = "13",
9726
- fill = "#777575"
9727
- }) => /*#__PURE__*/React$1.createElement("svg", {
9728
- width: width,
9729
- height: height,
9730
- viewBox: "0 0 8 13",
9731
- fill: "none",
9732
- xmlns: "http://www.w3.org/2000/svg"
9733
- }, /*#__PURE__*/React$1.createElement("path", {
9734
- d: "M7.33984 5.78516C7.58594 6.05859 7.58594 6.46875 7.33984 6.71484L2.08984 11.9648C1.81641 12.2383 1.40625 12.2383 1.16016 11.9648C0.886719 11.7188 0.886719 11.3086 1.16016 11.0625L5.94531 6.27734L1.16016 1.46484C0.886719 1.21875 0.886719 0.808594 1.16016 0.5625C1.40625 0.289062 1.81641 0.289062 2.0625 0.5625L7.33984 5.78516Z",
9735
- fill: fill
9736
- }));
9720
+ const ChervronRightIcon = _ref => {
9721
+ let {
9722
+ width = "8",
9723
+ height = "13",
9724
+ fill = "#777575"
9725
+ } = _ref;
9726
+ return /*#__PURE__*/React$1.createElement("svg", {
9727
+ width: width,
9728
+ height: height,
9729
+ viewBox: "0 0 8 13",
9730
+ fill: "none",
9731
+ xmlns: "http://www.w3.org/2000/svg"
9732
+ }, /*#__PURE__*/React$1.createElement("path", {
9733
+ d: "M7.33984 5.78516C7.58594 6.05859 7.58594 6.46875 7.33984 6.71484L2.08984 11.9648C1.81641 12.2383 1.40625 12.2383 1.16016 11.9648C0.886719 11.7188 0.886719 11.3086 1.16016 11.0625L5.94531 6.27734L1.16016 1.46484C0.886719 1.21875 0.886719 0.808594 1.16016 0.5625C1.40625 0.289062 1.81641 0.289062 2.0625 0.5625L7.33984 5.78516Z",
9734
+ fill: fill
9735
+ }));
9736
+ };
9737
9737
 
9738
- const ChervronLeftIcon = ({
9739
- width = 7,
9740
- height = 13,
9741
- fill = "#777575"
9742
- }) => /*#__PURE__*/React$1.createElement("svg", {
9743
- width: width,
9744
- height: height,
9745
- viewBox: "0 0 7 13",
9746
- fill: "none",
9747
- xmlns: "http://www.w3.org/2000/svg"
9748
- }, /*#__PURE__*/React$1.createElement("path", {
9749
- d: "M0.410156 5.78516L5.66016 0.5625C5.90625 0.289062 6.31641 0.289062 6.58984 0.5625C6.83594 0.808594 6.83594 1.21875 6.58984 1.46484L1.77734 6.25L6.5625 11.0625C6.83594 11.3086 6.83594 11.7188 6.5625 11.9648C6.31641 12.2383 5.90625 12.2383 5.66016 11.9648L0.410156 6.71484C0.136719 6.46875 0.136719 6.05859 0.410156 5.78516Z",
9750
- fill: fill
9751
- }));
9738
+ const ChervronLeftIcon = _ref => {
9739
+ let {
9740
+ width = 7,
9741
+ height = 13,
9742
+ fill = "#777575"
9743
+ } = _ref;
9744
+ return /*#__PURE__*/React$1.createElement("svg", {
9745
+ width: width,
9746
+ height: height,
9747
+ viewBox: "0 0 7 13",
9748
+ fill: "none",
9749
+ xmlns: "http://www.w3.org/2000/svg"
9750
+ }, /*#__PURE__*/React$1.createElement("path", {
9751
+ d: "M0.410156 5.78516L5.66016 0.5625C5.90625 0.289062 6.31641 0.289062 6.58984 0.5625C6.83594 0.808594 6.83594 1.21875 6.58984 1.46484L1.77734 6.25L6.5625 11.0625C6.83594 11.3086 6.83594 11.7188 6.5625 11.9648C6.31641 12.2383 5.90625 12.2383 5.66016 11.9648L0.410156 6.71484C0.136719 6.46875 0.136719 6.05859 0.410156 5.78516Z",
9752
+ fill: fill
9753
+ }));
9754
+ };
9752
9755
 
9753
9756
  /* eslint-disable react/prop-types */
9754
9757
 
@@ -9969,21 +9972,20 @@ const DatePicker = ({
9969
9972
  };
9970
9973
 
9971
9974
  /* eslint-disable import/no-extraneous-dependencies */
9972
- const RangePicker = _ref => {
9973
- let {
9974
- label,
9975
- onChange,
9976
- borderRadius,
9977
- required,
9978
- width,
9979
- height,
9980
- placeholder,
9981
- disabled,
9982
- borderColor,
9983
- borderColorFocus,
9984
- textColor,
9985
- selectedValue
9986
- } = _ref;
9975
+ const RangePicker = ({
9976
+ label,
9977
+ onChange,
9978
+ borderRadius,
9979
+ required,
9980
+ width,
9981
+ height,
9982
+ placeholder,
9983
+ disabled,
9984
+ borderColor,
9985
+ borderColorFocus,
9986
+ textColor,
9987
+ selectedValue
9988
+ }) => {
9987
9989
  const [isFocused, setIsFocused] = useState(false);
9988
9990
  const [isOpen, setIsOpen] = useState(false);
9989
9991
  const [value, setValue] = useState(''); // Added value state
@@ -10424,23 +10426,22 @@ const QuarterPopupPicker = ({
10424
10426
  };
10425
10427
 
10426
10428
  /* eslint-disable import/no-extraneous-dependencies */
10427
- const QuarterPicker = _ref => {
10428
- let {
10429
- availableQuarters,
10430
- // ["Q1-2024"]
10431
- label,
10432
- onChange,
10433
- borderRadius,
10434
- required,
10435
- width,
10436
- height,
10437
- placeholder,
10438
- disabled,
10439
- borderColor,
10440
- borderColorFocus,
10441
- textColor,
10442
- selectedValue
10443
- } = _ref;
10429
+ const QuarterPicker = ({
10430
+ availableQuarters,
10431
+ // ["Q1-2024"]
10432
+ label,
10433
+ onChange,
10434
+ borderRadius,
10435
+ required,
10436
+ width,
10437
+ height,
10438
+ placeholder,
10439
+ disabled,
10440
+ borderColor,
10441
+ borderColorFocus,
10442
+ textColor,
10443
+ selectedValue
10444
+ }) => {
10444
10445
  const [isFocused, setIsFocused] = useState(false);
10445
10446
  const [isOpen, setIsOpen] = useState(false);
10446
10447
  const [value, setValue] = useState('');
@@ -10887,22 +10888,21 @@ const MonthPopupPicker = ({
10887
10888
  };
10888
10889
 
10889
10890
  /* eslint-disable import/no-extraneous-dependencies */
10890
- const MonthPicker = _ref => {
10891
- let {
10892
- availableMonths,
10893
- label,
10894
- onChange,
10895
- borderRadius,
10896
- required,
10897
- width,
10898
- height,
10899
- placeholder,
10900
- disabled,
10901
- borderColor,
10902
- borderColorFocus,
10903
- textColor,
10904
- selectedValue
10905
- } = _ref;
10891
+ const MonthPicker = ({
10892
+ availableMonths,
10893
+ label,
10894
+ onChange,
10895
+ borderRadius,
10896
+ required,
10897
+ width,
10898
+ height,
10899
+ placeholder,
10900
+ disabled,
10901
+ borderColor,
10902
+ borderColorFocus,
10903
+ textColor,
10904
+ selectedValue
10905
+ }) => {
10906
10906
  const [isFocused, setIsFocused] = useState(false);
10907
10907
  const [isOpen, setIsOpen] = useState(false);
10908
10908
  const [value, setValue] = useState('');
@@ -11133,7 +11133,7 @@ const TooltipTextContainer = styled.div`
11133
11133
  cursor: pointer;
11134
11134
  }
11135
11135
  `;
11136
- const TooltipText$1 = styled.div`
11136
+ const TooltipText$2 = styled.div`
11137
11137
  margin: 0;
11138
11138
  `;
11139
11139
 
@@ -11303,8 +11303,8 @@ const FilterPanel = props => {
11303
11303
  fieldsData: newFieldsDataState
11304
11304
  });
11305
11305
  };
11306
- const getTooltipTextDates = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$1, null, "Dates can be selected"), /*#__PURE__*/React$1.createElement(TooltipText$1, null, "only after selecting"), /*#__PURE__*/React$1.createElement(TooltipText$1, null, "period types"));
11307
- const getTooltipTextGoButton = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$1, null, tooltipTextGoButton));
11306
+ const getTooltipTextDates = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$2, null, "Dates can be selected"), /*#__PURE__*/React$1.createElement(TooltipText$2, null, "only after selecting"), /*#__PURE__*/React$1.createElement(TooltipText$2, null, "period types"));
11307
+ const getTooltipTextGoButton = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$2, null, tooltipTextGoButton));
11308
11308
  const getYearsArray = () => {
11309
11309
  const currentYear = moment().year();
11310
11310
  const previousYear = moment().subtract(1, 'years').year();
@@ -24128,22 +24128,21 @@ const DeleteIcon = styled.div`
24128
24128
  position: absolute;
24129
24129
  `;
24130
24130
 
24131
- const QuickFilterDropdownSingle = _ref => {
24132
- let {
24133
- label,
24134
- hoverColor,
24135
- options,
24136
- selectedValue,
24137
- placeHolder,
24138
- onChange,
24139
- disabled,
24140
- width,
24141
- error,
24142
- errorMessage,
24143
- xIconShow,
24144
- labelColor,
24145
- showLabelOnTop
24146
- } = _ref;
24131
+ const QuickFilterDropdownSingle = ({
24132
+ label,
24133
+ hoverColor,
24134
+ options,
24135
+ selectedValue,
24136
+ placeHolder,
24137
+ onChange,
24138
+ disabled,
24139
+ width,
24140
+ error,
24141
+ errorMessage,
24142
+ xIconShow,
24143
+ labelColor,
24144
+ showLabelOnTop
24145
+ }) => {
24147
24146
  const [isFocused, setIsFocused] = useState(false);
24148
24147
  const [showOptions, setShowOptions] = useState(false);
24149
24148
  const [inputValue, setInputValue] = useState("");
@@ -24541,24 +24540,23 @@ const IconContainer$2 = styled.div`
24541
24540
  cursor: pointer;
24542
24541
  `;
24543
24542
 
24544
- const QuickFilterDropdownMultiSelection = _ref => {
24545
- let {
24546
- label,
24547
- labelEmptyValue,
24548
- options,
24549
- selectedValue,
24550
- placeHolder,
24551
- onChange,
24552
- required,
24553
- disabled,
24554
- width,
24555
- error,
24556
- errorMessage,
24557
- labelColor,
24558
- xIconShow,
24559
- checkBoxColor,
24560
- showLabelOnTop
24561
- } = _ref;
24543
+ const QuickFilterDropdownMultiSelection = ({
24544
+ label,
24545
+ labelEmptyValue,
24546
+ options,
24547
+ selectedValue,
24548
+ placeHolder,
24549
+ onChange,
24550
+ required,
24551
+ disabled,
24552
+ width,
24553
+ error,
24554
+ errorMessage,
24555
+ labelColor,
24556
+ xIconShow,
24557
+ checkBoxColor,
24558
+ showLabelOnTop
24559
+ }) => {
24562
24560
  const [isFocused, setIsFocused] = useState(false);
24563
24561
  const [showOptions, setShowOptions] = useState(false);
24564
24562
  const [inputValue, setInputValue] = useState('');
@@ -25381,7 +25379,7 @@ const TitleAndValueContainer$3 = styled.div`
25381
25379
  display: flex;
25382
25380
  flex-direction: column;
25383
25381
  `;
25384
- const Title$c = styled.h4`
25382
+ const Title$e = styled.h4`
25385
25383
  font-weight: 400;
25386
25384
  font-size: 20px;
25387
25385
  margin: 0;
@@ -25444,7 +25442,7 @@ const FormattedValue$3 = props => {
25444
25442
  width: width
25445
25443
  }, /*#__PURE__*/React$1.createElement(TitleAndValueContainer$3, {
25446
25444
  className: "TitleAndValueContainer"
25447
- }, title ? /*#__PURE__*/React$1.createElement(Title$c, {
25445
+ }, title ? /*#__PURE__*/React$1.createElement(Title$e, {
25448
25446
  className: "Title",
25449
25447
  width: width
25450
25448
  }, title) : '', showTopValue && /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer$1, {
@@ -25456,7 +25454,7 @@ const FormattedValue$3 = props => {
25456
25454
  className: "CurrencySignOrPercent"
25457
25455
  }, currencySign ? getCurrencySign(currencyType, value) : ''), dotCut ? getFormattedValue(value && Math.abs(value) > 0 && value % 1 !== 0 ? value?.toFixed(2) : value) : getNumberWithCommas(value), dotCut ? getFormattedUnits(value) : '', /*#__PURE__*/React$1.createElement(CurrencySignOrPercent, {
25458
25456
  className: "CurrencySignOrPercent"
25459
- }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React$1.createElement(Title$c, {
25457
+ }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React$1.createElement(Title$e, {
25460
25458
  className: "Title",
25461
25459
  width: width
25462
25460
  }, subtitle) : '')));
@@ -25518,7 +25516,7 @@ const TooltipLabel$3 = styled.div`
25518
25516
  font-weight: 400;
25519
25517
  width: fit-content;
25520
25518
  `;
25521
- const TooltipTitle$3 = styled.div`
25519
+ const TooltipTitle$4 = styled.div`
25522
25520
  color: #212121;
25523
25521
  font-size: 14px;
25524
25522
  font-weight: 600;
@@ -25526,7 +25524,7 @@ const TooltipTitle$3 = styled.div`
25526
25524
  const TitleAndValueContainer$2 = styled.div`
25527
25525
  padding: 0 1rem;
25528
25526
  `;
25529
- const Title$b = styled.h5`
25527
+ const Title$d = styled.h5`
25530
25528
  font-weight: 500;
25531
25529
  font-size: 18px;
25532
25530
  line-height: 20px;
@@ -25655,7 +25653,7 @@ const TitleAndIconContainer = styled.div`
25655
25653
  display: flex;
25656
25654
  align-items: center;
25657
25655
  `;
25658
- const Title$a = styled.h4`
25656
+ const Title$c = styled.h4`
25659
25657
  font-weight: 400;
25660
25658
  font-size: 14px;
25661
25659
  line-height: 27px;
@@ -25709,7 +25707,7 @@ const PerformanceAnalyticsLegend = props => {
25709
25707
  color: item.iconColor
25710
25708
  }) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$2 ? /*#__PURE__*/React$1.createElement(LegendLineIcon, {
25711
25709
  color: item.iconColor
25712
- }) : '', /*#__PURE__*/React$1.createElement(Title$a, {
25710
+ }) : '', /*#__PURE__*/React$1.createElement(Title$c, {
25713
25711
  id: "Title",
25714
25712
  width: width
25715
25713
  }, item.title))))) : '');
@@ -25807,7 +25805,7 @@ const BarChartsByWeeks = props => {
25807
25805
  let currentTooltipSecondValue = 0;
25808
25806
  if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
25809
25807
  if (payload[0].payload?.secondValue) currentTooltipSecondValue = payload[0].payload?.secondValue;
25810
- return /*#__PURE__*/React$1.createElement(TooltipDiv$3, null, /*#__PURE__*/React$1.createElement(TooltipTitle$3, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React$1.createElement(TooltipLabel$3, null, `${tooltipTitle}
25808
+ return /*#__PURE__*/React$1.createElement(TooltipDiv$3, null, /*#__PURE__*/React$1.createElement(TooltipTitle$4, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React$1.createElement(TooltipLabel$3, null, `${tooltipTitle}
25811
25809
  ${displayFormattedValue(currentTooltipValue)}
25812
25810
  `), currentTooltipSecondValue ? /*#__PURE__*/React$1.createElement(TooltipLabel$3, null, `${tooltipSecondTitle}
25813
25811
  ${displayFormattedValue(currentTooltipSecondValue)}
@@ -25864,7 +25862,7 @@ const BarChartsByWeeks = props => {
25864
25862
  ref: controlsContainerRef
25865
25863
  }, /*#__PURE__*/React$1.createElement(Controls$6, {
25866
25864
  height: getControlsHeight()
25867
- }, showTitle && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React$1.createElement(Title$b, null, title), /*#__PURE__*/React$1.createElement(FormattedValue$3, {
25865
+ }, showTitle && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React$1.createElement(Title$d, null, title), /*#__PURE__*/React$1.createElement(FormattedValue$3, {
25868
25866
  title: headerValueTopTitle,
25869
25867
  subtitle: headerValueBottomTitle,
25870
25868
  showTopValue: showHeaderTopValue,
@@ -26097,7 +26095,7 @@ const TitleAndValueContainer$1 = styled.div`
26097
26095
  flex-direction: column;
26098
26096
  padding: 0 1.25em; /* 20px → 1.25em */
26099
26097
  `;
26100
- const Title$9 = styled.h4`
26098
+ const Title$b = styled.h4`
26101
26099
  font-weight: 500;
26102
26100
  font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
26103
26101
  margin: 0;
@@ -26300,7 +26298,7 @@ const TotalDoughnutChart = props => {
26300
26298
  width: width
26301
26299
  }, !hideTitleAndValue && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$1, {
26302
26300
  className: "TitleAndValueContainer"
26303
- }, /*#__PURE__*/React$1.createElement(Title$9, {
26301
+ }, /*#__PURE__*/React$1.createElement(Title$b, {
26304
26302
  className: "Title",
26305
26303
  fontSize: titleFontSize
26306
26304
  }, title), /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer, {
@@ -26430,7 +26428,7 @@ CustomTooltip.defaultProps = {
26430
26428
  isPercent: false
26431
26429
  };
26432
26430
 
26433
- const TooltipContainer$2 = styled.div`
26431
+ const TooltipContainer$3 = styled.div`
26434
26432
  --tooltip-text-color: black;
26435
26433
  --tooltip-background-color: white;
26436
26434
  --tooltip-margin: 40px;
@@ -26536,7 +26534,7 @@ const Tooltip = props => {
26536
26534
  direction,
26537
26535
  content
26538
26536
  } = props;
26539
- return /*#__PURE__*/React$1.createElement(TooltipContainer$2, {
26537
+ return /*#__PURE__*/React$1.createElement(TooltipContainer$3, {
26540
26538
  className: className,
26541
26539
  top: `${top}px`,
26542
26540
  left: `${left}px`
@@ -26622,7 +26620,7 @@ const TotalValue = styled.div`
26622
26620
  font-size: 20px;
26623
26621
  }
26624
26622
  `;
26625
- const Title$8 = styled.h4`
26623
+ const Title$a = styled.h4`
26626
26624
  font-size: 18px;
26627
26625
  font-weight: 400;
26628
26626
  line-height: 1;
@@ -26779,7 +26777,7 @@ const TotalHorizontalCharts = props => {
26779
26777
  }, chartsData?.length > 0 ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, !hideTitle || !hideTotalValue ? /*#__PURE__*/React$1.createElement(CardHeader, {
26780
26778
  ref: topHeader,
26781
26779
  className: "CardHeader"
26782
- }, !hideTitle ? /*#__PURE__*/React$1.createElement(Title$8, null, title) : '', !hideTotalValue ? /*#__PURE__*/React$1.createElement(TotalValue, {
26780
+ }, !hideTitle ? /*#__PURE__*/React$1.createElement(Title$a, null, title) : '', !hideTotalValue ? /*#__PURE__*/React$1.createElement(TotalValue, {
26783
26781
  className: "TotalValue"
26784
26782
  }, currencySign && /*#__PURE__*/React$1.createElement(CurrencySign, {
26785
26783
  className: "CurrencySign"
@@ -27252,7 +27250,7 @@ const ItemContainer = styled.div`
27252
27250
  flex-direction: column;
27253
27251
  flex-wrap: wrap;
27254
27252
  `;
27255
- const Title$7 = styled.h4`
27253
+ const Title$9 = styled.h4`
27256
27254
  font-size: 18px;
27257
27255
  font-weight: 500;
27258
27256
  margin: 0;
@@ -27368,7 +27366,7 @@ const SalesAndROI = props => {
27368
27366
  showBorderShadow: showBorderShadow
27369
27367
  }, /*#__PURE__*/React$1.createElement(TitleAndValueContainer, {
27370
27368
  id: "TitleAndValueContainer"
27371
- }, /*#__PURE__*/React$1.createElement(Title$7, {
27369
+ }, /*#__PURE__*/React$1.createElement(Title$9, {
27372
27370
  id: "Title"
27373
27371
  }, title), showBanner && /*#__PURE__*/React$1.createElement(OutBanner, {
27374
27372
  id: "OutBanner",
@@ -27447,7 +27445,7 @@ const ModalOverlay = styled.div`
27447
27445
  justify-content: center;
27448
27446
  align-items: center;
27449
27447
  `;
27450
- const ModalContent = styled.div`
27448
+ const ModalContent$1 = styled.div`
27451
27449
  font-family: "Poppins", sans-serif;
27452
27450
  font-weight: 500;
27453
27451
  font-size: 18px;
@@ -27467,7 +27465,7 @@ const TitleContainer$1 = styled.div`
27467
27465
  margin: 0;
27468
27466
  border-bottom: 1px solid #b1b1b1;
27469
27467
  `;
27470
- const Title$6 = styled.p`
27468
+ const Title$8 = styled.p`
27471
27469
  font-weight: 400;
27472
27470
  font-size: 24px;
27473
27471
  margin: 0;
@@ -27680,14 +27678,14 @@ const PopupCharts = props => {
27680
27678
  }, IsPopupChartsOpen && /*#__PURE__*/React$1.createElement(ModalOverlay, {
27681
27679
  id: "ModalOverlay",
27682
27680
  className: "modal-overlay"
27683
- }, /*#__PURE__*/React$1.createElement(ModalContent, {
27681
+ }, /*#__PURE__*/React$1.createElement(ModalContent$1, {
27684
27682
  id: "ModalContent",
27685
27683
  ref: divRef,
27686
27684
  className: "modal-content",
27687
27685
  height: height,
27688
27686
  width: width,
27689
27687
  onClick: e => e.stopPropagation()
27690
- }, /*#__PURE__*/React$1.createElement(TitleContainer$1, null, /*#__PURE__*/React$1.createElement(Title$6, null, title), /*#__PURE__*/React$1.createElement(CloseXIconContainer, {
27688
+ }, /*#__PURE__*/React$1.createElement(TitleContainer$1, null, /*#__PURE__*/React$1.createElement(Title$8, null, title), /*#__PURE__*/React$1.createElement(CloseXIconContainer, {
27691
27689
  onClick: e => closePopupCharts(e)
27692
27690
  }, /*#__PURE__*/React$1.createElement(CloseXIcon, null))), /*#__PURE__*/React$1.createElement(ChartsContainer, {
27693
27691
  id: "ChartsContainer",
@@ -27785,7 +27783,7 @@ const TopToggleListMainContainer = styled.div`
27785
27783
  padding: 0 24px;
27786
27784
  width: ${props => props.width};
27787
27785
  `;
27788
- const Title$5 = styled.h4`
27786
+ const Title$7 = styled.h4`
27789
27787
  font-size: 14px;
27790
27788
  font-weight: 600;
27791
27789
  margin: 20px 0 12px;
@@ -27815,7 +27813,7 @@ const TopToggleList = props => {
27815
27813
  } = props;
27816
27814
  return /*#__PURE__*/React$1.createElement(TopToggleListMainContainer, {
27817
27815
  width: width
27818
- }, /*#__PURE__*/React$1.createElement(Title$5, null, title), /*#__PURE__*/React$1.createElement(ListContainer, {
27816
+ }, /*#__PURE__*/React$1.createElement(Title$7, null, title), /*#__PURE__*/React$1.createElement(ListContainer, {
27819
27817
  height: height
27820
27818
  }, list.map(item => /*#__PURE__*/React$1.createElement(ListItem, {
27821
27819
  key: item.value
@@ -27877,7 +27875,7 @@ const TitleContainer = styled.div`
27877
27875
  justify-content: flex-start;
27878
27876
  margin: 0 0 10px 0;
27879
27877
  `;
27880
- const Title$4 = styled.h3`
27878
+ const Title$6 = styled.h3`
27881
27879
  user-select: none;
27882
27880
  text-align: left;
27883
27881
  margin: 0;
@@ -27922,7 +27920,7 @@ const BarLabel = styled.span`
27922
27920
  font-weight: 400;
27923
27921
  user-select: none;
27924
27922
  `;
27925
- const TooltipContainer$1 = styled.div`
27923
+ const TooltipContainer$2 = styled.div`
27926
27924
  position: absolute;
27927
27925
 
27928
27926
  top: ${props => props.top};
@@ -28032,7 +28030,7 @@ const Heatmap = props => {
28032
28030
  if (tooltip && tooltipPosition && tooltip.label === `${item.label} - ${Math.round(item.value / totalValue * 100)}%`) {
28033
28031
  const top = `${tooltipPosition.y}px`;
28034
28032
  const left = `${tooltipPosition.x}px`;
28035
- return /*#__PURE__*/React$1.createElement(TooltipContainer$1, {
28033
+ return /*#__PURE__*/React$1.createElement(TooltipContainer$2, {
28036
28034
  className: "TooltipContainer",
28037
28035
  top: top,
28038
28036
  left: left
@@ -28152,7 +28150,7 @@ const Heatmap = props => {
28152
28150
  className: "HeatmapWrapper"
28153
28151
  }, /*#__PURE__*/React$1.createElement(TitleContainer, {
28154
28152
  className: "TitleContainer"
28155
- }, /*#__PURE__*/React$1.createElement(Title$4, {
28153
+ }, /*#__PURE__*/React$1.createElement(Title$6, {
28156
28154
  className: "Title"
28157
28155
  }, title)), refreshRequired && renderBars(), !refreshRequired && renderBars(), renderLegend()));
28158
28156
  };
@@ -28566,12 +28564,12 @@ const TooltipLabel$1 = styled.div`
28566
28564
  font-weight: 400;
28567
28565
  width: fit-content;
28568
28566
  `;
28569
- const TooltipTitle$2 = styled.div`
28567
+ const TooltipTitle$3 = styled.div`
28570
28568
  color: #212121;
28571
28569
  font-size: 14px;
28572
28570
  font-weight: 600;
28573
28571
  `;
28574
- const Title$3 = styled.h5`
28572
+ const Title$5 = styled.h5`
28575
28573
  font-weight: 500;
28576
28574
  font-size: 18px;
28577
28575
  line-height: 20px;
@@ -28648,7 +28646,7 @@ const BarChart = props => {
28648
28646
  if (!active || !payload || payload?.length === 0) return null;
28649
28647
  let currentTooltipValue = 0;
28650
28648
  if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
28651
- return /*#__PURE__*/React$1.createElement(TooltipDiv$1, null, /*#__PURE__*/React$1.createElement(TooltipTitle$2, null, `${label}`), /*#__PURE__*/React$1.createElement(TooltipLabel$1, null, `${displayFormattedValue(currentTooltipValue, !!showCurrentCampaignStyle)}`));
28649
+ return /*#__PURE__*/React$1.createElement(TooltipDiv$1, null, /*#__PURE__*/React$1.createElement(TooltipTitle$3, null, `${label}`), /*#__PURE__*/React$1.createElement(TooltipLabel$1, null, `${displayFormattedValue(currentTooltipValue, !!showCurrentCampaignStyle)}`));
28652
28650
  };
28653
28651
  const CustomizedTickBarChart = props => {
28654
28652
  const {
@@ -28731,7 +28729,7 @@ const BarChart = props => {
28731
28729
  height: height,
28732
28730
  width: width,
28733
28731
  ref: controlsContainerRef
28734
- }, /*#__PURE__*/React$1.createElement(Controls$3, null, /*#__PURE__*/React$1.createElement(Title$3, null, title), /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
28732
+ }, /*#__PURE__*/React$1.createElement(Controls$3, null, /*#__PURE__*/React$1.createElement(Title$5, null, title), /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
28735
28733
  width: "100%",
28736
28734
  height: 400
28737
28735
  }, /*#__PURE__*/React$1.createElement(BarChart$1, {
@@ -28902,7 +28900,7 @@ const Controls$2 = styled.div`
28902
28900
  flex-direction: column;
28903
28901
  background-color: white;
28904
28902
  `;
28905
- const Title$2 = styled.h5`
28903
+ const Title$4 = styled.h5`
28906
28904
  font-size: 18px;
28907
28905
  font-weight: 400;
28908
28906
  margin: 0 0 30px;
@@ -28935,7 +28933,7 @@ const TooltipLabel = styled.div`
28935
28933
  font-weight: 400;
28936
28934
  width: fit-content;
28937
28935
  `;
28938
- const TooltipTitle$1 = styled.div`
28936
+ const TooltipTitle$2 = styled.div`
28939
28937
  color: #212121;
28940
28938
  font-size: 14px;
28941
28939
  font-weight: 600;
@@ -29088,7 +29086,7 @@ const DoubleBarSingleLine = props => {
29088
29086
  } else {
29089
29087
  `${currentTooltipValue.toFixed(1)}`;
29090
29088
  }
29091
- return /*#__PURE__*/React$1.createElement(TooltipDiv, null, /*#__PURE__*/React$1.createElement(TooltipTitle$1, null, `${label}`), payload.map((item, idx) => {
29089
+ return /*#__PURE__*/React$1.createElement(TooltipDiv, null, /*#__PURE__*/React$1.createElement(TooltipTitle$2, null, `${label}`), payload.map((item, idx) => {
29092
29090
  const dataStateItem = dataState.find(state => state.key === item.dataKey);
29093
29091
  return /*#__PURE__*/React$1.createElement(TooltipLabel, {
29094
29092
  key: item.dataKey || idx
@@ -29161,7 +29159,7 @@ const DoubleBarSingleLine = props => {
29161
29159
  noDataText: noDataText
29162
29160
  }) : /*#__PURE__*/React$1.createElement(Controls$2, {
29163
29161
  className: "Controls"
29164
- }, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$2, null, title), /*#__PURE__*/React$1.createElement(ChartsWrapper, {
29162
+ }, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$4, null, title), /*#__PURE__*/React$1.createElement(ChartsWrapper, {
29165
29163
  width: hasScroll ? `${data.length * 178}px` : 'auto'
29166
29164
  }, /*#__PURE__*/React$1.createElement(LineChartWrapper, null, /*#__PURE__*/React$1.createElement(ResponsiveContainer, null, /*#__PURE__*/React$1.createElement(LineChart, _extends({
29167
29165
  data: transformedData
@@ -29260,7 +29258,7 @@ const CheckboxGroupContainer = styled.div`
29260
29258
  height: 21px;
29261
29259
  gap: 20px;
29262
29260
  `;
29263
- const Title$1 = styled.h5`
29261
+ const Title$3 = styled.h5`
29264
29262
  font-weight: 500;
29265
29263
  font-size: 18px;
29266
29264
  line-height: 20px;
@@ -29280,7 +29278,7 @@ const LegendIcon = styled.div`
29280
29278
  margin-right: 5px;
29281
29279
  background-color: ${props => props.color};
29282
29280
  `;
29283
- const TooltipContainer = styled.div`
29281
+ const TooltipContainer$1 = styled.div`
29284
29282
  background: white;
29285
29283
  padding: 10px;
29286
29284
  border-radius: 5px;
@@ -29290,12 +29288,12 @@ const TooltipContainer = styled.div`
29290
29288
  font-weight: 500;
29291
29289
  font-size: 14px;
29292
29290
  `;
29293
- const TooltipTitle = styled.p`
29291
+ const TooltipTitle$1 = styled.p`
29294
29292
  font-weight: 700;
29295
29293
  margin-top: 5px;
29296
29294
  margin-bottom: 5px;
29297
29295
  `;
29298
- const TooltipText = styled.p`
29296
+ const TooltipText$1 = styled.p`
29299
29297
  margin-top: 5px;
29300
29298
  margin-bottom: 5px;
29301
29299
  `;
@@ -29536,10 +29534,10 @@ const AreaChart = props => {
29536
29534
  payload
29537
29535
  } = _ref3;
29538
29536
  if (active && payload && payload.length) {
29539
- return /*#__PURE__*/React$1.createElement(TooltipContainer, null, /*#__PURE__*/React$1.createElement(TooltipTitle, null, `${payload[0].payload.label}`), payload.map((data, index) => {
29537
+ return /*#__PURE__*/React$1.createElement(TooltipContainer$1, null, /*#__PURE__*/React$1.createElement(TooltipTitle$1, null, `${payload[0].payload.label}`), payload.map((data, index) => {
29540
29538
  const chart = areaChartsState.find(chart => chart.key === data.dataKey);
29541
29539
  if (chart) {
29542
- return /*#__PURE__*/React$1.createElement(TooltipText, {
29540
+ return /*#__PURE__*/React$1.createElement(TooltipText$1, {
29543
29541
  key: index
29544
29542
  }, `${chart.name}: ${displayFormattedValue(data.value, chart.isDollar)}`);
29545
29543
  }
@@ -29588,7 +29586,7 @@ const AreaChart = props => {
29588
29586
  height: height
29589
29587
  }) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(HeaderContainer$2, {
29590
29588
  "data-testid": "header-container"
29591
- }, /*#__PURE__*/React$1.createElement(Title$1, {
29589
+ }, /*#__PURE__*/React$1.createElement(Title$3, {
29592
29590
  "data-testid": "title"
29593
29591
  }, title), /*#__PURE__*/React$1.createElement(CheckboxGroupContainer, {
29594
29592
  "data-testid": "checkbox-group-container"
@@ -30086,7 +30084,7 @@ const HeaderContainer$1 = styled.div`
30086
30084
  align-items: center;
30087
30085
  padding-bottom: 8px;
30088
30086
  `;
30089
- const Title = styled.h3`
30087
+ const Title$2 = styled.h3`
30090
30088
  font-size: 18px;
30091
30089
  font-weight: 400;
30092
30090
  margin: 0;
@@ -30155,7 +30153,7 @@ const BreakdownPanel = props => {
30155
30153
  height: height
30156
30154
  }) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(HeaderContainer$1, {
30157
30155
  "data-testid": "header-container"
30158
- }, /*#__PURE__*/React$1.createElement(Title, {
30156
+ }, /*#__PURE__*/React$1.createElement(Title$2, {
30159
30157
  "data-testid": "title"
30160
30158
  }, title)), /*#__PURE__*/React$1.createElement(CategorySalesMainContainer, {
30161
30159
  "data-testid": "category-sales-main-container"
@@ -31397,42 +31395,29 @@ const BatteryChart = props => {
31397
31395
  }))))))), starText !== "" && /*#__PURE__*/React$1.createElement(StarText, null, starText));
31398
31396
  };
31399
31397
 
31400
- // const originalData = [
31401
- // { label: "Vendor Selling Event: Week 34", inc_sales: 20000, inc_roi: 1.2 },
31402
- // { label: "Vendor Selling Event: Week 36", inc_sales: 10000, inc_roi: 1.2 },
31403
- // { label: "Vendor Selling Event: Week 38", inc_sales: 8000, inc_roi: 0.8 },
31404
- // { label: "Vendor Selling Event: Week 33", inc_sales: 12000, inc_roi: 1.1 },
31405
- // { label: "Vendor Selling Event: Week 29", inc_sales: 8000, inc_roi: 1.2 },
31406
- // { label: "Vendor Selling Event: Week 28", inc_sales: 8000, inc_roi: 0.7 },
31407
- // { label: "Vendor Selling Event: Week 35", inc_sales: 8000, inc_roi: 0.8 },
31408
- // { label: "Vendor Selling Event: Week 30", inc_sales: 9000, inc_roi: 1.1 },
31409
- // ];
31410
-
31411
31398
  const SeparatedLineBarChart = ({
31412
31399
  barlineData = []
31413
31400
  }) => {
31414
- // Sort the data by week number extracted from the label
31415
- const sortedData = barlineData?.sort((a, b) => {
31416
- const weekA = parseInt(a.label.match(/Week (\d+)/)[1], 10);
31417
- const weekB = parseInt(b.label.match(/Week (\d+)/)[1], 10);
31418
- return weekA - weekB;
31401
+ const [startIndex, setStartIndex] = useState(0);
31402
+ useState(6);
31403
+ // Use simple data processing like in the working example
31404
+ const processedData = barlineData.map(item => {
31405
+ return {
31406
+ ...item,
31407
+ // Keep the full label for tooltip and filtering
31408
+ shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
31409
+ };
31419
31410
  });
31420
- const dataWithIndex = sortedData.map((item, index) => ({
31421
- ...item,
31422
- index,
31423
- shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
31424
- }));
31425
- const CustomizedTick = ({
31426
- x,
31427
- y,
31428
- payload,
31429
- viewableIndices
31430
- }) => {
31431
- const label = dataWithIndex[payload.value]?.label ?? "";
31411
+
31412
+ // CustomTick component for the X-axis (similar to working example)
31413
+ const CustomizedTick = props => {
31414
+ const {
31415
+ x,
31416
+ y,
31417
+ payload
31418
+ } = props;
31419
+ const label = payload.value;
31432
31420
  const parts = label.replace("Vendor Selling Event: ", "").split(" ");
31433
- if (!viewableIndices.includes(payload.value)) {
31434
- return null;
31435
- }
31436
31421
  return /*#__PURE__*/React$1.createElement("g", {
31437
31422
  transform: `translate(${x},${y})`
31438
31423
  }, /*#__PURE__*/React$1.createElement("text", {
@@ -31442,7 +31427,7 @@ const SeparatedLineBarChart = ({
31442
31427
  textAnchor: "middle",
31443
31428
  fill: "#212121",
31444
31429
  fontSize: 11,
31445
- fontWeight: "400",
31430
+ fontWeight: 400,
31446
31431
  fontFamily: "Poppins"
31447
31432
  }, /*#__PURE__*/React$1.createElement("tspan", {
31448
31433
  x: 0,
@@ -31452,51 +31437,57 @@ const SeparatedLineBarChart = ({
31452
31437
  dy: 18
31453
31438
  }, "Event: ", parts.join(" "))));
31454
31439
  };
31455
- const CustomLabelListFilter = props => {
31456
- const {
31457
- viewableIndices,
31458
- dataKey,
31459
- position,
31460
- formatter,
31461
- fill,
31462
- fontSize,
31463
- fontWeight,
31464
- fontFamily
31465
- } = props;
31466
- return /*#__PURE__*/React$1.createElement(LabelList, {
31467
- dataKey: dataKey,
31468
- position: position,
31469
- formatter: (value, name, props) => {
31470
- if (!viewableIndices.includes(props.index)) {
31471
- return "";
31472
- }
31473
- return formatter ? formatter(value) : value;
31474
- },
31475
- fill: fill || "#212121",
31476
- fontSize: fontSize || 12,
31477
- fontWeight: fontWeight || "400",
31478
- fontFamily: fontFamily || "Poppins"
31479
- });
31440
+
31441
+ // Custom tooltip (similar to the working example)
31442
+ const CustomTooltip = ({
31443
+ active,
31444
+ payload,
31445
+ label
31446
+ }) => {
31447
+ if (!active || !payload || !payload.length) return null;
31448
+
31449
+ // Find the data item based on index
31450
+ const data = payload[0]?.payload;
31451
+ if (!data) return null;
31452
+ return /*#__PURE__*/React$1.createElement("div", {
31453
+ style: {
31454
+ backgroundColor: "white",
31455
+ padding: "10px",
31456
+ border: "1px solid #ccc",
31457
+ borderRadius: "4px",
31458
+ fontFamily: "Poppins"
31459
+ }
31460
+ }, /*#__PURE__*/React$1.createElement("p", {
31461
+ style: {
31462
+ margin: "0 0 5px",
31463
+ fontWeight: "bold"
31464
+ }
31465
+ }, "EVENT_NAME.DIM_EVENTS: ", data.label), /*#__PURE__*/React$1.createElement("p", {
31466
+ style: {
31467
+ margin: "0 0 5px"
31468
+ }
31469
+ }, "EVENT_DESCRIPTION.DIM_EVENTS: ", data.description || "N/A"), /*#__PURE__*/React$1.createElement("p", {
31470
+ style: {
31471
+ margin: "0 0 5px"
31472
+ }
31473
+ }, "INC Sales: ", data.inc_sales?.toLocaleString()), /*#__PURE__*/React$1.createElement("p", {
31474
+ style: {
31475
+ margin: "0"
31476
+ }
31477
+ }, "INC Sales ROI: ", data.inc_roi?.toFixed(1)));
31480
31478
  };
31479
+
31480
+ // Chart margins (same as in both examples)
31481
31481
  const chartMargins = {
31482
- top: 15,
31483
- right: 40,
31482
+ top: 30,
31483
+ right: 30,
31484
31484
  left: 20,
31485
- bottom: 40
31485
+ bottom: 60
31486
31486
  };
31487
- const [viewWindow, setViewWindow] = useState({
31488
- startIndex: 0,
31489
- endIndex: dataWithIndex.length - 1
31490
- });
31491
- const viewableIndices = [];
31492
- for (let i = viewWindow.startIndex; i <= viewWindow.endIndex; i++) {
31493
- viewableIndices.push(i);
31494
- }
31495
- dataWithIndex.filter(item => viewableIndices.includes(item.index));
31496
31487
  return /*#__PURE__*/React$1.createElement("div", {
31497
31488
  style: {
31498
31489
  width: "100%",
31499
- height: 700
31490
+ height: "700px"
31500
31491
  }
31501
31492
  }, /*#__PURE__*/React$1.createElement("div", {
31502
31493
  style: {
@@ -31506,24 +31497,21 @@ const SeparatedLineBarChart = ({
31506
31497
  width: "100%",
31507
31498
  height: "100%"
31508
31499
  }, /*#__PURE__*/React$1.createElement(LineChart, {
31509
- data: dataWithIndex,
31500
+ data: processedData,
31510
31501
  margin: chartMargins
31511
31502
  }, /*#__PURE__*/React$1.createElement(CartesianGrid, {
31512
31503
  strokeDasharray: "3 3",
31513
31504
  vertical: false
31514
31505
  }), /*#__PURE__*/React$1.createElement(XAxis, {
31515
- dataKey: "index",
31516
- type: "number",
31517
- domain: ['dataMin', 'dataMax'],
31518
- padding: {
31519
- left: 20,
31520
- right: 20
31521
- },
31506
+ dataKey: "label",
31507
+ tick: false,
31522
31508
  hide: true
31523
31509
  }), /*#__PURE__*/React$1.createElement(YAxis, {
31524
31510
  domain: [0, 2],
31525
31511
  hide: true
31526
- }), /*#__PURE__*/React$1.createElement(Tooltip$2, null), /*#__PURE__*/React$1.createElement(Line, {
31512
+ }), /*#__PURE__*/React$1.createElement(Tooltip$2, {
31513
+ content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
31514
+ }), /*#__PURE__*/React$1.createElement(Line, {
31527
31515
  type: "monotone",
31528
31516
  dataKey: "inc_roi",
31529
31517
  stroke: "#F8CD00",
@@ -31534,11 +31522,14 @@ const SeparatedLineBarChart = ({
31534
31522
  },
31535
31523
  activeDot: false,
31536
31524
  name: "INC Sales ROI"
31537
- }, /*#__PURE__*/React$1.createElement(CustomLabelListFilter, {
31525
+ }, /*#__PURE__*/React$1.createElement(LabelList, {
31538
31526
  dataKey: "inc_roi",
31539
31527
  position: "top",
31540
31528
  formatter: value => value.toFixed(1),
31541
- viewableIndices: viewableIndices
31529
+ fill: "#212121",
31530
+ fontSize: 12,
31531
+ fontWeight: "400",
31532
+ fontFamily: "Poppins"
31542
31533
  }))))), /*#__PURE__*/React$1.createElement("div", {
31543
31534
  style: {
31544
31535
  height: "60%"
@@ -31547,59 +31538,48 @@ const SeparatedLineBarChart = ({
31547
31538
  width: "100%",
31548
31539
  height: "100%"
31549
31540
  }, /*#__PURE__*/React$1.createElement(ComposedChart, {
31550
- data: dataWithIndex,
31541
+ data: processedData,
31551
31542
  margin: chartMargins
31552
31543
  }, /*#__PURE__*/React$1.createElement(CartesianGrid, {
31553
31544
  strokeDasharray: "3 3",
31554
31545
  vertical: false
31555
31546
  }), /*#__PURE__*/React$1.createElement(XAxis, {
31556
- dataKey: "index",
31557
- type: "number",
31558
- domain: ['dataMin', 'dataMax'],
31559
- padding: {
31560
- left: 20,
31561
- right: 20
31562
- },
31563
- tick: props => /*#__PURE__*/React$1.createElement(CustomizedTick, _extends({}, props, {
31564
- viewableIndices: viewableIndices
31565
- })),
31547
+ dataKey: "label",
31548
+ tick: /*#__PURE__*/React$1.createElement(CustomizedTick, null),
31566
31549
  interval: 0,
31567
31550
  height: 60,
31568
- tickLine: false,
31569
- ticks: dataWithIndex.map(item => item.index)
31551
+ tickLine: false
31570
31552
  }), /*#__PURE__*/React$1.createElement(YAxis, {
31571
31553
  tickFormatter: v => `${v / 1000}k`,
31572
31554
  hide: true
31573
- }), /*#__PURE__*/React$1.createElement(Tooltip$2, null), /*#__PURE__*/React$1.createElement(Bar, {
31555
+ }), /*#__PURE__*/React$1.createElement(Tooltip$2, {
31556
+ content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
31557
+ }), /*#__PURE__*/React$1.createElement(Bar, {
31574
31558
  dataKey: "inc_sales",
31575
31559
  fill: "#CCDCDD",
31576
- gap: "4px",
31560
+ gap: 4,
31577
31561
  borderRadius: [4, 4, 0, 8],
31578
31562
  barSize: 40,
31579
31563
  name: "INC Sales"
31580
- }, /*#__PURE__*/React$1.createElement(CustomLabelListFilter, {
31564
+ }, /*#__PURE__*/React$1.createElement(LabelList, {
31581
31565
  dataKey: "inc_sales",
31582
31566
  position: "top",
31583
31567
  formatter: value => `${value / 1000}k`,
31584
- viewableIndices: viewableIndices
31568
+ fill: "#212121",
31569
+ fontSize: 12,
31570
+ fontWeight: "400",
31571
+ fontFamily: "Poppins"
31585
31572
  })), /*#__PURE__*/React$1.createElement(Brush, {
31586
- dataKey: "index",
31573
+ dataKey: "label",
31587
31574
  height: 30,
31588
31575
  stroke: "#212121",
31589
- startIndex: viewWindow.startIndex,
31590
- endIndex: viewWindow.endIndex,
31591
- onChange: e => {
31592
- setViewWindow({
31593
- startIndex: e.startIndex ?? 0,
31594
- endIndex: e.endIndex ?? dataWithIndex.length - 1
31595
- });
31596
- },
31597
- travellerWidth: 12
31598
- })), /*#__PURE__*/React$1.createElement("div", {
31599
- style: {
31600
- marginTop: "-28px"
31601
- }
31602
- }, /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31576
+ startIndex: startIndex,
31577
+ endIndex: Math.min(4, processedData.length - 1),
31578
+ onChange: onChange,
31579
+ y: 330,
31580
+ travellerWidth: 10,
31581
+ tickFormatter: (value, index) => index + 1
31582
+ })), /*#__PURE__*/React$1.createElement("div", null, /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31603
31583
  legendData: [{
31604
31584
  iconColor: "#CCDCDD",
31605
31585
  iconType: "Square",
@@ -31613,7 +31593,9 @@ const SeparatedLineBarChart = ({
31613
31593
  };
31614
31594
 
31615
31595
  function SingleChart({
31616
- lineChartData
31596
+ lineChartData,
31597
+ height = 450,
31598
+ width = "100%"
31617
31599
  }) {
31618
31600
  const dataWithIndex = lineChartData?.map((item, index) => ({
31619
31601
  ...item,
@@ -31646,20 +31628,15 @@ function SingleChart({
31646
31628
  dy: 18
31647
31629
  }, "Event: ", parts.join(" "))));
31648
31630
  };
31649
- const [startIndex, setStartIndex] = useState(0);
31650
- const [endIndex, setEndIndex] = useState(dataWithIndex?.length - 1);
31631
+ useState(0);
31632
+ useState(dataWithIndex?.length - 1);
31651
31633
  return /*#__PURE__*/React$1.createElement("div", {
31652
31634
  style: {
31653
- width: "100%",
31654
- height: 600
31655
- }
31656
- }, /*#__PURE__*/React$1.createElement("div", {
31657
- style: {
31658
- height: "100%"
31635
+ width: "100%"
31659
31636
  }
31660
31637
  }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
31661
- width: "100%",
31662
- height: "100%"
31638
+ width: width,
31639
+ height: height
31663
31640
  }, /*#__PURE__*/React$1.createElement(ComposedChart, {
31664
31641
  data: dataWithIndex,
31665
31642
  margin: {
@@ -31700,23 +31677,18 @@ function SingleChart({
31700
31677
  fontWeight: "400",
31701
31678
  fontFamily: "Poppins"
31702
31679
  })), /*#__PURE__*/React$1.createElement(Brush, {
31703
- dataKey: "index",
31704
31680
  height: 30,
31705
- stroke: "#212121",
31706
- startIndex: startIndex,
31707
- endIndex: endIndex,
31708
- onChange: e => {
31709
- setStartIndex(e.startIndex ?? 0);
31710
- setEndIndex(e.endIndex ?? dataWithIndex?.length - 1);
31711
- },
31712
- travellerWidth: 12
31681
+ travellerWidth: 10,
31682
+ startIndex: 0,
31683
+ endIndex: 5,
31684
+ y: 380
31713
31685
  })), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
31714
31686
  legendData: [{
31715
31687
  iconColor: "#CCDCDD",
31716
31688
  iconType: "Square",
31717
31689
  title: "INC Units"
31718
31690
  }]
31719
- }))));
31691
+ })));
31720
31692
  }
31721
31693
 
31722
31694
  styled.div`
@@ -31946,8 +31918,67 @@ SegmentedButton.defaultProps = {
31946
31918
  onClick: () => {}
31947
31919
  };
31948
31920
 
31921
+ const Container = styled.div`
31922
+ width: ${props => props.width};
31923
+ height: ${props => props.height};
31924
+ padding: 15px;
31925
+ display: flex;
31926
+ flex-direction: column;
31927
+ #Segment {
31928
+ width: auto;
31929
+ white-space: nowrap;
31930
+ font-size: 14px;
31931
+ font-weight: 500;
31932
+ font-family: "Poppins"
31933
+ }
31934
+ `;
31935
+ const Title$1 = styled.h2`
31936
+ color: #212121;
31937
+ font-family: "Poppins";
31938
+ font-size: 18px;
31939
+ font-style: normal;
31940
+ font-weight: 400;
31941
+ line-height: normal;
31942
+ margin: 0 0 16px 0;
31943
+ `;
31944
+ styled.div`
31945
+ font-family: sans-serif;
31946
+ text-align: center;
31947
+ `;
31948
+ styled.div`
31949
+ height: 25%;
31950
+ `;
31951
+ styled.div`
31952
+ height: 75%;
31953
+ `;
31954
+ styled.div`
31955
+ height: 100%;
31956
+ display: flex;
31957
+ flex-direction: column;
31958
+ background-color: white;
31959
+ `;
31960
+ const TooltipContainer = styled.div`
31961
+ background: white;
31962
+ padding: 10px;
31963
+ border-radius: 5px;
31964
+ box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
31965
+ border: 1px solid #ddd;
31966
+ font-family: Poppins, sans-serif;
31967
+ font-weight: 500;
31968
+ font-size: 14px;
31969
+ `;
31970
+ const TooltipTitle = styled.p`
31971
+ font-weight: 700;
31972
+ margin-top: 5px;
31973
+ margin-bottom: 5px;
31974
+ `;
31975
+ const TooltipText = styled.p`
31976
+ margin-top: 5px;
31977
+ margin-bottom: 5px;
31978
+ `;
31979
+
31949
31980
  function InnerBarChart({
31950
- data = []
31981
+ data
31951
31982
  }) {
31952
31983
  const processedData = data.map(item => {
31953
31984
  const parts = item.label.replace("Vendor Selling Event:", "").trim();
@@ -32010,9 +32041,8 @@ function InnerBarChart({
32010
32041
  }) => {
32011
32042
  if (!active || !payload || !payload.length) return null;
32012
32043
  const data = payload[0].payload;
32013
- return /*#__PURE__*/React$1.createElement("div", {
32014
- className: "bg-white border border-gray-300 p-2 rounded-lg text-sm"
32015
- }, /*#__PURE__*/React$1.createElement("strong", null, data.label), /*#__PURE__*/React$1.createElement("div", null, "Actual: ", format(data.actual)), /*#__PURE__*/React$1.createElement("div", null, "Total: ", format(data.total)));
32044
+ const repeaterPercentage = (data.actual / data.total * 100).toFixed(1);
32045
+ return /*#__PURE__*/React$1.createElement(TooltipContainer, null, /*#__PURE__*/React$1.createElement(TooltipTitle, null, `${data.label}`), /*#__PURE__*/React$1.createElement(TooltipText, null, `${data.description}`), /*#__PURE__*/React$1.createElement(TooltipText, null, `New Shoppers: ${format(data.total)}`), /*#__PURE__*/React$1.createElement(TooltipText, null, `Repeaters: ${format(data.actual)}`), /*#__PURE__*/React$1.createElement(TooltipText, null, `% Repeaters: ${repeaterPercentage}%`));
32016
32046
  };
32017
32047
  const CustomizedTick = props => {
32018
32048
  const {
@@ -32044,9 +32074,7 @@ function InnerBarChart({
32044
32074
  };
32045
32075
  return /*#__PURE__*/React$1.createElement("div", {
32046
32076
  className: "w-full"
32047
- }, /*#__PURE__*/React$1.createElement("h3", {
32048
- className: "text-lg font-medium mb-4 text-center"
32049
- }, "Vendor Selling Events Comparison"), /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
32077
+ }, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
32050
32078
  width: "100%",
32051
32079
  height: 450
32052
32080
  }, /*#__PURE__*/React$1.createElement(BarChart$1, {
@@ -32068,7 +32096,8 @@ function InnerBarChart({
32068
32096
  }), /*#__PURE__*/React$1.createElement(YAxis, {
32069
32097
  type: "number",
32070
32098
  domain: [0, "dataMax + 2000"],
32071
- tickFormatter: format
32099
+ tickFormatter: format,
32100
+ hide: true
32072
32101
  }), /*#__PURE__*/React$1.createElement(Tooltip$2, {
32073
32102
  content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
32074
32103
  }), /*#__PURE__*/React$1.createElement(Brush, {
@@ -32084,51 +32113,22 @@ function InnerBarChart({
32084
32113
  }))));
32085
32114
  }
32086
32115
 
32087
- const Container = styled.div`
32088
- width: ${props => props.width};
32089
- height: ${props => props.height};
32090
- padding: 15px;
32091
- display: flex;
32092
- flex-direction: column;
32093
- #Segment {
32094
- width: auto;
32095
- white-space: nowrap;
32096
- font-size: 14px;
32097
- font-weight: 500;
32098
- font-family: "Poppins"
32099
- }
32100
- `;
32101
- styled.div`
32102
- font-family: sans-serif;
32103
- text-align: center;
32104
- `;
32105
- styled.div`
32106
- height: 25%;
32107
- `;
32108
- styled.div`
32109
- height: 75%;
32110
- `;
32111
- styled.div`
32112
- height: 100%;
32113
- display: flex;
32114
- flex-direction: column;
32115
- background-color: white;
32116
- `;
32117
-
32118
32116
  const BrushChart = props => {
32119
32117
  const {
32120
32118
  width,
32121
32119
  height,
32122
32120
  data,
32123
32121
  barlineData,
32124
- lineChartData
32122
+ lineChartData,
32123
+ linearData,
32124
+ title
32125
32125
  } = props;
32126
32126
  const segmentedbuttonOptions = ["New Shoppers & Repeaters", "INC Sales & ROI", "INC Units", "Basket Lift"];
32127
32127
  const [selectedOption, setSelectedOption] = useState(segmentedbuttonOptions[0]);
32128
32128
  return /*#__PURE__*/React$1.createElement(Container, {
32129
32129
  height: height,
32130
32130
  width: width
32131
- }, /*#__PURE__*/React$1.createElement(SegmentedButton, {
32131
+ }, /*#__PURE__*/React$1.createElement(Title$1, null, title), /*#__PURE__*/React$1.createElement(SegmentedButton, {
32132
32132
  gap: "8px",
32133
32133
  options: segmentedbuttonOptions.map(value => ({
32134
32134
  value
@@ -32146,9 +32146,301 @@ const BrushChart = props => {
32146
32146
  }), selectedOption === "INC Units" && /*#__PURE__*/React$1.createElement(SingleChart, {
32147
32147
  lineChartData: lineChartData
32148
32148
  }), selectedOption === "Basket Lift" && /*#__PURE__*/React$1.createElement(SingleChart, {
32149
- lineChartData: lineChartData
32149
+ lineChartData: linearData
32150
32150
  }));
32151
32151
  };
32152
32152
 
32153
- export { AreaChart, BannerEventBoxList, BarChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Button, CollapseHeader, DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, EventDetailsCard, EventList, FilterPanel, Heatmap, IconButton, LinkButton, LinnerDataBox, MarketShareDescription, OneColumnContainer, PerformanceAnalyticsLegend, PieChart, PopupCharts, QuickFilter, ReportTable, TabMenu, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts };
32153
+ const Overlay = styled.div`
32154
+ position: fixed;
32155
+ top: 0;
32156
+ left: 0;
32157
+ width: 100%;
32158
+ height: 100%;
32159
+ background: rgba(0, 0, 0, 0.5);
32160
+ display: flex;
32161
+ justify-content: center;
32162
+ align-items: center;
32163
+ z-index: 999;
32164
+ `;
32165
+ const ModalContent = styled.div`
32166
+ position: absolute;
32167
+ width: 69%;
32168
+ height: 100%;
32169
+ padding: 8rem 0 4rem;
32170
+ box-sizing: border-box;
32171
+ margin: 0 auto;
32172
+ font-family: 'Poppins', sans-serif;
32173
+
32174
+ @media (max-width: 768px) {
32175
+ width: 100%;
32176
+ max-width: 940px;
32177
+ padding: 1rem 0 3rem;
32178
+ }
32179
+ `;
32180
+ const Header = styled.div`
32181
+ position: relative;
32182
+ display: flex;
32183
+ justify-content: space-between;
32184
+ align-items: center;
32185
+ margin-bottom: 4rem;
32186
+
32187
+ @media (max-width: 768px) {
32188
+ flex-direction: column;
32189
+ gap: 1rem;
32190
+ align-items: flex-start;
32191
+ }
32192
+ `;
32193
+ const CloseButton = styled.button`
32194
+ position: absolute;
32195
+ top: -10px;
32196
+ right: 0px;
32197
+ background: transparent;
32198
+ border: none;
32199
+ color: ${props => props.$navcolor || "#fff"};
32200
+ font-size: 1.5rem;
32201
+ cursor: pointer;
32202
+
32203
+ &:hover {
32204
+ opacity: 0.8;
32205
+ }
32206
+
32207
+ @media (max-width: 768px) {
32208
+ position: static;
32209
+ align-self: flex-end;
32210
+ }
32211
+ `;
32212
+ const Title = styled.h2`
32213
+ position: absolute;
32214
+ display: flex;
32215
+ align-items: center;
32216
+ gap: 0.5rem;
32217
+ top: -10px;
32218
+ color: ${props => props.$titleColor || "#fff"};
32219
+ font-size: 1.25rem;
32220
+ margin: 0;
32221
+ font-feature-settings: "liga" off;
32222
+ font-family: 'Poppins', sans-serif;
32223
+ font-size: 23.528px;
32224
+ font-style: normal;
32225
+ font-weight: 700;
32226
+ line-height: normal;
32227
+
32228
+ @media (max-width: 768px) {
32229
+ position: static;
32230
+ align-self: flex-start;
32231
+ }
32232
+ `;
32233
+ styled.span`
32234
+ font-size: 1.5rem;
32235
+ margin-right: 0.5rem;
32236
+ color: ${props => props.$iconcolor || "#fff"};
32237
+ `;
32238
+ const CarouselContainer = styled.div`
32239
+ position: relative;
32240
+ width: 100%;
32241
+ height: 75%;
32242
+ overflow: visible;
32243
+ margin: 0 auto;
32244
+ `;
32245
+ const VisibleCardsContainer = styled.div`
32246
+ display: flex;
32247
+ justify-content: center;
32248
+ align-items: center;
32249
+ width: 100%;
32250
+ height: 100%;
32251
+ position: relative;
32252
+
32253
+ .prev-card,
32254
+ .next-card {
32255
+ opacity: 0.3;
32256
+ }
32257
+
32258
+ .prev-card {
32259
+ transform: translateX(-50%) scale(0.75);
32260
+ opacity: 0.3;
32261
+ }
32262
+
32263
+ .active-card {
32264
+ transform: translateX(0) scale(1);
32265
+ opacity: 1;
32266
+ z-index: 2;
32267
+ }
32268
+
32269
+ .next-card {
32270
+ transform: translateX(50%) scale(0.75);
32271
+ opacity: 0.3;
32272
+ }
32273
+
32274
+ .hidden-card {
32275
+ display: none;
32276
+ }
32277
+ `;
32278
+ const Card = styled.div`
32279
+ position: absolute;
32280
+ width: 41%;
32281
+ height: 90%;
32282
+ background: #ffffff;
32283
+ border-radius: 16px;
32284
+ padding: 2rem;
32285
+ text-align: center;
32286
+ display: flex;
32287
+ flex-direction: column;
32288
+ align-items: center;
32289
+ justify-content: center;
32290
+ box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.05);
32291
+
32292
+ /* 🎯 תיקון: טרנזישן אחיד לכל שינויי תזוזה/שקיפות */
32293
+ transition: transform 0.4s ease-in-out, left 0.4s ease-in-out,
32294
+ right 0.4s ease-in-out, opacity 0.4s ease-in-out;
32295
+
32296
+ @media (max-width: 768px) {
32297
+ width: 280px;
32298
+ height: 250px;
32299
+ padding: 1.5rem;
32300
+ }
32301
+ `;
32302
+ const NavButton = styled.div`
32303
+ position: absolute;
32304
+ top: 50%;
32305
+ transform: translateY(-50%);
32306
+ z-index: 1000;
32307
+ color: ${props => props.$navcolor || "#fff"};
32308
+ font-size: 2.5rem;
32309
+ cursor: pointer;
32310
+ user-select: none;
32311
+ width: 40px;
32312
+ height: 40px;
32313
+ display: flex;
32314
+ align-items: center;
32315
+ justify-content: center;
32316
+
32317
+ &.prev {
32318
+ left: 0;
32319
+ }
32320
+
32321
+ &.next {
32322
+ right: 0;
32323
+ }
32324
+
32325
+ &:hover {
32326
+ opacity: 0.8;
32327
+ }
32328
+ `;
32329
+ const Pagination = styled.div`
32330
+ display: flex;
32331
+ justify-content: center;
32332
+ margin-top: 32px;
32333
+ position: relative;
32334
+ `;
32335
+ const Dot = styled.button`
32336
+ width: 20px;
32337
+ height: 20px;
32338
+ border-radius: 50%;
32339
+ border: 2px solid #fff;
32340
+ background: transparent;
32341
+ opacity: 1;
32342
+ margin: 4px;
32343
+ cursor: pointer;
32344
+ transition: background 0.3s ease;
32345
+ padding: 0;
32346
+ position: relative;
32347
+
32348
+ &::after {
32349
+ content: "";
32350
+ position: absolute;
32351
+ top: 2px;
32352
+ left: 2px;
32353
+ width: 12px;
32354
+ height: 12px;
32355
+ background: ${props => props.active ? "#fff" : "transparent"};
32356
+ border-radius: 50%;
32357
+ }
32358
+
32359
+ &:focus {
32360
+ outline: none;
32361
+ }
32362
+ `;
32363
+
32364
+ const InsightsCarousel = _ref => {
32365
+ let {
32366
+ children,
32367
+ onClose,
32368
+ title = "Insights:",
32369
+ icon = /*#__PURE__*/React$1.createElement(LampIcon, null),
32370
+ titleColor = "#fff",
32371
+ iconColor = "#fff",
32372
+ navColor = "#fff"
32373
+ } = _ref;
32374
+ const [currentIndex, setCurrentIndex] = useState(0);
32375
+ const containerRef = useRef(null);
32376
+ const childrenArray = React$1.Children.toArray(children);
32377
+ const totalChildren = childrenArray.length;
32378
+ const goToSlide = index => {
32379
+ let normalizedIndex = index;
32380
+ if (index < 0) normalizedIndex = totalChildren - 1;
32381
+ if (index >= totalChildren) normalizedIndex = 0;
32382
+ setCurrentIndex(normalizedIndex);
32383
+ };
32384
+ const goToPrev = () => {
32385
+ goToSlide(currentIndex - 1);
32386
+ };
32387
+ const goToNext = () => {
32388
+ goToSlide(currentIndex + 1);
32389
+ };
32390
+ const prevIndex = (currentIndex - 1 + totalChildren) % totalChildren;
32391
+ const nextIndex = (currentIndex + 1) % totalChildren;
32392
+ return /*#__PURE__*/React$1.createElement(Overlay, null, /*#__PURE__*/React$1.createElement(ModalContent, null, /*#__PURE__*/React$1.createElement(Header, null, /*#__PURE__*/React$1.createElement(Title, {
32393
+ $titleColor: titleColor
32394
+ }, /*#__PURE__*/React$1.cloneElement(icon, {
32395
+ fill: iconColor
32396
+ }), title), /*#__PURE__*/React$1.createElement(CloseButton, {
32397
+ onClick: () => onClose?.({
32398
+ label: "closeCrusel"
32399
+ }),
32400
+ "aria-label": "Close insights overlay",
32401
+ $navColor: navColor
32402
+ }, /*#__PURE__*/React$1.createElement(CloseXIcon, {
32403
+ fill: navColor,
32404
+ width: 18.82,
32405
+ height: 18.82
32406
+ }))), /*#__PURE__*/React$1.createElement(CarouselContainer, {
32407
+ ref: containerRef
32408
+ }, totalChildren > 1 && /*#__PURE__*/React$1.createElement(NavButton, {
32409
+ className: "prev",
32410
+ onClick: goToPrev,
32411
+ $navColor: navColor
32412
+ }, /*#__PURE__*/React$1.createElement(ChervronLeftIcon, {
32413
+ fill: navColor,
32414
+ width: 41,
32415
+ height: 42
32416
+ })), /*#__PURE__*/React$1.createElement(VisibleCardsContainer, null, childrenArray.map((child, index) => {
32417
+ let className = "hidden-card";
32418
+ if (totalChildren === 1) {
32419
+ className = "active-card";
32420
+ } else {
32421
+ if (index === prevIndex) className = "prev-card";
32422
+ if (index === currentIndex) className = "active-card";
32423
+ if (index === nextIndex) className = "next-card";
32424
+ }
32425
+ return /*#__PURE__*/React$1.createElement(Card, {
32426
+ key: index,
32427
+ className: className
32428
+ }, child);
32429
+ })), totalChildren > 1 && /*#__PURE__*/React$1.createElement(NavButton, {
32430
+ className: "next",
32431
+ onClick: goToNext,
32432
+ $navColor: navColor
32433
+ }, /*#__PURE__*/React$1.createElement(ChervronRightIcon, {
32434
+ fill: navColor,
32435
+ width: 41,
32436
+ height: 42
32437
+ }))), /*#__PURE__*/React$1.createElement(Pagination, null, childrenArray.map((_, index) => /*#__PURE__*/React$1.createElement(Dot, {
32438
+ key: index,
32439
+ active: index === currentIndex,
32440
+ onClick: () => goToSlide(index),
32441
+ "aria-label": `Go to slide ${index + 1}`
32442
+ })))));
32443
+ };
32444
+
32445
+ export { AreaChart, BannerEventBoxList, BarChart, BarChartsByWeeks, BatteryChart, BreakdownPanel, BrushChart, BubbleChart, Button, CollapseHeader, DialogOverlay, DoubleBarSingleLine, DoublePanelDataRow, EventDetailsCard, EventList, FilterPanel, Heatmap, IconButton, InsightsCarousel, LinkButton, LinnerDataBox, MarketShareDescription, OneColumnContainer, PerformanceAnalyticsLegend, PieChart, PopupCharts, QuickFilter, ReportTable, TabMenu, TopToggleList, TotalDoughnutChart, TotalHorizontalCharts };
32154
32446
  //# sourceMappingURL=index.esm.js.map