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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/components/Advice/index.js +6 -10
  3. package/dist/components/Amount/index.js +21 -26
  4. package/dist/components/Amount/utils.js +5 -1
  5. package/dist/components/Banner/index.js +6 -10
  6. package/dist/components/BarChart/constants.js +3 -3
  7. package/dist/components/BarChart/index.js +25 -28
  8. package/dist/components/BarChart/utils.js +15 -15
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +48 -47
  10. package/dist/components/BillCalculation/constants.js +1 -1
  11. package/dist/components/BillCalculation/index.js +54 -44
  12. package/dist/components/BillCalculation/utils.js +14 -17
  13. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -26
  14. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
  15. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +31 -34
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
  17. package/dist/components/BillSummary/components/BilledConcepts/constants.js +14 -12
  18. package/dist/components/BillSummary/components/BilledConcepts/index.js +49 -31
  19. package/dist/components/BillSummary/components/BilledConcepts/utils.js +76 -44
  20. package/dist/components/BillSummary/index.js +78 -76
  21. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
  22. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +12 -17
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +135 -148
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +14 -16
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +94 -89
  27. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +11 -21
  28. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
  29. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +16 -21
  30. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +9 -13
  31. package/dist/components/ConsumptionComparison/index.js +56 -42
  32. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -30
  33. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +13 -18
  34. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -17
  35. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +17 -21
  36. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
  37. package/dist/components/ConsumptionEnergyDetails/index.js +55 -52
  38. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +12 -0
  39. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
  40. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
  41. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
  42. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
  43. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
  44. package/dist/components/ConsumptionIncluded/index.js +36 -34
  45. package/dist/components/ConsumptionIncluded/utils.js +33 -29
  46. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
  47. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
  48. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
  49. package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
  50. package/dist/components/ConsumptionPeriod/index.js +8 -12
  51. package/dist/components/ConsumptionPeriod/utils.js +15 -13
  52. package/dist/components/Date/index.js +9 -12
  53. package/dist/components/DebtState/index.js +8 -14
  54. package/dist/components/IconAndDetails/index.js +17 -19
  55. package/dist/components/Magnitude/index.js +12 -15
  56. package/dist/components/Magnitude/utils.js +8 -2
  57. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
  58. package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
  59. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
  60. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
  61. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
  62. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
  63. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
  64. package/dist/components/MainBillData/components/BillBody/index.js +50 -45
  65. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
  66. package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
  67. package/dist/components/MainBillData/index.js +5 -7
  68. package/dist/components/MainBillData/theme.js +9 -7
  69. package/dist/components/MainBillData/utils.js +5 -1
  70. package/dist/components/Period/index.js +47 -55
  71. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
  72. package/dist/components/PowerProgresBar/index.js +36 -36
  73. package/dist/components/RateAndCategory/index.js +31 -30
  74. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
  75. package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
  76. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
  77. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +7 -5
  78. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +13 -19
  79. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +3 -1
  80. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +18 -18
  81. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +19 -19
  82. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
  83. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -15
  84. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +37 -35
  85. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +25 -25
  86. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +18 -18
  87. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +32 -12
  88. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +20 -12
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +50 -32
  90. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
  91. package/dist/components/RatesDefinition/index.js +15 -20
  92. package/dist/components/SmartBillProvider/index.js +47 -12
  93. package/dist/components/StyledAmount/constants.js +1 -1
  94. package/dist/components/StyledAmount/index.js +35 -19
  95. package/dist/components/WithContextApi/index.js +27 -16
  96. package/dist/components/WithContextApi/layout.js +2 -2
  97. package/dist/components/WithSeason/index.js +9 -5
  98. package/dist/constants/deviceSizes.js +17 -27
  99. package/dist/constants/seasons.js +2 -2
  100. package/dist/index.js +16 -14
  101. package/dist/shared/Context/index.js +3 -5
  102. package/dist/shared/constants/aliases.js +550 -682
  103. package/dist/shared/constants/components.js +2 -1
  104. package/dist/shared/constants/consumptions.js +4 -4
  105. package/dist/shared/constants/periodicities.js +1 -1
  106. package/dist/shared/constants/rates.js +1 -1
  107. package/dist/shared/constants/readings.js +2 -2
  108. package/dist/shared/constants/seasons.js +2 -2
  109. package/dist/shared/constants/stagesGraph.js +4 -4
  110. package/dist/shared/types/assetsTypes.js +1 -1
  111. package/dist/shared/types/billDataTypes.js +4 -4
  112. package/dist/shared/types/componentsTypes.js +13 -18
  113. package/dist/shared/types/formattersTypes.js +1 -1
  114. package/dist/shared/types/rateStagesTypes.js +3 -3
  115. package/dist/shared/types/smartBillTypes.js +10 -5
  116. package/dist/shared/types/textsTypes.js +1 -1
  117. package/dist/shared/utils/billCalculation.js +9 -9
  118. package/dist/shared/utils/consumptions.js +62 -28
  119. package/dist/shared/utils/context.js +8 -7
  120. package/dist/shared/utils/expirations.js +5 -1
  121. package/dist/shared/utils/periods.js +20 -14
  122. package/dist/shared/utils/rates.js +5 -1
  123. package/dist/shared/utils/readings.js +10 -2
  124. package/dist/shared/utils/season.js +5 -1
  125. package/dist/shared/utils/stagesGraph.js +15 -11
  126. package/dist/utils/hooks.js +5 -37
  127. package/dist/utils.js +8 -4
  128. package/package.json +2 -2
  129. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -21,23 +23,19 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
