sag_components 2.0.0-beta56 → 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.d.ts +11 -1
- package/dist/index.esm.js +561 -261
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +561 -260
- package/dist/index.js.map +1 -1
- package/dist/types/components/BrushChart/BrushChart.style.d.ts +4 -0
- package/dist/types/components/BrushChart/Charts/BarLine.d.ts +1 -1
- package/dist/types/components/BrushChart/Charts/SingleChart.d.ts +3 -1
- package/dist/types/components/InsightsCarousel/InsightsCarousel.d.ts +2 -2
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
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$
|
|
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$
|
|
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$
|
|
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$
|
|
2416
|
+
}, /*#__PURE__*/React$1.createElement(Title$f, {
|
|
2417
2417
|
className: "Title"
|
|
2418
2418
|
}, title), /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer$2, {
|
|
2419
2419
|
className: "CurrencySignAndFormattedValueContainer"
|
|
@@ -9717,35 +9717,41 @@ const OptionsContainer$4 = styled.div`
|
|
|
9717
9717
|
padding-top: 8px;
|
|
9718
9718
|
`;
|
|
9719
9719
|
|
|
9720
|
-
const ChervronRightIcon =
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
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
|
+
};
|
|
9734
9737
|
|
|
9735
|
-
const ChervronLeftIcon =
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
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
|
+
};
|
|
9749
9755
|
|
|
9750
9756
|
/* eslint-disable react/prop-types */
|
|
9751
9757
|
|
|
@@ -11127,7 +11133,7 @@ const TooltipTextContainer = styled.div`
|
|
|
11127
11133
|
cursor: pointer;
|
|
11128
11134
|
}
|
|
11129
11135
|
`;
|
|
11130
|
-
const TooltipText$
|
|
11136
|
+
const TooltipText$2 = styled.div`
|
|
11131
11137
|
margin: 0;
|
|
11132
11138
|
`;
|
|
11133
11139
|
|
|
@@ -11241,7 +11247,7 @@ const FilterPanel = props => {
|
|
|
11241
11247
|
inputSubType: 'year'
|
|
11242
11248
|
} : ''),
|
|
11243
11249
|
...(newPeriodPickerSelectedValue[0]?.value === 'ytd' ? {
|
|
11244
|
-
inputSubType: '
|
|
11250
|
+
inputSubType: 'ytd'
|
|
11245
11251
|
} : ''),
|
|
11246
11252
|
...(newPeriodPickerSelectedValue[0]?.value === 'month' ? {
|
|
11247
11253
|
inputSubType: 'month'
|
|
@@ -11264,7 +11270,7 @@ const FilterPanel = props => {
|
|
|
11264
11270
|
inputSubType: 'year'
|
|
11265
11271
|
} : ''),
|
|
11266
11272
|
...(newPeriodPickerSelectedValue[0]?.value === 'ytd' ? {
|
|
11267
|
-
inputSubType: '
|
|
11273
|
+
inputSubType: 'ytd'
|
|
11268
11274
|
} : ''),
|
|
11269
11275
|
...(newPeriodPickerSelectedValue[0]?.value === 'month' ? {
|
|
11270
11276
|
inputSubType: 'month'
|
|
@@ -11297,8 +11303,8 @@ const FilterPanel = props => {
|
|
|
11297
11303
|
fieldsData: newFieldsDataState
|
|
11298
11304
|
});
|
|
11299
11305
|
};
|
|
11300
|
-
const getTooltipTextDates = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$
|
|
11301
|
-
const getTooltipTextGoButton = () => /*#__PURE__*/React$1.createElement(TooltipTextContainer, null, /*#__PURE__*/React$1.createElement(TooltipText$
|
|
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));
|
|
11302
11308
|
const getYearsArray = () => {
|
|
11303
11309
|
const currentYear = moment().year();
|
|
11304
11310
|
const previousYear = moment().subtract(1, 'years').year();
|
|
@@ -11454,7 +11460,7 @@ const FilterPanel = props => {
|
|
|
11454
11460
|
const selectedValue = eventRangePicker && typeof eventRangePicker === 'string' ? `${eventRangePicker}` : undefined;
|
|
11455
11461
|
const newFieldsDataState = FieldsDataState?.map(itemField => itemField.name === item.name ? {
|
|
11456
11462
|
...itemField,
|
|
11457
|
-
inputSubType: '
|
|
11463
|
+
inputSubType: 'ytd',
|
|
11458
11464
|
selectedValue: selectedValue ? `${selectedValue}` : undefined
|
|
11459
11465
|
} : itemField);
|
|
11460
11466
|
setFieldsDataState(newFieldsDataState);
|
|
@@ -11463,14 +11469,14 @@ const FilterPanel = props => {
|
|
|
11463
11469
|
changedItem: {
|
|
11464
11470
|
name: item.name,
|
|
11465
11471
|
inputType: item.inputType,
|
|
11466
|
-
inputSubType: '
|
|
11472
|
+
inputSubType: 'ytd',
|
|
11467
11473
|
selectedValue: selectedValue ? `${selectedValue}` : undefined
|
|
11468
11474
|
}
|
|
11469
11475
|
});
|
|
11470
11476
|
},
|
|
11471
11477
|
required: item.required,
|
|
11472
11478
|
placeholder: "Select Date Range ...",
|
|
11473
|
-
selectedValue:
|
|
11479
|
+
selectedValue: getYTDString(),
|
|
11474
11480
|
disabled: true,
|
|
11475
11481
|
width: "100%",
|
|
11476
11482
|
height: "55px"
|
|
@@ -25373,7 +25379,7 @@ const TitleAndValueContainer$3 = styled.div`
|
|
|
25373
25379
|
display: flex;
|
|
25374
25380
|
flex-direction: column;
|
|
25375
25381
|
`;
|
|
25376
|
-
const Title$
|
|
25382
|
+
const Title$e = styled.h4`
|
|
25377
25383
|
font-weight: 400;
|
|
25378
25384
|
font-size: 20px;
|
|
25379
25385
|
margin: 0;
|
|
@@ -25436,7 +25442,7 @@ const FormattedValue$3 = props => {
|
|
|
25436
25442
|
width: width
|
|
25437
25443
|
}, /*#__PURE__*/React$1.createElement(TitleAndValueContainer$3, {
|
|
25438
25444
|
className: "TitleAndValueContainer"
|
|
25439
|
-
}, title ? /*#__PURE__*/React$1.createElement(Title$
|
|
25445
|
+
}, title ? /*#__PURE__*/React$1.createElement(Title$e, {
|
|
25440
25446
|
className: "Title",
|
|
25441
25447
|
width: width
|
|
25442
25448
|
}, title) : '', showTopValue && /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer$1, {
|
|
@@ -25448,7 +25454,7 @@ const FormattedValue$3 = props => {
|
|
|
25448
25454
|
className: "CurrencySignOrPercent"
|
|
25449
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, {
|
|
25450
25456
|
className: "CurrencySignOrPercent"
|
|
25451
|
-
}, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React$1.createElement(Title$
|
|
25457
|
+
}, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React$1.createElement(Title$e, {
|
|
25452
25458
|
className: "Title",
|
|
25453
25459
|
width: width
|
|
25454
25460
|
}, subtitle) : '')));
|
|
@@ -25510,7 +25516,7 @@ const TooltipLabel$3 = styled.div`
|
|
|
25510
25516
|
font-weight: 400;
|
|
25511
25517
|
width: fit-content;
|
|
25512
25518
|
`;
|
|
25513
|
-
const TooltipTitle$
|
|
25519
|
+
const TooltipTitle$4 = styled.div`
|
|
25514
25520
|
color: #212121;
|
|
25515
25521
|
font-size: 14px;
|
|
25516
25522
|
font-weight: 600;
|
|
@@ -25518,7 +25524,7 @@ const TooltipTitle$3 = styled.div`
|
|
|
25518
25524
|
const TitleAndValueContainer$2 = styled.div`
|
|
25519
25525
|
padding: 0 1rem;
|
|
25520
25526
|
`;
|
|
25521
|
-
const Title$
|
|
25527
|
+
const Title$d = styled.h5`
|
|
25522
25528
|
font-weight: 500;
|
|
25523
25529
|
font-size: 18px;
|
|
25524
25530
|
line-height: 20px;
|
|
@@ -25647,7 +25653,7 @@ const TitleAndIconContainer = styled.div`
|
|
|
25647
25653
|
display: flex;
|
|
25648
25654
|
align-items: center;
|
|
25649
25655
|
`;
|
|
25650
|
-
const Title$
|
|
25656
|
+
const Title$c = styled.h4`
|
|
25651
25657
|
font-weight: 400;
|
|
25652
25658
|
font-size: 14px;
|
|
25653
25659
|
line-height: 27px;
|
|
@@ -25701,7 +25707,7 @@ const PerformanceAnalyticsLegend = props => {
|
|
|
25701
25707
|
color: item.iconColor
|
|
25702
25708
|
}) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$2 ? /*#__PURE__*/React$1.createElement(LegendLineIcon, {
|
|
25703
25709
|
color: item.iconColor
|
|
25704
|
-
}) : '', /*#__PURE__*/React$1.createElement(Title$
|
|
25710
|
+
}) : '', /*#__PURE__*/React$1.createElement(Title$c, {
|
|
25705
25711
|
id: "Title",
|
|
25706
25712
|
width: width
|
|
25707
25713
|
}, item.title))))) : '');
|
|
@@ -25799,7 +25805,7 @@ const BarChartsByWeeks = props => {
|
|
|
25799
25805
|
let currentTooltipSecondValue = 0;
|
|
25800
25806
|
if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
|
|
25801
25807
|
if (payload[0].payload?.secondValue) currentTooltipSecondValue = payload[0].payload?.secondValue;
|
|
25802
|
-
return /*#__PURE__*/React$1.createElement(TooltipDiv$3, null, /*#__PURE__*/React$1.createElement(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}
|
|
25803
25809
|
${displayFormattedValue(currentTooltipValue)}
|
|
25804
25810
|
`), currentTooltipSecondValue ? /*#__PURE__*/React$1.createElement(TooltipLabel$3, null, `${tooltipSecondTitle}
|
|
25805
25811
|
${displayFormattedValue(currentTooltipSecondValue)}
|
|
@@ -25856,7 +25862,7 @@ const BarChartsByWeeks = props => {
|
|
|
25856
25862
|
ref: controlsContainerRef
|
|
25857
25863
|
}, /*#__PURE__*/React$1.createElement(Controls$6, {
|
|
25858
25864
|
height: getControlsHeight()
|
|
25859
|
-
}, showTitle && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React$1.createElement(Title$
|
|
25865
|
+
}, showTitle && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React$1.createElement(Title$d, null, title), /*#__PURE__*/React$1.createElement(FormattedValue$3, {
|
|
25860
25866
|
title: headerValueTopTitle,
|
|
25861
25867
|
subtitle: headerValueBottomTitle,
|
|
25862
25868
|
showTopValue: showHeaderTopValue,
|
|
@@ -26089,7 +26095,7 @@ const TitleAndValueContainer$1 = styled.div`
|
|
|
26089
26095
|
flex-direction: column;
|
|
26090
26096
|
padding: 0 1.25em; /* 20px → 1.25em */
|
|
26091
26097
|
`;
|
|
26092
|
-
const Title$
|
|
26098
|
+
const Title$b = styled.h4`
|
|
26093
26099
|
font-weight: 500;
|
|
26094
26100
|
font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
|
|
26095
26101
|
margin: 0;
|
|
@@ -26292,7 +26298,7 @@ const TotalDoughnutChart = props => {
|
|
|
26292
26298
|
width: width
|
|
26293
26299
|
}, !hideTitleAndValue && /*#__PURE__*/React$1.createElement(TitleAndValueContainer$1, {
|
|
26294
26300
|
className: "TitleAndValueContainer"
|
|
26295
|
-
}, /*#__PURE__*/React$1.createElement(Title$
|
|
26301
|
+
}, /*#__PURE__*/React$1.createElement(Title$b, {
|
|
26296
26302
|
className: "Title",
|
|
26297
26303
|
fontSize: titleFontSize
|
|
26298
26304
|
}, title), /*#__PURE__*/React$1.createElement(CurrencySignAndFormattedValueContainer, {
|
|
@@ -26422,7 +26428,7 @@ CustomTooltip.defaultProps = {
|
|
|
26422
26428
|
isPercent: false
|
|
26423
26429
|
};
|
|
26424
26430
|
|
|
26425
|
-
const TooltipContainer$
|
|
26431
|
+
const TooltipContainer$3 = styled.div`
|
|
26426
26432
|
--tooltip-text-color: black;
|
|
26427
26433
|
--tooltip-background-color: white;
|
|
26428
26434
|
--tooltip-margin: 40px;
|
|
@@ -26528,7 +26534,7 @@ const Tooltip = props => {
|
|
|
26528
26534
|
direction,
|
|
26529
26535
|
content
|
|
26530
26536
|
} = props;
|
|
26531
|
-
return /*#__PURE__*/React$1.createElement(TooltipContainer$
|
|
26537
|
+
return /*#__PURE__*/React$1.createElement(TooltipContainer$3, {
|
|
26532
26538
|
className: className,
|
|
26533
26539
|
top: `${top}px`,
|
|
26534
26540
|
left: `${left}px`
|
|
@@ -26614,7 +26620,7 @@ const TotalValue = styled.div`
|
|
|
26614
26620
|
font-size: 20px;
|
|
26615
26621
|
}
|
|
26616
26622
|
`;
|
|
26617
|
-
const Title$
|
|
26623
|
+
const Title$a = styled.h4`
|
|
26618
26624
|
font-size: 18px;
|
|
26619
26625
|
font-weight: 400;
|
|
26620
26626
|
line-height: 1;
|
|
@@ -26771,7 +26777,7 @@ const TotalHorizontalCharts = props => {
|
|
|
26771
26777
|
}, chartsData?.length > 0 ? /*#__PURE__*/React$1.createElement(React$1.Fragment, null, !hideTitle || !hideTotalValue ? /*#__PURE__*/React$1.createElement(CardHeader, {
|
|
26772
26778
|
ref: topHeader,
|
|
26773
26779
|
className: "CardHeader"
|
|
26774
|
-
}, !hideTitle ? /*#__PURE__*/React$1.createElement(Title$
|
|
26780
|
+
}, !hideTitle ? /*#__PURE__*/React$1.createElement(Title$a, null, title) : '', !hideTotalValue ? /*#__PURE__*/React$1.createElement(TotalValue, {
|
|
26775
26781
|
className: "TotalValue"
|
|
26776
26782
|
}, currencySign && /*#__PURE__*/React$1.createElement(CurrencySign, {
|
|
26777
26783
|
className: "CurrencySign"
|
|
@@ -27244,7 +27250,7 @@ const ItemContainer = styled.div`
|
|
|
27244
27250
|
flex-direction: column;
|
|
27245
27251
|
flex-wrap: wrap;
|
|
27246
27252
|
`;
|
|
27247
|
-
const Title$
|
|
27253
|
+
const Title$9 = styled.h4`
|
|
27248
27254
|
font-size: 18px;
|
|
27249
27255
|
font-weight: 500;
|
|
27250
27256
|
margin: 0;
|
|
@@ -27360,7 +27366,7 @@ const SalesAndROI = props => {
|
|
|
27360
27366
|
showBorderShadow: showBorderShadow
|
|
27361
27367
|
}, /*#__PURE__*/React$1.createElement(TitleAndValueContainer, {
|
|
27362
27368
|
id: "TitleAndValueContainer"
|
|
27363
|
-
}, /*#__PURE__*/React$1.createElement(Title$
|
|
27369
|
+
}, /*#__PURE__*/React$1.createElement(Title$9, {
|
|
27364
27370
|
id: "Title"
|
|
27365
27371
|
}, title), showBanner && /*#__PURE__*/React$1.createElement(OutBanner, {
|
|
27366
27372
|
id: "OutBanner",
|
|
@@ -27439,7 +27445,7 @@ const ModalOverlay = styled.div`
|
|
|
27439
27445
|
justify-content: center;
|
|
27440
27446
|
align-items: center;
|
|
27441
27447
|
`;
|
|
27442
|
-
const ModalContent = styled.div`
|
|
27448
|
+
const ModalContent$1 = styled.div`
|
|
27443
27449
|
font-family: "Poppins", sans-serif;
|
|
27444
27450
|
font-weight: 500;
|
|
27445
27451
|
font-size: 18px;
|
|
@@ -27459,7 +27465,7 @@ const TitleContainer$1 = styled.div`
|
|
|
27459
27465
|
margin: 0;
|
|
27460
27466
|
border-bottom: 1px solid #b1b1b1;
|
|
27461
27467
|
`;
|
|
27462
|
-
const Title$
|
|
27468
|
+
const Title$8 = styled.p`
|
|
27463
27469
|
font-weight: 400;
|
|
27464
27470
|
font-size: 24px;
|
|
27465
27471
|
margin: 0;
|
|
@@ -27672,14 +27678,14 @@ const PopupCharts = props => {
|
|
|
27672
27678
|
}, IsPopupChartsOpen && /*#__PURE__*/React$1.createElement(ModalOverlay, {
|
|
27673
27679
|
id: "ModalOverlay",
|
|
27674
27680
|
className: "modal-overlay"
|
|
27675
|
-
}, /*#__PURE__*/React$1.createElement(ModalContent, {
|
|
27681
|
+
}, /*#__PURE__*/React$1.createElement(ModalContent$1, {
|
|
27676
27682
|
id: "ModalContent",
|
|
27677
27683
|
ref: divRef,
|
|
27678
27684
|
className: "modal-content",
|
|
27679
27685
|
height: height,
|
|
27680
27686
|
width: width,
|
|
27681
27687
|
onClick: e => e.stopPropagation()
|
|
27682
|
-
}, /*#__PURE__*/React$1.createElement(TitleContainer$1, null, /*#__PURE__*/React$1.createElement(Title$
|
|
27688
|
+
}, /*#__PURE__*/React$1.createElement(TitleContainer$1, null, /*#__PURE__*/React$1.createElement(Title$8, null, title), /*#__PURE__*/React$1.createElement(CloseXIconContainer, {
|
|
27683
27689
|
onClick: e => closePopupCharts(e)
|
|
27684
27690
|
}, /*#__PURE__*/React$1.createElement(CloseXIcon, null))), /*#__PURE__*/React$1.createElement(ChartsContainer, {
|
|
27685
27691
|
id: "ChartsContainer",
|
|
@@ -27777,7 +27783,7 @@ const TopToggleListMainContainer = styled.div`
|
|
|
27777
27783
|
padding: 0 24px;
|
|
27778
27784
|
width: ${props => props.width};
|
|
27779
27785
|
`;
|
|
27780
|
-
const Title$
|
|
27786
|
+
const Title$7 = styled.h4`
|
|
27781
27787
|
font-size: 14px;
|
|
27782
27788
|
font-weight: 600;
|
|
27783
27789
|
margin: 20px 0 12px;
|
|
@@ -27807,7 +27813,7 @@ const TopToggleList = props => {
|
|
|
27807
27813
|
} = props;
|
|
27808
27814
|
return /*#__PURE__*/React$1.createElement(TopToggleListMainContainer, {
|
|
27809
27815
|
width: width
|
|
27810
|
-
}, /*#__PURE__*/React$1.createElement(Title$
|
|
27816
|
+
}, /*#__PURE__*/React$1.createElement(Title$7, null, title), /*#__PURE__*/React$1.createElement(ListContainer, {
|
|
27811
27817
|
height: height
|
|
27812
27818
|
}, list.map(item => /*#__PURE__*/React$1.createElement(ListItem, {
|
|
27813
27819
|
key: item.value
|
|
@@ -27869,7 +27875,7 @@ const TitleContainer = styled.div`
|
|
|
27869
27875
|
justify-content: flex-start;
|
|
27870
27876
|
margin: 0 0 10px 0;
|
|
27871
27877
|
`;
|
|
27872
|
-
const Title$
|
|
27878
|
+
const Title$6 = styled.h3`
|
|
27873
27879
|
user-select: none;
|
|
27874
27880
|
text-align: left;
|
|
27875
27881
|
margin: 0;
|
|
@@ -27914,7 +27920,7 @@ const BarLabel = styled.span`
|
|
|
27914
27920
|
font-weight: 400;
|
|
27915
27921
|
user-select: none;
|
|
27916
27922
|
`;
|
|
27917
|
-
const TooltipContainer$
|
|
27923
|
+
const TooltipContainer$2 = styled.div`
|
|
27918
27924
|
position: absolute;
|
|
27919
27925
|
|
|
27920
27926
|
top: ${props => props.top};
|
|
@@ -28024,7 +28030,7 @@ const Heatmap = props => {
|
|
|
28024
28030
|
if (tooltip && tooltipPosition && tooltip.label === `${item.label} - ${Math.round(item.value / totalValue * 100)}%`) {
|
|
28025
28031
|
const top = `${tooltipPosition.y}px`;
|
|
28026
28032
|
const left = `${tooltipPosition.x}px`;
|
|
28027
|
-
return /*#__PURE__*/React$1.createElement(TooltipContainer$
|
|
28033
|
+
return /*#__PURE__*/React$1.createElement(TooltipContainer$2, {
|
|
28028
28034
|
className: "TooltipContainer",
|
|
28029
28035
|
top: top,
|
|
28030
28036
|
left: left
|
|
@@ -28144,7 +28150,7 @@ const Heatmap = props => {
|
|
|
28144
28150
|
className: "HeatmapWrapper"
|
|
28145
28151
|
}, /*#__PURE__*/React$1.createElement(TitleContainer, {
|
|
28146
28152
|
className: "TitleContainer"
|
|
28147
|
-
}, /*#__PURE__*/React$1.createElement(Title$
|
|
28153
|
+
}, /*#__PURE__*/React$1.createElement(Title$6, {
|
|
28148
28154
|
className: "Title"
|
|
28149
28155
|
}, title)), refreshRequired && renderBars(), !refreshRequired && renderBars(), renderLegend()));
|
|
28150
28156
|
};
|
|
@@ -28558,12 +28564,12 @@ const TooltipLabel$1 = styled.div`
|
|
|
28558
28564
|
font-weight: 400;
|
|
28559
28565
|
width: fit-content;
|
|
28560
28566
|
`;
|
|
28561
|
-
const TooltipTitle$
|
|
28567
|
+
const TooltipTitle$3 = styled.div`
|
|
28562
28568
|
color: #212121;
|
|
28563
28569
|
font-size: 14px;
|
|
28564
28570
|
font-weight: 600;
|
|
28565
28571
|
`;
|
|
28566
|
-
const Title$
|
|
28572
|
+
const Title$5 = styled.h5`
|
|
28567
28573
|
font-weight: 500;
|
|
28568
28574
|
font-size: 18px;
|
|
28569
28575
|
line-height: 20px;
|
|
@@ -28640,7 +28646,7 @@ const BarChart = props => {
|
|
|
28640
28646
|
if (!active || !payload || payload?.length === 0) return null;
|
|
28641
28647
|
let currentTooltipValue = 0;
|
|
28642
28648
|
if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
|
|
28643
|
-
return /*#__PURE__*/React$1.createElement(TooltipDiv$1, null, /*#__PURE__*/React$1.createElement(TooltipTitle$
|
|
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)}`));
|
|
28644
28650
|
};
|
|
28645
28651
|
const CustomizedTickBarChart = props => {
|
|
28646
28652
|
const {
|
|
@@ -28723,7 +28729,7 @@ const BarChart = props => {
|
|
|
28723
28729
|
height: height,
|
|
28724
28730
|
width: width,
|
|
28725
28731
|
ref: controlsContainerRef
|
|
28726
|
-
}, /*#__PURE__*/React$1.createElement(Controls$3, null, /*#__PURE__*/React$1.createElement(Title$
|
|
28732
|
+
}, /*#__PURE__*/React$1.createElement(Controls$3, null, /*#__PURE__*/React$1.createElement(Title$5, null, title), /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
|
|
28727
28733
|
width: "100%",
|
|
28728
28734
|
height: 400
|
|
28729
28735
|
}, /*#__PURE__*/React$1.createElement(BarChart$1, {
|
|
@@ -28894,7 +28900,7 @@ const Controls$2 = styled.div`
|
|
|
28894
28900
|
flex-direction: column;
|
|
28895
28901
|
background-color: white;
|
|
28896
28902
|
`;
|
|
28897
|
-
const Title$
|
|
28903
|
+
const Title$4 = styled.h5`
|
|
28898
28904
|
font-size: 18px;
|
|
28899
28905
|
font-weight: 400;
|
|
28900
28906
|
margin: 0 0 30px;
|
|
@@ -28927,7 +28933,7 @@ const TooltipLabel = styled.div`
|
|
|
28927
28933
|
font-weight: 400;
|
|
28928
28934
|
width: fit-content;
|
|
28929
28935
|
`;
|
|
28930
|
-
const TooltipTitle$
|
|
28936
|
+
const TooltipTitle$2 = styled.div`
|
|
28931
28937
|
color: #212121;
|
|
28932
28938
|
font-size: 14px;
|
|
28933
28939
|
font-weight: 600;
|
|
@@ -29080,7 +29086,7 @@ const DoubleBarSingleLine = props => {
|
|
|
29080
29086
|
} else {
|
|
29081
29087
|
`${currentTooltipValue.toFixed(1)}`;
|
|
29082
29088
|
}
|
|
29083
|
-
return /*#__PURE__*/React$1.createElement(TooltipDiv, null, /*#__PURE__*/React$1.createElement(TooltipTitle$
|
|
29089
|
+
return /*#__PURE__*/React$1.createElement(TooltipDiv, null, /*#__PURE__*/React$1.createElement(TooltipTitle$2, null, `${label}`), payload.map((item, idx) => {
|
|
29084
29090
|
const dataStateItem = dataState.find(state => state.key === item.dataKey);
|
|
29085
29091
|
return /*#__PURE__*/React$1.createElement(TooltipLabel, {
|
|
29086
29092
|
key: item.dataKey || idx
|
|
@@ -29153,7 +29159,7 @@ const DoubleBarSingleLine = props => {
|
|
|
29153
29159
|
noDataText: noDataText
|
|
29154
29160
|
}) : /*#__PURE__*/React$1.createElement(Controls$2, {
|
|
29155
29161
|
className: "Controls"
|
|
29156
|
-
}, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$
|
|
29162
|
+
}, title && title.trim() !== '' && /*#__PURE__*/React$1.createElement(Title$4, null, title), /*#__PURE__*/React$1.createElement(ChartsWrapper, {
|
|
29157
29163
|
width: hasScroll ? `${data.length * 178}px` : 'auto'
|
|
29158
29164
|
}, /*#__PURE__*/React$1.createElement(LineChartWrapper, null, /*#__PURE__*/React$1.createElement(ResponsiveContainer, null, /*#__PURE__*/React$1.createElement(LineChart, _extends({
|
|
29159
29165
|
data: transformedData
|
|
@@ -29252,7 +29258,7 @@ const CheckboxGroupContainer = styled.div`
|
|
|
29252
29258
|
height: 21px;
|
|
29253
29259
|
gap: 20px;
|
|
29254
29260
|
`;
|
|
29255
|
-
const Title$
|
|
29261
|
+
const Title$3 = styled.h5`
|
|
29256
29262
|
font-weight: 500;
|
|
29257
29263
|
font-size: 18px;
|
|
29258
29264
|
line-height: 20px;
|
|
@@ -29272,7 +29278,7 @@ const LegendIcon = styled.div`
|
|
|
29272
29278
|
margin-right: 5px;
|
|
29273
29279
|
background-color: ${props => props.color};
|
|
29274
29280
|
`;
|
|
29275
|
-
const TooltipContainer = styled.div`
|
|
29281
|
+
const TooltipContainer$1 = styled.div`
|
|
29276
29282
|
background: white;
|
|
29277
29283
|
padding: 10px;
|
|
29278
29284
|
border-radius: 5px;
|
|
@@ -29282,12 +29288,12 @@ const TooltipContainer = styled.div`
|
|
|
29282
29288
|
font-weight: 500;
|
|
29283
29289
|
font-size: 14px;
|
|
29284
29290
|
`;
|
|
29285
|
-
const TooltipTitle = styled.p`
|
|
29291
|
+
const TooltipTitle$1 = styled.p`
|
|
29286
29292
|
font-weight: 700;
|
|
29287
29293
|
margin-top: 5px;
|
|
29288
29294
|
margin-bottom: 5px;
|
|
29289
29295
|
`;
|
|
29290
|
-
const TooltipText = styled.p`
|
|
29296
|
+
const TooltipText$1 = styled.p`
|
|
29291
29297
|
margin-top: 5px;
|
|
29292
29298
|
margin-bottom: 5px;
|
|
29293
29299
|
`;
|
|
@@ -29528,10 +29534,10 @@ const AreaChart = props => {
|
|
|
29528
29534
|
payload
|
|
29529
29535
|
} = _ref3;
|
|
29530
29536
|
if (active && payload && payload.length) {
|
|
29531
|
-
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) => {
|
|
29532
29538
|
const chart = areaChartsState.find(chart => chart.key === data.dataKey);
|
|
29533
29539
|
if (chart) {
|
|
29534
|
-
return /*#__PURE__*/React$1.createElement(TooltipText, {
|
|
29540
|
+
return /*#__PURE__*/React$1.createElement(TooltipText$1, {
|
|
29535
29541
|
key: index
|
|
29536
29542
|
}, `${chart.name}: ${displayFormattedValue(data.value, chart.isDollar)}`);
|
|
29537
29543
|
}
|
|
@@ -29580,7 +29586,7 @@ const AreaChart = props => {
|
|
|
29580
29586
|
height: height
|
|
29581
29587
|
}) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(HeaderContainer$2, {
|
|
29582
29588
|
"data-testid": "header-container"
|
|
29583
|
-
}, /*#__PURE__*/React$1.createElement(Title$
|
|
29589
|
+
}, /*#__PURE__*/React$1.createElement(Title$3, {
|
|
29584
29590
|
"data-testid": "title"
|
|
29585
29591
|
}, title), /*#__PURE__*/React$1.createElement(CheckboxGroupContainer, {
|
|
29586
29592
|
"data-testid": "checkbox-group-container"
|
|
@@ -30078,7 +30084,7 @@ const HeaderContainer$1 = styled.div`
|
|
|
30078
30084
|
align-items: center;
|
|
30079
30085
|
padding-bottom: 8px;
|
|
30080
30086
|
`;
|
|
30081
|
-
const Title = styled.h3`
|
|
30087
|
+
const Title$2 = styled.h3`
|
|
30082
30088
|
font-size: 18px;
|
|
30083
30089
|
font-weight: 400;
|
|
30084
30090
|
margin: 0;
|
|
@@ -30147,7 +30153,7 @@ const BreakdownPanel = props => {
|
|
|
30147
30153
|
height: height
|
|
30148
30154
|
}) : /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement(HeaderContainer$1, {
|
|
30149
30155
|
"data-testid": "header-container"
|
|
30150
|
-
}, /*#__PURE__*/React$1.createElement(Title, {
|
|
30156
|
+
}, /*#__PURE__*/React$1.createElement(Title$2, {
|
|
30151
30157
|
"data-testid": "title"
|
|
30152
30158
|
}, title)), /*#__PURE__*/React$1.createElement(CategorySalesMainContainer, {
|
|
30153
30159
|
"data-testid": "category-sales-main-container"
|
|
@@ -31389,42 +31395,29 @@ const BatteryChart = props => {
|
|
|
31389
31395
|
}))))))), starText !== "" && /*#__PURE__*/React$1.createElement(StarText, null, starText));
|
|
31390
31396
|
};
|
|
31391
31397
|
|
|
31392
|
-
// const originalData = [
|
|
31393
|
-
// { label: "Vendor Selling Event: Week 34", inc_sales: 20000, inc_roi: 1.2 },
|
|
31394
|
-
// { label: "Vendor Selling Event: Week 36", inc_sales: 10000, inc_roi: 1.2 },
|
|
31395
|
-
// { label: "Vendor Selling Event: Week 38", inc_sales: 8000, inc_roi: 0.8 },
|
|
31396
|
-
// { label: "Vendor Selling Event: Week 33", inc_sales: 12000, inc_roi: 1.1 },
|
|
31397
|
-
// { label: "Vendor Selling Event: Week 29", inc_sales: 8000, inc_roi: 1.2 },
|
|
31398
|
-
// { label: "Vendor Selling Event: Week 28", inc_sales: 8000, inc_roi: 0.7 },
|
|
31399
|
-
// { label: "Vendor Selling Event: Week 35", inc_sales: 8000, inc_roi: 0.8 },
|
|
31400
|
-
// { label: "Vendor Selling Event: Week 30", inc_sales: 9000, inc_roi: 1.1 },
|
|
31401
|
-
// ];
|
|
31402
|
-
|
|
31403
31398
|
const SeparatedLineBarChart = ({
|
|
31404
|
-
barlineData
|
|
31399
|
+
barlineData = []
|
|
31405
31400
|
}) => {
|
|
31406
|
-
|
|
31407
|
-
|
|
31408
|
-
|
|
31409
|
-
|
|
31410
|
-
return
|
|
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
|
+
};
|
|
31411
31410
|
});
|
|
31412
|
-
|
|
31413
|
-
|
|
31414
|
-
|
|
31415
|
-
|
|
31416
|
-
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
payload
|
|
31421
|
-
viewableIndices
|
|
31422
|
-
}) => {
|
|
31423
|
-
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;
|
|
31424
31420
|
const parts = label.replace("Vendor Selling Event: ", "").split(" ");
|
|
31425
|
-
if (!viewableIndices.includes(payload.value)) {
|
|
31426
|
-
return null;
|
|
31427
|
-
}
|
|
31428
31421
|
return /*#__PURE__*/React$1.createElement("g", {
|
|
31429
31422
|
transform: `translate(${x},${y})`
|
|
31430
31423
|
}, /*#__PURE__*/React$1.createElement("text", {
|
|
@@ -31434,7 +31427,7 @@ const SeparatedLineBarChart = ({
|
|
|
31434
31427
|
textAnchor: "middle",
|
|
31435
31428
|
fill: "#212121",
|
|
31436
31429
|
fontSize: 11,
|
|
31437
|
-
fontWeight:
|
|
31430
|
+
fontWeight: 400,
|
|
31438
31431
|
fontFamily: "Poppins"
|
|
31439
31432
|
}, /*#__PURE__*/React$1.createElement("tspan", {
|
|
31440
31433
|
x: 0,
|
|
@@ -31444,51 +31437,57 @@ const SeparatedLineBarChart = ({
|
|
|
31444
31437
|
dy: 18
|
|
31445
31438
|
}, "Event: ", parts.join(" "))));
|
|
31446
31439
|
};
|
|
31447
|
-
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
|
|
31451
|
-
|
|
31452
|
-
|
|
31453
|
-
|
|
31454
|
-
|
|
31455
|
-
|
|
31456
|
-
|
|
31457
|
-
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
|
|
31461
|
-
|
|
31462
|
-
|
|
31463
|
-
|
|
31464
|
-
|
|
31465
|
-
|
|
31466
|
-
}
|
|
31467
|
-
|
|
31468
|
-
|
|
31469
|
-
|
|
31470
|
-
|
|
31471
|
-
|
|
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)));
|
|
31472
31478
|
};
|
|
31479
|
+
|
|
31480
|
+
// Chart margins (same as in both examples)
|
|
31473
31481
|
const chartMargins = {
|
|
31474
|
-
top:
|
|
31475
|
-
right:
|
|
31482
|
+
top: 30,
|
|
31483
|
+
right: 30,
|
|
31476
31484
|
left: 20,
|
|
31477
|
-
bottom:
|
|
31485
|
+
bottom: 60
|
|
31478
31486
|
};
|
|
31479
|
-
const [viewWindow, setViewWindow] = useState({
|
|
31480
|
-
startIndex: 0,
|
|
31481
|
-
endIndex: dataWithIndex.length - 1
|
|
31482
|
-
});
|
|
31483
|
-
const viewableIndices = [];
|
|
31484
|
-
for (let i = viewWindow.startIndex; i <= viewWindow.endIndex; i++) {
|
|
31485
|
-
viewableIndices.push(i);
|
|
31486
|
-
}
|
|
31487
|
-
dataWithIndex.filter(item => viewableIndices.includes(item.index));
|
|
31488
31487
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
31489
31488
|
style: {
|
|
31490
31489
|
width: "100%",
|
|
31491
|
-
height:
|
|
31490
|
+
height: "700px"
|
|
31492
31491
|
}
|
|
31493
31492
|
}, /*#__PURE__*/React$1.createElement("div", {
|
|
31494
31493
|
style: {
|
|
@@ -31498,24 +31497,21 @@ const SeparatedLineBarChart = ({
|
|
|
31498
31497
|
width: "100%",
|
|
31499
31498
|
height: "100%"
|
|
31500
31499
|
}, /*#__PURE__*/React$1.createElement(LineChart, {
|
|
31501
|
-
data:
|
|
31500
|
+
data: processedData,
|
|
31502
31501
|
margin: chartMargins
|
|
31503
31502
|
}, /*#__PURE__*/React$1.createElement(CartesianGrid, {
|
|
31504
31503
|
strokeDasharray: "3 3",
|
|
31505
31504
|
vertical: false
|
|
31506
31505
|
}), /*#__PURE__*/React$1.createElement(XAxis, {
|
|
31507
|
-
dataKey: "
|
|
31508
|
-
|
|
31509
|
-
domain: ['dataMin', 'dataMax'],
|
|
31510
|
-
padding: {
|
|
31511
|
-
left: 20,
|
|
31512
|
-
right: 20
|
|
31513
|
-
},
|
|
31506
|
+
dataKey: "label",
|
|
31507
|
+
tick: false,
|
|
31514
31508
|
hide: true
|
|
31515
31509
|
}), /*#__PURE__*/React$1.createElement(YAxis, {
|
|
31516
31510
|
domain: [0, 2],
|
|
31517
31511
|
hide: true
|
|
31518
|
-
}), /*#__PURE__*/React$1.createElement(Tooltip$2,
|
|
31512
|
+
}), /*#__PURE__*/React$1.createElement(Tooltip$2, {
|
|
31513
|
+
content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
|
|
31514
|
+
}), /*#__PURE__*/React$1.createElement(Line, {
|
|
31519
31515
|
type: "monotone",
|
|
31520
31516
|
dataKey: "inc_roi",
|
|
31521
31517
|
stroke: "#F8CD00",
|
|
@@ -31526,11 +31522,14 @@ const SeparatedLineBarChart = ({
|
|
|
31526
31522
|
},
|
|
31527
31523
|
activeDot: false,
|
|
31528
31524
|
name: "INC Sales ROI"
|
|
31529
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
31525
|
+
}, /*#__PURE__*/React$1.createElement(LabelList, {
|
|
31530
31526
|
dataKey: "inc_roi",
|
|
31531
31527
|
position: "top",
|
|
31532
31528
|
formatter: value => value.toFixed(1),
|
|
31533
|
-
|
|
31529
|
+
fill: "#212121",
|
|
31530
|
+
fontSize: 12,
|
|
31531
|
+
fontWeight: "400",
|
|
31532
|
+
fontFamily: "Poppins"
|
|
31534
31533
|
}))))), /*#__PURE__*/React$1.createElement("div", {
|
|
31535
31534
|
style: {
|
|
31536
31535
|
height: "60%"
|
|
@@ -31539,59 +31538,48 @@ const SeparatedLineBarChart = ({
|
|
|
31539
31538
|
width: "100%",
|
|
31540
31539
|
height: "100%"
|
|
31541
31540
|
}, /*#__PURE__*/React$1.createElement(ComposedChart, {
|
|
31542
|
-
data:
|
|
31541
|
+
data: processedData,
|
|
31543
31542
|
margin: chartMargins
|
|
31544
31543
|
}, /*#__PURE__*/React$1.createElement(CartesianGrid, {
|
|
31545
31544
|
strokeDasharray: "3 3",
|
|
31546
31545
|
vertical: false
|
|
31547
31546
|
}), /*#__PURE__*/React$1.createElement(XAxis, {
|
|
31548
|
-
dataKey: "
|
|
31549
|
-
|
|
31550
|
-
domain: ['dataMin', 'dataMax'],
|
|
31551
|
-
padding: {
|
|
31552
|
-
left: 20,
|
|
31553
|
-
right: 20
|
|
31554
|
-
},
|
|
31555
|
-
tick: props => /*#__PURE__*/React$1.createElement(CustomizedTick, _extends({}, props, {
|
|
31556
|
-
viewableIndices: viewableIndices
|
|
31557
|
-
})),
|
|
31547
|
+
dataKey: "label",
|
|
31548
|
+
tick: /*#__PURE__*/React$1.createElement(CustomizedTick, null),
|
|
31558
31549
|
interval: 0,
|
|
31559
31550
|
height: 60,
|
|
31560
|
-
tickLine: false
|
|
31561
|
-
ticks: dataWithIndex.map(item => item.index)
|
|
31551
|
+
tickLine: false
|
|
31562
31552
|
}), /*#__PURE__*/React$1.createElement(YAxis, {
|
|
31563
31553
|
tickFormatter: v => `${v / 1000}k`,
|
|
31564
31554
|
hide: true
|
|
31565
|
-
}), /*#__PURE__*/React$1.createElement(Tooltip$2,
|
|
31555
|
+
}), /*#__PURE__*/React$1.createElement(Tooltip$2, {
|
|
31556
|
+
content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
|
|
31557
|
+
}), /*#__PURE__*/React$1.createElement(Bar, {
|
|
31566
31558
|
dataKey: "inc_sales",
|
|
31567
31559
|
fill: "#CCDCDD",
|
|
31568
|
-
gap:
|
|
31560
|
+
gap: 4,
|
|
31569
31561
|
borderRadius: [4, 4, 0, 8],
|
|
31570
31562
|
barSize: 40,
|
|
31571
31563
|
name: "INC Sales"
|
|
31572
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
31564
|
+
}, /*#__PURE__*/React$1.createElement(LabelList, {
|
|
31573
31565
|
dataKey: "inc_sales",
|
|
31574
31566
|
position: "top",
|
|
31575
31567
|
formatter: value => `${value / 1000}k`,
|
|
31576
|
-
|
|
31568
|
+
fill: "#212121",
|
|
31569
|
+
fontSize: 12,
|
|
31570
|
+
fontWeight: "400",
|
|
31571
|
+
fontFamily: "Poppins"
|
|
31577
31572
|
})), /*#__PURE__*/React$1.createElement(Brush, {
|
|
31578
|
-
dataKey: "
|
|
31573
|
+
dataKey: "label",
|
|
31579
31574
|
height: 30,
|
|
31580
31575
|
stroke: "#212121",
|
|
31581
|
-
startIndex:
|
|
31582
|
-
endIndex:
|
|
31583
|
-
onChange:
|
|
31584
|
-
|
|
31585
|
-
|
|
31586
|
-
|
|
31587
|
-
|
|
31588
|
-
},
|
|
31589
|
-
travellerWidth: 12
|
|
31590
|
-
})), /*#__PURE__*/React$1.createElement("div", {
|
|
31591
|
-
style: {
|
|
31592
|
-
marginTop: "-28px"
|
|
31593
|
-
}
|
|
31594
|
-
}, /*#__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, {
|
|
31595
31583
|
legendData: [{
|
|
31596
31584
|
iconColor: "#CCDCDD",
|
|
31597
31585
|
iconType: "Square",
|
|
@@ -31605,7 +31593,9 @@ const SeparatedLineBarChart = ({
|
|
|
31605
31593
|
};
|
|
31606
31594
|
|
|
31607
31595
|
function SingleChart({
|
|
31608
|
-
lineChartData
|
|
31596
|
+
lineChartData,
|
|
31597
|
+
height = 450,
|
|
31598
|
+
width = "100%"
|
|
31609
31599
|
}) {
|
|
31610
31600
|
const dataWithIndex = lineChartData?.map((item, index) => ({
|
|
31611
31601
|
...item,
|
|
@@ -31638,20 +31628,15 @@ function SingleChart({
|
|
|
31638
31628
|
dy: 18
|
|
31639
31629
|
}, "Event: ", parts.join(" "))));
|
|
31640
31630
|
};
|
|
31641
|
-
|
|
31642
|
-
|
|
31631
|
+
useState(0);
|
|
31632
|
+
useState(dataWithIndex?.length - 1);
|
|
31643
31633
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
31644
31634
|
style: {
|
|
31645
|
-
width: "100%"
|
|
31646
|
-
height: 600
|
|
31647
|
-
}
|
|
31648
|
-
}, /*#__PURE__*/React$1.createElement("div", {
|
|
31649
|
-
style: {
|
|
31650
|
-
height: "100%"
|
|
31635
|
+
width: "100%"
|
|
31651
31636
|
}
|
|
31652
31637
|
}, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
|
|
31653
|
-
width:
|
|
31654
|
-
height:
|
|
31638
|
+
width: width,
|
|
31639
|
+
height: height
|
|
31655
31640
|
}, /*#__PURE__*/React$1.createElement(ComposedChart, {
|
|
31656
31641
|
data: dataWithIndex,
|
|
31657
31642
|
margin: {
|
|
@@ -31692,23 +31677,18 @@ function SingleChart({
|
|
|
31692
31677
|
fontWeight: "400",
|
|
31693
31678
|
fontFamily: "Poppins"
|
|
31694
31679
|
})), /*#__PURE__*/React$1.createElement(Brush, {
|
|
31695
|
-
dataKey: "index",
|
|
31696
31680
|
height: 30,
|
|
31697
|
-
|
|
31698
|
-
startIndex:
|
|
31699
|
-
endIndex:
|
|
31700
|
-
|
|
31701
|
-
setStartIndex(e.startIndex ?? 0);
|
|
31702
|
-
setEndIndex(e.endIndex ?? dataWithIndex?.length - 1);
|
|
31703
|
-
},
|
|
31704
|
-
travellerWidth: 12
|
|
31681
|
+
travellerWidth: 10,
|
|
31682
|
+
startIndex: 0,
|
|
31683
|
+
endIndex: 5,
|
|
31684
|
+
y: 380
|
|
31705
31685
|
})), /*#__PURE__*/React$1.createElement(PerformanceAnalyticsLegend, {
|
|
31706
31686
|
legendData: [{
|
|
31707
31687
|
iconColor: "#CCDCDD",
|
|
31708
31688
|
iconType: "Square",
|
|
31709
31689
|
title: "INC Units"
|
|
31710
31690
|
}]
|
|
31711
|
-
})))
|
|
31691
|
+
})));
|
|
31712
31692
|
}
|
|
31713
31693
|
|
|
31714
31694
|
styled.div`
|
|
@@ -31938,6 +31918,65 @@ SegmentedButton.defaultProps = {
|
|
|
31938
31918
|
onClick: () => {}
|
|
31939
31919
|
};
|
|
31940
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
|
+
|
|
31941
31980
|
function InnerBarChart({
|
|
31942
31981
|
data
|
|
31943
31982
|
}) {
|
|
@@ -32002,9 +32041,8 @@ function InnerBarChart({
|
|
|
32002
32041
|
}) => {
|
|
32003
32042
|
if (!active || !payload || !payload.length) return null;
|
|
32004
32043
|
const data = payload[0].payload;
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
}, /*#__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}%`));
|
|
32008
32046
|
};
|
|
32009
32047
|
const CustomizedTick = props => {
|
|
32010
32048
|
const {
|
|
@@ -32036,9 +32074,7 @@ function InnerBarChart({
|
|
|
32036
32074
|
};
|
|
32037
32075
|
return /*#__PURE__*/React$1.createElement("div", {
|
|
32038
32076
|
className: "w-full"
|
|
32039
|
-
}, /*#__PURE__*/React$1.createElement(
|
|
32040
|
-
className: "text-lg font-medium mb-4 text-center"
|
|
32041
|
-
}, "Vendor Selling Events Comparison"), /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
|
|
32077
|
+
}, /*#__PURE__*/React$1.createElement(ResponsiveContainer, {
|
|
32042
32078
|
width: "100%",
|
|
32043
32079
|
height: 450
|
|
32044
32080
|
}, /*#__PURE__*/React$1.createElement(BarChart$1, {
|
|
@@ -32060,7 +32096,8 @@ function InnerBarChart({
|
|
|
32060
32096
|
}), /*#__PURE__*/React$1.createElement(YAxis, {
|
|
32061
32097
|
type: "number",
|
|
32062
32098
|
domain: [0, "dataMax + 2000"],
|
|
32063
|
-
tickFormatter: format
|
|
32099
|
+
tickFormatter: format,
|
|
32100
|
+
hide: true
|
|
32064
32101
|
}), /*#__PURE__*/React$1.createElement(Tooltip$2, {
|
|
32065
32102
|
content: /*#__PURE__*/React$1.createElement(CustomTooltip, null)
|
|
32066
32103
|
}), /*#__PURE__*/React$1.createElement(Brush, {
|
|
@@ -32076,51 +32113,22 @@ function InnerBarChart({
|
|
|
32076
32113
|
}))));
|
|
32077
32114
|
}
|
|
32078
32115
|
|
|
32079
|
-
const Container = styled.div`
|
|
32080
|
-
width: ${props => props.width};
|
|
32081
|
-
height: ${props => props.height};
|
|
32082
|
-
padding: 15px;
|
|
32083
|
-
display: flex;
|
|
32084
|
-
flex-direction: column;
|
|
32085
|
-
#Segment {
|
|
32086
|
-
width: auto;
|
|
32087
|
-
white-space: nowrap;
|
|
32088
|
-
font-size: 14px;
|
|
32089
|
-
font-weight: 500;
|
|
32090
|
-
font-family: "Poppins"
|
|
32091
|
-
}
|
|
32092
|
-
`;
|
|
32093
|
-
styled.div`
|
|
32094
|
-
font-family: sans-serif;
|
|
32095
|
-
text-align: center;
|
|
32096
|
-
`;
|
|
32097
|
-
styled.div`
|
|
32098
|
-
height: 25%;
|
|
32099
|
-
`;
|
|
32100
|
-
styled.div`
|
|
32101
|
-
height: 75%;
|
|
32102
|
-
`;
|
|
32103
|
-
styled.div`
|
|
32104
|
-
height: 100%;
|
|
32105
|
-
display: flex;
|
|
32106
|
-
flex-direction: column;
|
|
32107
|
-
background-color: white;
|
|
32108
|
-
`;
|
|
32109
|
-
|
|
32110
32116
|
const BrushChart = props => {
|
|
32111
32117
|
const {
|
|
32112
32118
|
width,
|
|
32113
32119
|
height,
|
|
32114
32120
|
data,
|
|
32115
32121
|
barlineData,
|
|
32116
|
-
lineChartData
|
|
32122
|
+
lineChartData,
|
|
32123
|
+
linearData,
|
|
32124
|
+
title
|
|
32117
32125
|
} = props;
|
|
32118
32126
|
const segmentedbuttonOptions = ["New Shoppers & Repeaters", "INC Sales & ROI", "INC Units", "Basket Lift"];
|
|
32119
32127
|
const [selectedOption, setSelectedOption] = useState(segmentedbuttonOptions[0]);
|
|
32120
32128
|
return /*#__PURE__*/React$1.createElement(Container, {
|
|
32121
32129
|
height: height,
|
|
32122
32130
|
width: width
|
|
32123
|
-
}, /*#__PURE__*/React$1.createElement(SegmentedButton, {
|
|
32131
|
+
}, /*#__PURE__*/React$1.createElement(Title$1, null, title), /*#__PURE__*/React$1.createElement(SegmentedButton, {
|
|
32124
32132
|
gap: "8px",
|
|
32125
32133
|
options: segmentedbuttonOptions.map(value => ({
|
|
32126
32134
|
value
|
|
@@ -32138,9 +32146,301 @@ const BrushChart = props => {
|
|
|
32138
32146
|
}), selectedOption === "INC Units" && /*#__PURE__*/React$1.createElement(SingleChart, {
|
|
32139
32147
|
lineChartData: lineChartData
|
|
32140
32148
|
}), selectedOption === "Basket Lift" && /*#__PURE__*/React$1.createElement(SingleChart, {
|
|
32141
|
-
lineChartData:
|
|
32149
|
+
lineChartData: linearData
|
|
32142
32150
|
}));
|
|
32143
32151
|
};
|
|
32144
32152
|
|
|
32145
|
-
|
|
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 };
|
|
32146
32446
|
//# sourceMappingURL=index.esm.js.map
|