@widergy/utilitygo-smart-bill-web 1.13.4 → 2.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.
- package/CHANGELOG.md +21 -0
- package/dist/components/Advice/index.js +3 -14
- package/dist/components/Amount/index.js +11 -29
- package/dist/components/Amount/styles.module.scss +1 -2
- package/dist/components/Amount/utils.js +0 -3
- package/dist/components/Banner/index.js +3 -12
- package/dist/components/BarChart/index.js +12 -32
- package/dist/components/BarChart/styles.module.scss +5 -5
- package/dist/components/BarChart/utils.js +1 -6
- package/dist/components/BillCalculation/components/ConceptCard/index.js +31 -36
- package/dist/components/BillCalculation/components/Glossary/index.js +30 -50
- package/dist/components/BillCalculation/components/Glossary/styles.module.scss +0 -6
- package/dist/components/BillCalculation/index.js +13 -46
- package/dist/components/BillCalculation/utils.js +3 -15
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +11 -29
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +2 -15
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +0 -4
- package/dist/components/BillSummary/components/BilledConcepts/index.js +11 -40
- package/dist/components/BillSummary/components/BilledConcepts/styles.module.scss +1 -1
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +13 -38
- package/dist/components/BillSummary/index.js +7 -42
- package/dist/components/BillSummary/styles.module.scss +0 -4
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +0 -8
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +5 -20
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +0 -7
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +18 -39
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +2 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +15 -37
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +8 -16
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +0 -7
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +12 -25
- package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +0 -10
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +4 -11
- package/dist/components/ConsumptionComparison/index.js +9 -44
- package/dist/components/ConsumptionComparison/styles.module.scss +0 -5
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +13 -38
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +9 -20
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +14 -26
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/styles.module.scss +0 -6
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +10 -24
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +0 -6
- package/dist/components/ConsumptionEnergyDetails/index.js +14 -41
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -6
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +39 -55
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/styles.module.scss +2 -8
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +0 -3
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +7 -23
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/styles.module.scss +0 -4
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +4 -15
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +16 -33
- package/dist/components/ConsumptionIncluded/index.js +1 -18
- package/dist/components/ConsumptionIncluded/utils.js +2 -30
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +7 -19
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +12 -27
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +6 -30
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +15 -33
- package/dist/components/ConsumptionPeriod/components/Reading/styles.module.scss +0 -1
- package/dist/components/ConsumptionPeriod/index.js +1 -20
- package/dist/components/ConsumptionPeriod/utils.js +0 -6
- package/dist/components/Date/index.js +6 -17
- package/dist/components/Date/styles.module.scss +2 -4
- package/dist/components/DebtState/index.js +6 -16
- package/dist/components/DebtState/styles.module.scss +2 -11
- package/dist/components/IconAndDetails/index.js +13 -26
- package/dist/components/Magnitude/index.js +18 -39
- package/dist/components/Magnitude/utils.js +0 -29
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +6 -17
- package/dist/components/MainBillData/components/BillAlert/index.js +12 -39
- package/dist/components/MainBillData/components/BillAlert/styles.module.scss +4 -1
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +5 -19
- package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss +1 -3
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +4 -20
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +0 -2
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +16 -30
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +0 -5
- package/dist/components/MainBillData/components/BillBody/index.js +3 -35
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +7 -19
- package/dist/components/MainBillData/components/BillHeader/index.js +4 -27
- package/dist/components/MainBillData/index.js +1 -16
- package/dist/components/MainBillData/theme.js +0 -3
- package/dist/components/MainBillData/utils.js +0 -3
- package/dist/components/Period/index.js +18 -44
- package/dist/components/Period/styles.module.scss +9 -9
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +21 -28
- package/dist/components/PowerProgresBar/components/PowerConsumption/styles.module.scss +0 -7
- package/dist/components/PowerProgresBar/index.js +8 -29
- package/dist/components/PowerProgresBar/styles.module.scss +5 -9
- package/dist/components/RateAndCategory/index.js +8 -26
- package/dist/components/RateAndCategory/styles.module.scss +1 -4
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +11 -23
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/styles.module.scss +0 -1
- package/dist/components/RatesDefinition/components/BillRate/index.js +8 -20
- package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -2
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +5 -17
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/styles.module.scss +2 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +8 -22
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +4 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +0 -7
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +4 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/styles.module.scss +1 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +8 -16
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/styles.module.scss +0 -4
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +0 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/index.js +12 -39
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +14 -24
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +11 -38
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +0 -3
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +11 -23
- package/dist/components/RatesDefinition/components/PurchasedRate/styles.module.scss +5 -4
- package/dist/components/RatesDefinition/index.js +4 -25
- package/dist/components/SmartBillProvider/index.js +5 -26
- package/dist/components/StyledAmount/constants.js +0 -3
- package/dist/components/StyledAmount/index.js +18 -38
- package/dist/components/StyledAmount/styles.module.scss +2 -3
- package/dist/components/WithContextApi/index.js +4 -15
- package/dist/components/WithContextApi/layout.js +0 -9
- package/dist/components/WithSeason/index.js +0 -6
- package/dist/constants/deviceSizes.js +4 -16
- package/dist/index.js +0 -18
- package/dist/scss/variables/_colors.scss +0 -6
- package/dist/scss/variables/_colorsExport.scss +0 -6
- package/dist/shared/Context/index.js +1 -5
- package/dist/shared/constants/aliases.js +84 -82
- package/dist/shared/types/assetsTypes.js +0 -3
- package/dist/shared/types/billDataTypes.js +13 -13
- package/dist/shared/types/componentsTypes.js +4 -10
- package/dist/shared/types/formattersTypes.js +0 -2
- package/dist/shared/types/rateStagesTypes.js +0 -2
- package/dist/shared/types/smartBillTypes.js +4 -10
- package/dist/shared/types/textsTypes.js +0 -2
- package/dist/shared/utils/billCalculation.js +0 -6
- package/dist/shared/utils/consumptions.js +1 -32
- package/dist/shared/utils/context.js +0 -6
- package/dist/shared/utils/expirations.js +0 -3
- package/dist/shared/utils/periods.js +0 -15
- package/dist/shared/utils/rates.js +0 -4
- package/dist/shared/utils/readings.js +0 -7
- package/dist/shared/utils/season.js +0 -3
- package/dist/shared/utils/stagesGraph.js +0 -11
- package/dist/utils/hooks.js +0 -2
- package/dist/utils.js +0 -8
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
padding: $default-container-padding;
|
|
14
14
|
|
|
15
15
|
> .periodHeader {
|
|
16
|
-
|
|
16
|
+
margin-bottom: 8px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@media #{$tablet-mobile} {
|
|
@@ -47,15 +47,10 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.header {
|
|
50
|
-
align-items: center;
|
|
51
50
|
align-items: flex-start;
|
|
52
51
|
display: flex;
|
|
53
52
|
flex-direction: column;
|
|
54
53
|
|
|
55
|
-
> span {
|
|
56
|
-
margin-bottom: 8px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
54
|
@media #{$tablet-mobile} {
|
|
60
55
|
border: 0;
|
|
61
56
|
border-radius: 0;
|
|
@@ -65,8 +60,14 @@
|
|
|
65
60
|
}
|
|
66
61
|
}
|
|
67
62
|
|
|
63
|
+
.labelSpacing {
|
|
64
|
+
margin-bottom: 8px;
|
|
65
|
+
}
|
|
66
|
+
|
|
68
67
|
.periodHeader {
|
|
68
|
+
align-items: center;
|
|
69
69
|
display: flex;
|
|
70
|
+
|
|
70
71
|
> svg {
|
|
71
72
|
margin-left: 16px;
|
|
72
73
|
}
|
|
@@ -93,14 +94,13 @@
|
|
|
93
94
|
display: flex;
|
|
94
95
|
flex-direction: row;
|
|
95
96
|
|
|
96
|
-
>
|
|
97
|
-
margin-
|
|
97
|
+
> :first-child {
|
|
98
|
+
margin-right: 5px;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
.periodLabel {
|
|
102
103
|
@media #{$tablet-mobile} {
|
|
103
|
-
font-size: $large;
|
|
104
104
|
margin-bottom: 6px;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
@@ -4,28 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
17
|
-
|
|
18
12
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
14
|
+
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); }
|
|
22
15
|
var PowerConsumption = function PowerConsumption(_ref) {
|
|
23
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
consumption = _ref.consumption,
|
|
18
|
+
unit = _ref.unit,
|
|
19
|
+
text = _ref.text,
|
|
20
|
+
isHired = _ref.isHired,
|
|
21
|
+
powerExceeded = _ref.powerExceeded;
|
|
29
22
|
var Label = contextApiInfo.Label;
|
|
30
23
|
var alias = !isHired ? _aliases.POWER_CONSUMPTION : _aliases.POWER_CONSUMPTION_GRAY;
|
|
31
24
|
var unitAlias = !isHired ? _aliases.POWER_CONSUMPTION_UNIT : _aliases.POWER_CONSUMPTION_UNIT_GRAY;
|
|
@@ -33,28 +26,28 @@ var PowerConsumption = function PowerConsumption(_ref) {
|
|
|
33
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
27
|
className: _stylesModule.default.powerLabel
|
|
35
28
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
-
className: "".concat(_stylesModule.default.powerConsumptionLabel, "
|
|
37
|
-
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
38
|
-
alias: alias
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
className: "\n ".concat(_stylesModule.default.powerConsumptionLabel, "\n ").concat(isHired && !powerExceeded && _stylesModule.default.hiredPowerLabel, " \n ").concat(!isHired && powerExceeded && _stylesModule.default.exceededPowerLabel)
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(Label, _extends({
|
|
31
|
+
alias: alias
|
|
32
|
+
}, !isHired && powerExceeded ? {
|
|
33
|
+
colorTheme: 'error'
|
|
34
|
+
} : {}), "".concat((consumption === null || consumption === void 0 ? void 0 : consumption.toString().replace('.', ',')) || '-', "\xA0")), consumption && /*#__PURE__*/_react.default.createElement(Label, _extends({
|
|
35
|
+
alias: unitAlias
|
|
36
|
+
}, !isHired && powerExceeded ? {
|
|
37
|
+
colorTheme: 'error'
|
|
38
|
+
} : {}), unit)), /*#__PURE__*/_react.default.createElement(Label, _extends({
|
|
39
|
+
alias: textAlias
|
|
40
|
+
}, !isHired && powerExceeded ? {
|
|
41
|
+
colorTheme: 'error'
|
|
42
|
+
} : {}), text));
|
|
47
43
|
};
|
|
48
|
-
|
|
49
44
|
PowerConsumption.propTypes = {
|
|
50
45
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
51
|
-
consumption: _propTypes.
|
|
46
|
+
consumption: _propTypes.number,
|
|
52
47
|
unit: _propTypes.string,
|
|
53
48
|
text: _propTypes.string,
|
|
54
49
|
isHired: _propTypes.bool,
|
|
55
50
|
powerExceeded: _propTypes.bool
|
|
56
51
|
};
|
|
57
|
-
|
|
58
52
|
var _default = (0, _WithContextApi.default)()(PowerConsumption);
|
|
59
|
-
|
|
60
53
|
exports.default = _default;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
@import '../../../../scss/variables/_colorsExport.scss';
|
|
2
|
-
@import '../../../../scss/variables/_sizes';
|
|
3
|
-
|
|
4
1
|
.powerLabel {
|
|
5
2
|
display: flex;
|
|
6
3
|
flex-direction: column;
|
|
@@ -12,10 +9,6 @@
|
|
|
12
9
|
justify-content: flex-start;
|
|
13
10
|
}
|
|
14
11
|
|
|
15
|
-
.exceededLabel {
|
|
16
|
-
color: $exceeded-power;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
12
|
.exceededPowerLabel {
|
|
20
13
|
justify-content: flex-end;
|
|
21
14
|
}
|
|
@@ -1,65 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _aliases = require("../../shared/constants/aliases");
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _billDataTypes = require("../../shared/types/billDataTypes");
|
|
17
|
-
|
|
18
12
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
19
|
-
|
|
20
13
|
var _utils = require("../../utils");
|
|
21
|
-
|
|
22
14
|
var _PowerConsumption = _interopRequireDefault(require("./components/PowerConsumption"));
|
|
23
|
-
|
|
24
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
25
|
-
|
|
26
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
27
|
-
|
|
28
17
|
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
18
|
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
19
|
var PowerProgresBar = function PowerProgresBar(_ref) {
|
|
33
20
|
var contextApiInfo = _ref.contextApiInfo,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
21
|
+
hiredPowerConsumption = _ref.hiredPowerConsumption,
|
|
22
|
+
registeredPowerConsumption = _ref.registeredPowerConsumption,
|
|
23
|
+
exceededPower = _ref.exceededPower;
|
|
37
24
|
var ProgressBar = contextApiInfo.ProgressBar,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
config = contextApiInfo.config,
|
|
26
|
+
Label = contextApiInfo.Label,
|
|
27
|
+
assets = contextApiInfo.assets;
|
|
41
28
|
var texts = config.texts;
|
|
42
29
|
var RedAlertIcon = assets.RedAlertIcon;
|
|
43
30
|
var powerExceeded = exceededPower.alert_message;
|
|
44
|
-
|
|
45
31
|
var powerConsumption = function powerConsumption(consumption, unit, text, isHired) {
|
|
46
32
|
return /*#__PURE__*/_react.default.createElement(_PowerConsumption.default, {
|
|
47
33
|
consumption: consumption,
|
|
48
34
|
unit: unit,
|
|
49
35
|
text: text,
|
|
50
36
|
isHired: isHired,
|
|
51
|
-
powerExceeded: powerExceeded
|
|
37
|
+
powerExceeded: !!powerExceeded
|
|
52
38
|
});
|
|
53
39
|
};
|
|
54
|
-
|
|
55
40
|
var HiredPowerLabel = function HiredPowerLabel() {
|
|
56
41
|
return powerConsumption(hiredPowerConsumption.value, hiredPowerConsumption.unit, texts.commons.hired, true);
|
|
57
42
|
};
|
|
58
|
-
|
|
59
43
|
var RegisteredPowerLabel = function RegisteredPowerLabel() {
|
|
60
44
|
return powerConsumption(registeredPowerConsumption.value, registeredPowerConsumption.unit, texts.commons.registered);
|
|
61
45
|
};
|
|
62
|
-
|
|
63
46
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
47
|
className: _stylesModule.default.container
|
|
65
48
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -96,18 +79,14 @@ var PowerProgresBar = function PowerProgresBar(_ref) {
|
|
|
96
79
|
}, /*#__PURE__*/_react.default.createElement(RedAlertIcon, {
|
|
97
80
|
className: _stylesModule.default.labelIcon
|
|
98
81
|
}), /*#__PURE__*/_react.default.createElement(Label, {
|
|
99
|
-
alias: _aliases.EXCEEDED_POWER_FINE
|
|
100
|
-
className: _stylesModule.default.powerExceededFineLabel
|
|
82
|
+
alias: _aliases.EXCEEDED_POWER_FINE
|
|
101
83
|
}, powerExceeded))));
|
|
102
84
|
};
|
|
103
|
-
|
|
104
85
|
PowerProgresBar.propTypes = {
|
|
105
86
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
106
87
|
hiredPowerConsumption: _billDataTypes.consumptionTypes,
|
|
107
88
|
registeredPowerConsumption: _billDataTypes.consumptionTypes,
|
|
108
89
|
exceededPower: _billDataTypes.consumptionTypes
|
|
109
90
|
};
|
|
110
|
-
|
|
111
91
|
var _default = (0, _WithContextApi.default)()(PowerProgresBar);
|
|
112
|
-
|
|
113
92
|
exports.default = _default;
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
.exceededProgressBarBackground {
|
|
45
45
|
background: repeating-linear-gradient(
|
|
46
46
|
-45deg,
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
var(--semanticError05),
|
|
48
|
+
var(--semanticError05) 10px,
|
|
49
49
|
$white 10px,
|
|
50
50
|
$white 11px
|
|
51
51
|
);
|
|
@@ -70,14 +70,10 @@
|
|
|
70
70
|
.powerExceededFine {
|
|
71
71
|
@extend %exceededPower;
|
|
72
72
|
align-items: center;
|
|
73
|
-
background-color:
|
|
73
|
+
background-color: var(--semanticError01);
|
|
74
74
|
justify-content: center;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.powerExceededFineLabel {
|
|
78
|
-
color: $exceeded-power;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
77
|
.powerExceededWithIcon {
|
|
82
78
|
display: flex;
|
|
83
79
|
}
|
|
@@ -88,14 +84,14 @@
|
|
|
88
84
|
}
|
|
89
85
|
|
|
90
86
|
.labelIcon {
|
|
91
|
-
fill:
|
|
87
|
+
fill: var(--semanticError05);
|
|
92
88
|
height: 24px;
|
|
93
89
|
margin-right: 4px;
|
|
94
90
|
width: 24px;
|
|
95
91
|
}
|
|
96
92
|
|
|
97
93
|
.valueIcon {
|
|
98
|
-
fill:
|
|
94
|
+
fill: var(--semanticError05);
|
|
99
95
|
height: 24px;
|
|
100
96
|
margin: 5px;
|
|
101
97
|
width: 24px;
|
|
@@ -1,58 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
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
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = require("prop-types");
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _utils = require("../../utils");
|
|
19
|
-
|
|
20
13
|
var _aliases = require("../../shared/constants/aliases");
|
|
21
|
-
|
|
22
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
23
|
-
|
|
24
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
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); }
|
|
27
|
-
|
|
28
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; }
|
|
29
|
-
|
|
30
18
|
var RatePrices = function RatePrices(_ref) {
|
|
31
19
|
var contextApiInfo = _ref.contextApiInfo,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
20
|
+
rate = _ref.rate,
|
|
21
|
+
category = _ref.category,
|
|
22
|
+
title = _ref.title,
|
|
23
|
+
_ref$classes = _ref.classes,
|
|
24
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes,
|
|
25
|
+
showCategory = _ref.showCategory;
|
|
38
26
|
var config = contextApiInfo.config,
|
|
39
|
-
|
|
27
|
+
Label = contextApiInfo.Label;
|
|
40
28
|
var commons = config.texts.commons;
|
|
41
|
-
|
|
42
29
|
var Title = function Title() {
|
|
43
30
|
return /*#__PURE__*/_react.default.createElement(Label, {
|
|
44
31
|
alias: _aliases.TITLE,
|
|
45
|
-
className: "".concat(
|
|
32
|
+
className: "".concat(classes.title)
|
|
46
33
|
}, title);
|
|
47
34
|
};
|
|
48
|
-
|
|
49
35
|
var Category = function Category() {
|
|
50
36
|
return /*#__PURE__*/_react.default.createElement(Label, {
|
|
51
37
|
alias: _aliases.CATEGORY,
|
|
52
38
|
className: "".concat(_stylesModule.default.category, " ").concat(classes.category)
|
|
53
39
|
}, "".concat(commons.category, " ").concat((0, _utils.stringOrDash)(category)));
|
|
54
40
|
};
|
|
55
|
-
|
|
56
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
57
42
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
58
43
|
}, showCategory ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -62,7 +47,6 @@ var RatePrices = function RatePrices(_ref) {
|
|
|
62
47
|
className: "".concat(_stylesModule.default.purchasedRate, " ").concat(classes.purchasedRate)
|
|
63
48
|
}, (0, _utils.stringOrDash)(rate)));
|
|
64
49
|
};
|
|
65
|
-
|
|
66
50
|
RatePrices.propTypes = {
|
|
67
51
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
68
52
|
rate: _propTypes.string,
|
|
@@ -75,7 +59,5 @@ RatePrices.propTypes = {
|
|
|
75
59
|
}),
|
|
76
60
|
showCategory: _propTypes.bool
|
|
77
61
|
};
|
|
78
|
-
|
|
79
62
|
var _default = (0, _WithContextApi.default)()(RatePrices);
|
|
80
|
-
|
|
81
63
|
exports.default = _default;
|
|
@@ -13,14 +13,11 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.purchasedRate {
|
|
16
|
-
font-size: $purchased-rate-font-size;
|
|
17
16
|
margin-bottom: 10px;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
.category {
|
|
21
|
-
background-color:
|
|
20
|
+
background-color: var(--semanticSuccess01);
|
|
22
21
|
border-radius: 40px;
|
|
23
|
-
color: $category;
|
|
24
|
-
font-weight: 450;
|
|
25
22
|
padding: 7px 15px;
|
|
26
23
|
}
|
|
@@ -4,36 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _StyledAmount = _interopRequireDefault(require("../../../../../StyledAmount"));
|
|
17
|
-
|
|
18
12
|
var _aliases = require("../../../../../../shared/constants/aliases");
|
|
19
|
-
|
|
20
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var RateAndCategory = function RateAndCategory(_ref) {
|
|
25
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
fixedChargeValue = _ref.fixedChargeValue,
|
|
18
|
+
variableChargeValue = _ref.variableChargeValue;
|
|
28
19
|
var config = contextApiInfo.config,
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
ExternalLink = contextApiInfo.ExternalLink,
|
|
21
|
+
Label = contextApiInfo.Label;
|
|
31
22
|
var ratesTableLink = config.externalLinks.ratesTableLink;
|
|
32
23
|
var _config$texts$ratesDe = config.texts.ratesDefinition,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
fixedCharge = _config$texts$ratesDe.fixedCharge,
|
|
25
|
+
variableCharge = _config$texts$ratesDe.variableCharge,
|
|
26
|
+
currency = _config$texts$ratesDe.currency,
|
|
27
|
+
seeRatesTable = _config$texts$ratesDe.seeRatesTable;
|
|
37
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
29
|
className: _stylesModule.default.container
|
|
39
30
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -60,20 +51,17 @@ var RateAndCategory = function RateAndCategory(_ref) {
|
|
|
60
51
|
variant: "small",
|
|
61
52
|
amount: variableChargeValue,
|
|
62
53
|
currency: currency
|
|
63
|
-
}))), ratesTableLink && /*#__PURE__*/_react.default.createElement(
|
|
64
|
-
url: ratesTableLink
|
|
65
|
-
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
54
|
+
}))), ratesTableLink && /*#__PURE__*/_react.default.createElement(Label, {
|
|
66
55
|
alias: _aliases.REGULAR_LINK,
|
|
67
56
|
className: _stylesModule.default.link
|
|
57
|
+
}, /*#__PURE__*/_react.default.createElement(ExternalLink, {
|
|
58
|
+
url: ratesTableLink
|
|
68
59
|
}, seeRatesTable)));
|
|
69
60
|
};
|
|
70
|
-
|
|
71
61
|
RateAndCategory.propTypes = {
|
|
72
62
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
73
63
|
fixedChargeValue: _propTypes.number,
|
|
74
64
|
variableChargeValue: _propTypes.number
|
|
75
65
|
};
|
|
76
|
-
|
|
77
66
|
var _default = (0, _WithContextApi.default)()(RateAndCategory);
|
|
78
|
-
|
|
79
67
|
exports.default = _default;
|
|
@@ -4,35 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
17
|
-
|
|
18
12
|
var _RatePrices = _interopRequireDefault(require("./components/RatePrices"));
|
|
19
|
-
|
|
20
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var BillRate = function BillRate(_ref) {
|
|
25
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
rate = _ref.rate,
|
|
18
|
+
category = _ref.category,
|
|
19
|
+
fixedCharge = _ref.fixedCharge,
|
|
20
|
+
variableCharge = _ref.variableCharge;
|
|
30
21
|
var assets = contextApiInfo.assets,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
config = contextApiInfo.config,
|
|
23
|
+
Label = contextApiInfo.Label,
|
|
24
|
+
Tooltip = contextApiInfo.Tooltip;
|
|
34
25
|
var texts = config.texts,
|
|
35
|
-
|
|
26
|
+
colors = config.colors;
|
|
36
27
|
var rateFormatter = config.formatters.rateFormatter;
|
|
37
28
|
var billRatePrices = config.texts.ratesDefinition.billRatePrices;
|
|
38
29
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -56,7 +47,6 @@ var BillRate = function BillRate(_ref) {
|
|
|
56
47
|
variableChargeValue: variableCharge
|
|
57
48
|
})));
|
|
58
49
|
};
|
|
59
|
-
|
|
60
50
|
BillRate.propTypes = {
|
|
61
51
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
62
52
|
rate: _propTypes.string,
|
|
@@ -64,7 +54,5 @@ BillRate.propTypes = {
|
|
|
64
54
|
fixedCharge: _propTypes.number,
|
|
65
55
|
variableCharge: _propTypes.number
|
|
66
56
|
};
|
|
67
|
-
|
|
68
57
|
var _default = (0, _WithContextApi.default)()(BillRate);
|
|
69
|
-
|
|
70
58
|
exports.default = _default;
|
|
@@ -4,32 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = require("prop-types");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _utils = require("../../../../../../utils");
|
|
17
|
-
|
|
18
12
|
var _aliases = require("../../../../../../shared/constants/aliases");
|
|
19
|
-
|
|
20
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
var Category = function Category(_ref) {
|
|
25
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
category = _ref.category,
|
|
18
|
+
wrap = _ref.wrap;
|
|
28
19
|
var config = contextApiInfo.config,
|
|
29
|
-
|
|
20
|
+
Label = contextApiInfo.Label;
|
|
30
21
|
var _config$texts = config.texts,
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
commons = _config$texts.commons,
|
|
23
|
+
ratesDefinition = _config$texts.ratesDefinition;
|
|
33
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
25
|
className: wrap ? _stylesModule.default.containerWrap : _stylesModule.default.container
|
|
35
26
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -40,13 +31,10 @@ var Category = function Category(_ref) {
|
|
|
40
31
|
className: _stylesModule.default.category
|
|
41
32
|
}, "".concat(commons.category, " ").concat((0, _utils.stringOrDash)(category))));
|
|
42
33
|
};
|
|
43
|
-
|
|
44
34
|
Category.propTypes = {
|
|
45
35
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
46
36
|
category: _propTypes.string,
|
|
47
37
|
wrap: _propTypes.bool
|
|
48
38
|
};
|
|
49
|
-
|
|
50
39
|
var _default = (0, _WithContextApi.default)()(Category);
|
|
51
|
-
|
|
52
40
|
exports.default = _default;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
.container {
|
|
6
6
|
align-items: center;
|
|
7
7
|
display: flex;
|
|
8
|
-
|
|
8
|
+
|
|
9
9
|
> .title {
|
|
10
10
|
margin-right: 8px;
|
|
11
11
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
.title {
|
|
26
26
|
justify-content: center;
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
@media #{$desktop} {
|
|
29
29
|
width: 100%;
|
|
30
30
|
}
|
|
@@ -33,9 +33,7 @@
|
|
|
33
33
|
.category {
|
|
34
34
|
background-color: $category-background;
|
|
35
35
|
border-radius: 40px;
|
|
36
|
-
color: $category;
|
|
37
36
|
display: flex;
|
|
38
|
-
font-weight: 450;
|
|
39
37
|
justify-content: center;
|
|
40
38
|
min-width: fit-content;
|
|
41
39
|
padding: 7px 15px;
|