sag_components 2.0.0-beta66 → 2.0.0-beta68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +439 -396
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +439 -396
- 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 +2 -2
- package/dist/types/components/BrushChart/Charts/InnerBar.d.ts +2 -2
- package/dist/types/components/BrushChart/Charts/SingleChart.d.ts +4 -2
- package/package.json +6 -3
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$
|
|
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$
|
|
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;
|
|
@@ -2104,7 +2104,7 @@ const TooltipTip$1 = styled__default["default"].div`
|
|
|
2104
2104
|
font-size: 12px;
|
|
2105
2105
|
font-family: sans-serif;
|
|
2106
2106
|
line-height: 1;
|
|
2107
|
-
z-index:
|
|
2107
|
+
z-index: 99999;
|
|
2108
2108
|
white-space: nowrap;
|
|
2109
2109
|
|
|
2110
2110
|
/* CSS border triangles */
|
|
@@ -2120,7 +2120,6 @@ const TooltipTip$1 = styled__default["default"].div`
|
|
|
2120
2120
|
margin-left: calc(var(--tooltip-arrow-size) * -1);
|
|
2121
2121
|
}
|
|
2122
2122
|
|
|
2123
|
-
/* Absolute positioning */
|
|
2124
2123
|
&.controls.top {
|
|
2125
2124
|
top: calc(var(--tooltip-margin) * ${props => props.topFactor || -1.8} );
|
|
2126
2125
|
}
|
|
@@ -2131,7 +2130,6 @@ const TooltipTip$1 = styled__default["default"].div`
|
|
|
2131
2130
|
border-top-color: var(--tooltip-background-color);
|
|
2132
2131
|
}
|
|
2133
2132
|
|
|
2134
|
-
/* Absolute positioning */
|
|
2135
2133
|
&.controls.right {
|
|
2136
2134
|
left: calc(70% + var(--tooltip-margin));
|
|
2137
2135
|
top: 50%;
|
|
@@ -2146,7 +2144,6 @@ const TooltipTip$1 = styled__default["default"].div`
|
|
|
2146
2144
|
border-right-color: var(--tooltip-background-color);
|
|
2147
2145
|
}
|
|
2148
2146
|
|
|
2149
|
-
/* Absolute positioning */
|
|
2150
2147
|
&.controls.bottom {
|
|
2151
2148
|
bottom: calc(var(--tooltip-margin) * -1);
|
|
2152
2149
|
}
|
|
@@ -2156,7 +2153,6 @@ const TooltipTip$1 = styled__default["default"].div`
|
|
|
2156
2153
|
border-bottom-color: var(--tooltip-background-color);
|
|
2157
2154
|
}
|
|
2158
2155
|
|
|
2159
|
-
/* Absolute positioning */
|
|
2160
2156
|
&.controls.left {
|
|
2161
2157
|
left: auto;
|
|
2162
2158
|
right: calc(70% + var(--tooltip-margin));
|
|
@@ -2192,7 +2188,7 @@ const Tooltip$1 = props => {
|
|
|
2192
2188
|
clearInterval(timeout);
|
|
2193
2189
|
setActive(false);
|
|
2194
2190
|
};
|
|
2195
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$
|
|
2191
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$4, null, /*#__PURE__*/React__default["default"].createElement(TooltipWrapper$2, {
|
|
2196
2192
|
onMouseEnter: showTip,
|
|
2197
2193
|
onMouseLeave: hideTip
|
|
2198
2194
|
}, children, active && /*#__PURE__*/React__default["default"].createElement(TooltipTip$1, {
|
|
@@ -2423,7 +2419,7 @@ const PieChart = props => {
|
|
|
2423
2419
|
width: width
|
|
2424
2420
|
}, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$4, {
|
|
2425
2421
|
className: "TitleAndValueContainer"
|
|
2426
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
2422
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$f, {
|
|
2427
2423
|
className: "Title"
|
|
2428
2424
|
}, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$2, {
|
|
2429
2425
|
className: "CurrencySignAndFormattedValueContainer"
|
|
@@ -9494,70 +9490,67 @@ const DropdownMain = styled__default["default"].div`
|
|
|
9494
9490
|
`;
|
|
9495
9491
|
|
|
9496
9492
|
/* eslint-disable react/prop-types */
|
|
9497
|
-
const DropdownNew =
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
elementType: elementType
|
|
9559
|
-
}));
|
|
9560
|
-
};
|
|
9493
|
+
const DropdownNew = ({
|
|
9494
|
+
isMulti,
|
|
9495
|
+
label,
|
|
9496
|
+
labelEmptyValue,
|
|
9497
|
+
options,
|
|
9498
|
+
selectedValue,
|
|
9499
|
+
placeHolder,
|
|
9500
|
+
onChange,
|
|
9501
|
+
required,
|
|
9502
|
+
disabled,
|
|
9503
|
+
width,
|
|
9504
|
+
error,
|
|
9505
|
+
errorMessage,
|
|
9506
|
+
labelColor,
|
|
9507
|
+
checkBoxColor,
|
|
9508
|
+
xIconShow,
|
|
9509
|
+
showLabelOnTop,
|
|
9510
|
+
orderBy,
|
|
9511
|
+
elementType
|
|
9512
|
+
}) => /*#__PURE__*/React__default["default"].createElement(DropdownMain, {
|
|
9513
|
+
className: "DropdownMain",
|
|
9514
|
+
width: width
|
|
9515
|
+
}, isMulti ? /*#__PURE__*/React__default["default"].createElement(DropdownMultiNew, {
|
|
9516
|
+
className: "DropdownMultiNew",
|
|
9517
|
+
placeHolder: placeHolder,
|
|
9518
|
+
label: label,
|
|
9519
|
+
labelEmptyValue: labelEmptyValue,
|
|
9520
|
+
labelColor: labelColor,
|
|
9521
|
+
checkBoxColor: checkBoxColor,
|
|
9522
|
+
required: required,
|
|
9523
|
+
options: options,
|
|
9524
|
+
width: width,
|
|
9525
|
+
disabled: disabled,
|
|
9526
|
+
error: error,
|
|
9527
|
+
errorMessage: errorMessage,
|
|
9528
|
+
selectedValue: selectedValue,
|
|
9529
|
+
xIconShow: xIconShow,
|
|
9530
|
+
onChange: onChange,
|
|
9531
|
+
showLabelOnTop: showLabelOnTop,
|
|
9532
|
+
orderBy: orderBy,
|
|
9533
|
+
elementType: elementType
|
|
9534
|
+
}) : /*#__PURE__*/React__default["default"].createElement(DropdownSingleNew, {
|
|
9535
|
+
className: "DropdownSingleNew",
|
|
9536
|
+
placeHolder: placeHolder,
|
|
9537
|
+
label: label,
|
|
9538
|
+
labelEmptyValue: labelEmptyValue,
|
|
9539
|
+
labelColor: labelColor,
|
|
9540
|
+
checkBoxColor: checkBoxColor,
|
|
9541
|
+
required: required,
|
|
9542
|
+
options: options,
|
|
9543
|
+
width: width,
|
|
9544
|
+
disabled: disabled,
|
|
9545
|
+
error: error,
|
|
9546
|
+
errorMessage: errorMessage,
|
|
9547
|
+
selectedValue: selectedValue,
|
|
9548
|
+
xIconShow: xIconShow,
|
|
9549
|
+
onChange: onChange,
|
|
9550
|
+
showLabelOnTop: showLabelOnTop,
|
|
9551
|
+
orderBy: orderBy,
|
|
9552
|
+
elementType: elementType
|
|
9553
|
+
}));
|
|
9561
9554
|
DropdownNew.propTypes = {
|
|
9562
9555
|
placeHolder: PropTypes.string,
|
|
9563
9556
|
label: PropTypes.string,
|
|
@@ -11149,7 +11142,7 @@ const TooltipTextContainer = styled__default["default"].div`
|
|
|
11149
11142
|
cursor: pointer;
|
|
11150
11143
|
}
|
|
11151
11144
|
`;
|
|
11152
|
-
const TooltipText$
|
|
11145
|
+
const TooltipText$2 = styled__default["default"].div`
|
|
11153
11146
|
margin: 0;
|
|
11154
11147
|
`;
|
|
11155
11148
|
|
|
@@ -11319,8 +11312,8 @@ const FilterPanel = props => {
|
|
|
11319
11312
|
fieldsData: newFieldsDataState
|
|
11320
11313
|
});
|
|
11321
11314
|
};
|
|
11322
|
-
const getTooltipTextDates = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$
|
|
11323
|
-
const getTooltipTextGoButton = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$
|
|
11315
|
+
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"));
|
|
11316
|
+
const getTooltipTextGoButton = () => /*#__PURE__*/React__default["default"].createElement(TooltipTextContainer, null, /*#__PURE__*/React__default["default"].createElement(TooltipText$2, null, tooltipTextGoButton));
|
|
11324
11317
|
const getYearsArray = () => {
|
|
11325
11318
|
const currentYear = moment().year();
|
|
11326
11319
|
const previousYear = moment().subtract(1, 'years').year();
|
|
@@ -24144,22 +24137,21 @@ const DeleteIcon = styled__default["default"].div`
|
|
|
24144
24137
|
position: absolute;
|
|
24145
24138
|
`;
|
|
24146
24139
|
|
|
24147
|
-
const QuickFilterDropdownSingle =
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
} = _ref;
|
|
24140
|
+
const QuickFilterDropdownSingle = ({
|
|
24141
|
+
label,
|
|
24142
|
+
hoverColor,
|
|
24143
|
+
options,
|
|
24144
|
+
selectedValue,
|
|
24145
|
+
placeHolder,
|
|
24146
|
+
onChange,
|
|
24147
|
+
disabled,
|
|
24148
|
+
width,
|
|
24149
|
+
error,
|
|
24150
|
+
errorMessage,
|
|
24151
|
+
xIconShow,
|
|
24152
|
+
labelColor,
|
|
24153
|
+
showLabelOnTop
|
|
24154
|
+
}) => {
|
|
24163
24155
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24164
24156
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24165
24157
|
const [inputValue, setInputValue] = React$1.useState("");
|
|
@@ -24557,24 +24549,23 @@ const IconContainer$2 = styled__default["default"].div`
|
|
|
24557
24549
|
cursor: pointer;
|
|
24558
24550
|
`;
|
|
24559
24551
|
|
|
24560
|
-
const QuickFilterDropdownMultiSelection =
|
|
24561
|
-
|
|
24562
|
-
|
|
24563
|
-
|
|
24564
|
-
|
|
24565
|
-
|
|
24566
|
-
|
|
24567
|
-
|
|
24568
|
-
|
|
24569
|
-
|
|
24570
|
-
|
|
24571
|
-
|
|
24572
|
-
|
|
24573
|
-
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
} = _ref;
|
|
24552
|
+
const QuickFilterDropdownMultiSelection = ({
|
|
24553
|
+
label,
|
|
24554
|
+
labelEmptyValue,
|
|
24555
|
+
options,
|
|
24556
|
+
selectedValue,
|
|
24557
|
+
placeHolder,
|
|
24558
|
+
onChange,
|
|
24559
|
+
required,
|
|
24560
|
+
disabled,
|
|
24561
|
+
width,
|
|
24562
|
+
error,
|
|
24563
|
+
errorMessage,
|
|
24564
|
+
labelColor,
|
|
24565
|
+
xIconShow,
|
|
24566
|
+
checkBoxColor,
|
|
24567
|
+
showLabelOnTop
|
|
24568
|
+
}) => {
|
|
24578
24569
|
const [isFocused, setIsFocused] = React$1.useState(false);
|
|
24579
24570
|
const [showOptions, setShowOptions] = React$1.useState(false);
|
|
24580
24571
|
const [inputValue, setInputValue] = React$1.useState('');
|
|
@@ -25397,7 +25388,7 @@ const TitleAndValueContainer$3 = styled__default["default"].div`
|
|
|
25397
25388
|
display: flex;
|
|
25398
25389
|
flex-direction: column;
|
|
25399
25390
|
`;
|
|
25400
|
-
const Title$
|
|
25391
|
+
const Title$e = styled__default["default"].h4`
|
|
25401
25392
|
font-weight: 400;
|
|
25402
25393
|
font-size: 20px;
|
|
25403
25394
|
margin: 0;
|
|
@@ -25460,7 +25451,7 @@ const FormattedValue$3 = props => {
|
|
|
25460
25451
|
width: width
|
|
25461
25452
|
}, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$3, {
|
|
25462
25453
|
className: "TitleAndValueContainer"
|
|
25463
|
-
}, title ? /*#__PURE__*/React__default["default"].createElement(Title$
|
|
25454
|
+
}, title ? /*#__PURE__*/React__default["default"].createElement(Title$e, {
|
|
25464
25455
|
className: "Title",
|
|
25465
25456
|
width: width
|
|
25466
25457
|
}, title) : '', showTopValue && /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer$1, {
|
|
@@ -25472,7 +25463,7 @@ const FormattedValue$3 = props => {
|
|
|
25472
25463
|
className: "CurrencySignOrPercent"
|
|
25473
25464
|
}, 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, {
|
|
25474
25465
|
className: "CurrencySignOrPercent"
|
|
25475
|
-
}, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$
|
|
25466
|
+
}, isPercent ? '%' : ''))), subtitle ? /*#__PURE__*/React__default["default"].createElement(Title$e, {
|
|
25476
25467
|
className: "Title",
|
|
25477
25468
|
width: width
|
|
25478
25469
|
}, subtitle) : '')));
|
|
@@ -25534,7 +25525,7 @@ const TooltipLabel$3 = styled__default["default"].div`
|
|
|
25534
25525
|
font-weight: 400;
|
|
25535
25526
|
width: fit-content;
|
|
25536
25527
|
`;
|
|
25537
|
-
const TooltipTitle$
|
|
25528
|
+
const TooltipTitle$4 = styled__default["default"].div`
|
|
25538
25529
|
color: #212121;
|
|
25539
25530
|
font-size: 14px;
|
|
25540
25531
|
font-weight: 600;
|
|
@@ -25542,7 +25533,7 @@ const TooltipTitle$3 = styled__default["default"].div`
|
|
|
25542
25533
|
const TitleAndValueContainer$2 = styled__default["default"].div`
|
|
25543
25534
|
padding: 0 1rem;
|
|
25544
25535
|
`;
|
|
25545
|
-
const Title$
|
|
25536
|
+
const Title$d = styled__default["default"].h5`
|
|
25546
25537
|
font-weight: 500;
|
|
25547
25538
|
font-size: 18px;
|
|
25548
25539
|
line-height: 20px;
|
|
@@ -25671,7 +25662,7 @@ const TitleAndIconContainer = styled__default["default"].div`
|
|
|
25671
25662
|
display: flex;
|
|
25672
25663
|
align-items: center;
|
|
25673
25664
|
`;
|
|
25674
|
-
const Title$
|
|
25665
|
+
const Title$c = styled__default["default"].h4`
|
|
25675
25666
|
font-weight: 400;
|
|
25676
25667
|
font-size: 14px;
|
|
25677
25668
|
line-height: 27px;
|
|
@@ -25725,7 +25716,7 @@ const PerformanceAnalyticsLegend = props => {
|
|
|
25725
25716
|
color: item.iconColor
|
|
25726
25717
|
}) : item.iconType === ICON_TYPE_LEGEND_LINE_ICON$2 ? /*#__PURE__*/React__default["default"].createElement(LegendLineIcon, {
|
|
25727
25718
|
color: item.iconColor
|
|
25728
|
-
}) : '', /*#__PURE__*/React__default["default"].createElement(Title$
|
|
25719
|
+
}) : '', /*#__PURE__*/React__default["default"].createElement(Title$c, {
|
|
25729
25720
|
id: "Title",
|
|
25730
25721
|
width: width
|
|
25731
25722
|
}, item.title))))) : '');
|
|
@@ -25823,7 +25814,7 @@ const BarChartsByWeeks = props => {
|
|
|
25823
25814
|
let currentTooltipSecondValue = 0;
|
|
25824
25815
|
if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
|
|
25825
25816
|
if (payload[0].payload?.secondValue) currentTooltipSecondValue = payload[0].payload?.secondValue;
|
|
25826
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$3, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$
|
|
25817
|
+
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}
|
|
25827
25818
|
${displayFormattedValue(currentTooltipValue)}
|
|
25828
25819
|
`), currentTooltipSecondValue ? /*#__PURE__*/React__default["default"].createElement(TooltipLabel$3, null, `${tooltipSecondTitle}
|
|
25829
25820
|
${displayFormattedValue(currentTooltipSecondValue)}
|
|
@@ -25880,7 +25871,7 @@ const BarChartsByWeeks = props => {
|
|
|
25880
25871
|
ref: controlsContainerRef
|
|
25881
25872
|
}, /*#__PURE__*/React__default["default"].createElement(Controls$6, {
|
|
25882
25873
|
height: getControlsHeight()
|
|
25883
|
-
}, showTitle && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$2, null, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
25874
|
+
}, 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, {
|
|
25884
25875
|
title: headerValueTopTitle,
|
|
25885
25876
|
subtitle: headerValueBottomTitle,
|
|
25886
25877
|
showTopValue: showHeaderTopValue,
|
|
@@ -26113,7 +26104,7 @@ const TitleAndValueContainer$1 = styled__default["default"].div`
|
|
|
26113
26104
|
flex-direction: column;
|
|
26114
26105
|
padding: 0 1.25em; /* 20px → 1.25em */
|
|
26115
26106
|
`;
|
|
26116
|
-
const Title$
|
|
26107
|
+
const Title$b = styled__default["default"].h4`
|
|
26117
26108
|
font-weight: 500;
|
|
26118
26109
|
font-size: ${props => props.titleFontSize || '1.125em'}; /* Default: 18px → 1.125em */
|
|
26119
26110
|
margin: 0;
|
|
@@ -26316,7 +26307,7 @@ const TotalDoughnutChart = props => {
|
|
|
26316
26307
|
width: width
|
|
26317
26308
|
}, !hideTitleAndValue && /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer$1, {
|
|
26318
26309
|
className: "TitleAndValueContainer"
|
|
26319
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
26310
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$b, {
|
|
26320
26311
|
className: "Title",
|
|
26321
26312
|
fontSize: titleFontSize
|
|
26322
26313
|
}, title), /*#__PURE__*/React__default["default"].createElement(CurrencySignAndFormattedValueContainer, {
|
|
@@ -26446,7 +26437,7 @@ CustomTooltip.defaultProps = {
|
|
|
26446
26437
|
isPercent: false
|
|
26447
26438
|
};
|
|
26448
26439
|
|
|
26449
|
-
const TooltipContainer$
|
|
26440
|
+
const TooltipContainer$3 = styled__default["default"].div`
|
|
26450
26441
|
--tooltip-text-color: black;
|
|
26451
26442
|
--tooltip-background-color: white;
|
|
26452
26443
|
--tooltip-margin: 40px;
|
|
@@ -26552,7 +26543,7 @@ const Tooltip = props => {
|
|
|
26552
26543
|
direction,
|
|
26553
26544
|
content
|
|
26554
26545
|
} = props;
|
|
26555
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$
|
|
26546
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$3, {
|
|
26556
26547
|
className: className,
|
|
26557
26548
|
top: `${top}px`,
|
|
26558
26549
|
left: `${left}px`
|
|
@@ -26638,7 +26629,7 @@ const TotalValue = styled__default["default"].div`
|
|
|
26638
26629
|
font-size: 20px;
|
|
26639
26630
|
}
|
|
26640
26631
|
`;
|
|
26641
|
-
const Title$
|
|
26632
|
+
const Title$a = styled__default["default"].h4`
|
|
26642
26633
|
font-size: 18px;
|
|
26643
26634
|
font-weight: 400;
|
|
26644
26635
|
line-height: 1;
|
|
@@ -26795,7 +26786,7 @@ const TotalHorizontalCharts = props => {
|
|
|
26795
26786
|
}, chartsData?.length > 0 ? /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, !hideTitle || !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(CardHeader, {
|
|
26796
26787
|
ref: topHeader,
|
|
26797
26788
|
className: "CardHeader"
|
|
26798
|
-
}, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$
|
|
26789
|
+
}, !hideTitle ? /*#__PURE__*/React__default["default"].createElement(Title$a, null, title) : '', !hideTotalValue ? /*#__PURE__*/React__default["default"].createElement(TotalValue, {
|
|
26799
26790
|
className: "TotalValue"
|
|
26800
26791
|
}, currencySign && /*#__PURE__*/React__default["default"].createElement(CurrencySign, {
|
|
26801
26792
|
className: "CurrencySign"
|
|
@@ -27268,7 +27259,7 @@ const ItemContainer = styled__default["default"].div`
|
|
|
27268
27259
|
flex-direction: column;
|
|
27269
27260
|
flex-wrap: wrap;
|
|
27270
27261
|
`;
|
|
27271
|
-
const Title$
|
|
27262
|
+
const Title$9 = styled__default["default"].h4`
|
|
27272
27263
|
font-size: 18px;
|
|
27273
27264
|
font-weight: 500;
|
|
27274
27265
|
margin: 0;
|
|
@@ -27384,7 +27375,7 @@ const SalesAndROI = props => {
|
|
|
27384
27375
|
showBorderShadow: showBorderShadow
|
|
27385
27376
|
}, /*#__PURE__*/React__default["default"].createElement(TitleAndValueContainer, {
|
|
27386
27377
|
id: "TitleAndValueContainer"
|
|
27387
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
27378
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$9, {
|
|
27388
27379
|
id: "Title"
|
|
27389
27380
|
}, title), showBanner && /*#__PURE__*/React__default["default"].createElement(OutBanner, {
|
|
27390
27381
|
id: "OutBanner",
|
|
@@ -27483,7 +27474,7 @@ const TitleContainer$1 = styled__default["default"].div`
|
|
|
27483
27474
|
margin: 0;
|
|
27484
27475
|
border-bottom: 1px solid #b1b1b1;
|
|
27485
27476
|
`;
|
|
27486
|
-
const Title$
|
|
27477
|
+
const Title$8 = styled__default["default"].p`
|
|
27487
27478
|
font-weight: 400;
|
|
27488
27479
|
font-size: 24px;
|
|
27489
27480
|
margin: 0;
|
|
@@ -27703,7 +27694,7 @@ const PopupCharts = props => {
|
|
|
27703
27694
|
height: height,
|
|
27704
27695
|
width: width,
|
|
27705
27696
|
onClick: e => e.stopPropagation()
|
|
27706
|
-
}, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
27697
|
+
}, /*#__PURE__*/React__default["default"].createElement(TitleContainer$1, null, /*#__PURE__*/React__default["default"].createElement(Title$8, null, title), /*#__PURE__*/React__default["default"].createElement(CloseXIconContainer, {
|
|
27707
27698
|
onClick: e => closePopupCharts(e)
|
|
27708
27699
|
}, /*#__PURE__*/React__default["default"].createElement(CloseXIcon, null))), /*#__PURE__*/React__default["default"].createElement(ChartsContainer, {
|
|
27709
27700
|
id: "ChartsContainer",
|
|
@@ -27801,7 +27792,7 @@ const TopToggleListMainContainer = styled__default["default"].div`
|
|
|
27801
27792
|
padding: 0 24px;
|
|
27802
27793
|
width: ${props => props.width};
|
|
27803
27794
|
`;
|
|
27804
|
-
const Title$
|
|
27795
|
+
const Title$7 = styled__default["default"].h4`
|
|
27805
27796
|
font-size: 14px;
|
|
27806
27797
|
font-weight: 600;
|
|
27807
27798
|
margin: 20px 0 12px;
|
|
@@ -27831,7 +27822,7 @@ const TopToggleList = props => {
|
|
|
27831
27822
|
} = props;
|
|
27832
27823
|
return /*#__PURE__*/React__default["default"].createElement(TopToggleListMainContainer, {
|
|
27833
27824
|
width: width
|
|
27834
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
27825
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$7, null, title), /*#__PURE__*/React__default["default"].createElement(ListContainer, {
|
|
27835
27826
|
height: height
|
|
27836
27827
|
}, list.map(item => /*#__PURE__*/React__default["default"].createElement(ListItem, {
|
|
27837
27828
|
key: item.value
|
|
@@ -27893,7 +27884,7 @@ const TitleContainer = styled__default["default"].div`
|
|
|
27893
27884
|
justify-content: flex-start;
|
|
27894
27885
|
margin: 0 0 10px 0;
|
|
27895
27886
|
`;
|
|
27896
|
-
const Title$
|
|
27887
|
+
const Title$6 = styled__default["default"].h3`
|
|
27897
27888
|
user-select: none;
|
|
27898
27889
|
text-align: left;
|
|
27899
27890
|
margin: 0;
|
|
@@ -27938,7 +27929,7 @@ const BarLabel = styled__default["default"].span`
|
|
|
27938
27929
|
font-weight: 400;
|
|
27939
27930
|
user-select: none;
|
|
27940
27931
|
`;
|
|
27941
|
-
const TooltipContainer$
|
|
27932
|
+
const TooltipContainer$2 = styled__default["default"].div`
|
|
27942
27933
|
position: absolute;
|
|
27943
27934
|
|
|
27944
27935
|
top: ${props => props.top};
|
|
@@ -28048,7 +28039,7 @@ const Heatmap = props => {
|
|
|
28048
28039
|
if (tooltip && tooltipPosition && tooltip.label === `${item.label} - ${Math.round(item.value / totalValue * 100)}%`) {
|
|
28049
28040
|
const top = `${tooltipPosition.y}px`;
|
|
28050
28041
|
const left = `${tooltipPosition.x}px`;
|
|
28051
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$
|
|
28042
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipContainer$2, {
|
|
28052
28043
|
className: "TooltipContainer",
|
|
28053
28044
|
top: top,
|
|
28054
28045
|
left: left
|
|
@@ -28168,7 +28159,7 @@ const Heatmap = props => {
|
|
|
28168
28159
|
className: "HeatmapWrapper"
|
|
28169
28160
|
}, /*#__PURE__*/React__default["default"].createElement(TitleContainer, {
|
|
28170
28161
|
className: "TitleContainer"
|
|
28171
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
28162
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$6, {
|
|
28172
28163
|
className: "Title"
|
|
28173
28164
|
}, title)), refreshRequired && renderBars(), !refreshRequired && renderBars(), renderLegend()));
|
|
28174
28165
|
};
|
|
@@ -28582,12 +28573,12 @@ const TooltipLabel$1 = styled__default["default"].div`
|
|
|
28582
28573
|
font-weight: 400;
|
|
28583
28574
|
width: fit-content;
|
|
28584
28575
|
`;
|
|
28585
|
-
const TooltipTitle$
|
|
28576
|
+
const TooltipTitle$3 = styled__default["default"].div`
|
|
28586
28577
|
color: #212121;
|
|
28587
28578
|
font-size: 14px;
|
|
28588
28579
|
font-weight: 600;
|
|
28589
28580
|
`;
|
|
28590
|
-
const Title$
|
|
28581
|
+
const Title$5 = styled__default["default"].h5`
|
|
28591
28582
|
font-weight: 500;
|
|
28592
28583
|
font-size: 18px;
|
|
28593
28584
|
line-height: 20px;
|
|
@@ -28664,7 +28655,7 @@ const BarChart = props => {
|
|
|
28664
28655
|
if (!active || !payload || payload?.length === 0) return null;
|
|
28665
28656
|
let currentTooltipValue = 0;
|
|
28666
28657
|
if (payload[0].payload?.value) currentTooltipValue = payload[0].payload?.value;
|
|
28667
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipDiv$1, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$
|
|
28658
|
+
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)}`));
|
|
28668
28659
|
};
|
|
28669
28660
|
const CustomizedTickBarChart = props => {
|
|
28670
28661
|
const {
|
|
@@ -28747,7 +28738,7 @@ const BarChart = props => {
|
|
|
28747
28738
|
height: height,
|
|
28748
28739
|
width: width,
|
|
28749
28740
|
ref: controlsContainerRef
|
|
28750
|
-
}, /*#__PURE__*/React__default["default"].createElement(Controls$3, null, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
28741
|
+
}, /*#__PURE__*/React__default["default"].createElement(Controls$3, null, /*#__PURE__*/React__default["default"].createElement(Title$5, null, title), /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
|
|
28751
28742
|
width: "100%",
|
|
28752
28743
|
height: 400
|
|
28753
28744
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.BarChart, {
|
|
@@ -28918,7 +28909,7 @@ const Controls$2 = styled__default["default"].div`
|
|
|
28918
28909
|
flex-direction: column;
|
|
28919
28910
|
background-color: white;
|
|
28920
28911
|
`;
|
|
28921
|
-
const Title$
|
|
28912
|
+
const Title$4 = styled__default["default"].h5`
|
|
28922
28913
|
font-size: 18px;
|
|
28923
28914
|
font-weight: 400;
|
|
28924
28915
|
margin: 0 0 30px;
|
|
@@ -28951,7 +28942,7 @@ const TooltipLabel = styled__default["default"].div`
|
|
|
28951
28942
|
font-weight: 400;
|
|
28952
28943
|
width: fit-content;
|
|
28953
28944
|
`;
|
|
28954
|
-
const TooltipTitle$
|
|
28945
|
+
const TooltipTitle$2 = styled__default["default"].div`
|
|
28955
28946
|
color: #212121;
|
|
28956
28947
|
font-size: 14px;
|
|
28957
28948
|
font-weight: 600;
|
|
@@ -29105,7 +29096,7 @@ const DoubleBarSingleLine = props => {
|
|
|
29105
29096
|
} else {
|
|
29106
29097
|
`${currentTooltipValue.toFixed(1)}`;
|
|
29107
29098
|
}
|
|
29108
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$
|
|
29099
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipDiv, null, /*#__PURE__*/React__default["default"].createElement(TooltipTitle$2, null, `${label}`), payload.map((item, idx) => {
|
|
29109
29100
|
const dataStateItem = dataState.find(state => state.key === item.dataKey);
|
|
29110
29101
|
return /*#__PURE__*/React__default["default"].createElement(TooltipLabel, {
|
|
29111
29102
|
key: item.dataKey || idx
|
|
@@ -29178,7 +29169,7 @@ const DoubleBarSingleLine = props => {
|
|
|
29178
29169
|
noDataText: noDataText
|
|
29179
29170
|
}) : /*#__PURE__*/React__default["default"].createElement(Controls$2, {
|
|
29180
29171
|
className: "Controls"
|
|
29181
|
-
}, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$
|
|
29172
|
+
}, title && title.trim() !== '' && /*#__PURE__*/React__default["default"].createElement(Title$4, null, title), /*#__PURE__*/React__default["default"].createElement(ChartsWrapper, {
|
|
29182
29173
|
width: hasScroll ? `${data.length * 178}px` : 'auto'
|
|
29183
29174
|
}, /*#__PURE__*/React__default["default"].createElement(LineChartWrapper, null, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, null, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, _extends({
|
|
29184
29175
|
data: transformedData
|
|
@@ -29196,7 +29187,7 @@ const DoubleBarSingleLine = props => {
|
|
|
29196
29187
|
right: barsWidth
|
|
29197
29188
|
}
|
|
29198
29189
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
|
|
29199
|
-
domain: [dataMin => Math.min(dataMin, calculateMinValue(data, dataState))
|
|
29190
|
+
domain: [dataMin => Math.min(dataMin, calculateMinValue(data, dataState)) - 5, dataMax => Math.max(dataMax, calculateMaxValue(data, dataState)) + 10],
|
|
29200
29191
|
hide: true
|
|
29201
29192
|
}), dataState.filter(item => item.type === "line").map(obj => /*#__PURE__*/React__default["default"].createElement(recharts.Line, {
|
|
29202
29193
|
type: lineType,
|
|
@@ -29277,7 +29268,7 @@ const CheckboxGroupContainer = styled__default["default"].div`
|
|
|
29277
29268
|
height: 21px;
|
|
29278
29269
|
gap: 20px;
|
|
29279
29270
|
`;
|
|
29280
|
-
const Title$
|
|
29271
|
+
const Title$3 = styled__default["default"].h5`
|
|
29281
29272
|
font-weight: 500;
|
|
29282
29273
|
font-size: 18px;
|
|
29283
29274
|
line-height: 20px;
|
|
@@ -29297,7 +29288,7 @@ const LegendIcon = styled__default["default"].div`
|
|
|
29297
29288
|
margin-right: 5px;
|
|
29298
29289
|
background-color: ${props => props.color};
|
|
29299
29290
|
`;
|
|
29300
|
-
const TooltipContainer = styled__default["default"].div`
|
|
29291
|
+
const TooltipContainer$1 = styled__default["default"].div`
|
|
29301
29292
|
background: white;
|
|
29302
29293
|
padding: 10px;
|
|
29303
29294
|
border-radius: 5px;
|
|
@@ -29307,12 +29298,12 @@ const TooltipContainer = styled__default["default"].div`
|
|
|
29307
29298
|
font-weight: 500;
|
|
29308
29299
|
font-size: 14px;
|
|
29309
29300
|
`;
|
|
29310
|
-
const TooltipTitle = styled__default["default"].p`
|
|
29301
|
+
const TooltipTitle$1 = styled__default["default"].p`
|
|
29311
29302
|
font-weight: 700;
|
|
29312
29303
|
margin-top: 5px;
|
|
29313
29304
|
margin-bottom: 5px;
|
|
29314
29305
|
`;
|
|
29315
|
-
const TooltipText = styled__default["default"].p`
|
|
29306
|
+
const TooltipText$1 = styled__default["default"].p`
|
|
29316
29307
|
margin-top: 5px;
|
|
29317
29308
|
margin-bottom: 5px;
|
|
29318
29309
|
`;
|
|
@@ -29553,10 +29544,10 @@ const AreaChart = props => {
|
|
|
29553
29544
|
payload
|
|
29554
29545
|
} = _ref3;
|
|
29555
29546
|
if (active && payload && payload.length) {
|
|
29556
|
-
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) => {
|
|
29557
29548
|
const chart = areaChartsState.find(chart => chart.key === data.dataKey);
|
|
29558
29549
|
if (chart) {
|
|
29559
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipText, {
|
|
29550
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipText$1, {
|
|
29560
29551
|
key: index
|
|
29561
29552
|
}, `${chart.name}: ${displayFormattedValue(data.value, chart.isDollar)}`);
|
|
29562
29553
|
}
|
|
@@ -29605,7 +29596,7 @@ const AreaChart = props => {
|
|
|
29605
29596
|
height: height
|
|
29606
29597
|
}) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeaderContainer$2, {
|
|
29607
29598
|
"data-testid": "header-container"
|
|
29608
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
29599
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$3, {
|
|
29609
29600
|
"data-testid": "title"
|
|
29610
29601
|
}, title), /*#__PURE__*/React__default["default"].createElement(CheckboxGroupContainer, {
|
|
29611
29602
|
"data-testid": "checkbox-group-container"
|
|
@@ -30103,7 +30094,7 @@ const HeaderContainer$1 = styled__default["default"].div`
|
|
|
30103
30094
|
align-items: center;
|
|
30104
30095
|
padding-bottom: 8px;
|
|
30105
30096
|
`;
|
|
30106
|
-
const Title$
|
|
30097
|
+
const Title$2 = styled__default["default"].h3`
|
|
30107
30098
|
font-size: 18px;
|
|
30108
30099
|
font-weight: 400;
|
|
30109
30100
|
margin: 0;
|
|
@@ -30172,7 +30163,7 @@ const BreakdownPanel = props => {
|
|
|
30172
30163
|
height: height
|
|
30173
30164
|
}) : /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(HeaderContainer$1, {
|
|
30174
30165
|
"data-testid": "header-container"
|
|
30175
|
-
}, /*#__PURE__*/React__default["default"].createElement(Title$
|
|
30166
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$2, {
|
|
30176
30167
|
"data-testid": "title"
|
|
30177
30168
|
}, title)), /*#__PURE__*/React__default["default"].createElement(CategorySalesMainContainer, {
|
|
30178
30169
|
"data-testid": "category-sales-main-container"
|
|
@@ -30444,6 +30435,8 @@ const BubbleChart = _ref => {
|
|
|
30444
30435
|
backgroundColor = 'white',
|
|
30445
30436
|
showAxis = false
|
|
30446
30437
|
} = _ref;
|
|
30438
|
+
const [curosrMouse, setCurosrMouse] = React$1.useState("default");
|
|
30439
|
+
|
|
30447
30440
|
// Calculate the medians and domain for raw X, Y, and Z values
|
|
30448
30441
|
const {
|
|
30449
30442
|
xMedian,
|
|
@@ -30528,6 +30521,7 @@ const BubbleChart = _ref => {
|
|
|
30528
30521
|
// Refs for the chart container
|
|
30529
30522
|
const containerRef = React$1.useRef(null);
|
|
30530
30523
|
const scatterChartRef = React$1.useRef(null);
|
|
30524
|
+
const scatterFullChartRef = React$1.useRef(null);
|
|
30531
30525
|
|
|
30532
30526
|
// Set up initial domain
|
|
30533
30527
|
React$1.useEffect(() => {
|
|
@@ -30700,9 +30694,9 @@ const BubbleChart = _ref => {
|
|
|
30700
30694
|
e.preventDefault();
|
|
30701
30695
|
}
|
|
30702
30696
|
}, [viewDomain]); // Add viewDomain as dependency to capture current value
|
|
30703
|
-
|
|
30704
30697
|
// Handle mouse move for dragging
|
|
30705
30698
|
const handleMouseMove = React$1.useCallback(e => {
|
|
30699
|
+
/* cursor feedback */
|
|
30706
30700
|
if (!isDragging) return;
|
|
30707
30701
|
const dx = e.clientX - dragStart.x;
|
|
30708
30702
|
const dy = e.clientY - dragStart.y;
|
|
@@ -30811,6 +30805,7 @@ const BubbleChart = _ref => {
|
|
|
30811
30805
|
|
|
30812
30806
|
// Handle mouse wheel
|
|
30813
30807
|
const handleWheel = React$1.useCallback(e => {
|
|
30808
|
+
if (!e.ctrlKey) return; // Only zoom with Ctrl key
|
|
30814
30809
|
e.preventDefault();
|
|
30815
30810
|
if (e.deltaY < 0) {
|
|
30816
30811
|
handleZoomIn();
|
|
@@ -30899,7 +30894,11 @@ const BubbleChart = _ref => {
|
|
|
30899
30894
|
const formattedY = formatUnits(yMedian);
|
|
30900
30895
|
return `${formattedX}, ${formattedY}`;
|
|
30901
30896
|
}, [xMedian, yMedian]);
|
|
30902
|
-
|
|
30897
|
+
const handleChartMouseMove = e => {
|
|
30898
|
+
if (!scatterFullChartRef.current) return;
|
|
30899
|
+
const temp = isDragging ? 'move' : 'zoom-in';
|
|
30900
|
+
setCurosrMouse(temp);
|
|
30901
|
+
};
|
|
30903
30902
|
// Render the component
|
|
30904
30903
|
return /*#__PURE__*/React__default["default"].createElement(BubbleChartContainer, {
|
|
30905
30904
|
width: width,
|
|
@@ -30924,6 +30923,9 @@ const BubbleChart = _ref => {
|
|
|
30924
30923
|
height: "100%",
|
|
30925
30924
|
"data-testid": "responsive-container"
|
|
30926
30925
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ScatterChart, {
|
|
30926
|
+
ref: scatterFullChartRef,
|
|
30927
|
+
onMouseMove: handleChartMouseMove,
|
|
30928
|
+
cursor: curosrMouse,
|
|
30927
30929
|
margin: {
|
|
30928
30930
|
top: 60,
|
|
30929
30931
|
right: 190,
|
|
@@ -31414,41 +31416,94 @@ const BatteryChart = props => {
|
|
|
31414
31416
|
}))))))), starText !== "" && /*#__PURE__*/React__default["default"].createElement(StarText, null, starText));
|
|
31415
31417
|
};
|
|
31416
31418
|
|
|
31417
|
-
|
|
31418
|
-
|
|
31419
|
-
|
|
31420
|
-
|
|
31421
|
-
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
|
|
31425
|
-
|
|
31426
|
-
|
|
31419
|
+
const Container = styled__default["default"].div`
|
|
31420
|
+
width: ${props => props.width};
|
|
31421
|
+
height: ${props => props.height};
|
|
31422
|
+
padding: 15px;
|
|
31423
|
+
display: flex;
|
|
31424
|
+
flex-direction: column;
|
|
31425
|
+
#Segment {
|
|
31426
|
+
width: auto;
|
|
31427
|
+
white-space: nowrap;
|
|
31428
|
+
font-size: 14px;
|
|
31429
|
+
font-weight: 500;
|
|
31430
|
+
font-family: "Poppins"
|
|
31431
|
+
}
|
|
31432
|
+
`;
|
|
31433
|
+
const Title$1 = styled__default["default"].h2`
|
|
31434
|
+
color: #212121;
|
|
31435
|
+
font-family: "Poppins";
|
|
31436
|
+
font-size: 18px;
|
|
31437
|
+
font-style: normal;
|
|
31438
|
+
font-weight: 400;
|
|
31439
|
+
line-height: normal;
|
|
31440
|
+
margin: 0 0 16px 0;
|
|
31441
|
+
`;
|
|
31442
|
+
styled__default["default"].div`
|
|
31443
|
+
font-family: sans-serif;
|
|
31444
|
+
text-align: center;
|
|
31445
|
+
`;
|
|
31446
|
+
styled__default["default"].div`
|
|
31447
|
+
height: 25%;
|
|
31448
|
+
`;
|
|
31449
|
+
styled__default["default"].div`
|
|
31450
|
+
height: 75%;
|
|
31451
|
+
`;
|
|
31452
|
+
styled__default["default"].div`
|
|
31453
|
+
height: 100%;
|
|
31454
|
+
display: flex;
|
|
31455
|
+
flex-direction: column;
|
|
31456
|
+
background-color: white;
|
|
31457
|
+
`;
|
|
31458
|
+
const TooltipContainer = styled__default["default"].div`
|
|
31459
|
+
background: white;
|
|
31460
|
+
padding: 10px;
|
|
31461
|
+
border-radius: 5px;
|
|
31462
|
+
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
|
|
31463
|
+
border: 1px solid #ddd;
|
|
31464
|
+
font-family: Poppins, sans-serif;
|
|
31465
|
+
font-weight: 500;
|
|
31466
|
+
font-size: 14px;
|
|
31467
|
+
`;
|
|
31468
|
+
const TooltipTitle = styled__default["default"].p`
|
|
31469
|
+
font-weight: 700;
|
|
31470
|
+
margin-top: 5px;
|
|
31471
|
+
margin-bottom: 5px;
|
|
31472
|
+
`;
|
|
31473
|
+
const TooltipText = styled__default["default"].p`
|
|
31474
|
+
margin-top: 5px;
|
|
31475
|
+
margin-bottom: 5px;
|
|
31476
|
+
`;
|
|
31427
31477
|
|
|
31428
31478
|
const SeparatedLineBarChart = ({
|
|
31429
|
-
|
|
31479
|
+
brushAreaBarData = []
|
|
31430
31480
|
}) => {
|
|
31431
|
-
|
|
31432
|
-
|
|
31433
|
-
|
|
31434
|
-
|
|
31435
|
-
|
|
31481
|
+
const processedData = brushAreaBarData.map(item => {
|
|
31482
|
+
return {
|
|
31483
|
+
...item,
|
|
31484
|
+
shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
|
|
31485
|
+
};
|
|
31436
31486
|
});
|
|
31437
|
-
const
|
|
31438
|
-
|
|
31439
|
-
|
|
31440
|
-
|
|
31441
|
-
|
|
31442
|
-
|
|
31443
|
-
|
|
31444
|
-
|
|
31445
|
-
|
|
31446
|
-
|
|
31447
|
-
|
|
31448
|
-
|
|
31449
|
-
|
|
31450
|
-
|
|
31451
|
-
|
|
31487
|
+
const CustomizedTick = props => {
|
|
31488
|
+
const {
|
|
31489
|
+
x,
|
|
31490
|
+
y,
|
|
31491
|
+
payload
|
|
31492
|
+
} = props;
|
|
31493
|
+
const label = payload.value;
|
|
31494
|
+
const words = label.split(" ");
|
|
31495
|
+
const chunks = [];
|
|
31496
|
+
let currentChunk = "";
|
|
31497
|
+
words.forEach(word => {
|
|
31498
|
+
if (currentChunk.length + word.length > 15) {
|
|
31499
|
+
chunks.push(currentChunk.trim());
|
|
31500
|
+
currentChunk = word;
|
|
31501
|
+
} else {
|
|
31502
|
+
currentChunk += (currentChunk ? " " : "") + word;
|
|
31503
|
+
}
|
|
31504
|
+
});
|
|
31505
|
+
if (currentChunk) {
|
|
31506
|
+
chunks.push(currentChunk.trim());
|
|
31452
31507
|
}
|
|
31453
31508
|
return /*#__PURE__*/React__default["default"].createElement("g", {
|
|
31454
31509
|
transform: `translate(${x},${y})`
|
|
@@ -31458,89 +31513,68 @@ const SeparatedLineBarChart = ({
|
|
|
31458
31513
|
dy: 16,
|
|
31459
31514
|
textAnchor: "middle",
|
|
31460
31515
|
fill: "#212121",
|
|
31461
|
-
fontSize:
|
|
31462
|
-
fontWeight: "400",
|
|
31516
|
+
fontSize: 10,
|
|
31463
31517
|
fontFamily: "Poppins"
|
|
31464
|
-
}, /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
31518
|
+
}, chunks.map((chunk, i) => /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
31519
|
+
key: i,
|
|
31465
31520
|
x: 0,
|
|
31466
|
-
dy:
|
|
31467
|
-
},
|
|
31468
|
-
x: 0,
|
|
31469
|
-
dy: 18
|
|
31470
|
-
}, "Event: ", parts.join(" "))));
|
|
31521
|
+
dy: i === 0 ? "0.71em" : "1.2em"
|
|
31522
|
+
}, chunk))));
|
|
31471
31523
|
};
|
|
31472
|
-
const
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
|
|
31476
|
-
|
|
31477
|
-
|
|
31478
|
-
|
|
31479
|
-
|
|
31480
|
-
fontWeight,
|
|
31481
|
-
fontFamily
|
|
31482
|
-
} = props;
|
|
31483
|
-
return /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
|
|
31484
|
-
dataKey: dataKey,
|
|
31485
|
-
position: position,
|
|
31486
|
-
formatter: (value, name, props) => {
|
|
31487
|
-
if (!viewableIndices.includes(props.index)) {
|
|
31488
|
-
return "";
|
|
31489
|
-
}
|
|
31490
|
-
return formatter ? formatter(value) : value;
|
|
31491
|
-
},
|
|
31492
|
-
fill: fill || "#212121",
|
|
31493
|
-
fontSize: fontSize || 12,
|
|
31494
|
-
fontWeight: fontWeight || "400",
|
|
31495
|
-
fontFamily: fontFamily || "Poppins"
|
|
31496
|
-
});
|
|
31524
|
+
const CustomTooltip = ({
|
|
31525
|
+
active,
|
|
31526
|
+
payload
|
|
31527
|
+
}) => {
|
|
31528
|
+
if (!active || !payload || !payload.length) return null;
|
|
31529
|
+
const data = payload[0]?.payload;
|
|
31530
|
+
if (!data) return null;
|
|
31531
|
+
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, `INC Sales: ${getFormattedValue(data.inc_sales)}${getFormattedUnits(data.inc_sales)}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `INC Sales ROI: ${getFormattedValue(data.inc_roi)}${getFormattedUnits(data.inc_roi)}`));
|
|
31497
31532
|
};
|
|
31498
31533
|
const chartMargins = {
|
|
31499
|
-
top:
|
|
31500
|
-
right:
|
|
31534
|
+
top: 30,
|
|
31535
|
+
right: 30,
|
|
31501
31536
|
left: 20,
|
|
31502
|
-
bottom:
|
|
31537
|
+
bottom: 0
|
|
31503
31538
|
};
|
|
31504
|
-
const
|
|
31505
|
-
|
|
31506
|
-
|
|
31507
|
-
|
|
31508
|
-
|
|
31509
|
-
|
|
31510
|
-
|
|
31511
|
-
}
|
|
31512
|
-
dataWithIndex.filter(item => viewableIndices.includes(item.index));
|
|
31539
|
+
const chartMargins2 = {
|
|
31540
|
+
top: 30,
|
|
31541
|
+
right: 30,
|
|
31542
|
+
left: 20,
|
|
31543
|
+
bottom: 80
|
|
31544
|
+
};
|
|
31545
|
+
const BAR_CATEGORY_GAP = "30%";
|
|
31513
31546
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31514
31547
|
style: {
|
|
31515
31548
|
width: "100%",
|
|
31516
|
-
height:
|
|
31549
|
+
height: "100%"
|
|
31517
31550
|
}
|
|
31518
31551
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31519
31552
|
style: {
|
|
31520
|
-
height: "
|
|
31553
|
+
height: "25%"
|
|
31521
31554
|
}
|
|
31522
31555
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
|
|
31523
31556
|
width: "100%",
|
|
31524
31557
|
height: "100%"
|
|
31525
31558
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.LineChart, {
|
|
31526
|
-
data:
|
|
31527
|
-
margin: chartMargins
|
|
31559
|
+
data: processedData,
|
|
31560
|
+
margin: chartMargins,
|
|
31561
|
+
syncId: "composedChart",
|
|
31562
|
+
syncMethod: "index"
|
|
31528
31563
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.CartesianGrid, {
|
|
31529
31564
|
strokeDasharray: "3 3",
|
|
31530
31565
|
vertical: false
|
|
31531
31566
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
|
|
31532
|
-
dataKey: "
|
|
31533
|
-
|
|
31534
|
-
domain: ['dataMin', 'dataMax'],
|
|
31567
|
+
dataKey: "label",
|
|
31568
|
+
tick: false,
|
|
31535
31569
|
padding: {
|
|
31536
|
-
left:
|
|
31537
|
-
right:
|
|
31570
|
+
left: 70,
|
|
31571
|
+
right: 70
|
|
31538
31572
|
},
|
|
31539
31573
|
hide: true
|
|
31540
31574
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
|
|
31541
31575
|
domain: [0, 2],
|
|
31542
31576
|
hide: true
|
|
31543
|
-
}), /*#__PURE__*/React__default["default"].createElement(recharts.
|
|
31577
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Line, {
|
|
31544
31578
|
type: "monotone",
|
|
31545
31579
|
dataKey: "inc_roi",
|
|
31546
31580
|
stroke: "#F8CD00",
|
|
@@ -31550,73 +31584,81 @@ const SeparatedLineBarChart = ({
|
|
|
31550
31584
|
fill: "#F8CD00"
|
|
31551
31585
|
},
|
|
31552
31586
|
activeDot: false,
|
|
31553
|
-
name: "INC Sales ROI"
|
|
31554
|
-
|
|
31587
|
+
name: "INC Sales ROI",
|
|
31588
|
+
barCategoryGap: BAR_CATEGORY_GAP,
|
|
31589
|
+
barGap: 0
|
|
31590
|
+
}, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
|
|
31555
31591
|
dataKey: "inc_roi",
|
|
31556
31592
|
position: "top",
|
|
31557
|
-
formatter: value => value
|
|
31558
|
-
|
|
31559
|
-
|
|
31593
|
+
formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
|
|
31594
|
+
fill: "#212121",
|
|
31595
|
+
fontSize: 12,
|
|
31596
|
+
fontWeight: "400",
|
|
31597
|
+
fontFamily: "Poppins"
|
|
31598
|
+
})), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
|
|
31599
|
+
dataKey: "label",
|
|
31600
|
+
height: 30,
|
|
31601
|
+
stroke: "#212121",
|
|
31602
|
+
startIndex: 0,
|
|
31603
|
+
endIndex: Math.min(6, processedData.length - 1),
|
|
31604
|
+
y: 330,
|
|
31605
|
+
travellerWidth: 10,
|
|
31606
|
+
tickFormatter: (value, index) => index + 1,
|
|
31607
|
+
hide: true
|
|
31608
|
+
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31560
31609
|
style: {
|
|
31561
|
-
height: "
|
|
31610
|
+
height: "70%"
|
|
31562
31611
|
}
|
|
31563
31612
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
|
|
31564
31613
|
width: "100%",
|
|
31565
31614
|
height: "100%"
|
|
31566
31615
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ComposedChart, {
|
|
31567
|
-
data:
|
|
31568
|
-
margin:
|
|
31616
|
+
data: processedData,
|
|
31617
|
+
margin: chartMargins2,
|
|
31618
|
+
syncId: "composedChart",
|
|
31619
|
+
syncMethod: "index",
|
|
31620
|
+
barCategoryGap: BAR_CATEGORY_GAP,
|
|
31621
|
+
barGap: 0
|
|
31569
31622
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.CartesianGrid, {
|
|
31570
31623
|
strokeDasharray: "3 3",
|
|
31571
31624
|
vertical: false
|
|
31572
31625
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
|
|
31573
|
-
dataKey: "
|
|
31574
|
-
|
|
31575
|
-
domain: ['dataMin', 'dataMax'],
|
|
31576
|
-
padding: {
|
|
31577
|
-
left: 20,
|
|
31578
|
-
right: 20
|
|
31579
|
-
},
|
|
31580
|
-
tick: props => /*#__PURE__*/React__default["default"].createElement(CustomizedTick, _extends({}, props, {
|
|
31581
|
-
viewableIndices: viewableIndices
|
|
31582
|
-
})),
|
|
31626
|
+
dataKey: "label",
|
|
31627
|
+
tick: /*#__PURE__*/React__default["default"].createElement(CustomizedTick, null),
|
|
31583
31628
|
interval: 0,
|
|
31584
|
-
height:
|
|
31585
|
-
tickLine: false
|
|
31586
|
-
ticks: dataWithIndex.map(item => item.index)
|
|
31629
|
+
height: 80,
|
|
31630
|
+
tickLine: false
|
|
31587
31631
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
|
|
31588
31632
|
tickFormatter: v => `${v / 1000}k`,
|
|
31589
31633
|
hide: true
|
|
31590
|
-
}), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip,
|
|
31634
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
|
|
31635
|
+
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
|
|
31636
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
|
|
31591
31637
|
dataKey: "inc_sales",
|
|
31592
31638
|
fill: "#CCDCDD",
|
|
31593
|
-
gap:
|
|
31639
|
+
gap: 4,
|
|
31594
31640
|
borderRadius: [4, 4, 0, 8],
|
|
31595
31641
|
barSize: 40,
|
|
31596
31642
|
name: "INC Sales"
|
|
31597
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
31643
|
+
}, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
|
|
31598
31644
|
dataKey: "inc_sales",
|
|
31599
31645
|
position: "top",
|
|
31600
|
-
formatter: value =>
|
|
31601
|
-
|
|
31646
|
+
formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
|
|
31647
|
+
fill: "#212121",
|
|
31648
|
+
fontSize: 12,
|
|
31649
|
+
fontWeight: "400",
|
|
31650
|
+
fontFamily: "Poppins"
|
|
31602
31651
|
})), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
|
|
31603
|
-
dataKey: "
|
|
31652
|
+
dataKey: "label",
|
|
31604
31653
|
height: 30,
|
|
31605
31654
|
stroke: "#212121",
|
|
31606
|
-
startIndex:
|
|
31607
|
-
endIndex:
|
|
31608
|
-
|
|
31609
|
-
|
|
31610
|
-
|
|
31611
|
-
|
|
31612
|
-
|
|
31613
|
-
},
|
|
31614
|
-
travellerWidth: 12
|
|
31615
|
-
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31616
|
-
style: {
|
|
31617
|
-
marginTop: "-28px"
|
|
31618
|
-
}
|
|
31619
|
-
}, /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
|
|
31655
|
+
startIndex: 0,
|
|
31656
|
+
endIndex: Math.min(6, processedData.length - 1),
|
|
31657
|
+
travellerWidth: 10,
|
|
31658
|
+
tickFormatter: (value, index) => index + 1
|
|
31659
|
+
})), /*#__PURE__*/React__default["default"].createElement("div", null)), /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
|
|
31660
|
+
width: "100%",
|
|
31661
|
+
height: "40px",
|
|
31620
31662
|
legendData: [{
|
|
31621
31663
|
iconColor: "#CCDCDD",
|
|
31622
31664
|
iconType: "Square",
|
|
@@ -31626,13 +31668,15 @@ const SeparatedLineBarChart = ({
|
|
|
31626
31668
|
iconType: "LegendUnionIcon",
|
|
31627
31669
|
title: "INC Sales ROI"
|
|
31628
31670
|
}]
|
|
31629
|
-
})))
|
|
31671
|
+
})));
|
|
31630
31672
|
};
|
|
31631
31673
|
|
|
31632
31674
|
function SingleChart({
|
|
31633
|
-
|
|
31675
|
+
barData,
|
|
31676
|
+
height = 450,
|
|
31677
|
+
width = "100%"
|
|
31634
31678
|
}) {
|
|
31635
|
-
const dataWithIndex =
|
|
31679
|
+
const dataWithIndex = barData?.map((item, index) => ({
|
|
31636
31680
|
...item,
|
|
31637
31681
|
index,
|
|
31638
31682
|
shortLabel: item.label.replace("Vendor Selling Event: ", "Wk ")
|
|
@@ -31643,7 +31687,20 @@ function SingleChart({
|
|
|
31643
31687
|
payload
|
|
31644
31688
|
}) => {
|
|
31645
31689
|
const label = dataWithIndex[payload.value]?.label ?? "";
|
|
31646
|
-
const
|
|
31690
|
+
const words = label.split(' ');
|
|
31691
|
+
const chunks = [];
|
|
31692
|
+
let currentChunk = '';
|
|
31693
|
+
words.forEach(word => {
|
|
31694
|
+
if (currentChunk.length + word.length > 15) {
|
|
31695
|
+
chunks.push(currentChunk.trim());
|
|
31696
|
+
currentChunk = word;
|
|
31697
|
+
} else {
|
|
31698
|
+
currentChunk += (currentChunk ? ' ' : '') + word;
|
|
31699
|
+
}
|
|
31700
|
+
});
|
|
31701
|
+
if (currentChunk) {
|
|
31702
|
+
chunks.push(currentChunk.trim());
|
|
31703
|
+
}
|
|
31647
31704
|
return /*#__PURE__*/React__default["default"].createElement("g", {
|
|
31648
31705
|
transform: `translate(${x},${y})`
|
|
31649
31706
|
}, /*#__PURE__*/React__default["default"].createElement("text", {
|
|
@@ -31652,31 +31709,31 @@ function SingleChart({
|
|
|
31652
31709
|
dy: 16,
|
|
31653
31710
|
textAnchor: "middle",
|
|
31654
31711
|
fill: "#212121",
|
|
31655
|
-
fontSize:
|
|
31656
|
-
fontWeight: "400",
|
|
31712
|
+
fontSize: 10,
|
|
31657
31713
|
fontFamily: "Poppins"
|
|
31658
|
-
}, /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
31714
|
+
}, chunks.map((chunk, i) => /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
31715
|
+
key: i,
|
|
31659
31716
|
x: 0,
|
|
31660
|
-
dy:
|
|
31661
|
-
},
|
|
31662
|
-
|
|
31663
|
-
|
|
31664
|
-
|
|
31717
|
+
dy: i === 0 ? "0.71em" : "1.2em"
|
|
31718
|
+
}, chunk))));
|
|
31719
|
+
};
|
|
31720
|
+
const CustomTooltip = ({
|
|
31721
|
+
active,
|
|
31722
|
+
payload
|
|
31723
|
+
}) => {
|
|
31724
|
+
if (!active || !payload || !payload.length) return null;
|
|
31725
|
+
const data = payload[0]?.payload;
|
|
31726
|
+
if (!data) return null;
|
|
31727
|
+
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, `${data.typeTitle}: ${getFormattedValue(data.value)}${getFormattedUnits(data.value)}`));
|
|
31665
31728
|
};
|
|
31666
|
-
const [startIndex, setStartIndex] = React$1.useState(0);
|
|
31667
|
-
const [endIndex, setEndIndex] = React$1.useState(dataWithIndex?.length - 1);
|
|
31668
31729
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31669
31730
|
style: {
|
|
31670
31731
|
width: "100%",
|
|
31671
|
-
height: 600
|
|
31672
|
-
}
|
|
31673
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
31674
|
-
style: {
|
|
31675
31732
|
height: "100%"
|
|
31676
31733
|
}
|
|
31677
31734
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
|
|
31678
31735
|
width: "100%",
|
|
31679
|
-
height: "
|
|
31736
|
+
height: "95%"
|
|
31680
31737
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.ComposedChart, {
|
|
31681
31738
|
data: dataWithIndex,
|
|
31682
31739
|
margin: {
|
|
@@ -31692,7 +31749,7 @@ function SingleChart({
|
|
|
31692
31749
|
dataKey: "index",
|
|
31693
31750
|
tick: /*#__PURE__*/React__default["default"].createElement(CustomizedTick, null),
|
|
31694
31751
|
interval: 0,
|
|
31695
|
-
height:
|
|
31752
|
+
height: 80,
|
|
31696
31753
|
padding: {
|
|
31697
31754
|
left: 20,
|
|
31698
31755
|
right: 20
|
|
@@ -31701,7 +31758,9 @@ function SingleChart({
|
|
|
31701
31758
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
|
|
31702
31759
|
tickFormatter: v => `$${v / 1000}k`,
|
|
31703
31760
|
hide: true
|
|
31704
|
-
}), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip,
|
|
31761
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
|
|
31762
|
+
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
|
|
31763
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
|
|
31705
31764
|
dataKey: "value",
|
|
31706
31765
|
fill: "#CCDCDD",
|
|
31707
31766
|
gap: "4px",
|
|
@@ -31711,29 +31770,25 @@ function SingleChart({
|
|
|
31711
31770
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.LabelList, {
|
|
31712
31771
|
dataKey: "value",
|
|
31713
31772
|
position: "top",
|
|
31714
|
-
formatter: value => `$${value
|
|
31773
|
+
formatter: value => `$${getFormattedValue(value)}${getFormattedUnits(value)}`,
|
|
31715
31774
|
fill: "#212121",
|
|
31716
31775
|
fontSize: 12,
|
|
31717
31776
|
fontWeight: "400",
|
|
31718
31777
|
fontFamily: "Poppins"
|
|
31719
31778
|
})), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
|
|
31720
|
-
dataKey: "index",
|
|
31721
31779
|
height: 30,
|
|
31722
|
-
|
|
31723
|
-
startIndex:
|
|
31724
|
-
endIndex:
|
|
31725
|
-
|
|
31726
|
-
|
|
31727
|
-
|
|
31728
|
-
},
|
|
31729
|
-
travellerWidth: 12
|
|
31730
|
-
})), /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
|
|
31780
|
+
travellerWidth: 10,
|
|
31781
|
+
startIndex: 0,
|
|
31782
|
+
endIndex: Math.min(6, barData.length - 1)
|
|
31783
|
+
}))), /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
|
|
31784
|
+
width: "100%",
|
|
31785
|
+
height: "40px",
|
|
31731
31786
|
legendData: [{
|
|
31732
31787
|
iconColor: "#CCDCDD",
|
|
31733
31788
|
iconType: "Square",
|
|
31734
31789
|
title: "INC Units"
|
|
31735
31790
|
}]
|
|
31736
|
-
}))
|
|
31791
|
+
}));
|
|
31737
31792
|
}
|
|
31738
31793
|
|
|
31739
31794
|
styled__default["default"].div`
|
|
@@ -31964,16 +32019,8 @@ SegmentedButton.defaultProps = {
|
|
|
31964
32019
|
};
|
|
31965
32020
|
|
|
31966
32021
|
function InnerBarChart({
|
|
31967
|
-
|
|
32022
|
+
brushInnerBarData
|
|
31968
32023
|
}) {
|
|
31969
|
-
const processedData = data.map(item => {
|
|
31970
|
-
const parts = item.label.replace("Vendor Selling Event:", "").trim();
|
|
31971
|
-
return {
|
|
31972
|
-
...item,
|
|
31973
|
-
shortLabel: parts
|
|
31974
|
-
};
|
|
31975
|
-
});
|
|
31976
|
-
const format = v => v >= 1000 ? `${v / 1000}K` : v;
|
|
31977
32024
|
const BarWithInner = props => {
|
|
31978
32025
|
const {
|
|
31979
32026
|
x,
|
|
@@ -32002,7 +32049,7 @@ function InnerBarChart({
|
|
|
32002
32049
|
fontWeight: 400,
|
|
32003
32050
|
fontFamily: "Poppins",
|
|
32004
32051
|
fill: "#212121"
|
|
32005
|
-
},
|
|
32052
|
+
}, `${getFormattedValue(payload.total)}${getFormattedUnits(payload.total)}`), /*#__PURE__*/React__default["default"].createElement("rect", {
|
|
32006
32053
|
x: x + width * 0.2,
|
|
32007
32054
|
y: innerY,
|
|
32008
32055
|
width: width * 0.6,
|
|
@@ -32018,7 +32065,7 @@ function InnerBarChart({
|
|
|
32018
32065
|
fontWeight: 400,
|
|
32019
32066
|
fontFamily: "Poppins",
|
|
32020
32067
|
fill: "#212121"
|
|
32021
|
-
},
|
|
32068
|
+
}, `${getFormattedValue(payload.actual)}${getFormattedUnits(payload.actual)}`));
|
|
32022
32069
|
};
|
|
32023
32070
|
const CustomTooltip = ({
|
|
32024
32071
|
active,
|
|
@@ -32027,9 +32074,8 @@ function InnerBarChart({
|
|
|
32027
32074
|
}) => {
|
|
32028
32075
|
if (!active || !payload || !payload.length) return null;
|
|
32029
32076
|
const data = payload[0].payload;
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
}, /*#__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)));
|
|
32077
|
+
const repeaterPercentage = (data.actual / data.total * 100).toFixed(1);
|
|
32078
|
+
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: ${getFormattedValue(data.total)}${getFormattedUnits(data.total)}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `Repeaters: ${getFormattedValue(data.actual)}${getFormattedUnits(data.actual)}`), /*#__PURE__*/React__default["default"].createElement(TooltipText, null, `% Repeaters: ${repeaterPercentage}%`));
|
|
32033
32079
|
};
|
|
32034
32080
|
const CustomizedTick = props => {
|
|
32035
32081
|
const {
|
|
@@ -32037,7 +32083,23 @@ function InnerBarChart({
|
|
|
32037
32083
|
y,
|
|
32038
32084
|
payload
|
|
32039
32085
|
} = props;
|
|
32040
|
-
const
|
|
32086
|
+
const label = payload.value;
|
|
32087
|
+
|
|
32088
|
+
// Split the label into chunks of words
|
|
32089
|
+
const words = label.split(" ");
|
|
32090
|
+
const chunks = [];
|
|
32091
|
+
let currentChunk = "";
|
|
32092
|
+
words.forEach(word => {
|
|
32093
|
+
if (currentChunk.length + word.length > 15) {
|
|
32094
|
+
chunks.push(currentChunk.trim());
|
|
32095
|
+
currentChunk = word;
|
|
32096
|
+
} else {
|
|
32097
|
+
currentChunk += " " + word;
|
|
32098
|
+
}
|
|
32099
|
+
});
|
|
32100
|
+
if (currentChunk) {
|
|
32101
|
+
chunks.push(currentChunk.trim());
|
|
32102
|
+
}
|
|
32041
32103
|
return /*#__PURE__*/React__default["default"].createElement("g", {
|
|
32042
32104
|
transform: `translate(${x},${y})`
|
|
32043
32105
|
}, /*#__PURE__*/React__default["default"].createElement("text", {
|
|
@@ -32048,104 +32110,82 @@ function InnerBarChart({
|
|
|
32048
32110
|
fill: "#212121",
|
|
32049
32111
|
fontSize: 10,
|
|
32050
32112
|
fontFamily: "Poppins"
|
|
32051
|
-
}, /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
32052
|
-
|
|
32053
|
-
dy: "0.71em"
|
|
32054
|
-
}, "Vendor"), /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
32113
|
+
}, chunks.map((chunk, i) => /*#__PURE__*/React__default["default"].createElement("tspan", {
|
|
32114
|
+
key: i,
|
|
32055
32115
|
x: 0,
|
|
32056
|
-
dy: "1.2em"
|
|
32057
|
-
},
|
|
32058
|
-
x: 0,
|
|
32059
|
-
dy: "1.2em"
|
|
32060
|
-
}, labelText)));
|
|
32116
|
+
dy: i === 0 ? "0.71em" : "1.2em"
|
|
32117
|
+
}, chunk))));
|
|
32061
32118
|
};
|
|
32062
32119
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
32063
|
-
|
|
32064
|
-
|
|
32065
|
-
|
|
32066
|
-
|
|
32120
|
+
style: {
|
|
32121
|
+
width: "100%",
|
|
32122
|
+
height: "100%"
|
|
32123
|
+
}
|
|
32124
|
+
}, /*#__PURE__*/React__default["default"].createElement(recharts.ResponsiveContainer, {
|
|
32067
32125
|
width: "100%",
|
|
32068
|
-
height:
|
|
32126
|
+
height: "95%"
|
|
32069
32127
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.BarChart, {
|
|
32070
|
-
data:
|
|
32128
|
+
data: brushInnerBarData,
|
|
32071
32129
|
margin: {
|
|
32072
32130
|
top: 30,
|
|
32073
32131
|
right: 30,
|
|
32074
32132
|
left: 20,
|
|
32075
|
-
bottom:
|
|
32133
|
+
bottom: 80
|
|
32076
32134
|
}
|
|
32077
32135
|
}, /*#__PURE__*/React__default["default"].createElement(recharts.CartesianGrid, {
|
|
32078
32136
|
strokeDasharray: "3 3",
|
|
32079
32137
|
vertical: false
|
|
32080
32138
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.XAxis, {
|
|
32081
|
-
dataKey: "
|
|
32139
|
+
dataKey: "label",
|
|
32082
32140
|
tick: /*#__PURE__*/React__default["default"].createElement(CustomizedTick, null),
|
|
32083
|
-
height:
|
|
32141
|
+
height: 80,
|
|
32084
32142
|
interval: 0
|
|
32085
32143
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.YAxis, {
|
|
32086
32144
|
type: "number",
|
|
32087
32145
|
domain: [0, "dataMax + 2000"],
|
|
32088
|
-
|
|
32146
|
+
hide: true
|
|
32089
32147
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.Tooltip, {
|
|
32090
32148
|
content: /*#__PURE__*/React__default["default"].createElement(CustomTooltip, null)
|
|
32091
|
-
}), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
|
|
32092
|
-
height: 30,
|
|
32093
|
-
travellerWidth: 10,
|
|
32094
|
-
startIndex: 0,
|
|
32095
|
-
endIndex: 5,
|
|
32096
|
-
y: 380
|
|
32097
32149
|
}), /*#__PURE__*/React__default["default"].createElement(recharts.Bar, {
|
|
32098
32150
|
dataKey: "total",
|
|
32099
32151
|
shape: /*#__PURE__*/React__default["default"].createElement(BarWithInner, null),
|
|
32100
32152
|
barSize: 36
|
|
32101
|
-
})
|
|
32153
|
+
}), /*#__PURE__*/React__default["default"].createElement(recharts.Brush, {
|
|
32154
|
+
height: 30,
|
|
32155
|
+
travellerWidth: 10,
|
|
32156
|
+
startIndex: 0,
|
|
32157
|
+
endIndex: Math.min(6, brushInnerBarData.length - 1)
|
|
32158
|
+
}))), /*#__PURE__*/React__default["default"].createElement(PerformanceAnalyticsLegend, {
|
|
32159
|
+
width: "100%",
|
|
32160
|
+
height: "40px",
|
|
32161
|
+
legendData: [{
|
|
32162
|
+
iconColor: "#CCDCDD",
|
|
32163
|
+
iconType: "Square",
|
|
32164
|
+
title: "New Shoppers"
|
|
32165
|
+
}, {
|
|
32166
|
+
iconColor: "#07575b",
|
|
32167
|
+
iconType: "Square",
|
|
32168
|
+
title: "Repeaters"
|
|
32169
|
+
}]
|
|
32170
|
+
}));
|
|
32102
32171
|
}
|
|
32103
32172
|
|
|
32104
|
-
const Container = styled__default["default"].div`
|
|
32105
|
-
width: ${props => props.width};
|
|
32106
|
-
height: ${props => props.height};
|
|
32107
|
-
padding: 15px;
|
|
32108
|
-
display: flex;
|
|
32109
|
-
flex-direction: column;
|
|
32110
|
-
#Segment {
|
|
32111
|
-
width: auto;
|
|
32112
|
-
white-space: nowrap;
|
|
32113
|
-
font-size: 14px;
|
|
32114
|
-
font-weight: 500;
|
|
32115
|
-
font-family: "Poppins"
|
|
32116
|
-
}
|
|
32117
|
-
`;
|
|
32118
|
-
styled__default["default"].div`
|
|
32119
|
-
font-family: sans-serif;
|
|
32120
|
-
text-align: center;
|
|
32121
|
-
`;
|
|
32122
|
-
styled__default["default"].div`
|
|
32123
|
-
height: 25%;
|
|
32124
|
-
`;
|
|
32125
|
-
styled__default["default"].div`
|
|
32126
|
-
height: 75%;
|
|
32127
|
-
`;
|
|
32128
|
-
styled__default["default"].div`
|
|
32129
|
-
height: 100%;
|
|
32130
|
-
display: flex;
|
|
32131
|
-
flex-direction: column;
|
|
32132
|
-
background-color: white;
|
|
32133
|
-
`;
|
|
32134
|
-
|
|
32135
32173
|
const BrushChart = props => {
|
|
32136
32174
|
const {
|
|
32137
32175
|
width,
|
|
32138
32176
|
height,
|
|
32139
|
-
|
|
32140
|
-
|
|
32141
|
-
|
|
32177
|
+
brushInnerBarData,
|
|
32178
|
+
brushBarIncData,
|
|
32179
|
+
brushBarBasketData,
|
|
32180
|
+
brushAreaBarData,
|
|
32181
|
+
title
|
|
32142
32182
|
} = props;
|
|
32143
32183
|
const segmentedbuttonOptions = ["New Shoppers & Repeaters", "INC Sales & ROI", "INC Units", "Basket Lift"];
|
|
32144
32184
|
const [selectedOption, setSelectedOption] = React$1.useState(segmentedbuttonOptions[0]);
|
|
32145
32185
|
return /*#__PURE__*/React__default["default"].createElement(Container, {
|
|
32146
32186
|
height: height,
|
|
32147
32187
|
width: width
|
|
32148
|
-
}, /*#__PURE__*/React__default["default"].createElement(SegmentedButton, {
|
|
32188
|
+
}, /*#__PURE__*/React__default["default"].createElement(Title$1, null, title), /*#__PURE__*/React__default["default"].createElement(SegmentedButton, {
|
|
32149
32189
|
gap: "8px",
|
|
32150
32190
|
options: segmentedbuttonOptions.map(value => ({
|
|
32151
32191
|
value
|
|
@@ -32157,13 +32197,13 @@ const BrushChart = props => {
|
|
|
32157
32197
|
return setSelectedOption(value);
|
|
32158
32198
|
}
|
|
32159
32199
|
}), selectedOption === "New Shoppers & Repeaters" && /*#__PURE__*/React__default["default"].createElement(InnerBarChart, {
|
|
32160
|
-
|
|
32200
|
+
brushInnerBarData: brushInnerBarData
|
|
32161
32201
|
}), selectedOption === "INC Sales & ROI" && /*#__PURE__*/React__default["default"].createElement(SeparatedLineBarChart, {
|
|
32162
|
-
|
|
32202
|
+
brushAreaBarData: brushAreaBarData
|
|
32163
32203
|
}), selectedOption === "INC Units" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
|
|
32164
|
-
|
|
32204
|
+
barData: brushBarIncData
|
|
32165
32205
|
}), selectedOption === "Basket Lift" && /*#__PURE__*/React__default["default"].createElement(SingleChart, {
|
|
32166
|
-
|
|
32206
|
+
barData: brushBarBasketData
|
|
32167
32207
|
}));
|
|
32168
32208
|
};
|
|
32169
32209
|
|
|
@@ -32262,7 +32302,10 @@ const VisibleCardsContainer = styled__default["default"].div`
|
|
|
32262
32302
|
|
|
32263
32303
|
.prev-card,
|
|
32264
32304
|
.next-card {
|
|
32265
|
-
|
|
32305
|
+
background: #d3d3d3;
|
|
32306
|
+
> * {
|
|
32307
|
+
opacity: 0.5;
|
|
32308
|
+
}
|
|
32266
32309
|
}
|
|
32267
32310
|
|
|
32268
32311
|
.prev-card {
|