sag_components 1.0.581 → 1.0.582
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 +50 -71
- package/dist/stories/components/PopupCharts.style.js +5 -5
- 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/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
|
@@ -8,22 +8,21 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _TotalDoughnutChart = require("./TotalDoughnutChart");
|
|
10
10
|
var _CloseXIcon = require("./icons/CloseXIcon");
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
11
|
+
var _FoodLionNewIcon = require("./icons/FoodLionNewIcon");
|
|
12
|
+
var _TheGiantCompanyNewIcon = require("./icons/TheGiantCompanyNewIcon");
|
|
13
|
+
var _StopAndShopNewIcon = require("./icons/StopAndShopNewIcon");
|
|
14
|
+
var _GiantFoodIcon_new = require("./icons/GiantFoodIcon_new");
|
|
15
|
+
var _HannafordIcon_new = require("./icons/HannafordIcon_new");
|
|
16
16
|
var _PopupCharts = require("./PopupCharts.style");
|
|
17
17
|
const PopupCharts = props => {
|
|
18
18
|
const {
|
|
19
19
|
title,
|
|
20
|
-
|
|
20
|
+
popupChartsItemsData,
|
|
21
21
|
isPopupChartsOpen,
|
|
22
22
|
width,
|
|
23
23
|
height,
|
|
24
|
-
borderColor,
|
|
25
24
|
subtitleTextColor,
|
|
26
|
-
|
|
25
|
+
onCloseClick
|
|
27
26
|
} = props;
|
|
28
27
|
const [IsPopupChartsOpen, setIsPopupChartsOpen] = (0, _react.useState)(isPopupChartsOpen);
|
|
29
28
|
const divRef = (0, _react.useRef)(null);
|
|
@@ -34,79 +33,62 @@ const PopupCharts = props => {
|
|
|
34
33
|
top,
|
|
35
34
|
bottom
|
|
36
35
|
} = divRef.current.getBoundingClientRect();
|
|
37
|
-
const
|
|
38
|
-
setDivHeight(
|
|
36
|
+
const newHeight = bottom - top;
|
|
37
|
+
setDivHeight(newHeight);
|
|
39
38
|
}
|
|
40
39
|
}, [height]);
|
|
41
40
|
(0, _react.useEffect)(() => {
|
|
42
41
|
setIsPopupChartsOpen(isPopupChartsOpen);
|
|
43
42
|
}, [isPopupChartsOpen]);
|
|
44
|
-
const openPopupCharts = () => {
|
|
45
|
-
setIsPopupChartsOpen(true);
|
|
46
|
-
};
|
|
47
43
|
const closePopupCharts = e => {
|
|
48
44
|
setIsPopupChartsOpen(false);
|
|
49
|
-
|
|
45
|
+
onCloseClick(e);
|
|
50
46
|
};
|
|
51
47
|
const displayRetailerIcon = retailer => {
|
|
52
48
|
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
|
-
});
|
|
49
|
+
case 'Food Lion':
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_FoodLionNewIcon.FoodLionNewIcon, null);
|
|
51
|
+
case 'Hannaford':
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_HannafordIcon_new.HannafordNewIcon, null);
|
|
53
|
+
case 'Stop&Shop':
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_StopAndShopNewIcon.StopAndShopNewIcon, null);
|
|
55
|
+
case 'The Giant Company':
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_TheGiantCompanyNewIcon.TheGiantCompanyIcon, null);
|
|
57
|
+
case 'Giant Food':
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(_GiantFoodIcon_new.GiantFoodNewIcon, null);
|
|
71
59
|
default:
|
|
72
|
-
return
|
|
60
|
+
return '';
|
|
73
61
|
}
|
|
74
62
|
};
|
|
75
|
-
const displayDoughnutChart = rowsData => {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const ChartItem = _ref => {
|
|
90
|
-
let {
|
|
91
|
-
title,
|
|
92
|
-
rowsData
|
|
93
|
-
} = _ref;
|
|
63
|
+
const displayDoughnutChart = rowsData => /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TotalDoughnutChart, {
|
|
64
|
+
currencySign: true,
|
|
65
|
+
dotCut: true,
|
|
66
|
+
legendData: rowsData === null || rowsData === void 0 ? void 0 : rowsData.legendData,
|
|
67
|
+
noDataText: rowsData.noDataText,
|
|
68
|
+
title: rowsData.title,
|
|
69
|
+
value: rowsData.value,
|
|
70
|
+
width: "100%",
|
|
71
|
+
height: "100%",
|
|
72
|
+
itemsValuesSeparateLine: false,
|
|
73
|
+
isPercent: true
|
|
74
|
+
});
|
|
75
|
+
const displayChartItem = item => {
|
|
76
|
+
var _item$rowsData;
|
|
94
77
|
return /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemMainContainer, {
|
|
95
|
-
id: "ChartItemMainContainer"
|
|
96
|
-
borderColor: borderColor
|
|
78
|
+
id: "ChartItemMainContainer"
|
|
97
79
|
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemContainer, {
|
|
98
80
|
id: "ChartItemContainer",
|
|
99
81
|
style: {
|
|
100
|
-
cursor:
|
|
82
|
+
cursor: 'pointer'
|
|
101
83
|
}
|
|
102
84
|
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemIconContainer, {
|
|
103
85
|
id: "ChartItemIconContainer"
|
|
104
|
-
}, displayRetailerIcon(title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemTitle, {
|
|
86
|
+
}, displayRetailerIcon(item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartItemTitle, {
|
|
105
87
|
id: "ChartItemTitle",
|
|
106
88
|
subtitleTextColor: subtitleTextColor
|
|
107
|
-
}, title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartContentContainer, {
|
|
89
|
+
}, item.title)), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartContentContainer, {
|
|
108
90
|
id: "ChartContentContainer"
|
|
109
|
-
}, displayDoughnutChart(rowsData === null || rowsData === void 0 ? void 0 : rowsData.TotalDoughnutChartDetails)));
|
|
91
|
+
}, displayDoughnutChart((_item$rowsData = item.rowsData) === null || _item$rowsData === void 0 ? void 0 : _item$rowsData.TotalDoughnutChartDetails)));
|
|
110
92
|
};
|
|
111
93
|
return /*#__PURE__*/_react.default.createElement(_PopupCharts.MainContainer, {
|
|
112
94
|
id: "MainContainer"
|
|
@@ -125,21 +107,18 @@ const PopupCharts = props => {
|
|
|
125
107
|
}, /*#__PURE__*/_react.default.createElement(_PopupCharts.Title, null, title), /*#__PURE__*/_react.default.createElement(_PopupCharts.CloseXIconContainer, {
|
|
126
108
|
id: "CloseXIconContainer",
|
|
127
109
|
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
|
-
}))))));
|
|
110
|
+
}, /*#__PURE__*/_react.default.createElement(_CloseXIcon.CloseXIcon, null))), /*#__PURE__*/_react.default.createElement(_PopupCharts.ChartsContainer, {
|
|
111
|
+
id: "ChartsContainer",
|
|
112
|
+
maxHeight: divHeight ? (divHeight - 160).toString().concat('', 'px') : null,
|
|
113
|
+
height: (popupChartsItemsData === null || popupChartsItemsData === void 0 ? void 0 : popupChartsItemsData.length) < 4 ? '45%' : '100%'
|
|
114
|
+
}, popupChartsItemsData.map(item => displayChartItem(item))))));
|
|
136
115
|
};
|
|
137
116
|
var _default = exports.default = PopupCharts;
|
|
138
117
|
PopupCharts.defaultProps = {
|
|
118
|
+
title: 'Switching Pattern',
|
|
139
119
|
isPopupChartsOpen: true,
|
|
140
|
-
width:
|
|
141
|
-
height:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
onOverlayClick: () => {}
|
|
120
|
+
width: '1700px',
|
|
121
|
+
height: '800px',
|
|
122
|
+
onCloseClick: () => {},
|
|
123
|
+
subtitleTextColor: '#7E7E7E'
|
|
145
124
|
};
|
|
@@ -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
|
|
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
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: 10px 10px 10px 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' : ''),
|
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
|
-
};
|
|
@@ -1,27 +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
|
-
'max-len': 'off',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
@@ -1,28 +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
|
-
'max-len': 'off',
|
|
26
|
-
/*eslint linebreak-style: ["error", "windows"]*/
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,28 +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
|
-
'max-len': 'off',
|
|
26
|
-
eslint linebreak-style: ["error", "windows"]
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,28 +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
|
-
'max-len': 'off',
|
|
26
|
-
linebreak-style: ["error", "windows"]
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,28 +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
|
-
'max-len': 'off',
|
|
26
|
-
'linebreak-style': ["error", "windows"]
|
|
27
|
-
},
|
|
28
|
-
};
|
|
@@ -1,28 +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
|
-
'max-len': 'off',
|
|
26
|
-
'linebreak-style': ['error', 'windows']
|
|
27
|
-
},
|
|
28
|
-
};
|