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.js CHANGED
@@ -1943,7 +1943,7 @@ const TitleAndValueContainer$4 = styled__default["default"].div`
1943
1943
  flex-direction: column;
1944
1944
  padding: 0 20px;
1945
1945
  `;
1946
- const Title$d = styled__default["default"].h4`
1946
+ const Title$f = styled__default["default"].h4`
1947
1947
  font-weight: 400;
1948
1948
  font-size: 18px;
1949
1949
  margin: 0 0 8px;
@@ -2078,7 +2078,7 @@ const AvarageDelimiter = styled__default["default"].div`
2078
2078
  `;
2079
2079
 
2080
2080
  /* Custom properties */
2081
- const TooltipContainer$3 = styled__default["default"].div`
2081
+ const TooltipContainer$4 = styled__default["default"].div`
2082
2082
  --tooltip-text-color: black;
2083
2083
  --tooltip-background-color: white;
2084
2084
  --tooltip-margin: 40px;
@@ -2192,7 +2192,7 @@ const Tooltip$1 = props => {
2192
2192
  clearInterval(timeout);
2193
2193
  setActive(false);
2194
2194
  };
2195
- return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$3, null, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$2, {
2195
+ return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$4, null, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$2, {
2196
2196
  onMouseEnter: showTip,
2197
2197
  onMouseLeave: hideTip
2198
2198
  }, children, active && /*#__PURE__*/React__default["default"].createElement(TooltipTip$1, {
@@ -2423,7 +2423,7 @@ const PieChart = props => {
2423
2423
  width: width
2424
2424
  }, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$4, {
2425
2425
  className: "TitleAndValueContainer"
2426
- }, /*#__PURE__*/React__default["default"].createElement(Title$d, {
2426
+ }, /*#__PURE__*/React__default["default"].createElement(Title$f, {
2427
2427
  className: "Title"
2428
2428
  }, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$2, {
2429
2429
  className: "CurrencySignAndFormattedValueContainer"
@@ -9494,70 +9494,67 @@ const DropdownMain = styled__default["default"].div`
9494
9494
  `;
9495
9495
 
9496
9496
  /* eslint-disable react/prop-types */
9497
- const DropdownNew = _ref => {
9498
- let {
9499
- isMulti,
9500
- label,
9501
- labelEmptyValue,
9502
- options,
9503
- selectedValue,
9504
- placeHolder,
9505
- onChange,
9506
- required,
9507
- disabled,
9508
- width,
9509
- error,
9510
- errorMessage,
9511
- labelColor,
9512
- checkBoxColor,
9513
- xIconShow,
9514
- showLabelOnTop,
9515
- orderBy,
9516
- elementType
9517
- } = _ref;
9518
- return /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9519
- className: "DropdownMain",
9520
- width: width
9521
- }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9522
- className: "DropdownMultiNew",
9523
- placeHolder: placeHolder,
9524
- label: label,
9525
- labelEmptyValue: labelEmptyValue,
9526
- labelColor: labelColor,
9527
- checkBoxColor: checkBoxColor,
9528
- required: required,
9529
- options: options,
9530
- width: width,
9531
- disabled: disabled,
9532
- error: error,
9533
- errorMessage: errorMessage,
9534
- selectedValue: selectedValue,
9535
- xIconShow: xIconShow,
9536
- onChange: onChange,
9537
- showLabelOnTop: showLabelOnTop,
9538
- orderBy: orderBy,
9539
- elementType: elementType
9540
- }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9541
- className: "DropdownSingleNew",
9542
- placeHolder: placeHolder,
9543
- label: label,
9544
- labelEmptyValue: labelEmptyValue,
9545
- labelColor: labelColor,
9546
- checkBoxColor: checkBoxColor,
9547
- required: required,
9548
- options: options,
9549
- width: width,
9550
- disabled: disabled,
9551
- error: error,
9552
- errorMessage: errorMessage,
9553
- selectedValue: selectedValue,
9554
- xIconShow: xIconShow,
9555
- onChange: onChange,
9556
- showLabelOnTop: showLabelOnTop,
9557
- orderBy: orderBy,
9558
- elementType: elementType
9559
- }));
9560
- };
9497
+ const DropdownNew = ({
9498
+ isMulti,
9499
+ label,
9500
+ labelEmptyValue,
9501
+ options,
9502
+ selectedValue,
9503
+ placeHolder,
9504
+ onChange,
9505
+ required,
9506
+ disabled,
9507
+ width,
9508
+ error,
9509
+ errorMessage,
9510
+ labelColor,
9511
+ checkBoxColor,
9512
+ xIconShow,
9513
+ showLabelOnTop,
9514
+ orderBy,
9515
+ elementType
9516
+ }) => /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
9517
+ className: "DropdownMain",
9518
+ width: width
9519
+ }, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
9520
+ className: "DropdownMultiNew",
9521
+ placeHolder: placeHolder,
9522
+ label: label,
9523
+ labelEmptyValue: labelEmptyValue,
9524
+ labelColor: labelColor,
9525
+ checkBoxColor: checkBoxColor,
9526
+ required: required,
9527
+ options: options,
9528
+ width: width,
9529
+ disabled: disabled,
9530
+ error: error,
9531
+ errorMessage: errorMessage,
9532
+ selectedValue: selectedValue,
9533
+ xIconShow: xIconShow,
9534
+ onChange: onChange,
9535
+ showLabelOnTop: showLabelOnTop,
9536
+ orderBy: orderBy,
9537
+ elementType: elementType
9538
+ }) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
9539
+ className: "DropdownSingleNew",
9540
+ placeHolder: placeHolder,
9541
+ label: label,
9542
+ labelEmptyValue: labelEmptyValue,
9543
+ labelColor: labelColor,
9544
+ checkBoxColor: checkBoxColor,
9545
+ required: required,
9546
+ options: options,
9547
+ width: width,
9548
+ disabled: disabled,
9549
+ error: error,
9550
+ errorMessage: errorMessage,
9551
+ selectedValue: selectedValue,
9552
+ xIconShow: xIconShow,
9553
+ onChange: onChange,
9554
+ showLabelOnTop: showLabelOnTop,
9555
+ orderBy: orderBy,
9556
+ elementType: elementType
9557
+ }));
9561
9558
  DropdownNew.propTypes = {
9562
9559
  placeHolder: PropTypes.string,
9563
9560
  label: PropTypes.string,
@@ -9730,35 +9727,41 @@ const OptionsContainer$4 = styled__default["default"].div`
9730
9727
  padding-top: 8px;
9731
9728
  `;
9732
9729
 
9733
- const ChervronRightIcon = ({
9734
- width = "8",
9735
- height = "13",
9736
- fill = "#777575"
9737
- }) => /*#__PURE__*/React__default["default"].createElement("svg", {
9738
- width: width,
9739
- height: height,
9740
- viewBox: "0 0 8 13",
9741
- fill: "none",
9742
- xmlns: "http://www.w3.org/2000/svg"
9743
- }, /*#__PURE__*/React__default["default"].createElement("path", {
9744
- 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",
9745
- fill: fill
9746
- }));
9730
+ const ChervronRightIcon = _ref => {
9731
+ let {
9732
+ width = "8",
9733
+ height = "13",
9734
+ fill = "#777575"
9735
+ } = _ref;
9736
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
9737
+ width: width,
9738
+ height: height,
9739
+ viewBox: "0 0 8 13",
9740
+ fill: "none",
9741
+ xmlns: "http://www.w3.org/2000/svg"
9742
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
9743
+ 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",
9744
+ fill: fill
9745
+ }));
9746
+ };
9747
9747
 
9748
- const ChervronLeftIcon = ({
9749
- width = 7,
9750
- height = 13,
9751
- fill = "#777575"
9752
- }) => /*#__PURE__*/React__default["default"].createElement("svg", {
9753
- width: width,
9754
- height: height,
9755
- viewBox: "0 0 7 13",
9756
- fill: "none",
9757
- xmlns: "http://www.w3.org/2000/svg"
9758
- }, /*#__PURE__*/React__default["default"].createElement("path", {
9759
- 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",
9760
- fill: fill
9761
- }));
9748
+ const ChervronLeftIcon = _ref => {
9749
+ let {
9750
+ width = 7,
9751
+ height = 13,
9752
+ fill = "#777575"
9753
+ } = _ref;
9754
+ return /*#__PURE__*/React__default["default"].createElement("svg", {
9755
+ width: width,
9756
+ height: height,
9757
+ viewBox: "0 0 7 13",
9758
+ fill: "none",
9759
+ xmlns: "http://www.w3.org/2000/svg"
9760
+ }, /*#__PURE__*/React__default["default"].createElement("path", {
9761
+ 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",
9762
+ fill: fill
9763
+ }));
9764
+ };
9762
9765
 
9763
9766
  /* eslint-disable react/prop-types */
9764
9767
 
