@widergy/utilitygo-smart-bill-web 1.9.0 → 1.11.0

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/Advice/index.js +6 -10
  3. package/dist/components/Amount/index.js +21 -26
  4. package/dist/components/Amount/utils.js +5 -1
  5. package/dist/components/Banner/index.js +6 -10
  6. package/dist/components/BarChart/constants.js +3 -3
  7. package/dist/components/BarChart/index.js +25 -28
  8. package/dist/components/BarChart/utils.js +15 -15
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +48 -47
  10. package/dist/components/BillCalculation/constants.js +1 -1
  11. package/dist/components/BillCalculation/index.js +54 -44
  12. package/dist/components/BillCalculation/utils.js +14 -17
  13. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -26
  14. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
  15. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +31 -34
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
  17. package/dist/components/BillSummary/components/BilledConcepts/constants.js +14 -12
  18. package/dist/components/BillSummary/components/BilledConcepts/index.js +49 -31
  19. package/dist/components/BillSummary/components/BilledConcepts/utils.js +76 -44
  20. package/dist/components/BillSummary/index.js +78 -76
  21. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
  22. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +12 -17
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +135 -148
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +14 -16
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +94 -89
  27. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +11 -21
  28. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
  29. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +16 -21
  30. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +9 -13
  31. package/dist/components/ConsumptionComparison/index.js +56 -42
  32. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -30
  33. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +13 -18
  34. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -17
  35. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +17 -21
  36. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
  37. package/dist/components/ConsumptionEnergyDetails/index.js +55 -52
  38. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +12 -0
  39. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
  40. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
  41. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
  42. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
  43. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
  44. package/dist/components/ConsumptionIncluded/index.js +36 -34
  45. package/dist/components/ConsumptionIncluded/utils.js +33 -29
  46. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
  47. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
  48. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
  49. package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
  50. package/dist/components/ConsumptionPeriod/index.js +8 -12
  51. package/dist/components/ConsumptionPeriod/utils.js +15 -13
  52. package/dist/components/Date/index.js +9 -12
  53. package/dist/components/DebtState/index.js +8 -14
  54. package/dist/components/IconAndDetails/index.js +17 -19
  55. package/dist/components/Magnitude/index.js +12 -15
  56. package/dist/components/Magnitude/utils.js +8 -2
  57. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
  58. package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
  59. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
  60. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
  61. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
  62. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
  63. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
  64. package/dist/components/MainBillData/components/BillBody/index.js +50 -45
  65. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
  66. package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
  67. package/dist/components/MainBillData/index.js +5 -7
  68. package/dist/components/MainBillData/theme.js +9 -7
  69. package/dist/components/MainBillData/utils.js +5 -1
  70. package/dist/components/Period/index.js +47 -55
  71. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
  72. package/dist/components/PowerProgresBar/index.js +36 -36
  73. package/dist/components/RateAndCategory/index.js +31 -30
  74. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
  75. package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
  76. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
  77. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +7 -5
  78. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +13 -19
  79. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +3 -1
  80. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +18 -18
  81. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +19 -19
  82. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
  83. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -15
  84. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +37 -35
  85. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +25 -25
  86. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +18 -18
  87. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +32 -12
  88. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +20 -12
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +50 -32
  90. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
  91. package/dist/components/RatesDefinition/index.js +15 -20
  92. package/dist/components/SmartBillProvider/index.js +47 -12
  93. package/dist/components/StyledAmount/constants.js +1 -1
  94. package/dist/components/StyledAmount/index.js +35 -19
  95. package/dist/components/WithContextApi/index.js +27 -16
  96. package/dist/components/WithContextApi/layout.js +2 -2
  97. package/dist/components/WithSeason/index.js +9 -5
  98. package/dist/constants/deviceSizes.js +17 -27
  99. package/dist/constants/seasons.js +2 -2
  100. package/dist/index.js +16 -14
  101. package/dist/shared/Context/index.js +3 -5
  102. package/dist/shared/constants/aliases.js +550 -682
  103. package/dist/shared/constants/components.js +2 -1
  104. package/dist/shared/constants/consumptions.js +4 -4
  105. package/dist/shared/constants/periodicities.js +1 -1
  106. package/dist/shared/constants/rates.js +1 -1
  107. package/dist/shared/constants/readings.js +2 -2
  108. package/dist/shared/constants/seasons.js +2 -2
  109. package/dist/shared/constants/stagesGraph.js +4 -4
  110. package/dist/shared/types/assetsTypes.js +1 -1
  111. package/dist/shared/types/billDataTypes.js +4 -4
  112. package/dist/shared/types/componentsTypes.js +13 -18
  113. package/dist/shared/types/formattersTypes.js +1 -1
  114. package/dist/shared/types/rateStagesTypes.js +3 -3
  115. package/dist/shared/types/smartBillTypes.js +10 -5
  116. package/dist/shared/types/textsTypes.js +1 -1
  117. package/dist/shared/utils/billCalculation.js +9 -9
  118. package/dist/shared/utils/consumptions.js +62 -28
  119. package/dist/shared/utils/context.js +8 -7
  120. package/dist/shared/utils/expirations.js +5 -1
  121. package/dist/shared/utils/periods.js +20 -14
  122. package/dist/shared/utils/rates.js +5 -1
  123. package/dist/shared/utils/readings.js +10 -2
  124. package/dist/shared/utils/season.js +5 -1
  125. package/dist/shared/utils/stagesGraph.js +15 -11
  126. package/dist/utils/hooks.js +5 -37
  127. package/dist/utils.js +8 -4
  128. package/package.json +2 -2
  129. 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"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -41,86 +43,86 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
