@widergy/utilitygo-smart-bill-web 2.2.2 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/components/Advice/index.js +10 -6
  3. package/dist/components/Amount/index.js +26 -21
  4. package/dist/components/Amount/utils.js +2 -5
  5. package/dist/components/Banner/index.js +10 -6
  6. package/dist/components/BarChart/constants.js +3 -3
  7. package/dist/components/BarChart/index.js +28 -22
  8. package/dist/components/BarChart/utils.js +17 -16
  9. package/dist/components/BillCalculation/components/ConceptCard/index.js +52 -45
  10. package/dist/components/BillCalculation/components/Glossary/index.js +48 -64
  11. package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
  12. package/dist/components/BillCalculation/constants.js +1 -1
  13. package/dist/components/BillCalculation/index.js +48 -51
  14. package/dist/components/BillCalculation/utils.js +22 -22
  15. package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -22
  16. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +1 -1
  17. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +15 -15
  18. package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
  19. package/dist/components/BillSummary/components/BilledConcepts/constants.js +13 -14
  20. package/dist/components/BillSummary/components/BilledConcepts/index.js +29 -39
  21. package/dist/components/BillSummary/components/BilledConcepts/utils.js +50 -69
  22. package/dist/components/BillSummary/index.js +70 -69
  23. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
  24. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +17 -10
  25. package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +3 -2
  26. package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +147 -133
  27. package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +16 -14
  28. package/dist/components/ConsumptionComparison/components/ComparisonTable/styles.module.scss +1 -0
  29. package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +88 -89
  30. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +21 -11
  31. package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +3 -2
  32. package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +21 -14
  33. package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +1 -0
  34. package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +15 -10
  35. package/dist/components/ConsumptionComparison/index.js +41 -45
  36. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +27 -22
  37. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
  38. package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +18 -13
  39. package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -12
  40. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +21 -15
  41. package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +3 -2
  42. package/dist/components/ConsumptionEnergyDetails/index.js +46 -41
  43. package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
  44. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +64 -60
  45. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +12 -13
  46. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +20 -17
  47. package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +16 -10
  48. package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +42 -37
  49. package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
  50. package/dist/components/ConsumptionIncluded/index.js +31 -32
  51. package/dist/components/ConsumptionIncluded/utils.js +32 -34
  52. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +14 -10
  53. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/styles.module.scss +1 -0
  54. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +23 -20
  55. package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/styles.module.scss +1 -0
  56. package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +18 -26
  57. package/dist/components/ConsumptionPeriod/components/Reading/index.js +35 -32
  58. package/dist/components/ConsumptionPeriod/index.js +12 -8
  59. package/dist/components/ConsumptionPeriod/styles.module.scss +1 -0
  60. package/dist/components/ConsumptionPeriod/utils.js +14 -15
  61. package/dist/components/Date/index.js +12 -9
  62. package/dist/components/DebtState/index.js +14 -8
  63. package/dist/components/IconAndDetails/index.js +19 -17
  64. package/dist/components/Magnitude/index.js +15 -12
  65. package/dist/components/Magnitude/utils.js +3 -8
  66. package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +18 -14
  67. package/dist/components/MainBillData/components/BillAlert/index.js +24 -31
  68. package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +19 -11
  69. package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +14 -11
  70. package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +2 -3
  71. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +23 -15
  72. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +3 -2
  73. package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +3 -2
  74. package/dist/components/MainBillData/components/BillBody/index.js +42 -44
  75. package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +16 -11
  76. package/dist/components/MainBillData/components/BillHeader/index.js +29 -24
  77. package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
  78. package/dist/components/MainBillData/index.js +7 -5
  79. package/dist/components/MainBillData/theme.js +8 -9
  80. package/dist/components/MainBillData/utils.js +2 -5
  81. package/dist/components/Period/index.js +54 -43
  82. package/dist/components/Period/styles.module.scss +0 -6
  83. package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +15 -11
  84. package/dist/components/PowerProgresBar/index.js +31 -30
  85. package/dist/components/RateAndCategory/index.js +25 -27
  86. package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +20 -13
  87. package/dist/components/RatesDefinition/components/BillRate/index.js +24 -14
  88. package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
  89. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +14 -9
  90. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +26 -21
  91. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +11 -7
  92. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
  93. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +11 -10
  94. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +21 -19
  95. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +34 -36
  96. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -2
  97. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +17 -30
  98. package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +37 -48
  99. package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -18
  100. package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +23 -31
  101. package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +2 -5
  102. package/dist/components/RatesDefinition/components/PurchasedRate/index.js +19 -13
  103. package/dist/components/RatesDefinition/index.js +20 -15
  104. package/dist/components/RatesDefinition/styles.module.scss +1 -1
  105. package/dist/components/SmartBillProvider/index.js +12 -34
  106. package/dist/components/StyledAmount/constants.js +1 -1
  107. package/dist/components/StyledAmount/index.js +19 -27
  108. package/dist/components/WithContextApi/index.js +18 -25
  109. package/dist/components/WithContextApi/layout.js +2 -2
  110. package/dist/components/WithSeason/index.js +6 -9
  111. package/dist/constants/deviceSizes.js +33 -18
  112. package/dist/constants/seasons.js +2 -2
  113. package/dist/index.js +14 -15
  114. package/dist/scss/variables/commonColors.module.scss +1 -1
  115. package/dist/shared/Context/index.js +7 -3
  116. package/dist/shared/constants/aliases.js +691 -556
  117. package/dist/shared/constants/consumptions.js +4 -4
  118. package/dist/shared/constants/periodicities.js +1 -1
  119. package/dist/shared/constants/rates.js +1 -1
  120. package/dist/shared/constants/readings.js +2 -2
  121. package/dist/shared/constants/seasons.js +2 -2
  122. package/dist/shared/constants/stagesGraph.js +4 -4
  123. package/dist/shared/types/assetsTypes.js +1 -1
  124. package/dist/shared/types/billDataTypes.js +5 -5
  125. package/dist/shared/types/componentsTypes.js +18 -10
  126. package/dist/shared/types/formattersTypes.js +1 -1
  127. package/dist/shared/types/rateStagesTypes.js +3 -3
  128. package/dist/shared/types/smartBillTypes.js +5 -10
  129. package/dist/shared/types/textsTypes.js +1 -1
  130. package/dist/shared/utils/billCalculation.js +11 -10
  131. package/dist/shared/utils/consumptions.js +34 -56
  132. package/dist/shared/utils/context.js +8 -6
  133. package/dist/shared/utils/expirations.js +2 -5
  134. package/dist/shared/utils/periods.js +20 -21
  135. package/dist/shared/utils/rates.js +2 -5
  136. package/dist/shared/utils/readings.js +4 -10
  137. package/dist/shared/utils/season.js +2 -5
  138. package/dist/shared/utils/stagesGraph.js +15 -15
  139. package/dist/utils/hooks.js +1 -1
  140. package/dist/utils.js +7 -8
  141. package/package.json +26 -63