21
23
 
22
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
25
 
24
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
25
-
26
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || 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; }
27
-
28
- const EnergyTotalConsumption = _ref => {
29
- let {
30
- contextApiInfo,
31
- consumption,
32
- unit,
33
- text,
34
- exceededReactiveEnergy
35
- } = _ref;
36
- const {
37
- Label
38
- } = contextApiInfo;
39
- const alias = exceededReactiveEnergy ? _aliases.ENERGY_TOTAL_CONSUMPTION_EXCEEDED : _aliases.ENERGY_TOTAL_CONSUMPTION;
40
- const unitAlias = exceededReactiveEnergy ? _aliases.ENERGY_TOTAL_CONSUMPTION_EXCEEDED_UNIT : _aliases.ENERGY_TOTAL_CONSUMPTION_UNIT;
26
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
27
+
28
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
+
30
+ var EnergyTotalConsumption = function EnergyTotalConsumption(_ref) {
31
+ var contextApiInfo = _ref.contextApiInfo,
32
+ consumption = _ref.consumption,
33
+ unit = _ref.unit,
34
+ text = _ref.text,
35
+ exceededReactiveEnergy = _ref.exceededReactiveEnergy;
36
+ var Label = contextApiInfo.Label;
37
+ var alias = exceededReactiveEnergy ? _aliases.ENERGY_TOTAL_CONSUMPTION_EXCEEDED : _aliases.ENERGY_TOTAL_CONSUMPTION;
38
+ var unitAlias = exceededReactiveEnergy ? _aliases.ENERGY_TOTAL_CONSUMPTION_EXCEEDED_UNIT : _aliases.ENERGY_TOTAL_CONSUMPTION_UNIT;
41
39
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
42
40
  className: _stylesModule.default.energyConsumotionLabel
43
41
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -21,27 +21,23 @@ 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
- consumptionComparissonWithLasYear,
37
- activeEnergycomparisonWithLastYear
38
- } = config.texts.billSummary;
39
- const {
40
- Icon,
41
- sign,
42
- value,
43
- background
44
- } = (0, _utils.getProps)(savingsPercentage, assets);
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 _config$texts$billSum = config.texts.billSummary,
32
+ consumptionComparissonWithLasYear = _config$texts$billSum.consumptionComparissonWithLasYear,
33
+ activeEnergycomparisonWithLastYear = _config$texts$billSum.activeEnergycomparisonWithLastYear;
34
+
35
+ var _getProps = (0, _utils.getProps)(savingsPercentage, assets),
36
+ Icon = _getProps.Icon,
37
+ sign = _getProps.sign,
38
+ value = _getProps.value,
39
+ background = _getProps.background;
40
+
45
41
  return savingsPercentage === 0 || savingsPercentage ? /*#__PURE__*/_react.default.createElement("div", {
46
42
  className: "".concat(_stylesModule.default.container, " ").concat(background)
47
43
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -9,7 +9,7 @@ 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) => {
12
+ var getProps = function getProps(savingsPercentage, assets) {
13
13
  if (savingsPercentage > 0) {
14
14
  return {
15
15
  Icon: assets.ConsumptionReductionIcon,
@@ -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,56 +39,51 @@ 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); }
41
-
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; }
43
-
44
- const ConsumptionEnergyDetails = _ref => {
45
- let {
46
- contextApiInfo,
47
- currentPeriod,
48
- billData,
49
- multipleSettlements,
50
- consumptionComparison,
51
- withPercentage
52
- } = _ref;
53
- const {
54
- config,
55
- Label,
56
- assets
57
- } = contextApiInfo;
58
- const {
59
- texts,
60
- validations
61
- } = config;
62
- const {
63
- RedAlertIcon
64
- } = assets;
65
- const {
66
- useCosinePhi,
67
- showMultipleSettlementsConsumption,
68
- showPercentageComparison
69
- } = validations;
70
- const currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
71
- const remainingConsumption = (0, _consumptions.getRemainingConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
72
- const totalConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
73
- const powerFactorType = useCosinePhi(billData) ? _consumptions2.POWER_FACTORS.COSINE_PHI : _consumptions2.POWER_FACTORS.TANGENT_PHI;
74
- const powerFactor = (0, _consumptions.getTotalConsumption)(currentPeriod, powerFactorType);
75
- const totalReactiveConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.REACTIVE);
76
- const savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
77
-
78
- const dataValidation = data => (0, _utils.stringOrDash)(data);
79
-
80
- const settlements = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.settlements;
81
- const periodicity = settlements === null || settlements === void 0 ? void 0 : settlements.periodicity;
82
- const periodNumber = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.number;
83
- const year = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.year;
84
- const currentIsFirstSettlement = multipleSettlements && settlements.current.number === 1;
85
-
86
- const Title = style => /*#__PURE__*/_react.default.createElement(Label, {
87
- alias: _aliases.TITLE,
88
- className: style && _stylesModule.default.title
89
- }, texts.billSummary.consumptionTitle);
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
+ var ConsumptionEnergyDetails = function ConsumptionEnergyDetails(_ref) {
47
+ var contextApiInfo = _ref.contextApiInfo,
48
+ currentPeriod = _ref.currentPeriod,
49
+ billData = _ref.billData,
50
+ multipleSettlements = _ref.multipleSettlements,
51
+ consumptionComparison = _ref.consumptionComparison,
52
+ withPercentage = _ref.withPercentage;
53
+ var config = contextApiInfo.config,
54
+ Label = contextApiInfo.Label,
55
+ assets = contextApiInfo.assets;
56
+ var texts = config.texts,
57
+ validations = config.validations;
58
+ var RedAlertIcon = assets.RedAlertIcon;
59
+ var useCosinePhi = validations.useCosinePhi,
60
+ showMultipleSettlementsConsumption = validations.showMultipleSettlementsConsumption,
61
+ showPercentageComparison = validations.showPercentageComparison,
62
+ showSingleSettlementDays = validations.showSingleSettlementDays;
63
+ var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
64
+ var remainingConsumption = (0, _consumptions.getRemainingConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
65
+ var totalConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
66
+ var powerFactorType = useCosinePhi(billData) ? _consumptions2.POWER_FACTORS.COSINE_PHI : _consumptions2.POWER_FACTORS.TANGENT_PHI;
67
+ var powerFactor = (0, _consumptions.getTotalConsumption)(currentPeriod, powerFactorType);
68
+ var totalReactiveConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.REACTIVE);
69
+ var savingsPercentage = (0, _periods.getSavingsPercentage)(currentPeriod);
70
+
71
+ var dataValidation = function dataValidation(data) {
72
+ return (0, _utils.stringOrDash)(data);
73
+ };
74
+
75
+ var settlements = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.settlements;
76
+ var periodicity = settlements === null || settlements === void 0 ? void 0 : settlements.periodicity;
77
+ var periodNumber = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.number;
78
+ var year = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.year;
79
+ var currentIsFirstSettlement = multipleSettlements && settlements.current.number === 1;
80
+
81
+ var Title = function Title(style) {
82
+ return /*#__PURE__*/_react.default.createElement(Label, {
83
+ alias: _aliases.TITLE,
84
+ className: style && _stylesModule.default.title
85
+ }, texts.billSummary.consumptionTitle);
86
+ };
90
87
 
91
88
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
92
89
  className: _stylesModule.default.container
@@ -104,7 +101,7 @@ const ConsumptionEnergyDetails = _ref => {
104
101
  savingsPercentage: savingsPercentage,
105
102
  currentIsFirstSettlement: currentIsFirstSettlement
106
103
  }) : /*#__PURE__*/_react.default.createElement("div", {
107
- className: _stylesModule.default.multipleSettlementsInfo && _stylesModule.default.percentageContainer
104
+ className: _stylesModule.default.multipleSettlementsInfo && _stylesModule.default.percentageContainer && showSingleSettlementDays(billData) && _stylesModule.default.singleSettlementDays
108
105
  }, /*#__PURE__*/_react.default.createElement("div", {
109
106
  className: _stylesModule.default.multipleSettlementsContainer
110
107
  }, Title(false), /*#__PURE__*/_react.default.createElement("div", {
@@ -115,7 +112,13 @@ const ConsumptionEnergyDetails = _ref => {
115
112
  value: dataValidation((0, _utils.numberOrDash)(currentConsumption.value)),
116
113
  unit: dataValidation(currentConsumption.unit),
117
114
  xxxlarge: true
118
- })))) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Title(true), /*#__PURE__*/_react.default.createElement("div", {
115
+ }))), showSingleSettlementDays(billData) && /*#__PURE__*/_react.default.createElement("div", {
116
+ className: _stylesModule.default.singleSettlementDaysContainer
117
+ }, /*#__PURE__*/_react.default.createElement(Label, {
118
+ alias: _aliases.CONSUMPTION_PERIODICITY
119
+ }, texts.mainBillData.singleSettlementConsumptionDays), /*#__PURE__*/_react.default.createElement(Label, {
120
+ alias: _aliases.CONSUMPTION_BIMESTER_DAYS
121
+ }, "".concat(currentPeriod.settlements.total_settlements_days, " ").concat(texts.commons.days)))) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, Title(true), /*#__PURE__*/_react.default.createElement("div", {
119
122
  className: _stylesModule.default.indiviadualSettlementInfo
120
123
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_EnergyTotalConsumption.default, {
121
124
  consumption: dataValidation((0, _utils.numberOrDash)(totalConsumption.value)),
@@ -27,6 +27,18 @@ $border-radius: 5px;
27
27
  }
28
28
  }
29
29
 
30
+ .singleSettlementDays {
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+ .singleSettlementDaysContainer {
36
+ border-top: 1px solid $borders-gray;
37
+ display: flex;
38
+ padding: 12px 24px;
39
+ justify-content: space-between;
40
+ }
41
+
30
42
  .multipleSettlementsContainer {
31
43
  align-items: center;
32
44
  display: flex;
@@ -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
  });
@@ -23,73 +25,70 @@ var _utils = require("./utils");
23
25
 
24
26
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
27
 
26
- 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); }
27
-
28
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
29
-
30
- const Card = _ref => {
31
- let {
32
- contextApiInfo,
33
- cardTitle,
34
- cardSubtitle,
35
- cardDescription1,
36
- cardDescription2,
37
- consumption,
38
- remaining,
39
- current,
40
- settlementNumber,
41
- currentIsFirstSettlement,
42
- unit,
43
- value,
44
- initialDate,
45
- finalDate
46
- } = _ref;
47
- const {
48
- Label,
49
- assets,
50
- config
51
- } = contextApiInfo;
52
- const {
53
- colors
54
- } = config;
55
- const {
56
- consumptionIncluded
57
- } = config.texts;
58
- const {
59
- EnergyIcon
60
- } = assets;
61
- const consumptionText = current ? consumptionIncluded.consumptionIncluded : settlementNumber === 1 ? consumptionIncluded.consumptionBilled : consumptionIncluded.consumptionNotBilled;
62
- const EnergyStyledIcon = {
63
- primary: () => /*#__PURE__*/_react.default.createElement(EnergyIcon, {
64
- className: _stylesModule.default.energyIcon,
65
- style: {
66
- fill: colors.primary
67
- }
68
- }),
69
- white: () => /*#__PURE__*/_react.default.createElement(EnergyIcon, {
70
- className: _stylesModule.default.energyIcon,
71
- style: {
72
- fill: 'white'
73
- }
74
- }),
75
- gray: () => /*#__PURE__*/_react.default.createElement(EnergyIcon, {
76
- className: _stylesModule.default.energyIcon,
77
- style: {
78
- fill: colors.gray
79
- }
80
- })
28
+ 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); }
29
+
30
+ 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; }
31
+
32
+ var Card = function Card(_ref) {
33
+ var contextApiInfo = _ref.contextApiInfo,
34
+ cardTitle = _ref.cardTitle,
35
+ cardSubtitle = _ref.cardSubtitle,
36
+ cardDescription1 = _ref.cardDescription1,
37
+ cardDescription2 = _ref.cardDescription2,
38
+ consumption = _ref.consumption,
39
+ remaining = _ref.remaining,
40
+ current = _ref.current,
41
+ settlementNumber = _ref.settlementNumber,
42
+ currentIsFirstSettlement = _ref.currentIsFirstSettlement,
43
+ unit = _ref.unit,
44
+ value = _ref.value,
45
+ initialDate = _ref.initialDate,
46
+ finalDate = _ref.finalDate;
47
+ var Label = contextApiInfo.Label,
48
+ assets = contextApiInfo.assets,
49
+ config = contextApiInfo.config;
50
+ var colors = config.colors;
51
+ var consumptionIncluded = config.texts.consumptionIncluded;
52
+ var EnergyIcon = assets.EnergyIcon;
53
+ var consumptionText = current ? consumptionIncluded.consumptionIncluded : settlementNumber === 1 ? consumptionIncluded.consumptionBilled : consumptionIncluded.consumptionNotBilled;
54
+ var EnergyStyledIcon = {
55
+ primary: function primary() {
56
+ return /*#__PURE__*/_react.default.createElement(EnergyIcon, {
57
+ className: _stylesModule.default.energyIcon,
58
+ style: {
59
+ fill: colors.primary
60
+ }
61
+ });
62
+ },
63
+ white: function white() {
64
+ return /*#__PURE__*/_react.default.createElement(EnergyIcon, {
65
+ className: _stylesModule.default.energyIcon,
66
+ style: {
67
+ fill: 'white'
68
+ }
69
+ });
70
+ },
71
+ gray: function gray() {
72
+ return /*#__PURE__*/_react.default.createElement(EnergyIcon, {
73
+ className: _stylesModule.default.energyIcon,
74
+ style: {
75
+ fill: colors.gray
76
+ }
77
+ });
78
+ }
81
79
  };
82
- const {
83
- magnitudeAlias,
84
- unitAlias,
85
- consumptionAlias,
86
- cardTitleAlias,
87
- cardDescriptionAlias,
88
- cardDescriptionRemainingAlias,
89
- cardSubtitleAlias,
90
- cardConsumptionDescriptionAlias,
91
- cardConsumptionTextAlias
92
- } = (0, _utils.getAliases)(consumption, current, remaining);
80
+
81
+ var _getAliases = (0, _utils.getAliases)(consumption, current, remaining),
82
+ magnitudeAlias = _getAliases.magnitudeAlias,
83
+ unitAlias = _getAliases.unitAlias,
84
+ consumptionAlias = _getAliases.consumptionAlias,
85
+ cardTitleAlias = _getAliases.cardTitleAlias,
86
+ cardDescriptionAlias = _getAliases.cardDescriptionAlias,
87
+ cardDescriptionRemainingAlias = _getAliases.cardDescriptionRemainingAlias,
88
+ cardSubtitleAlias = _getAliases.cardSubtitleAlias,
89
+ cardConsumptionDescriptionAlias = _getAliases.cardConsumptionDescriptionAlias,
90
+ cardConsumptionTextAlias = _getAliases.cardConsumptionTextAlias;
91
+
93
92
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
94
93
  className: "".concat(_stylesModule.default.container, " ").concat(current && _stylesModule.default.containerCurrent, " ").concat(remaining && _stylesModule.default.containerRemaining),
95
94
  style: current && {
@@ -7,16 +7,18 @@ exports.getAliases = void 0;
7
7
 
8
8
  var _aliases = require("../../../../../../shared/constants/aliases");
9
9
 
10
- const getAliases = (consumption, current, remaining) => ({
11
- magnitudeAlias: consumption ? _aliases.CARD_PRIMARY_MAGNITUDE : current ? _aliases.CARD_WHITE_MAGNITUDE : _aliases.CARD_GRAY_MAGNITUDE,
12
- unitAlias: consumption ? _aliases.CARD_PRIMARY_UNIT : current ? _aliases.CARD_WHITE_UNIT : _aliases.CARD_GRAY_UNIT,
13
- consumptionAlias: consumption ? _aliases.CARD_PRIMARY_CONSUMPTION : current ? _aliases.CARD_WHITE_CONSUMPTION : _aliases.CARD_GRAY_CONSUMPTION,
14
- cardTitleAlias: consumption ? _aliases.CARD_MAIN_TITLE : _aliases.CARD_SECONDARY_TITLE,
15
- cardDescriptionAlias: _aliases.CARD_DESCRIPTION,
16
- cardDescriptionRemainingAlias: remaining ? _aliases.CARD_DESCRIPTION_REMAINING : _aliases.CARD_DESCRIPTION,
17
- cardSubtitleAlias: remaining ? _aliases.CARD_SUBTITLE_REMAINING : _aliases.CARD_SUBTITLE,
18
- cardConsumptionDescriptionAlias: current ? _aliases.CARD_CONSUMPTION_DESCRIPTION_WHITE : _aliases.CARD_CONSUMPTION_DESCRIPTION_GRAY,
19
- cardConsumptionTextAlias: current ? _aliases.CARD_CONSUMPTION_TEXT_CURRENT : _aliases.CARD_CONSUMPTION_TEXT_REMAINING
20
- });
10
+ var getAliases = function getAliases(consumption, current, remaining) {
11
+ return {
12
+ magnitudeAlias: consumption ? _aliases.CARD_PRIMARY_MAGNITUDE : current ? _aliases.CARD_WHITE_MAGNITUDE : _aliases.CARD_GRAY_MAGNITUDE,
13
+ unitAlias: consumption ? _aliases.CARD_PRIMARY_UNIT : current ? _aliases.CARD_WHITE_UNIT : _aliases.CARD_GRAY_UNIT,
14
+ consumptionAlias: consumption ? _aliases.CARD_PRIMARY_CONSUMPTION : current ? _aliases.CARD_WHITE_CONSUMPTION : _aliases.CARD_GRAY_CONSUMPTION,
15
+ cardTitleAlias: consumption ? _aliases.CARD_MAIN_TITLE : _aliases.CARD_SECONDARY_TITLE,
16
+ cardDescriptionAlias: _aliases.CARD_DESCRIPTION,
17
+ cardDescriptionRemainingAlias: remaining ? _aliases.CARD_DESCRIPTION_REMAINING : _aliases.CARD_DESCRIPTION,
18
+ cardSubtitleAlias: remaining ? _aliases.CARD_SUBTITLE_REMAINING : _aliases.CARD_SUBTITLE,
19
+ cardConsumptionDescriptionAlias: current ? _aliases.CARD_CONSUMPTION_DESCRIPTION_WHITE : _aliases.CARD_CONSUMPTION_DESCRIPTION_GRAY,
20
+ cardConsumptionTextAlias: current ? _aliases.CARD_CONSUMPTION_TEXT_CURRENT : _aliases.CARD_CONSUMPTION_TEXT_REMAINING
21
+ };
22
+ };
21
23
 
22
24
  exports.getAliases = getAliases;
@@ -21,28 +21,25 @@ 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 HeaderConsumption = _ref => {
25
- let {
26
- contextApiInfo,
27
- startDate,
28
- endDate
29
- } = _ref;
30
- const {
31
- Label,
32
- assets,
33
- config
34
- } = contextApiInfo;
35
- const {
36
- ofPreposition,
37
- toPreposition
38
- } = config.texts.commons;
39
- const {
40
- CalendarIcon
41
- } = assets;
42
-
43
- const parseDate = date => (0, _dayjs.default)(date, 'DD/MM/YYYY');
44
-
45
- const formatDate = date => "".concat(parseDate(date).format('DD'), " ").concat(ofPreposition, " ").concat(parseDate(date).format('MMM'));
24
+ var HeaderConsumption = function HeaderConsumption(_ref) {
25
+ var contextApiInfo = _ref.contextApiInfo,
26
+ startDate = _ref.startDate,
27
+ endDate = _ref.endDate;
28
+ var Label = contextApiInfo.Label,
29
+ assets = contextApiInfo.assets,
30
+ config = contextApiInfo.config;
31
+ var _config$texts$commons = config.texts.commons,
32
+ ofPreposition = _config$texts$commons.ofPreposition,
33
+ toPreposition = _config$texts$commons.toPreposition;
34
+ var CalendarIcon = assets.CalendarIcon;
35
+
36
+ var parseDate = function parseDate(date) {
37
+ return (0, _dayjs.default)(date, 'DD/MM/YYYY');
38
+ };
39
+
40
+ var formatDate = function formatDate(date) {
41
+ return "".concat(parseDate(date).format('DD'), " ").concat(ofPreposition, " ").concat(parseDate(date).format('MMM'));
42
+ };
46
43
 
47
44
  return /*#__PURE__*/_react.default.createElement("div", {
48
45
  className: _stylesModule.default.container
@@ -19,22 +19,16 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
- const HeaderSettlement = _ref => {
23
- let {
24
- contextApiInfo,
25
- date,
26
- settlementNumber,
27
- isRemaining
28
- } = _ref;
29
- const {
30
- Label,
31
- config
32
- } = contextApiInfo;
33
- const {
34
- consumptionIncluded
35
- } = config.texts;
36
- const mainLabelAlias = isRemaining ? _aliases.HEADER_SETTLEMENT_REMAINING : _aliases.HEADER_SETTLEMENT;
37
- const dateLabelAlias = isRemaining ? _aliases.HEADER_SETTLEMENT_REMAINING_DATE : _aliases.HEADER_SETTLEMENT_DATE;
22
+ var HeaderSettlement = function HeaderSettlement(_ref) {
23
+ var contextApiInfo = _ref.contextApiInfo,
24
+ date = _ref.date,
25
+ settlementNumber = _ref.settlementNumber,
26
+ isRemaining = _ref.isRemaining;
27
+ var Label = contextApiInfo.Label,
28
+ config = contextApiInfo.config;
29
+ var consumptionIncluded = config.texts.consumptionIncluded;
30
+ var mainLabelAlias = isRemaining ? _aliases.HEADER_SETTLEMENT_REMAINING : _aliases.HEADER_SETTLEMENT;
31
+ var dateLabelAlias = isRemaining ? _aliases.HEADER_SETTLEMENT_REMAINING_DATE : _aliases.HEADER_SETTLEMENT_DATE;
38
32
  return /*#__PURE__*/_react.default.createElement("div", {
39
33
  className: "".concat(_stylesModule.default.container, " ").concat(isRemaining && _stylesModule.default.disabledContainer)
40
34
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -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
  });
@@ -19,53 +21,47 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
19
21
 
20
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
23
 
22
- 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); }
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); }
23
25
 
24
- 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 _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; }
25
27
 
26
28
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
29
 
28
- const TimelineRow = _ref => {
29
- let {
30
- contextApiInfo,
31
- cardTitle,
32
- cardSubtitle,
33
- cardDescription1,
34
- cardDescription2,
35
- startDate,
36
- endDate,
37
- unit,
38
- value,
39
- settlementNumber,
40
- isConsumption,
41
- isCurrent,
42
- isRemaining,
43
- currentIsFirstSettlement
44
- } = _ref;
45
- const {
46
- assets,
47
- config
48
- } = contextApiInfo;
49
- const {
50
- colors
51
- } = config;
52
- const {
53
- Minicheck,
54
- MinicheckRemaining,
55
- ClockIcon
56
- } = assets;
57
-
58
- const CardRender = (consumption, current, remaining, initialDate, finalDate) => /*#__PURE__*/_react.default.createElement(_Card.default, _extends({
59
- contextApiInfo: contextApiInfo,
60
- cardTitle: cardTitle,
61
- cardSubtitle: cardSubtitle,
62
- cardDescription1: cardDescription1,
63
- cardDescription2: cardDescription2,
64
- unit: unit,
65
- value: value,
66
- settlementNumber: settlementNumber,
67
- currentIsFirstSettlement: currentIsFirstSettlement
68
- }, consumption, current, remaining, initialDate, finalDate));
30
+ var TimelineRow = function TimelineRow(_ref) {
31
+ var contextApiInfo = _ref.contextApiInfo,
32
+ cardTitle = _ref.cardTitle,
33
+ cardSubtitle = _ref.cardSubtitle,
34
+ cardDescription1 = _ref.cardDescription1,
35
+ cardDescription2 = _ref.cardDescription2,
36
+ startDate = _ref.startDate,
37
+ endDate = _ref.endDate,
38
+ unit = _ref.unit,
39
+ value = _ref.value,
40
+ settlementNumber = _ref.settlementNumber,
41
+ isConsumption = _ref.isConsumption,
42
+ isCurrent = _ref.isCurrent,
43
+ isRemaining = _ref.isRemaining,
44
+ currentIsFirstSettlement = _ref.currentIsFirstSettlement;
45
+ var assets = contextApiInfo.assets,
46
+ config = contextApiInfo.config;
47
+ var colors = config.colors;
48
+ var Minicheck = assets.Minicheck,
49
+ MinicheckRemaining = assets.MinicheckRemaining,
50
+ ClockIcon = assets.ClockIcon;
51
+
52
+ var CardRender = function CardRender(consumption, current, remaining, initialDate, finalDate) {
53
+ return /*#__PURE__*/_react.default.createElement(_Card.default, _extends({
54
+ contextApiInfo: contextApiInfo,
55
+ cardTitle: cardTitle,
56
+ cardSubtitle: cardSubtitle,
57
+ cardDescription1: cardDescription1,
58
+ cardDescription2: cardDescription2,
59
+ unit: unit,
60
+ value: value,
61
+ settlementNumber: settlementNumber,
62
+ currentIsFirstSettlement: currentIsFirstSettlement
63
+ }, consumption, current, remaining, initialDate, finalDate));
64
+ };
69
65
 
70
66
  return /*#__PURE__*/_react.default.createElement("div", {
71
67
  className: "".concat(isConsumption ? _stylesModule.default.consumptionContainerRow : _stylesModule.default.settlementContainerRow && settlementNumber === 1 ? _stylesModule.default.settlementOne : _stylesModule.default.settlementTwo)