41
43
 
42
44
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
45
 
44
- 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); }
46
+ 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); }
45
47
 
46
- 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; }
48
+ 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; }
47
49
 
48
- const BillSummary = _ref => {
50
+ var BillSummary = function BillSummary(_ref) {
49
51
  var _billData$client, _billData$client$rate, _billData$client2, _billData$client2$rat, _currentPeriod$settle, _currentPeriod$settle2, _currentPeriod$settle3;
50
52
 
51
- let {
52
- contextApiInfo,
53
- billData
54
- } = _ref;
55
- const {
56
- config,
57
- assets
58
- } = contextApiInfo;
59
- const {
60
- consumptionDetail
61
- } = config.externalLinks;
62
- const {
63
- showBillSummaryBanner,
64
- showPower,
65
- showCategory
66
- } = config.validations;
67
- const {
68
- texts
69
- } = config;
70
- const {
71
- ConsumptionBannerIcon,
72
- ConsumptionBannerResponsiveIcon
73
- } = assets;
74
- const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
75
- const hiredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.PURCHASED);
76
- const registeredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.REGISTERED);
77
- const exceededPower = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.EXCEEDED);
78
- const rate = billData === null || billData === void 0 ? void 0 : (_billData$client = billData.client) === null || _billData$client === void 0 ? void 0 : (_billData$client$rate = _billData$client.rate) === null || _billData$client$rate === void 0 ? void 0 : _billData$client$rate.purchased;
79
- const category = billData === null || billData === void 0 ? void 0 : (_billData$client2 = billData.client) === null || _billData$client2 === void 0 ? void 0 : (_billData$client2$rat = _billData$client2.rate) === null || _billData$client2$rat === void 0 ? void 0 : _billData$client2$rat.category;
80
- const multipleSettlements = (currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
81
- const issueedDate = currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle2 = currentPeriod.settlements) === null || _currentPeriod$settle2 === void 0 ? void 0 : (_currentPeriod$settle3 = _currentPeriod$settle2.current) === null || _currentPeriod$settle3 === void 0 ? void 0 : _currentPeriod$settle3.issued_on;
82
- const {
83
- isDesktopSize
84
- } = (0, _hooks.useScreenSize)();
85
- const withBanner = ConsumptionBannerIcon && ConsumptionBannerResponsiveIcon && showBillSummaryBanner(billData);
86
-
87
- const RenderPeriod = () => /*#__PURE__*/_react.default.createElement(_Period.default, {
88
- billData: billData,
89
- alias: _aliases.SUMMARY_PERIOD,
90
- currentPeriod: currentPeriod,
91
- multipleSettlements: multipleSettlements,
92
- issueedDate: issueedDate
93
- });
94
-
95
- const RenderConsumptionEnergyDetails = () => /*#__PURE__*/_react.default.createElement(_ConsumptionEnergyDetails.default, {
96
- billData: billData,
97
- currentPeriod: currentPeriod,
98
- multipleSettlements: multipleSettlements,
99
- withPercentage: true
100
- });
101
-
102
- const RenderRateAndCategory = () => /*#__PURE__*/_react.default.createElement(_RateAndCategory.default, {
103
- rate: rate,
104
- category: category,
105
- title: texts.billSummary.rateTitle,
106
- classes: {
107
- container: _stylesModule.default.rateContainer,
108
- title: _stylesModule.default.title,
109
- purchasedRate: _stylesModule.default.purchasedRate,
110
- category: showCategory(billData) ? _stylesModule.default.category : _stylesModule.default.hidden
111
- },
112
- showCategory: showCategory(billData)
113
- });
114
-
115
- const RenderPowerProgresBar = () => /*#__PURE__*/_react.default.createElement(_PowerProgresBar.default, {
116
- hiredPowerConsumption: hiredPowerConsumption,
117
- registeredPowerConsumption: registeredPowerConsumption,
118
- exceededPower: exceededPower
119
- });
120
-
121
- const RenderBilledConcepts = () => /*#__PURE__*/_react.default.createElement(_BilledConcepts.default, {
122
- billData: billData
123
- });
53
+ var contextApiInfo = _ref.contextApiInfo,
54
+ billData = _ref.billData;
55
+ var config = contextApiInfo.config,
56
+ assets = contextApiInfo.assets;
57
+ var consumptionDetail = config.externalLinks.consumptionDetail;
58
+ var _config$validations = config.validations,
59
+ showBillSummaryBanner = _config$validations.showBillSummaryBanner,
60
+ showPower = _config$validations.showPower,
61
+ showCategory = _config$validations.showCategory;
62
+ var texts = config.texts;
63
+ var ConsumptionBannerIcon = assets.ConsumptionBannerIcon,
64
+ ConsumptionBannerResponsiveIcon = assets.ConsumptionBannerResponsiveIcon;
65
+ var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
66
+ var hiredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.PURCHASED);
67
+ var registeredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.REGISTERED);
68
+ var exceededPower = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.EXCEEDED);
69
+ var rate = billData === null || billData === void 0 ? void 0 : (_billData$client = billData.client) === null || _billData$client === void 0 ? void 0 : (_billData$client$rate = _billData$client.rate) === null || _billData$client$rate === void 0 ? void 0 : _billData$client$rate.purchased;
70
+ var category = billData === null || billData === void 0 ? void 0 : (_billData$client2 = billData.client) === null || _billData$client2 === void 0 ? void 0 : (_billData$client2$rat = _billData$client2.rate) === null || _billData$client2$rat === void 0 ? void 0 : _billData$client2$rat.category;
71
+ var multipleSettlements = (currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
72
+ var issueedDate = currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle2 = currentPeriod.settlements) === null || _currentPeriod$settle2 === void 0 ? void 0 : (_currentPeriod$settle3 = _currentPeriod$settle2.current) === null || _currentPeriod$settle3 === void 0 ? void 0 : _currentPeriod$settle3.issued_on;
73
+
74
+ var _useScreenSize = (0, _hooks.useScreenSize)(),
75
+ isDesktopSize = _useScreenSize.isDesktopSize;
76
+
77
+ var withBanner = ConsumptionBannerIcon && ConsumptionBannerResponsiveIcon && showBillSummaryBanner(billData);
78
+
79
+ var RenderPeriod = function RenderPeriod() {
80
+ return /*#__PURE__*/_react.default.createElement(_Period.default, {
81
+ billData: billData,
82
+ alias: _aliases.SUMMARY_PERIOD,
83
+ currentPeriod: currentPeriod,
84
+ multipleSettlements: multipleSettlements,
85
+ issueedDate: issueedDate
86
+ });
87
+ };
88
+
89
+ var RenderConsumptionEnergyDetails = function RenderConsumptionEnergyDetails() {
90
+ return /*#__PURE__*/_react.default.createElement(_ConsumptionEnergyDetails.default, {
91
+ billData: billData,
92
+ currentPeriod: currentPeriod,
93
+ multipleSettlements: multipleSettlements,
94
+ withPercentage: true
95
+ });
96
+ };
97
+
98
+ var RenderRateAndCategory = function RenderRateAndCategory() {
99
+ return /*#__PURE__*/_react.default.createElement(_RateAndCategory.default, {
100
+ rate: rate,
101
+ category: category,
102
+ title: texts.billSummary.rateTitle,
103
+ classes: {
104
+ container: _stylesModule.default.rateContainer,
105
+ title: _stylesModule.default.title,
106
+ purchasedRate: _stylesModule.default.purchasedRate,
107
+ category: showCategory(billData) ? _stylesModule.default.category : _stylesModule.default.hidden
108
+ },
109
+ showCategory: showCategory(billData)
110
+ });
111
+ };
112
+
113
+ var RenderPowerProgresBar = function RenderPowerProgresBar() {
114
+ return /*#__PURE__*/_react.default.createElement(_PowerProgresBar.default, {
115
+ hiredPowerConsumption: hiredPowerConsumption,
116
+ registeredPowerConsumption: registeredPowerConsumption,
117
+ exceededPower: exceededPower
118
+ });
119
+ };
120
+
121
+ var RenderBilledConcepts = function RenderBilledConcepts() {
122
+ return /*#__PURE__*/_react.default.createElement(_BilledConcepts.default, {
123
+ billData: billData
124
+ });
125
+ };
124
126
 
