sag_components 1.0.238 → 1.0.239
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.
|
@@ -116,11 +116,11 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
116
116
|
tempFormattedBarChartData.push({
|
|
117
117
|
title1: barChartData[0].title,
|
|
118
118
|
value1: barChartData[0].value,
|
|
119
|
-
formattedValue1: currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[0].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[0].value)),
|
|
119
|
+
formattedValue1: barChartData[0].value != undefined && barChartData[0].value != null ? currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[0].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[0].value)) : "No Data",
|
|
120
120
|
color1: barChartData[0].color ? barChartData[0].color : "#79DB95",
|
|
121
121
|
title2: barChartData[1].title,
|
|
122
122
|
value2: barChartData[1].value,
|
|
123
|
-
formattedValue2: currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[1].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[1].value)),
|
|
123
|
+
formattedValue2: barChartData[1].value != undefined && barChartData[1].value != null ? currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[1].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[1].value)) : "No Data",
|
|
124
124
|
color2: barChartData[1].color ? barChartData[1].color : "#D4C0FF"
|
|
125
125
|
});
|
|
126
126
|
|
|
@@ -137,7 +137,7 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
137
137
|
textColor: textColor,
|
|
138
138
|
ref: controlsContainerRef,
|
|
139
139
|
rootFont: rootFont
|
|
140
|
-
}, (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length)
|
|
140
|
+
}, value != undefined && value != null || (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) >= 2 && (barChartData[0].value != undefined && barChartData[0].value != null || barChartData[1].value != undefined && barChartData[1].value != null) ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.Controls, {
|
|
141
141
|
id: "Controls"
|
|
142
142
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.TitleAndValueContainer, {
|
|
143
143
|
id: "TitleAndValueContainer"
|
|
@@ -147,14 +147,14 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
147
147
|
id: "ValueAndBenchmarkContainer"
|
|
148
148
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.CurrencySign, {
|
|
149
149
|
id: "CurrencySign"
|
|
150
|
-
}, currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.FormattedValue, {
|
|
150
|
+
}, value != undefined && value != null && currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.FormattedValue, {
|
|
151
151
|
id: "FormattedValue"
|
|
152
|
-
}, dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BenchmarkContainer, {
|
|
152
|
+
}, value != undefined && value != null ? dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value) : "", value != undefined && value != null && dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.FormattedValueNoDataMessage, null, value === undefined || value === null ? "No Data" : ""), benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BenchmarkContainer, {
|
|
153
153
|
id: "BenchmarkContainer"
|
|
154
154
|
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
155
|
-
totalValue: benchmarkTotalValue,
|
|
156
|
-
currentValue: value,
|
|
157
|
-
benchmarkValue: benchmarkValue,
|
|
155
|
+
totalValue: benchmarkTotalValue !== null && benchmarkTotalValue !== void 0 ? benchmarkTotalValue : 0,
|
|
156
|
+
currentValue: value !== null && value !== void 0 ? value : 0,
|
|
157
|
+
benchmarkValue: benchmarkValue !== null && benchmarkValue !== void 0 ? benchmarkValue : 0,
|
|
158
158
|
height: 12 * getSizeFactor(),
|
|
159
159
|
width: 85 * getSizeFactor(),
|
|
160
160
|
color: "#79DB95",
|
|
@@ -4,10 +4,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.TitleAndValueContainer = exports.Title = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BottomDetailsRowTitle = exports.BottomDetailsRowContainer = exports.BenchmarkContainer = exports.BarchartContainer = void 0;
|
|
7
|
+
exports.ValueAndBenchmarkContainer = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.BottomDetailsRowTitle = exports.BottomDetailsRowContainer = exports.BenchmarkContainer = exports.BarchartContainer = 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, _templateObject10, _templateObject11;
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
11
11
|
var 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 font-size: ", ";\n color: ", ";\n width: ", ";\n height: ", ";\n border-radius: 12px;\n align-content: center;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: #ffffff;\n"])), function (props) {
|
|
12
12
|
return props.rootFont;
|
|
13
13
|
}, function (props) {
|
|
@@ -30,11 +30,13 @@ var CurrencySign = _styledComponents.default.div(_templateObject6 || (_templateO
|
|
|
30
30
|
exports.CurrencySign = CurrencySign;
|
|
31
31
|
var FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.22222rem;\n"])));
|
|
32
32
|
exports.FormattedValue = FormattedValue;
|
|
33
|
-
var
|
|
33
|
+
var FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 0.88889rem;\n margin: 0; \n"])));
|
|
34
|
+
exports.FormattedValueNoDataMessage = FormattedValueNoDataMessage;
|
|
35
|
+
var BenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.7em;\n width: 5.35em;\n"])));
|
|
34
36
|
exports.BenchmarkContainer = BenchmarkContainer;
|
|
35
|
-
var BarchartContainer = _styledComponents.default.div(
|
|
37
|
+
var BarchartContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n width: 14em;\n\n"])));
|
|
36
38
|
exports.BarchartContainer = BarchartContainer;
|
|
37
|
-
var BottomDetailsRowContainer = _styledComponents.default.div(
|
|
39
|
+
var BottomDetailsRowContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n text-align: center; \n //max-height: 20px;\n"])));
|
|
38
40
|
exports.BottomDetailsRowContainer = BottomDetailsRowContainer;
|
|
39
|
-
var BottomDetailsRowTitle = _styledComponents.default.div(
|
|
41
|
+
var BottomDetailsRowTitle = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center; \n margin-top: 4px;\n width: 14em;\n font-weight: 400;\n font-size: 14px;\n max-height: 20px;\n"])));
|
|
40
42
|
exports.BottomDetailsRowTitle = BottomDetailsRowTitle;
|