sag_components 1.0.359 → 1.0.360
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/Benchmark.js +7 -1
- package/dist/stories/components/CodeEditor.js +2 -1
- package/dist/stories/components/KpiFilter.js +44 -42
- package/dist/stories/components/Modal.style.js +1 -1
- package/dist/stories/components/ModalTotalBenchmark.js +45 -7
- package/dist/stories/components/Tooltip.style.js +1 -1
- package/dist/stories/components/TotalBenchmarkAreachart.style.js +4 -4
- package/dist/stories/components/TotalBenchmarkBarchart.js +40 -96
- package/dist/stories/components/TotalBenchmarkBarchart.style.js +3 -5
- package/dist/stories/utils/ComponentFactory.js +46 -17
- package/package.json +1 -1
|
@@ -39,6 +39,9 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
39
39
|
} else {
|
|
40
40
|
benchmarkCurrentValue = benchmarkValue / totalValue;
|
|
41
41
|
}
|
|
42
|
+
if (currentValue === benchmarkValue) {
|
|
43
|
+
return color;
|
|
44
|
+
}
|
|
42
45
|
if (currentValue / totalValue <= benchmarkCurrentValue) {
|
|
43
46
|
return underAvarageColor;
|
|
44
47
|
}
|
|
@@ -55,6 +58,9 @@ var Benchmark = exports.Benchmark = function Benchmark(props) {
|
|
|
55
58
|
} else {
|
|
56
59
|
benchmarkCurrentValue = benchmarkValue / totalValue;
|
|
57
60
|
}
|
|
61
|
+
if (currentValue === benchmarkValue) {
|
|
62
|
+
return linearGradientColor;
|
|
63
|
+
}
|
|
58
64
|
if (currentValue / totalValue <= benchmarkCurrentValue) {
|
|
59
65
|
return linearGradientUnderAvarageColor;
|
|
60
66
|
}
|
|
@@ -117,5 +123,5 @@ Benchmark.defaultProps = {
|
|
|
117
123
|
linearGradientUnderAvarageColor: '#FDB1B1',
|
|
118
124
|
backgroundColor: '#F2F2F2',
|
|
119
125
|
tooltipLabel: 'Benchmark',
|
|
120
|
-
tooltipDirection: '
|
|
126
|
+
tooltipDirection: 'bottom'
|
|
121
127
|
};
|
|
@@ -18,7 +18,8 @@ var CodeEditor = function CodeEditor(_ref) {
|
|
|
18
18
|
onChange = _ref.onChange;
|
|
19
19
|
return /*#__PURE__*/_react.default.createElement(_reactAce.default, {
|
|
20
20
|
style: {
|
|
21
|
-
height:
|
|
21
|
+
height: '300px',
|
|
22
|
+
width: '100%'
|
|
22
23
|
},
|
|
23
24
|
mode: "mysql",
|
|
24
25
|
theme: "monokai",
|
|
@@ -28,12 +28,12 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
28
28
|
onClick = props.onClick,
|
|
29
29
|
onClickIncludeBenchmark = props.onClickIncludeBenchmark,
|
|
30
30
|
onClickPeriod = props.onClickPeriod;
|
|
31
|
-
var DEFAULT_PERIOD =
|
|
31
|
+
var DEFAULT_PERIOD = '4 weeks';
|
|
32
32
|
var _useState = (0, _react.useState)(kpiData),
|
|
33
33
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
34
34
|
KpiDataState = _useState2[0],
|
|
35
35
|
setKpiDataState = _useState2[1];
|
|
36
|
-
var _useState3 = (0, _react.useState)(
|
|
36
|
+
var _useState3 = (0, _react.useState)('4 weeks'),
|
|
37
37
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
38
38
|
periodState = _useState4[0],
|
|
39
39
|
setPeriodSate = _useState4[1];
|
|
@@ -54,7 +54,7 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
54
54
|
kpiSelectedButtonsLabels.push(kpiSelectedData[i][j].label);
|
|
55
55
|
}
|
|
56
56
|
if (kpiSelectedData[i][j].secondButtonLabel && kpiSelectedData[i][j].secondButtonChecked === true) {
|
|
57
|
-
kpiSelectedButtonsLabels.push(
|
|
57
|
+
kpiSelectedButtonsLabels.push(''.concat('', kpiSelectedData[i][j].label, ':', kpiSelectedData[i][j].secondButtonLabel));
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -66,7 +66,7 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
66
66
|
// ------------------------- Buttons OnClick Handler - End ------------------
|
|
67
67
|
|
|
68
68
|
var dispalyColumnButtons = function dispalyColumnButtons(data, height) {
|
|
69
|
-
var paddingBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] :
|
|
69
|
+
var paddingBottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '5px';
|
|
70
70
|
if (data && data.length > 0) {
|
|
71
71
|
return /*#__PURE__*/_react.default.createElement(_KpiFilter.ButtonsContainer, {
|
|
72
72
|
id: "ButtonsContainer",
|
|
@@ -76,8 +76,8 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
76
76
|
var _item$marginBottom;
|
|
77
77
|
return /*#__PURE__*/_react.default.createElement(_KpiFilter.ButtonContainer, {
|
|
78
78
|
id: "ButtonContainer",
|
|
79
|
-
className: item.marginBottom ?
|
|
80
|
-
marginBottom: (_item$marginBottom = item.marginBottom) !== null && _item$marginBottom !== void 0 ? _item$marginBottom :
|
|
79
|
+
className: item.marginBottom ? 'marginBottom' : '',
|
|
80
|
+
marginBottom: (_item$marginBottom = item.marginBottom) !== null && _item$marginBottom !== void 0 ? _item$marginBottom : '0px'
|
|
81
81
|
}, /*#__PURE__*/_react.default.createElement(_CheckBoxButton.CheckBoxButton, {
|
|
82
82
|
backgroundColorChecked: buttonsBackgroundColorChecked,
|
|
83
83
|
backgroundColorUnchecked: buttonsBackgroundColorUnchecked,
|
|
@@ -101,7 +101,7 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
101
101
|
})
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
|
-
console.log(
|
|
104
|
+
console.log('newDataKpi', newDataKpi);
|
|
105
105
|
setKpiDataState(newDataKpi);
|
|
106
106
|
},
|
|
107
107
|
textColorChecked: buttonsTextColorChecked,
|
|
@@ -118,26 +118,26 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
118
118
|
height: "29px",
|
|
119
119
|
iconColor: buttonsIconColor,
|
|
120
120
|
iconSize: "12px",
|
|
121
|
-
label:
|
|
121
|
+
label: ''.concat('', item.label, ':', item.secondButtonLabel),
|
|
122
122
|
displayLabel: item.secondButtonLabel,
|
|
123
123
|
onClick: function onClick(props) {
|
|
124
124
|
var newDataKpi = KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.map(function (itemColumn) {
|
|
125
125
|
var _itemColumn$buttonsAr3;
|
|
126
126
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemColumn), {}, {
|
|
127
127
|
buttonsArray: (_itemColumn$buttonsAr3 = itemColumn.buttonsArray) === null || _itemColumn$buttonsAr3 === void 0 ? void 0 : _itemColumn$buttonsAr3.map(function (itemButton) {
|
|
128
|
-
return
|
|
128
|
+
return ''.concat('', itemButton.label, ':', itemButton.secondButtonLabel) === props.label ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, itemButton), {}, {
|
|
129
129
|
secondButtonChecked: props.checked
|
|
130
130
|
}) : (0, _objectSpread2.default)({}, itemButton);
|
|
131
131
|
})
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
setKpiDataState(newDataKpi);
|
|
135
|
-
console.log(
|
|
135
|
+
console.log('newDataKpi', newDataKpi, props);
|
|
136
136
|
},
|
|
137
137
|
textColorChecked: buttonsTextColorChecked,
|
|
138
138
|
textColorUnchecked: buttonsTextColorUnchecked,
|
|
139
139
|
width: "100%"
|
|
140
|
-
}) :
|
|
140
|
+
}) : '');
|
|
141
141
|
}));
|
|
142
142
|
}
|
|
143
143
|
};
|
|
@@ -199,7 +199,7 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
199
199
|
}, /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
200
200
|
id: "CheckBox",
|
|
201
201
|
label: "4 weeks",
|
|
202
|
-
checked: periodState ===
|
|
202
|
+
checked: periodState === '4 weeks',
|
|
203
203
|
colorChecked: buttonsIconColor,
|
|
204
204
|
colorUnchecked: buttonsIconColor,
|
|
205
205
|
colorDisabled: buttonsIconColor,
|
|
@@ -207,14 +207,14 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
207
207
|
height: "20px",
|
|
208
208
|
width: "100%",
|
|
209
209
|
iconSize: "14px",
|
|
210
|
-
disabled: periodState ===
|
|
210
|
+
disabled: periodState === '4 weeks',
|
|
211
211
|
onClick: function onClick(props) {
|
|
212
212
|
onClickPeriodHandler(props);
|
|
213
213
|
}
|
|
214
214
|
}), /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
215
215
|
id: "CheckBox",
|
|
216
216
|
label: "8 weeks",
|
|
217
|
-
checked: periodState ===
|
|
217
|
+
checked: periodState === '8 weeks',
|
|
218
218
|
colorChecked: buttonsIconColor,
|
|
219
219
|
colorUnchecked: buttonsIconColor,
|
|
220
220
|
colorDisabled: buttonsIconColor,
|
|
@@ -222,14 +222,14 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
222
222
|
height: "20px",
|
|
223
223
|
width: "100%",
|
|
224
224
|
iconSize: "14px",
|
|
225
|
-
disabled: periodState ===
|
|
225
|
+
disabled: periodState === '8 weeks',
|
|
226
226
|
onClick: function onClick(props) {
|
|
227
227
|
onClickPeriodHandler(props);
|
|
228
228
|
}
|
|
229
229
|
}), /*#__PURE__*/_react.default.createElement(_CheckBox.CheckBox, {
|
|
230
230
|
id: "CheckBox",
|
|
231
231
|
label: "13 weeks",
|
|
232
|
-
checked: periodState ===
|
|
232
|
+
checked: periodState === '13 weeks',
|
|
233
233
|
colorChecked: buttonsIconColor,
|
|
234
234
|
colorUnchecked: buttonsIconColor,
|
|
235
235
|
colorDisabled: buttonsIconColor,
|
|
@@ -237,29 +237,31 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
237
237
|
height: "20px",
|
|
238
238
|
width: "100%",
|
|
239
239
|
iconSize: "14px",
|
|
240
|
-
disabled: periodState ===
|
|
240
|
+
disabled: periodState === '13 weeks',
|
|
241
241
|
onClick: function onClick(props) {
|
|
242
242
|
onClickPeriodHandler(props);
|
|
243
243
|
}
|
|
244
244
|
}));
|
|
245
245
|
};
|
|
246
246
|
var displayColumns = function displayColumns() {
|
|
247
|
-
if (KpiDataState && (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) > 0)
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
247
|
+
if (KpiDataState && (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) > 0) {
|
|
248
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.AllColumnsContainer, {
|
|
249
|
+
id: "AllColumnsContainer"
|
|
250
|
+
}, KpiDataState.map(function (item, i) {
|
|
251
|
+
return /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnAndLineContainer, {
|
|
252
|
+
id: "ColumnAndLineContainer"
|
|
253
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnContainer, {
|
|
254
|
+
id: "ColumnContainer"
|
|
255
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnTitleContainer, {
|
|
256
|
+
id: "ColumnTitleContainer"
|
|
257
|
+
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnTitle, {
|
|
258
|
+
id: "ColumnTitle"
|
|
259
|
+
}, item.columnTitle)), dispalyColumnButtons(item.buttonsArray, height = '160px', '0px'), i === (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) - 1 ? /*#__PURE__*/_react.default.createElement(_KpiFilter.PeriodColumnTitle, null, periodTitle) : '', i === (KpiDataState === null || KpiDataState === void 0 ? void 0 : KpiDataState.length) - 1 ? displayPeriod() : ''), item.rightBorder ? /*#__PURE__*/_react.default.createElement(_KpiFilter.ColumnRightLineSeporator, null) : '');
|
|
260
|
+
}));
|
|
261
|
+
}
|
|
260
262
|
};
|
|
261
263
|
|
|
262
|
-
|
|
264
|
+
//= ======================================== MAIN RETURN ====================================
|
|
263
265
|
return /*#__PURE__*/_react.default.createElement(_KpiFilter.MainContainer, {
|
|
264
266
|
id: "MainContainer",
|
|
265
267
|
height: height,
|
|
@@ -267,21 +269,21 @@ var KpiFilter = exports.KpiFilter = function KpiFilter(props) {
|
|
|
267
269
|
}, /*#__PURE__*/_react.default.createElement(_KpiFilter.PanelContainer, {
|
|
268
270
|
id: "PanelContainer"
|
|
269
271
|
}, displayMainTitle(), displayColumns()));
|
|
270
|
-
|
|
272
|
+
//= ======================================== MAIN RETURN END====================================
|
|
271
273
|
};
|
|
272
274
|
var _default = exports.default = KpiFilter;
|
|
273
275
|
KpiFilter.defaultProps = {
|
|
274
|
-
mainTitle:
|
|
275
|
-
periodTitle:
|
|
276
|
+
mainTitle: 'Select Table Columns',
|
|
277
|
+
periodTitle: 'Pre and Post Event Period',
|
|
276
278
|
kpiData: [],
|
|
277
|
-
width:
|
|
278
|
-
height:
|
|
279
|
-
buttonsIconColor:
|
|
280
|
-
buttonsBorderColor:
|
|
281
|
-
buttonsTextColorChecked:
|
|
282
|
-
buttonsTextColorUnchecked:
|
|
283
|
-
buttonsBackgroundColorChecked:
|
|
284
|
-
buttonsBackgroundColorUnchecked:
|
|
279
|
+
width: '100%',
|
|
280
|
+
height: '100%',
|
|
281
|
+
buttonsIconColor: '#1B30AA',
|
|
282
|
+
buttonsBorderColor: '#1B30AA',
|
|
283
|
+
buttonsTextColorChecked: '#212121',
|
|
284
|
+
buttonsTextColorUnchecked: '#212121',
|
|
285
|
+
buttonsBackgroundColorChecked: '#E9F1FF',
|
|
286
|
+
buttonsBackgroundColorUnchecked: '#F2F2F2',
|
|
285
287
|
onClick: function onClick() {},
|
|
286
288
|
onClickIncludeBenchmark: function onClickIncludeBenchmark() {},
|
|
287
289
|
onClickPeriod: function onClickPeriod() {}
|
|
@@ -12,6 +12,6 @@ var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
|
12
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
13
13
|
var fadeIn = (0, _styledComponents.keyframes)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n"])));
|
|
14
14
|
var ModalOverlay = exports.ModalOverlay = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index:999999;\n background-color: rgba(0, 0, 0, 0.7);\n display: flex;\n justify-content: center;\n align-items: center;\n animation: ", " 0.3s ease-in-out;\n"])), fadeIn);
|
|
15
|
-
var ModalContent = exports.ModalContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #fff;\n overflow: scroll;\n padding: 20px;\n border-radius: 8px;\n width:
|
|
15
|
+
var ModalContent = exports.ModalContent = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n background-color: #fff;\n overflow: scroll;\n padding: 20px;\n border-radius: 8px;\n width: 80%;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n animation: ", " 0.5s ease-in-out;\n"])), fadeIn);
|
|
16
16
|
var CloseButton = exports.CloseButton = _styledComponents.default.button(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 10px;\n padding: 5px 15px;\n border: none;\n background-color: #333;\n color: #fff;\n cursor: pointer;\n border-radius: 4px;\n &:hover {\n background-color: #555;\n }\n"])));
|
|
17
17
|
var SubmitButton = exports.SubmitButton = _styledComponents.default.input(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 10px;\n margin-right: 10px;\n padding: 5px 15px;\n border: none;\n background-color: #333;\n color: #fff;\n cursor: pointer;\n border-radius: 4px;\n &:hover {\n background-color: #555;\n }\n"])));
|
|
@@ -32,6 +32,7 @@ var ModalTotalBenchmark = function ModalTotalBenchmark(_ref) {
|
|
|
32
32
|
code = _useState4[0],
|
|
33
33
|
setCode = _useState4[1];
|
|
34
34
|
function getTypeName(type) {
|
|
35
|
+
console.log('types', typeof type, typeof _propTypes.default.string);
|
|
35
36
|
if (type === _propTypes.default.string) {
|
|
36
37
|
return 'string';
|
|
37
38
|
}
|
|
@@ -44,7 +45,7 @@ var ModalTotalBenchmark = function ModalTotalBenchmark(_ref) {
|
|
|
44
45
|
if (type === _propTypes.default.array) {
|
|
45
46
|
return 'array';
|
|
46
47
|
}
|
|
47
|
-
if (type === _propTypes.default.object) {
|
|
48
|
+
if (type === _propTypes.default.object || type === _propTypes.default.arrayOf) {
|
|
48
49
|
return 'object';
|
|
49
50
|
}
|
|
50
51
|
if (type === _propTypes.default.func) {
|
|
@@ -77,12 +78,10 @@ var ModalTotalBenchmark = function ModalTotalBenchmark(_ref) {
|
|
|
77
78
|
(0, _react.useEffect)(function () {
|
|
78
79
|
var newParams = withPropTypeChecks((0, _ComponentFactory.default)(componentName));
|
|
79
80
|
setParams(newParams);
|
|
80
|
-
console.log('newParams', newParams);
|
|
81
|
+
console.log('newParams', newParams, componentName);
|
|
81
82
|
}, []);
|
|
82
83
|
var _useForm = (0, _reactHookForm.useForm)(),
|
|
83
|
-
register = _useForm.register,
|
|
84
84
|
handleSubmit = _useForm.handleSubmit,
|
|
85
|
-
watch = _useForm.watch,
|
|
86
85
|
control = _useForm.control,
|
|
87
86
|
errors = _useForm.formState.errors;
|
|
88
87
|
var onSubmit = function onSubmit(data) {
|
|
@@ -157,14 +156,53 @@ var ModalTotalBenchmark = function ModalTotalBenchmark(_ref) {
|
|
|
157
156
|
});
|
|
158
157
|
}
|
|
159
158
|
if (item.type === 'other') {
|
|
160
|
-
|
|
159
|
+
console.log('item', item);
|
|
160
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
161
|
+
key: item.id,
|
|
162
|
+
control: control,
|
|
163
|
+
name: "".concat(item.id, "Key"),
|
|
164
|
+
render: function render(_ref4) {
|
|
165
|
+
var field = _ref4.field;
|
|
166
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
167
|
+
label: "".concat(item.label, "Key"),
|
|
168
|
+
text: "".concat(item.label, "Key"),
|
|
169
|
+
allowedInput: "all",
|
|
170
|
+
labelColor: "#1B30AA",
|
|
171
|
+
width: "300px",
|
|
172
|
+
height: "100%",
|
|
173
|
+
multiline: true,
|
|
174
|
+
placeHolder: "The Key",
|
|
175
|
+
shape: "round",
|
|
176
|
+
size: "small"
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
}), /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
180
|
+
key: item.id,
|
|
181
|
+
control: control,
|
|
182
|
+
name: "".concat(item.id, "Args"),
|
|
183
|
+
render: function render(_ref5) {
|
|
184
|
+
var field = _ref5.field;
|
|
185
|
+
return /*#__PURE__*/_react.default.createElement(_TextField.default, Object.assign({}, field, {
|
|
186
|
+
label: "".concat(item.label, "Args"),
|
|
187
|
+
text: "".concat(item.label, "Args"),
|
|
188
|
+
allowedInput: "all",
|
|
189
|
+
labelColor: "#1B30AA",
|
|
190
|
+
width: "300px",
|
|
191
|
+
height: "100%",
|
|
192
|
+
multiline: true,
|
|
193
|
+
placeHolder: "The args",
|
|
194
|
+
shape: "round",
|
|
195
|
+
size: "small"
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
}));
|
|
161
199
|
}
|
|
162
200
|
return /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
163
201
|
key: item.id,
|
|
164
202
|
control: control,
|
|
165
203
|
name: item.id,
|
|
166
|
-
render: function render(
|
|
167
|
-
var field =
|
|
204
|
+
render: function render(_ref6) {
|
|
205
|
+
var field = _ref6.field;
|
|
168
206
|
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, Object.assign({}, field, {
|
|
169
207
|
allowedInput: "all",
|
|
170
208
|
labelColor: "#1B30AA",
|
|
@@ -15,4 +15,4 @@ var TooltipContainer = exports.TooltipContainer = _styledComponents.default.div(
|
|
|
15
15
|
var TooltipWrapper = exports.TooltipWrapper = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-block;\n position: relative;\n"])));
|
|
16
16
|
|
|
17
17
|
/* Absolute positioning */
|
|
18
|
-
var TooltipTip = exports.TooltipTip = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n position: absolute;\n border-radius: 4px;\n left: 50%;\n transform: translateX(-50%);\n padding:
|
|
18
|
+
var TooltipTip = exports.TooltipTip = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);\n position: absolute;\n border-radius: 4px;\n left: 50%;\n transform: translateX(-50%);\n padding: 4px 6px;\n color: var(--tooltip-text-color);\n background: var(--tooltip-background-color);\n font-size: 12px;\n font-family: sans-serif;\n line-height: 1;\n z-index: 100;\n white-space: nowrap;\n \n /* CSS border triangles */\n &.controls::before {\n content: \" \";\n left: 50%;\n border: solid transparent;\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n border-width: var(--tooltip-arrow-size);\n margin-left: calc(var(--tooltip-arrow-size) * -1);\n }\n\n /* Absolute positioning */\n &.controls.top {\n top: calc(var(--tooltip-margin) * -1);\n }\n\n /* CSS border triangles */\n &.controls.top::before {\n top: 100%;\n border-top-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.right {\n left: calc(70% + var(--tooltip-margin));\n top: 50%;\n transform: translateX(0) translateY(-50%);\n }\n\n /* CSS border triangles */\n &.controls.right::before {\n left: calc(var(--tooltip-arrow-size) * -1);\n top: 50%;\n transform: translateX(0) translateY(-50%);\n border-right-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.bottom {\n bottom: calc(var(--tooltip-margin) * -1);\n }\n /* CSS border triangles */\n &.controls.bottom::before {\n bottom: 100%;\n border-bottom-color: var(--tooltip-background-color);\n }\n\n /* Absolute positioning */\n &.controls.left {\n left: auto;\n right: calc(70% + var(--tooltip-margin));\n top: 50%;\n transform: translateX(0) translateY(-50%);\n }\n /* CSS border triangles */\n &.controls.left::before {\n left: auto;\n right: calc(var(--tooltip-arrow-size) * -2);\n top: 50%;\n transform: translateX(0) translateY(-50%);\n border-left-color: var(--tooltip-background-color);\n }\n"])));
|
|
@@ -18,14 +18,14 @@ var ControlsContainer = exports.ControlsContainer = _styledComponents.default.di
|
|
|
18
18
|
var TooltipDiv = exports.TooltipDiv = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: 5px;\n background: #fff;\n font-family: \"Poppins\", sans-serif;\n border-radius: 5px;\n padding: 8px 12px;\n display: grid;\n"])));
|
|
19
19
|
var TooltipLabel = exports.TooltipLabel = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n color: #212121;\n font-family: \"Poppins\", sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: normal;\n width: fit-content;\n"])));
|
|
20
20
|
var TooltipTitle = exports.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"])));
|
|
21
|
-
var Controls = exports.Controls = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
21
|
+
var Controls = exports.Controls = _styledComponents.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background: #ffffff;\n border-radius: 12px;\n"])));
|
|
22
22
|
var TitleAndValueContainer = exports.TitleAndValueContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 1rem;\n"])));
|
|
23
|
-
var Title = exports.Title = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n
|
|
24
|
-
var ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: baseline;\n
|
|
23
|
+
var Title = exports.Title = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 500;\n font-size: 1rem;\n"])));
|
|
24
|
+
var ValueAndBenchmarkContainer = exports.ValueAndBenchmarkContainer = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n align-items: baseline;\n"])));
|
|
25
25
|
var DetailsRowArrowContainer = exports.DetailsRowArrowContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: 1.2rem;\n align-items: flex-end;\n"])));
|
|
26
26
|
var FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.22222rem;\n"])));
|
|
27
27
|
var FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0; \n"])));
|
|
28
28
|
var BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n margin-left: 1.5rem;\n"])));
|
|
29
|
-
var AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
29
|
+
var AreaChartContainer = exports.AreaChartContainer = _styledComponents.default.div(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n /* height: 50%; */\n"])));
|
|
30
30
|
var BottomDetailsRowContainer = exports.BottomDetailsRowContainer = _styledComponents.default.div(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-start;\n justify-content: center;\n text-align: center;\n"])));
|
|
31
31
|
var BottomDetailsRowTitle = exports.BottomDetailsRowTitle = _styledComponents.default.div(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n font-weight: 400;\n font-size: 0.77778rem;\n"])));
|
|
@@ -15,7 +15,6 @@ var _Benchmark = require("./Benchmark");
|
|
|
15
15
|
var _TotalBenchmarkBarchart = require("./TotalBenchmarkBarchart.style");
|
|
16
16
|
/* TotalBenchmarkBarchart */
|
|
17
17
|
var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenchmarkBarchart(props) {
|
|
18
|
-
var _getFormattedBarChart, _getFormattedBarChart2;
|
|
19
18
|
var title = props.title,
|
|
20
19
|
value = props.value,
|
|
21
20
|
addingBenchmark = props.addingBenchmark,
|
|
@@ -41,50 +40,7 @@ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenc
|
|
|
41
40
|
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
42
41
|
heightFactor = _useState4[0],
|
|
43
42
|
setHeightFactor = _useState4[1];
|
|
44
|
-
|
|
45
|
-
// const [formattedBarChartData, setFormattedBarChartData] = useState([]);
|
|
46
|
-
|
|
47
43
|
var controlsContainerRef = (0, _react.useRef)();
|
|
48
|
-
|
|
49
|
-
// useEffect(() => {
|
|
50
|
-
// let tempFormattedBarChartData = [];
|
|
51
|
-
|
|
52
|
-
// const currencySign =
|
|
53
|
-
// currency == true ? getCurrencySign(currencyType).toString() : "";
|
|
54
|
-
|
|
55
|
-
// if (barChartData && barChartData.length === 2) {
|
|
56
|
-
// tempFormattedBarChartData.push({
|
|
57
|
-
// title1: barChartData[0].title,
|
|
58
|
-
// value1: barChartData[0].value,
|
|
59
|
-
// formattedValue1: currencySign.concat(
|
|
60
|
-
// "",
|
|
61
|
-
// getFormattedValue(barChartData[0].value),
|
|
62
|
-
// "",
|
|
63
|
-
// getFormattedUnits(barChartData[0].value)
|
|
64
|
-
// ),
|
|
65
|
-
|
|
66
|
-
// color1: barChartData[0].color ? barChartData[0].color : "#79DB95",
|
|
67
|
-
|
|
68
|
-
// title2: barChartData[1].title,
|
|
69
|
-
// value2: barChartData[1].value,
|
|
70
|
-
// formattedValue2: currencySign.concat(
|
|
71
|
-
// "",
|
|
72
|
-
// getFormattedValue(barChartData[1].value),
|
|
73
|
-
// "",
|
|
74
|
-
// getFormattedUnits(barChartData[1].value)
|
|
75
|
-
// ),
|
|
76
|
-
// color2: barChartData[1].color ? barChartData[1].color : "#D4C0FF",
|
|
77
|
-
// });
|
|
78
|
-
|
|
79
|
-
// console.log("barChartData changed", barChartData);
|
|
80
|
-
// setFormattedBarChartData(tempFormattedBarChartData);
|
|
81
|
-
// console.log(
|
|
82
|
-
// "tempFormattedBarChartData changed",
|
|
83
|
-
// tempFormattedBarChartData
|
|
84
|
-
// );
|
|
85
|
-
// }
|
|
86
|
-
// }, [barChartData, currency, currencyType]);
|
|
87
|
-
|
|
88
44
|
(0, _react.useEffect)(function () {
|
|
89
45
|
var offsetWidth = controlsContainerRef.current.offsetWidth;
|
|
90
46
|
setRootFont(getRootFont(offsetWidth));
|
|
@@ -103,21 +59,21 @@ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenc
|
|
|
103
59
|
return rootFont.toString().replace('px', '') / DEFAULT_ROOT_FONT;
|
|
104
60
|
};
|
|
105
61
|
var getFormattedBarChartData = function getFormattedBarChartData() {
|
|
106
|
-
var
|
|
107
|
-
var currencySign = currency
|
|
62
|
+
var formattedBarChartData = [];
|
|
63
|
+
var currencySign = currency === true ? (0, _CommonFunctions.getCurrencySign)(currencyType).toString() : '';
|
|
108
64
|
if (barChartData && (barChartData === null || barChartData === void 0 ? void 0 : barChartData.length) === 2) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
65
|
+
barChartData.forEach(function (data, i) {
|
|
66
|
+
var formattedData = {
|
|
67
|
+
id: i,
|
|
68
|
+
title: data.title,
|
|
69
|
+
value: data.value,
|
|
70
|
+
formattedValue: data.value !== undefined && data.value != null ? currencySign.concat('', (0, _CommonFunctions.getFormattedValue)(data.value), '', (0, _CommonFunctions.getFormattedUnits)(data.value)) : 'No Data',
|
|
71
|
+
color: data.color
|
|
72
|
+
};
|
|
73
|
+
formattedBarChartData.push(formattedData);
|
|
118
74
|
});
|
|
119
|
-
return tempFormattedBarChartData;
|
|
120
75
|
}
|
|
76
|
+
return formattedBarChartData;
|
|
121
77
|
};
|
|
122
78
|
return /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.ControlsContainer, {
|
|
123
79
|
id: "ControlsContainer",
|
|
@@ -135,9 +91,9 @@ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenc
|
|
|
135
91
|
id: "ValueAndBenchmarkContainer"
|
|
136
92
|
}, /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.CurrencySign, {
|
|
137
93
|
id: "CurrencySign"
|
|
138
|
-
}, value
|
|
94
|
+
}, value !== undefined && value !== null && currency ? (0, _CommonFunctions.getCurrencySign)(currencyType, value) : ''), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.FormattedValue, {
|
|
139
95
|
id: "FormattedValue"
|
|
140
|
-
}, value
|
|
96
|
+
}, 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(_TotalBenchmarkBarchart.FormattedValueNoDataMessage, null, value === undefined || value === null ? 'No Data' : ''), addingBenchmark && benchmarkTotalValue ? /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BenchmarkContainer, {
|
|
141
97
|
id: "BenchmarkContainer"
|
|
142
98
|
}, /*#__PURE__*/_react.default.createElement(_Benchmark.Benchmark, {
|
|
143
99
|
totalValue: benchmarkTotalValue !== null && benchmarkTotalValue !== void 0 ? benchmarkTotalValue : 0,
|
|
@@ -152,51 +108,39 @@ var TotalBenchmarkBarchart = exports.TotalBenchmarkBarchart = function TotalBenc
|
|
|
152
108
|
backgroundColor: "#F2F2F2"
|
|
153
109
|
})) : '')), /*#__PURE__*/_react.default.createElement(_TotalBenchmarkBarchart.BarchartContainer, {
|
|
154
110
|
id: "BarchartContainer"
|
|
155
|
-
},
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement(_recharts.BarChart, {
|
|
156
112
|
width: 224 * getSizeFactor(),
|
|
157
113
|
height: 150 * heightFactor,
|
|
158
114
|
data: getFormattedBarChartData(),
|
|
159
115
|
margin: {
|
|
160
116
|
top: 40 * heightFactor,
|
|
161
|
-
|
|
162
|
-
bottom: 0,
|
|
163
|
-
left: -25 * getSizeFactor()
|
|
117
|
+
bottom: 0
|
|
164
118
|
}
|
|
165
119
|
}, /*#__PURE__*/_react.default.createElement(_recharts.CartesianGrid, {
|
|
166
120
|
strokeDasharray: "3 3",
|
|
167
121
|
vertical: false
|
|
168
122
|
}), /*#__PURE__*/_react.default.createElement(_recharts.Bar, {
|
|
169
|
-
dataKey: "
|
|
170
|
-
|
|
171
|
-
name: "Actual",
|
|
172
|
-
maxBarSize: 60 * getSizeFactor(),
|
|
123
|
+
dataKey: "value",
|
|
124
|
+
name: "title",
|
|
173
125
|
radius: [5, 5, 0, 0]
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
dataKey: "value2",
|
|
182
|
-
fill: getFormattedBarChartData()[0].color2,
|
|
183
|
-
name: "Base Line",
|
|
184
|
-
maxBarSize: 60 * getSizeFactor(),
|
|
185
|
-
radius: [5, 5, 0, 0],
|
|
186
|
-
label: "aaa"
|
|
187
|
-
}, /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
188
|
-
dataKey: "formattedValue2",
|
|
126
|
+
}, getFormattedBarChartData().map(function (entry) {
|
|
127
|
+
return /*#__PURE__*/_react.default.createElement(_recharts.Cell, {
|
|
128
|
+
key: entry.id,
|
|
129
|
+
fill: entry.color
|
|
130
|
+
});
|
|
131
|
+
}), /*#__PURE__*/_react.default.createElement(_recharts.LabelList, {
|
|
132
|
+
dataKey: "formattedValue",
|
|
189
133
|
position: "top",
|
|
190
|
-
fill:
|
|
134
|
+
fill: "#212121",
|
|
191
135
|
fontWeight: 400,
|
|
192
136
|
fontSize: "14px"
|
|
193
|
-
}))
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
137
|
+
})), /*#__PURE__*/_react.default.createElement(_recharts.XAxis, {
|
|
138
|
+
dataKey: "title",
|
|
139
|
+
tick: {
|
|
140
|
+
fontSize: 14
|
|
141
|
+
},
|
|
142
|
+
tickLine: false
|
|
143
|
+
})))) : /*#__PURE__*/_react.default.createElement(_NoDataFoundMessage.NoDataFoundMessage, {
|
|
200
144
|
noDataText: noDataText
|
|
201
145
|
}));
|
|
202
146
|
};
|
|
@@ -204,19 +148,19 @@ var _default = exports.default = TotalBenchmarkBarchart;
|
|
|
204
148
|
TotalBenchmarkBarchart.defaultProps = {
|
|
205
149
|
title: 'Title',
|
|
206
150
|
value: 100,
|
|
207
|
-
addingBenchmark:
|
|
151
|
+
addingBenchmark: true,
|
|
208
152
|
benchmarkTotalValue: 300,
|
|
209
153
|
benchmarkValue: 400,
|
|
210
154
|
currency: true,
|
|
211
155
|
currencyType: 'USD',
|
|
212
156
|
barChartData: [{
|
|
213
|
-
title: '
|
|
214
|
-
value:
|
|
215
|
-
color: '#
|
|
157
|
+
title: 'Actual',
|
|
158
|
+
value: 175100,
|
|
159
|
+
color: '#066768'
|
|
216
160
|
}, {
|
|
217
|
-
title: '
|
|
218
|
-
value:
|
|
219
|
-
color: '#
|
|
161
|
+
title: 'Base Line',
|
|
162
|
+
value: 100000,
|
|
163
|
+
color: '#90CE9C'
|
|
220
164
|
}],
|
|
221
165
|
dotCut: true,
|
|
222
166
|
width: '250px',
|
|
@@ -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.FormattedValueNoDataMessage = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = exports.
|
|
7
|
+
exports.ValueAndBenchmarkContainer = exports.TitleAndValueContainer = exports.Title = exports.FormattedValueNoDataMessage = exports.FormattedValue = exports.CurrencySign = exports.ControlsContainer = exports.Controls = 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
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
11
11
|
var ControlsContainer = exports.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 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.textColor;
|
|
13
13
|
}, function (props) {
|
|
@@ -23,6 +23,4 @@ var CurrencySign = exports.CurrencySign = _styledComponents.default.div(_templat
|
|
|
23
23
|
var FormattedValue = exports.FormattedValue = _styledComponents.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.1rem;\n font-weight: 500;\n font-size: 2.22222rem;\n"])));
|
|
24
24
|
var FormattedValueNoDataMessage = exports.FormattedValueNoDataMessage = _styledComponents.default.div(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.3rem;\n font-weight: 700;\n font-size: 16px;\n margin: 0; \n"])));
|
|
25
25
|
var BenchmarkContainer = exports.BenchmarkContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n margin-left: 0.7em;\n width: 5.35em;\n"])));
|
|
26
|
-
var BarchartContainer = exports.BarchartContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n
|
|
27
|
-
var BottomDetailsRowContainer = exports.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"])));
|
|
28
|
-
var BottomDetailsRowTitle = exports.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"])));
|
|
26
|
+
var BarchartContainer = exports.BarchartContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n"])));
|
|
@@ -5,30 +5,59 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _Benchmark = _interopRequireDefault(require("../components/Benchmark"));
|
|
9
|
+
var _Button = _interopRequireDefault(require("../components/Button"));
|
|
10
|
+
var _CollapseData = _interopRequireDefault(require("../components/CollapseData"));
|
|
11
|
+
var _KpiFilter = _interopRequireDefault(require("../components/KpiFilter"));
|
|
12
|
+
var _TitleDescription = _interopRequireDefault(require("../components/TitleDescription"));
|
|
13
|
+
var _TotalBenchmark = _interopRequireDefault(require("../components/TotalBenchmark"));
|
|
8
14
|
var _TotalDoughnutChart = _interopRequireDefault(require("../components/TotalDoughnutChart"));
|
|
15
|
+
var _TotalBenchmarkArrows = _interopRequireDefault(require("../components/TotalBenchmarkArrows"));
|
|
16
|
+
var _TotalBenchmarkBarchart = _interopRequireDefault(require("../components/TotalBenchmarkBarchart"));
|
|
17
|
+
var _TotalBenchmarkAreachart = _interopRequireDefault(require("../components/TotalBenchmarkAreachart"));
|
|
18
|
+
var _PerformanceAnalyticsTotals = _interopRequireDefault(require("../components/PerformanceAnalyticsTotals"));
|
|
19
|
+
var _PerformanceAnalyticsOneColumn = _interopRequireDefault(require("../components/PerformanceAnalyticsOneColumn"));
|
|
20
|
+
var _PerformanceAnalyticsLegend = _interopRequireDefault(require("../components/PerformanceAnalyticsLegend"));
|
|
21
|
+
var _PerformanceAnalytics = _interopRequireDefault(require("../components/PerformanceAnalytics"));
|
|
22
|
+
var _OneColumnContainer = _interopRequireDefault(require("../components/OneColumnContainer"));
|
|
23
|
+
var _NoDataFoundMessage = _interopRequireDefault(require("../components/NoDataFoundMessage"));
|
|
9
24
|
var Factory = function Factory(_ref) {
|
|
10
25
|
var componentName = _ref.componentName;
|
|
11
26
|
switch (componentName) {
|
|
27
|
+
case 'Benchmark':
|
|
28
|
+
return _Benchmark.default;
|
|
29
|
+
case 'Button':
|
|
30
|
+
return _Button.default;
|
|
31
|
+
case 'CollapseData':
|
|
32
|
+
return _CollapseData.default;
|
|
33
|
+
case 'KpiFilter':
|
|
34
|
+
return _KpiFilter.default;
|
|
35
|
+
case 'TitleDescription':
|
|
36
|
+
return _TitleDescription.default;
|
|
37
|
+
case 'TotalBenchmark':
|
|
38
|
+
return _TotalBenchmark.default;
|
|
12
39
|
case 'TotalDoughnutChart':
|
|
13
40
|
return _TotalDoughnutChart.default;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
41
|
+
case 'TotalBenchmarkArrows':
|
|
42
|
+
return _TotalBenchmarkArrows.default;
|
|
43
|
+
case 'TotalBenchmarkBarchart':
|
|
44
|
+
return _TotalBenchmarkBarchart.default;
|
|
45
|
+
case 'TotalBenchmarkAreachart':
|
|
46
|
+
return _TotalBenchmarkAreachart.default;
|
|
47
|
+
case 'PerformanceAnalyticsTotals':
|
|
48
|
+
return _PerformanceAnalyticsTotals.default;
|
|
49
|
+
case 'PerformanceAnalyticsOneColumn':
|
|
50
|
+
return _PerformanceAnalyticsOneColumn.default;
|
|
51
|
+
case 'PerformanceAnalyticsLegend':
|
|
52
|
+
return _PerformanceAnalyticsLegend.default;
|
|
53
|
+
case 'PerformanceAnalytics':
|
|
54
|
+
return _PerformanceAnalytics.default;
|
|
55
|
+
case 'OneColumnContainer':
|
|
56
|
+
return _OneColumnContainer.default;
|
|
57
|
+
case 'NoDataFoundMessage':
|
|
58
|
+
return _NoDataFoundMessage.default;
|
|
30
59
|
default:
|
|
31
|
-
return
|
|
60
|
+
return _TotalBenchmarkArrows.default;
|
|
32
61
|
}
|
|
33
62
|
};
|
|
34
63
|
var _default = exports.default = Factory;
|