@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.
- package/CHANGELOG.md +28 -0
- package/dist/components/Advice/index.js +6 -10
- package/dist/components/Amount/index.js +21 -26
- package/dist/components/Amount/utils.js +5 -1
- package/dist/components/Banner/index.js +6 -10
- package/dist/components/BarChart/constants.js +3 -3
- package/dist/components/BarChart/index.js +25 -28
- package/dist/components/BarChart/utils.js +15 -15
- package/dist/components/BillCalculation/components/ConceptCard/index.js +48 -47
- package/dist/components/BillCalculation/constants.js +1 -1
- package/dist/components/BillCalculation/index.js +54 -44
- package/dist/components/BillCalculation/utils.js +14 -17
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +25 -26
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +31 -34
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +14 -12
- package/dist/components/BillSummary/components/BilledConcepts/index.js +49 -31
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +76 -44
- package/dist/components/BillSummary/index.js +78 -76
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +8 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +12 -17
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +135 -148
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +14 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +94 -89
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +11 -21
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +16 -21
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +9 -13
- package/dist/components/ConsumptionComparison/index.js +56 -42
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -30
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +13 -18
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +15 -17
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +17 -21
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
- package/dist/components/ConsumptionEnergyDetails/index.js +55 -52
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +12 -0
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -66
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +13 -11
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +19 -22
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +10 -16
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +39 -43
- package/dist/components/ConsumptionIncluded/index.js +36 -34
- package/dist/components/ConsumptionIncluded/utils.js +33 -29
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +10 -14
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +22 -25
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +34 -18
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +34 -37
- package/dist/components/ConsumptionPeriod/index.js +8 -12
- package/dist/components/ConsumptionPeriod/utils.js +15 -13
- package/dist/components/Date/index.js +9 -12
- package/dist/components/DebtState/index.js +8 -14
- package/dist/components/IconAndDetails/index.js +17 -19
- package/dist/components/Magnitude/index.js +12 -15
- package/dist/components/Magnitude/utils.js +8 -2
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +16 -20
- package/dist/components/MainBillData/components/BillAlert/index.js +45 -28
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +11 -19
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +11 -14
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +3 -1
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +15 -23
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
- package/dist/components/MainBillData/components/BillBody/index.js +50 -45
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +9 -15
- package/dist/components/MainBillData/components/BillHeader/index.js +26 -29
- package/dist/components/MainBillData/index.js +5 -7
- package/dist/components/MainBillData/theme.js +9 -7
- package/dist/components/MainBillData/utils.js +5 -1
- package/dist/components/Period/index.js +47 -55
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +11 -15
- package/dist/components/PowerProgresBar/index.js +36 -36
- package/dist/components/RateAndCategory/index.js +31 -30
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +13 -20
- package/dist/components/RatesDefinition/components/BillRate/index.js +14 -24
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/LimitsLine/index.js +7 -5
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +13 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/utils.js +3 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +18 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +19 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +21 -26
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -15
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +37 -35
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +25 -25
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +18 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +32 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +20 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +50 -32
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +13 -19
- package/dist/components/RatesDefinition/index.js +15 -20
- package/dist/components/SmartBillProvider/index.js +47 -12
- package/dist/components/StyledAmount/constants.js +1 -1
- package/dist/components/StyledAmount/index.js +35 -19
- package/dist/components/WithContextApi/index.js +27 -16
- package/dist/components/WithContextApi/layout.js +2 -2
- package/dist/components/WithSeason/index.js +9 -5
- package/dist/constants/deviceSizes.js +17 -27
- package/dist/constants/seasons.js +2 -2
- package/dist/index.js +16 -14
- package/dist/shared/Context/index.js +3 -5
- package/dist/shared/constants/aliases.js +550 -682
- package/dist/shared/constants/components.js +2 -1
- package/dist/shared/constants/consumptions.js +4 -4
- package/dist/shared/constants/periodicities.js +1 -1
- package/dist/shared/constants/rates.js +1 -1
- package/dist/shared/constants/readings.js +2 -2
- package/dist/shared/constants/seasons.js +2 -2
- package/dist/shared/constants/stagesGraph.js +4 -4
- package/dist/shared/types/assetsTypes.js +1 -1
- package/dist/shared/types/billDataTypes.js +4 -4
- package/dist/shared/types/componentsTypes.js +13 -18
- package/dist/shared/types/formattersTypes.js +1 -1
- package/dist/shared/types/rateStagesTypes.js +3 -3
- package/dist/shared/types/smartBillTypes.js +10 -5
- package/dist/shared/types/textsTypes.js +1 -1
- package/dist/shared/utils/billCalculation.js +9 -9
- package/dist/shared/utils/consumptions.js +62 -28
- package/dist/shared/utils/context.js +8 -7
- package/dist/shared/utils/expirations.js +5 -1
- package/dist/shared/utils/periods.js +20 -14
- package/dist/shared/utils/rates.js +5 -1
- package/dist/shared/utils/readings.js +10 -2
- package/dist/shared/utils/season.js +5 -1
- package/dist/shared/utils/stagesGraph.js +15 -11
- package/dist/utils/hooks.js +5 -37
- package/dist/utils.js +8 -4
- package/package.json +2 -2
- 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 ||
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
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 ||
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
})))
|
|
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 ||
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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 ||
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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)
|