sag_components 1.0.397 → 1.0.398
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/.history/.env_20231001120549 +0 -0
- package/.history/.env_20231001120613 +1 -0
- package/.history/.env_20231003143620 +1 -0
- package/.history/.eslintrc_20230928112617.js +26 -0
- package/.history/.eslintrc_20230928130534.js +27 -0
- package/.history/.eslintrc_20230928133400.js +28 -0
- package/.history/.eslintrc_20230928133404.js +28 -0
- package/.history/.eslintrc_20230928133416.js +28 -0
- package/.history/.eslintrc_20230928133419.js +28 -0
- package/.history/.eslintrc_20230928133432.js +28 -0
- package/.history/.eslintrc_20230928133439.js +28 -0
- package/.history/.eslintrc_20230928133458.js +29 -0
- package/.history/.eslintrc_20230928133500.js +28 -0
- package/.history/.eslintrc_20230928134009.js +28 -0
- package/.history/.eslintrc_20230928135318.js +34 -0
- package/.history/.eslintrc_20230928135321.js +34 -0
- package/.history/.eslintrc_20230928135323.js +34 -0
- package/.history/.eslintrc_20230928135332.js +34 -0
- package/.history/.eslintrc_20230928135333.js +34 -0
- package/.history/.eslintrc_20230928135352.js +29 -0
- package/.history/.eslintrc_20230928135353.js +29 -0
- package/.history/.eslintrc_20230928135355.js +29 -0
- package/.history/.eslintrc_20230928135408.js +29 -0
- package/.history/.eslintrc_20230928135538.js +30 -0
- package/.history/.eslintrc_20230928135539.js +30 -0
- package/.history/.eslintrc_20230928135543.js +30 -0
- package/.history/.gitignore_20230921093332 +119 -0
- package/.history/.gitignore_20230921111638 +120 -0
- package/.history/.gitignore_20230921111650 +120 -0
- package/.history/.gitignore_20230921111810 +121 -0
- package/.history/package-lock_20231114111138.json +47810 -0
- package/.history/package-lock_20231114111158.json +47802 -0
- package/.history/package_20231029152422.json +82 -0
- package/.history/package_20231029153420.json +82 -0
- package/.history/package_20231029154416.json +82 -0
- package/.history/package_20231030094127.json +82 -0
- package/.history/package_20231030114707.json +82 -0
- package/.history/package_20231030130704.json +82 -0
- package/.history/package_20231030132422.json +82 -0
- package/.history/package_20231030134051.json +82 -0
- package/.history/package_20231030142913.json +82 -0
- package/.history/package_20231030143556.json +82 -0
- package/.history/package_20231030144210.json +82 -0
- package/.history/package_20231101113942.json +82 -0
- package/.history/package_20231101114544.json +82 -0
- package/.history/package_20231101151518.json +82 -0
- package/.history/package_20231101154501.json +82 -0
- package/.history/package_20231101155811.json +82 -0
- package/.history/package_20231101160235.json +82 -0
- package/.history/package_20231101160406.json +82 -0
- package/.history/package_20231101161325.json +82 -0
- package/.history/package_20231101161333.json +82 -0
- package/.history/package_20231102123623.json +82 -0
- package/.history/package_20231102125741.json +82 -0
- package/.history/package_20231102130857.json +82 -0
- package/.history/package_20231102132227.json +82 -0
- package/.history/package_20231102142340.json +82 -0
- package/.history/package_20231102143256.json +82 -0
- package/.history/package_20231105153539.json +82 -0
- package/.history/package_20231105154332.json +82 -0
- package/.history/package_20231105171201.json +82 -0
- package/.history/package_20231106123849.json +82 -0
- package/.history/package_20231107170638.json +82 -0
- package/.history/package_20231109103647.json +82 -0
- package/.history/package_20231109103911.json +82 -0
- package/.history/package_20231109105426.json +82 -0
- package/.history/package_20231109132014.json +82 -0
- package/.history/package_20231109132115.json +82 -0
- package/.history/package_20231114100517.json +82 -0
- package/.history/package_20231114100859.json +82 -0
- package/.history/package_20231114101553.json +82 -0
- package/.history/package_20231114102545.json +82 -0
- package/.history/package_20231114111208.json +83 -0
- package/.history/package_20231114111515.json +83 -0
- package/.history/package_20231114112931.json +83 -0
- package/.history/package_20231114113014.json +83 -0
- package/.history/package_20231114113155.json +83 -0
- package/.history/package_20231114124318.json +83 -0
- package/.history/package_20231114125107.json +83 -0
- package/.history/package_20231114125510.json +83 -0
- package/.history/package_20231114132634.json +83 -0
- package/.history/package_20231116165815.json +83 -0
- package/.history/package_20231116165916.json +83 -0
- package/.history/package_20231119113637.json +83 -0
- package/.history/package_20231120100907.json +83 -0
- package/.history/package_20231121151523.json +77 -0
- package/.history/package_20231121155513.json +77 -0
- package/.history/package_20231121162434.json +77 -0
- package/.history/package_20231122100718.json +77 -0
- package/.history/package_20231128125149.json +82 -0
- package/.history/package_20231128125208.json +82 -0
- package/dist/index.js +1 -1
- package/dist/stories/components/Benchmark.js +23 -20
- package/dist/stories/components/Benchmark.style.js +5 -35
- package/dist/stories/components/Button.js +35 -30
- package/dist/stories/components/Button.style.js +1 -3
- package/dist/stories/components/CheckBox.js +22 -35
- package/dist/stories/components/CheckBox.style.js +4 -12
- package/dist/stories/components/CheckBoxButton.js +27 -45
- package/dist/stories/components/CheckBoxButton.style.js +4 -20
- package/dist/stories/components/CodeEditor.js +5 -3
- package/dist/stories/components/CodeEditor.style.js +1 -1
- package/dist/stories/components/CollapseData.js +34 -42
- package/dist/stories/components/CollapseData.style.js +11 -17
- package/dist/stories/components/CommonFunctions.js +13 -10
- package/dist/stories/components/Datepicker.js +22 -27
- package/dist/stories/components/Datepicker.style.js +1 -3
- package/dist/stories/components/Dropdown.js +94 -112
- package/dist/stories/components/Dropdown.style.js +1 -3
- package/dist/stories/components/DropdownMulti.js +123 -145
- package/dist/stories/components/DropdownMulti.style.js +1 -3
- package/dist/stories/components/FilterContainer.js +7 -7
- package/dist/stories/components/FilterContainer.style.js +3 -3
- package/dist/stories/components/IconButton.js +58 -27
- package/dist/stories/components/IconButton.style.js +8 -13
- package/dist/stories/components/KpiFilter.js +185 -186
- package/dist/stories/components/KpiFilter.style.js +16 -16
- package/dist/stories/components/ListBox.js +50 -67
- package/dist/stories/components/ListBox.style.js +4 -12
- package/dist/stories/components/Modal.js +6 -4
- package/dist/stories/components/Modal.style.js +5 -5
- package/dist/stories/components/ModalTotalBenchmark.js +48 -46
- package/dist/stories/components/ModalTotalCost.js +66 -68
- package/dist/stories/components/NoDataFoundMessage.js +5 -2
- package/dist/stories/components/NoDataFoundMessage.style.js +3 -3
- package/dist/stories/components/OneColumnContainer.js +30 -38
- package/dist/stories/components/OneColumnContainer.style.js +7 -23
- package/dist/stories/components/PerformanceAnalytics.js +142 -156
- package/dist/stories/components/PerformanceAnalytics.style.js +15 -25
- package/dist/stories/components/PerformanceAnalyticsLegend.js +25 -26
- package/dist/stories/components/PerformanceAnalyticsLegend.style.js +6 -16
- package/dist/stories/components/PerformanceAnalyticsOneColumn.js +119 -123
- package/dist/stories/components/PerformanceAnalyticsOneColumn.style.js +13 -23
- package/dist/stories/components/PerformanceAnalyticsTotals.js +26 -27
- package/dist/stories/components/PerformanceAnalyticsTotals.style.js +10 -18
- package/dist/stories/components/ReportTable.js +15 -18
- package/dist/stories/components/ReportTable.style.js +8 -14
- package/dist/stories/components/SegmentedButton.js +63 -68
- package/dist/stories/components/SegmentedButton.style.js +6 -16
- package/dist/stories/components/TextField.js +37 -52
- package/dist/stories/components/TextField.style.js +1 -3
- package/dist/stories/components/TitleDescription.js +39 -42
- package/dist/stories/components/TitleDescription.style.js +26 -50
- package/dist/stories/components/Tooltip.js +6 -11
- package/dist/stories/components/Tooltip.style.js +3 -3
- package/dist/stories/components/TotalBenchmark.js +54 -58
- package/dist/stories/components/TotalBenchmark.style.js +11 -17
- package/dist/stories/components/TotalBenchmarkAreachart.js +55 -58
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +14 -20
- package/dist/stories/components/TotalBenchmarkArrows.js +48 -53
- package/dist/stories/components/TotalBenchmarkArrows.style.js +14 -20
- package/dist/stories/components/TotalBenchmarkBarchart.js +45 -51
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +10 -16
- package/dist/stories/components/TotalDoughnutChart.js +60 -64
- package/dist/stories/components/TotalDoughnutChart.style.js +19 -29
- package/dist/stories/components/TspanTooltip.js +6 -8
- package/dist/stories/components/TspanTooltip.style.js +3 -7
- package/dist/stories/components/icons/ArrowDownIcon.js +7 -6
- package/dist/stories/components/icons/ArrowDropDownIcon.js +7 -6
- package/dist/stories/components/icons/ArrowUpIcon.js +7 -6
- package/dist/stories/components/icons/BellIcon.js +6 -5
- package/dist/stories/components/icons/CalendarIcon.js +7 -6
- package/dist/stories/components/icons/CheckBoxButtonCheckedIcon.js +8 -8
- package/dist/stories/components/icons/CheckBoxCheckedIcon.js +8 -8
- package/dist/stories/components/icons/CheckBoxNotCheckedIcon.js +8 -8
- package/dist/stories/components/icons/ClockIcon.js +7 -6
- package/dist/stories/components/icons/ComboBoxArrowDownIcon.js +8 -8
- package/dist/stories/components/icons/ComboBoxArrowUpIcon.js +8 -8
- package/dist/stories/components/icons/DocumentIcon.js +7 -7
- package/dist/stories/components/icons/DownloadIcon.js +7 -7
- package/dist/stories/components/icons/ExitIcon.js +7 -6
- package/dist/stories/components/icons/EyeIcon.js +7 -6
- package/dist/stories/components/icons/FlyIcon.js +7 -6
- package/dist/stories/components/icons/FoodLionIcon.js +7 -6
- package/dist/stories/components/icons/GiantFoodIcon.js +7 -6
- package/dist/stories/components/icons/HannafordIcon.js +7 -6
- package/dist/stories/components/icons/InfoIcon.js +8 -8
- package/dist/stories/components/icons/LegendUnionIcon.js +7 -7
- package/dist/stories/components/icons/MaintenanceIcon.js +7 -6
- package/dist/stories/components/icons/NoDataFoundIcon.js +6 -5
- package/dist/stories/components/icons/ShoppingCartIcon.js +7 -6
- package/dist/stories/components/icons/StopAndShopIcon.js +7 -6
- package/dist/stories/components/icons/TheGiantCompanyIcon.js +7 -6
- package/dist/stories/utils/ComponentFactory.js +4 -2
- package/package.json +5 -5
|
@@ -8,34 +8,32 @@ exports.default = exports.PerformanceAnalyticsLegend = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _LegendUnionIcon = require("./icons/LegendUnionIcon");
|
|
10
10
|
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend.style");
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const ICON_TYPE_SQUARE = 'Square';
|
|
12
|
+
const ICON_TYPE_LEGEND_UNION_ICON = 'LegendUnionIcon';
|
|
13
13
|
|
|
14
14
|
/* PerformanceAnalyticsLegend */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}));
|
|
38
|
-
};
|
|
15
|
+
const PerformanceAnalyticsLegend = props => {
|
|
16
|
+
const {
|
|
17
|
+
legendData,
|
|
18
|
+
width,
|
|
19
|
+
height
|
|
20
|
+
} = props;
|
|
21
|
+
const getLegendData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.LegendDataContainer, {
|
|
22
|
+
id: "LegendDataContainer"
|
|
23
|
+
}, legendData === null || legendData === void 0 ? void 0 : legendData.map((item, i) => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.TitleAndIconContainer, {
|
|
24
|
+
id: "TitleAndIconContainer",
|
|
25
|
+
key: "".concat(item.title + i)
|
|
26
|
+
}, item.iconType === ICON_TYPE_SQUARE ? /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.LegendColorRectangle, {
|
|
27
|
+
id: "LegendColorRectangle",
|
|
28
|
+
color: item.iconColor
|
|
29
|
+
}) : item.iconType === ICON_TYPE_LEGEND_UNION_ICON ? /*#__PURE__*/_react.default.createElement(_LegendUnionIcon.LegendUnionIcon, {
|
|
30
|
+
width: 30,
|
|
31
|
+
height: 30,
|
|
32
|
+
color: item.iconColor
|
|
33
|
+
}) : '', /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.Title, {
|
|
34
|
+
id: "Title",
|
|
35
|
+
width: width
|
|
36
|
+
}, item.title))));
|
|
39
37
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.ControlsContainer, {
|
|
40
38
|
id: "ControlsContainer",
|
|
41
39
|
height: height,
|
|
@@ -46,6 +44,7 @@ var PerformanceAnalyticsLegend = exports.PerformanceAnalyticsLegend = function P
|
|
|
46
44
|
width: width
|
|
47
45
|
}, getLegendData()) : '');
|
|
48
46
|
};
|
|
47
|
+
exports.PerformanceAnalyticsLegend = PerformanceAnalyticsLegend;
|
|
49
48
|
var _default = exports.default = PerformanceAnalyticsLegend;
|
|
50
49
|
PerformanceAnalyticsLegend.defaultProps = {
|
|
51
50
|
width: '',
|
|
@@ -8,19 +8,9 @@ exports.TitleAndIconContainer = exports.Title = exports.LegendDataContainer = ex
|
|
|
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;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, function (props) {
|
|
18
|
-
return props.height;
|
|
19
|
-
});
|
|
20
|
-
var Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 20px;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n"])));
|
|
21
|
-
var LegendDataContainer = exports.LegendDataContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 40px;\n margin-top: 14px;\n @media (max-width: 1536px) {\n gap: 38px;\n }\n @media (max-width: 1366px) {\n gap: 30px;\n }\n"])));
|
|
22
|
-
var TitleAndIconContainer = exports.TitleAndIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
23
|
-
var Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n line-height: 27px;\n margin: 0 0 0 10px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
24
|
-
var LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), function (props) {
|
|
25
|
-
return props.color;
|
|
26
|
-
});
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-self: center;\n /* @media (max-width: 1536px) {\n margin-top: 14px;\n } */\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 20px;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n"])));
|
|
13
|
+
const LegendDataContainer = exports.LegendDataContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n gap: 40px;\n margin-top: 14px;\n @media (max-width: 1536px) {\n gap: 38px;\n }\n @media (max-width: 1366px) {\n gap: 30px;\n }\n"])));
|
|
14
|
+
const TitleAndIconContainer = exports.TitleAndIconContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
15
|
+
const Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 14px;\n line-height: 27px;\n margin: 0 0 0 10px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
16
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = exports.PerformanceAnalyticsOneColumn = void 0;
|
|
9
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
10
|
var _recharts = require("recharts");
|
|
13
11
|
var _TspanTooltip = _interopRequireDefault(require("./TspanTooltip"));
|
|
@@ -16,36 +14,34 @@ var _PerformanceAnalyticsTotals = require("./PerformanceAnalyticsTotals");
|
|
|
16
14
|
var _PerformanceAnalyticsOneColumn = require("./PerformanceAnalyticsOneColumn.style");
|
|
17
15
|
var _PerformanceAnalyticsLegend = require("./PerformanceAnalyticsLegend");
|
|
18
16
|
var _CommonFunctions = require("./CommonFunctions");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var active = _ref.active,
|
|
48
|
-
payload = _ref.payload;
|
|
17
|
+
const PerformanceAnalyticsOneColumn = props => {
|
|
18
|
+
const {
|
|
19
|
+
colorBarchart1,
|
|
20
|
+
colorBarchart2,
|
|
21
|
+
width,
|
|
22
|
+
height,
|
|
23
|
+
lineChartHeight,
|
|
24
|
+
lineChartValueType,
|
|
25
|
+
lineChartValueBold,
|
|
26
|
+
barChartHeight,
|
|
27
|
+
topBarPercentSigning,
|
|
28
|
+
topBarSigning,
|
|
29
|
+
noDataText,
|
|
30
|
+
totalsData,
|
|
31
|
+
data,
|
|
32
|
+
legendData
|
|
33
|
+
} = props;
|
|
34
|
+
const [showLegendTooltip, setShowLegendTooltip] = (0, _react.useState)(false);
|
|
35
|
+
const [tooltipCouponText, setTooltipCouponText] = (0, _react.useState)({
|
|
36
|
+
content: '',
|
|
37
|
+
clientX: 0,
|
|
38
|
+
clientY: 0
|
|
39
|
+
});
|
|
40
|
+
const CustomTooltipBarChart = _ref => {
|
|
41
|
+
let {
|
|
42
|
+
active,
|
|
43
|
+
payload
|
|
44
|
+
} = _ref;
|
|
49
45
|
if (active && payload && payload.length > 0) {
|
|
50
46
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.TooltipContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.ToolTipLabelAndValueContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.LegendColorRectangle, {
|
|
51
47
|
id: "LegendColorRectangle",
|
|
@@ -57,7 +53,7 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
57
53
|
}
|
|
58
54
|
return null;
|
|
59
55
|
};
|
|
60
|
-
|
|
56
|
+
const getTopBarSigning = signing => {
|
|
61
57
|
if (signing === 'Dollar sign ($)') {
|
|
62
58
|
return '$';
|
|
63
59
|
}
|
|
@@ -66,15 +62,17 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
66
62
|
}
|
|
67
63
|
return '';
|
|
68
64
|
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
65
|
+
const CustomizedLabelBarchart = props => {
|
|
66
|
+
const {
|
|
67
|
+
x,
|
|
68
|
+
y,
|
|
69
|
+
width,
|
|
70
|
+
value,
|
|
71
|
+
index
|
|
72
|
+
} = props;
|
|
73
|
+
const i = data[index];
|
|
74
|
+
const totalValue = i.newShoppersValue + i.existingShoppersValue;
|
|
75
|
+
const radius = 10;
|
|
78
76
|
return /*#__PURE__*/_react.default.createElement("g", null, /*#__PURE__*/_react.default.createElement("text", {
|
|
79
77
|
x: x + width / 2,
|
|
80
78
|
y: y - radius,
|
|
@@ -84,34 +82,33 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
84
82
|
dominantBaseline: "middle"
|
|
85
83
|
}, "".concat(getTopBarSigning(topBarSigning), "\n ").concat((0, _CommonFunctions.getFormattedValue)(totalValue), "\n ").concat((0, _CommonFunctions.getFormattedUnits)(totalValue), "\n ").concat(topBarPercentSigning ? '%' : '')));
|
|
86
84
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
85
|
+
const CustomizedTickBarChart = props => {
|
|
86
|
+
const {
|
|
87
|
+
x,
|
|
88
|
+
y,
|
|
89
|
+
payload
|
|
90
|
+
} = props;
|
|
91
|
+
const handleMouseEnter = content => {
|
|
92
|
+
setTooltipCouponText(prevState => ({
|
|
93
|
+
...prevState,
|
|
94
|
+
content: content !== prevState.content ? content : prevState.content,
|
|
95
|
+
clientX: x,
|
|
96
|
+
clientY: y
|
|
97
|
+
}));
|
|
99
98
|
setShowLegendTooltip(true);
|
|
100
99
|
};
|
|
101
|
-
|
|
100
|
+
const handleMouseLeave = () => {
|
|
102
101
|
setShowLegendTooltip(false);
|
|
103
102
|
};
|
|
104
103
|
if (data && data.length > 0 && payload) {
|
|
105
|
-
|
|
106
|
-
return item.retailer === payload.value;
|
|
107
|
-
});
|
|
104
|
+
const retailerData = data.filter(item => item.retailer === payload.value);
|
|
108
105
|
if (retailerData && retailerData.length > 0) {
|
|
109
|
-
|
|
106
|
+
const {
|
|
107
|
+
offerType
|
|
108
|
+
} = retailerData[0];
|
|
110
109
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
111
110
|
transform: "translate(".concat(x, ",").concat(y, ")"),
|
|
112
|
-
onMouseEnter:
|
|
113
|
-
return handleMouseEnter(offerType);
|
|
114
|
-
},
|
|
111
|
+
onMouseEnter: () => handleMouseEnter(offerType),
|
|
115
112
|
onMouseLeave: handleMouseLeave
|
|
116
113
|
}, /*#__PURE__*/_react.default.createElement("text", {
|
|
117
114
|
x: 0,
|
|
@@ -135,7 +132,7 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
135
132
|
}
|
|
136
133
|
return null;
|
|
137
134
|
};
|
|
138
|
-
|
|
135
|
+
const displayBarChart = () => {
|
|
139
136
|
if (data && data.length > 0) {
|
|
140
137
|
return /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
141
138
|
id: "ResponsiveContainer",
|
|
@@ -184,21 +181,19 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
184
181
|
}
|
|
185
182
|
return null;
|
|
186
183
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
stroke = props.stroke,
|
|
201
|
-
value = props.value;
|
|
184
|
+
const displayTotalsData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.PerformanceAnalyticsTotals, {
|
|
185
|
+
totalsData: totalsData
|
|
186
|
+
});
|
|
187
|
+
const displayLegendData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsLegend.PerformanceAnalyticsLegend, {
|
|
188
|
+
legendData: legendData
|
|
189
|
+
});
|
|
190
|
+
const CustomizedLabelROI = props => {
|
|
191
|
+
const {
|
|
192
|
+
x,
|
|
193
|
+
y,
|
|
194
|
+
stroke,
|
|
195
|
+
value
|
|
196
|
+
} = props;
|
|
202
197
|
return /*#__PURE__*/_react.default.createElement("text", {
|
|
203
198
|
x: x,
|
|
204
199
|
y: y,
|
|
@@ -209,56 +204,56 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
209
204
|
textAnchor: "middle"
|
|
210
205
|
}, "".concat(value).concat(lineChartValueType ? '%' : ''));
|
|
211
206
|
};
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
207
|
+
const CustomTooltipROI = _ref2 => {
|
|
208
|
+
let {
|
|
209
|
+
active,
|
|
210
|
+
payload
|
|
211
|
+
} = _ref2;
|
|
215
212
|
if (active && payload && payload.length > 0) {
|
|
216
213
|
var _payload$0$payload;
|
|
217
214
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.TooltipContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.TooltipTitle, null, "".concat((_payload$0$payload = payload[0].payload) === null || _payload$0$payload === void 0 ? void 0 : _payload$0$payload.retailer)), /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.ToolTipLabelAndValueContainer, null, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.TooltipLabel, null, "Incremental Sales ROI:"), /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.TooltipValue, null, "".concat((0, _CommonFunctions.getFormattedValue)(payload[0].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[0].value)))));
|
|
218
215
|
}
|
|
219
216
|
return null;
|
|
220
217
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
})))));
|
|
261
|
-
};
|
|
218
|
+
const displayLineChartROI = () => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
219
|
+
id: "ResponsiveContainer",
|
|
220
|
+
height: lineChartHeight
|
|
221
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LineChart, {
|
|
222
|
+
data: data,
|
|
223
|
+
margin: {
|
|
224
|
+
top: 20,
|
|
225
|
+
right: 90,
|
|
226
|
+
left: 90,
|
|
227
|
+
bottom: 10
|
|
228
|
+
}
|
|
229
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.Line, {
|
|
230
|
+
type: "monotone",
|
|
231
|
+
dataKey: "newShoppersPercentValue",
|
|
232
|
+
fill: colorBarchart2,
|
|
233
|
+
name: "newShopper",
|
|
234
|
+
stroke: colorBarchart2
|
|
235
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
236
|
+
content: /*#__PURE__*/_react.default.createElement(CustomizedLabelROI, null)
|
|
237
|
+
})))), /*#__PURE__*/_react.default.createElement(_recharts.ResponsiveContainer, {
|
|
238
|
+
id: "ResponsiveContainer",
|
|
239
|
+
height: lineChartHeight
|
|
240
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LineChart, {
|
|
241
|
+
data: data,
|
|
242
|
+
margin: {
|
|
243
|
+
top: 20,
|
|
244
|
+
right: 90,
|
|
245
|
+
left: 90,
|
|
246
|
+
bottom: 10
|
|
247
|
+
}
|
|
248
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.Line, {
|
|
249
|
+
type: "monotone",
|
|
250
|
+
dataKey: "existingShoppersPercentValue",
|
|
251
|
+
fill: colorBarchart1,
|
|
252
|
+
name: "existingShopper",
|
|
253
|
+
stroke: colorBarchart1
|
|
254
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
255
|
+
content: /*#__PURE__*/_react.default.createElement(CustomizedLabelROI, null)
|
|
256
|
+
})))));
|
|
262
257
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsOneColumn.ControlsContainer, {
|
|
263
258
|
id: "PerformanceAnalyticsControlsContainer",
|
|
264
259
|
className: (totalsData === null || totalsData === void 0 ? void 0 : totalsData.length) > 0 && (data === null || data === void 0 ? void 0 : data.length) > 0 ? '' : 'NoData',
|
|
@@ -270,6 +265,7 @@ var PerformanceAnalyticsOneColumn = exports.PerformanceAnalyticsOneColumn = func
|
|
|
270
265
|
noDataText: noDataText
|
|
271
266
|
}));
|
|
272
267
|
};
|
|
268
|
+
exports.PerformanceAnalyticsOneColumn = PerformanceAnalyticsOneColumn;
|
|
273
269
|
var _default = exports.default = PerformanceAnalyticsOneColumn;
|
|
274
270
|
PerformanceAnalyticsOneColumn.defaultProps = {
|
|
275
271
|
colorBarchart1: '#1F7677',
|
|
@@ -8,26 +8,16 @@ exports.TotalsDataContainer = exports.TooltipValue = exports.TooltipTitle = expo
|
|
|
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, _templateObject13;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
var LabelText = exports.LabelText = _styledComponents.default.tspan(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 10px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n"])));
|
|
25
|
-
var TooltipContainer = exports.TooltipContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n background: #fff;\n font-family: \"Poppins\", sans-serif;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
|
|
26
|
-
var TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n margin: 0 6px 0 0;\n"])));
|
|
27
|
-
var TooltipValue = exports.TooltipValue = _styledComponents.default.p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n width: fit-content;\n margin: 0;\n"])));
|
|
28
|
-
var TooltipTitle = exports.TooltipTitle = _styledComponents.default.p(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n margin: 0;\n"])));
|
|
29
|
-
var LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), function (props) {
|
|
30
|
-
return props.color;
|
|
31
|
-
});
|
|
32
|
-
var ToolTipLabelAndValueContainer = exports.ToolTipLabelAndValueContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
33
|
-
var LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-self: center;\n &.NoData {\n align-self: center;\n display: flex;\n align-items: center;\n width: 50%;\n margin: 10% auto 0;\n }\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n padding: 24px 40px;\n background: white;\n @media (max-width: 1536px) {\n padding: 12px 32px;\n }\n"])));
|
|
13
|
+
const SegmentedButtonContainer = exports.SegmentedButtonContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n padding: 10px 0 0 10px;\n"])));
|
|
14
|
+
const TotalsDataContainer = exports.TotalsDataContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
15
|
+
const LabelBoldText = exports.LabelBoldText = _styledComponents.default.tspan(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 12px;\n }\n"])));
|
|
16
|
+
const LabelText = exports.LabelText = _styledComponents.default.tspan(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 10px;\n }\n @media (max-width: 1366px) {\n font-size: 8px;\n }\n"])));
|
|
17
|
+
const TooltipContainer = exports.TooltipContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n border-radius: 5px;\n background: #fff;\n font-family: \"Poppins\", sans-serif;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
|
|
18
|
+
const TooltipLabel = exports.TooltipLabel = _styledComponents.default.p(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n margin: 0 6px 0 0;\n"])));
|
|
19
|
+
const TooltipValue = exports.TooltipValue = _styledComponents.default.p(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n width: fit-content;\n margin: 0;\n"])));
|
|
20
|
+
const TooltipTitle = exports.TooltipTitle = _styledComponents.default.p(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n margin: 0;\n"])));
|
|
21
|
+
const LegendColorRectangle = exports.LegendColorRectangle = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.875rem;\n min-width: 0.875rem;\n height: 0.875rem;\n border-radius: 2px;\n background: ", ";\n"])), props => props.color);
|
|
22
|
+
const ToolTipLabelAndValueContainer = exports.ToolTipLabelAndValueContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
|
|
23
|
+
const LegendTitle = exports.LegendTitle = _styledComponents.default.h5(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 11px;\n }\n @media (max-width: 1366px) {\n font-size: 10px;\n }\n"])));
|
|
@@ -9,40 +9,38 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _CommonFunctions = require("./CommonFunctions");
|
|
10
10
|
var _PerformanceAnalyticsTotals = require("./PerformanceAnalyticsTotals.style");
|
|
11
11
|
/* PerformanceAnalyticsTotals */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
const PerformanceAnalyticsTotals = props => {
|
|
13
|
+
const {
|
|
14
|
+
textcolor,
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
totalsData
|
|
18
|
+
} = props;
|
|
19
|
+
const getGrowthPercent = (growthPercent, showGrowthPercentSign) => {
|
|
18
20
|
if (!growthPercent) {
|
|
19
21
|
return '';
|
|
20
22
|
}
|
|
21
|
-
|
|
23
|
+
const growthPercentSign = showGrowthPercentSign && growthPercent > 0 ? '+' : '';
|
|
22
24
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.GrowthPercent, {
|
|
23
25
|
id: "GrowthPercent"
|
|
24
26
|
}, "(", growthPercentSign, growthPercent, "%)");
|
|
25
27
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
id: "CurrencySign"
|
|
43
|
-
}, item.currency ? (0, _CommonFunctions.getCurrencySign)(item.currencyType, item.value) : ''), item.dotCut ? (0, _CommonFunctions.getFormattedValue)(item.value) : (0, _CommonFunctions.getNumberWithCommas)(item.value), item.dotCut ? (0, _CommonFunctions.getFormattedUnits)(item.value) : '', item.growthPercent ? getGrowthPercent(item.growthPercent, item.showGrowthPercentSign) : '')));
|
|
44
|
-
}));
|
|
45
|
-
};
|
|
28
|
+
const getTotalsData = () => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.TotalsDataContainer, {
|
|
29
|
+
id: "TotalsDataContainer"
|
|
30
|
+
}, totalsData === null || totalsData === void 0 ? void 0 : totalsData.map((item, i) => /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.TitleAndValueContainer, {
|
|
31
|
+
id: "TitleAndValueContainer",
|
|
32
|
+
key: "".concat(item.title + i)
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.Title, {
|
|
34
|
+
id: "Title",
|
|
35
|
+
width: width
|
|
36
|
+
}, item.title), /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.CurrencySignAndFormattedValueContainer, {
|
|
37
|
+
id: "CurrencySignAndFormattedValueContainer"
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.FormattedValue, {
|
|
39
|
+
id: "FormattedValue",
|
|
40
|
+
width: width
|
|
41
|
+
}, /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.CurrencySign, {
|
|
42
|
+
id: "CurrencySign"
|
|
43
|
+
}, item.currency ? (0, _CommonFunctions.getCurrencySign)(item.currencyType, item.value) : ''), item.dotCut ? (0, _CommonFunctions.getFormattedValue)(item.value) : (0, _CommonFunctions.getNumberWithCommas)(item.value), item.dotCut ? (0, _CommonFunctions.getFormattedUnits)(item.value) : '', item.growthPercent ? getGrowthPercent(item.growthPercent, item.showGrowthPercentSign) : '')))));
|
|
46
44
|
return /*#__PURE__*/_react.default.createElement(_PerformanceAnalyticsTotals.ControlsContainer, {
|
|
47
45
|
id: "ControlsContainer",
|
|
48
46
|
height: height,
|
|
@@ -54,6 +52,7 @@ var PerformanceAnalyticsTotals = exports.PerformanceAnalyticsTotals = function P
|
|
|
54
52
|
width: width
|
|
55
53
|
}, getTotalsData()) : '');
|
|
56
54
|
};
|
|
55
|
+
exports.PerformanceAnalyticsTotals = PerformanceAnalyticsTotals;
|
|
57
56
|
var _default = exports.default = PerformanceAnalyticsTotals;
|
|
58
57
|
PerformanceAnalyticsTotals.defaultProps = {
|
|
59
58
|
textcolor: '#212121',
|
|
@@ -8,21 +8,13 @@ exports.TotalsDataContainer = exports.TitleAndValueContainer = exports.Title = e
|
|
|
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;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var TotalsDataContainer = exports.TotalsDataContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
22
|
-
var TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: 0 20px;\n"])));
|
|
23
|
-
var Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n line-height: 27px;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
24
|
-
var CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 16px;\n"])));
|
|
25
|
-
var CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
26
|
-
var GrowthPercent = exports.GrowthPercent = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
27
|
-
var FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
28
|
-
var LegendFormatedValueContainer = exports.LegendFormatedValueContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.875rem;\n"])));
|
|
11
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-self: center;\n\n > * {\n box-sizing: border-box;\n }\n"])), props => props.rootFont, props => props.textColor, props => props.width, props => props.height);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 20px;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background: white;\n"])));
|
|
13
|
+
const TotalsDataContainer = exports.TotalsDataContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n"])));
|
|
14
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n padding: 0 20px;\n"])));
|
|
15
|
+
const Title = exports.Title = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n line-height: 27px;\n margin: 0;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
16
|
+
const CurrencySignAndFormattedValueContainer = exports.CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n gap: 16px;\n"])));
|
|
17
|
+
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
18
|
+
const GrowthPercent = exports.GrowthPercent = _styledComponents.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 11px;\n }\n"])));
|
|
19
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n"])));
|
|
20
|
+
const LegendFormatedValueContainer = exports.LegendFormatedValueContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 0.875rem;\n"])));
|