sag_components 1.0.657 → 1.0.659
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.
|
@@ -20,6 +20,7 @@ const ICON_TYPE_SQUARE = 'Square';
|
|
|
20
20
|
/* BarChartsByWeeks */
|
|
21
21
|
const BarChart = props => {
|
|
22
22
|
const {
|
|
23
|
+
className,
|
|
23
24
|
title,
|
|
24
25
|
barChartData,
|
|
25
26
|
barSize,
|
|
@@ -49,7 +50,7 @@ const BarChart = props => {
|
|
|
49
50
|
const displayFormattedValue = value => {
|
|
50
51
|
if (!value) return '';
|
|
51
52
|
let formattedValue = '';
|
|
52
|
-
formattedValue = !isDollar ? ''.concat('', value.toFixed(1)
|
|
53
|
+
formattedValue = !isDollar ? ''.concat('X', value.toFixed(1)) : ''.concat('$', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
|
|
53
54
|
return formattedValue;
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -73,21 +74,6 @@ const BarChart = props => {
|
|
|
73
74
|
stroke,
|
|
74
75
|
payload
|
|
75
76
|
} = props;
|
|
76
|
-
|
|
77
|
-
// const handleMouseEnter = (content) => {
|
|
78
|
-
// setTooltipCouponText((prevState) => ({
|
|
79
|
-
// ...prevState,
|
|
80
|
-
// content: content !== prevState.content ? content : prevState.content,
|
|
81
|
-
// clientX: x,
|
|
82
|
-
// clientY: y,
|
|
83
|
-
// }));
|
|
84
|
-
// setShowLegendTooltip(true);
|
|
85
|
-
// };
|
|
86
|
-
|
|
87
|
-
// const handleMouseLeave = () => {
|
|
88
|
-
// setShowLegendTooltip(false);
|
|
89
|
-
// };
|
|
90
|
-
|
|
91
77
|
if (barChartData && barChartData.length > 0 && payload) {
|
|
92
78
|
const retailerData = barChartData.filter(item => item.title === payload.value);
|
|
93
79
|
if (retailerData && retailerData.length > 0) {
|
|
@@ -137,6 +123,7 @@ const BarChart = props => {
|
|
|
137
123
|
}, displayFormattedValue(value));
|
|
138
124
|
};
|
|
139
125
|
return /*#__PURE__*/_react.default.createElement(_BarChart.ControlsContainer, {
|
|
126
|
+
className: className,
|
|
140
127
|
id: "ControlsContainer",
|
|
141
128
|
height: height,
|
|
142
129
|
width: width,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = exports.LinnerDataBox = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _LinnerDataBox = require("./LinnerDataBox.style");
|
|
10
|
+
const LinnerDataBox = props => {
|
|
11
|
+
const {
|
|
12
|
+
width,
|
|
13
|
+
height,
|
|
14
|
+
data
|
|
15
|
+
} = props;
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement(_LinnerDataBox.LinnerContainer, {
|
|
17
|
+
width: width || '100%',
|
|
18
|
+
height: height || '200px'
|
|
19
|
+
}, data.map(item => /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBox, null, /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxTitle, null, item.title), /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContent, null, /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentSign, null, item.sign), /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxContentValue, null, item.value)), item.extraInfo.map(extraInfoItem => /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCell, null, /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCellValue, null, extraInfoItem.value), /*#__PURE__*/_react.default.createElement(_LinnerDataBox.DataBoxExtraInfoCellTitle, null, extraInfoItem.title))))));
|
|
20
|
+
};
|
|
21
|
+
exports.LinnerDataBox = LinnerDataBox;
|
|
22
|
+
var _default = exports.default = LinnerDataBox;
|
|
23
|
+
LinnerDataBox.defaultProps = {
|
|
24
|
+
width: '100%',
|
|
25
|
+
height: '200px',
|
|
26
|
+
data: []
|
|
27
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.LinnerContainer = exports.DataBoxTitle = exports.DataBoxExtraInfoCellValue = exports.DataBoxExtraInfoCellTitle = exports.DataBoxExtraInfoCell = exports.DataBoxExtraInfo = exports.DataBoxContentValue = exports.DataBoxContentSign = exports.DataBoxContent = exports.DataBox = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
9
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
|
+
const LinnerContainer = exports.LinnerContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n width: ", ";\n height: ", ";\n"])), props => props.width, props => props.height);
|
|
12
|
+
const DataBox = exports.DataBox = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: auto;\n height: 80%;\n"])));
|
|
13
|
+
const DataBoxTitle = exports.DataBoxTitle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n"])));
|
|
14
|
+
const DataBoxContent = exports.DataBoxContent = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"])));
|
|
15
|
+
const DataBoxContentValue = exports.DataBoxContentValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 40px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n"])));
|
|
16
|
+
const DataBoxContentSign = exports.DataBoxContentSign = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 18px;\n font-style: normal;\n font-weight: 500;\n line-height: normal;\n"])));
|
|
17
|
+
const DataBoxExtraInfo = exports.DataBoxExtraInfo = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n"])));
|
|
18
|
+
const DataBoxExtraInfoCell = exports.DataBoxExtraInfoCell = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n gap: 5px;\n flex-direction: row;\n"])));
|
|
19
|
+
const DataBoxExtraInfoCellTitle = exports.DataBoxExtraInfoCellTitle = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n color: #999;\n font-family: Poppins;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n text-transform: uppercase;\n"])));
|
|
20
|
+
const DataBoxExtraInfoCellValue = exports.DataBoxExtraInfoCellValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n color: #999;\n font-family: Poppins;\n font-size: 12px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n text-transform: uppercase;\n"])));
|