@widergy/utilitygo-smart-bill-web 1.10.0 → 1.10.1
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/CHANGELOG.md +7 -0
- package/dist/components/Advice/index.js +6 -10
- package/dist/components/Amount/index.js +21 -26
- package/dist/components/Amount/utils.js +5 -1
- package/dist/components/Banner/index.js +6 -10
- package/dist/components/BarChart/constants.js +3 -3
- package/dist/components/BarChart/index.js +25 -28
- package/dist/components/BarChart/utils.js +15 -15
- package/dist/components/BillCalculation/components/ConceptCard/index.js +48 -47
- package/dist/components/BillCalculation/constants.js +1 -1
- package/dist/components/BillCalculation/index.js +54 -44
- package/dist/components/BillCalculation/utils.js +14 -17
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -26
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +31 -34
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +14 -12
- package/dist/components/BillSummary/components/BilledConcepts/index.js +49 -31
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +76 -44
- package/dist/components/BillSummary/index.js +78 -76
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +12 -17
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +135 -148
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +14 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +94 -89
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +11 -21
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +16 -21
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +9 -13
- package/dist/components/ConsumptionComparison/index.js +56 -42
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -30
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +13 -18
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -17
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +17 -21
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
- package/dist/components/ConsumptionEnergyDetails/index.js +47 -51
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
- package/dist/components/ConsumptionIncluded/index.js +36 -34
- package/dist/components/ConsumptionIncluded/utils.js +33 -29
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
- package/dist/components/ConsumptionPeriod/index.js +8 -12
- package/dist/components/ConsumptionPeriod/utils.js +15 -13
- package/dist/components/Date/index.js +9 -12
- package/dist/components/DebtState/index.js +8 -14
- package/dist/components/IconAndDetails/index.js +17 -19
- package/dist/components/Magnitude/index.js +12 -15
- package/dist/components/Magnitude/utils.js +8 -2
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
- package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
- package/dist/components/MainBillData/components/BillBody/index.js +50 -45
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
- package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
- package/dist/components/MainBillData/index.js +5 -7
- package/dist/components/MainBillData/theme.js +9 -7
- package/dist/components/MainBillData/utils.js +5 -1
- package/dist/components/Period/index.js +47 -55
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
- package/dist/components/PowerProgresBar/index.js +36 -36
- package/dist/components/RateAndCategory/index.js +31 -30
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
- package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +7 -5
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +12 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +3 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +18 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +19 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -15
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +37 -35
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +23 -26
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +18 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +32 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +20 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +50 -32
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
- package/dist/components/RatesDefinition/index.js +15 -20
- package/dist/components/SmartBillProvider/index.js +47 -12
- package/dist/components/StyledAmount/constants.js +1 -1
- package/dist/components/StyledAmount/index.js +35 -19
- package/dist/components/WithContextApi/index.js +27 -16
- package/dist/components/WithContextApi/layout.js +2 -2
- package/dist/components/WithSeason/index.js +9 -5
- package/dist/constants/deviceSizes.js +17 -27
- package/dist/constants/seasons.js +2 -2
- package/dist/index.js +16 -14
- package/dist/shared/Context/index.js +3 -5
- package/dist/shared/constants/aliases.js +550 -683
- package/dist/shared/constants/components.js +2 -1
- package/dist/shared/constants/consumptions.js +4 -4
- package/dist/shared/constants/periodicities.js +1 -1
- package/dist/shared/constants/rates.js +1 -1
- package/dist/shared/constants/readings.js +2 -2
- package/dist/shared/constants/seasons.js +2 -2
- package/dist/shared/constants/stagesGraph.js +4 -4
- package/dist/shared/types/assetsTypes.js +1 -1
- package/dist/shared/types/billDataTypes.js +4 -4
- package/dist/shared/types/componentsTypes.js +13 -18
- package/dist/shared/types/formattersTypes.js +1 -1
- package/dist/shared/types/rateStagesTypes.js +3 -3
- package/dist/shared/types/smartBillTypes.js +10 -5
- package/dist/shared/types/textsTypes.js +1 -1
- package/dist/shared/utils/billCalculation.js +9 -9
- package/dist/shared/utils/consumptions.js +62 -28
- package/dist/shared/utils/context.js +8 -7
- package/dist/shared/utils/expirations.js +5 -1
- package/dist/shared/utils/periods.js +20 -14
- package/dist/shared/utils/rates.js +5 -1
- package/dist/shared/utils/readings.js +10 -2
- package/dist/shared/utils/season.js +5 -1
- package/dist/shared/utils/stagesGraph.js +15 -11
- package/dist/utils/hooks.js +58 -19
- package/dist/utils.js +8 -4
- package/package.json +1 -2
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -21,42 +23,42 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
21
23
|
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null ||
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} = config.texts;
|
|
39
|
-
const data = (0, _react.useMemo)(() => (0, _utils.dataMapper)(billData.periods, consumptionIncluded), [billData.periods, consumptionIncluded]);
|
|
40
|
-
const currentIsFirstSettlement = data.some(item => item.isCurrent && item.settlementNumber === 1);
|
|
41
|
-
|
|
42
|
-
const handleRenderTimelineRow = item => /*#__PURE__*/_react.default.createElement(_TimelineRow.default, {
|
|
43
|
-
cardTitle: item.cardTitle,
|
|
44
|
-
cardSubtitle: item.cardSubtitle,
|
|
45
|
-
cardDescription1: item.cardDescription1,
|
|
46
|
-
cardDescription2: item.cardDescription2,
|
|
47
|
-
contextApiInfo: contextApiInfo,
|
|
48
|
-
startDate: item.startDate,
|
|
49
|
-
endDate: item.endDate,
|
|
50
|
-
unit: item.unit,
|
|
51
|
-
value: item.value,
|
|
52
|
-
settlementNumber: item.settlementNumber,
|
|
53
|
-
date: item.date,
|
|
54
|
-
isConsumption: item.isConsumption,
|
|
55
|
-
isCurrent: item.isCurrent,
|
|
56
|
-
isRemaining: item.isRemaining,
|
|
57
|
-
currentIsFirstSettlement: currentIsFirstSettlement
|
|
26
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
27
|
+
|
|
28
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
|
|
30
|
+
var ConsumptionIncluded = function ConsumptionIncluded(_ref) {
|
|
31
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
32
|
+
billData = _ref.billData;
|
|
33
|
+
var config = contextApiInfo.config;
|
|
34
|
+
var consumptionIncluded = config.texts.consumptionIncluded;
|
|
35
|
+
var data = (0, _react.useMemo)(function () {
|
|
36
|
+
return (0, _utils.dataMapper)(billData.periods, consumptionIncluded);
|
|
37
|
+
}, [billData.periods, consumptionIncluded]);
|
|
38
|
+
var currentIsFirstSettlement = data.some(function (item) {
|
|
39
|
+
return item.isCurrent && item.settlementNumber === 1;
|
|
58
40
|
});
|
|
59
41
|
|
|
42
|
+
var handleRenderTimelineRow = function handleRenderTimelineRow(item) {
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement(_TimelineRow.default, {
|
|
44
|
+
cardTitle: item.cardTitle,
|
|
45
|
+
cardSubtitle: item.cardSubtitle,
|
|
46
|
+
cardDescription1: item.cardDescription1,
|
|
47
|
+
cardDescription2: item.cardDescription2,
|
|
48
|
+
contextApiInfo: contextApiInfo,
|
|
49
|
+
startDate: item.startDate,
|
|
50
|
+
endDate: item.endDate,
|
|
51
|
+
unit: item.unit,
|
|
52
|
+
value: item.value,
|
|
53
|
+
settlementNumber: item.settlementNumber,
|
|
54
|
+
date: item.date,
|
|
55
|
+
isConsumption: item.isConsumption,
|
|
56
|
+
isCurrent: item.isCurrent,
|
|
57
|
+
isRemaining: item.isRemaining,
|
|
58
|
+
currentIsFirstSettlement: currentIsFirstSettlement
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
60
62
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
61
63
|
className: _stylesModule.default.titleContainer
|
|
62
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -17,66 +17,66 @@ var _consumptions2 = require("../../shared/constants/consumptions");
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
} = _ref;
|
|
26
|
-
const isPeriodicity = (0, _string.stringToCompareWithoutAccentsInclusive)(settlements === null || settlements === void 0 ? void 0 : settlements.periodicity, _periodicities.PERIODICITY.BIMONTHLY);
|
|
20
|
+
var getBimesterDateTitle = function getBimesterDateTitle(_ref, text) {
|
|
21
|
+
var year = _ref.year,
|
|
22
|
+
number = _ref.number,
|
|
23
|
+
settlements = _ref.settlements;
|
|
24
|
+
var isPeriodicity = (0, _string.stringToCompareWithoutAccentsInclusive)(settlements === null || settlements === void 0 ? void 0 : settlements.periodicity, _periodicities.PERIODICITY.BIMONTHLY);
|
|
27
25
|
if (!number || !year || !isPeriodicity) return '-';
|
|
28
26
|
return "".concat(text.bimester, " ").concat(number, " ").concat(text.of, " ").concat(year.substring(2));
|
|
29
27
|
};
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
var getBimesterDate = function getBimesterDate(periods, text) {
|
|
30
|
+
var currentPeriod = periods.find(function (item) {
|
|
31
|
+
return item.current;
|
|
32
|
+
});
|
|
33
33
|
if (!currentPeriod) return '-';
|
|
34
34
|
return getBimesterDateTitle(currentPeriod, text);
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
exports.getBimesterDate = getBimesterDate;
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
var getTotalDaysDescriptionComsumption = function getTotalDaysDescriptionComsumption(period, texts) {
|
|
40
40
|
var _period$settlements;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
var totalDays = period === null || period === void 0 ? void 0 : (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.total_settlements_days;
|
|
43
43
|
return "".concat(totalDays, " ").concat(texts.days);
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
var getTotalDaysDescriptionSettlement = function getTotalDaysDescriptionSettlement(period, texts, dataRetriver) {
|
|
47
47
|
var _period$settlements2;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
var totalDays = period === null || period === void 0 ? void 0 : (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.total_settlements_days;
|
|
50
|
+
var currentConsumptionDays = dataRetriver(period).days;
|
|
51
51
|
return currentConsumptionDays && totalDays ? "".concat(currentConsumptionDays, " ").concat(texts.of, " ").concat(totalDays, " ").concat(texts.days) : '-';
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
var getConsumptionDescriptionSettlement = function getConsumptionDescriptionSettlement(period, texts) {
|
|
55
|
+
var totalConsumption = (0, _consumptions.getTotalConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE);
|
|
56
56
|
return totalConsumption.unit ? "".concat(texts.of, " ").concat(totalConsumption.value, " ").concat(totalConsumption.unit) : '-';
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
var getCardSubtitleSettlement = function getCardSubtitleSettlement(period, text, dataRetriver) {
|
|
60
60
|
var _period$settlements3;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
var currentSettlement = dataRetriver(period).number || 0;
|
|
63
|
+
var totalSettlements = (period === null || period === void 0 ? void 0 : (_period$settlements3 = period.settlements) === null || _period$settlements3 === void 0 ? void 0 : _period$settlements3.total_settlements) || 0;
|
|
64
64
|
return "".concat(text.settlement, " ").concat(currentSettlement, " ").concat(text.of, " ").concat(totalSettlements);
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
var getCurrent = function getCurrent(period) {
|
|
68
68
|
var _period$settlements4;
|
|
69
69
|
|
|
70
70
|
return (period === null || period === void 0 ? void 0 : (_period$settlements4 = period.settlements) === null || _period$settlements4 === void 0 ? void 0 : _period$settlements4.current) || {};
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
var getRemaining = function getRemaining(period) {
|
|
74
74
|
var _period$settlements5, _period$settlements5$;
|
|
75
75
|
|
|
76
76
|
return (period === null || period === void 0 ? void 0 : (_period$settlements5 = period.settlements) === null || _period$settlements5 === void 0 ? void 0 : (_period$settlements5$ = _period$settlements5.remaining) === null || _period$settlements5$ === void 0 ? void 0 : _period$settlements5$[0]) || {};
|
|
77
77
|
};
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
var consumptionMapper = function consumptionMapper(period, texts) {
|
|
80
80
|
var _period$settlements6, _period$settlements7;
|
|
81
81
|
|
|
82
82
|
return {
|
|
@@ -92,7 +92,7 @@ const consumptionMapper = (period, texts) => {
|
|
|
92
92
|
};
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
var settlementCurrentMapper = function settlementCurrentMapper(period, texts) {
|
|
96
96
|
var _period$settlements8, _period$settlements8$, _period$settlements9, _period$settlements9$, _period$settlements10, _period$settlements11;
|
|
97
97
|
|
|
98
98
|
return {
|
|
@@ -109,7 +109,7 @@ const settlementCurrentMapper = (period, texts) => {
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
var settlementRemainingMapper = function settlementRemainingMapper(period, texts) {
|
|
113
113
|
var _period$settlements12, _period$settlements13, _period$settlements14, _period$settlements15, _period$settlements16, _period$settlements17, _period$settlements18, _period$settlements19;
|
|
114
114
|
|
|
115
115
|
return {
|
|
@@ -126,12 +126,16 @@ const settlementRemainingMapper = (period, texts) => {
|
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
var dataMapper = function dataMapper() {
|
|
130
|
+
var periods = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
131
|
+
var texts = arguments.length > 1 ? arguments[1] : undefined;
|
|
132
|
+
var currentPeriod = periods.find(function (item) {
|
|
133
|
+
return item.current;
|
|
134
|
+
});
|
|
133
135
|
if (!currentPeriod) return [];
|
|
134
|
-
return [consumptionMapper(currentPeriod, texts), settlementCurrentMapper(currentPeriod, texts), settlementRemainingMapper(currentPeriod, texts)].sort((a, b)
|
|
136
|
+
return [consumptionMapper(currentPeriod, texts), settlementCurrentMapper(currentPeriod, texts), settlementRemainingMapper(currentPeriod, texts)].sort(function (a, b) {
|
|
137
|
+
return a.order - b.order;
|
|
138
|
+
});
|
|
135
139
|
};
|
|
136
140
|
|
|
137
141
|
exports.dataMapper = dataMapper;
|
|
@@ -19,20 +19,16 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} = _ref;
|
|
33
|
-
const {
|
|
34
|
-
Label
|
|
35
|
-
} = contextApiInfo;
|
|
22
|
+
var ReadingRow = function ReadingRow(_ref) {
|
|
23
|
+
var alias = _ref.alias,
|
|
24
|
+
numberAlias = _ref.numberAlias,
|
|
25
|
+
unitAlias = _ref.unitAlias,
|
|
26
|
+
contextApiInfo = _ref.contextApiInfo,
|
|
27
|
+
text = _ref.text,
|
|
28
|
+
value = _ref.value,
|
|
29
|
+
unit = _ref.unit,
|
|
30
|
+
disableUnit = _ref.disableUnit;
|
|
31
|
+
var Label = contextApiInfo.Label;
|
|
36
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
33
|
className: _stylesModule.default.container
|
|
38
34
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -23,31 +23,28 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const formatDate = date => (0, _dayjs.default)(date).format('DD/MM/YYYY');
|
|
49
|
-
|
|
50
|
-
const daysLabel = totalSettlementsDays ? "(".concat(totalSettlementsDays, " ").concat(texts.consumptionPeriod.days, ")") : '';
|
|
26
|
+
var ConsumptionSummary = function ConsumptionSummary(_ref) {
|
|
27
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
28
|
+
periodNumber = _ref.periodNumber,
|
|
29
|
+
year = _ref.year,
|
|
30
|
+
initialReadingDate = _ref.initialReadingDate,
|
|
31
|
+
finalReadingDate = _ref.finalReadingDate,
|
|
32
|
+
totalSettlementsDays = _ref.totalSettlementsDays,
|
|
33
|
+
initialReadingValue = _ref.initialReadingValue,
|
|
34
|
+
finalReadingValue = _ref.finalReadingValue,
|
|
35
|
+
totalConsumptionValue = _ref.totalConsumptionValue,
|
|
36
|
+
totalConsumptionUnit = _ref.totalConsumptionUnit,
|
|
37
|
+
_ref$classes = _ref.classes,
|
|
38
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
39
|
+
var config = contextApiInfo.config,
|
|
40
|
+
Label = contextApiInfo.Label;
|
|
41
|
+
var texts = config.texts;
|
|
42
|
+
|
|
43
|
+
var formatDate = function formatDate(date) {
|
|
44
|
+
return (0, _dayjs.default)(date).format('DD/MM/YYYY');
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var daysLabel = totalSettlementsDays ? "(".concat(totalSettlementsDays, " ").concat(texts.consumptionPeriod.days, ")") : '';
|
|
51
48
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
52
49
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
53
50
|
}, periodNumber && year && /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -25,31 +27,45 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
25
27
|
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
29
|
|
|
28
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
30
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
31
|
+
|
|
32
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
|
+
|
|
34
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
+
|
|
36
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
+
|
|
38
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
+
|
|
40
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
+
|
|
42
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
+
|
|
44
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
45
|
|
|
30
|
-
|
|
46
|
+
var HistoryGraph = function HistoryGraph(_ref) {
|
|
47
|
+
var billData = _ref.billData,
|
|
48
|
+
contextApiInfo = _ref.contextApiInfo;
|
|
49
|
+
var config = contextApiInfo.config;
|
|
50
|
+
var showPeriodsInChronologicalOrder = config.showPeriodsInChronologicalOrder;
|
|
31
51
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} = _ref;
|
|
37
|
-
const {
|
|
38
|
-
config
|
|
39
|
-
} = contextApiInfo;
|
|
40
|
-
const {
|
|
41
|
-
showPeriodsInChronologicalOrder
|
|
42
|
-
} = config;
|
|
43
|
-
const [isDesktopSize, setIsDesktopSize] = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
|
|
52
|
+
var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
|
|
53
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
54
|
+
isDesktopSize = _useState2[0],
|
|
55
|
+
setIsDesktopSize = _useState2[1];
|
|
44
56
|
|
|
45
|
-
|
|
57
|
+
var handleResizeScreen = function handleResizeScreen() {
|
|
58
|
+
return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
|
|
59
|
+
};
|
|
46
60
|
|
|
47
|
-
(0, _react.useEffect)(()
|
|
61
|
+
(0, _react.useEffect)(function () {
|
|
48
62
|
window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
|
|
49
63
|
handleResizeScreen();
|
|
50
|
-
return ()
|
|
64
|
+
return function () {
|
|
65
|
+
return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
|
|
66
|
+
};
|
|
51
67
|
}, []);
|
|
52
|
-
|
|
68
|
+
var consumptionHistoryData = (0, _consumptions.getConsumptionHistoryData)(billData, _consumptions2.ENERGY_TYPES.ACTIVE, showPeriodsInChronologicalOrder);
|
|
53
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
70
|
className: _stylesModule.default.container
|
|
55
71
|
}, /*#__PURE__*/_react.default.createElement(_BarChart.default, {
|
|
@@ -27,43 +27,40 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
fill: colors.primary
|
|
65
|
-
}
|
|
66
|
-
});
|
|
30
|
+
var Reading = function Reading(_ref) {
|
|
31
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
32
|
+
title = _ref.title,
|
|
33
|
+
date = _ref.date,
|
|
34
|
+
readingType = _ref.readingType,
|
|
35
|
+
readingValue = _ref.readingValue,
|
|
36
|
+
tooltip = _ref.tooltip,
|
|
37
|
+
_ref$classes = _ref.classes,
|
|
38
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
39
|
+
var assets = contextApiInfo.assets,
|
|
40
|
+
config = contextApiInfo.config,
|
|
41
|
+
Label = contextApiInfo.Label,
|
|
42
|
+
Tooltip = contextApiInfo.Tooltip;
|
|
43
|
+
var texts = config.texts,
|
|
44
|
+
colors = config.colors;
|
|
45
|
+
var InfoIcon = assets.InfoIcon,
|
|
46
|
+
ReadingDateIcon = assets.ReadingDateIcon,
|
|
47
|
+
ReadingTypeIcon = assets.ReadingTypeIcon,
|
|
48
|
+
EnergyIcon = assets.EnergyIcon;
|
|
49
|
+
|
|
50
|
+
var TitleLabel = function TitleLabel() {
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(Label, {
|
|
52
|
+
alias: _aliases.READING_TITLE,
|
|
53
|
+
className: !tooltip && _stylesModule.default.title
|
|
54
|
+
}, title);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var EnergyIconStyled = function EnergyIconStyled() {
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement(EnergyIcon, {
|
|
59
|
+
style: {
|
|
60
|
+
fill: colors.primary
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
};
|
|
67
64
|
|
|
68
65
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
69
66
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
@@ -33,20 +33,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
33
33
|
|
|
34
34
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
var ConsumptionPeriod = function ConsumptionPeriod(_ref) {
|
|
37
37
|
var _currentPeriod$settle, _currentPeriod$settle2;
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
47
|
-
const initialReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.INITIAL);
|
|
48
|
-
const finalReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.FINAL);
|
|
49
|
-
const consumptionSummaryProps = (0, _utils.getConsumptionSummaryProps)(currentPeriod, initialReading, finalReading);
|
|
39
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
40
|
+
billData = _ref.billData;
|
|
41
|
+
var texts = contextApiInfo.config.texts;
|
|
42
|
+
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
43
|
+
var initialReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.INITIAL);
|
|
44
|
+
var finalReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.FINAL);
|
|
45
|
+
var consumptionSummaryProps = (0, _utils.getConsumptionSummaryProps)(currentPeriod, initialReading, finalReading);
|
|
50
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
51
47
|
className: _stylesModule.default.container
|
|
52
48
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -13,18 +13,20 @@ var _readings = require("../../shared/utils/readings");
|
|
|
13
13
|
|
|
14
14
|
var _consumptions2 = require("../../shared/constants/consumptions");
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
var getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeriod, initialReading, finalReading) {
|
|
17
|
+
return {
|
|
18
|
+
periodNumber: currentPeriod.number,
|
|
19
|
+
year: currentPeriod.year,
|
|
20
|
+
initialReadingDate: initialReading.date,
|
|
21
|
+
finalReadingDate: finalReading.date,
|
|
22
|
+
totalSettlementsDays: (0, _seamlessImmutable.getIn)(currentPeriod, ['settlements', 'total_settlements_days']),
|
|
23
|
+
initialReadingValue: (0, _readings.getActiveEnergyRecord)(initialReading).value,
|
|
24
|
+
initialReadingUnit: (0, _readings.getActiveEnergyRecord)(initialReading).unit,
|
|
25
|
+
finalReadingValue: (0, _readings.getActiveEnergyRecord)(finalReading).value,
|
|
26
|
+
finalReadingUnit: (0, _readings.getActiveEnergyRecord)(finalReading).unit,
|
|
27
|
+
totalConsumptionValue: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).value,
|
|
28
|
+
totalConsumptionUnit: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).unit
|
|
29
|
+
};
|
|
30
|
+
};
|
|
29
31
|
|
|
30
32
|
exports.getConsumptionSummaryProps = getConsumptionSummaryProps;
|
|
@@ -19,18 +19,15 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const {
|
|
32
|
-
Label
|
|
33
|
-
} = contextApiInfo;
|
|
22
|
+
var Date = function Date(_ref) {
|
|
23
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
+
date = _ref.date,
|
|
25
|
+
text = _ref.text,
|
|
26
|
+
_ref$classes = _ref.classes,
|
|
27
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
28
|
+
mainAlias = _ref.mainAlias,
|
|
29
|
+
detailAlias = _ref.detailAlias;
|
|
30
|
+
var Label = contextApiInfo.Label;
|
|
34
31
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
35
32
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
36
33
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -19,20 +19,14 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Label
|
|
31
|
-
} = contextApiInfo;
|
|
32
|
-
const {
|
|
33
|
-
PendingDebtIcon,
|
|
34
|
-
AdheredToServiceIcon
|
|
35
|
-
} = assets;
|
|
22
|
+
var DebtState = function DebtState(_ref) {
|
|
23
|
+
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
+
debtStatusLabel = _ref.debtStatusLabel,
|
|
25
|
+
isWarning = _ref.isWarning;
|
|
26
|
+
var assets = contextApiInfo.assets,
|
|
27
|
+
Label = contextApiInfo.Label;
|
|
28
|
+
var PendingDebtIcon = assets.PendingDebtIcon,
|
|
29
|
+
AdheredToServiceIcon = assets.AdheredToServiceIcon;
|
|
36
30
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
31
|
className: "".concat(_stylesModule.default.container, " ").concat(isWarning ? _stylesModule.default.withDebtsContainer : _stylesModule.default.adheredToAutomaticDebt, " ")
|
|
38
32
|
}, isWarning ? /*#__PURE__*/_react.default.createElement(PendingDebtIcon, null) : /*#__PURE__*/_react.default.createElement(AdheredToServiceIcon, null), /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -23,25 +23,23 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} = contextApiInfo;
|
|
44
|
-
const repeatedData = mainText && secondaryText && (0, _string.stringCompare)(mainText, secondaryText);
|
|
26
|
+
var IconAndDetails = function IconAndDetails(_ref) {
|
|
27
|
+
var children = _ref.children,
|
|
28
|
+
contextApiInfo = _ref.contextApiInfo,
|
|
29
|
+
Icon = _ref.Icon,
|
|
30
|
+
mainText = _ref.mainText,
|
|
31
|
+
secondaryText = _ref.secondaryText,
|
|
32
|
+
descriptionText = _ref.descriptionText,
|
|
33
|
+
tooltip = _ref.tooltip,
|
|
34
|
+
mainAlias = _ref.mainAlias,
|
|
35
|
+
secondaryAlias = _ref.secondaryAlias,
|
|
36
|
+
_ref$tertiaryAlias = _ref.tertiaryAlias,
|
|
37
|
+
tertiaryAlias = _ref$tertiaryAlias === void 0 ? secondaryAlias : _ref$tertiaryAlias,
|
|
38
|
+
_ref$classes = _ref.classes,
|
|
39
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
40
|
+
var Label = contextApiInfo.Label,
|
|
41
|
+
Tooltip = contextApiInfo.Tooltip;
|
|
42
|
+
var repeatedData = mainText && secondaryText && (0, _string.stringCompare)(mainText, secondaryText);
|
|
45
43
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
44
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
47
45
|
}, /*#__PURE__*/_react.default.createElement(Tooltip, {
|