@@ -9979,21 +9982,20 @@ const DatePicker = ({
9979
9982
  };
9980
9983
 
9981
9984
  /* eslint-disable import/no-extraneous-dependencies */
9982
- const RangePicker = _ref => {
9983
- let {
9984
- label,
9985
- onChange,
9986
- borderRadius,
9987
- required,
9988
- width,
9989
- height,
9990
- placeholder,
9991
- disabled,
9992
- borderColor,
9993
- borderColorFocus,
9994
- textColor,
9995
- selectedValue
9996
- } = _ref;
9985
+ const RangePicker = ({
9986
+ label,
9987
+ onChange,
9988
+ borderRadius,
9989
+ required,
9990
+ width,
9991
+ height,
9992
+ placeholder,
9993
+ disabled,
9994
+ borderColor,
9995
+ borderColorFocus,
9996
+ textColor,
9997
+ selectedValue
9998
+ }) => {
9997
9999
  const [isFocused, setIsFocused] = React$1.useState(false);
9998
10000
  const [isOpen, setIsOpen] = React$1.useState(false);
9999
10001
  const [value, setValue] = React$1.useState(''); // Added value state
@@ -10434,23 +10436,22 @@ const QuarterPopupPicker = ({
10434
10436
  };
10435
10437
 
10436
10438
  /* eslint-disable import/no-extraneous-dependencies */
10437
- const QuarterPicker = _ref => {
10438
- let {
10439
- availableQuarters,
10440
- // ["Q1-2024"]
10441
- label,
10442
- onChange,
10443
- borderRadius,
10444
- required,
10445
- width,
10446
- height,
10447
- placeholder,
10448
- disabled,
10449
- borderColor,
10450
- borderColorFocus,
10451
- textColor,
10452
- selectedValue
10453
- } = _ref;
10439
+ const QuarterPicker = ({
10440
+ availableQuarters,
10441
+ // ["Q1-2024"]
10442
+ label,
10443
+ onChange,
10444
+ borderRadius,
10445
+ required,
10446
+ width,
10447
+ height,
10448
+ placeholder,
10449
+ disabled,
10450
+ borderColor,
10451
+ borderColorFocus,
10452
+ textColor,
10453
+ selectedValue
10454
+ }) => {
10454
10455
  const [isFocused, setIsFocused] = React$1.useState(false);
10455
10456
  const [isOpen, setIsOpen] = React$1.useState(false);
10456
10457
  const [value, setValue] = React$1.useState('');
@@ -10897,22 +10898,21 @@ const MonthPopupPicker = ({
10897
10898
  };
10898
10899
 
10899
10900
  /* eslint-disable import/no-extraneous-dependencies */
10900
- const MonthPicker = _ref => {
10901
- let {
10902
- availableMonths,
10903
- label,
10904
- onChange,
10905
- borderRadius,
10906
- required,
10907
- width,
10908
- height,
10909
- placeholder,
10910
- disabled,
10911
- borderColor,
10912
- borderColorFocus,
10913
- textColor,
10914
- selectedValue
10915
- } = _ref;
10901
+ const MonthPicker = ({
10902
+ availableMonths,
10903
+ label,
10904
+ onChange,
10905
+ borderRadius,
10906
+ required,
10907
+ width,
10908
+ height,
10909
+ placeholder,
10910
+ disabled,
10911
+ borderColor,
10912
+ borderColorFocus,
10913
+ textColor,
10914
+ selectedValue
10915
+ }) => {
10916
10916
  const [isFocused, setIsFocused] = React$1.useState(false);
10917
10917
  const [isOpen, setIsOpen] = React$1.useState(false);
10918
10918
  const [value, setValue] = React$1.useState('');
@@ -11143,7 +11143,7 @@ const TooltipTextContainer = styled__default["default"].div`
11143
11143
  cursor: pointer;
11144
11144
  }
11145
11145
  `;
11146
- const TooltipText$1 = styled__default["default"].div`
11146
+ const TooltipText$2 = styled__default["default"].div`
11147
11147
  margin: 0;
11148
11148
  `;
11149
11149
 
@@ -11313,8 +11313,8 @@ const FilterPanel = props => {
11313
11313
  fieldsData: newFieldsDataState
11314
11314
  });
11315
11315
  };
11316
- const getTooltipTextDates = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$1, null, "Dates can be selected"), /*#__PURE__*/React__default["default"].createElement(TooltipText$1, null, "only after selecting"), /*#__PURE__*/React__default["default"].createElement(TooltipText$1, null, "period types"));
11317
- const getTooltipTextGoButton = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$1, null, tooltipTextGoButton));
11316
+ const getTooltipTextDates = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$2, null, "Dates can be selected"), /*#__PURE__*/React__default["default"].createElement(TooltipText$2, null, "only after selecting"), /*#__PURE__*/React__default["default"].createElement(TooltipText$2, null, "period types"));
11317
+ const getTooltipTextGoButton = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$2, null, tooltipTextGoButton));
11318
11318
  const getYearsArray = () => {
11319
11319
  const currentYear = moment().year();
11320
11320
  const previousYear = moment().subtract(1, 'years').year();
@@ -24138,22 +24138,21 @@ const DeleteIcon = styled__default["default"].div`
24138
24138
  position: absolute;
24139
24139
  `;
24140
24140
 
24141
- const QuickFilterDropdownSingle = _ref => {
24142
- let {
24143
- label,
24144
- hoverColor,
24145
- options,
24146
- selectedValue,
24147
- placeHolder,
24148
- onChange,
24149
- disabled,
24150
- width,
24151
- error,
24152
- errorMessage,
24153
- xIconShow,
24154
- labelColor,
24155
- showLabelOnTop
24156
- } = _ref;
24141
+ const QuickFilterDropdownSingle = ({
24142
+ label,
24143
+ hoverColor,
24144
+ options,
24145
+ selectedValue,
24146
+ placeHolder,
24147
+ onChange,
24148
+ disabled,
24149
+ width,
24150
+ error,
24151
+ errorMessage,
24152
+ xIconShow,
24153
+ labelColor,
24154
+ showLabelOnTop
24155
+ }) => {
24157
24156
  const [isFocused, setIsFocused] = React$1.useState(false);
24158
24157
  const [showOptions, setShowOptions] = React$1.useState(false);
24159
24158
  const [inputValue, setInputValue] = React$1.useState("");
@@ -24551,24 +24550,23 @@ const IconContainer$2 = styled__default["default"].div`
24551
24550
  cursor: pointer;
24552
24551
  `;
24553
24552
 
24554
- const QuickFilterDropdownMultiSelection = _ref => {
24555
- let {
24556
- label,
24557
- labelEmptyValue,
24558
- options,
24559
- selectedValue,
24560
- placeHolder,
24561
- onChange,
24562
- required,
24563
- disabled,
24564
- width,
24565
- error,
24566
- errorMessage,
24567
- labelColor,
24568
- xIconShow,
24569
- checkBoxColor,
24570
- showLabelOnTop
24571
- } = _ref;
24553
+ const QuickFilterDropdownMultiSelection = ({
24554
+ label,
24555
+ labelEmptyValue,
24556
+ options,
24557
+ selectedValue,
24558
+ placeHolder,
24559
+ onChange,
24560
+ required,
24561
+ disabled,
24562
+ width,
24563
+ error,
24564
+ errorMessage,
24565
+ labelColor,
24566
+ xIconShow,
24567
+ checkBoxColor,
24568
+ showLabelOnTop
24569
+ }) => {
24572
24570
  const [isFocused, setIsFocused] = React$1.useState(false);
24573
24571
  const [showOptions, setShowOptions] = React$1.useState(false);
24574
24572
  const [inputValue, setInputValue] = React$1.useState('');
@@ -25391,7 +25389,7 @@ const TitleAndValueContainer$3 = styled__default["default"].div`
25391
25389
  display: flex;
25392
25390
  flex-direction: column;
25393
25391
  `;
25394
- const Title$c = styled__default["default"].h4`
25392
+ const Title$e = styled__default["default"].h4`
25395
25393
  font-weight: 400;
25396
25394
  font-size: 20px;
25397
25395
  margin: 0;
@@ -25454,7 +25452,7 @@ const FormattedValue$3 = props => {
25454
25452
  width: width
25455
25453
  }, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$3, {
25456
25454
  className: "TitleAndValueContainer"
25457
- }, title ? /*#__PURE__*/React__default["default"].createElement(Title$c, {
25455
+ }, title ? /*#__PURE__*/React__default["default"].createElement(Title$e, {
25458
25456
  className: "Title",
25459
25457
  width: width
25460
25458
  }, title) : '', showTopValue && /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$1, {
@@ -25466,7 +25464,7 @@ const FormattedValue$3 = props => {
25466
25464
  className: "CurrencySignOrPercent"
25467
25465
  }, 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__default["default"].createElement(CurrencySignOrPercent, {
25468
25466
  className: "CurrencySignOrPercent"
25469
- }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$c, {
25467
+ }, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$e, {
25470
25468
  className: "Title",
25471
25469
  width: width
25472
25470
  }, subtitle) : '')));
@@ -25528,7 +25526,7 @@ const TooltipLabel$3 = styled__default["default"].div`
25528
25526
  font-weight: 400;
25529
25527
  width: fit-content;
25530
25528
  `;
25531
- const TooltipTitle$3 = styled__default["default"].div`
25529
+ const TooltipTitle$4 = styled__default["default"].div`
25532
25530
  color: #212121;
25533
25531
  font-size: 14px;
25534
25532
  font-weight: 600;
@@ -25536,7 +25534,7 @@ const TooltipTitle$3 = styled__default["default"].div`
25536
25534
  const TitleAndValueContainer$2 = styled__default["default"].div`
25537
25535
  padding: 0 1rem;
25538
25536
  `;
25539
- const Title$b = styled__default["default"].h5`
25537
+ const Title$d = styled__default["default"].h5`
25540
25538
  font-weight: 500;
25541
25539
  font-size: 18px;
25542
25540
  line-height: 20px;
@@ -25665,7 +25663,7 @@ const TitleAndIconContainer = styled__default["default"].div`
25665
25663
  display: flex;
25666
25664
  align-items: center;
25667
25665
  `;
25668
- const Title$a = styled__default["default"].h4`
25666
+ const Title$c = styled__default["default"].h4`
25669
25667
  font-weight: 400;
25670
25668
  font-size: 14px;
25671
25669
  line-height: 27px;
@@ -25719,7 +25717,7 @@ const PerformanceAnalyticsLegend = props => {
25719
25717
  color: item.iconColor
25720
25718
  }) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$2 ? /*#__PURE__*/React__default["default"].createElement(LegendLineIcon, {
25721
25719
  color: item.iconColor
25722
- }) : '', /*#__PURE__*/React__default["default"].createElement(Title$a, {
25720
+ }) : '', /*#__PURE__*/React__default["default"].createElement(Title$c, {
25723
25721
  id: "Title",
25724
25722
  width: width
25725
25723
  }, item.title))))) : '');
@@ -25817,7 +25815,7 @@ const BarChartsByWeeks = props => {
25817
25815
  let currentTooltipSecondValue = 0;
25818
25816
  if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
25819
25817
  if (payload[0].payload?.secondValue) currentTooltipSecondValue = payload[0].payload?.secondValue;
25820
- return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$3, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$3, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$3, null, `${tooltipTitle}
25818
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$3, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$4, null, `${isTitleOriganal ? '' : 'Week: '}${week}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$3, null, `${tooltipTitle}
25821
25819
  ${displayFormattedValue(currentTooltipValue)}
25822
25820
  `), currentTooltipSecondValue ? /*#__PURE__*/React__default["default"].createElement(TooltipLabel$3, null, `${tooltipSecondTitle}
25823
25821
  ${displayFormattedValue(currentTooltipSecondValue)}
@@ -25874,7 +25872,7 @@ const BarChartsByWeeks = props => {
25874
25872
  ref: controlsContainerRef
25875
25873
  }, /*#__PURE__*/React__default["default"].createElement(Controls$6, {
25876
25874
  height: getControlsHeight()
25877
- }, showTitle && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Title$b, null, title), /*#__PURE__*/React__default["default"].createElement(FormattedValue$3, {
25875
+ }, showTitle && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Title$d, null, title), /*#__PURE__*/React__default["default"].createElement(FormattedValue$3, {
25878
25876
  title: headerValueTopTitle,
25879
25877
  subtitle: headerValueBottomTitle,
25880
25878
  showTopValue: showHeaderTopValue,
@@ -26107,7 +26105,7 @@ const TitleAndValueContainer$1 = styled__default["default"].div`
26107
26105
  flex-direction: column;
26108
26106
  padding: 0 1.25em; /* 20px → 1.25em */
26109
26107
  `;
26110
- const Title$9 = styled__default["default"].h4`
26108
+ const Title$b = styled__default["default"].h4`
26111
26109
  font-weight: 500;
26112
26110
  font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
26113
26111
  margin: 0;
@@ -26310,7 +26308,7 @@ const TotalDoughnutChart = props => {
26310
26308
  width: width
26311
26309
  }, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$1, {
26312
26310
  className: "TitleAndValueContainer"
26313
- }, /*#__PURE__*/React__default["default"].createElement(Title$9, {
26311
+ }, /*#__PURE__*/React__default["default"].createElement(Title$b, {
26314
26312
  className: "Title",
26315
26313
  fontSize: titleFontSize
26316
26314
  }, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer, {
@@ -26440,7 +26438,7 @@ CustomTooltip.defaultProps = {
26440
26438
  isPercent: false
26441
26439
  };
26442
26440
 
26443
- const TooltipContainer$2 = styled__default["default"].div`
26441
+ const TooltipContainer$3 = styled__default["default"].div`
26444
26442
  --tooltip-text-color: black;
26445
26443
  --tooltip-background-color: white;
26446
26444
  --tooltip-margin: 40px;
@@ -26546,7 +26544,7 @@ const Tooltip = props => {
26546
26544
  direction,
26547
26545
  content
26548
26546
  } = props;
26549
- return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$2, {
26547
+ return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$3, {
26550
26548
  className: className,
26551
26549
  top: `${top}px`,
26552
26550
  left: `${left}px`
@@ -26632,7 +26630,7 @@ const TotalValue = styled__default["default"].div`
26632
26630
  font-size: 20px;
26633
26631
  }
26634
26632
  `;
26635
- const Title$8 = styled__default["default"].h4`
26633
+ const Title$a = styled__default["default"].h4`
26636
26634
  font-size: 18px;
26637
26635
  font-weight: 400;
26638
26636
  line-height: 1;
@@ -26789,7 +26787,7 @@ const TotalHorizontalCharts = props => {
26789
26787
  }, chartsData?.length > 0 ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !hideTitle || !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(CardHeader, {
26790
26788
  ref: topHeader,
26791
26789
  className: "CardHeader"
26792
- }, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$8, null, title) : '', !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(TotalValue, {
26790
+ }, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$a, null, title) : '', !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(TotalValue, {
26793
26791
  className: "TotalValue"
26794
26792
  }, currencySign && /*#__PURE__*/React__default["default"].createElement(CurrencySign, {
26795
26793
  className: "CurrencySign"
@@ -27262,7 +27260,7 @@ const ItemContainer = styled__default["default"].div`
27262
27260
  flex-direction: column;
27263
27261
  flex-wrap: wrap;
27264
27262
  `;
27265
- const Title$7 = styled__default["default"].h4`
27263
+ const Title$9 = styled__default["default"].h4`
27266
27264
  font-size: 18px;
27267
27265
  font-weight: 500;
27268
27266
  margin: 0;
@@ -27378,7 +27376,7 @@ const SalesAndROI = props => {
27378
27376
  showBorderShadow: showBorderShadow
27379
27377
  }, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer, {
27380
27378
  id: "TitleAndValueContainer"
27381
- }, /*#__PURE__*/React__default["default"].createElement(Title$7, {
27379
+ }, /*#__PURE__*/React__default["default"].createElement(Title$9, {
27382
27380
  id: "Title"
27383
27381
  }, title), showBanner && /*#__PURE__*/React__default["default"].createElement(OutBanner, {
27384
27382
  id: "OutBanner",
@@ -27457,7 +27455,7 @@ const ModalOverlay = styled__default["default"].div`
27457
27455
  justify-content: center;
27458
27456
  align-items: center;
27459
27457
  `;
27460
- const ModalContent = styled__default["default"].div`
27458
+ const ModalContent$1 = styled__default["default"].div`
27461
27459
  font-family: "Poppins", sans-serif;
27462
27460
  font-weight: 500;
27463
27461
  font-size: 18px;
@@ -27477,7 +27475,7 @@ const TitleContainer$1 = styled__default["default"].div`
27477
27475
  margin: 0;
27478
27476
  border-bottom: 1px solid #b1b1b1;
27479
27477
  `;
27480
- const Title$6 = styled__default["default"].p`
27478
+ const Title$8 = styled__default["default"].p`
27481
27479
  font-weight: 400;
27482
27480
  font-size: 24px;
27483
27481
  margin: 0;
@@ -27690,14 +27688,14 @@ const PopupCharts = props => {
27690
27688
  }, IsPopupChartsOpen && /*#__PURE__*/React__default["default"].createElement(ModalOverlay, {
27691
27689
  id: "ModalOverlay",
27692
27690
  className: "modal-overlay"
27693
- }, /*#__PURE__*/React__default["default"].createElement(ModalContent, {
27691
+ }, /*#__PURE__*/React__default["default"].createElement(ModalContent$1, {
27694
27692
  id: "ModalContent",
27695
27693
  ref: divRef,
27696
27694
  className: "modal-content",
27697
27695
  height: height,
27698
27696
  width: width,
27699
27697
  onClick: e => e.stopPropagation()
27700
- }, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$6, null, title), /*#__PURE__*/React__default["default"].createElement(CloseXIconContainer, {
27698
+ }, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$8, null, title), /*#__PURE__*/React__default["default"].createElement(CloseXIconContainer, {
27701
27699
  onClick: e => closePopupCharts(e)
27702
27700
  }, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, null))), /*#__PURE__*/React__default["default"].createElement(ChartsContainer, {
27703
27701
  id: "ChartsContainer",
@@ -27795,7 +27793,7 @@ const TopToggleListMainContainer = styled__default["default"].div`
27795
27793
  padding: 0 24px;
27796
27794
  width: ${props => props.width};
27797
27795
  `;
27798
- const Title$5 = styled__default["default"].h4`
27796
+ const Title$7 = styled__default["default"].h4`
27799
27797
  font-size: 14px;
27800
27798
  font-weight: 600;
27801
27799
  margin: 20px 0 12px;
@@ -27825,7 +27823,7 @@ const TopToggleList = props => {
27825
27823
  } = props;
27826
27824
  return /*#__PURE__*/React__default["default"].createElement(TopToggleListMainContainer, {
27827
27825
  width: width
27828
- }, /*#__PURE__*/React__default["default"].createElement(Title$5, null, title), /*#__PURE__*/React__default["default"].createElement(ListContainer, {
27826
+ }, /*#__PURE__*/React__default["default"].createElement(Title$7, null, title), /*#__PURE__*/React__default["default"].createElement(ListContainer, {
27829
27827
  height: height
27830
27828
  }, list.map(item => /*#__PURE__*/React__default["default"].createElement(ListItem, {
27831
27829
  key: item.value
@@ -27887,7 +27885,7 @@ const TitleContainer = styled__default["default"].div`
27887
27885
  justify-content: flex-start;
27888
27886
  margin: 0 0 10px 0;
27889
27887
  `;
27890
- const Title$4 = styled__default["default"].h3`
27888
+ const Title$6 = styled__default["default"].h3`
27891
27889
  user-select: none;
27892
27890
  text-align: left;
27893
27891
  margin: 0;
@@ -27932,7 +27930,7 @@ const BarLabel = styled__default["default"].span`
27932
27930
  font-weight: 400;
27933
27931
  user-select: none;
27934
27932
  `;
27935
- const TooltipContainer$1 = styled__default["default"].div`
27933
+ const TooltipContainer$2 = styled__default["default"].div`
27936
27934
  position: absolute;
27937
27935
 
27938
27936
  top: ${props => props.top};
@@ -28042,7 +28040,7 @@ const Heatmap = props => {
28042
28040
  if (tooltip && tooltipPosition && tooltip.label === `${item.label} - ${Math.round(item.value / totalValue * 100)}%`) {
28043
28041
  const top = `${tooltipPosition.y}px`;
28044
28042
  const left = `${tooltipPosition.x}px`;
28045
- return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$1, {
28043
+ return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$2, {
28046
28044
  className: "TooltipContainer",
28047
28045
  top: top,
28048
28046
  left: left
@@ -28162,7 +28160,7 @@ const Heatmap = props => {
28162
28160
  className: "HeatmapWrapper"
28163
28161
  }, /*#__PURE__*/React__default["default"].createElement(TitleContainer, {
28164
28162
  className: "TitleContainer"
28165
- }, /*#__PURE__*/React__default["default"].createElement(Title$4, {
28163
+ }, /*#__PURE__*/React__default["default"].createElement(Title$6, {
28166
28164
  className: "Title"
28167
28165
  }, title)), refreshRequired && renderBars(), !refreshRequired && renderBars(), renderLegend()));
28168
28166
  };
@@ -28576,12 +28574,12 @@ const TooltipLabel$1 = styled__default["default"].div`
28576
28574
  font-weight: 400;
28577
28575
  width: fit-content;
28578
28576
  `;
28579
- const TooltipTitle$2 = styled__default["default"].div`
28577
+ const TooltipTitle$3 = styled__default["default"].div`
28580
28578
  color: #212121;
28581
28579
  font-size: 14px;
28582
28580
  font-weight: 600;
28583
28581
  `;
28584
- const Title$3 = styled__default["default"].h5`
28582
+ const Title$5 = styled__default["default"].h5`
28585
28583
  font-weight: 500;
28586
28584
  font-size: 18px;
28587
28585
  line-height: 20px;
@@ -28658,7 +28656,7 @@ const BarChart = props => {
28658
28656
  if (!active || !payload || payload?.length === 0) return null;
28659
28657
  let currentTooltipValue = 0;
28660
28658
  if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
28661
- return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$2, null, `${label}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$1, null, `${displayFormattedValue(currentTooltipValue, !!showCurrentCampaignStyle)}`));
28659
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$3, null, `${label}`), /*#__PURE__*/React__default["default"].createElement(TooltipLabel$1, null, `${displayFormattedValue(currentTooltipValue, !!showCurrentCampaignStyle)}`));
28662
28660
  };
28663
28661
  const CustomizedTickBarChart = props => {
28664
28662
  const {
@@ -28741,7 +28739,7 @@ const BarChart = props => {
28741
28739
  height: height,
28742
28740
  width: width,
28743
28741
  ref: controlsContainerRef
28744
- }, /*#__PURE__*/React__default["default"].createElement(Controls$3, null, /*#__PURE__*/React__default["default"].createElement(Title$3, null, title), /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
28742
+ }, /*#__PURE__*/React__default["default"].createElement(Controls$3, null, /*#__PURE__*/React__default["default"].createElement(Title$5, null, title), /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
28745
28743
  width: "100%",
28746
28744
  height: 400
28747
28745
  }, /*#__PURE__*/React__default["default"].createElement(recharts.BarChart, {
@@ -28912,7 +28910,7 @@ const Controls$2 = styled__default["default"].div`
28912
28910
  flex-direction: column;
28913
28911
  background-color: white;
28914
28912
  `;
28915
- const Title$2 = styled__default["default"].h5`
28913
+ const Title$4 = styled__default["default"].h5`
28916
28914
  font-size: 18px;
28917
28915
  font-weight: 400;
28918
28916
  margin: 0 0 30px;
@@ -28945,7 +28943,7 @@ const TooltipLabel = styled__default["default"].div`
28945
28943
  font-weight: 400;
28946
28944
  width: fit-content;
28947
28945
  `;
28948
- const TooltipTitle$1 = styled__default["default"].div`
28946
+ const TooltipTitle$2 = styled__default["default"].div`
28949
28947
  color: #212121;
28950
28948
  font-size: 14px;
28951
28949
  font-weight: 600;
@@ -29098,7 +29096,7 @@ const DoubleBarSingleLine = props => {
29098
29096
  } else {
29099
29097
  `${currentTooltipValue.toFixed(1)}`;
29100
29098
  }
29101
- return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$1, null, `${label}`), payload.map((item, idx) => {
29099
+ return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$2, null, `${label}`), payload.map((item, idx) => {
29102
29100
  const dataStateItem = dataState.find(state => state.key === item.dataKey);
29103
29101
  return /*#__PURE__*/React__default["default"].createElement(TooltipLabel, {
29104
29102
  key: item.dataKey || idx
@@ -29171,7 +29169,7 @@ const DoubleBarSingleLine = props => {
29171
29169
  noDataText: noDataText
29172
29170
  }) : /*#__PURE__*/React__default["default"].createElement(Controls$2, {
29173
29171
  className: "Controls"
29174
- }, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$2, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
29172
+ }, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$4, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
29175
29173
  width: hasScroll ? `${data.length * 178}px` : 'auto'
29176
29174
  }, /*#__PURE__*/React__default["default"].createElement(LineChartWrapper, null, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, null, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, _extends({
29177
29175
  data: transformedData
@@ -29270,7 +29268,7 @@ const CheckboxGroupContainer = styled__default["default"].div`
29270
29268
  height: 21px;
29271
29269
  gap: 20px;
29272
29270
  `;
29273
- const Title$1 = styled__default["default"].h5`
29271
+ const Title$3 = styled__default["default"].h5`
29274
29272
  font-weight: 500;
29275
29273
  font-size: 18px;
29276
29274
  line-height: 20px;
@@ -29290,7 +29288,7 @@ const LegendIcon = styled__default["default"].div`
29290
29288
  margin-right: 5px;
29291
29289
  background-color: ${props => props.color};
29292
29290
  `;
29293
- const TooltipContainer = styled__default["default"].div`
29291
+ const TooltipContainer$1 = styled__default["default"].div`
29294
29292
  background: white;
29295
29293
  padding: 10px;
29296
29294
  border-radius: 5px;
@@ -29300,12 +29298,12 @@ const TooltipContainer = styled__default["default"].div`
29300
29298
  font-weight: 500;
29301
29299
  font-size: 14px;
29302
29300
  `;
29303
- const TooltipTitle = styled__default["default"].p`
29301
+ const TooltipTitle$1 = styled__default["default"].p`
29304
29302
  font-weight: 700;
29305
29303
  margin-top: 5px;
29306
29304
  margin-bottom: 5px;
29307
29305
  `;
29308
- const TooltipText = styled__default["default"].p`
29306
+ const TooltipText$1 = styled__default["default"].p`
29309
29307
  margin-top: 5px;
29310
29308
  margin-bottom: 5px;
29311
29309
  `;
@@ -29546,10 +29544,10 @@ const AreaChart = props => {
29546
29544
  payload
29547
29545
  } = _ref3;
29548
29546
  if (active && payload && payload.length) {
29549
- return /*#__PURE__*/React__default["default"].createElement(TooltipContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle, null, `${payload[0].payload.label}`), payload.map((data, index) => {
29547
+ return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$1, null, `${payload[0].payload.label}`), payload.map((data, index) => {
29550
29548
  const chart = areaChartsState.find(chart => chart.key === data.dataKey);
29551
29549
  if (chart) {
29552
- return /*#__PURE__*/React__default["default"].createElement(TooltipText, {
29550
+ return /*#__PURE__*/React__default["default"].createElement(TooltipText$1, {
29553
29551
  key: index
29554
29552
  }, `${chart.name}: ${displayFormattedValue(data.value, chart.isDollar)}`);
29555
29553
  }
@@ -29598,7 +29596,7 @@ const AreaChart = props => {
29598
29596
  height: height
29599
29597
  }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeaderContainer$2, {
29600
29598
  "data-testid": "header-container"
29601
- }, /*#__PURE__*/React__default["default"].createElement(Title$1, {
29599
+ }, /*#__PURE__*/React__default["default"].createElement(Title$3, {
29602
29600
  "data-testid": "title"
29603
29601
  }, title), /*#__PURE__*/React__default["default"].createElement(CheckboxGroupContainer, {
29604
29602
  "data-testid": "checkbox-group-container"
@@ -30096,7 +30094,7 @@ const HeaderContainer$1 = styled__default["default"].div`
30096
30094
  align-items: center;
30097
30095
  padding-bottom: 8px;
30098
30096
  `;
30099
- const Title = styled__default["default"].h3`
30097
+ const Title$2 = styled__default["default"].h3`
30100
30098
  font-size: 18px;
30101
30099
  font-weight: 400;
30102
30100
  margin: 0;
@@ -30165,7 +30163,7 @@ const BreakdownPanel = props => {
30165
30163
  height: height
30166
30164
  }) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeaderContainer$1, {
30167
30165
  "data-testid": "header-container"
30168
- }, /*#__PURE__*/React__default["default"].createElement(Title, {
30166
+ }, /*#__PURE__*/React__default["default"].createElement(Title$2, {
30169
30167
  "data-testid": "title"
30170
30168
  }, title)), /*#__PURE__*/React__default["default"].createElement(CategorySalesMainContainer, {
30171
30169
  "data-testid": "category-sales-main-container"
@@ -31407,42 +31405,29 @@ const BatteryChart = props => {
31407
31405
  }))))))), starText !== "" && /*#__PURE__*/React__default["default"].createElement(StarText, null, starText));
31408
31406
  };
31409
31407
 
31410
- // const originalData = [
31411
- // { label: "Vendor Selling Event: Week 34", inc_sales: 20000, inc_roi: 1.2 },
31412
- // { label: "Vendor Selling Event: Week 36", inc_sales: 10000, inc_roi: 1.2 },
31413
- // { label: "Vendor Selling Event: Week 38", inc_sales: 8000, inc_roi: 0.8 },
31414
- // { label: "Vendor Selling Event: Week 33", inc_sales: 12000, inc_roi: 1.1 },
31415
- // { label: "Vendor Selling Event: Week 29", inc_sales: 8000, inc_roi: 1.2 },
31416
- // { label: "Vendor Selling Event: Week 28", inc_sales: 8000, inc_roi: 0.7 },
31417
- // { label: "Vendor Selling Event: Week 35", inc_sales: 8000, inc_roi: 0.8 },
31418
- // { label: "Vendor Selling Event: Week 30", inc_sales: 9000, inc_roi: 1.1 },
31419
- // ];
31420
-
31421
31408
  const SeparatedLineBarChart = ({
31422
31409
  barlineData = []
31423
31410
  }) => {
31424
- // Sort the data by week number extracted from the label
31425
- const sortedData = barlineData?.sort((a, b) => {
31426
- const weekA = parseInt(a.label.match(/Week (\d+)/)[1], 10);
31427
- const weekB = parseInt(b.label.match(/Week (\d+)/)[1], 10);
31428
- return weekA - weekB;
31411
+ const [startIndex, setStartIndex] = React$1.useState(0);
31412
+ React$1.useState(6);
31413
+ // Use simple data processing like in the working example
31414
+ const processedData = barlineData.map(item => {
31415
+ return {
31416
+ ...item,
31417
+ // Keep the full label for tooltip and filtering
31418
+ shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
31419
+ };
31429
31420
  });
31430
- const dataWithIndex = sortedData.map((item, index) => ({
31431
- ...item,
31432
- index,
31433
- shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
31434
- }));
31435
- const CustomizedTick = ({
31436
- x,
31437
- y,
31438
- payload,
31439
- viewableIndices
31440
- }) => {
31441
- const label = dataWithIndex[payload.value]?.label ?? "";
31421
+
31422
+ // CustomTick component for the X-axis (similar to working example)
31423
+ const CustomizedTick = props => {
31424
+ const {
31425
+ x,
31426
+ y,
31427
+ payload
31428
+ } = props;
31429
+ const label = payload.value;
31442
31430
  const parts = label.replace("Vendor Selling Event: ", "").split(" ");
31443
- if (!viewableIndices.includes(payload.value)) {
31444
- return null;
31445
- }
31446
31431
  return /*#__PURE__*/React__default["default"].createElement("g", {
31447
31432
  transform: `translate(${x},${y})`
31448
31433
  }, /*#__PURE__*/React__default["default"].createElement("text", {
@@ -31452,7 +31437,7 @@ const SeparatedLineBarChart = ({
31452
31437
  textAnchor: "middle",
31453
31438
  fill: "#212121",
31454
31439
  fontSize: 11,
31455
- fontWeight: "400",
31440
+ fontWeight: 400,
31456
31441
  fontFamily: "Poppins"
31457
31442
  }, /*#__PURE__*/React__default["default"].createElement("tspan", {
31458
31443
  x: 0,
@@ -31462,51 +31447,57 @@ const SeparatedLineBarChart = ({
31462
31447
  dy: 18
31463
31448
  }, "Event: ", parts.join(" "))));
31464
31449
  };
31465
- const CustomLabelListFilter = props => {
31466
- const {
31467
- viewableIndices,
31468
- dataKey,
31469
- position,
31470
- formatter,
31471
- fill,
31472
- fontSize,
31473
- fontWeight,
31474
- fontFamily
31475
- } = props;
31476
- return /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
31477
- dataKey: dataKey,
31478
- position: position,
31479
- formatter: (value, name, props) => {
31480
- if (!viewableIndices.includes(props.index)) {
31481
- return "";
31482
- }
31483
- return formatter ? formatter(value) : value;
31484
- },
31485
- fill: fill || "#212121",
31486
- fontSize: fontSize || 12,
31487
- fontWeight: fontWeight || "400",
31488
- fontFamily: fontFamily || "Poppins"
31489
- });
31450
+
31451
+ // Custom tooltip (similar to the working example)
31452
+ const CustomTooltip = ({
31453
+ active,
31454
+ payload,
31455
+ label
31456
+ }) => {
31457
+ if (!active || !payload || !payload.length) return null;
31458
+
31459
+ // Find the data item based on index
31460
+ const data = payload[0]?.payload;
31461
+ if (!data) return null;
31462
+ return /*#__PURE__*/React__default["default"].createElement("div", {
31463
+ style: {
31464
+ backgroundColor: "white",
31465
+ padding: "10px",
31466
+ border: "1px solid #ccc",
31467
+ borderRadius: "4px",
31468
+ fontFamily: "Poppins"
31469
+ }
31470
+ }, /*#__PURE__*/React__default["default"].createElement("p", {
31471
+ style: {
31472
+ margin: "0 0 5px",
31473
+ fontWeight: "bold"
31474
+ }
31475
+ }, "EVENT_NAME.DIM_EVENTS: ", data.label), /*#__PURE__*/React__default["default"].createElement("p", {
31476
+ style: {
31477
+ margin: "0 0 5px"
31478
+ }
31479
+ }, "EVENT_DESCRIPTION.DIM_EVENTS: ", data.description || "N/A"), /*#__PURE__*/React__default["default"].createElement("p", {
31480
+ style: {
31481
+ margin: "0 0 5px"
31482
+ }
31483
+ }, "INC Sales: ", data.inc_sales?.toLocaleString()), /*#__PURE__*/React__default["default"].createElement("p", {
31484
+ style: {
31485
+ margin: "0"
31486
+ }
31487
+ }, "INC Sales ROI: ", data.inc_roi?.toFixed(1)));
31490
31488
  };
31489
+
31490
+ // Chart margins (same as in both examples)
31491
31491
  const chartMargins = {
31492
- top: 15,
31493
- right: 40,
31492
+ top: 30,
31493
+ right: 30,
31494
31494
  left: 20,
31495
- bottom: 40
31495
+ bottom: 60
31496
31496
  };
31497
- const [viewWindow, setViewWindow] = React$1.useState({
31498
- startIndex: 0,
31499
- endIndex: dataWithIndex.length - 1
31500
- });
31501
- const viewableIndices = [];
31502
- for (let i = viewWindow.startIndex; i <= viewWindow.endIndex; i++) {
31503
- viewableIndices.push(i);
31504
- }
31505
- dataWithIndex.filter(item => viewableIndices.includes(item.index));
31506
31497
  return /*#__PURE__*/React__default["default"].createElement("div", {
31507
31498
  style: {
31508
31499
  width: "100%",
31509
- height: 700
31500
+ height: "700px"
31510
31501
  }
31511
31502
  }, /*#__PURE__*/React__default["default"].createElement("div", {
31512
31503
  style: {
@@ -31516,24 +31507,21 @@ const SeparatedLineBarChart = ({
31516
31507
  width: "100%",
31517
31508
  height: "100%"
31518
31509
  }, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, {
31519
- data: dataWithIndex,
31510
+ data: processedData,
31520
31511
  margin: chartMargins
31521
31512
  }, /*#__PURE__*/React__default["default"].createElement(recharts.CartesianGrid, {
31522
31513
  strokeDasharray: "3 3",
31523
31514
  vertical: false
31524
31515
  }), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
31525
- dataKey: "index",
31526
- type: "number",
31527
- domain: ['dataMin', 'dataMax'],
31528
- padding: {
31529
- left: 20,
31530
- right: 20
31531
- },
31516
+ dataKey: "label",
31517
+ tick: false,
31532
31518
  hide: true
31533
31519
  }), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
31534
31520
  domain: [0, 2],
31535
31521
  hide: true
31536
- }), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, null), /*#__PURE__*/React__default["default"].createElement(recharts.Line, {
31522
+ }), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
31523
+ content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
31524
+ }), /*#__PURE__*/React__default["default"].createElement(recharts.Line, {
31537
31525
  type: "monotone",
31538
31526
  dataKey: "inc_roi",
31539
31527
  stroke: "#F8CD00",
@@ -31544,11 +31532,14 @@ const SeparatedLineBarChart = ({
31544
31532
  },
31545
31533
  activeDot: false,
31546
31534
  name: "INC Sales ROI"
31547
- }, /*#__PURE__*/React__default["default"].createElement(CustomLabelListFilter, {
31535
+ }, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
31548
31536
  dataKey: "inc_roi",
31549
31537
  position: "top",
31550
31538
  formatter: value => value.toFixed(1),
31551
- viewableIndices: viewableIndices
31539
+ fill: "#212121",
31540
+ fontSize: 12,
31541
+ fontWeight: "400",
31542
+ fontFamily: "Poppins"
31552
31543
  }))))), /*#__PURE__*/React__default["default"].createElement("div", {
31553
31544
  style: {
31554
31545
  height: "60%"
@@ -31557,59 +31548,48 @@ const SeparatedLineBarChart = ({
31557
31548
  width: "100%",
31558
31549
  height: "100%"
31559
31550
  }, /*#__PURE__*/React__default["default"].createElement(recharts.ComposedChart, {
31560
- data: dataWithIndex,
31551
+ data: processedData,
31561
31552
  margin: chartMargins
31562
31553
  }, /*#__PURE__*/React__default["default"].createElement(recharts.CartesianGrid, {
31563
31554
  strokeDasharray: "3 3",
31564
31555
  vertical: false
31565
31556
  }), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
31566
- dataKey: "index",
31567
- type: "number",
31568
- domain: ['dataMin', 'dataMax'],
31569
- padding: {
31570
- left: 20,
31571
- right: 20
31572
- },
31573
- tick: props => /*#__PURE__*/React__default["default"].createElement(CustomizedTick, _extends({}, props, {
31574
- viewableIndices: viewableIndices
31575
- })),
31557
+ dataKey: "label",
31558
+ tick: /*#__PURE__*/React__default["default"].createElement(CustomizedTick, null),
31576
31559
  interval: 0,
31577
31560
  height: 60,
31578
- tickLine: false,
31579
- ticks: dataWithIndex.map(item => item.index)
31561
+ tickLine: false
31580
31562
  }), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
31581
31563
  tickFormatter: v => `${v / 1000}k`,
31582
31564
  hide: true
31583
- }), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, null), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
31565
+ }), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
31566
+ content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
31567
+ }), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
31584
31568
  dataKey: "inc_sales",
31585
31569
  fill: "#CCDCDD",
31586
- gap: "4px",
31570
+ gap: 4,
31587
31571
  borderRadius: [4, 4, 0, 8],
31588
31572
  barSize: 40,
31589
31573
  name: "INC Sales"
31590
- }, /*#__PURE__*/React__default["default"].createElement(CustomLabelListFilter, {
31574
+ }, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
31591
31575
  dataKey: "inc_sales",
31592
31576
  position: "top",
31593
31577
  formatter: value => `${value / 1000}k`,
31594
- viewableIndices: viewableIndices
31578
+ fill: "#212121",
31579
+ fontSize: 12,
31580
+ fontWeight: "400",
31581
+ fontFamily: "Poppins"
31595
31582
  })), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
31596
- dataKey: "index",
31583
+ dataKey: "label",
31597
31584
  height: 30,
31598
31585
  stroke: "#212121",
31599
- startIndex: viewWindow.startIndex,
31600
- endIndex: viewWindow.endIndex,
31601
- onChange: e => {
31602
- setViewWindow({
31603
- startIndex: e.startIndex ?? 0,
31604
- endIndex: e.endIndex ?? dataWithIndex.length - 1
31605
- });
31606
- },
31607
- travellerWidth: 12
31608
- })), /*#__PURE__*/React__default["default"].createElement("div", {
31609
- style: {
31610
- marginTop: "-28px"
31611
- }
31612
- }, /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
31586
+ startIndex: startIndex,
31587
+ endIndex: Math.min(4, processedData.length - 1),
31588
+ onChange: onChange,
31589
+ y: 330,
31590
+ travellerWidth: 10,
31591
+ tickFormatter: (value, index) => index + 1
31592
+ })), /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
31613
31593
  legendData: [{
31614
31594
  iconColor: "#CCDCDD",
31615
31595
  iconType: "Square",
@@ -31623,7 +31603,9 @@ const SeparatedLineBarChart = ({
31623
31603
  };
31624
31604
 
31625
31605
  function SingleChart({
31626
- lineChartData
31606
+ lineChartData,
31607
+ height = 450,
31608
+ width = "100%"
31627
31609
  }) {
31628
31610
  const dataWithIndex = lineChartData?.map((item, index) => ({
31629
31611
  ...item,
@@ -31656,20 +31638,15 @@ function SingleChart({
31656
31638
  dy: 18
31657
31639
  }, "Event: ", parts.join(" "))));
31658
31640
  };
31659
- const [startIndex, setStartIndex] = React$1.useState(0);
31660
- const [endIndex, setEndIndex] = React$1.useState(dataWithIndex?.length - 1);
31641
+ React$1.useState(0);
31642
+ React$1.useState(dataWithIndex?.length - 1);
31661
31643
  return /*#__PURE__*/React__default["default"].createElement("div", {
31662
31644
  style: {
31663
- width: "100%",
31664
- height: 600
31665
- }
31666
- }, /*#__PURE__*/React__default["default"].createElement("div", {
31667
- style: {
31668
- height: "100%"
31645
+ width: "100%"
31669
31646
  }
31670
31647
  }, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
31671
- width: "100%",
31672
- height: "100%"
31648
+ width: width,
31649
+ height: height
31673
31650
  }, /*#__PURE__*/React__default["default"].createElement(recharts.ComposedChart, {
31674
31651
  data: dataWithIndex,
31675
31652
  margin: {
@@ -31710,23 +31687,18 @@ function SingleChart({
31710
31687
  fontWeight: "400",
31711
31688
  fontFamily: "Poppins"
31712
31689
  })), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
31713
- dataKey: "index",
31714
31690
  height: 30,
31715
- stroke: "#212121",
31716
- startIndex: startIndex,
31717
- endIndex: endIndex,
31718
- onChange: e => {
31719
- setStartIndex(e.startIndex ?? 0);
31720
- setEndIndex(e.endIndex ?? dataWithIndex?.length - 1);
31721
- },
31722
- travellerWidth: 12
31691
+ travellerWidth: 10,
31692
+ startIndex: 0,
31693
+ endIndex: 5,
31694
+ y: 380
31723
31695
  })), /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
31724
31696
  legendData: [{
31725
31697
  iconColor: "#CCDCDD",
31726
31698
  iconType: "Square",
31727
31699
  title: "INC Units"
31728
31700
  }]
31729
- }))));
31701
+ })));
31730
31702
  }
31731
31703
 
31732
31704
  styled__default["default"].div`
@@ -31956,8 +31928,67 @@ SegmentedButton.defaultProps = {
31956
31928
  onClick: () => {}
31957
31929
  };
31958
31930
 
31931
+ const Container = styled__default["default"].div`
31932
+ width: ${props => props.width};
31933
+ height: ${props => props.height};
31934
+ padding: 15px;
31935
+ display: flex;
31936
+ flex-direction: column;
31937
+ #Segment {
31938
+ width: auto;
31939
+ white-space: nowrap;
31940
+ font-size: 14px;
31941
+ font-weight: 500;
31942
+ font-family: "Poppins"
31943
+ }
31944
+ `;
31945
+ const Title$1 = styled__default["default"].h2`
31946
+ color: #212121;
31947
+ font-family: "Poppins";
31948
+ font-size: 18px;
31949
+ font-style: normal;
31950
+ font-weight: 400;
31951
+ line-height: normal;
31952
+ margin: 0 0 16px 0;
31953
+ `;
31954
+ styled__default["default"].div`
31955
+ font-family: sans-serif;
31956
+ text-align: center;
31957
+ `;
31958
+ styled__default["default"].div`
31959
+ height: 25%;
31960
+ `;
31961
+ styled__default["default"].div`
31962
+ height: 75%;
31963
+ `;
31964
+ styled__default["default"].div`
31965
+ height: 100%;
31966
+ display: flex;
31967
+ flex-direction: column;
31968
+ background-color: white;
31969
+ `;
31970
+ const TooltipContainer = styled__default["default"].div`
31971
+ background: white;
31972
+ padding: 10px;
31973
+ border-radius: 5px;
31974
+ box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
31975
+ border: 1px solid #ddd;
31976
+ font-family: Poppins, sans-serif;
31977
+ font-weight: 500;
31978
+ font-size: 14px;
31979
+ `;
31980
+ const TooltipTitle = styled__default["default"].p`
31981
+ font-weight: 700;
31982
+ margin-top: 5px;
31983
+ margin-bottom: 5px;
31984
+ `;
31985
+ const TooltipText = styled__default["default"].p`
31986
+ margin-top: 5px;
31987
+ margin-bottom: 5px;
31988
+ `;
31989
+
31959
31990
  function InnerBarChart({
31960
- data = []
31991
+ data
31961
31992
  }) {
31962
31993
  const processedData = data.map(item => {
31963
31994
  const parts = item.label.replace("Vendor Selling Event:", "").trim();
@@ -32020,9 +32051,8 @@ function InnerBarChart({
32020
32051
  }) => {
32021
32052
  if (!active || !payload || !payload.length) return null;
32022
32053
  const data = payload[0].payload;
32023
- return /*#__PURE__*/React__default["default"].createElement("div", {
32024
- className: "bg-white border border-gray-300 p-2 rounded-lg text-sm"
32025
- }, /*#__PURE__*/React__default["default"].createElement("strong", null, data.label), /*#__PURE__*/React__default["default"].createElement("div", null, "Actual: ", format(data.actual)), /*#__PURE__*/React__default["default"].createElement("div", null, "Total: ", format(data.total)));
32054
+ const repeaterPercentage = (data.actual / data.total * 100).toFixed(1);
32055
+ return /*#__PURE__*/React__default["default"].createElement(TooltipContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle, null, `${data.label}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `${data.description}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `New Shoppers: ${format(data.total)}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `Repeaters: ${format(data.actual)}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `% Repeaters: ${repeaterPercentage}%`));
32026
32056
  };
32027
32057
  const CustomizedTick = props => {
32028
32058
  const {
@@ -32054,9 +32084,7 @@ function InnerBarChart({
32054
32084
  };
32055
32085
  return /*#__PURE__*/React__default["default"].createElement("div", {
32056
32086
  className: "w-full"
32057
- }, /*#__PURE__*/React__default["default"].createElement("h3", {
32058
- className: "text-lg font-medium mb-4 text-center"
32059
- }, "Vendor Selling Events Comparison"), /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
32087
+ }, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
32060
32088
  width: "100%",
32061
32089
  height: 450
32062
32090
  }, /*#__PURE__*/React__default["default"].createElement(recharts.BarChart, {
@@ -32078,7 +32106,8 @@ function InnerBarChart({
32078
32106
  }), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
32079
32107
  type: "number",
32080
32108
  domain: [0, "dataMax + 2000"],
32081
- tickFormatter: format
32109
+ tickFormatter: format,
32110
+ hide: true
32082
32111
  }), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
32083
32112
  content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
32084
32113
  }), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
@@ -32094,51 +32123,22 @@ function InnerBarChart({
32094
32123
  }))));
32095
32124
  }
32096
32125
 
32097
- const Container = styled__default["default"].div`
32098
- width: ${props => props.width};
32099
- height: ${props => props.height};
32100
- padding: 15px;
32101
- display: flex;
32102
- flex-direction: column;
32103
- #Segment {
32104
- width: auto;
32105
- white-space: nowrap;
32106
- font-size: 14px;
32107
- font-weight: 500;
32108
- font-family: "Poppins"
32109
- }
32110
- `;
32111
- styled__default["default"].div`
32112
- font-family: sans-serif;
32113
- text-align: center;
32114
- `;
32115
- styled__default["default"].div`
32116
- height: 25%;
32117
- `;
32118
- styled__default["default"].div`
32119
- height: 75%;
32120
- `;
32121
- styled__default["default"].div`
32122
- height: 100%;
32123
- display: flex;
32124
- flex-direction: column;
32125
- background-color: white;
32126
- `;
32127
-
32128
32126
  const BrushChart = props => {
32129
32127
  const {
32130
32128
  width,
32131
32129
  height,
32132
32130
  data,
32133
32131
  barlineData,
32134
- lineChartData
32132
+ lineChartData,
32133
+ linearData,
32134
+ title
32135
32135
  } = props;
32136
32136
  const segmentedbuttonOptions = ["New Shoppers & Repeaters", "INC Sales & ROI", "INC Units", "Basket Lift"];
32137
32137
  const [selectedOption, setSelectedOption] = React$1.useState(segmentedbuttonOptions[0]);
32138
32138
  return /*#__PURE__*/React__default["default"].createElement(Container, {
32139
32139
  height: height,
32140
32140
  width: width
32141
- }, /*#__PURE__*/React__default["default"].createElement(SegmentedButton, {
32141
+ }, /*#__PURE__*/React__default["default"].createElement(Title$1, null, title), /*#__PURE__*/React__default["default"].createElement(SegmentedButton, {
32142
32142
  gap: "8px",
32143
32143
  options: segmentedbuttonOptions.map(value => ({
32144
32144
  value
@@ -32156,10 +32156,302 @@ const BrushChart = props => {
32156
32156
  }), selectedOption === "INC Units" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
32157
32157
  lineChartData: lineChartData
32158
32158
  }), selectedOption === "Basket Lift" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
32159
- lineChartData: lineChartData
32159
+ lineChartData: linearData
32160
32160
  }));
32161
32161
  };
32162
32162
 
32163
+ const Overlay = styled__default["default"].div`
32164
+ position: fixed;
32165
+ top: 0;
32166
+ left: 0;
32167
+ width: 100%;
32168
+ height: 100%;
32169
+ background: rgba(0, 0, 0, 0.5);
32170
+ display: flex;
32171
+ justify-content: center;
32172
+ align-items: center;
32173
+ z-index: 999;
32174
+ `;
32175
+ const ModalContent = styled__default["default"].div`
32176
+ position: absolute;
32177
+ width: 69%;
32178
+ height: 100%;
32179
+ padding: 8rem 0 4rem;
32180
+ box-sizing: border-box;
32181
+ margin: 0 auto;
32182
+ font-family: 'Poppins', sans-serif;
32183
+
32184
+ @media (max-width: 768px) {
32185
+ width: 100%;
32186
+ max-width: 940px;
32187
+ padding: 1rem 0 3rem;
32188
+ }
32189
+ `;
32190
+ const Header = styled__default["default"].div`
32191
+ position: relative;
32192
+ display: flex;
32193
+ justify-content: space-between;
32194
+ align-items: center;
32195
+ margin-bottom: 4rem;
32196
+
32197
+ @media (max-width: 768px) {
32198
+ flex-direction: column;
32199
+ gap: 1rem;
32200
+ align-items: flex-start;
32201
+ }
32202
+ `;
32203
+ const CloseButton = styled__default["default"].button`
32204
+ position: absolute;
32205
+ top: -10px;
32206
+ right: 0px;
32207
+ background: transparent;
32208
+ border: none;
32209
+ color: ${props => props.$navcolor || "#fff"};
32210
+ font-size: 1.5rem;
32211
+ cursor: pointer;
32212
+
32213
+ &:hover {
32214
+ opacity: 0.8;
32215
+ }
32216
+
32217
+ @media (max-width: 768px) {
32218
+ position: static;
32219
+ align-self: flex-end;
32220
+ }
32221
+ `;
32222
+ const Title = styled__default["default"].h2`
32223
+ position: absolute;
32224
+ display: flex;
32225
+ align-items: center;
32226
+ gap: 0.5rem;
32227
+ top: -10px;
32228
+ color: ${props => props.$titleColor || "#fff"};
32229
+ font-size: 1.25rem;
32230
+ margin: 0;
32231
+ font-feature-settings: "liga" off;
32232
+ font-family: 'Poppins', sans-serif;
32233
+ font-size: 23.528px;
32234
+ font-style: normal;
32235
+ font-weight: 700;
32236
+ line-height: normal;
32237
+
32238
+ @media (max-width: 768px) {
32239
+ position: static;
32240
+ align-self: flex-start;
32241
+ }
32242
+ `;
32243
+ styled__default["default"].span`
32244
+ font-size: 1.5rem;
32245
+ margin-right: 0.5rem;
32246
+ color: ${props => props.$iconcolor || "#fff"};
32247
+ `;
32248
+ const CarouselContainer = styled__default["default"].div`
32249
+ position: relative;
32250
+ width: 100%;
32251
+ height: 75%;
32252
+ overflow: visible;
32253
+ margin: 0 auto;
32254
+ `;
32255
+ const VisibleCardsContainer = styled__default["default"].div`
32256
+ display: flex;
32257
+ justify-content: center;
32258
+ align-items: center;
32259
+ width: 100%;
32260
+ height: 100%;
32261
+ position: relative;
32262
+
32263
+ .prev-card,
32264
+ .next-card {
32265
+ opacity: 0.3;
32266
+ }
32267
+
32268
+ .prev-card {
32269
+ transform: translateX(-50%) scale(0.75);
32270
+ opacity: 0.3;
32271
+ }
32272
+
32273
+ .active-card {
32274
+ transform: translateX(0) scale(1);
32275
+ opacity: 1;
32276
+ z-index: 2;
32277
+ }
32278
+
32279
+ .next-card {
32280
+ transform: translateX(50%) scale(0.75);
32281
+ opacity: 0.3;
32282
+ }
32283
+
32284
+ .hidden-card {
32285
+ display: none;
32286
+ }
32287
+ `;
32288
+ const Card = styled__default["default"].div`
32289
+ position: absolute;
32290
+ width: 41%;
32291
+ height: 90%;
32292
+ background: #ffffff;
32293
+ border-radius: 16px;
32294
+ padding: 2rem;
32295
+ text-align: center;
32296
+ display: flex;
32297
+ flex-direction: column;
32298
+ align-items: center;
32299
+ justify-content: center;
32300
+ box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.05);
32301
+
32302
+ /* 🎯 תיקון: טרנזישן אחיד לכל שינויי תזוזה/שקיפות */
32303
+ transition: transform 0.4s ease-in-out, left 0.4s ease-in-out,
32304
+ right 0.4s ease-in-out, opacity 0.4s ease-in-out;
32305
+
32306
+ @media (max-width: 768px) {
32307
+ width: 280px;
32308
+ height: 250px;
32309
+ padding: 1.5rem;
32310
+ }
32311
+ `;
32312
+ const NavButton = styled__default["default"].div`
32313
+ position: absolute;
32314
+ top: 50%;
32315
+ transform: translateY(-50%);
32316
+ z-index: 1000;
32317
+ color: ${props => props.$navcolor || "#fff"};
32318
+ font-size: 2.5rem;
32319
+ cursor: pointer;
32320
+ user-select: none;
32321
+ width: 40px;
32322
+ height: 40px;
32323
+ display: flex;
32324
+ align-items: center;
32325
+ justify-content: center;
32326
+
32327
+ &.prev {
32328
+ left: 0;
32329
+ }
32330
+
32331
+ &.next {
32332
+ right: 0;
32333
+ }
32334
+
32335
+ &:hover {
32336
+ opacity: 0.8;
32337
+ }
32338
+ `;
32339
+ const Pagination = styled__default["default"].div`
32340
+ display: flex;
32341
+ justify-content: center;
32342
+ margin-top: 32px;
32343
+ position: relative;
32344
+ `;
32345
+ const Dot = styled__default["default"].button`
32346
+ width: 20px;
32347
+ height: 20px;
32348
+ border-radius: 50%;
32349
+ border: 2px solid #fff;
32350
+ background: transparent;
32351
+ opacity: 1;
32352
+ margin: 4px;
32353
+ cursor: pointer;
32354
+ transition: background 0.3s ease;
32355
+ padding: 0;
32356
+ position: relative;
32357
+
32358
+ &::after {
32359
+ content: "";
32360
+ position: absolute;
32361
+ top: 2px;
32362
+ left: 2px;
32363
+ width: 12px;
32364
+ height: 12px;
32365
+ background: ${props => props.active ? "#fff" : "transparent"};
32366
+ border-radius: 50%;
32367
+ }
32368
+
32369
+ &:focus {
32370
+ outline: none;
32371
+ }
32372
+ `;
32373
+
32374
+ const InsightsCarousel = _ref => {
32375
+ let {
32376
+ children,
32377
+ onClose,
32378
+ title = "Insights:",
32379
+ icon = /*#__PURE__*/React__default["default"].createElement(LampIcon, null),
32380
+ titleColor = "#fff",
32381
+ iconColor = "#fff",
32382
+ navColor = "#fff"
32383
+ } = _ref;
32384
+ const [currentIndex, setCurrentIndex] = React$1.useState(0);
32385
+ const containerRef = React$1.useRef(null);
32386
+ const childrenArray = React__default["default"].Children.toArray(children);
32387
+ const totalChildren = childrenArray.length;
32388
+ const goToSlide = index => {
32389
+ let normalizedIndex = index;
32390
+ if (index < 0) normalizedIndex = totalChildren - 1;
32391
+ if (index >= totalChildren) normalizedIndex = 0;
32392
+ setCurrentIndex(normalizedIndex);
32393
+ };
32394
+ const goToPrev = () => {
32395
+ goToSlide(currentIndex - 1);
32396
+ };
32397
+ const goToNext = () => {
32398
+ goToSlide(currentIndex + 1);
32399
+ };
32400
+ const prevIndex = (currentIndex - 1 + totalChildren) % totalChildren;
32401
+ const nextIndex = (currentIndex + 1) % totalChildren;
32402
+ return /*#__PURE__*/React__default["default"].createElement(Overlay, null, /*#__PURE__*/React__default["default"].createElement(ModalContent, null, /*#__PURE__*/React__default["default"].createElement(Header, null, /*#__PURE__*/React__default["default"].createElement(Title, {
32403
+ $titleColor: titleColor
32404
+ }, /*#__PURE__*/React__default["default"].cloneElement(icon, {
32405
+ fill: iconColor
32406
+ }), title), /*#__PURE__*/React__default["default"].createElement(CloseButton, {
32407
+ onClick: () => onClose?.({
32408
+ label: "closeCrusel"
32409
+ }),
32410
+ "aria-label": "Close insights overlay",
32411
+ $navColor: navColor
32412
+ }, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, {
32413
+ fill: navColor,
32414
+ width: 18.82,
32415
+ height: 18.82
32416
+ }))), /*#__PURE__*/React__default["default"].createElement(CarouselContainer, {
32417
+ ref: containerRef
32418
+ }, totalChildren > 1 && /*#__PURE__*/React__default["default"].createElement(NavButton, {
32419
+ className: "prev",
32420
+ onClick: goToPrev,
32421
+ $navColor: navColor
32422
+ }, /*#__PURE__*/React__default["default"].createElement(ChervronLeftIcon, {
32423
+ fill: navColor,
32424
+ width: 41,
32425
+ height: 42
32426
+ })), /*#__PURE__*/React__default["default"].createElement(VisibleCardsContainer, null, childrenArray.map((child, index) => {
32427
+ let className = "hidden-card";
32428
+ if (totalChildren === 1) {
32429
+ className = "active-card";
32430
+ } else {
32431
+ if (index === prevIndex) className = "prev-card";
32432
+ if (index === currentIndex) className = "active-card";
32433
+ if (index === nextIndex) className = "next-card";
32434
+ }
32435
+ return /*#__PURE__*/React__default["default"].createElement(Card, {
32436
+ key: index,
32437
+ className: className
32438
+ }, child);
32439
+ })), totalChildren > 1 && /*#__PURE__*/React__default["default"].createElement(NavButton, {
32440
+ className: "next",
32441
+ onClick: goToNext,
32442
+ $navColor: navColor
32443
+ }, /*#__PURE__*/React__default["default"].createElement(ChervronRightIcon, {
32444
+ fill: navColor,
32445
+ width: 41,
32446
+ height: 42
32447
+ }))), /*#__PURE__*/React__default["default"].createElement(Pagination, null, childrenArray.map((_, index) => /*#__PURE__*/React__default["default"].createElement(Dot, {
32448
+ key: index,
32449
+ active: index === currentIndex,
32450
+ onClick: () => goToSlide(index),
32451
+ "aria-label": `Go to slide ${index + 1}`
32452
+ })))));
32453
+ };
32454
+
32163
32455
  exports.AreaChart = AreaChart;
32164
32456
  exports.BannerEventBoxList = BannerEventBoxList;
32165
32457
  exports.BarChart = BarChart;
@@ -32178,6 +32470,7 @@ exports.EventList = EventList;
32178
32470
  exports.FilterPanel = FilterPanel;
32179
32471
  exports.Heatmap = Heatmap;
32180
32472
  exports.IconButton = IconButton;
32473
+ exports.InsightsCarousel = InsightsCarousel;
32181
32474
  exports.LinkButton = LinkButton;
32182
32475
  exports.LinnerDataBox = LinnerDataBox;
32183
32476
  exports.MarketShareDescription = MarketShareDescription;