125
127
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, isDesktopSize ? /*#__PURE__*/_react.default.createElement("div", {
126
128
  className: _stylesModule.default.container
@@ -17,16 +17,16 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
20
- const DataLine = _ref => {
21
- let {
22
- fields
23
- } = _ref;
20
+ var DataLine = function DataLine(_ref) {
21
+ var fields = _ref.fields;
24
22
  return !(0, _object.objectIsEmpty)(fields) && /*#__PURE__*/_react.default.createElement("div", {
25
23
  className: _stylesModule.default.container
26
- }, fields === null || fields === void 0 ? void 0 : fields.map(field => field && /*#__PURE__*/_react.default.createElement("div", {
27
- key: field.id,
28
- className: _stylesModule.default.cell
29
- }, field.Component)));
24
+ }, fields === null || fields === void 0 ? void 0 : fields.map(function (field) {
25
+ return field && /*#__PURE__*/_react.default.createElement("div", {
26
+ key: field.id,
27
+ className: _stylesModule.default.cell
28
+ }, field.Component);
29
+ }));
30
30
  };
31
31
 
32
32
  DataLine.propTypes = {
@@ -23,23 +23,18 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- const Season = _ref => {
27
- let {
28
- contextApiInfo,
29
- season
30
- } = _ref;
31
- const {
32
- assets,
33
- config,
34
- Label
35
- } = contextApiInfo;
36
- const {
37
- texts
38
- } = config;
39
- const {
40
- Icon,
41
- text
42
- } = (0, _utils.getSeasonProps)(season, texts, assets);
26
+ var Season = function Season(_ref) {
27
+ var contextApiInfo = _ref.contextApiInfo,
28
+ season = _ref.season;
29
+ var assets = contextApiInfo.assets,
30
+ config = contextApiInfo.config,
31
+ Label = contextApiInfo.Label;
32
+ var texts = config.texts;
33
+
34
+ var _getSeasonProps = (0, _utils.getSeasonProps)(season, texts, assets),
35
+ Icon = _getSeasonProps.Icon,
36
+ text = _getSeasonProps.text;
37
+
43
38
  return Icon && text ? /*#__PURE__*/_react.default.createElement("div", {
44
39
  className: _stylesModule.default.container
45
40
  }, /*#__PURE__*/_react.default.createElement(Icon, {
@@ -7,7 +7,7 @@ exports.getSeasonProps = void 0;
7
7
 
8
8
  var _seasons = require("../../../../../../shared/constants/seasons");
9
9
 
10
- const getSeasonProps = (season, texts, assets) => {
10
+ var getSeasonProps = function getSeasonProps(season, texts, assets) {
11
11
  switch (season) {
12
12
  case _seasons.SEASONS.AUTUMN:
13
13
  return {
@@ -23,43 +23,42 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
23
23
 
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
25
 
26
- const FIELD_PERIOD_COMPARISION = 'period_comparison';
26
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
27
+
28
+ var FIELD_PERIOD_COMPARISION = 'period_comparison';
27
29
  exports.FIELD_PERIOD_COMPARISION = FIELD_PERIOD_COMPARISION;
28
- const FIELD_PERIOD_DATES = 'period_dates';
30
+ var FIELD_PERIOD_DATES = 'period_dates';
29
31
  exports.FIELD_PERIOD_DATES = FIELD_PERIOD_DATES;
30
- const FIELD_SETTLEMENTS_DAYS = 'settlements_days';
32
+ var FIELD_SETTLEMENTS_DAYS = 'settlements_days';
31
33
  exports.FIELD_SETTLEMENTS_DAYS = FIELD_SETTLEMENTS_DAYS;
32
- const FIELD_ENERGY_CONSUMPTION = 'energy_consumption';
34
+ var FIELD_ENERGY_CONSUMPTION = 'energy_consumption';
33
35
  exports.FIELD_ENERGY_CONSUMPTION = FIELD_ENERGY_CONSUMPTION;
34
- const FIELD_POWER_CONSUMPTION = 'power_consumption';
36
+ var FIELD_POWER_CONSUMPTION = 'power_consumption';
35
37
  exports.FIELD_POWER_CONSUMPTION = FIELD_POWER_CONSUMPTION;
36
- const FIELD_TOTAL_CONSUMPTIONS = 'total_consumptions';
38
+ var FIELD_TOTAL_CONSUMPTIONS = 'total_consumptions';
37
39
  exports.FIELD_TOTAL_CONSUMPTIONS = FIELD_TOTAL_CONSUMPTIONS;
38
- const FIELD_DAILY_CONSUMPTIONS = 'daily_consumptions';
40
+ var FIELD_DAILY_CONSUMPTIONS = 'daily_consumptions';
39
41
  exports.FIELD_DAILY_CONSUMPTIONS = FIELD_DAILY_CONSUMPTIONS;
40
- const FIELD_AVERAGE_TEMPERATURE = 'average_temperature';
42
+ var FIELD_AVERAGE_TEMPERATURE = 'average_temperature';
41
43
  exports.FIELD_AVERAGE_TEMPERATURE = FIELD_AVERAGE_TEMPERATURE;
42
- const NO_DATA_FIELD = 'no_data_cell';
44
+ var NO_DATA_FIELD = 'no_data_cell';
43
45
  exports.NO_DATA_FIELD = NO_DATA_FIELD;
44
- const dataFieldDictonary = ['period_comparison', 'period_dates', 'settlements_days', 'total_consumptions', 'energy_consumption', 'power_consumption', 'daily_consumptions', 'average_temperature'];
46
+ var dataFieldDictonary = ['period_comparison', 'period_dates', 'settlements_days', 'total_consumptions', 'energy_consumption', 'power_consumption', 'daily_consumptions', 'average_temperature'];
45
47
  exports.dataFieldDictonary = dataFieldDictonary;
46
48
 
47
- const desktopGetHeaderFields = (contextApiInfo, withPowerComparison, showTemp) => {
48
- const {
49
- config,
50
- Label
51
- } = contextApiInfo;
52
- const {
53
- periodDates,
54
- settlementDays,
55
- energyConsumption,
56
- powerConsumption,
57
- totalConsumption,
58
- dailyConsumption,
59
- averageTemperature,
60
- yearOrBimester,
61
- yearOrPeriod
62
- } = config.texts.consumptionComparison;
49
+ var desktopGetHeaderFields = function desktopGetHeaderFields(contextApiInfo, withPowerComparison, showTemp) {
50
+ var config = contextApiInfo.config,
51
+ Label = contextApiInfo.Label;
52
+ var _config$texts$consump = config.texts.consumptionComparison,
53
+ periodDates = _config$texts$consump.periodDates,
54
+ settlementDays = _config$texts$consump.settlementDays,
55
+ energyConsumption = _config$texts$consump.energyConsumption,
56
+ powerConsumption = _config$texts$consump.powerConsumption,
57
+ totalConsumption = _config$texts$consump.totalConsumption,
58
+ dailyConsumption = _config$texts$consump.dailyConsumption,
59
+ averageTemperature = _config$texts$consump.averageTemperature,
60
+ yearOrBimester = _config$texts$consump.yearOrBimester,
61
+ yearOrPeriod = _config$texts$consump.yearOrPeriod;
63
62
  return [{
64
63
  id: 'season',
65
64
  Component: /*#__PURE__*/_react.default.createElement(Label, {
@@ -105,139 +104,127 @@ const desktopGetHeaderFields = (contextApiInfo, withPowerComparison, showTemp) =
105
104
 
106
105
  exports.desktopGetHeaderFields = desktopGetHeaderFields;
107
106
 
108
- const formatInterval = period => {
107
+ var formatInterval = function formatInterval(period) {
109
108
  var _period$settlements, _period$settlements2;
110
109
 
111
- const startDate = period === null || period === void 0 ? void 0 : (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.start_date;
112
- const endDate = period === null || period === void 0 ? void 0 : (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.end_date;
110
+ var startDate = period === null || period === void 0 ? void 0 : (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.start_date;
111
+ var endDate = period === null || period === void 0 ? void 0 : (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.end_date;
113
112
  return startDate && endDate && "".concat((0, _dayjs.default)(startDate).format('DD/MM'), " - ").concat((0, _dayjs.default)(endDate).format('DD/MM'));
114
113
  };
115
114
 
116
- const getField = function () {
117
- var _data$period, _data$period$settleme, _getDailyConsumption$;
118
-
119
- let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
120
- let contextApiInfo = arguments.length > 1 ? arguments[1] : undefined;
121
- const {
122
- Label
123
- } = contextApiInfo;
124
- const {
125
- isHeader,
126
- data,
127
- primary,
128
- mobileLastYear,
129
- text
130
- } = options;
131
-
132
- const textLabel = /*#__PURE__*/_react.default.createElement(Label, {
115
+ var getField = function getField() {
116
+ var _data$period, _data$period$settleme, _getDailyConsumption$, _ref;
117
+
118
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
119
+ var contextApiInfo = arguments.length > 1 ? arguments[1] : undefined;
120
+ var Label = contextApiInfo.Label;
121
+ var isHeader = options.isHeader,
122
+ data = options.data,
123
+ primary = options.primary,
124
+ mobileLastYear = options.mobileLastYear,
125
+ text = options.text;
126
+
127
+ var textLabel = /*#__PURE__*/_react.default.createElement(Label, {
133
128
  alias: _aliases.DETAIL
134
129
  }, text);
135
130
 
136
- const textAlias = primary ? _aliases.PERIOD_COMPARISON_TEXT : _aliases.PERIOD_COMPARISON_TEXT_PREV;
137
- const magnitudeAlias = primary ? _aliases.PERIOD_COMPARISON_NUMBER : _aliases.PERIOD_COMPARISON_NUMBER_PREV;
138
- const unitAlias = primary ? _aliases.PERIOD_COMPARISON_UNIT : _aliases.PERIOD_COMPARISON_UNIT_PREV;
139
- return {
140
- [FIELD_PERIOD_COMPARISION]: {
141
- id: FIELD_PERIOD_COMPARISION,
142
- Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
143
- alias: textAlias,
144
- className: "".concat(mobileLastYear && _stylesModule.default.mobileLastYear)
145
- }, text || (0, _utils.stringOrDash)(data)) : textLabel
146
- },
147
- [FIELD_PERIOD_DATES]: {
148
- id: FIELD_PERIOD_DATES,
149
- Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
150
- alias: textAlias
151
- }, text || (0, _utils.stringOrDash)(formatInterval(data))) : textLabel
152
- },
153
- [FIELD_SETTLEMENTS_DAYS]: {
154
- id: FIELD_SETTLEMENTS_DAYS,
155
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
156
- numberAlias: magnitudeAlias,
157
- unitAlias: unitAlias,
158
- value: (_data$period = data.period) === null || _data$period === void 0 ? void 0 : (_data$period$settleme = _data$period.settlements) === null || _data$period$settleme === void 0 ? void 0 : _data$period$settleme.total_settlements_days,
159
- unit: data.daysUnit,
160
- classes: {
161
- numberAndUnit: _stylesModule.default.numberAndUnit
162
- }
163
- }) : textLabel
164
- },
165
- [FIELD_TOTAL_CONSUMPTIONS]: {
166
- id: FIELD_TOTAL_CONSUMPTIONS,
167
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
168
- numberAlias: magnitudeAlias,
169
- unitAlias: unitAlias,
170
- value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
171
- unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
172
- classes: {
173
- numberAndUnit: _stylesModule.default.numberAndUnit
174
- }
175
- }) : textLabel
176
- },
177
- [FIELD_ENERGY_CONSUMPTION]: {
178
- id: FIELD_ENERGY_CONSUMPTION,
179
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
180
- numberAlias: magnitudeAlias,
181
- unitAlias: unitAlias,
182
- value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
183
- unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
184
- classes: {
185
- numberAndUnit: _stylesModule.default.numberAndUnit
186
- }
187
- }) : textLabel
188
- },
189
- [FIELD_POWER_CONSUMPTION]: {
190
- id: FIELD_POWER_CONSUMPTION,
191
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
192
- numberAlias: magnitudeAlias,
193
- unitAlias: unitAlias,
194
- value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).value,
195
- unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).unit,
196
- classes: {
197
- numberAndUnit: _stylesModule.default.numberAndUnit
198
- }
199
- }) : textLabel
200
- },
201
- [FIELD_DAILY_CONSUMPTIONS]: {
202
- id: FIELD_DAILY_CONSUMPTIONS,
203
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
204
- numberAlias: magnitudeAlias,
205
- unitAlias: unitAlias,
206
- value: (_getDailyConsumption$ = (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value) === null || _getDailyConsumption$ === void 0 ? void 0 : _getDailyConsumption$.toFixed(1).toString().replace(/\./, ','),
207
- unit: (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
208
- classes: {
209
- numberAndUnit: _stylesModule.default.numberAndUnit
210
- }
211
- }) : /*#__PURE__*/_react.default.createElement(Label, {
212
- alias: _aliases.DETAIL
213
- }, text)
214
- },
215
- [FIELD_AVERAGE_TEMPERATURE]: {
216
- id: FIELD_AVERAGE_TEMPERATURE,
217
- Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
218
- numberAlias: magnitudeAlias,
219
- unitAlias: unitAlias,
220
- value: Math.round(data.periodAverageTemperature || data.period),
221
- unit: data.temperatureUnit,
222
- classes: {
223
- numberAndUnit: _stylesModule.default.numberAndUnit
224
- }
225
- }) : textLabel
226
- },
227
- [NO_DATA_FIELD]: {
228
- id: NO_DATA_FIELD,
229
- Component: /*#__PURE__*/_react.default.createElement(Label, {
230
- alias: textAlias
231
- }, data)
232
- }
233
- };
131
+ var textAlias = primary ? _aliases.PERIOD_COMPARISON_TEXT : _aliases.PERIOD_COMPARISON_TEXT_PREV;
132
+ var magnitudeAlias = primary ? _aliases.PERIOD_COMPARISON_NUMBER : _aliases.PERIOD_COMPARISON_NUMBER_PREV;
133
+ var unitAlias = primary ? _aliases.PERIOD_COMPARISON_UNIT : _aliases.PERIOD_COMPARISON_UNIT_PREV;
134
+ return _ref = {}, _defineProperty(_ref, FIELD_PERIOD_COMPARISION, {
135
+ id: FIELD_PERIOD_COMPARISION,
136
+ Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
137
+ alias: textAlias,
138
+ className: "".concat(mobileLastYear && _stylesModule.default.mobileLastYear)
139
+ }, text || (0, _utils.stringOrDash)(data)) : textLabel
140
+ }), _defineProperty(_ref, FIELD_PERIOD_DATES, {
141
+ id: FIELD_PERIOD_DATES,
142
+ Component: !isHeader ? /*#__PURE__*/_react.default.createElement(Label, {
143
+ alias: textAlias
144
+ }, text || (0, _utils.stringOrDash)(formatInterval(data))) : textLabel
145
+ }), _defineProperty(_ref, FIELD_SETTLEMENTS_DAYS, {
146
+ id: FIELD_SETTLEMENTS_DAYS,
147
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
148
+ numberAlias: magnitudeAlias,
149
+ unitAlias: unitAlias,
150
+ value: (_data$period = data.period) === null || _data$period === void 0 ? void 0 : (_data$period$settleme = _data$period.settlements) === null || _data$period$settleme === void 0 ? void 0 : _data$period$settleme.total_settlements_days,
151
+ unit: data.daysUnit,
152
+ classes: {
153
+ numberAndUnit: _stylesModule.default.numberAndUnit
154
+ }
155
+ }) : textLabel
156
+ }), _defineProperty(_ref, FIELD_TOTAL_CONSUMPTIONS, {
157
+ id: FIELD_TOTAL_CONSUMPTIONS,
158
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
159
+ numberAlias: magnitudeAlias,
160
+ unitAlias: unitAlias,
161
+ value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
162
+ unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
163
+ classes: {
164
+ numberAndUnit: _stylesModule.default.numberAndUnit
165
+ }
166
+ }) : textLabel
167
+ }), _defineProperty(_ref, FIELD_ENERGY_CONSUMPTION, {
168
+ id: FIELD_ENERGY_CONSUMPTION,
169
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
170
+ numberAlias: magnitudeAlias,
171
+ unitAlias: unitAlias,
172
+ value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value,
173
+ unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
174
+ classes: {
175
+ numberAndUnit: _stylesModule.default.numberAndUnit
176
+ }
177
+ }) : textLabel
178
+ }), _defineProperty(_ref, FIELD_POWER_CONSUMPTION, {
179
+ id: FIELD_POWER_CONSUMPTION,
180
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
181
+ numberAlias: magnitudeAlias,
182
+ unitAlias: unitAlias,
183
+ value: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).value,
184
+ unit: (0, _consumptions.getTotalConsumption)(data, _consumptions2.POWER_TYPES.REGISTERED).unit,
185
+ classes: {
186
+ numberAndUnit: _stylesModule.default.numberAndUnit
187
+ }
188
+ }) : textLabel
189
+ }), _defineProperty(_ref, FIELD_DAILY_CONSUMPTIONS, {
190
+ id: FIELD_DAILY_CONSUMPTIONS,
191
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
192
+ numberAlias: magnitudeAlias,
193
+ unitAlias: unitAlias,
194
+ value: (_getDailyConsumption$ = (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).value) === null || _getDailyConsumption$ === void 0 ? void 0 : _getDailyConsumption$.toFixed(1).toString().replace(/\./, ','),
195
+ unit: (0, _consumptions.getDailyConsumption)(data, _consumptions2.ENERGY_TYPES.ACTIVE).unit,
196
+ classes: {
197
+ numberAndUnit: _stylesModule.default.numberAndUnit
198
+ }
199
+ }) : /*#__PURE__*/_react.default.createElement(Label, {
200
+ alias: _aliases.DETAIL
201
+ }, text)
202
+ }), _defineProperty(_ref, FIELD_AVERAGE_TEMPERATURE, {
203
+ id: FIELD_AVERAGE_TEMPERATURE,
204
+ Component: data ? /*#__PURE__*/_react.default.createElement(_Magnitude.default, {
205
+ numberAlias: magnitudeAlias,
206
+ unitAlias: unitAlias,
207
+ value: Math.round(data.periodAverageTemperature || data.period),
208
+ unit: data.temperatureUnit,
209
+ classes: {
210
+ numberAndUnit: _stylesModule.default.numberAndUnit
211
+ }
212
+ }) : textLabel
213
+ }), _defineProperty(_ref, NO_DATA_FIELD, {
214
+ id: NO_DATA_FIELD,
215
+ Component: /*#__PURE__*/_react.default.createElement(Label, {
216
+ alias: textAlias
217
+ }, data)
218
+ }), _ref;
234
219
  };
