sag_components 1.0.587 → 1.0.588

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.
@@ -49,8 +49,8 @@ const OneColumnContainer = props => {
49
49
  width: width,
50
50
  height: height,
51
51
  overflow: overflow
52
- }, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.MainDiv, {
53
- className: "mainDiv",
52
+ }, /*#__PURE__*/_react.default.createElement(_OneColumnContainer.OneColumnContainerMainDiv, {
53
+ className: "OneColumnContainerMainDiv",
54
54
  width: width,
55
55
  height: height,
56
56
  display: display,
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.StyledContainer = exports.OutBanner = exports.MainDiv = exports.LoadingDiv = exports.InfoTitleLabel = exports.InfoTextLabel = exports.InfoTextContainer = exports.IconContainer = exports.BannerContainer = void 0;
7
+ exports.StyledContainer = exports.OutBanner = exports.OneColumnContainerMainDiv = exports.LoadingDiv = exports.InfoTitleLabel = exports.InfoTextLabel = exports.InfoTextContainer = exports.IconContainer = exports.BannerContainer = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
9
9
  var _styledComponents = _interopRequireDefault(require("styled-components"));
10
10
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
@@ -14,6 +14,6 @@ const InfoTitleLabel = exports.InfoTitleLabel = _styledComponents.default.div(_t
14
14
  const InfoTextLabel = exports.InfoTextLabel = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: black;\n font-size: 14px;\n line-height: 20px;\n font-weight: 400;\n overflow: hidden;\n"])));
15
15
  const IconContainer = exports.IconContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n width: 20px;\n height: 20px;\n top: 10px;\n right: 10px;\n position: absolute;\n"])));
16
16
  const LoadingDiv = exports.LoadingDiv = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 20px;\n display: flex;\n flex-direction: column;\n justify-content: space-evenly;\n align-items: center;\n width: 76%;\n height: 65%;\n"])));
17
- const MainDiv = exports.MainDiv = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: flex-start;\n justify-content: center; \n background-color: white;\n width: ", ";\n height: ", ";\n display: ", ";\n grid-template-columns: ", ";\n"])), props => props.width, props => props.height, props => props.display, props => props.gridTemplateColumns);
17
+ const OneColumnContainerMainDiv = exports.OneColumnContainerMainDiv = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n align-items: flex-start;\n justify-content: center; \n background-color: white;\n width: ", ";\n height: ", ";\n display: ", ";\n grid-template-columns: ", ";\n"])), props => props.width, props => props.height, props => props.display, props => props.gridTemplateColumns);
18
18
  const BannerContainer = exports.BannerContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n width: 140px;\n height: 20px;\n top: 10px;\n right: ", "; \n font-family: \"Poppins\", sans-serif;\n user-select: none;\n"])), props => props.right);
19
19
  const OutBanner = exports.OutBanner = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)([" \n display: flex;\n justify-content: flex-end;\n align-items: center; \n gap: 8px; \n font-size: 14px;\n font-weight: 400;\n color: ", ";\n cursor: pointer;\n @media (max-width: 1536px) {\n font-size: 13px;\n }\n @media (max-width: 1366px) {\n font-size: 12px;\n }\n > svg {\n width: 14px;\n height: 14px;\n @media (max-width: 1536px) {\n width: 13px;\n height: 13px;\n }\n @media (max-width: 1366px) {\n width: 12px;\n height: 12px;\n }\n }\n"])), props => props.textColor);
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.TotalDoughnutChart = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _recharts = require("recharts");
10
- var _NoDataFoundMessage = require("./NoDataFoundMessage");
11
10
  var _CommonFunctions = require("./CommonFunctions");
12
11
  var _TotalDoughnutChart = require("./TotalDoughnutChart.style");
13
12
  var _Benchmark = require("./Benchmark");
@@ -28,22 +27,22 @@ const TotalDoughnutChart = props => {
28
27
  width,
29
28
  height,
30
29
  textcolor,
31
- noDataText,
32
- isPercent
30
+ isPercent,
31
+ hideTitleAndValue
33
32
  } = props;
34
33
  const [DoughnutChartRadius, setDoughnutChartRadius] = (0, _react.useState)(0);
35
34
  const [zoomResolution, setZoomResolution] = (0, _react.useState)(1);
36
35
  const DoughnutChartContainerRef = (0, _react.useRef)();
37
36
  const dotCutTrenty = row => {
38
37
  if (!row || !row.value) return 0;
39
- let value = 0;
40
- if (row !== null && row !== void 0 && row.value && Math.abs(row.value) > 0 && row.value % 1 != 0) {
38
+ let valueNew = 0;
39
+ if (row !== null && row !== void 0 && row.value && Math.abs(row.value) > 0 && row.value % 1 !== 0) {
41
40
  var _row$value;
42
- value = row === null || row === void 0 ? void 0 : (_row$value = row.value) === null || _row$value === void 0 ? void 0 : _row$value.toFixed(2);
41
+ valueNew = row === null || row === void 0 ? void 0 : (_row$value = row.value) === null || _row$value === void 0 ? void 0 : _row$value.toFixed(2);
43
42
  } else {
44
- value = row === null || row === void 0 ? void 0 : row.value;
43
+ valueNew = row === null || row === void 0 ? void 0 : row.value;
45
44
  }
46
- return dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value);
45
+ return dotCut ? (0, _CommonFunctions.getFormattedValue)(valueNew) : (0, _CommonFunctions.getNumberWithCommas)(valueNew);
47
46
  };
48
47
  (0, _react.useEffect)(() => {
49
48
  const handleResize = () => {
@@ -97,7 +96,7 @@ const TotalDoughnutChart = props => {
97
96
  id: "Controls",
98
97
  height: height,
99
98
  width: width
100
- }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer, {
99
+ }, !hideTitleAndValue && /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.TitleAndValueContainer, {
101
100
  id: "TitleAndValueContainer"
102
101
  }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.Title, {
103
102
  id: "Title",
@@ -109,7 +108,7 @@ const TotalDoughnutChart = props => {
109
108
  width: width
110
109
  }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.CurrencySign, {
111
110
  id: "CurrencySign"
112
- }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 != 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, {
111
+ }, currencySign ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), dotCut ? (0, _CommonFunctions.getFormattedValue)(value && Math.abs(value) > 0 && value % 1 !== 0 ? value === null || value === void 0 ? void 0 : value.toFixed(2) : value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ''), addingBenchmark && /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, null))), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartAndLegendContainer, {
113
112
  id: "DoughnutChartAndLegendContainer"
114
113
  }, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChart.DoughnutChartContainer, {
115
114
  id: "DoughnutChartContainer",
@@ -166,8 +165,8 @@ TotalDoughnutChart.defaultProps = {
166
165
  width: '100%',
167
166
  height: '100%',
168
167
  textcolor: '#212121',
169
- noDataText: '',
170
- isPercent: false
168
+ isPercent: false,
169
+ hideTitleAndValue: false
171
170
  };
172
171
  function CustomTooltip(_ref) {
173
172
  let {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sag_components",
3
- "version": "1.0.587",
3
+ "version": "1.0.588",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {