@widergy/utilitygo-smart-bill-web 1.10.0 → 1.12.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 (141) 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 +47 -51
  38. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
  39. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
  40. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
  41. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
  42. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
  43. package/dist/components/ConsumptionIncluded/index.js +36 -34
  44. package/dist/components/ConsumptionIncluded/utils.js +33 -29
  45. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
  46. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
  47. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
  48. package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
  49. package/dist/components/ConsumptionPeriod/index.js +8 -12
  50. package/dist/components/ConsumptionPeriod/utils.js +15 -13
  51. package/dist/components/Date/index.js +9 -12
  52. package/dist/components/DebtState/index.js +8 -14
  53. package/dist/components/IconAndDetails/index.js +17 -19
  54. package/dist/components/Magnitude/index.js +12 -15
  55. package/dist/components/Magnitude/utils.js +8 -2
  56. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
  57. package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
  58. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
  59. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
  60. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
  61. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
  62. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
  63. package/dist/components/MainBillData/components/BillBody/index.js +50 -45
  64. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
  65. package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
  66. package/dist/components/MainBillData/index.js +5 -7
  67. package/dist/components/MainBillData/theme.js +9 -7
  68. package/dist/components/MainBillData/utils.js +5 -1
  69. package/dist/components/Period/index.js +47 -55
  70. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
  71. package/dist/components/PowerProgresBar/index.js +36 -36
  72. package/dist/components/RateAndCategory/index.js +31 -30
  73. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
  74. package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
  75. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
  76. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
  77. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +13 -19
  78. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -4
  79. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +13 -56
  80. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +50 -0
  81. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +34 -0
  82. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +65 -0
  83. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +88 -0
  84. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +6 -37
  85. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +51 -16
  86. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.module.scss +4 -1
  87. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +68 -23
  88. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +42 -0
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +45 -36
  90. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +16 -0
  91. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
  92. package/dist/components/RatesDefinition/index.js +15 -20
  93. package/dist/components/SmartBillProvider/index.js +47 -12
  94. package/dist/components/StyledAmount/constants.js +1 -1
  95. package/dist/components/StyledAmount/index.js +35 -19
  96. package/dist/components/WithContextApi/index.js +27 -16
  97. package/dist/components/WithContextApi/layout.js +2 -2
  98. package/dist/components/WithSeason/index.js +9 -5
  99. package/dist/constants/deviceSizes.js +17 -27
  100. package/dist/constants/seasons.js +2 -2
  101. package/dist/index.js +16 -14
  102. package/dist/shared/Context/index.js +3 -5
  103. package/dist/shared/constants/aliases.js +550 -683
  104. package/dist/shared/constants/components.js +2 -1
  105. package/dist/shared/constants/consumptions.js +4 -4
  106. package/dist/shared/constants/periodicities.js +1 -1
  107. package/dist/shared/constants/rates.js +1 -1
  108. package/dist/shared/constants/readings.js +2 -2
  109. package/dist/shared/constants/seasons.js +2 -2
  110. package/dist/shared/constants/stagesGraph.js +4 -4
  111. package/dist/shared/types/assetsTypes.js +1 -1
  112. package/dist/shared/types/billDataTypes.js +4 -4
  113. package/dist/shared/types/componentsTypes.js +13 -18
  114. package/dist/shared/types/formattersTypes.js +1 -1
  115. package/dist/shared/types/rateStagesTypes.js +4 -4
  116. package/dist/shared/types/smartBillTypes.js +10 -5
  117. package/dist/shared/types/textsTypes.js +1 -1
  118. package/dist/shared/utils/billCalculation.js +9 -9
  119. package/dist/shared/utils/consumptions.js +62 -28
  120. package/dist/shared/utils/context.js +8 -7
  121. package/dist/shared/utils/expirations.js +5 -1
  122. package/dist/shared/utils/periods.js +20 -14
  123. package/dist/shared/utils/rates.js +5 -1
  124. package/dist/shared/utils/readings.js +10 -2
  125. package/dist/shared/utils/season.js +5 -1
  126. package/dist/shared/utils/stagesGraph.js +15 -11
  127. package/dist/utils/hooks.js +5 -37
  128. package/dist/utils.js +8 -4
  129. package/package.json +2 -2
  130. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
  131. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +0 -21
  132. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/styles.module.scss +0 -15
  133. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +0 -69
  134. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/styles.module.scss +0 -5
  135. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +0 -12
  136. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +0 -68
  137. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/styles.module.scss +0 -32
  138. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +0 -59
  139. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/styles.module.scss +0 -3
  140. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +0 -83
  141. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/styles.module.scss +0 -57