235
220
 
236
221
  exports.getField = getField;
237
222
 
238
- const noPeriodData = (primary, noData, contextApiInfo) => getField({
239
- primary,
240
- data: noData
241
- }, contextApiInfo)[NO_DATA_FIELD];
223
+ var noPeriodData = function noPeriodData(primary, noData, contextApiInfo) {
224
+ return getField({
225
+ primary: primary,
226
+ data: noData
227
+ }, contextApiInfo)[NO_DATA_FIELD];
228
+ };
242
229
 
243
230
  exports.noPeriodData = noPeriodData;
@@ -25,24 +25,22 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
25
25
 
26
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
27
 
28
- const ComparisonTable = _ref => {
29
- let {
30
- contextApiInfo,
31
- billData,
32
- isDesktopSize
33
- } = _ref;
34
- const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
35
- const lastYearPeriod = (0, _periods.getLastYearPeriod)(billData);
36
- const {
37
- withPowerComparison
38
- } = contextApiInfo.config.validations;
39
- const currentPeriodAverageTemperature = (0, _seamlessImmutable.getIn)(billData, ['current_period_avg_temperature']);
40
- const lastYearPeriodAverageTemperature = (0, _seamlessImmutable.getIn)(billData, ['previous_period_avg_temperature']);
41
- const getTableLines = isDesktopSize ? _utils.desktopGetTableLines : _utils.mobileGetTableLines;
42
- const expand = !(!withPowerComparison || currentPeriodAverageTemperature || lastYearPeriodAverageTemperature);
28
+ var ComparisonTable = function ComparisonTable(_ref) {
29
+ var contextApiInfo = _ref.contextApiInfo,
30
+ billData = _ref.billData,
31
+ isDesktopSize = _ref.isDesktopSize;
32
+ var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
33
+ var lastYearPeriod = (0, _periods.getLastYearPeriod)(billData);
34
+ var withPowerComparison = contextApiInfo.config.validations.withPowerComparison;
35
+ var currentPeriodAverageTemperature = (0, _seamlessImmutable.getIn)(billData, ['current_period_avg_temperature']);
36
+ var lastYearPeriodAverageTemperature = (0, _seamlessImmutable.getIn)(billData, ['previous_period_avg_temperature']);
37
+ var getTableLines = isDesktopSize ? _utils.desktopGetTableLines : _utils.mobileGetTableLines;
38
+ var expand = !(!withPowerComparison || currentPeriodAverageTemperature || lastYearPeriodAverageTemperature);
43
39
  return /*#__PURE__*/_react.default.createElement("div", {
44
40
  className: "".concat(_stylesModule.default.container, " ").concat(expand && _stylesModule.default.expand)
45
- }, getTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktopSize, withPowerComparison(billData)).map(line => line.Component));
41
+ }, getTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktopSize, withPowerComparison(billData)).map(function (line) {
42
+ return line.Component;
43
+ }));
46
44
  };
47
45
 
48
46
  ComparisonTable.propTypes = {