@widergy/utilitygo-smart-bill-web 2.2.0 → 2.2.2
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 +14 -0
- package/dist/components/Advice/index.js +1 -2
- package/dist/components/Amount/index.js +1 -2
- package/dist/components/Amount/utils.js +2 -3
- package/dist/components/Banner/index.js +1 -2
- package/dist/components/BarChart/constants.js +3 -6
- package/dist/components/BarChart/index.js +1 -2
- package/dist/components/BarChart/utils.js +2 -3
- package/dist/components/BillCalculation/components/ConceptCard/index.js +1 -2
- package/dist/components/BillCalculation/components/Glossary/index.js +1 -2
- package/dist/components/BillCalculation/constants.js +1 -2
- package/dist/components/BillCalculation/index.js +1 -2
- package/dist/components/BillCalculation/utils.js +4 -7
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +1 -2
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +2 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +1 -2
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +4 -8
- package/dist/components/BillSummary/components/BilledConcepts/index.js +1 -2
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +6 -11
- package/dist/components/BillSummary/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +2 -3
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +14 -27
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +4 -7
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +2 -3
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +1 -2
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +2 -3
- package/dist/components/ConsumptionComparison/index.js +1 -2
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +1 -2
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +1 -2
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +1 -2
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +1 -2
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +2 -3
- package/dist/components/ConsumptionEnergyDetails/index.js +1 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +1 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +2 -3
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +1 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +1 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +1 -2
- package/dist/components/ConsumptionIncluded/index.js +1 -2
- package/dist/components/ConsumptionIncluded/utils.js +3 -5
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +1 -2
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +1 -2
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +1 -2
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +1 -2
- package/dist/components/ConsumptionPeriod/index.js +1 -2
- package/dist/components/ConsumptionPeriod/utils.js +2 -3
- package/dist/components/Date/index.js +1 -2
- package/dist/components/DebtState/index.js +1 -2
- package/dist/components/IconAndDetails/index.js +1 -2
- package/dist/components/Magnitude/index.js +1 -2
- package/dist/components/Magnitude/utils.js +2 -3
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +1 -2
- package/dist/components/MainBillData/components/BillAlert/index.js +1 -2
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +1 -2
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +1 -2
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +2 -3
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +1 -2
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +2 -3
- package/dist/components/MainBillData/components/BillBody/index.js +1 -2
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +1 -2
- package/dist/components/MainBillData/components/BillHeader/index.js +1 -2
- package/dist/components/MainBillData/index.js +1 -2
- package/dist/components/MainBillData/theme.js +2 -3
- package/dist/components/MainBillData/utils.js +2 -3
- package/dist/components/Period/index.js +1 -2
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +1 -2
- package/dist/components/PowerProgresBar/index.js +1 -2
- package/dist/components/RateAndCategory/index.js +1 -2
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +1 -2
- package/dist/components/RatesDefinition/components/BillRate/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +2 -3
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +2 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +2 -3
- package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -36
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +2 -3
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +1 -2
- package/dist/components/RatesDefinition/index.js +1 -2
- package/dist/components/SmartBillProvider/index.js +1 -2
- package/dist/components/StyledAmount/constants.js +2 -3
- package/dist/components/StyledAmount/index.js +1 -2
- package/dist/components/WithContextApi/index.js +1 -2
- package/dist/components/WithContextApi/layout.js +1 -2
- package/dist/components/WithSeason/index.js +1 -2
- package/dist/constants/deviceSizes.js +13 -25
- package/dist/constants/seasons.js +3 -5
- package/dist/index.js +5 -4
- package/dist/shared/Context/index.js +2 -4
- package/dist/shared/constants/aliases.js +139 -277
- package/dist/shared/constants/consumptions.js +5 -9
- package/dist/shared/constants/periodicities.js +2 -3
- package/dist/shared/constants/rates.js +2 -3
- package/dist/shared/constants/readings.js +3 -5
- package/dist/shared/constants/seasons.js +3 -5
- package/dist/shared/constants/stagesGraph.js +4 -8
- package/dist/shared/types/assetsTypes.js +1 -2
- package/dist/shared/types/billDataTypes.js +6 -11
- package/dist/shared/types/componentsTypes.js +4 -7
- package/dist/shared/types/formattersTypes.js +2 -3
- package/dist/shared/types/rateStagesTypes.js +3 -6
- package/dist/shared/types/smartBillTypes.js +2 -3
- package/dist/shared/types/textsTypes.js +2 -3
- package/dist/shared/utils/billCalculation.js +2 -3
- package/dist/shared/utils/consumptions.js +7 -13
- package/dist/shared/utils/context.js +2 -3
- package/dist/shared/utils/expirations.js +2 -3
- package/dist/shared/utils/periods.js +6 -11
- package/dist/shared/utils/rates.js +2 -3
- package/dist/shared/utils/readings.js +3 -5
- package/dist/shared/utils/season.js +2 -3
- package/dist/shared/utils/stagesGraph.js +5 -9
- package/dist/utils/hooks.js +2 -3
- package/dist/utils.js +4 -7
- package/package.json +3 -3
|
@@ -18,14 +18,13 @@ var getBimesterDateTitle = function getBimesterDateTitle(_ref, text) {
|
|
|
18
18
|
if (!number || !year || !isPeriodicity) return '-';
|
|
19
19
|
return "".concat(text.bimester, " ").concat(number, " ").concat(text.of, " ").concat(year.substring(2));
|
|
20
20
|
};
|
|
21
|
-
var getBimesterDate = function getBimesterDate(periods, text) {
|
|
21
|
+
var getBimesterDate = exports.getBimesterDate = function getBimesterDate(periods, text) {
|
|
22
22
|
var currentPeriod = periods.find(function (item) {
|
|
23
23
|
return item.current;
|
|
24
24
|
});
|
|
25
25
|
if (!currentPeriod) return '-';
|
|
26
26
|
return getBimesterDateTitle(currentPeriod, text);
|
|
27
27
|
};
|
|
28
|
-
exports.getBimesterDate = getBimesterDate;
|
|
29
28
|
var getTotalDaysDescriptionComsumption = function getTotalDaysDescriptionComsumption(period, texts) {
|
|
30
29
|
var _period$settlements;
|
|
31
30
|
var totalDays = period === null || period === void 0 || (_period$settlements = period.settlements) === null || _period$settlements === void 0 ? void 0 : _period$settlements.total_settlements_days;
|
|
@@ -99,7 +98,7 @@ var settlementRemainingMapper = function settlementRemainingMapper(period, texts
|
|
|
99
98
|
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
|
|
100
99
|
};
|
|
101
100
|
};
|
|
102
|
-
var dataMapper = function dataMapper() {
|
|
101
|
+
var dataMapper = exports.dataMapper = function dataMapper() {
|
|
103
102
|
var periods = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
104
103
|
var texts = arguments.length > 1 ? arguments[1] : undefined;
|
|
105
104
|
var currentPeriod = periods.find(function (item) {
|
|
@@ -109,5 +108,4 @@ var dataMapper = function dataMapper() {
|
|
|
109
108
|
return [consumptionMapper(currentPeriod, texts), settlementCurrentMapper(currentPeriod, texts), settlementRemainingMapper(currentPeriod, texts)].sort(function (a, b) {
|
|
110
109
|
return a.order - b.order;
|
|
111
110
|
});
|
|
112
|
-
};
|
|
113
|
-
exports.dataMapper = dataMapper;
|
|
111
|
+
};
|
|
@@ -46,5 +46,4 @@ ReadingRow.propTypes = {
|
|
|
46
46
|
numberAlias: _propTypes.string,
|
|
47
47
|
unitAlias: _propTypes.string
|
|
48
48
|
};
|
|
49
|
-
var _default = (0, _WithContextApi.default)()(ReadingRow);
|
|
50
|
-
exports.default = _default;
|
|
49
|
+
var _default = exports.default = (0, _WithContextApi.default)()(ReadingRow);
|
|
@@ -65,5 +65,4 @@ ConsumptionPeriod.propTypes = {
|
|
|
65
65
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
66
66
|
billData: _billDataTypes.billDataTypes
|
|
67
67
|
};
|
|
68
|
-
var _default = (0, _WithContextApi.default)()(ConsumptionPeriod);
|
|
69
|
-
exports.default = _default;
|
|
68
|
+
var _default = exports.default = (0, _WithContextApi.default)()(ConsumptionPeriod);
|
|
@@ -8,7 +8,7 @@ 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 = function getConsumptionSummaryProps(currentPeriod, initialReading, finalReading) {
|
|
11
|
+
var getConsumptionSummaryProps = exports.getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeriod, initialReading, finalReading) {
|
|
12
12
|
return {
|
|
13
13
|
periodNumber: currentPeriod.number,
|
|
14
14
|
year: currentPeriod.year,
|
|
@@ -22,5 +22,4 @@ var getConsumptionSummaryProps = function getConsumptionSummaryProps(currentPeri
|
|
|
22
22
|
totalConsumptionValue: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).value,
|
|
23
23
|
totalConsumptionUnit: (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE).unit
|
|
24
24
|
};
|
|
25
|
-
};
|
|
26
|
-
exports.getConsumptionSummaryProps = getConsumptionSummaryProps;
|
|
25
|
+
};
|
|
@@ -32,5 +32,4 @@ DebtState.propTypes = {
|
|
|
32
32
|
isWarning: _propTypes.bool,
|
|
33
33
|
debtStatusLabel: _propTypes.string
|
|
34
34
|
};
|
|
35
|
-
var _default = (0, _WithContextApi.default)()(DebtState);
|
|
36
|
-
exports.default = _default;
|
|
35
|
+
var _default = exports.default = (0, _WithContextApi.default)()(DebtState);
|
|
@@ -52,5 +52,4 @@ Magnitude.propTypes = {
|
|
|
52
52
|
unitAlias: _propTypes.string,
|
|
53
53
|
value: (0, _propTypes.oneOfType)([_propTypes.number, _propTypes.string])
|
|
54
54
|
};
|
|
55
|
-
var _default = (0, _WithContextApi.default)()(Magnitude);
|
|
56
|
-
exports.default = _default;
|
|
55
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Magnitude);
|
|
@@ -19,11 +19,10 @@ var variants = [{
|
|
|
19
19
|
id: 'xxxlarge',
|
|
20
20
|
unitLabelStyles: _stylesModule.default.unitxxxLarge
|
|
21
21
|
}];
|
|
22
|
-
var getVariantProps = function getVariantProps(props) {
|
|
22
|
+
var getVariantProps = exports.getVariantProps = function getVariantProps(props) {
|
|
23
23
|
return variants.find(function (variant) {
|
|
24
24
|
return props[variant.id];
|
|
25
25
|
}) || variants.find(function (variant) {
|
|
26
26
|
return variant.id === 'medium';
|
|
27
27
|
});
|
|
28
|
-
};
|
|
29
|
-
exports.getVariantProps = getVariantProps;
|
|
28
|
+
};
|
|
@@ -42,5 +42,4 @@ BillParticularConditions.propTypes = {
|
|
|
42
42
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
43
43
|
particularConditions: (0, _propTypes.arrayOf)(_propTypes.string)
|
|
44
44
|
};
|
|
45
|
-
var _default = (0, _WithContextApi.default)()(BillParticularConditions);
|
|
46
|
-
exports.default = _default;
|
|
45
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillParticularConditions);
|
|
@@ -74,5 +74,4 @@ BillAlert.propTypes = {
|
|
|
74
74
|
particularConditions: (0, _propTypes.arrayOf)(_propTypes.string),
|
|
75
75
|
isDesktopSize: _propTypes.bool
|
|
76
76
|
};
|
|
77
|
-
var _default = (0, _WithContextApi.default)()(BillAlert);
|
|
78
|
-
exports.default = _default;
|
|
77
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillAlert);
|
|
@@ -108,5 +108,4 @@ ClientData.propTypes = {
|
|
|
108
108
|
billData: _billDataTypes.billDataTypes,
|
|
109
109
|
multipleSettlements: _propTypes.bool
|
|
110
110
|
};
|
|
111
|
-
var _default = (0, _WithContextApi.default)()(ClientData);
|
|
112
|
-
exports.default = _default;
|
|
111
|
+
var _default = exports.default = (0, _WithContextApi.default)()(ClientData);
|
|
@@ -43,5 +43,4 @@ Consumption.propTypes = {
|
|
|
43
43
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
44
44
|
multipleSettlements: _propTypes.bool
|
|
45
45
|
};
|
|
46
|
-
var _default = (0, _WithContextApi.default)()(Consumption);
|
|
47
|
-
exports.default = _default;
|
|
46
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Consumption);
|
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.validateConsumptions = void 0;
|
|
7
|
-
var validateConsumptions = function validateConsumptions(registeredPowerConsumption, hiredPowerConsumption) {
|
|
7
|
+
var validateConsumptions = exports.validateConsumptions = function validateConsumptions(registeredPowerConsumption, hiredPowerConsumption) {
|
|
8
8
|
return registeredPowerConsumption !== null && registeredPowerConsumption !== undefined && hiredPowerConsumption !== null && hiredPowerConsumption !== undefined;
|
|
9
|
-
};
|
|
10
|
-
exports.validateConsumptions = validateConsumptions;
|
|
9
|
+
};
|
|
@@ -100,5 +100,4 @@ ReadingDetails.propTypes = {
|
|
|
100
100
|
billData: _billDataTypes.billDataTypes,
|
|
101
101
|
feederLine: _propTypes.string
|
|
102
102
|
};
|
|
103
|
-
var _default = (0, _WithContextApi.default)()(ReadingDetails);
|
|
104
|
-
exports.default = _default;
|
|
103
|
+
var _default = exports.default = (0, _WithContextApi.default)()(ReadingDetails);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.mainText = void 0;
|
|
7
7
|
var _readings = require("../../../../../../shared/constants/readings");
|
|
8
|
-
var mainText = function mainText(readingType, texts) {
|
|
8
|
+
var mainText = exports.mainText = function mainText(readingType, texts) {
|
|
9
9
|
switch (readingType.type) {
|
|
10
10
|
case _readings.READING_TYPES.FACE_TO_FACE:
|
|
11
11
|
return readingType.subtype === _readings.READING_TYPES.TELEMEDITION ? texts.commons.telemeditionReading : texts.commons.faceToFaceReading;
|
|
@@ -14,5 +14,4 @@ var mainText = function mainText(readingType, texts) {
|
|
|
14
14
|
default:
|
|
15
15
|
return undefined;
|
|
16
16
|
}
|
|
17
|
-
};
|
|
18
|
-
exports.mainText = mainText;
|
|
17
|
+
};
|
|
@@ -86,5 +86,4 @@ BillBody.propTypes = {
|
|
|
86
86
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
87
87
|
multipleSettlements: _propTypes.bool
|
|
88
88
|
};
|
|
89
|
-
var _default = (0, _WithContextApi.default)()(BillBody);
|
|
90
|
-
exports.default = _default;
|
|
89
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillBody);
|
|
@@ -81,5 +81,4 @@ BillHeader.propTypes = {
|
|
|
81
81
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
82
82
|
billData: _billDataTypes.billDataTypes
|
|
83
83
|
};
|
|
84
|
-
var _default = (0, _WithContextApi.default)()(BillHeader);
|
|
85
|
-
exports.default = _default;
|
|
84
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillHeader);
|
|
@@ -35,5 +35,4 @@ MainBillData.propTypes = {
|
|
|
35
35
|
container: _propTypes.string
|
|
36
36
|
})
|
|
37
37
|
};
|
|
38
|
-
var _default = (0, _WithContextApi.default)(_theme.retrieveStyle)(MainBillData);
|
|
39
|
-
exports.default = _default;
|
|
38
|
+
var _default = exports.default = (0, _WithContextApi.default)(_theme.retrieveStyle)(MainBillData);
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
var retrieveStyle = function retrieveStyle(theme) {
|
|
8
|
+
var retrieveStyle = exports.retrieveStyle = function retrieveStyle(theme) {
|
|
9
9
|
return {
|
|
10
10
|
container: {
|
|
11
11
|
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['Container', 'backgroundColor']),
|
|
@@ -13,5 +13,4 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
13
13
|
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['Container', 'borderRadius'])
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
};
|
|
17
|
-
exports.retrieveStyle = retrieveStyle;
|
|
16
|
+
};
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getCurrentPeriod = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
var getCurrentPeriod = function getCurrentPeriod(billData) {
|
|
8
|
+
var getCurrentPeriod = exports.getCurrentPeriod = function getCurrentPeriod(billData) {
|
|
9
9
|
return (0, _seamlessImmutable.getIn)(billData, ['periods'], []).find(function (period) {
|
|
10
10
|
return period.current;
|
|
11
11
|
}) || {};
|
|
12
|
-
};
|
|
13
|
-
exports.getCurrentPeriod = getCurrentPeriod;
|
|
12
|
+
};
|
|
@@ -49,5 +49,4 @@ PowerConsumption.propTypes = {
|
|
|
49
49
|
isHired: _propTypes.bool,
|
|
50
50
|
powerExceeded: _propTypes.bool
|
|
51
51
|
};
|
|
52
|
-
var _default = (0, _WithContextApi.default)()(PowerConsumption);
|
|
53
|
-
exports.default = _default;
|
|
52
|
+
var _default = exports.default = (0, _WithContextApi.default)()(PowerConsumption);
|
|
@@ -88,5 +88,4 @@ PowerProgresBar.propTypes = {
|
|
|
88
88
|
registeredPowerConsumption: _billDataTypes.consumptionTypes,
|
|
89
89
|
exceededPower: _billDataTypes.consumptionTypes
|
|
90
90
|
};
|
|
91
|
-
var _default = (0, _WithContextApi.default)()(PowerProgresBar);
|
|
92
|
-
exports.default = _default;
|
|
91
|
+
var _default = exports.default = (0, _WithContextApi.default)()(PowerProgresBar);
|
|
@@ -63,5 +63,4 @@ RateAndCategory.propTypes = {
|
|
|
63
63
|
fixedChargeValue: _propTypes.number,
|
|
64
64
|
variableChargeValue: _propTypes.number
|
|
65
65
|
};
|
|
66
|
-
var _default = (0, _WithContextApi.default)()(RateAndCategory);
|
|
67
|
-
exports.default = _default;
|
|
66
|
+
var _default = exports.default = (0, _WithContextApi.default)()(RateAndCategory);
|
|
@@ -54,5 +54,4 @@ BillRate.propTypes = {
|
|
|
54
54
|
fixedCharge: _propTypes.number,
|
|
55
55
|
variableCharge: _propTypes.number
|
|
56
56
|
};
|
|
57
|
-
var _default = (0, _WithContextApi.default)()(BillRate);
|
|
58
|
-
exports.default = _default;
|
|
57
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillRate);
|
|
@@ -46,5 +46,4 @@ Indicator.propTypes = {
|
|
|
46
46
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
47
47
|
rateStages: _rateStagesTypes.rateStagesTypes
|
|
48
48
|
};
|
|
49
|
-
var _default = (0, _WithContextApi.default)()(Indicator);
|
|
50
|
-
exports.default = _default;
|
|
49
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Indicator);
|
|
@@ -12,11 +12,10 @@ var relativePorcentageValue = function relativePorcentageValue(value, rateStages
|
|
|
12
12
|
var clippedMaxValue = value > globalMaxValue ? globalMaxValue : value;
|
|
13
13
|
return clippedMaxValue / globalMaxValue * 100;
|
|
14
14
|
};
|
|
15
|
-
var getLabelOffset = function getLabelOffset(value, rateStages) {
|
|
15
|
+
var getLabelOffset = exports.getLabelOffset = function getLabelOffset(value, rateStages) {
|
|
16
16
|
var rateIndex = rateStages.indexOf((0, _utils.getCurrentStage)(value, rateStages));
|
|
17
17
|
var isFirstRate = rateIndex === 0;
|
|
18
18
|
var isLastRate = rateIndex === rateStages.length - 1;
|
|
19
19
|
var baseOffset = "".concat(relativePorcentageValue(value, rateStages), "%");
|
|
20
20
|
return isLastRate ? "calc(-".concat(baseOffset, " + ").concat(_constants.INDICATOR_LABEL_LAST_OFFSET, ")") : isFirstRate ? "calc(-".concat(baseOffset, " - ").concat(_constants.INDICATOR_LABEL_FIRST_OFFSET, ")") : _constants.INDICATOR_LABEL_DEFAULT_OFFSET;
|
|
21
|
-
};
|
|
22
|
-
exports.getLabelOffset = getLabelOffset;
|
|
21
|
+
};
|
|
@@ -36,5 +36,4 @@ Legend.propTypes = {
|
|
|
36
36
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
37
37
|
stagesFormattedData: (0, _propTypes.arrayOf)(_propTypes.any)
|
|
38
38
|
};
|
|
39
|
-
var _default = (0, _WithContextApi.default)()(Legend);
|
|
40
|
-
exports.default = _default;
|
|
39
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Legend);
|
|
@@ -53,5 +53,4 @@ Stages.propTypes = {
|
|
|
53
53
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
54
54
|
stagesFormattedData: (0, _propTypes.arrayOf)(_propTypes.any)
|
|
55
55
|
};
|
|
56
|
-
var _default = (0, _WithContextApi.default)()(Stages);
|
|
57
|
-
exports.default = _default;
|
|
56
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Stages);
|
|
@@ -4,7 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MIN_STAGE_WIDTH = exports.DEFAULT_LAST_INFINITE_RANGE = void 0;
|
|
7
|
-
var DEFAULT_LAST_INFINITE_RANGE = 200; // kWh
|
|
8
|
-
exports.
|
|
9
|
-
var MIN_STAGE_WIDTH = 0.2;
|
|
10
|
-
exports.MIN_STAGE_WIDTH = MIN_STAGE_WIDTH;
|
|
7
|
+
var DEFAULT_LAST_INFINITE_RANGE = exports.DEFAULT_LAST_INFINITE_RANGE = 200; // kWh
|
|
8
|
+
var MIN_STAGE_WIDTH = exports.MIN_STAGE_WIDTH = 0.2;
|
|
@@ -37,7 +37,7 @@ var getResponsiveStageWidth = function getResponsiveStageWidth(rateStages, stage
|
|
|
37
37
|
// Final width will be the minimum value between the calculated width and the total width left.
|
|
38
38
|
return Math.min(Math.max(stage.sub_rate_stages.length / totalSubStages, _constants.MIN_STAGE_WIDTH), totalWidth);
|
|
39
39
|
};
|
|
40
|
-
var getStagesFormattedData = function getStagesFormattedData(value, rateStages, getStageColor, isDesktop) {
|
|
40
|
+
var getStagesFormattedData = exports.getStagesFormattedData = function getStagesFormattedData(value, rateStages, getStageColor, isDesktop) {
|
|
41
41
|
var totalSubstagesCount = rateStages.reduce(function (count, stage) {
|
|
42
42
|
return count += stage.sub_rate_stages.length;
|
|
43
43
|
}, 0);
|
|
@@ -72,5 +72,4 @@ var getStagesFormattedData = function getStagesFormattedData(value, rateStages,
|
|
|
72
72
|
stagesFormattedData: stagesFormattedData,
|
|
73
73
|
indicatorPosition: indicatorPosition
|
|
74
74
|
};
|
|
75
|
-
};
|
|
76
|
-
exports.getStagesFormattedData = getStagesFormattedData;
|
|
75
|
+
};
|
|
@@ -4,39 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.THIGT_RANGE_BREAKPOINT_RATIO = exports.SUB_STAGE_MARGIN_MOBILE = exports.SUB_STAGE_MARGIN_DESKTOP = exports.STAGE_MARGIN_MOBILE = exports.STAGE_MARGIN_DESKTOP = exports.MIN_VALUE = exports.MAX_VALUE = exports.MAX_RANGE_LIMIT = exports.LAST_SUB_STAGE_MARGIN = exports.LAST_STAGE_MARGIN = exports.INITIAL_INDICATOR_POSITION = exports.INFINITE = exports.INDICATOR_LABEL_LAST_OFFSET = exports.INDICATOR_LABEL_FIRST_OFFSET = exports.INDICATOR_LABEL_DEFAULT_OFFSET = exports.DEFAULT_INFINITE_SUB_STAGE_RANGE_WIDTH = exports.BARS_MARGIN_MOBILE = exports.BARS_MARGIN_DESKTOP = void 0;
|
|
7
|
-
var INFINITE = null;
|
|
8
|
-
exports.
|
|
9
|
-
var
|
|
10
|
-
exports.
|
|
11
|
-
var
|
|
12
|
-
exports.
|
|
13
|
-
var
|
|
14
|
-
exports.
|
|
15
|
-
var
|
|
16
|
-
exports.
|
|
17
|
-
var
|
|
18
|
-
exports.
|
|
19
|
-
var
|
|
20
|
-
exports.
|
|
21
|
-
var
|
|
22
|
-
exports.
|
|
23
|
-
var
|
|
24
|
-
exports.
|
|
25
|
-
var STAGE_MARGIN_DESKTOP = '4px';
|
|
26
|
-
exports.STAGE_MARGIN_DESKTOP = STAGE_MARGIN_DESKTOP;
|
|
27
|
-
var STAGE_MARGIN_MOBILE = '2px';
|
|
28
|
-
exports.STAGE_MARGIN_MOBILE = STAGE_MARGIN_MOBILE;
|
|
29
|
-
var SUB_STAGE_MARGIN_DESKTOP = '4px';
|
|
30
|
-
exports.SUB_STAGE_MARGIN_DESKTOP = SUB_STAGE_MARGIN_DESKTOP;
|
|
31
|
-
var SUB_STAGE_MARGIN_MOBILE = '2px';
|
|
32
|
-
exports.SUB_STAGE_MARGIN_MOBILE = SUB_STAGE_MARGIN_MOBILE;
|
|
33
|
-
var LAST_SUB_STAGE_MARGIN = '0px';
|
|
34
|
-
exports.LAST_SUB_STAGE_MARGIN = LAST_SUB_STAGE_MARGIN;
|
|
35
|
-
var INDICATOR_LABEL_FIRST_OFFSET = '0px';
|
|
36
|
-
exports.INDICATOR_LABEL_FIRST_OFFSET = INDICATOR_LABEL_FIRST_OFFSET;
|
|
37
|
-
var INDICATOR_LABEL_LAST_OFFSET = '-8px';
|
|
38
|
-
exports.INDICATOR_LABEL_LAST_OFFSET = INDICATOR_LABEL_LAST_OFFSET;
|
|
39
|
-
var INDICATOR_LABEL_DEFAULT_OFFSET = '-48px';
|
|
40
|
-
exports.INDICATOR_LABEL_DEFAULT_OFFSET = INDICATOR_LABEL_DEFAULT_OFFSET;
|
|
41
|
-
var THIGT_RANGE_BREAKPOINT_RATIO = 0.1;
|
|
42
|
-
exports.THIGT_RANGE_BREAKPOINT_RATIO = THIGT_RANGE_BREAKPOINT_RATIO;
|
|
7
|
+
var INFINITE = exports.INFINITE = null;
|
|
8
|
+
var MAX_VALUE = exports.MAX_VALUE = 1;
|
|
9
|
+
var MIN_VALUE = exports.MIN_VALUE = 0;
|
|
10
|
+
var MAX_RANGE_LIMIT = exports.MAX_RANGE_LIMIT = 9999999;
|
|
11
|
+
var DEFAULT_INFINITE_SUB_STAGE_RANGE_WIDTH = exports.DEFAULT_INFINITE_SUB_STAGE_RANGE_WIDTH = 200;
|
|
12
|
+
var INITIAL_INDICATOR_POSITION = exports.INITIAL_INDICATOR_POSITION = '-6px';
|
|
13
|
+
var BARS_MARGIN_DESKTOP = exports.BARS_MARGIN_DESKTOP = '0px';
|
|
14
|
+
var BARS_MARGIN_MOBILE = exports.BARS_MARGIN_MOBILE = '0px';
|
|
15
|
+
var LAST_STAGE_MARGIN = exports.LAST_STAGE_MARGIN = '0px';
|
|
16
|
+
var STAGE_MARGIN_DESKTOP = exports.STAGE_MARGIN_DESKTOP = '4px';
|
|
17
|
+
var STAGE_MARGIN_MOBILE = exports.STAGE_MARGIN_MOBILE = '2px';
|
|
18
|
+
var SUB_STAGE_MARGIN_DESKTOP = exports.SUB_STAGE_MARGIN_DESKTOP = '4px';
|
|
19
|
+
var SUB_STAGE_MARGIN_MOBILE = exports.SUB_STAGE_MARGIN_MOBILE = '2px';
|
|
20
|
+
var LAST_SUB_STAGE_MARGIN = exports.LAST_SUB_STAGE_MARGIN = '0px';
|
|
21
|
+
var INDICATOR_LABEL_FIRST_OFFSET = exports.INDICATOR_LABEL_FIRST_OFFSET = '0px';
|
|
22
|
+
var INDICATOR_LABEL_LAST_OFFSET = exports.INDICATOR_LABEL_LAST_OFFSET = '-8px';
|
|
23
|
+
var INDICATOR_LABEL_DEFAULT_OFFSET = exports.INDICATOR_LABEL_DEFAULT_OFFSET = '-48px';
|
|
24
|
+
var THIGT_RANGE_BREAKPOINT_RATIO = exports.THIGT_RANGE_BREAKPOINT_RATIO = 0.1;
|
|
@@ -75,5 +75,4 @@ CategoryByConsumption.propTypes = {
|
|
|
75
75
|
unit: _propTypes.string,
|
|
76
76
|
category: _propTypes.string
|
|
77
77
|
};
|
|
78
|
-
var _default = (0, _WithContextApi.default)()(CategoryByConsumption);
|
|
79
|
-
exports.default = _default;
|
|
78
|
+
var _default = exports.default = (0, _WithContextApi.default)()(CategoryByConsumption);
|
|
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getCurrentStage = void 0;
|
|
7
7
|
var _constants = require("./constants");
|
|
8
|
-
var getCurrentStage = function getCurrentStage(value, rateStages) {
|
|
8
|
+
var getCurrentStage = exports.getCurrentStage = function getCurrentStage(value, rateStages) {
|
|
9
9
|
return rateStages.find(function (stage) {
|
|
10
10
|
return stage.range[_constants.MIN_VALUE] <= value && (value <= stage.range[_constants.MAX_VALUE] || stage.range[_constants.MAX_VALUE] === _constants.INFINITE);
|
|
11
11
|
});
|
|
12
|
-
};
|
|
13
|
-
exports.getCurrentStage = getCurrentStage;
|
|
12
|
+
};
|
|
@@ -71,5 +71,4 @@ RatesDefinition.propTypes = {
|
|
|
71
71
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
72
72
|
billData: _billDataTypes.billDataTypes
|
|
73
73
|
};
|
|
74
|
-
var _default = (0, _WithContextApi.default)()(RatesDefinition);
|
|
75
|
-
exports.default = _default;
|
|
74
|
+
var _default = exports.default = (0, _WithContextApi.default)()(RatesDefinition);
|
|
@@ -45,5 +45,4 @@ var SmartBillProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
45
|
SmartBillProvider.propTypes = {
|
|
46
46
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes
|
|
47
47
|
};
|
|
48
|
-
var _default = SmartBillProvider;
|
|
49
|
-
exports.default = _default;
|
|
48
|
+
var _default = exports.default = SmartBillProvider;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.VARIANTS = void 0;
|
|
7
7
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
var VARIANTS = {
|
|
9
|
+
var VARIANTS = exports.VARIANTS = {
|
|
10
10
|
small: {
|
|
11
11
|
currencyLabelStyle: _stylesModule.default.smallCurrency,
|
|
12
12
|
decimalLabelStyle: _stylesModule.default.smallDecimalPart
|
|
@@ -27,5 +27,4 @@ var VARIANTS = {
|
|
|
27
27
|
currencyLabelStyle: _stylesModule.default.titleCurrency,
|
|
28
28
|
decimalLabelStyle: _stylesModule.default.titleDecimalPart
|
|
29
29
|
}
|
|
30
|
-
};
|
|
31
|
-
exports.VARIANTS = VARIANTS;
|
|
30
|
+
};
|
|
@@ -61,5 +61,4 @@ StyledAmount.propTypes = {
|
|
|
61
61
|
aliasDecimal: _propTypes.string,
|
|
62
62
|
variant: _propTypes.string
|
|
63
63
|
};
|
|
64
|
-
var _default = (0, _WithContextApi.default)()(StyledAmount);
|
|
65
|
-
exports.default = _default;
|
|
64
|
+
var _default = exports.default = (0, _WithContextApi.default)()(StyledAmount);
|