sag_components 1.0.581 → 1.0.583
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/stories/components/BannersDropdown.js +31 -26
- package/dist/stories/components/FilterButton.js +4 -10
- package/dist/stories/components/FilterButton.style.js +1 -1
- package/dist/stories/components/FilterPanel.js +96 -100
- package/dist/stories/components/FilterPanel.style.js +8 -11
- package/dist/stories/components/OneColumnContainer.js +21 -13
- package/dist/stories/components/OneColumnContainer.style.js +6 -4
- package/dist/stories/components/PopupCharts.js +113 -81
- package/dist/stories/components/PopupCharts.style.js +6 -6
- package/dist/stories/components/ProductsVariety.js +29 -31
- package/dist/stories/components/ProductsVariety.style.js +4 -4
- package/dist/stories/components/SalesAndROI.js +22 -8
- package/dist/stories/components/SalesAndROI.style.js +2 -3
- package/dist/stories/components/TabMenu.js +3 -1
- package/dist/stories/components/TotalHorizontalCharts.js +32 -9
- package/dist/stories/components/TotalHorizontalCharts.style.js +6 -6
- package/package.json +1 -1
- package/.history/.env_20231001120549 +0 -0
- package/.history/.env_20231001120613 +0 -1
- package/.history/.env_20231003143620 +0 -1
- package/.history/.eslintrc_20230928112617.js +0 -26
- package/.history/.eslintrc_20230928130534.js +0 -27
- package/.history/.eslintrc_20230928133400.js +0 -28
- package/.history/.eslintrc_20230928133404.js +0 -28
- package/.history/.eslintrc_20230928133416.js +0 -28
- package/.history/.eslintrc_20230928133419.js +0 -28
- package/.history/.eslintrc_20230928133432.js +0 -28
- package/.history/.eslintrc_20230928133439.js +0 -28
- package/.history/.eslintrc_20230928133458.js +0 -29
- package/.history/.eslintrc_20230928133500.js +0 -28
- package/.history/.eslintrc_20230928134009.js +0 -28
- package/.history/.eslintrc_20230928135318.js +0 -34
- package/.history/.eslintrc_20230928135321.js +0 -34
- package/.history/.eslintrc_20230928135323.js +0 -34
- package/.history/.eslintrc_20230928135332.js +0 -34
- package/.history/.eslintrc_20230928135333.js +0 -34
- package/.history/.eslintrc_20230928135352.js +0 -29
- package/.history/.eslintrc_20230928135353.js +0 -29
- package/.history/.eslintrc_20230928135355.js +0 -29
- package/.history/.eslintrc_20230928135408.js +0 -29
- package/.history/.eslintrc_20230928135538.js +0 -30
- package/.history/.eslintrc_20230928135539.js +0 -30
- package/.history/.eslintrc_20230928135543.js +0 -30
- package/.history/.gitignore_20230921093332 +0 -119
- package/.history/.gitignore_20230921111638 +0 -120
- package/.history/.gitignore_20230921111650 +0 -120
- package/.history/.gitignore_20230921111810 +0 -121
- package/.history/package-lock_20231114111138.json +0 -47810
- package/.history/package-lock_20231114111158.json +0 -47802
- package/.history/package_20231029152422.json +0 -82
- package/.history/package_20231029153420.json +0 -82
- package/.history/package_20231029154416.json +0 -82
- package/.history/package_20231030094127.json +0 -82
- package/.history/package_20231030114707.json +0 -82
- package/.history/package_20231030130704.json +0 -82
- package/.history/package_20231030132422.json +0 -82
- package/.history/package_20231030134051.json +0 -82
- package/.history/package_20231030142913.json +0 -82
- package/.history/package_20231030143556.json +0 -82
- package/.history/package_20231030144210.json +0 -82
- package/.history/package_20231101113942.json +0 -82
- package/.history/package_20231101114544.json +0 -82
- package/.history/package_20231101151518.json +0 -82
- package/.history/package_20231101154501.json +0 -82
- package/.history/package_20231101155811.json +0 -82
- package/.history/package_20231101160235.json +0 -82
- package/.history/package_20231101160406.json +0 -82
- package/.history/package_20231101161325.json +0 -82
- package/.history/package_20231101161333.json +0 -82
- package/.history/package_20231102123623.json +0 -82
- package/.history/package_20231102125741.json +0 -82
- package/.history/package_20231102130857.json +0 -82
- package/.history/package_20231102132227.json +0 -82
- package/.history/package_20231102142340.json +0 -82
- package/.history/package_20231102143256.json +0 -82
- package/.history/package_20231105153539.json +0 -82
- package/.history/package_20231105154332.json +0 -82
- package/.history/package_20231105171201.json +0 -82
- package/.history/package_20231106123849.json +0 -82
- package/.history/package_20231107170638.json +0 -82
- package/.history/package_20231109103647.json +0 -82
- package/.history/package_20231109103911.json +0 -82
- package/.history/package_20231109105426.json +0 -82
- package/.history/package_20231109132014.json +0 -82
- package/.history/package_20231109132115.json +0 -82
- package/.history/package_20231114100517.json +0 -82
- package/.history/package_20231114100859.json +0 -82
- package/.history/package_20231114101553.json +0 -82
- package/.history/package_20231114102545.json +0 -82
- package/.history/package_20231114111208.json +0 -83
- package/.history/package_20231114111515.json +0 -83
- package/.history/package_20231114112931.json +0 -83
- package/.history/package_20231114113014.json +0 -83
- package/.history/package_20231114113155.json +0 -83
- package/.history/package_20231114124318.json +0 -83
- package/.history/package_20231114125107.json +0 -83
- package/.history/package_20231114125510.json +0 -83
- package/.history/package_20231114132634.json +0 -83
- package/.history/package_20231116165815.json +0 -83
- package/.history/package_20231116165916.json +0 -83
- package/.history/package_20231119113637.json +0 -83
- package/.history/package_20231120100907.json +0 -83
- package/.history/package_20231121151523.json +0 -77
- package/.history/package_20231121155513.json +0 -77
- package/.history/package_20231121162434.json +0 -77
- package/.history/package_20231122100718.json +0 -77
- package/.history/package_20231128125149.json +0 -82
- package/.history/package_20231128125208.json +0 -82
|
@@ -7,23 +7,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _TotalDoughnutChart = require("./TotalDoughnutChart");
|
|
10
|
+
var _BarChartsByWeeks = require("./BarChartsByWeeks");
|
|
11
|
+
var _TotalHorizontalCharts = require("./TotalHorizontalCharts");
|
|
10
12
|
var _CloseXIcon = require("./icons/CloseXIcon");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
13
|
+
var _FoodLionNewIcon = require("./icons/FoodLionNewIcon");
|
|
14
|
+
var _TheGiantCompanyNewIcon = require("./icons/TheGiantCompanyNewIcon");
|
|
15
|
+
var _StopAndShopNewIcon = require("./icons/StopAndShopNewIcon");
|
|
16
|
+
var _GiantFoodIcon_new = require("./icons/GiantFoodIcon_new");
|
|
17
|
+
var _HannafordIcon_new = require("./icons/HannafordIcon_new");
|
|
16
18
|
var _PopupCharts = require("./PopupCharts.style");
|
|
17
19
|
const PopupCharts = props => {
|
|
18
20
|
const {
|
|
19
21
|
title,
|
|
20
|
-
|
|
22
|
+
chartType,
|
|
23
|
+
popupChartsItemsData,
|
|
21
24
|
isPopupChartsOpen,
|
|
22
25
|
width,
|
|
23
26
|
height,
|
|
24
|
-
borderColor,
|
|
25
27
|
subtitleTextColor,
|
|
26
|
-
|
|
28
|
+
onCloseClick
|
|
27
29
|
} = props;
|
|
28
30
|
const [IsPopupChartsOpen, setIsPopupChartsOpen] = (0, _react.useState)(isPopupChartsOpen);
|
|
29
31
|
const divRef = (0, _react.useRef)(null);
|
|
@@ -34,80 +36,112 @@ const PopupCharts = props => {
|
|
|
34
36
|
top,
|
|
35
37
|
bottom
|
|
36
38
|
} = divRef.current.getBoundingClientRect();
|
|
37
|
-
const
|
|
38
|
-
setDivHeight(
|
|
39
|
+
const newHeight = bottom - top;
|
|
40
|
+
setDivHeight(newHeight);
|
|
39
41
|
}
|
|
40
42
|
}, [height]);
|
|
41
43
|
(0, _react.useEffect)(() => {
|
|
42
44
|
setIsPopupChartsOpen(isPopupChartsOpen);
|
|
43
45
|
}, [isPopupChartsOpen]);
|
|
44
|
-
const openPopupCharts = () => {
|
|
45
|
-
setIsPopupChartsOpen(true);
|
|
46
|
-
};
|
|
47
46
|
const closePopupCharts = e => {
|
|
48
47
|
setIsPopupChartsOpen(false);
|
|
49
|
-
|
|
48
|
+
onCloseClick(e);
|
|
50
49
|
};
|
|
51
50
|
const displayRetailerIcon = retailer => {
|
|
52
51
|
switch (retailer) {
|
|
53
|
-
case
|
|
54
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
55
|
-
case
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
57
|
-
case
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
case "The Giant Company":
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_TheGiantCompanyIcon.TheGiantCompanyIcon, null);
|
|
65
|
-
case "Giant Food":
|
|
66
|
-
return /*#__PURE__*/_react.default.createElement(_GiantFoodIcon.GiantFoodIcon, {
|
|
67
|
-
width: 80,
|
|
68
|
-
height: 25,
|
|
69
|
-
viewBox: "0 0 1300.000000 350.000000"
|
|
70
|
-
});
|
|
52
|
+
case 'Food Lion':
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_FoodLionNewIcon.FoodLionNewIcon, null);
|
|
54
|
+
case 'Hannaford':
|
|
55
|
+
return /*#__PURE__*/_react.default.createElement(_HannafordIcon_new.HannafordNewIcon, null);
|
|
56
|
+
case 'Stop&Shop':
|
|
57
|
+
return /*#__PURE__*/_react.default.createElement(_StopAndShopNewIcon.StopAndShopNewIcon, null);
|
|
58
|
+
case 'The Giant Company':
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement(_TheGiantCompanyNewIcon.TheGiantCompanyIcon, null);
|
|
60
|
+
case 'Giant Food':
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_GiantFoodIcon_new.GiantFoodNewIcon, null);
|
|
71
62
|
default:
|
|
72
|
-
return
|
|
63
|
+
return '';
|
|
73
64
|
}
|
|
74
65
|
};
|
|
75
|
-
const displayDoughnutChart = rowsData => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
title
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
66
|
+
const displayDoughnutChart = rowsData => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TotalDoughnutChart, {
|
|
67
|
+
currencySign: true,
|
|
68
|
+
dotCut: true,
|
|
69
|
+
legendData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.legendData,
|
|
70
|
+
noDataText: rowsData.noDataText,
|
|
71
|
+
title: rowsData.title,
|
|
72
|
+
value: rowsData.value,
|
|
73
|
+
height: "270px",
|
|
74
|
+
width: "100%",
|
|
75
|
+
itemsValuesSeparateLine: false,
|
|
76
|
+
isPercent: true
|
|
77
|
+
});
|
|
78
|
+
const displayBarChartsByWeeks = rowsData => /*#__PURE__*/_react.default.createElement(_BarChartsByWeeks.BarChartsByWeeks, {
|
|
79
|
+
legendData: [{
|
|
80
|
+
iconColor: '#90CE9C',
|
|
81
|
+
iconType: 'Square',
|
|
82
|
+
title: 'Sales'
|
|
83
|
+
}, {
|
|
84
|
+
iconColor: '#C906FD',
|
|
85
|
+
iconType: 'LegendLineIcon',
|
|
86
|
+
title: 'Category Average'
|
|
87
|
+
}],
|
|
88
|
+
showLegend: false,
|
|
89
|
+
barChartColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.barChartColor,
|
|
90
|
+
barChartData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.barChartData,
|
|
91
|
+
endWeekRange: rowsData === null || rowsData === void 0 ? void 0 : rowsData.endWeekRange,
|
|
92
|
+
startWeekRange: rowsData === null || rowsData === void 0 ? void 0 : rowsData.startWeekRange,
|
|
93
|
+
title: rowsData === null || rowsData === void 0 ? void 0 : rowsData.title,
|
|
94
|
+
tooltipTitle: rowsData === null || rowsData === void 0 ? void 0 : rowsData.tooltipTitle,
|
|
95
|
+
height: "240px",
|
|
96
|
+
width: "100%",
|
|
97
|
+
xselectedColor: rowsData === null || rowsData === void 0 ? void 0 : rowsData.xselectedColor // "#C7E7CD"
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const displayTotalHorizontalCharts = rowsData => /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TotalHorizontalCharts, {
|
|
101
|
+
currencySign: true,
|
|
102
|
+
dotCut: true,
|
|
103
|
+
chartsData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.chartsData,
|
|
104
|
+
noDataText: rowsData.noDataText,
|
|
105
|
+
title: rowsData.title,
|
|
106
|
+
value: rowsData.value,
|
|
107
|
+
showOutgoingBanner: false,
|
|
108
|
+
height: "240px",
|
|
109
|
+
width: "100%"
|
|
110
|
+
});
|
|
111
|
+
const displayChart = item => {
|
|
112
|
+
var _item$rowsData, _item$rowsData2, _item$rowsData3;
|
|
113
|
+
let content;
|
|
114
|
+
switch (chartType) {
|
|
115
|
+
case 'TotalDoughnutChart':
|
|
116
|
+
content = displayDoughnutChart((_item$rowsData = item.rowsData) === null || _item$rowsData === void 0 ? void 0 : _item$rowsData.TotalDoughnutChartDetails);
|
|
117
|
+
break;
|
|
118
|
+
case 'TotalHorizontalCharts':
|
|
119
|
+
content = displayTotalHorizontalCharts((_item$rowsData2 = item.rowsData) === null || _item$rowsData2 === void 0 ? void 0 : _item$rowsData2.TotalHorizontalChartsDetails);
|
|
120
|
+
break;
|
|
121
|
+
case 'BarChartsByWeeks':
|
|
122
|
+
content = displayBarChartsByWeeks((_item$rowsData3 = item.rowsData) === null || _item$rowsData3 === void 0 ? void 0 : _item$rowsData3.BarChartsByWeeksDetails);
|
|
123
|
+
break;
|
|
124
|
+
default:
|
|
125
|
+
content = '';
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement("div", null, content);
|
|
110
129
|
};
|
|
130
|
+
const displayChartItem = item => /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemMainContainer, {
|
|
131
|
+
id: "ChartItemMainContainer"
|
|
132
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemContainer, {
|
|
133
|
+
id: "ChartItemContainer",
|
|
134
|
+
style: {
|
|
135
|
+
cursor: 'pointer'
|
|
136
|
+
}
|
|
137
|
+
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemIconContainer, {
|
|
138
|
+
id: "ChartItemIconContainer"
|
|
139
|
+
}, displayRetailerIcon(item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemTitle, {
|
|
140
|
+
id: "ChartItemTitle",
|
|
141
|
+
subtitleTextColor: subtitleTextColor
|
|
142
|
+
}, item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartContentContainer, {
|
|
143
|
+
id: "ChartContentContainer"
|
|
144
|
+
}, displayChart(item)));
|
|
111
145
|
return /*#__PURE__*/_react.default.createElement(_PopupCharts.MainContainer, {
|
|
112
146
|
id: "MainContainer"
|
|
113
147
|
}, IsPopupChartsOpen && /*#__PURE__*/_react.default.createElement(_PopupCharts.ModalOverlay, {
|
|
@@ -125,21 +159,19 @@ const PopupCharts = props => {
|
|
|
125
159
|
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.Title, null, title), /*#__PURE__*/_react.default.createElement(_PopupCharts.CloseXIconContainer, {
|
|
126
160
|
id: "CloseXIconContainer",
|
|
127
161
|
onClick: e => closePopupCharts(e)
|
|
128
|
-
}, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, null))), /*#__PURE__*/_react.default.createElement(_PopupCharts.
|
|
129
|
-
id: "
|
|
130
|
-
maxHeight: divHeight ? (divHeight - 160).toString().concat(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
title: item.title,
|
|
134
|
-
rowsData: item.rowsData
|
|
135
|
-
}))))));
|
|
162
|
+
}, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, null))), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartsContainer, {
|
|
163
|
+
id: "ChartsContainer",
|
|
164
|
+
maxHeight: divHeight ? (divHeight - 160).toString().concat('', 'px') : null,
|
|
165
|
+
height: (popupChartsItemsData === null || popupChartsItemsData === void 0 ? void 0 : popupChartsItemsData.length) < 4 ? '45%' : '100%'
|
|
166
|
+
}, popupChartsItemsData.map(item => displayChartItem(item))))));
|
|
136
167
|
};
|
|
137
168
|
var _default = exports.default = PopupCharts;
|
|
138
169
|
PopupCharts.defaultProps = {
|
|
170
|
+
title: 'Switching Pattern',
|
|
171
|
+
chartType: 'TotalDoughnutChart',
|
|
139
172
|
isPopupChartsOpen: true,
|
|
140
|
-
width:
|
|
141
|
-
height:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
onOverlayClick: () => {}
|
|
173
|
+
width: '1700px',
|
|
174
|
+
height: '800px',
|
|
175
|
+
onCloseClick: () => {},
|
|
176
|
+
subtitleTextColor: '#7E7E7E'
|
|
145
177
|
};
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.TitleContainer = exports.Title = exports.ModalOverlay = exports.ModalContent = exports.MainContainer = exports.CloseXIconContainer = exports.ChartItemTitle = exports.ChartItemMainContainer = exports.ChartItemIconContainer = exports.ChartItemContainer = exports.ChartContentContainer =
|
|
7
|
+
exports.TitleContainer = exports.Title = exports.ModalOverlay = exports.ModalContent = exports.MainContainer = exports.CloseXIconContainer = exports.ChartsContainer = exports.ChartItemTitle = exports.ChartItemMainContainer = exports.ChartItemIconContainer = exports.ChartItemContainer = exports.ChartContentContainer = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
@@ -13,10 +13,10 @@ const ModalOverlay = exports.ModalOverlay = _styledComponents.default.div(_templ
|
|
|
13
13
|
const ModalContent = exports.ModalContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-weight: 500;\n font-size: 18px;\n background-color: #fefefe;\n padding: 30px 30px 60px 40px;\n border: 1px solid #888;\n border-radius: 10px;\n height: ", ";\n width: ", ";\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n"])), props => props.height, props => props.width);
|
|
14
14
|
const TitleContainer = exports.TitleContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0 0 20px 0;\n margin: 0 0 30px 0;\n border-bottom: 1px solid #b1b1b1;\n"])));
|
|
15
15
|
const Title = exports.Title = _styledComponents.default.p(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 24px;\n margin: 0;\n"])));
|
|
16
|
-
const
|
|
17
|
-
const ChartItemMainContainer = exports.ChartItemMainContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin: 10px 10px 10px 10px;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n border-radius: 12px;\n
|
|
18
|
-
const ChartItemContainer = exports.ChartItemContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin:
|
|
16
|
+
const ChartsContainer = exports.ChartsContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-template-columns: repeat(3, 1fr); /* 3 columns */\n flex-wrap: wrap; \n overflow-y: auto;\n padding: 0 10px 0 0;\n max-height: ", ";\n height: ", ";\n \n"])), props => props.maxHeight, props => props.height);
|
|
17
|
+
const ChartItemMainContainer = exports.ChartItemMainContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin: 10px 10px 10px 10px;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.1);\n border-radius: 12px;\n"])));
|
|
18
|
+
const ChartItemContainer = exports.ChartItemContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 20px 10px;\n"])));
|
|
19
19
|
const ChartItemTitle = exports.ChartItemTitle = _styledComponents.default.h3(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 16px;\n line-height: 24px;\n margin: 0 10px;\n color: ", ";\n"])), props => props.subtitleTextColor);
|
|
20
20
|
const ChartItemIconContainer = exports.ChartItemIconContainer = _styledComponents.default.h3(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 0 0 10px;\n"])));
|
|
21
|
-
const ChartContentContainer = exports.ChartContentContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 14px;\n margin: 0;\n
|
|
22
|
-
const CloseXIconContainer = exports.CloseXIconContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 20px 0 0 0;\n cursor: pointer;\n
|
|
21
|
+
const ChartContentContainer = exports.ChartContentContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 14px;\n margin: 0;\n border-radius: 12px;\n"])));
|
|
22
|
+
const CloseXIconContainer = exports.CloseXIconContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 20px 0 0 0;\n cursor: pointer;\n"])));
|
|
@@ -20,31 +20,29 @@ const ProductsVariety = props => {
|
|
|
20
20
|
onClickBannersDropdown
|
|
21
21
|
} = props;
|
|
22
22
|
const [IsProductsListOpen, setIsProductsListOpen] = (0, _react.useState)(false);
|
|
23
|
-
const displayBannersDropdown = () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
-
};
|
|
23
|
+
const displayBannersDropdown = () => /*#__PURE__*/_react.default.createElement(_BannersDropdown.BannersDropdown, {
|
|
24
|
+
banners: [{
|
|
25
|
+
checked: true,
|
|
26
|
+
name: 'StopAndShop'
|
|
27
|
+
}, {
|
|
28
|
+
checked: true,
|
|
29
|
+
name: 'FoodLion'
|
|
30
|
+
}, {
|
|
31
|
+
checked: true,
|
|
32
|
+
name: 'GiantFood'
|
|
33
|
+
}, {
|
|
34
|
+
checked: true,
|
|
35
|
+
name: 'TheGiantCompany'
|
|
36
|
+
}, {
|
|
37
|
+
checked: true,
|
|
38
|
+
name: 'Hannaford'
|
|
39
|
+
}],
|
|
40
|
+
onClick: banners => {
|
|
41
|
+
onClickBannersDropdown({
|
|
42
|
+
banners
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
48
46
|
return /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyMainContainer, {
|
|
49
47
|
id: "ProductsVarietyMainContainer"
|
|
50
48
|
}, /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietyContainer, {
|
|
@@ -57,7 +55,7 @@ const ProductsVariety = props => {
|
|
|
57
55
|
id: "ProductsVarietySubTitle"
|
|
58
56
|
}, "|"), /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductsVarietySubTitle, {
|
|
59
57
|
id: "ProductsVarietySubTitle"
|
|
60
|
-
}, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length :
|
|
58
|
+
}, productsData ? productsData === null || productsData === void 0 ? void 0 : productsData.length : ''), displayBannersDropdown()), /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductButtonContainer, {
|
|
61
59
|
id: "ProductButtonContainer",
|
|
62
60
|
onClick: () => {
|
|
63
61
|
setIsProductsListOpen(!IsProductsListOpen);
|
|
@@ -77,18 +75,18 @@ const ProductsVariety = props => {
|
|
|
77
75
|
}, item.label), item.ShowSpotlightProductButton ? /*#__PURE__*/_react.default.createElement(_ProductsVariety.ProductButtonContainer, {
|
|
78
76
|
id: "ProductButtonContainer",
|
|
79
77
|
background: "#F8CD00",
|
|
80
|
-
onClick:
|
|
78
|
+
onClick: () => {
|
|
81
79
|
onSpotlightProductClick({
|
|
82
80
|
value: item.value,
|
|
83
81
|
label: item.label
|
|
84
82
|
});
|
|
85
83
|
}
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) :
|
|
84
|
+
}, /*#__PURE__*/_react.default.createElement(_SpotlightProductIcon.SpotlightProductIcon, null)) : ''))));
|
|
87
85
|
};
|
|
88
86
|
var _default = exports.default = ProductsVariety;
|
|
89
87
|
ProductsVariety.defaultProps = {
|
|
90
|
-
title:
|
|
91
|
-
subTitle:
|
|
88
|
+
title: 'Products Variety',
|
|
89
|
+
subTitle: 'Product Name',
|
|
92
90
|
onSpotlightProductClick: () => {},
|
|
93
|
-
|
|
91
|
+
onClickBannersDropdown: () => {}
|
|
94
92
|
};
|
|
@@ -13,8 +13,8 @@ const ProductsVarietyContainer = exports.ProductsVarietyContainer = _styledCompo
|
|
|
13
13
|
const ProductsVarietyTitleContainer = exports.ProductsVarietyTitleContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 10px;\n gap: 15px;\n"])));
|
|
14
14
|
const ProductsVarietyTitle = exports.ProductsVarietyTitle = _styledComponents.default.h3(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 20px;\n\n margin: 0;\n"])));
|
|
15
15
|
const ProductsVarietySubTitle = exports.ProductsVarietySubTitle = _styledComponents.default.h3(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #757171;\n font-weight: 500;\n font-size: 20px;\n margin: 0;\n"])));
|
|
16
|
-
const ProductsVarietyContentContainer = exports.ProductsVarietyContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n margin: 10px;\n padding: 10px
|
|
17
|
-
const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 14px;\n
|
|
18
|
-
const ProductContainer = exports.ProductContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n
|
|
16
|
+
const ProductsVarietyContentContainer = exports.ProductsVarietyContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 20px;\n line-height: 25px;\n display: flex;\n justify-content: flex-start;\n flex-direction: column;\n align-items: flex-start;\n margin: 10px;\n padding: 10px 20px 20px 50px;\n"])));
|
|
17
|
+
const ProductsTitle = exports.ProductsTitle = _styledComponents.default.h3(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 14px;\n margin: 10px 0;\n"])));
|
|
18
|
+
const ProductContainer = exports.ProductContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: center;\n border-bottom: 1px solid #00000010;\n width: 100%;\n gap: 20px;\n"])));
|
|
19
19
|
const Product = exports.Product = _styledComponents.default.h3(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n border-radius: 12px;\n"])));
|
|
20
|
-
const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: ", ";\n border-radius: 12px;\n height: 25px;\n padding: 0 15px;\n user-select: none;\n &:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n }\n gap: 10px;\n"])), props => props.background ||
|
|
20
|
+
const ProductButtonContainer = exports.ProductButtonContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n background: ", ";\n border-radius: 12px;\n height: 25px;\n padding: 0 15px;\n user-select: none;\n &:hover {\n background-color: #f0f0f0;\n cursor: pointer;\n }\n gap: 10px;\n"])), props => props.background || '#ffffff');
|
|
@@ -20,10 +20,22 @@ const SalesAndROI = props => {
|
|
|
20
20
|
height,
|
|
21
21
|
textColor,
|
|
22
22
|
salesData,
|
|
23
|
-
|
|
23
|
+
showBanner,
|
|
24
24
|
noDataText,
|
|
25
|
-
onBannerClick
|
|
25
|
+
onBannerClick,
|
|
26
|
+
showBorderShadow
|
|
26
27
|
} = props;
|
|
28
|
+
const getTextBefore = dataItem => {
|
|
29
|
+
let newTextBefore = '';
|
|
30
|
+
if (dataItem.textBefore) {
|
|
31
|
+
newTextBefore = dataItem.textBefore;
|
|
32
|
+
} else if (currencySign) {
|
|
33
|
+
newTextBefore = (0, _CommonFunctions.getCurrencySign)(currencyType, dataItem.value);
|
|
34
|
+
} else {
|
|
35
|
+
newTextBefore = '';
|
|
36
|
+
}
|
|
37
|
+
return newTextBefore;
|
|
38
|
+
};
|
|
27
39
|
const displayItem = dataItem => {
|
|
28
40
|
var _dataItem$value;
|
|
29
41
|
return /*#__PURE__*/_react.default.createElement(_SalesAndROI.ItemContainer, {
|
|
@@ -34,18 +46,19 @@ const SalesAndROI = props => {
|
|
|
34
46
|
id: "FormattedValue"
|
|
35
47
|
}, /*#__PURE__*/_react.default.createElement(_SalesAndROI.TextBeforeAndAfterValue, {
|
|
36
48
|
id: "TextBeforeAndAfterValue"
|
|
37
|
-
},
|
|
49
|
+
}, getTextBefore(dataItem)), dotCut ? (0, _CommonFunctions.getFormattedValue)(dataItem.value && Math.abs(dataItem.value) > 0 && dataItem.value % 1 !== 0 ? (_dataItem$value = dataItem.value) === null || _dataItem$value === void 0 ? void 0 : _dataItem$value.toFixed(2) : dataItem.value) : (0, _CommonFunctions.getNumberWithCommas)(dataItem.value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(dataItem.value) : '', /*#__PURE__*/_react.default.createElement(_SalesAndROI.TextBeforeAndAfterValue, null, dataItem.textAfter)));
|
|
38
50
|
};
|
|
39
51
|
return /*#__PURE__*/_react.default.createElement(_SalesAndROI.ControlsContainer, {
|
|
40
52
|
id: "ControlsContainer",
|
|
41
53
|
height: height,
|
|
42
54
|
width: width,
|
|
43
|
-
textColor: textColor
|
|
55
|
+
textColor: textColor,
|
|
56
|
+
showBorderShadow: showBorderShadow
|
|
44
57
|
}, /*#__PURE__*/_react.default.createElement(_SalesAndROI.TitleAndValueContainer, {
|
|
45
58
|
id: "TitleAndValueContainer"
|
|
46
59
|
}, /*#__PURE__*/_react.default.createElement(_SalesAndROI.Title, {
|
|
47
60
|
id: "Title"
|
|
48
|
-
}, title),
|
|
61
|
+
}, title), showBanner && /*#__PURE__*/_react.default.createElement(_SalesAndROI.OutBanner, {
|
|
49
62
|
id: "OutBanner",
|
|
50
63
|
onClick: () => onBannerClick({
|
|
51
64
|
eventName: 'onBannerClick'
|
|
@@ -69,7 +82,8 @@ SalesAndROI.defaultProps = {
|
|
|
69
82
|
width: '100%',
|
|
70
83
|
height: '100%',
|
|
71
84
|
textColor: '#212121',
|
|
72
|
-
|
|
73
|
-
noDataText: '
|
|
74
|
-
onBannerClick: () => {}
|
|
85
|
+
showBanner: true,
|
|
86
|
+
noDataText: '',
|
|
87
|
+
onBannerClick: () => {},
|
|
88
|
+
showBorderShadow: true
|
|
75
89
|
};
|
|
@@ -8,9 +8,8 @@ exports.TitleAndValueContainer = exports.Title = exports.TextBeforeAndAfterValue
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin: 0 0 30px 0;\n padding: 20px;\n"])));
|
|
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 background-color: white;\n box-shadow: ", ";\n border-radius: 12px;\n"])), props => props.textColor, props => props.width, props => props.height, props => props.showBorderShadow ? '0px 0px 20px 0px rgba(0, 0, 0, 0.2)' : null);
|
|
12
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n margin: 0 0 30px 0;\n padding: 20px;\n gap: 20px;\n"])));
|
|
14
13
|
const ItemsContainer = exports.ItemsContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-template-columns: repeat(2, 1fr); /* Two columns */\n padding: 20px;\n gap: 30px;\n"])));
|
|
15
14
|
const ItemContainer = exports.ItemContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n flex-wrap: wrap;\n"])));
|
|
16
15
|
const Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 20px;\n font-weight: 400;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 18px;\n }\n @media (max-width: 1366px) {\n font-size: 16px;\n }\n"])));
|
|
@@ -27,7 +27,9 @@ const TabMenu = props => {
|
|
|
27
27
|
onTabChange(index);
|
|
28
28
|
setActiveTab(index);
|
|
29
29
|
};
|
|
30
|
-
return /*#__PURE__*/_react.default.createElement(_TabMenu.TabMenuContainer, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Nav, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Tabs, null, tabs.length > 1 ? tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_TabMenu.Tab
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_TabMenu.TabMenuContainer, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Nav, null, /*#__PURE__*/_react.default.createElement(_TabMenu.Tabs, null, tabs.length > 1 ? tabs.map((tab, index) => /*#__PURE__*/_react.default.createElement(_TabMenu.Tab
|
|
31
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
32
|
+
, {
|
|
31
33
|
key: index,
|
|
32
34
|
isActive: index === activeTab,
|
|
33
35
|
className: "tab ".concat(index === activeTab ? 'active' : ''),
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
7
8
|
exports.default = exports.TotalHorizontalCharts = void 0;
|
|
8
|
-
var _react =
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _recharts = require("recharts");
|
|
10
11
|
var _ExportIcon = _interopRequireDefault(require("./icons/ExportIcon"));
|
|
11
12
|
var _NoDataFoundMessage = require("./NoDataFoundMessage");
|
|
@@ -27,6 +28,15 @@ const TotalHorizontalCharts = props => {
|
|
|
27
28
|
onBannerClick
|
|
28
29
|
} = props;
|
|
29
30
|
const barBackgrounds = chartsData.map(bg => bg.color);
|
|
31
|
+
const [widthChartContainer, setWidthChartContainer] = (0, _react.useState)(0);
|
|
32
|
+
const [heightChartContainer, setHeightChartContainer] = (0, _react.useState)(0);
|
|
33
|
+
const chartContainerRef = (0, _react.useRef)();
|
|
34
|
+
(0, _react.useEffect)(() => {
|
|
35
|
+
if (chartContainerRef.current) {
|
|
36
|
+
setWidthChartContainer(chartContainerRef.current.clientWidth);
|
|
37
|
+
setHeightChartContainer(chartContainerRef.current.clientHeight);
|
|
38
|
+
}
|
|
39
|
+
}, [width, height]);
|
|
30
40
|
return /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ControlsContainer, {
|
|
31
41
|
id: "ControlsContainer",
|
|
32
42
|
height: height,
|
|
@@ -34,7 +44,9 @@ const TotalHorizontalCharts = props => {
|
|
|
34
44
|
textColor: textColor
|
|
35
45
|
}, (chartsData === null || chartsData === void 0 ? void 0 : chartsData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.TitleAndValueContainer, {
|
|
36
46
|
id: "TitleAndValueContainer"
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.Header,
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.Header, {
|
|
48
|
+
id: "Header"
|
|
49
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.Title, {
|
|
38
50
|
id: "Title"
|
|
39
51
|
}, title), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.FormattedValue, {
|
|
40
52
|
id: "FormattedValue"
|
|
@@ -44,14 +56,23 @@ const TotalHorizontalCharts = props => {
|
|
|
44
56
|
onClick: onBannerClick
|
|
45
57
|
}, /*#__PURE__*/_react.default.createElement(_ExportIcon.default, {
|
|
46
58
|
color: textColor
|
|
47
|
-
}), "View By Banner")), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartWrapper,
|
|
59
|
+
}), "View By Banner")), /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartWrapper, {
|
|
60
|
+
id: "ChartWrapper"
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalHorizontalCharts.ChartInner, {
|
|
62
|
+
id: "ChartInner",
|
|
63
|
+
ref: chartContainerRef
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
65
|
+
id: "ResponsiveContainer",
|
|
66
|
+
height: heightChartContainer - 10,
|
|
67
|
+
width: widthChartContainer
|
|
68
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.ComposedChart, {
|
|
48
69
|
layout: "vertical",
|
|
49
70
|
data: chartsData,
|
|
50
71
|
margin: {
|
|
51
|
-
top:
|
|
52
|
-
right:
|
|
53
|
-
bottom:
|
|
54
|
-
left:
|
|
72
|
+
top: 10,
|
|
73
|
+
right: 50,
|
|
74
|
+
bottom: 10,
|
|
75
|
+
left: 50
|
|
55
76
|
}
|
|
56
77
|
}, /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
57
78
|
type: "number",
|
|
@@ -74,8 +95,10 @@ const TotalHorizontalCharts = props => {
|
|
|
74
95
|
fontSize: 14,
|
|
75
96
|
fontWeight: 600,
|
|
76
97
|
fill: '#212121',
|
|
77
|
-
formatter:
|
|
78
|
-
}
|
|
98
|
+
formatter: valueBar => "".concat(valueBar, "%")
|
|
99
|
+
},
|
|
100
|
+
barCategoryGap: 0,
|
|
101
|
+
barGap: 5
|
|
79
102
|
}, chartsData.map((entry, index) => /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
80
103
|
key: "cell-".concat(index),
|
|
81
104
|
fill: barBackgrounds[index % 20]
|
|
@@ -9,12 +9,12 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
11
11
|
const scrollableStyles = "\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: #E8E8E8;\n border-radius: 5px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: #D0D0D0;\n border-radius: 5px;\n }\n";
|
|
12
|
-
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif
|
|
13
|
-
const ChartWrapper = exports.ChartWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
14
|
-
const ChartInner = exports.ChartInner = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
15
|
-
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
16
|
-
const Header = exports.Header = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["
|
|
12
|
+
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 background-color: white;\n margin: 0;\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
13
|
+
const ChartWrapper = exports.ChartWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n height: 80%;\n width: 100%;\n margin: 0;\n"])), scrollableStyles);
|
|
14
|
+
const ChartInner = exports.ChartInner = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0; \n height: 100%;\n width: 100%;\n"])));
|
|
15
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n padding: 0 20px;\n"])));
|
|
16
|
+
const Header = exports.Header = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
17
17
|
const Title = exports.Title = _styledComponents.default.h4(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 20px;\n font-weight: 400;\n line-height: 1;\n margin: 0 0 8px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
18
18
|
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n display: flex;\n align-items: baseline;\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
19
|
-
const OutBanner = exports.OutBanner = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 8px;\n align-items: baseline;\n font-size: 14px;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n @media (max-width: 1536px) {\n font-size: 10px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n > svg {\n
|
|
19
|
+
const OutBanner = exports.OutBanner = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 8px;\n align-items: baseline;\n font-size: 14px;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n @media (max-width: 1536px) {\n font-size: 10px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n > svg {\n width: 14px;\n height: 14px;\n @media (max-width: 1536px) {\n width: 12px;\n height: 12px;\n }\n @media (max-width: 1366px) {\n width: 8px;\n height: 8px;\n }\n }\n"])), props => props.textColor);
|
|
20
20
|
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
package/package.json
CHANGED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
STORYBOOK_FIGMA_ACCESS_TOKEN=figd_YdAmQQKQ2B6ZngEijA0JiqNNUdJvP23G46NK7-fc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
STORYBOOK_FIGMA_ACCESS_TOKEN=figd_MOcc8-aS91XJ3mFdtNlH4oPVY73ChHlmw6-hKhsb
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
es2021: true,
|
|
5
|
-
},
|
|
6
|
-
extends: 'airbnb',
|
|
7
|
-
overrides: [
|
|
8
|
-
{
|
|
9
|
-
env: {
|
|
10
|
-
node: true,
|
|
11
|
-
},
|
|
12
|
-
files: [
|
|
13
|
-
'.eslintrc.{js,cjs}',
|
|
14
|
-
],
|
|
15
|
-
parserOptions: {
|
|
16
|
-
sourceType: 'script',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
parserOptions: {
|
|
21
|
-
ecmaVersion: 'latest',
|
|
22
|
-
sourceType: 'module',
|
|
23
|
-
},
|
|
24
|
-
rules: {
|
|
25
|
-
},
|
|
26
|
-
};
|