sag_components 1.0.736 → 1.0.738

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.
@@ -30,31 +30,17 @@ const BarChart = props => {
30
30
  barChartColor,
31
31
  showLegend,
32
32
  legendData,
33
+ showDollarSign,
33
34
  showReferenceLine,
34
35
  referenceLinePoint,
35
36
  referenceLineColor,
36
37
  referenceLineDashed
37
38
  } = props;
38
-
39
- // const [BarChartContainerWidth, setBarChartContainerWidth] = useState(0);
40
- // const [BarChartContainerHeight, setBarChartContainerHeight] = useState(0);
41
-
42
39
  const controlsContainerRef = (0, _react.useRef)();
43
-
44
- // useEffect(() => {
45
- // const { offsetWidth } = controlsContainerRef.current;
46
- // setBarChartContainerWidth(offsetWidth - 20);
47
- // }, [width]);
48
-
49
- // useEffect(() => {
50
- // const { offsetHeight } = controlsContainerRef.current;
51
- // setBarChartContainerHeight(offsetHeight - 40);
52
- // }, [height]);
53
-
54
40
  const displayFormattedValue = value => {
55
41
  if (!value) return '';
56
42
  let formattedValue = '';
57
- formattedValue = !isDollar ? ''.concat('X', value.toFixed(1)) : ''.concat('$', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
43
+ formattedValue = !isDollar ? ''.concat('X', value.toFixed(1)) : ''.concat(showDollarSign ? '$' : '', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
58
44
  return formattedValue;
59
45
  };
60
46
 
@@ -134,7 +120,7 @@ const BarChart = props => {
134
120
  height: height,
135
121
  data: barChartData,
136
122
  margin: {
137
- top: 10,
123
+ top: 20,
138
124
  right: 0,
139
125
  bottom: 0,
140
126
  left: -5
@@ -194,6 +180,7 @@ BarChart.defaultProps = {
194
180
  height: '100%',
195
181
  barSize: 60,
196
182
  barChartColor: '#BD9EFF',
183
+ showDollarSign: true,
197
184
  isDollar: true,
198
185
  showLegend: true,
199
186
  legendData: [{
@@ -201,7 +188,7 @@ BarChart.defaultProps = {
201
188
  iconType: ICON_TYPE_SQUARE,
202
189
  iconColor: '#BD9EFF'
203
190
  }],
204
- showReferenceLine: true,
191
+ showReferenceLine: false,
205
192
  referenceLinePoint: 0,
206
193
  referenceLineColor: '#212121',
207
194
  referenceLineDashed: '5'
@@ -31,6 +31,7 @@ const BarChartTwoRows = props => {
31
31
  barChartColorSecond,
32
32
  showLegend,
33
33
  legendData,
34
+ showDollarSign,
34
35
  showReferenceLine,
35
36
  referenceLinePoint,
36
37
  referenceLineColor,
@@ -42,7 +43,7 @@ const BarChartTwoRows = props => {
42
43
  const displayFormattedValue = value => {
43
44
  if (!value) return '';
44
45
  let formattedValue = '';
45
- formattedValue = !isDollar ? ''.concat('X', value.toFixed(1)) : ''.concat('$', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
46
+ formattedValue = !isDollar ? ''.concat('X', value.toFixed(1)) : ''.concat(showDollarSign ? '$' : '', (0, _CommonFunctions.getFormattedValue)(value), (0, _CommonFunctions.getFormattedUnits)(value));
46
47
  return formattedValue;
47
48
  };
48
49
 
@@ -126,7 +127,7 @@ const BarChartTwoRows = props => {
126
127
  height: height,
127
128
  data: barChartData,
128
129
  margin: {
129
- top: 10,
130
+ top: 20,
130
131
  right: 0,
131
132
  bottom: 0,
132
133
  left: -5
@@ -192,6 +193,7 @@ BarChartTwoRows.defaultProps = {
192
193
  barSize: 60,
193
194
  barChartColorFirst: '#BD9EFF',
194
195
  barChartColorSecond: '#0b00aaF',
196
+ showDollarSign: true,
195
197
  isDollar: true,
196
198
  showLegend: true,
197
199
  legendData: [{
@@ -199,7 +201,7 @@ BarChartTwoRows.defaultProps = {
199
201
  iconType: ICON_TYPE_SQUARE,
200
202
  iconColor: '#BD9EFF'
201
203
  }],
202
- showReferenceLine: true,
204
+ showReferenceLine: false,
203
205
  referenceLinePoint: 0,
204
206
  referenceLineColor: '#212121',
205
207
  referenceLineDashed: '5',
@@ -4,16 +4,15 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.LabelText = exports.LabelBoldText = exports.ControlsContainer = exports.Controls = void 0;
7
+ exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.Title = exports.LabelText = exports.LabelBoldText = exports.ControlsContainer = exports.Controls = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
10
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
11
11
  const ControlsContainer = exports.ControlsContainer = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n font-family: \"Poppins\", sans-serif;\n color: #212121;\n width: ", ";\n height: ", ";\n min-width: 250px;\n"])), 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 background: #ffffff;\n"])));
12
+ const Controls = exports.Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n background: white;\n display: flex;\n flex-direction: column;\n"])));
13
13
  const TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n padding: 8px 12px;\n background: white;\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n margin: 0;\n"])));
14
14
  const TooltipLabel = exports.TooltipLabel = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n"])));
15
- const TooltipTitle = exports.TooltipTitle = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 600;\n line-height: normal;\n"])));
16
- const TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding: 0 1rem;\n"])));
17
- const Title = exports.Title = _styledComponents.default.h5(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n line-height: 20px;\n margin: 0 0 30px;\n @media (max-width: 1536px) {\n font-size: 16px;\n margin: 0 0 20px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n"])));
18
- const LabelBoldText = exports.LabelBoldText = _styledComponents.default.tspan(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 12px;\n }\n"])));
19
- const LabelText = exports.LabelText = _styledComponents.default.tspan(_templateObject9 || (_templateObject9 = (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"])));
15
+ const TooltipTitle = exports.TooltipTitle = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-size: 14px;\n font-weight: 600;\n"])));
16
+ const Title = exports.Title = _styledComponents.default.h5(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 18px;\n line-height: 20px;\n margin: 0 0 30px;\n @media (max-width: 1536px) {\n font-size: 16px;\n margin: 0 0 20px;\n }\n @media (max-width: 1366px) {\n font-size: 14px;\n }\n"])));
17
+ const LabelBoldText = exports.LabelBoldText = _styledComponents.default.tspan(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 16px;\n @media (max-width: 1536px) {\n font-size: 12px;\n }\n"])));
18
+ const LabelText = exports.LabelText = _styledComponents.default.tspan(_templateObject8 || (_templateObject8 = (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"])));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.736",
3
+ "version": "1.0.738",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {