@widergy/utilitygo-smart-bill-web 2.2.1 → 3.0.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 (136) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/Advice/index.js +11 -8
  3. package/dist/components/Amount/index.js +27 -23
  4. package/dist/components/Amount/utils.js +1 -5
  5. package/dist/components/Banner/index.js +11 -8
  6. package/dist/components/BarChart/constants.js +3 -6
  7. package/dist/components/BarChart/index.js +29 -24
  8. package/dist/components/BarChart/utils.js +15 -15
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +53 -47
  10. package/dist/components/BillCalculation/components/Glossary/index.js +49 -66
  11. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
  12. package/dist/components/BillCalculation/constants.js +1 -2
  13. package/dist/components/BillCalculation/index.js +49 -53
  14. package/dist/components/BillCalculation/utils.js +19 -22
  15. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +26 -24
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +2 -3
  17. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +16 -17
  18. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
  19. package/dist/components/BillSummary/components/BilledConcepts/constants.js +12 -17
  20. package/dist/components/BillSummary/components/BilledConcepts/index.js +30 -41
  21. package/dist/components/BillSummary/components/BilledConcepts/utils.js +44 -68
  22. package/dist/components/BillSummary/index.js +71 -71
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +9 -10
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +18 -12
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +144 -143
  27. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +17 -16
  28. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +84 -88
  29. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +22 -13
  30. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
  31. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +22 -16
  32. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +13 -9
  33. package/dist/components/ConsumptionComparison/index.js +42 -47
  34. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +28 -24
  35. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
  36. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +19 -15
  37. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +16 -14
  38. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +22 -17
  39. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
  40. package/dist/components/ConsumptionEnergyDetails/index.js +47 -43
  41. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
  42. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -62
  43. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +11 -13
  44. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +21 -19
  45. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +17 -12
  46. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +43 -39
  47. package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
  48. package/dist/components/ConsumptionIncluded/index.js +32 -34
  49. package/dist/components/ConsumptionIncluded/utils.js +29 -33
  50. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +15 -12
  51. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +24 -22
  52. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +19 -28
  53. package/dist/components/ConsumptionPeriod/components/Reading/index.js +36 -34
  54. package/dist/components/ConsumptionPeriod/index.js +13 -10
  55. package/dist/components/ConsumptionPeriod/utils.js +13 -15
  56. package/dist/components/Date/index.js +13 -11
  57. package/dist/components/DebtState/index.js +15 -10
  58. package/dist/components/IconAndDetails/index.js +20 -19
  59. package/dist/components/Magnitude/index.js +16 -14
  60. package/dist/components/Magnitude/utils.js +2 -8
  61. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +19 -16
  62. package/dist/components/MainBillData/components/BillAlert/index.js +25 -33
  63. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +20 -13
  64. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +15 -13
  65. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +1 -3
  66. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +24 -17
  67. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +2 -2
  68. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
  69. package/dist/components/MainBillData/components/BillBody/index.js +43 -46
  70. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +17 -13
  71. package/dist/components/MainBillData/components/BillHeader/index.js +30 -26
  72. package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
  73. package/dist/components/MainBillData/index.js +8 -7
  74. package/dist/components/MainBillData/theme.js +7 -9
  75. package/dist/components/MainBillData/utils.js +1 -5
  76. package/dist/components/Period/index.js +55 -45
  77. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +16 -13
  78. package/dist/components/PowerProgresBar/index.js +32 -32
  79. package/dist/components/RateAndCategory/index.js +26 -29
  80. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +21 -15
  81. package/dist/components/RatesDefinition/components/BillRate/index.js +25 -16
  82. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
  83. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +15 -11
  84. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +27 -23
  85. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -9
  86. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
  87. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +9 -9
  88. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +22 -21
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +35 -38
  90. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -1
  91. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -4
  92. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +18 -32
  93. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +35 -47
  94. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -36
  95. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +24 -33
  96. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +1 -5
  97. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +20 -15
  98. package/dist/components/RatesDefinition/index.js +21 -17
  99. package/dist/components/RatesDefinition/styles.module.scss +1 -1
  100. package/dist/components/SmartBillProvider/index.js +13 -36
  101. package/dist/components/StyledAmount/constants.js +2 -3
  102. package/dist/components/StyledAmount/index.js +20 -29
  103. package/dist/components/WithContextApi/index.js +19 -27
  104. package/dist/components/WithContextApi/layout.js +3 -4
  105. package/dist/components/WithSeason/index.js +7 -11
  106. package/dist/constants/deviceSizes.js +27 -24
  107. package/dist/constants/seasons.js +3 -5
  108. package/dist/index.js +19 -19
  109. package/dist/scss/variables/commonColors.module.scss +1 -1
  110. package/dist/shared/Context/index.js +5 -3
  111. package/dist/shared/constants/aliases.js +691 -694
  112. package/dist/shared/constants/consumptions.js +5 -9
  113. package/dist/shared/constants/periodicities.js +2 -3
  114. package/dist/shared/constants/rates.js +2 -3
  115. package/dist/shared/constants/readings.js +3 -5
  116. package/dist/shared/constants/seasons.js +3 -5
  117. package/dist/shared/constants/stagesGraph.js +4 -8
  118. package/dist/shared/types/assetsTypes.js +1 -2
  119. package/dist/shared/types/billDataTypes.js +6 -11
  120. package/dist/shared/types/componentsTypes.js +19 -14
  121. package/dist/shared/types/formattersTypes.js +2 -3
  122. package/dist/shared/types/rateStagesTypes.js +3 -6
  123. package/dist/shared/types/smartBillTypes.js +5 -11
  124. package/dist/shared/types/textsTypes.js +2 -3
  125. package/dist/shared/utils/billCalculation.js +9 -9
  126. package/dist/shared/utils/consumptions.js +27 -55
  127. package/dist/shared/utils/context.js +6 -5
  128. package/dist/shared/utils/expirations.js +1 -5
  129. package/dist/shared/utils/periods.js +14 -20
  130. package/dist/shared/utils/rates.js +1 -5
  131. package/dist/shared/utils/readings.js +2 -10
  132. package/dist/shared/utils/season.js +1 -5
  133. package/dist/shared/utils/stagesGraph.js +11 -15
  134. package/dist/utils/hooks.js +2 -3
  135. package/dist/utils.js +4 -8
  136. package/package.json +26 -63
@@ -9,110 +9,108 @@ var _aliases = require("../../../../shared/constants/aliases");
9
9
  var _DataLine = _interopRequireDefault(require("./components/DataLine"));
10
10
  var _constants = require("./constants");
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
- var getPeriodFields = function getPeriodFields(contextApiInfo, period, periodAverageTemperature, withPowerComparison, isDesktop) {
12
+ const getPeriodFields = function (contextApiInfo, period, periodAverageTemperature, withPowerComparison, isDesktop) {
13
13
  var _period$lastYearPerio, _period$lastYearPerio2, _period$lastYearPerio3, _period$lastYearPerio4, _period$currentPeriod, _period$currentPeriod2, _period$currentPeriod3, _period$currentPeriod4;
14
- var stylingOptions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
15
- var options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
16
- var config = contextApiInfo.config,
17
- Label = contextApiInfo.Label;
18
- var _config$texts$consump = config.texts.consumptionComparison,
19
- daysUnit = _config$texts$consump.daysUnit,
20
- temperatureUnit = _config$texts$consump.temperatureUnit,
21
- periodDates = _config$texts$consump.periodDates,
22
- settlementDays = _config$texts$consump.settlementDays,
23
- energyConsumption = _config$texts$consump.energyConsumption,
24
- powerConsumption = _config$texts$consump.powerConsumption,
25
- totalConsumption = _config$texts$consump.totalConsumption,
26
- dailyConsumption = _config$texts$consump.dailyConsumption,
27
- averageTemperature = _config$texts$consump.averageTemperature,
28
- yearOrPeriodMobile = _config$texts$consump.yearOrPeriodMobile;
29
- var noData = config.texts.commons.noData;
30
- var primary = stylingOptions.primary,
31
- gray = stylingOptions.gray,
32
- semibold = stylingOptions.semibold;
33
- var formattedPeriod = period.number && period.year && "".concat(period.number, "/").concat(period.year);
34
- 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);
35
- 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);
14
+ let stylingOptions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
15
+ let options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
16
+ const {
17
+ config,
18
+ Label
19
+ } = contextApiInfo;
20
+ const {
21
+ daysUnit,
22
+ temperatureUnit,
23
+ periodDates,
24
+ settlementDays,
25
+ energyConsumption,
26
+ powerConsumption,
27
+ totalConsumption,
28
+ dailyConsumption,
29
+ averageTemperature,
30
+ yearOrPeriodMobile
31
+ } = config.texts.consumptionComparison;
32
+ const {
33
+ noData
34
+ } = config.texts.commons;
35
+ const {
36
+ primary,
37
+ gray,
38
+ semibold
39
+ } = stylingOptions;
40
+ const formattedPeriod = period.number && period.year && "".concat(period.number, "/").concat(period.year);
41
+ 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);
42
+ 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);
36
43
  if (isDesktop && Object.keys(period).length === 0) return [{
37
44
  id: 'no_data_cell',
38
45
  Component: /*#__PURE__*/_react.default.createElement(Label, {
39
46
  alias: _aliases.GET_PERIOD_FIELDS_NO_DATA
40
47
  }, noData)
41
48
  }];
