sag_components 1.0.418 → 1.0.419
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.
|
@@ -98,30 +98,14 @@ const TotalBenchmarkAreachart = props => {
|
|
|
98
98
|
const endWeekRangeNumeric = Number(endWeekRange);
|
|
99
99
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
100
100
|
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
101
|
-
}, currentWeekNumeric
|
|
101
|
+
}, currentWeekNumeric >= startWeekRangeNumeric && currentWeekNumeric <= endWeekRangeNumeric ? /*#__PURE__*/_react.default.createElement("rect", {
|
|
102
102
|
x: -15,
|
|
103
103
|
y: 0,
|
|
104
|
-
width: "
|
|
104
|
+
width: "40",
|
|
105
105
|
height: "18",
|
|
106
106
|
rx: 9,
|
|
107
|
-
fill: xselectedColor
|
|
108
|
-
|
|
109
|
-
}) : currentWeekNumeric > startWeekRangeNumeric && currentWeekNumeric < endWeekRangeNumeric ? /*#__PURE__*/_react.default.createElement("rect", {
|
|
110
|
-
x: -30,
|
|
111
|
-
y: 0,
|
|
112
|
-
width: "80",
|
|
113
|
-
height: "18",
|
|
114
|
-
rx: 9,
|
|
115
|
-
fill: xselectedColor
|
|
116
|
-
//fillOpacity="0.30"
|
|
117
|
-
}) : currentWeekNumeric === endWeekRangeNumeric || currentWeekNumeric === endWeekRangeNumeric + 1 ? /*#__PURE__*/_react.default.createElement("rect", {
|
|
118
|
-
x: -30,
|
|
119
|
-
y: 0,
|
|
120
|
-
width: "55",
|
|
121
|
-
height: "18",
|
|
122
|
-
rx: 9,
|
|
123
|
-
fill: xselectedColor
|
|
124
|
-
//fillOpacity="0.30"
|
|
107
|
+
fill: xselectedColor,
|
|
108
|
+
fillOpacity: "0.50"
|
|
125
109
|
}) : "", /*#__PURE__*/_react.default.createElement("text", {
|
|
126
110
|
x: 0,
|
|
127
111
|
y: 14,
|
|
@@ -142,6 +126,17 @@ const TotalBenchmarkAreachart = props => {
|
|
|
142
126
|
}
|
|
143
127
|
return null;
|
|
144
128
|
};
|
|
129
|
+
const getEventWeeksLegendData = () => /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendDataContainer, {
|
|
130
|
+
id: "EventWeeksLegendDataContainer"
|
|
131
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksTitleAndIconContainer, {
|
|
132
|
+
id: "EventWeeksTitleAndIconContainer"
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendColorRectangle, {
|
|
134
|
+
id: "EventWeeksLegendColorRectangle",
|
|
135
|
+
color: xselectedColor
|
|
136
|
+
}), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.EventWeeksLegendTitle, {
|
|
137
|
+
id: "EventWeeksLegendTitle",
|
|
138
|
+
width: width
|
|
139
|
+
}, "Event weeks")));
|
|
145
140
|
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.ControlsContainer, {
|
|
146
141
|
id: "ControlsContainer",
|
|
147
142
|
height: height,
|
|
@@ -244,7 +239,7 @@ const TotalBenchmarkAreachart = props => {
|
|
|
244
239
|
fill: "url(#colorValue2)"
|
|
245
240
|
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
246
241
|
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, null)
|
|
247
|
-
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null))))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
242
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null)))), getEventWeeksLegendData()) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
248
243
|
noDataText: noDataText
|
|
249
244
|
}));
|
|
250
245
|
};
|
|
@@ -323,5 +318,7 @@ TotalBenchmarkAreachart.defaultProps = {
|
|
|
323
318
|
opacity: "191",
|
|
324
319
|
value1Title: "Actual Sales",
|
|
325
320
|
value2Title: "Baseline Sales",
|
|
326
|
-
noDataText: ""
|
|
321
|
+
noDataText: "",
|
|
322
|
+
startWeekRange: 0,
|
|
323
|
+
endWeekRange: 0
|
|
327
324
|
};
|
|
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.DetailsRowArrowContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = exports.AreaChartContainer = void 0;
|
|
7
|
+
exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.EventWeeksTitleAndIconContainer = exports.EventWeeksLegendTitle = exports.EventWeeksLegendDataContainer = exports.EventWeeksLegendColorRectangle = exports.DetailsRowArrowContainer = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = exports.AreaChartContainer = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
|
11
11
|
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
12
12
|
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background: #ffffff;\n border-radius: 12px;\n flex-basis: 100%;\n"])));
|
|
13
13
|
const AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 50%;\n"])));
|
|
@@ -21,4 +21,8 @@ const DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledCompo
|
|
|
21
21
|
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
|
|
22
22
|
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
23
23
|
const FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0;\n"])));
|
|
24
|
-
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
|
|
24
|
+
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
|
|
25
|
+
const EventWeeksLegendDataContainer = exports.EventWeeksLegendDataContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 40px;\n margin-top: 10px;\n @media (max-width: 1536px) {\n gap: 38px;\n }\n @media (max-width: 1366px) {\n gap: 30px;\n }\n"])));
|
|
26
|
+
const EventWeeksTitleAndIconContainer = exports.EventWeeksTitleAndIconContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
27
|
+
const EventWeeksLegendTitle = exports.EventWeeksLegendTitle = _styledComponents.default.h4(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n margin: 0 0 0 5px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
28
|
+
const EventWeeksLegendColorRectangle = exports.EventWeeksLegendColorRectangle = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.5rem;\n min-width: 0.5rem;\n height: 0.5rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
|