sag_components 1.0.249 → 1.0.250
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/dist/stories/components/CodeEditor.js +41 -0
- package/dist/stories/components/CodeEditor.style.js +13 -0
- package/dist/stories/components/CommonFunctions.js +1 -1
- package/dist/stories/components/Datepicker.js +13 -45
- package/dist/stories/components/Dropdown.js +13 -32
- package/dist/stories/components/Modal.js +20 -0
- package/dist/stories/components/Modal.style.js +21 -0
- package/dist/stories/components/NoDataFoundMessage.style.js +2 -2
- package/dist/stories/components/OneColumnContainer.js +8 -7
- package/dist/stories/components/OneColumnContainer.style.js +3 -3
- package/dist/stories/components/TextField.js +3 -25
- package/dist/stories/components/TextField.style.js +1 -1
- package/dist/stories/components/TitleDescription.js +4 -4
- package/dist/stories/components/TitleDescription.style.js +7 -7
- package/dist/stories/components/TotalBenchmark.js +5 -7
- package/dist/stories/components/TotalBenchmark.style.js +9 -13
- package/dist/stories/components/TotalBenchmarkAreachart.js +15 -15
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +12 -14
- package/dist/stories/components/TotalBenchmarkArrows.js +7 -9
- package/dist/stories/components/TotalBenchmarkArrows.style.js +10 -12
- package/dist/stories/components/TotalBenchmarkBarchart.js +13 -18
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +9 -11
- package/dist/stories/components/TotalCostModal.js +144 -0
- package/dist/stories/components/TotalDoughnutChart.js +2 -2
- package/dist/stories/components/TotalDoughnutChart.style.js +10 -10
- package/dist/stories/components/icons/InfoIcon.js +3 -3
- package/package.json +4 -1
- package/dist/stories/components/InfoIcon.js +0 -38
|
@@ -124,19 +124,19 @@ var TotalBenchmarkAreachart = function TotalBenchmarkAreachart(_ref) {
|
|
|
124
124
|
return /*#__PURE__*/_react.default.createElement("g", {
|
|
125
125
|
transform: "translate(".concat(x, ",").concat(y, ")")
|
|
126
126
|
}, activeLabel === payload.value && /*#__PURE__*/_react.default.createElement("rect", {
|
|
127
|
-
x: -
|
|
127
|
+
x: -10,
|
|
128
128
|
y: 0,
|
|
129
|
-
width: "
|
|
129
|
+
width: "26",
|
|
130
130
|
height: "18",
|
|
131
131
|
rx: 9,
|
|
132
132
|
fill: xselectedColor,
|
|
133
|
-
fillOpacity: "0.
|
|
133
|
+
fillOpacity: "0.10"
|
|
134
134
|
}), /*#__PURE__*/_react.default.createElement("text", {
|
|
135
135
|
x: 0,
|
|
136
|
-
y:
|
|
137
|
-
dx: -
|
|
136
|
+
y: 13,
|
|
137
|
+
dx: -5,
|
|
138
138
|
fill: "black",
|
|
139
|
-
fontSize: "
|
|
139
|
+
fontSize: "8px"
|
|
140
140
|
}, payload.value));
|
|
141
141
|
};
|
|
142
142
|
var CustomTooltip = function CustomTooltip(_ref3) {
|
|
@@ -157,7 +157,7 @@ var TotalBenchmarkAreachart = function TotalBenchmarkAreachart(_ref) {
|
|
|
157
157
|
textColor: textColor,
|
|
158
158
|
ref: controlsContainerRef,
|
|
159
159
|
rootFont: rootFont
|
|
160
|
-
},
|
|
160
|
+
}, (areaChartData === null || areaChartData === void 0 ? void 0 : areaChartData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachartStyle.Controls, {
|
|
161
161
|
id: "Controls"
|
|
162
162
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachartStyle.TitleAndValueContainer, {
|
|
163
163
|
id: "TitleAndValueContainer"
|
|
@@ -165,15 +165,15 @@ var TotalBenchmarkAreachart = function TotalBenchmarkAreachart(_ref) {
|
|
|
165
165
|
id: "Title"
|
|
166
166
|
}, title), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachartStyle.ValueAndBenchmarkContainer, {
|
|
167
167
|
id: "ValueAndBenchmarkContainer"
|
|
168
|
-
},
|
|
168
|
+
}, getArrowSign(arrowSign), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachartStyle.FormattedValue, {
|
|
169
169
|
id: "FormattedValue"
|
|
170
|
-
}, value
|
|
170
|
+
}, value, "%"), benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkAreachartStyle.BenchmarkContainer, {
|
|
171
171
|
id: "BenchmarkContainer"
|
|
172
172
|
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
173
173
|
id: "Benchmark",
|
|
174
|
-
totalValue: benchmarkTotalValue
|
|
175
|
-
currentValue: value
|
|
176
|
-
benchmarkValue: benchmarkValue
|
|
174
|
+
totalValue: benchmarkTotalValue,
|
|
175
|
+
currentValue: value,
|
|
176
|
+
benchmarkValue: benchmarkValue,
|
|
177
177
|
height: 12 * getSizeFactor(),
|
|
178
178
|
width: 85 * getSizeFactor(),
|
|
179
179
|
color: "#79DB95",
|
|
@@ -193,9 +193,9 @@ var TotalBenchmarkAreachart = function TotalBenchmarkAreachart(_ref) {
|
|
|
193
193
|
data: areaChartData,
|
|
194
194
|
margin: {
|
|
195
195
|
top: 0,
|
|
196
|
-
right:
|
|
197
|
-
bottom:
|
|
198
|
-
left:
|
|
196
|
+
right: 20,
|
|
197
|
+
bottom: 0,
|
|
198
|
+
left: 20
|
|
199
199
|
}
|
|
200
200
|
}, /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
201
201
|
strokeDasharray: "3 3",
|
|
@@ -4,11 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.
|
|
7
|
+
exports.ValueAndBenchmarkContainer = exports.TooltipTitle = exports.TooltipLabel = exports.TooltipDiv = exports.TitleAndValueContainer = exports.Title = exports.FormattedValue = exports.DetailsRowArrowContainer = exports.ControlsContainer = exports.Controls = exports.BottomDetailsRowTitle = exports.BottomDetailsRowContainer = exports.BenchmarkContainer = exports.AreaChartContainer = 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, _templateObject12, _templateObject13, _templateObject14
|
|
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
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
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 /* min-height: 280px;\n min-width: 250px;\n max-height: 380px;\n max-width: 350px; */\n"])), function (props) {
|
|
12
12
|
return props.rootFont;
|
|
13
13
|
}, function (props) {
|
|
14
14
|
return props.textColor;
|
|
@@ -24,25 +24,23 @@ var TooltipLabel = _styledComponents.default.div(_templateObject3 || (_templateO
|
|
|
24
24
|
exports.TooltipLabel = TooltipLabel;
|
|
25
25
|
var TooltipTitle = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: Poppins;\n font-size: 14px;\n font-style: normal;\n font-weight: 600;\n line-height: normal;\n"])));
|
|
26
26
|
exports.TooltipTitle = TooltipTitle;
|
|
27
|
-
var Controls = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n background: #ffffff;\n justify-content: center;\n flex-direction: column;\n flex-basis: 100%;\n
|
|
27
|
+
var Controls = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n background: #ffffff;\n justify-content: center;\n flex-direction: column;\n flex-basis: 100%;\n padding: 0 16px;\n justify-content: space-between;\n width: 90%;\n /* min-height: 280px;\n min-width: 250px;\n max-height: 380px;\n max-width: 350px; */\n"])));
|
|
28
28
|
exports.Controls = Controls;
|
|
29
|
-
var TitleAndValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["
|
|
29
|
+
var TitleAndValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([""])));
|
|
30
30
|
exports.TitleAndValueContainer = TitleAndValueContainer;
|
|
31
|
-
var Title = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight:
|
|
31
|
+
var Title = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 1rem;\n margin-left: 0.5rem;\n /* margin-top: 1rem; */\n margin-bottom: 1rem;\n"])));
|
|
32
32
|
exports.Title = Title;
|
|
33
|
-
var ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: baseline;\n
|
|
33
|
+
var ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: baseline;\n margin-left: 0.5rem;\n"])));
|
|
34
34
|
exports.ValueAndBenchmarkContainer = ValueAndBenchmarkContainer;
|
|
35
35
|
var DetailsRowArrowContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 1.2rem;\n align-items: flex-end;\n"])));
|
|
36
36
|
exports.DetailsRowArrowContainer = DetailsRowArrowContainer;
|
|
37
|
-
var FormattedValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.
|
|
37
|
+
var FormattedValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.2rem;\n"])));
|
|
38
38
|
exports.FormattedValue = FormattedValue;
|
|
39
|
-
var
|
|
40
|
-
exports.FormattedValueNoDataMessage = FormattedValueNoDataMessage;
|
|
41
|
-
var BenchmarkContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
|
|
39
|
+
var BenchmarkContainer = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1rem;\n /* width: 5.35rem; */\n"])));
|
|
42
40
|
exports.BenchmarkContainer = BenchmarkContainer;
|
|
43
|
-
var AreaChartContainer = _styledComponents.default.div(
|
|
41
|
+
var AreaChartContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 51%;\n"])));
|
|
44
42
|
exports.AreaChartContainer = AreaChartContainer;
|
|
45
|
-
var BottomDetailsRowContainer = _styledComponents.default.div(
|
|
43
|
+
var BottomDetailsRowContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n text-align: center;\n"])));
|
|
46
44
|
exports.BottomDetailsRowContainer = BottomDetailsRowContainer;
|
|
47
|
-
var BottomDetailsRowTitle = _styledComponents.default.div(
|
|
45
|
+
var BottomDetailsRowTitle = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 0.7rem;\n"])));
|
|
48
46
|
exports.BottomDetailsRowTitle = BottomDetailsRowTitle;
|
|
@@ -104,12 +104,12 @@ var TotalBenchmarkArrows = function TotalBenchmarkArrows(_ref) {
|
|
|
104
104
|
id: "ValueAndBenchmarkContainer"
|
|
105
105
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.FormattedValue, {
|
|
106
106
|
id: "FormattedValue"
|
|
107
|
-
},
|
|
107
|
+
}, dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.BenchmarkContainer, {
|
|
108
108
|
id: "BenchmarkContainer"
|
|
109
109
|
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
110
110
|
totalValue: benchmarkTotalValue,
|
|
111
|
-
currentValue: value
|
|
112
|
-
benchmarkValue: benchmarkValue
|
|
111
|
+
currentValue: value,
|
|
112
|
+
benchmarkValue: benchmarkValue,
|
|
113
113
|
height: 12 * getSizeFactor(),
|
|
114
114
|
width: 85 * getSizeFactor(),
|
|
115
115
|
color: "#79DB95",
|
|
@@ -121,16 +121,14 @@ var TotalBenchmarkArrows = function TotalBenchmarkArrows(_ref) {
|
|
|
121
121
|
id: "DetailsContainer"
|
|
122
122
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsTitle, {
|
|
123
123
|
id: "DetailsTitle"
|
|
124
|
-
}, detailsTitle), detailsData.map(function (item) {
|
|
124
|
+
}, detailsTitle), detailsData.map(function (item, index) {
|
|
125
125
|
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsRowContainer, {
|
|
126
126
|
id: "DetailsRowContainer"
|
|
127
|
-
},
|
|
127
|
+
}, getArrowSign(item.value >= 0 ? "up" : "down"), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsRowFormattedValue, {
|
|
128
128
|
id: "DetailsRowFormattedValue"
|
|
129
|
-
}, item.value
|
|
129
|
+
}, item.value ? Math.abs(item.value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsRowPercentSign, {
|
|
130
130
|
id: "DetailsRowPercentSign"
|
|
131
|
-
},
|
|
132
|
-
id: "DetailsRowFormattedValueNoDataMessage"
|
|
133
|
-
}, item.value === undefined || item.value === null ? "No Data" : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsRowTitle, {
|
|
131
|
+
}, " ", "%", " "), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkArrowsStyle.DetailsRowTitle, {
|
|
134
132
|
id: "DetailsRowTitle"
|
|
135
133
|
}, item.title));
|
|
136
134
|
}))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
@@ -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.Title = exports.FormattedValue = exports.DetailsTitle = exports.DetailsRowTitle = exports.DetailsRowPercentSign = exports.
|
|
7
|
+
exports.ValueAndBenchmarkContainer = exports.Title = exports.FormattedValue = exports.DetailsTitle = exports.DetailsRowTitle = exports.DetailsRowPercentSign = exports.DetailsRowFormattedValue = exports.DetailsRowContainer = exports.DetailsRowArrowContainer = exports.DetailsContainer = exports.ControlsContainer = exports.Controls = exports.BenchmarkContainer = 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, _templateObject12, _templateObject13
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13;
|
|
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"])), function (props) {
|
|
12
12
|
return props.rootFont;
|
|
13
13
|
}, function (props) {
|
|
@@ -20,27 +20,25 @@ var ControlsContainer = _styledComponents.default.div(_templateObject || (_templ
|
|
|
20
20
|
exports.ControlsContainer = ControlsContainer;
|
|
21
21
|
var Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n width: 90%;\n height: 100%;\n background: #ffffff; \n flex-direction: column;\n flex-basis: 100%;\n //align-items: center;\n align-items: flex-start;\n justify-content: space-between;\n padding: 0px 0.8rem;\n \n"])));
|
|
22
22
|
exports.Controls = Controls;
|
|
23
|
-
var Title = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["
|
|
23
|
+
var Title = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n /* width: 14rem; */\n font-weight: 600;\n font-size: 1rem;\n margin-bottom: 1rem;\n"])));
|
|
24
24
|
exports.Title = Title;
|
|
25
|
-
var ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: baseline;\n height: 45%;\n"])));
|
|
25
|
+
var ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: baseline;\n /* width: 14rem; */\n height: 45%;\n"])));
|
|
26
26
|
exports.ValueAndBenchmarkContainer = ValueAndBenchmarkContainer;
|
|
27
|
-
var FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.
|
|
27
|
+
var FormattedValue = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.2rem;\n"])));
|
|
28
28
|
exports.FormattedValue = FormattedValue;
|
|
29
|
-
var BenchmarkContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.
|
|
29
|
+
var BenchmarkContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.7rem;\n width: 5.35rem;\n"])));
|
|
30
30
|
exports.BenchmarkContainer = BenchmarkContainer;
|
|
31
31
|
var DetailsContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n /* width: 14rem; */\n height: 50%;\n"])));
|
|
32
32
|
exports.DetailsContainer = DetailsContainer;
|
|
33
|
-
var DetailsTitle = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n height: 25%;\n font-weight:
|
|
33
|
+
var DetailsTitle = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n /* width: 14rem; */\n height: 25%;\n font-weight: 600;\n font-size: 1rem;\n"])));
|
|
34
34
|
exports.DetailsTitle = DetailsTitle;
|
|
35
35
|
var DetailsRowContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n text-align: center;\n align-items: baseline;\n height: 25%;\n"])));
|
|
36
36
|
exports.DetailsRowContainer = DetailsRowContainer;
|
|
37
37
|
var DetailsRowArrowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 0.8rem;\n align-items: flex-end;\n height: 25%;\n"])));
|
|
38
38
|
exports.DetailsRowArrowContainer = DetailsRowArrowContainer;
|
|
39
|
-
var DetailsRowFormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.3rem;\n font-weight:
|
|
39
|
+
var DetailsRowFormattedValue = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.3rem;\n font-weight: 600;\n font-size: 0.88rem;\n"])));
|
|
40
40
|
exports.DetailsRowFormattedValue = DetailsRowFormattedValue;
|
|
41
|
-
var
|
|
42
|
-
exports.DetailsRowFormattedValueNoDataMessage = DetailsRowFormattedValueNoDataMessage;
|
|
43
|
-
var DetailsRowPercentSign = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 12px;\n"])));
|
|
41
|
+
var DetailsRowPercentSign = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.3rem;\n font-weight: 400;\n font-size: 0.88rem;\n"])));
|
|
44
42
|
exports.DetailsRowPercentSign = DetailsRowPercentSign;
|
|
45
|
-
var DetailsRowTitle = _styledComponents.default.div(
|
|
43
|
+
var DetailsRowTitle = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 0.3rem;\n font-weight: 400;\n font-size: 0.88rem;\n"])));
|
|
46
44
|
exports.DetailsRowTitle = DetailsRowTitle;
|
|
@@ -17,7 +17,6 @@ var _TotalBenchmarkBarchartStyle = require("./TotalBenchmarkBarchart.style.js");
|
|
|
17
17
|
var _excluded = ["title", "value", "benchmarkTotalValue", "benchmarkValue", "currency", "currencyType", "barChartData", "dotCut", "width", "height", "textColor", "noDataText"];
|
|
18
18
|
/*TotalBenchmarkBarchart*/
|
|
19
19
|
var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
20
|
-
var _getFormattedBarChart, _getFormattedBarChart2;
|
|
21
20
|
var title = _ref.title,
|
|
22
21
|
value = _ref.value,
|
|
23
22
|
benchmarkTotalValue = _ref.benchmarkTotalValue,
|
|
@@ -113,15 +112,15 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
113
112
|
var getFormattedBarChartData = function getFormattedBarChartData() {
|
|
114
113
|
var tempFormattedBarChartData = [];
|
|
115
114
|
var currencySign = currency == true ? (0, _CommonFunctions.getCurrencySign)(currencyType).toString() : "";
|
|
116
|
-
if (barChartData &&
|
|
115
|
+
if (barChartData && barChartData.length === 2) {
|
|
117
116
|
tempFormattedBarChartData.push({
|
|
118
117
|
title1: barChartData[0].title,
|
|
119
118
|
value1: barChartData[0].value,
|
|
120
|
-
formattedValue1:
|
|
119
|
+
formattedValue1: currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[0].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[0].value)),
|
|
121
120
|
color1: barChartData[0].color ? barChartData[0].color : "#79DB95",
|
|
122
121
|
title2: barChartData[1].title,
|
|
123
122
|
value2: barChartData[1].value,
|
|
124
|
-
formattedValue2:
|
|
123
|
+
formattedValue2: currencySign.concat("", (0, _CommonFunctions.getFormattedValue)(barChartData[1].value), "", (0, _CommonFunctions.getFormattedUnits)(barChartData[1].value)),
|
|
125
124
|
color2: barChartData[1].color ? barChartData[1].color : "#D4C0FF"
|
|
126
125
|
});
|
|
127
126
|
|
|
@@ -138,7 +137,7 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
138
137
|
textColor: textColor,
|
|
139
138
|
ref: controlsContainerRef,
|
|
140
139
|
rootFont: rootFont
|
|
141
|
-
},
|
|
140
|
+
}, (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.Controls, {
|
|
142
141
|
id: "Controls"
|
|
143
142
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.TitleAndValueContainer, {
|
|
144
143
|
id: "TitleAndValueContainer"
|
|
@@ -148,14 +147,14 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
148
147
|
id: "ValueAndBenchmarkContainer"
|
|
149
148
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.CurrencySign, {
|
|
150
149
|
id: "CurrencySign"
|
|
151
|
-
},
|
|
150
|
+
}, currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ""), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.FormattedValue, {
|
|
152
151
|
id: "FormattedValue"
|
|
153
|
-
},
|
|
152
|
+
}, dotCut ? (0, _CommonFunctions.getFormattedValue)(value) : (0, _CommonFunctions.getNumberWithCommas)(value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(value) : ""), benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BenchmarkContainer, {
|
|
154
153
|
id: "BenchmarkContainer"
|
|
155
154
|
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
156
|
-
totalValue: benchmarkTotalValue
|
|
157
|
-
currentValue: value
|
|
158
|
-
benchmarkValue: benchmarkValue
|
|
155
|
+
totalValue: benchmarkTotalValue,
|
|
156
|
+
currentValue: value,
|
|
157
|
+
benchmarkValue: benchmarkValue,
|
|
159
158
|
height: 12 * getSizeFactor(),
|
|
160
159
|
width: 85 * getSizeFactor(),
|
|
161
160
|
color: "#79DB95",
|
|
@@ -165,7 +164,7 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
165
164
|
backgroundColor: "#F2F2F2"
|
|
166
165
|
})) : "")), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BarchartContainer, {
|
|
167
166
|
id: "BarchartContainer"
|
|
168
|
-
}, getFormattedBarChartData()
|
|
167
|
+
}, getFormattedBarChartData().length === 1 && /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
|
|
169
168
|
width: 224 * getSizeFactor(),
|
|
170
169
|
height: 150 * heightFactor,
|
|
171
170
|
data: getFormattedBarChartData(),
|
|
@@ -187,9 +186,7 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
187
186
|
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
188
187
|
dataKey: "formattedValue1",
|
|
189
188
|
position: "top",
|
|
190
|
-
fill: textColor
|
|
191
|
-
fontWeight: 400,
|
|
192
|
-
fontSize: "14px"
|
|
189
|
+
fill: textColor
|
|
193
190
|
})), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
194
191
|
dataKey: "value2",
|
|
195
192
|
fill: getFormattedBarChartData()[0].color2,
|
|
@@ -200,10 +197,8 @@ var TotalBenchmarkBarchart = function TotalBenchmarkBarchart(_ref) {
|
|
|
200
197
|
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
201
198
|
dataKey: "formattedValue2",
|
|
202
199
|
position: "top",
|
|
203
|
-
fill: textColor
|
|
204
|
-
|
|
205
|
-
fontSize: "14px"
|
|
206
|
-
}))), getFormattedBarChartData() && ((_getFormattedBarChart2 = getFormattedBarChartData()) === null || _getFormattedBarChart2 === void 0 ? void 0 : _getFormattedBarChart2.length) > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BottomDetailsRowContainer, {
|
|
200
|
+
fill: textColor
|
|
201
|
+
}))), getFormattedBarChartData().length > 0 ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BottomDetailsRowContainer, {
|
|
207
202
|
id: "BottomDetailsRowContainer"
|
|
208
203
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchartStyle.BottomDetailsRowTitle, {
|
|
209
204
|
id: "BottomDetailsRowTitle1"
|
|
@@ -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.
|
|
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;
|
|
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;
|
|
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) {
|
|
@@ -20,23 +20,21 @@ var ControlsContainer = _styledComponents.default.div(_templateObject || (_templ
|
|
|
20
20
|
exports.ControlsContainer = ControlsContainer;
|
|
21
21
|
var Controls = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n border-radius: 12px;\n background: #ffffff; \n justify-content: space-between;\n flex-direction: column;\n flex-basis: 100%;\n //padding: 16px ;\n"])));
|
|
22
22
|
exports.Controls = Controls;
|
|
23
|
-
var TitleAndValueContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
23
|
+
var TitleAndValueContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n \n"])));
|
|
24
24
|
exports.TitleAndValueContainer = TitleAndValueContainer;
|
|
25
|
-
var Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight:
|
|
25
|
+
var Title = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 600;\n font-size: 1rem; \n margin-bottom: 1rem;\n"])));
|
|
26
26
|
exports.Title = Title;
|
|
27
27
|
var ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: flex-start;\n align-items: baseline; \n\n"])));
|
|
28
28
|
exports.ValueAndBenchmarkContainer = ValueAndBenchmarkContainer;
|
|
29
29
|
var CurrencySign = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)([" \n font-weight: 500;\n font-size: 1rem;\n"])));
|
|
30
30
|
exports.CurrencySign = CurrencySign;
|
|
31
|
-
var FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.
|
|
31
|
+
var FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.2rem;\n"])));
|
|
32
32
|
exports.FormattedValue = FormattedValue;
|
|
33
|
-
var
|
|
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"])));
|
|
33
|
+
var BenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.7em;\n width: 5.35em;\n"])));
|
|
36
34
|
exports.BenchmarkContainer = BenchmarkContainer;
|
|
37
|
-
var BarchartContainer = _styledComponents.default.div(
|
|
35
|
+
var BarchartContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n width: 14em;\n"])));
|
|
38
36
|
exports.BarchartContainer = BarchartContainer;
|
|
39
|
-
var BottomDetailsRowContainer = _styledComponents.default.div(
|
|
37
|
+
var BottomDetailsRowContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n text-align: center; \n\n"])));
|
|
40
38
|
exports.BottomDetailsRowContainer = BottomDetailsRowContainer;
|
|
41
|
-
var BottomDetailsRowTitle = _styledComponents.default.div(
|
|
39
|
+
var BottomDetailsRowTitle = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center; \n margin-top: 0.2em;\n width: 14em;\n font-weight: 400;\n font-size: 0.7rem;\n"])));
|
|
42
40
|
exports.BottomDetailsRowTitle = BottomDetailsRowTitle;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _Modal = _interopRequireDefault(require("./Modal"));
|
|
12
|
+
var _CodeEditor = _interopRequireDefault(require("./CodeEditor"));
|
|
13
|
+
var _TextField = _interopRequireDefault(require("./TextField"));
|
|
14
|
+
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
15
|
+
var _reactHookForm = require("react-hook-form");
|
|
16
|
+
var _Modal2 = require("./Modal.style");
|
|
17
|
+
var TotalCostModal = function TotalCostModal(_ref) {
|
|
18
|
+
var title = _ref.title,
|
|
19
|
+
isModalOpen = _ref.isModalOpen,
|
|
20
|
+
setModalOpen = _ref.setModalOpen,
|
|
21
|
+
setResult = _ref.setResult;
|
|
22
|
+
var _useState = (0, _react.useState)([{
|
|
23
|
+
id: "title",
|
|
24
|
+
label: "Title",
|
|
25
|
+
type: "text"
|
|
26
|
+
}, {
|
|
27
|
+
id: "dotCut",
|
|
28
|
+
label: "Do Cut",
|
|
29
|
+
type: "select",
|
|
30
|
+
options: ["true", "false"]
|
|
31
|
+
}, {
|
|
32
|
+
id: "currency",
|
|
33
|
+
label: "Currency",
|
|
34
|
+
type: "select",
|
|
35
|
+
options: ["true", "false"]
|
|
36
|
+
}, {
|
|
37
|
+
id: "currencyType",
|
|
38
|
+
label: "Currency Type",
|
|
39
|
+
type: "select",
|
|
40
|
+
options: ["USD", "EUR", "ILS", "GBP", "JPY"]
|
|
41
|
+
}, {
|
|
42
|
+
id: "width",
|
|
43
|
+
label: "Width",
|
|
44
|
+
type: "text"
|
|
45
|
+
}, {
|
|
46
|
+
id: "height",
|
|
47
|
+
label: "Height",
|
|
48
|
+
type: "text"
|
|
49
|
+
}, {
|
|
50
|
+
id: "textColor",
|
|
51
|
+
label: "Text Color",
|
|
52
|
+
type: "text"
|
|
53
|
+
}, {
|
|
54
|
+
id: "noDataText",
|
|
55
|
+
label: "No Data Text",
|
|
56
|
+
type: "text"
|
|
57
|
+
}]),
|
|
58
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
59
|
+
params = _useState2[0],
|
|
60
|
+
setParams = _useState2[1];
|
|
61
|
+
var _useState3 = (0, _react.useState)("Select PACKAGE_COST,REDEMPTION_COST,(PACKAGE_COST+REDEMPTION_COST) AS TOTAL_COST,from FACT_EVENT_MEASURES A INNER JOIN DIM_EVENTS B ON A.EVENT_CODE = B.EVENT_CODE"),
|
|
62
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
63
|
+
code = _useState4[0],
|
|
64
|
+
setCode = _useState4[1];
|
|
65
|
+
var _useForm = (0, _reactHookForm.useForm)(),
|
|
66
|
+
register = _useForm.register,
|
|
67
|
+
handleSubmit = _useForm.handleSubmit,
|
|
68
|
+
watch = _useForm.watch,
|
|
69
|
+
control = _useForm.control,
|
|
70
|
+
errors = _useForm.formState.errors;
|
|
71
|
+
var onSubmit = function onSubmit(data) {
|
|
72
|
+
return setResult(data);
|
|
73
|
+
};
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement("form", {
|
|
75
|
+
onSubmit: handleSubmit(onSubmit)
|
|
76
|
+
}, /*#__PURE__*/_react.default.createElement(_Modal.default, {
|
|
77
|
+
isOpen: isModalOpen,
|
|
78
|
+
onClose: function onClose() {
|
|
79
|
+
return setModalOpen(false);
|
|
80
|
+
}
|
|
81
|
+
}, /*#__PURE__*/_react.default.createElement("h2", null, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
|
+
style: {
|
|
83
|
+
gap: "10px",
|
|
84
|
+
display: "grid"
|
|
85
|
+
}
|
|
86
|
+
}, /*#__PURE__*/_react.default.createElement(_CodeEditor.default, {
|
|
87
|
+
value: code,
|
|
88
|
+
onChange: setCode
|
|
89
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
+
style: {
|
|
91
|
+
gap: "10px",
|
|
92
|
+
display: "grid",
|
|
93
|
+
gridTemplateColumns: "auto auto auto"
|
|
94
|
+
}
|
|
95
|
+
}, params.map(function (item) {
|
|
96
|
+
if (item.type === "text") {
|
|
97
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
98
|
+
control: control,
|
|
99
|
+
name: item.id,
|
|
100
|
+
render: function render(_ref2) {
|
|
101
|
+
var field = _ref2.field;
|
|
102
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
103
|
+
allowedInput: "all",
|
|
104
|
+
height: "100%",
|
|
105
|
+
label: item.label,
|
|
106
|
+
multiline: true,
|
|
107
|
+
placeHolder: "Type...",
|
|
108
|
+
shape: "round",
|
|
109
|
+
size: "small",
|
|
110
|
+
width: "300px"
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
116
|
+
control: control,
|
|
117
|
+
name: item.id,
|
|
118
|
+
render: function render(_ref3) {
|
|
119
|
+
var field = _ref3.field;
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
121
|
+
allowedInput: "all",
|
|
122
|
+
labelColor: "#1B30AA",
|
|
123
|
+
limitTagsOnMultiSelect: 0,
|
|
124
|
+
onInputChange: function onInputChange(e) {
|
|
125
|
+
var _e$inputValue;
|
|
126
|
+
console.log("e", e);
|
|
127
|
+
field.onChange((_e$inputValue = e === null || e === void 0 ? void 0 : e.inputValue) !== null && _e$inputValue !== void 0 ? _e$inputValue : "");
|
|
128
|
+
},
|
|
129
|
+
options: item.options,
|
|
130
|
+
placeHolder: "Type...",
|
|
131
|
+
shape: "round",
|
|
132
|
+
size: "small",
|
|
133
|
+
text: item.label,
|
|
134
|
+
width: "300px"
|
|
135
|
+
}));
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}))), /*#__PURE__*/_react.default.createElement(_Modal2.SubmitButton, {
|
|
140
|
+
type: "submit"
|
|
141
|
+
})));
|
|
142
|
+
};
|
|
143
|
+
var _default = TotalCostModal;
|
|
144
|
+
exports.default = _default;
|
|
@@ -124,9 +124,9 @@ var TotalDoughnutChart = function TotalDoughnutChart(_ref) {
|
|
|
124
124
|
id: "LegendFormatedValueContainer"
|
|
125
125
|
}, /*#__PURE__*/_react.default.createElement(_TotalDoughnutChartStyle.LegendCurrencySign, {
|
|
126
126
|
id: "LegendCurrencySign"
|
|
127
|
-
},
|
|
127
|
+
}, currency ? (0, _CommonFunctions.getCurrencySign)(currencyType) : ""), /*#__PURE__*/_react.default.createElement(_TotalDoughnutChartStyle.LegendFormattedValue, {
|
|
128
128
|
id: "LegendFormattedValue"
|
|
129
|
-
},
|
|
129
|
+
}, dotCut ? (0, _CommonFunctions.getFormattedValue)(row.value) : (0, _CommonFunctions.getNumberWithCommas)(row.value), dotCut ? (0, _CommonFunctions.getFormattedUnits)(row.value) : ""))));
|
|
130
130
|
})))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
131
131
|
noDataText: noDataText
|
|
132
132
|
}));
|
|
@@ -26,33 +26,33 @@ var TooltipLabel = _styledComponents.default.p(_templateObject4 || (_templateObj
|
|
|
26
26
|
exports.TooltipLabel = TooltipLabel;
|
|
27
27
|
var TitleAndValueContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 90%;\n //margin-top: 6%;\n"])));
|
|
28
28
|
exports.TitleAndValueContainer = TitleAndValueContainer;
|
|
29
|
-
var Title = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n font-weight:
|
|
29
|
+
var Title = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n font-weight: 600;\n font-size: 1rem;\n margin-bottom: 1rem;\n"])));
|
|
30
30
|
exports.Title = Title;
|
|
31
31
|
var CurrencySignAndFormattedValueContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n align-items: baseline;\n"])));
|
|
32
32
|
exports.CurrencySignAndFormattedValueContainer = CurrencySignAndFormattedValueContainer;
|
|
33
33
|
var CurrencySign = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n"])));
|
|
34
34
|
exports.CurrencySign = CurrencySign;
|
|
35
|
-
var FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 2.
|
|
35
|
+
var FormattedValue = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 2.22rem;\n"])));
|
|
36
36
|
exports.FormattedValue = FormattedValue;
|
|
37
|
-
var DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n width: 95%;\n height: 37%;\n margin-top: 1em;
|
|
37
|
+
var DoughnutChartAndLegendContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n width: 95%;\n height: 37%;\n margin-top: 1em; // 35px;\n margin-bottom: 1em; // 35px;\n"])));
|
|
38
38
|
exports.DoughnutChartAndLegendContainer = DoughnutChartAndLegendContainer;
|
|
39
39
|
var DoughnutChart = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n width: 34%;\n height: 100%;\n min-width: 105px;\n min-height: 105px;\n"])));
|
|
40
40
|
exports.DoughnutChart = DoughnutChart;
|
|
41
41
|
var LegendContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 66%;\n padding-left: 10px;\n flex-direction: column;\n align-items: left;\n justify-content: space-between;\n"])));
|
|
42
42
|
exports.LegendContainer = LegendContainer;
|
|
43
|
-
var LegendControlsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n margin-bottom: 5px;\n"])));
|
|
43
|
+
var LegendControlsContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n /* flex-direction: row; */\n align-items: center;\n /* height: 50%;\n width: 100%; */\n margin-bottom: 5px;\n"])));
|
|
44
44
|
exports.LegendControlsContainer = LegendControlsContainer;
|
|
45
|
-
var LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n"])));
|
|
45
|
+
var LegendTitleAndFormatedValueContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n //display: flex;\n /* width: 100%;\n height: 100%; */\n margin-left: 0.1rem;\n //flex-direction: column;\n"])));
|
|
46
46
|
exports.LegendTitleAndFormatedValueContainer = LegendTitleAndFormatedValueContainer;
|
|
47
|
-
var LegendFormatedValueContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n font-weight:
|
|
47
|
+
var LegendFormatedValueContainer = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: row;\n /* width: 100%;\n height: 50%; */\n font-weight: 600;\n font-size: 13px;\n"])));
|
|
48
48
|
exports.LegendFormatedValueContainer = LegendFormatedValueContainer;
|
|
49
|
-
var LegendColorRectangle = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.8rem;\n height: 0.
|
|
49
|
+
var LegendColorRectangle = _styledComponents.default.div(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n width: 0.8rem;\n height: 0.7rem;\n margin-right: 0.3rem;\n background: ", ";\n"])), function (props) {
|
|
50
50
|
return props.color;
|
|
51
51
|
});
|
|
52
52
|
exports.LegendColorRectangle = LegendColorRectangle;
|
|
53
|
-
var LegendTitle = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size:
|
|
53
|
+
var LegendTitle = _styledComponents.default.div(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 13px;\n //width: 100%;\n //height: 50%;\n"])));
|
|
54
54
|
exports.LegendTitle = LegendTitle;
|
|
55
|
-
var LegendCurrencySign = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
55
|
+
var LegendCurrencySign = _styledComponents.default.div(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n /* font-weight: 600;\n font-size: 0.8rem; */\n"])));
|
|
56
56
|
exports.LegendCurrencySign = LegendCurrencySign;
|
|
57
|
-
var LegendFormattedValue = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
57
|
+
var LegendFormattedValue = _styledComponents.default.div(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n /* font-weight: 600;\n font-size: 0.8rem; */\n"])));
|
|
58
58
|
exports.LegendFormattedValue = LegendFormattedValue;
|
|
@@ -9,9 +9,9 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var InfoIcon = function InfoIcon(_ref) {
|
|
10
10
|
var clicked = _ref.clicked,
|
|
11
11
|
_ref$width = _ref.width,
|
|
12
|
-
width = _ref$width === void 0 ? "
|
|
12
|
+
width = _ref$width === void 0 ? "16" : _ref$width,
|
|
13
13
|
_ref$height = _ref.height,
|
|
14
|
-
height = _ref$height === void 0 ? "
|
|
14
|
+
height = _ref$height === void 0 ? "16" : _ref$height;
|
|
15
15
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
16
16
|
width: width,
|
|
17
17
|
height: height,
|
|
@@ -20,7 +20,7 @@ var InfoIcon = function InfoIcon(_ref) {
|
|
|
20
20
|
xmlns: "http://www.w3.org/2000/svg"
|
|
21
21
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
22
22
|
d: "M8 0C12.4062 0 16 3.59375 16 8C16 12.4375 12.4062 16 8 16C3.5625 16 0 12.4375 0 8C0 3.59375 3.5625 0 8 0ZM8 15C11.8438 15 15 11.875 15 8C15 4.15625 11.8438 1 8 1C4.125 1 1 4.15625 1 8C1 11.875 4.125 15 8 15ZM8 5.75C7.5625 5.75 7.25 5.4375 7.25 5C7.25 4.59375 7.5625 4.25 8 4.25C8.40625 4.25 8.75 4.59375 8.75 5C8.75 5.4375 8.40625 5.75 8 5.75ZM9.5 11C9.75 11 10 11.25 10 11.5C10 11.7812 9.75 12 9.5 12H6.5C6.21875 12 6 11.7812 6 11.5C6 11.25 6.21875 11 6.5 11H7.5V8H7C6.71875 8 6.5 7.78125 6.5 7.5C6.5 7.25 6.71875 7 7 7H8C8.25 7 8.5 7.25 8.5 7.5V11H9.5Z",
|
|
23
|
-
fill: "#
|
|
23
|
+
fill: "#1B30AA"
|
|
24
24
|
}));
|
|
25
25
|
};
|
|
26
26
|
exports.InfoIcon = InfoIcon;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sag_components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.250",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -50,11 +50,14 @@
|
|
|
50
50
|
"@mui/material": "^5.13.0",
|
|
51
51
|
"@mui/styled-engine-sc": "^5.12.0",
|
|
52
52
|
"@mui/x-date-pickers": "^6.11.1",
|
|
53
|
+
"ace-builds": "^1.27.0",
|
|
53
54
|
"babel-plugin-react-css-modules": "^5.2.6",
|
|
54
55
|
"classnames": "^2.3.2",
|
|
55
56
|
"dayjs": "^1.11.9",
|
|
56
57
|
"hoopy": "^0.1.4",
|
|
58
|
+
"react-ace": "^10.1.0",
|
|
57
59
|
"react-css-modules": "^4.7.11",
|
|
60
|
+
"react-hook-form": "^7.46.2",
|
|
58
61
|
"react-loading-skeleton": "^3.3.1",
|
|
59
62
|
"react-scripts": "5.0.1",
|
|
60
63
|
"recharts": "^2.6.2"
|