42
- var noDataLastYearPeriod = false;
43
- var noDataCurrentPeriod = false;
49
+ let noDataLastYearPeriod = false;
50
+ let noDataCurrentPeriod = false;
44
51
  if (!isDesktop && Object.keys(period === null || period === void 0 ? void 0 : period.lastYearPeriod).length === 0) {
45
52
  noDataLastYearPeriod = true;
46
53
  }
47
54
  if (!isDesktop && Object.keys(period.currentPeriod).length === 0) {
48
55
  noDataCurrentPeriod = true;
49
56
  }
50
- var mobileNoPeriodData = (0, _constants.noPeriodData)(primary, noData, contextApiInfo);
51
- var desktopFields = function desktopFields(data, fieldId) {
52
- return (0, _constants.getField)({
53
- primary: primary,
54
- gray: gray,
55
- semibold: semibold,
56
- isDesktop: isDesktop,
57
- data: data
58
- }, contextApiInfo)[fieldId];
59
- };
60
- var mobileFieldsLastYear = function mobileFieldsLastYear(data, fieldId) {
61
- return !noDataLastYearPeriod ? (0, _constants.getField)({
62
- data: data
63
- }, contextApiInfo)[fieldId] : mobileNoPeriodData;
64
- };
65
- var mobileTextField = function mobileTextField(text, fieldId) {
66
- return (0, _constants.getField)({
67
- gray: gray,
68
- text: text,
69
- isHeader: true
70
- }, contextApiInfo)[fieldId];
71
- };
72
- var mobileFieldCurrentYear = function mobileFieldCurrentYear(data, fieldId) {
73
- return !noDataCurrentPeriod ? (0, _constants.getField)({
74
- primary: primary,
75
- semibold: semibold,
76
- data: data
77
- }, contextApiInfo)[fieldId] : mobileNoPeriodData;
78
- };
79
- var _ref = periodAverageTemperature || {},
80
- lastYearPeriodAverageTemperature = _ref.lastYearPeriodAverageTemperature,
81
- currentPeriodAverageTemperature = _ref.currentPeriodAverageTemperature;
57
+ const mobileNoPeriodData = (0, _constants.noPeriodData)(primary, noData, contextApiInfo);
58
+ const desktopFields = (data, fieldId) => (0, _constants.getField)({
59
+ primary,
60
+ gray,
61
+ semibold,
62
+ isDesktop,
63
+ data
64
+ }, contextApiInfo)[fieldId];
65
+ const mobileFieldsLastYear = (data, fieldId) => !noDataLastYearPeriod ? (0, _constants.getField)({
66
+ data
67
+ }, contextApiInfo)[fieldId] : mobileNoPeriodData;
68
+ const mobileTextField = (text, fieldId) => (0, _constants.getField)({
69
+ gray,
70
+ text,
71
+ isHeader: true
72
+ }, contextApiInfo)[fieldId];
73
+ const mobileFieldCurrentYear = (data, fieldId) => !noDataCurrentPeriod ? (0, _constants.getField)({
74
+ primary,
75
+ semibold,
76
+ data
77
+ }, contextApiInfo)[fieldId] : mobileNoPeriodData;
78
+ const {
79
+ lastYearPeriodAverageTemperature,
80
+ currentPeriodAverageTemperature
81
+ } = periodAverageTemperature || {};
82
82
  return isDesktop ? [desktopFields(formattedPeriod, _constants.FIELD_PERIOD_COMPARISION), desktopFields(period, _constants.FIELD_PERIOD_DATES), desktopFields({
83
- period: period,
84
- daysUnit: daysUnit
83
+ period,
84
+ daysUnit
85
85
  }, _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({
86
- periodAverageTemperature: periodAverageTemperature,
87
- temperatureUnit: temperatureUnit
86
+ periodAverageTemperature,
87
+ temperatureUnit
88
88
  }, _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({
89
89
  period: period.lastYearPeriod,
90
- daysUnit: daysUnit
90
+ daysUnit
91
91
  }, _constants.FIELD_SETTLEMENTS_DAYS), mobileTextField(settlementDays, _constants.FIELD_SETTLEMENTS_DAYS), mobileFieldCurrentYear({
92
92
  period: period.currentPeriod,
93
- daysUnit: daysUnit
93
+ daysUnit
94
94
  }, _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({
95
95
  period: lastYearPeriodAverageTemperature,
96
- temperatureUnit: temperatureUnit
96
+ temperatureUnit
97
97
  }, _constants.FIELD_AVERAGE_TEMPERATURE), mobileTextField(averageTemperature, _constants.FIELD_AVERAGE_TEMPERATURE), mobileFieldCurrentYear({
98
98
  period: currentPeriodAverageTemperature,
99
- temperatureUnit: temperatureUnit
99
+ temperatureUnit
100
100
  }, _constants.FIELD_AVERAGE_TEMPERATURE)] : {};
101
101
  };
102
102
  exports.getPeriodFields = getPeriodFields;
103
- var renderDataLine = function renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data) {
104
- return /*#__PURE__*/_react.default.createElement(_DataLine.default, {
105
- key: "",
106
- fields: getPeriodFields(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, {
107
- primary: true,
108
- gray: true,
109
- semibold: true
110
- }, data),
111
- isDesktop: isDesktop
112
- });
113
- };
114
- var desktopGetTableLines = function desktopGetTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) {
115
- var showTemp = currentPeriodAverageTemperature && lastYearPeriodAverageTemperature;
103
+ const renderDataLine = (contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data) => /*#__PURE__*/_react.default.createElement(_DataLine.default, {
104
+ key: "",
105
+ fields: getPeriodFields(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, {
106
+ primary: true,
107
+ gray: true,
108
+ semibold: true
109
+ }, data),
110
+ isDesktop: isDesktop
111
+ });
112
+ const desktopGetTableLines = (contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) => {
113
+ const showTemp = currentPeriodAverageTemperature && lastYearPeriodAverageTemperature;
116
114
  return [{
117
115
  Component: /*#__PURE__*/_react.default.createElement(_DataLine.default, {
118
116
  key: "header",
@@ -141,19 +139,17 @@ var desktopGetTableLines = function desktopGetTableLines(contextApiInfo, current
141
139
  }];
142
140
  };
143
141
  exports.desktopGetTableLines = desktopGetTableLines;
144
- var mobileGetTableLines = function mobileGetTableLines(contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) {
145
- var mobilePeriod = {
146
- currentPeriod: currentPeriod,
147
- lastYearPeriod: lastYearPeriod
142
+ const mobileGetTableLines = (contextApiInfo, currentPeriod, currentPeriodAverageTemperature, lastYearPeriod, lastYearPeriodAverageTemperature, isDesktop, withPowerComparison) => {
143
+ const mobilePeriod = {
144
+ currentPeriod,
145
+ lastYearPeriod
148
146
  };
149
- var mobilePeriodAverageTemperature = {
150
- currentPeriodAverageTemperature: currentPeriodAverageTemperature,
151
- lastYearPeriodAverageTemperature: lastYearPeriodAverageTemperature
147
+ const mobilePeriodAverageTemperature = {
148
+ currentPeriodAverageTemperature,
149
+ lastYearPeriodAverageTemperature
152
150
  };
153
151
  return [{
154
- Component: /*#__PURE__*/_react.default.createElement("div", null, _constants.dataFieldDictonary.map(function (data) {
155
- return renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data);
156
- }))
152
+ Component: /*#__PURE__*/_react.default.createElement("div", null, _constants.dataFieldDictonary.map(data => renderDataLine(contextApiInfo, mobilePeriod, mobilePeriodAverageTemperature, withPowerComparison, isDesktop, data)))
157
153
  }];
158
154
  };
159
155
  exports.mobileGetTableLines = mobileGetTableLines;
@@ -10,17 +10,27 @@ var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
10
10
  var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
11
11
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- var ConsumptionAdvice = function ConsumptionAdvice(_ref) {
14
- var contextApiInfo = _ref.contextApiInfo;
15
- var config = contextApiInfo.config,
16
- assets = contextApiInfo.assets,
17
- Label = contextApiInfo.Label,
18
- Button = contextApiInfo.Button,
19
- ExternalLink = contextApiInfo.ExternalLink;
20
- var texts = config.texts,
21
- stylesConfig = config.stylesConfig;
22
- var consumptionSimulator = config.externalLinks.consumptionSimulator;
23
- var LightBulbIcon = assets.LightBulbIcon;
13
+ const ConsumptionAdvice = _ref => {
14
+ let {
15
+ contextApiInfo
16
+ } = _ref;
17
+ const {
18
+ config,
19
+ assets,
20
+ Label,
21
+ Button,
22
+ ExternalLink
23
+ } = contextApiInfo;
24
+ const {
25
+ texts,
26
+ stylesConfig
27
+ } = config;
28
+ const {
29
+ consumptionSimulator
30
+ } = config.externalLinks;
31
+ const {
32
+ LightBulbIcon
33
+ } = assets;
24
34
  return /*#__PURE__*/_react.default.createElement("div", {
25
35
  className: "".concat(_stylesModule.default.container, " ").concat(stylesConfig === null || stylesConfig === void 0 ? void 0 : stylesConfig.adviceContainer)
26
36
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -44,5 +54,4 @@ var ConsumptionAdvice = function ConsumptionAdvice(_ref) {
44
54
  ConsumptionAdvice.propTypes = {
45
55
  contextApiInfo: _smartBillTypes.contextApiInfoTypes
46
56
  };
47
- var _default = (0, _WithContextApi.default)()(ConsumptionAdvice);
48
- exports.default = _default;
57
+ var _default = exports.default = (0, _WithContextApi.default)()(ConsumptionAdvice);
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getSeasonProps = void 0;
7
7
  var _seasons = require("../../../../shared/constants/seasons");
8
- var getSeasonProps = function getSeasonProps(season, texts) {
8
+ const getSeasonProps = (season, texts) => {
9
9
  switch (season) {
10
10
  case _seasons.SEASONS.AUTUMN:
11
11
  return {
@@ -12,20 +12,27 @@ var _aliases = require("../../../../shared/constants/aliases");
12
12
  var _utils = require("./utils");
13
13
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- var PercentageComparison = function PercentageComparison(_ref) {
16
- var contextApiInfo = _ref.contextApiInfo,
17
- savingsPercentage = _ref.savingsPercentage,
18
- multipleSettlements = _ref.multipleSettlements;
19
- var assets = contextApiInfo.assets,
20
- config = contextApiInfo.config,
21
- Label = contextApiInfo.Label;
22
- var texts = config.texts;
23
- var _getProps = (0, _utils.getProps)(savingsPercentage, assets, texts, multipleSettlements),
24
- Icon = _getProps.Icon,
25
- sign = _getProps.sign,
26
- value = _getProps.value,
27
- background = _getProps.background,
28
- text = _getProps.text;
15
+ const PercentageComparison = _ref => {
16
+ let {
17
+ contextApiInfo,
18
+ savingsPercentage,
19
+ multipleSettlements
20
+ } = _ref;
21
+ const {
22
+ assets,
23
+ config,
24
+ Label
25
+ } = contextApiInfo;
26
+ const {
27
+ texts
28
+ } = config;
29
+ const {
30
+ Icon,
31
+ sign,
32
+ value,
33
+ background,
34
+ text
35
+ } = (0, _utils.getProps)(savingsPercentage, assets, texts, multipleSettlements);
29
36
  return /*#__PURE__*/_react.default.createElement("div", {
30
37
  className: "".concat(_stylesModule.default.container, " ").concat(background)
31
38
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -46,5 +53,4 @@ PercentageComparison.propTypes = {
46
53
  savingsPercentage: _propTypes.number,
47
54
  multipleSettlements: _propTypes.bool
48
55
  };
49
- var _default = (0, _WithContextApi.default)()(PercentageComparison);
50
- exports.default = _default;
56
+ var _default = exports.default = (0, _WithContextApi.default)()(PercentageComparison);
@@ -6,15 +6,19 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getProps = void 0;
7
7
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- var getProps = function getProps(savingsPercentage, assets, texts, multipleSettlements) {
10
- var consumptionComparison = texts.consumptionComparison;
11
- var lastYearBimesterPercentageComparisonDescended = consumptionComparison.lastYearBimesterPercentageComparisonDescended,
12
- lastYearPercentageComparisonDescended = consumptionComparison.lastYearPercentageComparisonDescended,
13
- lastYearBimesterPercentageComparisonRise = consumptionComparison.lastYearBimesterPercentageComparisonRise,
14
- lastYearPercentageComparisonRise = consumptionComparison.lastYearPercentageComparisonRise,
15
- lastYearPercentageStatic = consumptionComparison.lastYearPercentageStatic;
16
- var reductionText = multipleSettlements ? lastYearBimesterPercentageComparisonDescended : lastYearPercentageComparisonDescended;
17
- var incrementText = multipleSettlements ? lastYearBimesterPercentageComparisonRise : lastYearPercentageComparisonRise;
9
+ const getProps = (savingsPercentage, assets, texts, multipleSettlements) => {
10
+ const {
11
+ consumptionComparison
12
+ } = texts;
13
+ const {
14
+ lastYearBimesterPercentageComparisonDescended,
15
+ lastYearPercentageComparisonDescended,
16
+ lastYearBimesterPercentageComparisonRise,
17
+ lastYearPercentageComparisonRise,
18
+ lastYearPercentageStatic
19
+ } = consumptionComparison;
20
+ const reductionText = multipleSettlements ? lastYearBimesterPercentageComparisonDescended : lastYearPercentageComparisonDescended;
21
+ const incrementText = multipleSettlements ? lastYearBimesterPercentageComparisonRise : lastYearPercentageComparisonRise;
18
22
  if (savingsPercentage > 0) {
19
23
  return {
20
24
  Icon: assets.ConsumptionReductionIcon,
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -21,54 +20,51 @@ var _ConsumptionAdvice = _interopRequireDefault(require("./components/Consumptio
21
20
  var _PercentageComparison = _interopRequireDefault(require("./components/PercentageComparison"));
22
21
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
23
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
- 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); }
25
- 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; }
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
- 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."); }
28
- 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); }
29
- 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; }
30
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
31
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
32
- var ConsumptionComparison = function ConsumptionComparison(_ref) {
23
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ const ConsumptionComparison = _ref => {
33
26
  var _currentPeriod$settle;
34
- var billData = _ref.billData,
35
- contextApiInfo = _ref.contextApiInfo;
36
- var Label = contextApiInfo.Label,
37
- config = contextApiInfo.config,
38
- assets = contextApiInfo.assets;
39
- var consumptionSimulatorFromBanner = config.externalLinks.consumptionSimulatorFromBanner;
40
- var showConsumptionComparisonBanner = config.validations.showConsumptionComparisonBanner;
41
- var texts = config.texts;
42
- var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
43
- var SimulatorBannerIcon = assets.SimulatorBannerIcon,
44
- SimulatorBannerResponsiveIcon = assets.SimulatorBannerResponsiveIcon;
45
- var withBanner = showConsumptionComparisonBanner(billData);
46
- var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
47
- _useState2 = _slicedToArray(_useState, 2),
48
- isDesktopSize = _useState2[0],
49
- setIsDesktopSize = _useState2[1];
50
- var handleResizeScreen = function handleResizeScreen() {
51
- return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
52
- };
53
- (0, _react.useEffect)(function () {
27
+ let {
28
+ billData,
29
+ contextApiInfo
30
+ } = _ref;
31
+ const {
32
+ Label,
33
+ config,
34
+ assets
35
+ } = contextApiInfo;
36
+ const {
37
+ consumptionSimulatorFromBanner
38
+ } = config.externalLinks;
39
+ const {
40
+ showConsumptionComparisonBanner
41
+ } = config.validations;
42
+ const {
43
+ texts
44
+ } = config;
45
+ const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
46
+ const {
47
+ SimulatorBannerIcon,
48
+ SimulatorBannerResponsiveIcon
49
+ } = assets;
50
+ const withBanner = showConsumptionComparisonBanner(billData);
51
+ const [isDesktopSize, setIsDesktopSize] = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
52
+ const handleResizeScreen = () => setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
53
+ (0, _react.useEffect)(() => {
54
54
  window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
55
55
  handleResizeScreen();
56
- return function () {
57
- return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
58
- };
56
+ return () => window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
59
57
  }, []);
60
- var savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
61
- var showTemp = billData.previous_period_avg_temperature && billData.current_period_avg_temperature;
62
- var multipleSettlements = (currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
63
- var ComparisonTableRender = function ComparisonTableRender() {
64
- return /*#__PURE__*/_react.default.createElement(_ComparisonTable.default, {
65
- billData: billData,
66
- multipleSettlements: multipleSettlements,
67
- isDesktopSize: isDesktopSize
68
- });
69
- };
70
- var scrollbarRef = (0, _react.useRef)();
71
- (0, _react.useEffect)(function () {
58
+ const savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
59
+ const showTemp = billData.previous_period_avg_temperature && billData.current_period_avg_temperature;
60
+ const multipleSettlements = (currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
61
+ const ComparisonTableRender = () => /*#__PURE__*/_react.default.createElement(_ComparisonTable.default, {
62
+ billData: billData,
63
+ multipleSettlements: multipleSettlements,
64
+ isDesktopSize: isDesktopSize
65
+ });
66
+ const scrollbarRef = (0, _react.useRef)();
67
+ (0, _react.useEffect)(() => {
72
68
  if (scrollbarRef.current) scrollbarRef.current.updateScroll();
73
69
  }, [scrollbarRef]);
74
70
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -96,5 +92,4 @@ ConsumptionComparison.propTypes = {
96
92
  billData: _billDataTypes.billDataTypes,
97
93
  contextApiInfo: _smartBillTypes.contextApiInfoTypes
98
94
  };
99
- var _default = (0, _WithContextApi.default)()(ConsumptionComparison);
100
- exports.default = _default;
95
+ var _default = exports.default = (0, _WithContextApi.default)()(ConsumptionComparison);
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
@@ -18,26 +17,32 @@ var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
18
17
  var _billDataTypes = require("../../../../shared/types/billDataTypes");
19
18
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
20
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
- 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); }
22
- 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; }
23
- var ConsumptionEnergyComparison = function ConsumptionEnergyComparison(_ref) {
24
- var contextApiInfo = _ref.contextApiInfo,
25
- multipleSettlements = _ref.multipleSettlements,
26
- withPercentage = _ref.withPercentage,
27
- dataValidation = _ref.dataValidation,
28
- currentConsumption = _ref.currentConsumption,
29
- remainingConsumption = _ref.remainingConsumption,
30
- totalConsumption = _ref.totalConsumption,
31
- settlements = _ref.settlements,
32
- periodicity = _ref.periodicity,
33
- periodNumber = _ref.periodNumber,
34
- year = _ref.year,
35
- savingsPercentage = _ref.savingsPercentage,
36
- currentIsFirstSettlement = _ref.currentIsFirstSettlement;
37
- var config = contextApiInfo.config,
38
- Label = contextApiInfo.Label;
39
- var texts = config.texts;
40
- var CurrentSettlement = function CurrentSettlement() {
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ const ConsumptionEnergyComparison = _ref => {
23
+ let {
24
+ contextApiInfo,
25
+ multipleSettlements,
26
+ withPercentage,
27
+ dataValidation,
28
+ currentConsumption,
29
+ remainingConsumption,
30
+ totalConsumption,
31
+ settlements,
32
+ periodicity,
33
+ periodNumber,
34
+ year,
35
+ savingsPercentage,
36
+ currentIsFirstSettlement
37
+ } = _ref;
38
+ const {
39
+ config,
40
+ Label
41
+ } = contextApiInfo;
42
+ const {
43
+ texts
44
+ } = config;
45
+ const CurrentSettlement = () => {
41
46
  var _settlements$current;
42
47
  return /*#__PURE__*/_react.default.createElement("div", {
43
48
  className: _stylesModule.default.currentConsumptionContainer
@@ -55,7 +60,7 @@ var ConsumptionEnergyComparison = function ConsumptionEnergyComparison(_ref) {
55
60
  alias: _aliases.CONSUMPTION_ACTUAL_DETAIL
56
61
  }, texts.mainBillData.currentConsumption));
57
62
  };
58
- var RemainingSettlement = function RemainingSettlement() {
63
+ const RemainingSettlement = () => {
59
64
  var _settlements$remainin;
60
65
  return /*#__PURE__*/_react.default.createElement("div", {
61
66
  className: _stylesModule.default.remainingConsumptionContainer
@@ -113,5 +118,4 @@ ConsumptionEnergyComparison.propTypes = {
113
118
  savingsPercentage: _propTypes.number,
114
119
  currentIsFirstSettlement: _propTypes.bool
115
120
  };
116
- var _default = (0, _WithContextApi.default)()(ConsumptionEnergyComparison);
117
- exports.default = _default;
121
+ var _default = exports.default = (0, _WithContextApi.default)()(ConsumptionEnergyComparison);
@@ -70,8 +70,8 @@ $border-radius: 5px;
70
70
  .firstSettlementRemainingConsumptionLabel {
71
71
  @extend %consumption-labels;
72
72
  border: 1px solid $borders-gray;
73
- border-right: 0;
74
73
  border-bottom-left-radius: $border-radius;
74
+ border-right: 0;
75
75
  border-top-left-radius: $border-radius;
76
76
  }
77
77
 
@@ -11,19 +11,24 @@ var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"))
11
11
  var _utils = require("../../../../utils");
12
12
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- var ConsumptionInDaysLabel = function ConsumptionInDaysLabel(_ref) {
15
- var contextApiInfo = _ref.contextApiInfo,
16
- consumption = _ref.consumption,
17
- unit = _ref.unit,
18
- totalDays = _ref.totalDays,
19
- _ref$classes = _ref.classes,
20
- classes = _ref$classes === void 0 ? {} : _ref$classes,
21
- numberAlias = _ref.numberAlias,
22
- unitAlias = _ref.unitAlias,
23
- daysAlias = _ref.daysAlias;
24
- var config = contextApiInfo.config,
25
- Label = contextApiInfo.Label;
26
- var texts = config.texts;
14
+ const ConsumptionInDaysLabel = _ref => {
15
+ let {
16
+ contextApiInfo,
17
+ consumption,
18
+ unit,
19
+ totalDays,
20
+ classes = {},
21
+ numberAlias,
22
+ unitAlias,
23
+ daysAlias
24
+ } = _ref;
25
+ const {
26
+ config,
27
+ Label
28
+ } = contextApiInfo;
29
+ const {
30
+ texts
31
+ } = config;
27
32
  return /*#__PURE__*/_react.default.createElement("div", {
28
33
  className: "".concat(classes.container)
29
34
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -48,5 +53,4 @@ ConsumptionInDaysLabel.propTypes = {
48
53
  unitAlias: _propTypes.string,
49
54
  daysAlias: _propTypes.string
50
55
  };
51
- var _default = (0, _WithContextApi.default)()(ConsumptionInDaysLabel);
52
- exports.default = _default;
56
+ var _default = exports.default = (0, _WithContextApi.default)()(ConsumptionInDaysLabel);