@@ -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
  });
@@ -13,38 +12,38 @@ var _utils = require("./utils");
13
12
  var _TimelineRow = _interopRequireDefault(require("./components/TimelineRow"));
14
13
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
15
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- 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); }
17
- 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; }
18
- var ConsumptionIncluded = function ConsumptionIncluded(_ref) {
19
- var contextApiInfo = _ref.contextApiInfo,
20
- billData = _ref.billData;
21
- var config = contextApiInfo.config;
22
- var consumptionIncluded = config.texts.consumptionIncluded;
23
- var data = (0, _react.useMemo)(function () {
24
- return (0, _utils.dataMapper)(billData.periods, consumptionIncluded);
25
- }, [billData.periods, consumptionIncluded]);
26
- var currentIsFirstSettlement = data.some(function (item) {
27
- return item.isCurrent && item.settlementNumber === 1;
15
+ 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); }
16
+ 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; }
17
+ const ConsumptionIncluded = _ref => {
18
+ let {
19
+ contextApiInfo,
20
+ billData
21
+ } = _ref;
22
+ const {
23
+ config
24
+ } = contextApiInfo;
25
+ const {
26
+ consumptionIncluded
27
+ } = config.texts;
28
+ const data = (0, _react.useMemo)(() => (0, _utils.dataMapper)(billData.periods, consumptionIncluded), [billData.periods, consumptionIncluded]);
29
+ const currentIsFirstSettlement = data.some(item => item.isCurrent && item.settlementNumber === 1);
30
+ const handleRenderTimelineRow = item => /*#__PURE__*/_react.default.createElement(_TimelineRow.default, {
31
+ cardTitle: item.cardTitle,
32
+ cardSubtitle: item.cardSubtitle,
33
+ cardDescription1: item.cardDescription1,
34
+ cardDescription2: item.cardDescription2,
35
+ contextApiInfo: contextApiInfo,
36
+ startDate: item.startDate,
37
+ endDate: item.endDate,
38
+ unit: item.unit,
39
+ value: item.value,
40
+ settlementNumber: item.settlementNumber,
41
+ date: item.date,
42
+ isConsumption: item.isConsumption,
43
+ isCurrent: item.isCurrent,
44
+ isRemaining: item.isRemaining,
45
+ currentIsFirstSettlement: currentIsFirstSettlement
28
46
  });
29
- var handleRenderTimelineRow = function handleRenderTimelineRow(item) {
30
- return /*#__PURE__*/_react.default.createElement(_TimelineRow.default, {
31
- cardTitle: item.cardTitle,
32
- cardSubtitle: item.cardSubtitle,
33
- cardDescription1: item.cardDescription1,
34
- cardDescription2: item.cardDescription2,
35
- contextApiInfo: contextApiInfo,
36
- startDate: item.startDate,
37
- endDate: item.endDate,
38
- unit: item.unit,
39
- value: item.value,
40
- settlementNumber: item.settlementNumber,
41
- date: item.date,
42
- isConsumption: item.isConsumption,
43
- isCurrent: item.isCurrent,
44
- isRemaining: item.isRemaining,
45
- currentIsFirstSettlement: currentIsFirstSettlement
46
- });
47
- };
48
47
  return /*#__PURE__*/_react.default.createElement("div", {
49
48
  className: _stylesModule.default.titleContainer
50
49
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -10,51 +10,52 @@ var _consumptions = require("../../shared/utils/consumptions");
10
10
  var _periodicities = require("../../shared/constants/periodicities");
11
11
  var _consumptions2 = require("../../shared/constants/consumptions");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
- var getBimesterDateTitle = function getBimesterDateTitle(_ref, text) {
14
- var year = _ref.year,
15
- number = _ref.number,
16
- settlements = _ref.settlements;
17
- var isPeriodicity = (0, _string.stringToCompareWithoutAccentsInclusive)(settlements === null || settlements === void 0 ? void 0 : settlements.periodicity, _periodicities.PERIODICITY.BIMONTHLY);
13
+ const getBimesterDateTitle = (_ref, text) => {
14
+ let {
15
+ year,
16
+ number,
17
+ settlements
18
+ } = _ref;
19
+ const isPeriodicity = (0, _string.stringToCompareWithoutAccentsInclusive)(settlements === null || settlements === void 0 ? void 0 : settlements.periodicity, _periodicities.PERIODICITY.BIMONTHLY);
18
20
  if (!number || !year || !isPeriodicity) return '-';
19
21
  return "".concat(text.bimester, " ").concat(number, " ").concat(text.of, " ").concat(year.substring(2));
20
22
  };
21
- var getBimesterDate = exports.getBimesterDate = function getBimesterDate(periods, text) {
22
- var currentPeriod = periods.find(function (item) {
23
- return item.current;
24
- });
23
+ const getBimesterDate = (periods, text) => {
24
+ const currentPeriod = periods.find(item => item.current);
25
25
  if (!currentPeriod) return '-';
26
26
  return getBimesterDateTitle(currentPeriod, text);
27
27
  };
28
- var getTotalDaysDescriptionComsumption = function getTotalDaysDescriptionComsumption(period, texts) {
28
+ exports.getBimesterDate = getBimesterDate;
29
+ const getTotalDaysDescriptionComsumption = (period, texts) => {
29
30
  var _period$settlements;
30
- var totalDays = period === null || period === void 0 || (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.total_settlements_days;
31
+ const totalDays = period === null || period === void 0 || (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.total_settlements_days;
31
32
  return "".concat(totalDays, " ").concat(texts.days);
32
33
  };
33
- var getTotalDaysDescriptionSettlement = function getTotalDaysDescriptionSettlement(period, texts, dataRetriver) {
34
+ const getTotalDaysDescriptionSettlement = (period, texts, dataRetriver) => {
34
35
  var _period$settlements2;
35
- var totalDays = period === null || period === void 0 || (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.total_settlements_days;
36
- var currentConsumptionDays = dataRetriver(period).days;
36
+ const totalDays = period === null || period === void 0 || (_period$settlements2 = period.settlements) === null || _period$settlements2 === void 0 ? void 0 : _period$settlements2.total_settlements_days;
37
+ const currentConsumptionDays = dataRetriver(period).days;
37
38
  return currentConsumptionDays && totalDays ? "".concat(currentConsumptionDays, " ").concat(texts.of, " ").concat(totalDays, " ").concat(texts.days) : '-';
38
39
  };
39
- var getConsumptionDescriptionSettlement = function getConsumptionDescriptionSettlement(period, texts) {
40
- var totalConsumption = (0, _consumptions.getTotalConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE);
40
+ const getConsumptionDescriptionSettlement = (period, texts) => {
41
+ const totalConsumption = (0, _consumptions.getTotalConsumption)(period, _consumptions2.ENERGY_TYPES.ACTIVE);
41
42
  return totalConsumption.unit ? "".concat(texts.of, " ").concat(totalConsumption.value, " ").concat(totalConsumption.unit) : '-';
42
43
  };
43
- var getCardSubtitleSettlement = function getCardSubtitleSettlement(period, text, dataRetriver) {
44
+ const getCardSubtitleSettlement = (period, text, dataRetriver) => {
44
45
  var _period$settlements3;
45
- var currentSettlement = dataRetriver(period).number || 0;
46
- var totalSettlements = (period === null || period === void 0 || (_period$settlements3 = period.settlements) === null || _period$settlements3 === void 0 ? void 0 : _period$settlements3.total_settlements) || 0;
46
+ const currentSettlement = dataRetriver(period).number || 0;
47
+ const totalSettlements = (period === null || period === void 0 || (_period$settlements3 = period.settlements) === null || _period$settlements3 === void 0 ? void 0 : _period$settlements3.total_settlements) || 0;
47
48
  return "".concat(text.settlement, " ").concat(currentSettlement, " ").concat(text.of, " ").concat(totalSettlements);
48
49
  };
49
- var getCurrent = function getCurrent(period) {
50
+ const getCurrent = period => {
50
51
  var _period$settlements4;
51
52
  return (period === null || period === void 0 || (_period$settlements4 = period.settlements) === null || _period$settlements4 === void 0 ? void 0 : _period$settlements4.current) || {};
52
53
  };
53
- var getRemaining = function getRemaining(period) {
54
+ const getRemaining = period => {
54
55
  var _period$settlements5;
55
56
  return (period === null || period === void 0 || (_period$settlements5 = period.settlements) === null || _period$settlements5 === void 0 || (_period$settlements5 = _period$settlements5.remaining) === null || _period$settlements5 === void 0 ? void 0 : _period$settlements5[0]) || {};
56
57
  };
57
- var consumptionMapper = function consumptionMapper(period, texts) {
58
+ const consumptionMapper = (period, texts) => {
58
59
  var _period$settlements6, _period$settlements7;
59
60
  return {
60
61
  startDate: period !== null && period !== void 0 && (_period$settlements6 = period.settlements) !== null && _period$settlements6 !== void 0 && _period$settlements6.start_date ? (0, _dayjs.default)(period.settlements.start_date).format('DD/MM/YYYY') : '-',
@@ -68,7 +69,7 @@ var consumptionMapper = function consumptionMapper(period, texts) {
68
69
  order: 0
69
70
  };
70
71
  };
71
- var settlementCurrentMapper = function settlementCurrentMapper(period, texts) {
72
+ const settlementCurrentMapper = (period, texts) => {
72
73
  var _period$settlements8, _period$settlements9, _period$settlements10;
73
74
  return {
74
75
  cardTitle: texts.billing,
@@ -83,7 +84,7 @@ var settlementCurrentMapper = function settlementCurrentMapper(period, texts) {
83
84
  order: period === null || period === void 0 || (_period$settlements10 = period.settlements) === null || _period$settlements10 === void 0 || (_period$settlements10 = _period$settlements10.current) === null || _period$settlements10 === void 0 ? void 0 : _period$settlements10.number
84
85
  };
85
86
  };
86
- var settlementRemainingMapper = function settlementRemainingMapper(period, texts) {
87
+ const settlementRemainingMapper = (period, texts) => {
87
88
  var _period$settlements11, _period$settlements12, _period$settlements13;
88
89
  return {
89
90
  cardTitle: texts.billing,
@@ -98,14 +99,11 @@ var settlementRemainingMapper = function settlementRemainingMapper(period, texts
98
99
  order: period === null || period === void 0 || (_period$settlements13 = period.settlements) === null || _period$settlements13 === void 0 || (_period$settlements13 = _period$settlements13.remaining) === null || _period$settlements13 === void 0 || (_period$settlements13 = _period$settlements13[0]) === null || _period$settlements13 === void 0 ? void 0 : _period$settlements13.number
99
100
  };
100
101
  };
101
- var dataMapper = exports.dataMapper = function dataMapper() {
102
- var periods = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
103
- var texts = arguments.length > 1 ? arguments[1] : undefined;
104
- var currentPeriod = periods.find(function (item) {
105
- return item.current;
106
- });
102
+ const dataMapper = function () {
103
+ let periods = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
104
+ let texts = arguments.length > 1 ? arguments[1] : undefined;
105
+ const currentPeriod = periods.find(item => item.current);
107
106
  if (!currentPeriod) return [];
108
- return [consumptionMapper(currentPeriod, texts), settlementCurrentMapper(currentPeriod, texts), settlementRemainingMapper(currentPeriod, texts)].sort(function (a, b) {
109
- return a.order - b.order;
110
- });
111
- };
107
+ return [consumptionMapper(currentPeriod, texts), settlementCurrentMapper(currentPeriod, texts), settlementRemainingMapper(currentPeriod, texts)].sort((a, b) => a.order - b.order);
108
+ };
109
+ exports.dataMapper = dataMapper;
@@ -11,16 +11,20 @@ var _WithContextApi = _interopRequireDefault(require("../../../../../WithContext
11
11
  var _Magnitude = _interopRequireDefault(require("../../../../../Magnitude"));
12
12
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- var ReadingRow = function ReadingRow(_ref) {
15
- var alias = _ref.alias,
16
- numberAlias = _ref.numberAlias,
17
- unitAlias = _ref.unitAlias,
18
- contextApiInfo = _ref.contextApiInfo,
19
- text = _ref.text,
20
- value = _ref.value,
21
- unit = _ref.unit,
22
- disableUnit = _ref.disableUnit;
23
- var Label = contextApiInfo.Label;
14
+ const ReadingRow = _ref => {
15
+ let {
16
+ alias,
17
+ numberAlias,
18
+ unitAlias,
19
+ contextApiInfo,
20
+ text,
21
+ value,
22
+ unit,
23
+ disableUnit
24
+ } = _ref;
25
+ const {
26
+ Label
27
+ } = contextApiInfo;
24
28
  return /*#__PURE__*/_react.default.createElement("div", {
25
29
  className: _stylesModule.default.container
26
30
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -2,6 +2,7 @@
2
2
 
3
3
  .container {
4
4
  align-items: center;
5
+ box-sizing: border-box;
5
6
  display: flex;
6
7
  justify-content: space-between;
7
8
  padding: 0 24px;
@@ -13,26 +13,29 @@ var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"))
13
13
  var _ReadingRow = _interopRequireDefault(require("./components/ReadingRow"));
14
14
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- var ConsumptionSummary = function ConsumptionSummary(_ref) {
17
- var contextApiInfo = _ref.contextApiInfo,
18
- periodNumber = _ref.periodNumber,
19
- year = _ref.year,
20
- initialReadingDate = _ref.initialReadingDate,
21
- finalReadingDate = _ref.finalReadingDate,
22
- totalSettlementsDays = _ref.totalSettlementsDays,
23
- initialReadingValue = _ref.initialReadingValue,
24
- finalReadingValue = _ref.finalReadingValue,
25
- totalConsumptionValue = _ref.totalConsumptionValue,
26
- totalConsumptionUnit = _ref.totalConsumptionUnit,
27
- _ref$classes = _ref.classes,
28
- classes = _ref$classes === void 0 ? {} : _ref$classes;
29
- var config = contextApiInfo.config,
30
- Label = contextApiInfo.Label;
31
- var texts = config.texts;
32
- var formatDate = function formatDate(date) {
33
- return (0, _dayjs.default)(date).format('DD/MM/YYYY');
34
- };
35
- var daysLabel = totalSettlementsDays ? "(".concat(totalSettlementsDays, " ").concat(texts.consumptionPeriod.days, ")") : '';
16
+ const ConsumptionSummary = _ref => {
17
+ let {
18
+ contextApiInfo,
19
+ periodNumber,
20
+ year,
21
+ initialReadingDate,
22
+ finalReadingDate,
23
+ totalSettlementsDays,
24
+ initialReadingValue,
25
+ finalReadingValue,
26
+ totalConsumptionValue,
27
+ totalConsumptionUnit,
28
+ classes = {}
29
+ } = _ref;
30
+ const {
31
+ config,
32
+ Label
33
+ } = contextApiInfo;
34
+ const {
35
+ texts
36
+ } = config;
37
+ const formatDate = date => (0, _dayjs.default)(date).format('DD/MM/YYYY');
38
+ const daysLabel = totalSettlementsDays ? "(".concat(totalSettlementsDays, " ").concat(texts.consumptionPeriod.days, ")") : '';
36
39
  return /*#__PURE__*/_react.default.createElement("div", {
37
40
  className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
38
41
  }, periodNumber && year && /*#__PURE__*/_react.default.createElement(Label, {
@@ -16,6 +16,7 @@
16
16
  }
17
17
 
18
18
  .substraction {
19
+ box-sizing: border-box;
19
20
  display: flex;
20
21
  justify-content: flex-end;
21
22
  padding-right: 124px;
@@ -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
  });
@@ -15,34 +14,27 @@ var _deviceSizes = require("../../../../constants/deviceSizes");
15
14
  var _BarChart = _interopRequireDefault(require("../../../BarChart"));
16
15
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
- 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); }
19
- 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; }
20
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
- 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."); }
22
- 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); }
23
- 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; }
24
- 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; } }
25
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
26
- var HistoryGraph = function HistoryGraph(_ref) {
27
- var billData = _ref.billData,
28
- contextApiInfo = _ref.contextApiInfo;
29
- var config = contextApiInfo.config;
30
- var showPeriodsInChronologicalOrder = config.showPeriodsInChronologicalOrder;
31
- var _useState = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint)),
32
- _useState2 = _slicedToArray(_useState, 2),
33
- isDesktopSize = _useState2[0],
34
- setIsDesktopSize = _useState2[1];
35
- var handleResizeScreen = function handleResizeScreen() {
36
- return setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
37
- };
38
- (0, _react.useEffect)(function () {
17
+ 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); }
18
+ 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; }
19
+ const HistoryGraph = _ref => {
20
+ let {
21
+ billData,
22
+ contextApiInfo
23
+ } = _ref;
24
+ const {
25
+ config
26
+ } = contextApiInfo;
27
+ const {
28
+ showPeriodsInChronologicalOrder
29
+ } = config;
30
+ const [isDesktopSize, setIsDesktopSize] = (0, _react.useState)((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
31
+ const handleResizeScreen = () => setIsDesktopSize((0, _browser.isDesktop)(_deviceSizes.TabletBreakpoint));
32
+ (0, _react.useEffect)(() => {
39
33
  window.addEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
40
34
  handleResizeScreen();
41
- return function () {
42
- return window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
43
- };
35
+ return () => window.removeEventListener(_browser.RESIZE_EVENT, handleResizeScreen);
44
36
  }, []);
45
- var consumptionHistoryData = (0, _consumptions.getConsumptionHistoryData)(billData, _consumptions2.ENERGY_TYPES.ACTIVE, showPeriodsInChronologicalOrder);
37
+ const consumptionHistoryData = (0, _consumptions.getConsumptionHistoryData)(billData, _consumptions2.ENERGY_TYPES.ACTIVE, showPeriodsInChronologicalOrder);
46
38
  return /*#__PURE__*/_react.default.createElement("div", {
47
39
  className: _stylesModule.default.container
48
40
  }, /*#__PURE__*/_react.default.createElement(_BarChart.default, {
@@ -15,38 +15,41 @@ var _IconAndDetails = _interopRequireDefault(require("../../../IconAndDetails"))
15
15
  var _aliases = require("../../../../shared/constants/aliases");
16
16
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
- var Reading = function Reading(_ref) {
19
- var contextApiInfo = _ref.contextApiInfo,
20
- title = _ref.title,
21
- date = _ref.date,
22
- readingType = _ref.readingType,
23
- readingValue = _ref.readingValue,
24
- tooltip = _ref.tooltip,
25
- _ref$classes = _ref.classes,
26
- classes = _ref$classes === void 0 ? {} : _ref$classes;
27
- var assets = contextApiInfo.assets,
28
- config = contextApiInfo.config,
29
- Label = contextApiInfo.Label,
30
- Tooltip = contextApiInfo.Tooltip;
31
- var texts = config.texts,
32
- colors = config.colors;
33
- var InfoIcon = assets.InfoIcon,
34
- ReadingDateIcon = assets.ReadingDateIcon,
35
- ReadingTypeIcon = assets.ReadingTypeIcon,
36
- EnergyIcon = assets.EnergyIcon;
37
- var TitleLabel = function TitleLabel() {
38
- return /*#__PURE__*/_react.default.createElement(Label, {
39
- alias: _aliases.READING_TITLE,
40
- className: "".concat(!tooltip && _stylesModule.default.title)
41
- }, title);
42
- };
43
- var EnergyIconStyled = function EnergyIconStyled() {
44
- return /*#__PURE__*/_react.default.createElement(EnergyIcon, {
45
- style: {
46
- fill: colors.primary
47
- }
48
- });
49
- };
18
+ const Reading = _ref => {
19
+ let {
20
+ contextApiInfo,
21
+ title,
22
+ date,
23
+ readingType,
24
+ readingValue,
25
+ tooltip,
26
+ classes = {}
27
+ } = _ref;
28
+ const {
29
+ assets,
30
+ config,
31
+ Label,
32
+ Tooltip
33
+ } = contextApiInfo;
34
+ const {
35
+ texts,
36
+ colors
37
+ } = config;
38
+ const {
39
+ InfoIcon,
40
+ ReadingDateIcon,
41
+ ReadingTypeIcon,
42
+ EnergyIcon
43
+ } = assets;
44
+ const TitleLabel = () => /*#__PURE__*/_react.default.createElement(Label, {
45
+ alias: _aliases.READING_TITLE,
46
+ className: "".concat(!tooltip && _stylesModule.default.title)
47
+ }, title);
48
+ const EnergyIconStyled = () => /*#__PURE__*/_react.default.createElement(EnergyIcon, {
49
+ style: {
50
+ fill: colors.primary
51
+ }
52
+ });
50
53
  return /*#__PURE__*/_react.default.createElement("div", {
51
54
  className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
52
55
  }, tooltip ? /*#__PURE__*/_react.default.createElement("div", {
@@ -18,15 +18,19 @@ var _utils = require("./utils");
18
18
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
21
- var ConsumptionPeriod = function ConsumptionPeriod(_ref) {
21
+ const ConsumptionPeriod = _ref => {
22
22
  var _currentPeriod$settle, _currentPeriod$settle2;
23
- var contextApiInfo = _ref.contextApiInfo,
24
- billData = _ref.billData;
25
- var texts = contextApiInfo.config.texts;
26
- var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
27
- var initialReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.INITIAL);
28
- var finalReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.FINAL);
29
- var consumptionSummaryProps = (0, _utils.getConsumptionSummaryProps)(currentPeriod, initialReading, finalReading);
23
+ let {
24
+ contextApiInfo,
25
+ billData
26
+ } = _ref;
27
+ const {
28
+ texts
29
+ } = contextApiInfo.config;
30
+ const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
31
+ const initialReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.INITIAL);
32
+ const finalReading = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.FINAL);
33
+ const consumptionSummaryProps = (0, _utils.getConsumptionSummaryProps)(currentPeriod, initialReading, finalReading);
30
34
  return /*#__PURE__*/_react.default.createElement("div", {
31
35
  className: _stylesModule.default.container
32
36
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -53,6 +53,7 @@
53
53
  }
54
54
 
55
55
  .mobileSummary {
56
+ box-sizing: border-box;
56
57
  margin-bottom: 16px;
57
58
  width: 100%;
58
59
 
@@ -8,18 +8,17 @@ var _seamlessImmutable = require("seamless-immutable");
8
8
  var _consumptions = require("../../shared/utils/consumptions");
9
9
  var _readings = require("../../shared/utils/readings");
10
10
  var _consumptions2 = require("../../shared/constants/consumptions");
11
- var getConsumptionSummaryProps = exports.getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeriod, initialReading, finalReading) {
12
- return {
13
- periodNumber: currentPeriod.number,
14
- year: currentPeriod.year,
15
- initialReadingDate: initialReading.date,
16
- finalReadingDate: finalReading.date,
17
- totalSettlementsDays: (0, _seamlessImmutable.getIn)(currentPeriod, ['settlements', 'total_settlements_days']),
18
- initialReadingValue: (0, _readings.getActiveEnergyRecord)(initialReading).value,
19
- initialReadingUnit: (0, _readings.getActiveEnergyRecord)(initialReading).unit,
20
- finalReadingValue: (0, _readings.getActiveEnergyRecord)(finalReading).value,
21
- finalReadingUnit: (0, _readings.getActiveEnergyRecord)(finalReading).unit,
22
- totalConsumptionValue: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).value,
23
- totalConsumptionUnit: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).unit
24
- };
25
- };
11
+ const getConsumptionSummaryProps = (currentPeriod, initialReading, finalReading) => ({
12
+ periodNumber: currentPeriod.number,
13
+ year: currentPeriod.year,
14
+ initialReadingDate: initialReading.date,
15
+ finalReadingDate: finalReading.date,
16
+ totalSettlementsDays: (0, _seamlessImmutable.getIn)(currentPeriod, ['settlements', 'total_settlements_days']),
17
+ initialReadingValue: (0, _readings.getActiveEnergyRecord)(initialReading).value,
18
+ initialReadingUnit: (0, _readings.getActiveEnergyRecord)(initialReading).unit,
19
+ finalReadingValue: (0, _readings.getActiveEnergyRecord)(finalReading).value,
20
+ finalReadingUnit: (0, _readings.getActiveEnergyRecord)(finalReading).unit,
21
+ totalConsumptionValue: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).value,
22
+ totalConsumptionUnit: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).unit
23
+ });
24
+ exports.getConsumptionSummaryProps = getConsumptionSummaryProps;
@@ -11,15 +11,18 @@ var _smartBillTypes = require("../../shared/types/smartBillTypes");
11
11
  var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
12
12
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- var Date = function Date(_ref) {
15
- var contextApiInfo = _ref.contextApiInfo,
16
- date = _ref.date,
17
- text = _ref.text,
18
- _ref$classes = _ref.classes,
19
- classes = _ref$classes === void 0 ? {} : _ref$classes,
20
- mainAlias = _ref.mainAlias,
21
- detailAlias = _ref.detailAlias;
22
- var Label = contextApiInfo.Label;
14
+ const Date = _ref => {
15
+ let {
16
+ contextApiInfo,
17
+ date,
18
+ text,
19
+ classes = {},
20
+ mainAlias,
21
+ detailAlias
22
+ } = _ref;
23
+ const {
24
+ Label
25
+ } = contextApiInfo;
23
26
  return /*#__PURE__*/_react.default.createElement("div", {
24
27
  className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
25
28
  }, /*#__PURE__*/_react.default.createElement(Label, {
@@ -11,14 +11,20 @@ var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
11
11
  var _aliases = require("../../shared/constants/aliases");
12
12
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
- var DebtState = function DebtState(_ref) {
15
- var contextApiInfo = _ref.contextApiInfo,
16
- debtStatusLabel = _ref.debtStatusLabel,
17
- isWarning = _ref.isWarning;
18
- var assets = contextApiInfo.assets,
19
- Label = contextApiInfo.Label;
20
- var PendingDebtIcon = assets.PendingDebtIcon,
21
- AdheredToServiceIcon = assets.AdheredToServiceIcon;
14
+ const DebtState = _ref => {
15
+ let {
16
+ contextApiInfo,
17
+ debtStatusLabel,
18
+ isWarning
19
+ } = _ref;
20
+ const {
21
+ assets,
22
+ Label
23
+ } = contextApiInfo;
24
+ const {
25
+ PendingDebtIcon,
26
+ AdheredToServiceIcon
27
+ } = assets;
22
28
  return /*#__PURE__*/_react.default.createElement("div", {
23
29
  className: "".concat(_stylesModule.default.container, " ").concat(isWarning ? _stylesModule.default.withDebtsContainer : _stylesModule.default.adheredToAutomaticDebt, " ")
24
30
  }, isWarning ? /*#__PURE__*/_react.default.createElement(PendingDebtIcon, null) : /*#__PURE__*/_react.default.createElement(AdheredToServiceIcon, null), /*#__PURE__*/_react.default.createElement(Label, {
@@ -13,23 +13,25 @@ var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
13
13
  var _utils = require("../../utils");
14
14
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
- var IconAndDetails = function IconAndDetails(_ref) {
17
- var children = _ref.children,
18
- contextApiInfo = _ref.contextApiInfo,
19
- Icon = _ref.Icon,
20
- mainText = _ref.mainText,
21
- secondaryText = _ref.secondaryText,
22
- descriptionText = _ref.descriptionText,
23
- tooltip = _ref.tooltip,
24
- mainAlias = _ref.mainAlias,
25
- secondaryAlias = _ref.secondaryAlias,
26
- _ref$tertiaryAlias = _ref.tertiaryAlias,
27
- tertiaryAlias = _ref$tertiaryAlias === void 0 ? secondaryAlias : _ref$tertiaryAlias,
28
- _ref$classes = _ref.classes,
29
- classes = _ref$classes === void 0 ? {} : _ref$classes;
30
- var Label = contextApiInfo.Label,
31
- Tooltip = contextApiInfo.Tooltip;
32
- var repeatedData = mainText && secondaryText && (0, _string.stringCompare)(mainText, secondaryText);
16
+ const IconAndDetails = _ref => {
17
+ let {
18
+ children,
19
+ contextApiInfo,
20
+ Icon,
21
+ mainText,
22
+ secondaryText,
23
+ descriptionText,
24
+ tooltip,
25
+ mainAlias,
26
+ secondaryAlias,
27
+ tertiaryAlias = secondaryAlias,
28
+ classes = {}
29
+ } = _ref;
30
+ const {
31
+ Label,
32
+ Tooltip
33
+ } = contextApiInfo;
34
+ const repeatedData = mainText && secondaryText && (0, _string.stringCompare)(mainText, secondaryText);
33
35
  return /*#__PURE__*/_react.default.createElement("div", {
34
36
  className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
35
37
  }, /*#__PURE__*/_react.default.createElement(Tooltip, {