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,53 +8,29 @@ exports.ViewCreativeTextField = exports.ViewCreativeListBoxContainer = exports.V
|
|
|
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, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
38
|
-
var FilterValuesContainer = exports.FilterValuesContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n align-items: center;\n width: 100%;\n margin: 0.5rem;\n"])));
|
|
39
|
-
var FilterValue = exports.FilterValue = _styledComponents.default.p(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0;\n"])));
|
|
40
|
-
var FieldsDelimiter = exports.FieldsDelimiter = _styledComponents.default.p(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n color: #ccc;\n margin: 0;\n"])));
|
|
41
|
-
var Retailer = exports.Retailer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n color: #1b30aa;\n margin: 0;\n margin-inline-end: 5px;\n"])));
|
|
42
|
-
var Space = exports.Space = _styledComponents.default.p(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n"])));
|
|
43
|
-
var RetailerIconContainer = exports.RetailerIconContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
44
|
-
var ObjectiesContainer = exports.ObjectiesContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n width: ", ";\n"])), function (props) {
|
|
45
|
-
return !props.showPeriodIcon ? '100%' : '75%';
|
|
46
|
-
});
|
|
47
|
-
var ObjectiesAndPeriodsContainer = exports.ObjectiesAndPeriodsContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n"])));
|
|
48
|
-
var ObjectivesTitle = exports.ObjectivesTitle = _styledComponents.default.strong(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n"])));
|
|
49
|
-
var ObjectivesDescription = exports.ObjectivesDescription = _styledComponents.default.p(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0;\n"])));
|
|
50
|
-
var ObjectivesShowMore = exports.ObjectivesShowMore = _styledComponents.default.a(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n &:hover {\n cursor: ", ";\n }\n"])), function (props) {
|
|
51
|
-
return props.disabled ? '#B1B1B1' : '#1b30aa';
|
|
52
|
-
}, function (props) {
|
|
53
|
-
return !props.disabled ? 'pointer' : 'default';
|
|
54
|
-
});
|
|
55
|
-
var BottonsContainer = exports.BottonsContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n\n align-items: center;\n justify-content: flex-end;\n min-height: 1.5rem;\n"])));
|
|
56
|
-
var DownloadButtonContainer = exports.DownloadButtonContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
57
|
-
var PeriodsContainer = exports.PeriodsContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n align-content: flex-start;\n justify-content: flex-start;\n white-space: pre-wrap;\n margin-left: 40px;\n width: 25%;\n font-size: 14px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n } \n"])));
|
|
58
|
-
var SubLineContainer = exports.SubLineContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n"])));
|
|
59
|
-
var PeriodLabel = exports.PeriodLabel = _styledComponents.default.strong(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 500;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n } \n"])));
|
|
60
|
-
var PeriodValue = exports.PeriodValue = _styledComponents.default.p(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0 0 0 10px;\n"])));
|
|
11
|
+
const MainContainer = exports.MainContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n font-size: 1rem;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n"])), props => props.textcolor ? props.textcolor : '#000', props => props.width, props => props.height);
|
|
12
|
+
const PanelContainer = exports.PanelContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n flex-direction: column;\n align-items: center;\n justify-content: space-around;\n border-radius: 12px;\n background: #ffffff;\n padding: 1rem 1rem 1rem 2.5rem;\n font-weight: 400;\n line-height: 19px;\n white-space: pre-wrap;\n //overflow: hidden;\n width: 100%;\n @media (max-width: 1536px) {\n padding: 13px 16px;\n }\n @media (max-width: 1366px) {\n padding: 12px 16px;\n }\n"])));
|
|
13
|
+
const EventNameAndViewCreativeContainer = exports.EventNameAndViewCreativeContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n"])));
|
|
14
|
+
const EventNameViewCreativeSubContainer = exports.EventNameViewCreativeSubContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n align-content: center;\n align-items: center;\n gap: 20px;\n"])));
|
|
15
|
+
const EventName = exports.EventName = _styledComponents.default.h4(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 16px;\n font-weight: 500;\n @media (max-width: 1536px) {\n font-size: 16px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n margin: 0; \n"])));
|
|
16
|
+
const ViewCreativeContainer = exports.ViewCreativeContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 12px;\n border: 1px solid #ccc;\n margin-left: 10px;\n padding: 2px 10px;\n color: ", ";\n &:hover {\n cursor: ", ";\n }\n"])), props => props.disabled ? '#B1B1B1' : '#212121', props => !props.disabled ? 'pointer' : 'default');
|
|
17
|
+
const ViewCreativeTextField = exports.ViewCreativeTextField = _styledComponents.default.h4(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex; \n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 3px 10px;\n"])));
|
|
18
|
+
const ViewCreativeButtonAndListBoxContainer = exports.ViewCreativeButtonAndListBoxContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n overflow: visible;\n font-size: 18px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n"])));
|
|
19
|
+
const ViewCreativeListBoxContainer = exports.ViewCreativeListBoxContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: absolute;\n \n left: ", ";\n top: ", ";\n /* height: ", ";\n width: ", "; */\n\n z-index:1000;\n"])), props => props.left, props => props.top, props => props.height, props => props.width);
|
|
20
|
+
const FilterValuesContainer = exports.FilterValuesContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n align-items: center;\n width: 100%;\n margin: 0.5rem;\n"])));
|
|
21
|
+
const FilterValue = exports.FilterValue = _styledComponents.default.p(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0;\n"])));
|
|
22
|
+
const FieldsDelimiter = exports.FieldsDelimiter = _styledComponents.default.p(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n color: #ccc;\n margin: 0;\n"])));
|
|
23
|
+
const Retailer = exports.Retailer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n color: #1b30aa;\n margin: 0;\n margin-inline-end: 5px;\n"])));
|
|
24
|
+
const Space = exports.Space = _styledComponents.default.p(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n"])));
|
|
25
|
+
const RetailerIconContainer = exports.RetailerIconContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n"])));
|
|
26
|
+
const ObjectiesContainer = exports.ObjectiesContainer = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n align-items: center;\n justify-content: space-between;\n width: ", ";\n"])), props => !props.showPeriodIcon ? '100%' : '75%');
|
|
27
|
+
const ObjectiesAndPeriodsContainer = exports.ObjectiesAndPeriodsContainer = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n"])));
|
|
28
|
+
const ObjectivesTitle = exports.ObjectivesTitle = _styledComponents.default.strong(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n"])));
|
|
29
|
+
const ObjectivesDescription = exports.ObjectivesDescription = _styledComponents.default.p(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0;\n"])));
|
|
30
|
+
const ObjectivesShowMore = exports.ObjectivesShowMore = _styledComponents.default.a(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n color: ", ";\n &:hover {\n cursor: ", ";\n }\n"])), props => props.disabled ? '#B1B1B1' : '#1b30aa', props => !props.disabled ? 'pointer' : 'default');
|
|
31
|
+
const BottonsContainer = exports.BottonsContainer = _styledComponents.default.div(_templateObject21 || (_templateObject21 = (0, _taggedTemplateLiteral2.default)(["\n\n align-items: center;\n justify-content: flex-end;\n min-height: 1.5rem;\n"])));
|
|
32
|
+
const DownloadButtonContainer = exports.DownloadButtonContainer = _styledComponents.default.div(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
33
|
+
const PeriodsContainer = exports.PeriodsContainer = _styledComponents.default.div(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n align-content: flex-start;\n justify-content: flex-start;\n white-space: pre-wrap;\n margin-left: 40px;\n width: 25%;\n font-size: 14px;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n } \n"])));
|
|
34
|
+
const SubLineContainer = exports.SubLineContainer = _styledComponents.default.div(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 100%;\n"])));
|
|
35
|
+
const PeriodLabel = exports.PeriodLabel = _styledComponents.default.strong(_templateObject25 || (_templateObject25 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 500;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n } \n"])));
|
|
36
|
+
const PeriodValue = exports.PeriodValue = _styledComponents.default.p(_templateObject26 || (_templateObject26 = (0, _taggedTemplateLiteral2.default)(["\n line-height: 19px;\n font-size: 14px;\n font-weight: 400;\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n margin: 0 0 0 10px;\n"])));
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _Tooltip = require("./Tooltip.style");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
setActive = _useState2[1];
|
|
18
|
-
var showTip = function showTip() {
|
|
19
|
-
timeout = setTimeout(function () {
|
|
10
|
+
const Tooltip = props => {
|
|
11
|
+
let timeout;
|
|
12
|
+
const [active, setActive] = (0, _react.useState)(false);
|
|
13
|
+
const showTip = () => {
|
|
14
|
+
timeout = setTimeout(() => {
|
|
20
15
|
setActive(true);
|
|
21
16
|
}, props.delay || 400);
|
|
22
17
|
};
|
|
23
|
-
|
|
18
|
+
const hideTip = () => {
|
|
24
19
|
clearInterval(timeout);
|
|
25
20
|
setActive(false);
|
|
26
21
|
};
|
|
@@ -9,10 +9,10 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
10
|
var _templateObject, _templateObject2, _templateObject3;
|
|
11
11
|
/* Custom properties */
|
|
12
|
-
|
|
12
|
+
const TooltipContainer = exports.TooltipContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n --tooltip-text-color: black;\n --tooltip-background-color: white;\n --tooltip-margin: 40px;\n --tooltip-arrow-size: 10px;\n"])));
|
|
13
13
|
|
|
14
14
|
/* Wrapping */
|
|
15
|
-
|
|
15
|
+
const TooltipWrapper = exports.TooltipWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n position: relative;\n"])));
|
|
16
16
|
|
|
17
17
|
/* Absolute positioning */
|
|
18
|
-
|
|
18
|
+
const TooltipTip = exports.TooltipTip = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n position: absolute;\n border-radius: 4px;\n left: 50%;\n transform: translateX(-50%);\n padding: 4px 6px;\n color: var(--tooltip-text-color);\n background: var(--tooltip-background-color);\n font-size: 12px;\n font-family: sans-serif;\n line-height: 1;\n z-index: 100;\n white-space: nowrap;\n \n /* CSS border triangles */\n &.controls::before {\n content: \" \";\n left: 50%;\n border: solid transparent;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n border-width: var(--tooltip-arrow-size);\n margin-left: calc(var(--tooltip-arrow-size) * -1);\n }\n\n /* Absolute positioning */\n &.controls.top {\n top: calc(var(--tooltip-margin) * -1);\n }\n\n /* CSS border triangles */\n &.controls.top::before {\n top: 100%;\n border-top-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.right {\n left: calc(70% + var(--tooltip-margin));\n top: 50%;\n transform: translateX(0) translateY(-50%);\n }\n\n /* CSS border triangles */\n &.controls.right::before {\n left: calc(var(--tooltip-arrow-size) * -1);\n top: 50%;\n transform: translateX(0) translateY(-50%);\n border-right-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.bottom {\n bottom: calc(var(--tooltip-margin) * -1);\n }\n /* CSS border triangles */\n &.controls.bottom::before {\n bottom: 100%;\n border-bottom-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.left {\n left: auto;\n right: calc(70% + var(--tooltip-margin));\n top: 50%;\n transform: translateX(0) translateY(-50%);\n }\n /* CSS border triangles */\n &.controls.left::before {\n left: auto;\n right: calc(var(--tooltip-arrow-size) * -2);\n top: 50%;\n transform: translateX(0) translateY(-50%);\n border-left-color: var(--tooltip-background-color);\n }\n"])));
|
|
@@ -1,89 +1,85 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.TotalBenchmark = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _NoDataFoundMessage = require("./NoDataFoundMessage");
|
|
12
10
|
var _CommonFunctions = require("./CommonFunctions");
|
|
13
11
|
var _Benchmark = require("./Benchmark");
|
|
14
12
|
var _TotalBenchmark = require("./TotalBenchmark.style");
|
|
15
13
|
/* TotalBenchmark */
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
const TotalBenchmark = props => {
|
|
15
|
+
const {
|
|
16
|
+
data,
|
|
17
|
+
dotCut,
|
|
18
|
+
addingBenchmark,
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
textcolor,
|
|
22
|
+
noDataText
|
|
23
|
+
} = props;
|
|
24
|
+
const DEFAULT_ROOT_FONT = 16;
|
|
25
|
+
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
26
|
+
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
27
|
+
const controlsContainerRef = (0, _react.useRef)();
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
const {
|
|
30
|
+
offsetWidth
|
|
31
|
+
} = controlsContainerRef.current;
|
|
33
32
|
setRootFont(getRootFont(offsetWidth));
|
|
34
33
|
}, [width]);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const getRootFont = width => {
|
|
35
|
+
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
36
|
+
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
38
37
|
return fontRoot;
|
|
39
38
|
};
|
|
40
|
-
|
|
41
|
-
return rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
42
|
-
};
|
|
39
|
+
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
43
40
|
return /*#__PURE__*/_react.default.createElement(_TotalBenchmark.ControlsContainer, {
|
|
44
41
|
id: "ControlsContainer",
|
|
45
42
|
height: height,
|
|
46
43
|
width: width,
|
|
47
44
|
textcolor: textcolor,
|
|
48
45
|
ref: controlsContainerRef
|
|
49
|
-
}, (data === null || data === void 0 ? void 0 : data.length) > 0 ? data.map(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}) : ''))));
|
|
81
|
-
}) : /*#__PURE__*/_react.default.createElement(_TotalBenchmark.NoDataFoundContainer, {
|
|
46
|
+
}, (data === null || data === void 0 ? void 0 : data.length) > 0 ? data.map((item, index) => /*#__PURE__*/_react.default.createElement(_TotalBenchmark.Controls, {
|
|
47
|
+
id: "Controls",
|
|
48
|
+
index: index,
|
|
49
|
+
width: width,
|
|
50
|
+
key: item.title
|
|
51
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.TitleAndValueContainer, {
|
|
52
|
+
id: "TitleAndValueContainer"
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.Title, {
|
|
54
|
+
id: "Title",
|
|
55
|
+
width: width
|
|
56
|
+
}, item.title), /*#__PURE__*/_react.default.createElement(_TotalBenchmark.BenchmarkContainerParent, {
|
|
57
|
+
id: "BenchmarkContainerParent"
|
|
58
|
+
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmark.FormattedValue, {
|
|
59
|
+
id: "FormattedValue",
|
|
60
|
+
width: width
|
|
61
|
+
}, item.value != undefined && item.value != null ? dotCut ? (0, _CommonFunctions.getFormattedValue)(item.value) : (0, _CommonFunctions.getNumberWithCommas)(item.value) : '', item.value !== undefined && item.value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(item.value) : '', item.value === undefined || item.value === null ? /*#__PURE__*/_react.default.createElement(_TotalBenchmark.FormattedValueNoData, null, "No Data") : ''), addingBenchmark && /*#__PURE__*/_react.default.createElement(_TotalBenchmark.BenchmarkContainer, {
|
|
62
|
+
id: "BenchmarkContainer",
|
|
63
|
+
width: width
|
|
64
|
+
}, item.totalValue ? /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
65
|
+
id: "Benchmark",
|
|
66
|
+
totalValue: item.totalValue,
|
|
67
|
+
currentValue: item.value ? item.value : 0,
|
|
68
|
+
benchmarkValue: item.benchmarkValue ? item.benchmarkValue : 0,
|
|
69
|
+
height: 12 * getSizeFactor(),
|
|
70
|
+
width: 85 * getSizeFactor(),
|
|
71
|
+
color: "#79DB95",
|
|
72
|
+
linearGradientColor: "#C3EFD0",
|
|
73
|
+
linearGradientUnderAvarageColor: "#FDB1B1",
|
|
74
|
+
underAvarageColor: "#FD5959",
|
|
75
|
+
backgroundColor: "#F2F2F2"
|
|
76
|
+
}) : ''))))) : /*#__PURE__*/_react.default.createElement(_TotalBenchmark.NoDataFoundContainer, {
|
|
82
77
|
id: "NoDataFoundContainer"
|
|
83
78
|
}, /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
84
79
|
noDataText: noDataText
|
|
85
80
|
})));
|
|
86
81
|
};
|
|
82
|
+
exports.TotalBenchmark = TotalBenchmark;
|
|
87
83
|
var _default = exports.default = TotalBenchmark;
|
|
88
84
|
TotalBenchmark.defaultProps = {
|
|
89
85
|
data: {
|
|
@@ -8,20 +8,14 @@ exports.TitleAndValueContainer = exports.Title = exports.NoDataFoundContainer =
|
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var Title = exports.Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n //margin-bottom: 1rem;\n"])));
|
|
23
|
-
var FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-weight: 500;\n font-size: 2.22222rem;\n"])));
|
|
24
|
-
var FormattedValueNoData = exports.FormattedValueNoData = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-weight: 700;\n font-size: 16px;\n"])));
|
|
25
|
-
var BenchmarkContainerParent = exports.BenchmarkContainerParent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: baseline;\n width: 100%;\n height: 100%;\n margin: 0;\n"])));
|
|
26
|
-
var BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n margin-top: 0;\n margin-left: 1rem;\n height: 0.9rem;\n //margin: 0;\n"])));
|
|
27
|
-
var NoDataFoundContainer = exports.NoDataFoundContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
11
|
+
const MIN_HEIGHT = 300;
|
|
12
|
+
const MIN_WIDTH = 260;
|
|
13
|
+
const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n position: relative;\n font-family: \"Poppins\", sans-serif;\n font-style: normal;\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-content: center;\n flex-direction: column;\n place-content: space-between;\n justify-content: space-between;\n align-items: flex-start;\n background: #ffffff;\n"])), props => props.textcolor, props => props.width, props => props.height);
|
|
14
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n //display: flex;\n border-radius: 12px;\n /* width: 90%;\n height: 40%; */\n //justify-content: center;\n //align-items: flex-start;\n background: #ffffff;\n margin-bottom: 2rem;\n padding: 0px 0.8rem;\n"])));
|
|
15
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n //display: flex;\n //flex-direction: column;\n width: 100%;\n"])));
|
|
16
|
+
const Title = exports.Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n //margin-bottom: 1rem;\n"])));
|
|
17
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-weight: 500;\n font-size: 2.22222rem;\n"])));
|
|
18
|
+
const FormattedValueNoData = exports.FormattedValueNoData = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n font-weight: 700;\n font-size: 16px;\n"])));
|
|
19
|
+
const BenchmarkContainerParent = exports.BenchmarkContainerParent = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: baseline;\n width: 100%;\n height: 100%;\n margin: 0;\n"])));
|
|
20
|
+
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n margin-top: 0;\n margin-left: 1rem;\n height: 0.9rem;\n //margin: 0;\n"])));
|
|
21
|
+
const NoDataFoundContainer = exports.NoDataFoundContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.TotalBenchmarkAreachart = void 0;
|
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
9
|
var _recharts = require("recharts");
|
|
12
10
|
var _ArrowUpIcon = require("./icons/ArrowUpIcon");
|
|
@@ -16,54 +14,50 @@ var _Benchmark = require("./Benchmark");
|
|
|
16
14
|
var _TotalBenchmarkAreachart = require("./TotalBenchmarkAreachart.style");
|
|
17
15
|
var _CommonFunctions = require("./CommonFunctions");
|
|
18
16
|
/* TotalBenchmarkAreachart */
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
(0, _react.useEffect)(function () {
|
|
55
|
-
var offsetWidth = controlsContainerRef.current.offsetWidth;
|
|
17
|
+
const TotalBenchmarkAreachart = props => {
|
|
18
|
+
const {
|
|
19
|
+
title,
|
|
20
|
+
value,
|
|
21
|
+
arrowSign,
|
|
22
|
+
addingBenchmark,
|
|
23
|
+
benchmarkTotalValue,
|
|
24
|
+
benchmarkValue,
|
|
25
|
+
areaChartData,
|
|
26
|
+
width,
|
|
27
|
+
height,
|
|
28
|
+
textcolor,
|
|
29
|
+
areaChart1Color,
|
|
30
|
+
areaChart2Color,
|
|
31
|
+
xselectedColor,
|
|
32
|
+
fillChart1Color,
|
|
33
|
+
fillChart2Color,
|
|
34
|
+
startOffset,
|
|
35
|
+
endOffset,
|
|
36
|
+
opacity,
|
|
37
|
+
value1Title,
|
|
38
|
+
value2Title,
|
|
39
|
+
noDataText
|
|
40
|
+
} = props;
|
|
41
|
+
const DEFAULT_ROOT_FONT = 16;
|
|
42
|
+
const DEFAULT_COMPONENT_WIDTH = 250;
|
|
43
|
+
const DEFAULT_COMPONENT_HEIGHT = 280;
|
|
44
|
+
const [rootFont, setRootFont] = (0, _react.useState)(DEFAULT_ROOT_FONT.toString().concat('', 'px'));
|
|
45
|
+
const anotherRef = (0, _react.useRef)(null);
|
|
46
|
+
const [activeLabel, setActiveLabel] = (0, _react.useState)('');
|
|
47
|
+
const controlsContainerRef = (0, _react.useRef)();
|
|
48
|
+
(0, _react.useEffect)(() => {
|
|
49
|
+
const {
|
|
50
|
+
offsetWidth
|
|
51
|
+
} = controlsContainerRef.current;
|
|
56
52
|
setRootFont(getRootFont(offsetWidth));
|
|
57
53
|
}, [width]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
const getRootFont = width => {
|
|
55
|
+
const relation = width.toString().replace('px', '').replace('%', '') / DEFAULT_COMPONENT_WIDTH;
|
|
56
|
+
const fontRoot = (DEFAULT_ROOT_FONT * relation).toString().concat('', 'px');
|
|
61
57
|
return fontRoot;
|
|
62
58
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
var getArrowSign = function getArrowSign(arrowSign) {
|
|
59
|
+
const getSizeFactor = () => rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
60
|
+
const getArrowSign = arrowSign => {
|
|
67
61
|
if (!arrowSign) {
|
|
68
62
|
return '';
|
|
69
63
|
}
|
|
@@ -84,11 +78,13 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
|
|
|
84
78
|
height: 25 * getSizeFactor()
|
|
85
79
|
}));
|
|
86
80
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
81
|
+
const CustomTick = _ref => {
|
|
82
|
+
let {
|
|
83
|
+
x,
|
|
84
|
+
y,
|
|
85
|
+
stroke,
|
|
86
|
+
payload
|
|
87
|
+
} = _ref;
|
|
92
88
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
93
89
|
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
94
90
|
}, activeLabel === payload.value && /*#__PURE__*/_react.default.createElement("rect", {
|
|
@@ -107,10 +103,12 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
|
|
|
107
103
|
fontSize: "14px"
|
|
108
104
|
}, payload.value));
|
|
109
105
|
};
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
const CustomTooltip = _ref2 => {
|
|
107
|
+
let {
|
|
108
|
+
active,
|
|
109
|
+
payload,
|
|
110
|
+
label
|
|
111
|
+
} = _ref2;
|
|
114
112
|
if (active && payload && payload.length) {
|
|
115
113
|
setActiveLabel(label);
|
|
116
114
|
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipDiv, null, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipTitle, null, "".concat(label)), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value1Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[0].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[0].value))), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachart.TooltipLabel, null, "".concat(value2Title, " ").concat((0, _CommonFunctions.getFormattedValue)(payload[1].value)).concat((0, _CommonFunctions.getFormattedUnits)(payload[1].value))));
|
|
@@ -196,9 +194,7 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
|
|
|
196
194
|
stopOpacity: opacity
|
|
197
195
|
}))), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
198
196
|
dataKey: "title",
|
|
199
|
-
tick:
|
|
200
|
-
return /*#__PURE__*/_react.default.createElement(CustomTick, item);
|
|
201
|
-
},
|
|
197
|
+
tick: item => /*#__PURE__*/_react.default.createElement(CustomTick, item),
|
|
202
198
|
tickLine: false,
|
|
203
199
|
style: {
|
|
204
200
|
fontWeight: '700',
|
|
@@ -225,6 +221,7 @@ var TotalBenchmarkAreachart = exports.TotalBenchmarkAreachart = function TotalBe
|
|
|
225
221
|
noDataText: noDataText
|
|
226
222
|
}));
|
|
227
223
|
};
|
|
224
|
+
exports.TotalBenchmarkAreachart = TotalBenchmarkAreachart;
|
|
228
225
|
var _default = exports.default = TotalBenchmarkAreachart;
|
|
229
226
|
TotalBenchmarkAreachart.defaultProps = {
|
|
230
227
|
title: 'String',
|
|
@@ -8,23 +8,17 @@ exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel
|
|
|
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, _templateObject14;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n"])));
|
|
26
|
-
var DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n width: 22px;\n @media (max-width: 1366px) {\n width: 12px;\n }\n @media (max-width: 1536px) {\n width: 14px;\n }\n"])));
|
|
27
|
-
var FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
|
|
28
|
-
var CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
29
|
-
var FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0; \n"])));
|
|
30
|
-
var BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\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 border-radius: 12px;\n"])), props => props.textColor, props => props.width, props => props.height);
|
|
12
|
+
const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background: #ffffff;\n border-radius: 12px;\n flex-basis: 100%;\n"])));
|
|
13
|
+
const AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 50%;\n"])));
|
|
14
|
+
const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #ffffff;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
|
|
15
|
+
const TooltipLabel = exports.TooltipLabel = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n"])));
|
|
16
|
+
const TooltipTitle = exports.TooltipTitle = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n"])));
|
|
17
|
+
const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 1rem;\n"])));
|
|
18
|
+
const Title = exports.Title = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
19
|
+
const ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: center;\n"])));
|
|
20
|
+
const DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n width: 22px;\n @media (max-width: 1366px) {\n width: 12px;\n }\n @media (max-width: 1536px) {\n width: 14px;\n }\n"])));
|
|
21
|
+
const FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 40px;\n @media (max-width: 1366px) {\n font-size: 20px;\n }\n @media (max-width: 1536px) {\n font-size: 24px;\n }\n"])));
|
|
22
|
+
const CurrencySign = exports.CurrencySign = _styledComponents.default.span(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n @media (max-width: 1536px) {\n font-size: 14px;\n }\n"])));
|
|
23
|
+
const FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0; \n"])));
|
|
24
|
+
const BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
|