@@ -15,46 +15,39 @@ var _constants = require("./constants");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
18
- const getPeriodFields = function (contextApiInfo, period, periodAverageTemperature, withPowerComparison, isDesktop) {
18
+ var getPeriodFields = function getPeriodFields(contextApiInfo, period, periodAverageTemperature, withPowerComparison, isDesktop) {
19
19
  var _period$lastYearPerio, _period$lastYearPerio2, _period$lastYearPerio3, _period$lastYearPerio4, _period$currentPeriod, _period$currentPeriod2, _period$currentPeriod3, _period$currentPeriod4;
20
20
 
21
- let stylingOptions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
22
- let options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
23
- const {
24
- config,
25
- Label
26
- } = contextApiInfo;
27
- const {
28
- daysUnit,
29
- temperatureUnit,
30
- periodDates,
31
- settlementDays,
32
- energyConsumption,
33
- powerConsumption,
34
- totalConsumption,
35
- dailyConsumption,
36
- averageTemperature,
37
- yearOrPeriodMobile
38
- } = config.texts.consumptionComparison;
39
- const {
40
- noData
41
- } = config.texts.commons;
42
- const {
43
- primary,
44
- gray,
45
- semibold
46
- } = stylingOptions;
47
- const formattedPeriod = period.number && period.year && "".concat(period.number, "/").concat(period.year);
48
- const mobileLastYearPeriodFormatted = ((_period$lastYearPerio = period.lastYearPeriod) === null || _period$lastYearPerio === void 0 ? void 0 : _period$lastYearPerio.number) && ((_period$lastYearPerio2 = period.lastYearPeriod) === null || _period$lastYearPerio2 === void 0 ? void 0 : _period$lastYearPerio2.year) && "".concat((_period$lastYearPerio3 = period.lastYearPeriod) === null || _period$lastYearPerio3 === void 0 ? void 0 : _period$lastYearPerio3.number, "/").concat((_period$lastYearPerio4 = period.lastYearPeriod) === null || _period$lastYearPerio4 === void 0 ? void 0 : _period$lastYearPerio4.year);
49
- const mobileCurrentYearPeriodFormatted = ((_period$currentPeriod = period.currentPeriod) === null || _period$currentPeriod === void 0 ? void 0 : _period$currentPeriod.number) && ((_period$currentPeriod2 = period.currentPeriod) === null || _period$currentPeriod2 === void 0 ? void 0 : _period$currentPeriod2.year) && "".concat((_period$currentPeriod3 = period.currentPeriod) === null || _period$currentPeriod3 === void 0 ? void 0 : _period$currentPeriod3.number, "/").concat((_period$currentPeriod4 = period.currentPeriod) === null || _period$currentPeriod4 === void 0 ? void 0 : _period$currentPeriod4.year);
21
+ var stylingOptions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
22
+ var options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
23
+ var config = contextApiInfo.config,
24
+ Label = contextApiInfo.Label;
25
+ var _config$texts$consump = config.texts.consumptionComparison,
26
+ daysUnit = _config$texts$consump.daysUnit,
27
+ temperatureUnit = _config$texts$consump.temperatureUnit,
28
+ periodDates = _config$texts$consump.periodDates,
29
+ settlementDays = _config$texts$consump.settlementDays,
30
+ energyConsumption = _config$texts$consump.energyConsumption,
31
+ powerConsumption = _config$texts$consump.powerConsumption,
32
+ totalConsumption = _config$texts$consump.totalConsumption,
33
+ dailyConsumption = _config$texts$consump.dailyConsumption,
34
+ averageTemperature = _config$texts$consump.averageTemperature,
35
+ yearOrPeriodMobile = _config$texts$consump.yearOrPeriodMobile;
36
+ var noData = config.texts.commons.noData;
37
+ var primary = stylingOptions.primary,
38
+ gray = stylingOptions.gray,
39
+ semibold = stylingOptions.semibold;
40
+ var formattedPeriod = period.number && period.year && "".concat(period.number, "/").concat(period.year);
41
+ var mobileLastYearPeriodFormatted = ((_period$lastYearPerio = period.lastYearPeriod) === null || _period$lastYearPerio === void 0 ? void 0 : _period$lastYearPerio.number) && ((_period$lastYearPerio2 = period.lastYearPeriod) === null || _period$lastYearPerio2 === void 0 ? void 0 : _period$lastYearPerio2.year) && "".concat((_period$lastYearPerio3 = period.lastYearPeriod) === null || _period$lastYearPerio3 === void 0 ? void 0 : _period$lastYearPerio3.number, "/").concat((_period$lastYearPerio4 = period.lastYearPeriod) === null || _period$lastYearPerio4 === void 0 ? void 0 : _period$lastYearPerio4.year);
42
+ var mobileCurrentYearPeriodFormatted = ((_period$currentPeriod = period.currentPeriod) === null || _period$currentPeriod === void 0 ? void 0 : _period$currentPeriod.number) && ((_period$currentPeriod2 = period.currentPeriod) === null || _period$currentPeriod2 === void 0 ? void 0 : _period$currentPeriod2.year) && "".concat((_period$currentPeriod3 = period.currentPeriod) === null || _period$currentPeriod3 === void 0 ? void 0 : _period$currentPeriod3.number, "/").concat((_period$currentPeriod4 = period.currentPeriod) === null || _period$currentPeriod4 === void 0 ? void 0 : _period$currentPeriod4.year);
50
43
  if (isDesktop && Object.keys(period).length === 0) return [{
51
44
  id: 'no_data_cell',
52
45
  Component: /*#__PURE__*/_react.default.createElement(Label, {
53
46
  alias: _aliases.GET_PERIOD_FIELDS_NO_DATA
54
47
  }, noData)
55
48
  }];
56
- let noDataLastYearPeriod = false;
57
- let noDataCurrentPeriod = false;
49
+ var noDataLastYearPeriod = false;
50
+ var noDataCurrentPeriod = false;
58
51
 
59
52
  if (!isDesktop && Object.keys(period === null || period === void 0 ? void 0 : period.lastYearPeriod).length === 0) {
60
53
  noDataLastYearPeriod = true;
@@ -64,71 +57,81 @@ const getPeriodFields = function (contextApiInfo, period, periodAverageTemperatu
64
57
  noDataCurrentPeriod = true;
65
58
  }
66
59
 
67
- const mobileNoPeriodData = (0, _constants.noPeriodData)(primary, noData, contextApiInfo);
68
-
69
- const desktopFields = (data, fieldId) => (0, _constants.getField)({
70
- primary,
71
- gray,
72
- semibold,
73
- isDesktop,
74
- data
75
- }, contextApiInfo)[fieldId];
76
-
77
- const mobileFieldsLastYear = (data, fieldId) => !noDataLastYearPeriod ? (0, _constants.getField)({
78
- data
79
- }, contextApiInfo)[fieldId] : mobileNoPeriodData;
80
-
81
- const mobileTextField = (text, fieldId) => (0, _constants.getField)({
82
- gray,
83
- text,
84
- isHeader: true
85
- }, contextApiInfo)[fieldId];
86
-
87
- const mobileFieldCurrentYear = (data, fieldId) => !noDataCurrentPeriod ? (0, _constants.getField)({
88
- primary,
89
- semibold,
90
- data
91
- }, contextApiInfo)[fieldId] : mobileNoPeriodData;
92
-
93
- const {
94
- lastYearPeriodAverageTemperature,
95
- currentPeriodAverageTemperature
96
- } = periodAverageTemperature || {};
60
+ var mobileNoPeriodData = (0, _constants.noPeriodData)(primary, noData, contextApiInfo);
61
+
62
+ var desktopFields = function desktopFields(data, fieldId) {
63
+ return (0, _constants.getField)({
64
+ primary: primary,
65
+ gray: gray,
66
+ semibold: semibold,
67
+ isDesktop: isDesktop,
68
+ data: data
69
+ }, contextApiInfo)[fieldId];
70
+ };
71
+
72
+ var mobileFieldsLastYear = function mobileFieldsLastYear(data, fieldId) {
73
+ return !noDataLastYearPeriod ? (0, _constants.getField)({
74
+ data: data
75
+ }, contextApiInfo)[fieldId] : mobileNoPeriodData;
76
+ };
77
+
78
+ var mobileTextField = function mobileTextField(text, fieldId) {
79
+ return (0, _constants.getField)({
80
+ gray: gray,
81
+ text: text,
82
+ isHeader: true
83
+ }, contextApiInfo)[fieldId];
84
+ };
85
+
86
+ var mobileFieldCurrentYear = function mobileFieldCurrentYear(data, fieldId) {
87
+ return !noDataCurrentPeriod ? (0, _constants.getField)({
88
+ primary: primary,
89
+ semibold: semibold,
90
+ data: data
91
+ }, contextApiInfo)[fieldId] : mobileNoPeriodData;
92
+ };
93
+
94
+ var _ref = periodAverageTemperature || {},
95
+ lastYearPeriodAverageTemperature = _ref.lastYearPeriodAverageTemperature,
96
+ currentPeriodAverageTemperature = _ref.currentPeriodAverageTemperature;
97
+
97
98
  return isDesktop ? [desktopFields(formattedPeriod, _constants.FIELD_PERIOD_COMPARISION), desktopFields(period, _constants.FIELD_PERIOD_DATES), desktopFields({
98
- period,
99
- daysUnit
99
+ period: period,
100
+ daysUnit: daysUnit
100
101
  }, _constants.FIELD_SETTLEMENTS_DAYS), withPowerComparison && desktopFields(period, _constants.FIELD_TOTAL_CONSUMPTIONS), !withPowerComparison && desktopFields(period, _constants.FIELD_ENERGY_CONSUMPTION), !withPowerComparison && desktopFields(period, _constants.FIELD_POWER_CONSUMPTION), desktopFields(period, _constants.FIELD_DAILY_CONSUMPTIONS), periodAverageTemperature && desktopFields({
101
- periodAverageTemperature,
102
- temperatureUnit
102
+ periodAverageTemperature: periodAverageTemperature,
103
+ temperatureUnit: temperatureUnit
103
104
  }, _constants.FIELD_AVERAGE_TEMPERATURE)] : options === 'period_comparison' ? [mobileFieldsLastYear(mobileLastYearPeriodFormatted, _constants.FIELD_PERIOD_COMPARISION), mobileTextField(yearOrPeriodMobile, _constants.FIELD_PERIOD_COMPARISION), mobileFieldCurrentYear(mobileCurrentYearPeriodFormatted, _constants.FIELD_PERIOD_COMPARISION)] : options === 'period_dates' ? [mobileFieldsLastYear(period.lastYearPeriod, _constants.FIELD_PERIOD_DATES), mobileTextField(periodDates, _constants.FIELD_PERIOD_DATES), mobileFieldCurrentYear(period.currentPeriod, _constants.FIELD_PERIOD_DATES)] : options === 'settlements_days' ? [mobileFieldsLastYear({
104
105
  period: period.lastYearPeriod,
105
- daysUnit
106
+ daysUnit: daysUnit
106
107
  }, _constants.FIELD_SETTLEMENTS_DAYS), mobileTextField(settlementDays, _constants.FIELD_SETTLEMENTS_DAYS), mobileFieldCurrentYear({
107
108
  period: period.currentPeriod,
108
- daysUnit
109
+ daysUnit: daysUnit
109
110
  }, _constants.FIELD_SETTLEMENTS_DAYS)] : withPowerComparison && options === 'total_consumptions' ? [mobileFieldsLastYear(period.lastYearPeriod, _constants.FIELD_TOTAL_CONSUMPTIONS), mobileTextField(totalConsumption, _constants.FIELD_TOTAL_CONSUMPTIONS), mobileFieldCurrentYear(period.currentPeriod, _constants.FIELD_TOTAL_CONSUMPTIONS)] : !withPowerComparison && options === 'energy_consumption' ? [mobileFieldsLastYear(period.lastYearPeriod, _constants.FIELD_ENERGY_CONSUMPTION), mobileTextField(energyConsumption, _constants.FIELD_ENERGY_CONSUMPTION), mobileFieldCurrentYear(period.currentPeriod, _constants.FIELD_ENERGY_CONSUMPTION)] : !withPowerComparison && options === 'power_consumption' ? [mobileFieldsLastYear(period.lastYearPeriod, _constants.FIELD_POWER_CONSUMPTION), mobileTextField(powerConsumption, _constants.FIELD_POWER_CONSUMPTION), mobileFieldCurrentYear(period.currentPeriod, _constants.FIELD_POWER_CONSUMPTION)] : options === 'daily_consumptions' ? [mobileFieldsLastYear(period.lastYearPeriod, _constants.FIELD_DAILY_CONSUMPTIONS), mobileTextField(dailyConsumption, _constants.FIELD_DAILY_CONSUMPTIONS), mobileFieldCurrentYear(period.currentPeriod, _constants.FIELD_DAILY_CONSUMPTIONS)] : options === 'average_temperature' && (lastYearPeriodAverageTemperature || currentPeriodAverageTemperature) ? [mobileFieldsLastYear({
110
111
  period: lastYearPeriodAverageTemperature,
111
- temperatureUnit
112
+ temperatureUnit: temperatureUnit
112
113
  }, _constants.FIELD_AVERAGE_TEMPERATURE), mobileTextField(averageTemperature, _constants.FIELD_AVERAGE_TEMPERATURE), mobileFieldCurrentYear({
113
114
  period: currentPeriodAverageTemperature,
114
- temperatureUnit
115
+ temperatureUnit: temperatureUnit
115
116
  }, _constants.FIELD_AVERAGE_TEMPERATURE)] : {};
116
117
  };
117
118
 
118
119
  exports.getPeriodFields = getPeriodFields;
119
120
 
120
- const renderDataLine = (contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data) => /*#__PURE__*/_react.default.createElement(_DataLine.default, {
121
- key: "",
122
- fields: getPeriodFields(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, {
123
- primary: true,
124
- gray: true,
125
- semibold: true
126
- }, data),
127
- isDesktop: isDesktop
128
- });
121
+ var renderDataLine = function renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data) {
122
+ return /*#__PURE__*/_react.default.createElement(_DataLine.default, {
123
+ key: "",
124
+ fields: getPeriodFields(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, {
125
+ primary: true,
126
+ gray: true,
127
+ semibold: true
128
+ }, data),
129
+ isDesktop: isDesktop
130
+ });
131
+ };
129
132
 
130
- const desktopGetTableLines = (contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) => {
131
- const showTemp = currentPeriodAverageTemperature && lastYearPeriodAverageTemperature;
133
+ var desktopGetTableLines = function desktopGetTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) {
134
+ var showTemp = currentPeriodAverageTemperature && lastYearPeriodAverageTemperature;
132
135
  return [{
133
136
  Component: /*#__PURE__*/_react.default.createElement(_DataLine.default, {
134
137
  key: "header",
@@ -159,17 +162,19 @@ const desktopGetTableLines = (contextApiInfo, currentPeriod, currentPeriodAverag
159
162
 
160
163
  exports.desktopGetTableLines = desktopGetTableLines;
161
164
 
162
- const mobileGetTableLines = (contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) => {
163
- const mobilePeriod = {
164
- currentPeriod,
165
- lastYearPeriod
165
+ var mobileGetTableLines = function mobileGetTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) {
166
+ var mobilePeriod = {
167
+ currentPeriod: currentPeriod,
168
+ lastYearPeriod: lastYearPeriod
166
169
  };
167
- const mobilePeriodAverageTemperature = {
168
- currentPeriodAverageTemperature,
169
- lastYearPeriodAverageTemperature
170
+ var mobilePeriodAverageTemperature = {
171
+ currentPeriodAverageTemperature: currentPeriodAverageTemperature,
172
+ lastYearPeriodAverageTemperature: lastYearPeriodAverageTemperature
170
173
  };
171
174
  return [{
172
- Component: /*#__PURE__*/_react.default.createElement("div", null, _constants.dataFieldDictonary.map(data => renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data)))
175
+ Component: /*#__PURE__*/_react.default.createElement("div", null, _constants.dataFieldDictonary.map(function (data) {
176
+ return renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data);
177
+ }))
173
178
  }];
174
179
  };
175
180
 
@@ -17,27 +17,17 @@ 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 ConsumptionAdvice = _ref => {
21
- let {
22
- contextApiInfo
23
- } = _ref;
24
- const {
25
- config,
26
- assets,
27
- Label,
28
- Button,
29
- ExternalLink
30
- } = contextApiInfo;
31
- const {
32
- texts,
33
- stylesConfig
34
- } = config;
35
- const {
36
- consumptionSimulator
37
- } = config.externalLinks;
38
- const {
39
- LightBulbIcon
40
- } = assets;
20
+ var ConsumptionAdvice = function ConsumptionAdvice(_ref) {
21
+ var contextApiInfo = _ref.contextApiInfo;
22
+ var config = contextApiInfo.config,
23
+ assets = contextApiInfo.assets,
24
+ Label = contextApiInfo.Label,
25
+ Button = contextApiInfo.Button,
26
+ ExternalLink = contextApiInfo.ExternalLink;
27
+ var texts = config.texts,
28
+ stylesConfig = config.stylesConfig;
29
+ var consumptionSimulator = config.externalLinks.consumptionSimulator;
30
+ var LightBulbIcon = assets.LightBulbIcon;
41
31
  return /*#__PURE__*/_react.default.createElement("div", {
42
32
  className: "".concat(_stylesModule.default.container, " ").concat(stylesConfig === null || stylesConfig === void 0 ? void 0 : stylesConfig.adviceContainer)
43
33
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -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) => {
10
+ var getSeasonProps = function getSeasonProps(season, texts) {
11
11
  switch (season) {
12
12
  case _seasons.SEASONS.AUTUMN:
13
13
  return {
@@ -21,27 +21,22 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- const PercentageComparison = _ref => {
25
- let {
26
- contextApiInfo,
27
- savingsPercentage,
28
- multipleSettlements
29
- } = _ref;
30
- const {
31
- assets,
32
- config,
33
- Label
34
- } = contextApiInfo;
35
- const {
36
- texts
37
- } = config;
38
- const {
39
- Icon,
40
- sign,
41
- value,
42
- background,
43
- text
44
- } = (0, _utils.getProps)(savingsPercentage, assets, texts, multipleSettlements);
24
+ var PercentageComparison = function PercentageComparison(_ref) {
25
+ var contextApiInfo = _ref.contextApiInfo,
26
+ savingsPercentage = _ref.savingsPercentage,
27
+ multipleSettlements = _ref.multipleSettlements;
28
+ var assets = contextApiInfo.assets,
29
+ config = contextApiInfo.config,
30
+ Label = contextApiInfo.Label;
31
+ var texts = config.texts;
32
+
33
+ var _getProps = (0, _utils.getProps)(savingsPercentage, assets, texts, multipleSettlements),
34
+ Icon = _getProps.Icon,
35
+ sign = _getProps.sign,
36
+ value = _getProps.value,
37
+ background = _getProps.background,
38
+ text = _getProps.text;
39
+
45
40
  return /*#__PURE__*/_react.default.createElement("div", {
46
41
  className: "".concat(_stylesModule.default.container, " ").concat(background)
47
42
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -9,19 +9,15 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
- const getProps = (savingsPercentage, assets, texts, multipleSettlements) => {
13
- const {
14
- consumptionComparison
15
- } = texts;
16
- const {
17
- lastYearBimesterPercentageComparisonDescended,
18
- lastYearPercentageComparisonDescended,
19
- lastYearBimesterPercentageComparisonRise,
20
- lastYearPercentageComparisonRise,
21
- lastYearPercentageStatic
22
- } = consumptionComparison;
23
- const reductionText = multipleSettlements ? lastYearBimesterPercentageComparisonDescended : lastYearPercentageComparisonDescended;
24
- const incrementText = multipleSettlements ? lastYearBimesterPercentageComparisonRise : lastYearPercentageComparisonRise;
12
+ var getProps = function getProps(savingsPercentage, assets, texts, multipleSettlements) {
13
+ var consumptionComparison = texts.consumptionComparison;
14
+ var lastYearBimesterPercentageComparisonDescended = consumptionComparison.lastYearBimesterPercentageComparisonDescended,
15
+ lastYearPercentageComparisonDescended = consumptionComparison.lastYearPercentageComparisonDescended,
16
+ lastYearBimesterPercentageComparisonRise = consumptionComparison.lastYearBimesterPercentageComparisonRise,
17
+ lastYearPercentageComparisonRise = consumptionComparison.lastYearPercentageComparisonRise,
18
+ lastYearPercentageStatic = consumptionComparison.lastYearPercentageStatic;
19
+ var reductionText = multipleSettlements ? lastYearBimesterPercentageComparisonDescended : lastYearPercentageComparisonDescended;
20
+ var incrementText = multipleSettlements ? lastYearBimesterPercentageComparisonRise : lastYearPercentageComparisonRise;
25
21
 
26
22
  if (savingsPercentage > 0) {
27
23
  return {
@@ -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
  });
@@ -37,55 +39,67 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
37
39
 
38
40
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
39
41
 
40
- 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); }
42
+ 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); }
43
+
44
+ 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; }
45
+
46
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
47
+
48
+ 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."); }
49
+
50
+ 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); }
51
+
52
+ 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; }
53
+
54
+ 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; }
41
55
 
42
- 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; }
56
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
57
 
44
- const ConsumptionComparison = _ref => {
58
+ var ConsumptionComparison = function ConsumptionComparison(_ref) {
45
59
  var _currentPeriod$settle;
46
60
 
47
- let {
48
- billData,
49
- contextApiInfo
50
- } = _ref;
51
- const {
52
- Label,
53
- config,
54
- assets
55
- } = contextApiInfo;
56
- const {
57
- consumptionSimulatorFromBanner
58
- } = config.externalLinks;
59
- const {
60
- texts
61
- } = config;
62
- const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
63
- const {
64
- SimulatorBannerIcon,
65
- SimulatorBannerResponsiveIcon
66
- } = assets;
67
- const withBanner = SimulatorBannerIcon && SimulatorBannerResponsiveIcon;
68
- const [isDesktopSize, setIsDesktopSize] = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
69
-
70
- const handleResizeScreen = () => setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
71
-
72
- (0, _react.useEffect)(() => {
61
+ var billData = _ref.billData,
62
+ contextApiInfo = _ref.contextApiInfo;
63
+ var Label = contextApiInfo.Label,
64
+ config = contextApiInfo.config,
65
+ assets = contextApiInfo.assets;
66
+ var consumptionSimulatorFromBanner = config.externalLinks.consumptionSimulatorFromBanner;
67
+ var texts = config.texts;
68
+ var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
69
+ var SimulatorBannerIcon = assets.SimulatorBannerIcon,
70
+ SimulatorBannerResponsiveIcon = assets.SimulatorBannerResponsiveIcon;
71
+ var withBanner = SimulatorBannerIcon && SimulatorBannerResponsiveIcon;
72
+
73
+ var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
74
+ _useState2 = _slicedToArray(_useState, 2),
75
+ isDesktopSize = _useState2[0],
76
+ setIsDesktopSize = _useState2[1];
77
+
78
+ var handleResizeScreen = function handleResizeScreen() {
79
+ return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
80
+ };
81
+
82
+ (0, _react.useEffect)(function () {
73
83
  window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
74
84
  handleResizeScreen();
75
- return () => window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
85
+ return function () {
86
+ return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
87
+ };
76
88
  }, []);
77
- const savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
78
- const showTemp = billData.previous_period_avg_temperature && billData.current_period_avg_temperature;
79
- 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;
80
-
81
- const ComparisonTableRender = () => /*#__PURE__*/_react.default.createElement(_ComparisonTable.default, {
82
- billData: billData,
83
- multipleSettlements: multipleSettlements,
84
- isDesktopSize: isDesktopSize
85
- });
86
-
87
- const scrollbarRef = (0, _react.useRef)();
88
- (0, _react.useEffect)(() => {
89
+ var savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
90
+ var showTemp = billData.previous_period_avg_temperature && billData.current_period_avg_temperature;
91
+ 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;
92
+
93
+ var ComparisonTableRender = function ComparisonTableRender() {
94
+ return /*#__PURE__*/_react.default.createElement(_ComparisonTable.default, {
95
+ billData: billData,
96
+ multipleSettlements: multipleSettlements,
97
+ isDesktopSize: isDesktopSize
98
+ });
99
+ };
100
+
101
+ var scrollbarRef = (0, _react.useRef)();
102
+ (0, _react.useEffect)(function () {
89
103
  if (scrollbarRef.current) scrollbarRef.current.updateScroll();
90
104
  }, [scrollbarRef]);
91
105
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -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
  });
@@ -31,35 +33,29 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
31
33
 
32
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
33
35
 
34
- 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); }
35
-
36
- 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; }
37
-
38
- const ConsumptionEnergyComparison = _ref => {
39
- let {
40
- contextApiInfo,
41
- multipleSettlements,
42
- withPercentage,
43
- dataValidation,
44
- currentConsumption,
45
- remainingConsumption,
46
- totalConsumption,
47
- settlements,
48
- periodicity,
49
- periodNumber,
50
- year,
51
- savingsPercentage,
52
- currentIsFirstSettlement
53
- } = _ref;
54
- const {
55
- config,
56
- Label
57
- } = contextApiInfo;
58
- const {
59
- texts
60
- } = config;
61
-
62
- const CurrentSettlement = () => {
36
+ 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); }
37
+
38
+ 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; }
39
+
40
+ var ConsumptionEnergyComparison = function ConsumptionEnergyComparison(_ref) {
41
+ var contextApiInfo = _ref.contextApiInfo,
42
+ multipleSettlements = _ref.multipleSettlements,
43
+ withPercentage = _ref.withPercentage,
44
+ dataValidation = _ref.dataValidation,
45
+ currentConsumption = _ref.currentConsumption,
46
+ remainingConsumption = _ref.remainingConsumption,
47
+ totalConsumption = _ref.totalConsumption,
48
+ settlements = _ref.settlements,
49
+ periodicity = _ref.periodicity,
50
+ periodNumber = _ref.periodNumber,
51
+ year = _ref.year,
52
+ savingsPercentage = _ref.savingsPercentage,
53
+ currentIsFirstSettlement = _ref.currentIsFirstSettlement;
54
+ var config = contextApiInfo.config,
55
+ Label = contextApiInfo.Label;
56
+ var texts = config.texts;
57
+
58
+ var CurrentSettlement = function CurrentSettlement() {
63
59
  var _settlements$current;
64
60
 
65
61
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -79,7 +75,7 @@ const ConsumptionEnergyComparison = _ref => {
79
75
  }, texts.mainBillData.currentConsumption));
80
76
  };
81
77
 
82
- const RemainingSettlement = () => {
78
+ var RemainingSettlement = function RemainingSettlement() {
83
79
  var _settlements$remainin;
84
80
 
85
81
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -19,24 +19,19 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const ConsumptionInDaysLabel = _ref => {
23
- let {
24
- contextApiInfo,
25
- consumption,
26
- unit,
27
- totalDays,
28
- classes = {},
29
- numberAlias,
30
- unitAlias,
31
- daysAlias
32
- } = _ref;
33
- const {
34
- config,
35
- Label
36
- } = contextApiInfo;
37
- const {
38
- texts
39
- } = config;
22
+ var ConsumptionInDaysLabel = function ConsumptionInDaysLabel(_ref) {
23
+ var contextApiInfo = _ref.contextApiInfo,
24
+ consumption = _ref.consumption,
25
+ unit = _ref.unit,
26
+ totalDays = _ref.totalDays,
27
+ _ref$classes = _ref.classes,
28
+ classes = _ref$classes === void 0 ? {} : _ref$classes,
29
+ numberAlias = _ref.numberAlias,
30
+ unitAlias = _ref.unitAlias,
31
+ daysAlias = _ref.daysAlias;
32
+ var config = contextApiInfo.config,
33
+ Label = contextApiInfo.Label;
34
+ var texts = config.texts;
40
35
  return /*#__PURE__*/_react.default.createElement("div", {
41
36
  className: "".concat(classes.container)
42
37
  }, /*#__PURE__*/_react.default.createElement("div", {