sag_components 1.0.680 → 1.0.682
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.
|
@@ -13,7 +13,7 @@ const CollapseMenuItemContainer = exports.CollapseMenuItemContainer = _styledCom
|
|
|
13
13
|
const CollapseMenuItemTitle = exports.CollapseMenuItemTitle = _styledComponents.default.h3(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 16px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n"])));
|
|
14
14
|
const CollapseMenuItemContentContainer = exports.CollapseMenuItemContentContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 14px;\n @media (max-width: 1536px) {\n font-size: 12px;\n }\n"])));
|
|
15
15
|
const RightIconContainer = exports.RightIconContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n margin-left: auto;\n"])));
|
|
16
|
-
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n position: relative
|
|
16
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n /* position: relative; */\n width: ", ";\n height: ", ";\n display: flex;\n gap: 20px;\n padding-bottom: 25px;\n"])), props => props.width, props => props.height);
|
|
17
17
|
const EventType = exports.EventType = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n font-weight: 500;\n margin: 16px 0 20px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
18
18
|
const EventName = exports.EventName = _styledComponents.default.h3(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n font-weight: 500;\n margin: 0 0 20px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
19
19
|
const EventNameSpan = exports.EventNameSpan = _styledComponents.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n"])));
|
|
@@ -27,26 +27,12 @@ const TwoBarCharts = props => {
|
|
|
27
27
|
isDollar,
|
|
28
28
|
width,
|
|
29
29
|
height,
|
|
30
|
-
|
|
30
|
+
barChartColorFirst,
|
|
31
|
+
barChartColorSecond,
|
|
31
32
|
showLegend,
|
|
32
33
|
legendData
|
|
33
34
|
} = props;
|
|
34
|
-
|
|
35
|
-
// const [BarChartContainerWidth, setBarChartContainerWidth] = useState(0);
|
|
36
|
-
// const [BarChartContainerHeight, setBarChartContainerHeight] = useState(0);
|
|
37
|
-
|
|
38
35
|
const controlsContainerRef = (0, _react.useRef)();
|
|
39
|
-
|
|
40
|
-
// useEffect(() => {
|
|
41
|
-
// const { offsetWidth } = controlsContainerRef.current;
|
|
42
|
-
// setBarChartContainerWidth(offsetWidth - 20);
|
|
43
|
-
// }, [width]);
|
|
44
|
-
|
|
45
|
-
// useEffect(() => {
|
|
46
|
-
// const { offsetHeight } = controlsContainerRef.current;
|
|
47
|
-
// setBarChartContainerHeight(offsetHeight - 40);
|
|
48
|
-
// }, [height]);
|
|
49
|
-
|
|
50
36
|
const displayFormattedValue = value => {
|
|
51
37
|
if (!value) return '';
|
|
52
38
|
let formattedValue = '';
|
|
@@ -71,19 +57,13 @@ const TwoBarCharts = props => {
|
|
|
71
57
|
const {
|
|
72
58
|
x,
|
|
73
59
|
y,
|
|
74
|
-
stroke,
|
|
75
60
|
payload
|
|
76
61
|
} = props;
|
|
77
62
|
if (barChartData && barChartData.length > 0 && payload) {
|
|
78
63
|
const retailerData = barChartData.filter(item => item.title === payload.value);
|
|
79
64
|
if (retailerData && retailerData.length > 0) {
|
|
80
|
-
const {
|
|
81
|
-
offerType
|
|
82
|
-
} = retailerData[0];
|
|
83
65
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
84
66
|
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
85
|
-
// onMouseEnter={() => handleMouseEnter(offerType)}
|
|
86
|
-
// onMouseLeave={handleMouseLeave}
|
|
87
67
|
}, /*#__PURE__*/_react.default.createElement("text", {
|
|
88
68
|
x: 0,
|
|
89
69
|
y: 0,
|
|
@@ -157,21 +137,22 @@ const TwoBarCharts = props => {
|
|
|
157
137
|
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, {
|
|
158
138
|
content: /*#__PURE__*/_react.default.createElement(CustomTooltip, null)
|
|
159
139
|
}), /*#__PURE__*/_react.default.createElement(_recharts.Tooltip, null), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
160
|
-
dataKey: "
|
|
161
|
-
fill:
|
|
140
|
+
dataKey: "valueOne",
|
|
141
|
+
fill: barChartColorFirst,
|
|
162
142
|
minPointSize: 5,
|
|
163
143
|
barSize: barSize !== null && barSize !== void 0 ? barSize : 60,
|
|
164
144
|
radius: [5, 5, 0, 0]
|
|
165
145
|
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
166
|
-
dataKey: "
|
|
146
|
+
dataKey: "valueOne",
|
|
167
147
|
content: CustomizedLabel
|
|
168
148
|
})), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
169
|
-
dataKey: "
|
|
170
|
-
fill:
|
|
149
|
+
dataKey: "valueTwo",
|
|
150
|
+
fill: barChartColorSecond,
|
|
171
151
|
minPointSize: 10,
|
|
152
|
+
barSize: barSize !== null && barSize !== void 0 ? barSize : 60,
|
|
172
153
|
radius: [5, 5, 0, 0]
|
|
173
154
|
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
174
|
-
dataKey: "
|
|
155
|
+
dataKey: "valueTwo",
|
|
175
156
|
content: CustomizedLabel
|
|
176
157
|
})))), showLegend && /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.default, {
|
|
177
158
|
legendData: legendData
|
|
@@ -184,28 +165,34 @@ TwoBarCharts.defaultProps = {
|
|
|
184
165
|
barChartData: [{
|
|
185
166
|
title: 'Food Lion',
|
|
186
167
|
date: '15.01.24-31.01.24',
|
|
187
|
-
|
|
168
|
+
valueOne: 542366,
|
|
169
|
+
valueTwo: 542366
|
|
188
170
|
}, {
|
|
189
171
|
title: 'Hannaford',
|
|
190
172
|
date: '15.01.24-31.01.24',
|
|
191
|
-
|
|
173
|
+
valueOne: 699511,
|
|
174
|
+
valueTwo: 699511
|
|
192
175
|
}, {
|
|
193
176
|
title: 'The Giant Company',
|
|
194
177
|
date: '15.01.24-31.01.24',
|
|
195
|
-
|
|
178
|
+
valueOne: 403092,
|
|
179
|
+
valueTwo: 403092
|
|
196
180
|
}, {
|
|
197
181
|
title: 'Giant Food',
|
|
198
182
|
date: '15.01.24-31.01.24',
|
|
199
|
-
|
|
183
|
+
valueOne: 396184,
|
|
184
|
+
valueTwo: 396184
|
|
200
185
|
}, {
|
|
201
186
|
title: 'Stop&Shop',
|
|
202
187
|
date: '15.01.24-31.01.24',
|
|
203
|
-
|
|
188
|
+
valueOne: 415317,
|
|
189
|
+
valueTwo: 415317
|
|
204
190
|
}],
|
|
205
191
|
width: '100%',
|
|
206
192
|
height: '100%',
|
|
207
193
|
barSize: 60,
|
|
208
|
-
|
|
194
|
+
barChartColorFirst: '#BD9EFF',
|
|
195
|
+
barChartColorSecond: '#5865c8',
|
|
209
196
|
isDollar: true,
|
|
210
197
|
showLegend: true,
|
|
211
198
|
legendData: [{
|