@widergy/utilitygo-smart-bill-web 2.2.1 → 3.0.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 +20 -0
- package/dist/components/Advice/index.js +11 -8
- package/dist/components/Amount/index.js +27 -23
- package/dist/components/Amount/utils.js +1 -5
- package/dist/components/Banner/index.js +11 -8
- package/dist/components/BarChart/constants.js +3 -6
- package/dist/components/BarChart/index.js +29 -24
- package/dist/components/BarChart/utils.js +15 -15
- package/dist/components/BillCalculation/components/ConceptCard/index.js +53 -47
- package/dist/components/BillCalculation/components/Glossary/index.js +49 -66
- package/dist/components/BillCalculation/components/Glossary/styles.module.scss +1 -0
- package/dist/components/BillCalculation/constants.js +1 -2
- package/dist/components/BillCalculation/index.js +49 -53
- package/dist/components/BillCalculation/utils.js +19 -22
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +26 -24
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +2 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +16 -17
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +3 -3
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +12 -17
- package/dist/components/BillSummary/components/BilledConcepts/index.js +30 -41
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +44 -68
- package/dist/components/BillSummary/index.js +71 -71
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +9 -10
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +18 -12
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +144 -143
- package/dist/components/ConsumptionComparison/components/ComparisonTable/index.js +17 -16
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +84 -88
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +22 -13
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/utils.js +1 -1
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +22 -16
- package/dist/components/ConsumptionComparison/components/PercentageComparison/utils.js +13 -9
- package/dist/components/ConsumptionComparison/index.js +42 -47
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +28 -24
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +1 -1
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionInDaysLabel/index.js +19 -15
- package/dist/components/ConsumptionEnergyDetails/components/EnergyTotalConsumption/index.js +16 -14
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/index.js +22 -17
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/utils.js +1 -1
- package/dist/components/ConsumptionEnergyDetails/index.js +47 -43
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +2 -2
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +65 -62
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +11 -13
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +21 -19
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +17 -12
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +43 -39
- package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +2 -2
- package/dist/components/ConsumptionIncluded/index.js +32 -34
- package/dist/components/ConsumptionIncluded/utils.js +29 -33
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/index.js +15 -12
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +24 -22
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +19 -28
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +36 -34
- package/dist/components/ConsumptionPeriod/index.js +13 -10
- package/dist/components/ConsumptionPeriod/utils.js +13 -15
- package/dist/components/Date/index.js +13 -11
- package/dist/components/DebtState/index.js +15 -10
- package/dist/components/IconAndDetails/index.js +20 -19
- package/dist/components/Magnitude/index.js +16 -14
- package/dist/components/Magnitude/utils.js +2 -8
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +19 -16
- package/dist/components/MainBillData/components/BillAlert/index.js +25 -33
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +20 -13
- package/dist/components/MainBillData/components/BillBody/components/Consumption/index.js +15 -13
- package/dist/components/MainBillData/components/BillBody/components/Consumption/utils.js +1 -3
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/index.js +24 -17
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +2 -2
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/utils.js +1 -1
- package/dist/components/MainBillData/components/BillBody/index.js +43 -46
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +17 -13
- package/dist/components/MainBillData/components/BillHeader/index.js +30 -26
- package/dist/components/MainBillData/components/BillHeader/styles.module.scss +1 -1
- package/dist/components/MainBillData/index.js +8 -7
- package/dist/components/MainBillData/theme.js +7 -9
- package/dist/components/MainBillData/utils.js +1 -5
- package/dist/components/Period/index.js +55 -45
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +16 -13
- package/dist/components/PowerProgresBar/index.js +32 -32
- package/dist/components/RateAndCategory/index.js +26 -29
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +21 -15
- package/dist/components/RatesDefinition/components/BillRate/index.js +25 -16
- package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +1 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +15 -11
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +27 -23
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +12 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +1 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +9 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Legend/index.js +22 -21
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Stages/index.js +35 -38
- 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 +18 -32
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +35 -47
- package/dist/components/RatesDefinition/components/CategoryByConsumption/constants.js +18 -36
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +24 -33
- package/dist/components/RatesDefinition/components/CategoryByConsumption/utils.js +1 -5
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +20 -15
- package/dist/components/RatesDefinition/index.js +21 -17
- package/dist/components/RatesDefinition/styles.module.scss +1 -1
- package/dist/components/SmartBillProvider/index.js +13 -36
- package/dist/components/StyledAmount/constants.js +2 -3
- package/dist/components/StyledAmount/index.js +20 -29
- package/dist/components/WithContextApi/index.js +19 -27
- package/dist/components/WithContextApi/layout.js +3 -4
- package/dist/components/WithSeason/index.js +7 -11
- package/dist/constants/deviceSizes.js +27 -24
- package/dist/constants/seasons.js +3 -5
- package/dist/index.js +19 -19
- package/dist/scss/variables/commonColors.module.scss +1 -1
- package/dist/shared/Context/index.js +5 -3
- package/dist/shared/constants/aliases.js +691 -694
- 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 +19 -14
- package/dist/shared/types/formattersTypes.js +2 -3
- package/dist/shared/types/rateStagesTypes.js +3 -6
- package/dist/shared/types/smartBillTypes.js +5 -11
- package/dist/shared/types/textsTypes.js +2 -3
- package/dist/shared/utils/billCalculation.js +9 -9
- package/dist/shared/utils/consumptions.js +27 -55
- package/dist/shared/utils/context.js +6 -5
- package/dist/shared/utils/expirations.js +1 -5
- package/dist/shared/utils/periods.js +14 -20
- package/dist/shared/utils/rates.js +1 -5
- package/dist/shared/utils/readings.js +2 -10
- package/dist/shared/utils/season.js +1 -5
- package/dist/shared/utils/stagesGraph.js +11 -15
- package/dist/utils/hooks.js +2 -3
- package/dist/utils.js +4 -8
- package/package.json +26 -63
|
@@ -18,34 +18,39 @@ var _TypeAndNumber = _interopRequireDefault(require("./components/TypeAndNumber"
|
|
|
18
18
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
21
|
+
const BillHeader = _ref => {
|
|
22
22
|
var _currentPeriod$settle, _currentPeriod$settle2;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
23
|
+
let {
|
|
24
|
+
contextApiInfo,
|
|
25
|
+
billData
|
|
26
|
+
} = _ref;
|
|
27
|
+
const {
|
|
28
|
+
assets,
|
|
29
|
+
config
|
|
30
|
+
} = contextApiInfo;
|
|
31
|
+
const {
|
|
32
|
+
texts
|
|
33
|
+
} = config;
|
|
34
|
+
const {
|
|
35
|
+
isDesktopSize,
|
|
36
|
+
isMobileOrTablet
|
|
37
|
+
} = (0, _hooks.useScreenSize)();
|
|
38
|
+
const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
39
|
+
const issuedOnDate = currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 || (_currentPeriod$settle = _currentPeriod$settle.current) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.issued_on;
|
|
40
|
+
const totalSettlements = currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle2 = currentPeriod.settlements) === null || _currentPeriod$settle2 === void 0 ? void 0 : _currentPeriod$settle2.total_settlements;
|
|
41
|
+
const debtStatusLabel = billData.debt_status_label;
|
|
42
|
+
const debtStatusValidation = debtStatusLabel !== null;
|
|
43
|
+
const multipleSettlements = totalSettlements > 1;
|
|
44
|
+
const aliases = {
|
|
38
45
|
mainAlias: _aliases.MAIN_LIGHT,
|
|
39
46
|
detailAlias: _aliases.DETAIL
|
|
40
47
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}));
|
|
48
|
-
};
|
|
48
|
+
const DebtStatusLabel = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
+
className: "".concat(billData.warning ? _stylesModule.default.pendingDebtLabelContainer : _stylesModule.default.adheredToAutomaticDebtContainer)
|
|
50
|
+
}, /*#__PURE__*/_react.default.createElement(_DebtState.default, {
|
|
51
|
+
debtStatusLabel: debtStatusLabel,
|
|
52
|
+
isWarning: billData.warning
|
|
53
|
+
}));
|
|
49
54
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
50
55
|
className: _stylesModule.default.container
|
|
51
56
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -81,5 +86,4 @@ BillHeader.propTypes = {
|
|
|
81
86
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
82
87
|
billData: _billDataTypes.billDataTypes
|
|
83
88
|
};
|
|
84
|
-
var _default = (0, _WithContextApi.default)()(BillHeader);
|
|
85
|
-
exports.default = _default;
|
|
89
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillHeader);
|
|
@@ -14,12 +14,14 @@ var _BillHeader = _interopRequireDefault(require("./components/BillHeader"));
|
|
|
14
14
|
var _BillBody = _interopRequireDefault(require("./components/BillBody"));
|
|
15
15
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
17
|
+
const MainBillData = _ref => {
|
|
18
18
|
var _currentPeriod$settle;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
let {
|
|
20
|
+
billData,
|
|
21
|
+
classes
|
|
22
|
+
} = _ref;
|
|
23
|
+
const currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
24
|
+
const multipleSettlements = (currentPeriod === null || currentPeriod === void 0 || (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
|
|
23
25
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
24
26
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
25
27
|
}, /*#__PURE__*/_react.default.createElement(_BillHeader.default, {
|
|
@@ -35,5 +37,4 @@ MainBillData.propTypes = {
|
|
|
35
37
|
container: _propTypes.string
|
|
36
38
|
})
|
|
37
39
|
};
|
|
38
|
-
var _default = (0, _WithContextApi.default)(_theme.retrieveStyle)(MainBillData);
|
|
39
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = (0, _WithContextApi.default)(_theme.retrieveStyle)(MainBillData);
|
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
};
|
|
8
|
+
const retrieveStyle = theme => ({
|
|
9
|
+
container: {
|
|
10
|
+
backgroundColor: (0, _seamlessImmutable.getIn)(theme, ['Container', 'backgroundColor']),
|
|
11
|
+
border: (0, _seamlessImmutable.getIn)(theme, ['Container', 'border']),
|
|
12
|
+
borderRadius: (0, _seamlessImmutable.getIn)(theme, ['Container', 'borderRadius'])
|
|
13
|
+
}
|
|
14
|
+
});
|
|
17
15
|
exports.retrieveStyle = retrieveStyle;
|
|
@@ -5,9 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getCurrentPeriod = void 0;
|
|
7
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
8
|
-
|
|
9
|
-
return (0, _seamlessImmutable.getIn)(billData, ['periods'], []).find(function (period) {
|
|
10
|
-
return period.current;
|
|
11
|
-
}) || {};
|
|
12
|
-
};
|
|
8
|
+
const getCurrentPeriod = billData => (0, _seamlessImmutable.getIn)(billData, ['periods'], []).find(period => period.current) || {};
|
|
13
9
|
exports.getCurrentPeriod = getCurrentPeriod;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -19,47 +18,59 @@ var _DebtState = _interopRequireDefault(require("../DebtState"));
|
|
|
19
18
|
var _aliases = require("../../shared/constants/aliases");
|
|
20
19
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
21
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
function _getRequireWildcardCache(
|
|
23
|
-
function _interopRequireWildcard(
|
|
24
|
-
|
|
21
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
const Period = _ref => {
|
|
25
24
|
var _settlements$current;
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
25
|
+
let {
|
|
26
|
+
contextApiInfo,
|
|
27
|
+
billData,
|
|
28
|
+
currentPeriod,
|
|
29
|
+
multipleSettlements,
|
|
30
|
+
issuedDate,
|
|
31
|
+
alias
|
|
32
|
+
} = _ref;
|
|
33
|
+
const {
|
|
34
|
+
assets,
|
|
35
|
+
config,
|
|
36
|
+
Label,
|
|
37
|
+
Tooltip
|
|
38
|
+
} = contextApiInfo;
|
|
39
|
+
const {
|
|
40
|
+
texts,
|
|
41
|
+
formatters,
|
|
42
|
+
colors
|
|
43
|
+
} = config;
|
|
44
|
+
const {
|
|
45
|
+
periodFormatter
|
|
46
|
+
} = formatters;
|
|
47
|
+
const {
|
|
48
|
+
bimester,
|
|
49
|
+
ofPreposition,
|
|
50
|
+
settlement,
|
|
51
|
+
period,
|
|
52
|
+
issuedOnDate
|
|
53
|
+
} = texts.commons;
|
|
54
|
+
const desktopAlias = alias || _aliases.PERIOD;
|
|
55
|
+
const {
|
|
56
|
+
isDesktopSize
|
|
57
|
+
} = (0, _hooks.useScreenSize)();
|
|
58
|
+
const debtStatusLabel = billData === null || billData === void 0 ? void 0 : billData.debt_status_label;
|
|
59
|
+
const debtStatusValidation = !!debtStatusLabel;
|
|
60
|
+
const settlements = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.settlements;
|
|
61
|
+
const periodicity = settlements === null || settlements === void 0 ? void 0 : settlements.periodicity;
|
|
62
|
+
const {
|
|
63
|
+
number: periodNumber,
|
|
64
|
+
year
|
|
65
|
+
} = currentPeriod;
|
|
66
|
+
const currentSettlement = settlements === null || settlements === void 0 || (_settlements$current = settlements.current) === null || _settlements$current === void 0 ? void 0 : _settlements$current.number;
|
|
67
|
+
const totalSettlements = settlements === null || settlements === void 0 ? void 0 : settlements.total_settlements;
|
|
68
|
+
const startDate = (0, _dayjs.default)(settlements === null || settlements === void 0 ? void 0 : settlements.start_date).format('DD/MM');
|
|
69
|
+
const endDate = (0, _dayjs.default)(settlements === null || settlements === void 0 ? void 0 : settlements.end_date).format('DD/MM');
|
|
70
|
+
const periodicityLabel = "".concat(multipleSettlements ? (0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? bimester : '-' : period, " ").concat((0, _utils.stringOrDash)(periodNumber));
|
|
71
|
+
const settlementLabel = "".concat(settlement, " ").concat((0, _utils.numberOrDash)(currentSettlement), " ").concat(ofPreposition, " ").concat((0, _utils.numberOrDash)(totalSettlements));
|
|
72
|
+
const issuedDateLabel = "".concat((0, _dayjs.default)(issuedDate, 'YYYY-MM-DD').format('DD/MM/YYYY'));
|
|
73
|
+
const issuedOnDateLabel = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
63
74
|
className: _stylesModule.default.issueDateContainer
|
|
64
75
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
65
76
|
className: _stylesModule.default.issueDate,
|
|
@@ -67,8 +78,8 @@ var Period = function Period(_ref) {
|
|
|
67
78
|
}, "".concat(issuedOnDate, ":\xA0")), /*#__PURE__*/_react.default.createElement(Label, {
|
|
68
79
|
alias: _aliases.PERIOD_ISSUED_DATE
|
|
69
80
|
}, issuedDateLabel)));
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
const yearAndPeriodicityLabel = "".concat((0, _utils.stringOrDash)(year), " - ").concat(periodicityLabel);
|
|
82
|
+
const bimesterOfYearLabel = "".concat(periodicityLabel, " ").concat(ofPreposition, " ").concat((0, _utils.stringOrDash)(year));
|
|
72
83
|
return periodFormatter ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
73
84
|
className: issuedDate ? _stylesModule.default.withIssuedDateContainer : _stylesModule.default.withOutIssuedDateContainer
|
|
74
85
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -148,5 +159,4 @@ Period.propTypes = {
|
|
|
148
159
|
issuedDate: _propTypes.string,
|
|
149
160
|
alias: _propTypes.string
|
|
150
161
|
};
|
|
151
|
-
var _default = (0, _WithContextApi.default)()(Period);
|
|
152
|
-
exports.default = _default;
|
|
162
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Period);
|
|
@@ -12,17 +12,21 @@ var _aliases = require("../../../../shared/constants/aliases");
|
|
|
12
12
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
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); }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
const PowerConsumption = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
consumption,
|
|
19
|
+
unit,
|
|
20
|
+
text,
|
|
21
|
+
isHired,
|
|
22
|
+
powerExceeded
|
|
23
|
+
} = _ref;
|
|
24
|
+
const {
|
|
25
|
+
Label
|
|
26
|
+
} = contextApiInfo;
|
|
27
|
+
const alias = !isHired ? _aliases.POWER_CONSUMPTION : _aliases.POWER_CONSUMPTION_GRAY;
|
|
28
|
+
const unitAlias = !isHired ? _aliases.POWER_CONSUMPTION_UNIT : _aliases.POWER_CONSUMPTION_UNIT_GRAY;
|
|
29
|
+
const textAlias = !isHired ? _aliases.POWER_CONSUMPTION_TEXT : _aliases.POWER_CONSUMPTION_TEXT_GRAY;
|
|
26
30
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
27
31
|
className: _stylesModule.default.powerLabel
|
|
28
32
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -49,5 +53,4 @@ PowerConsumption.propTypes = {
|
|
|
49
53
|
isHired: _propTypes.bool,
|
|
50
54
|
powerExceeded: _propTypes.bool
|
|
51
55
|
};
|
|
52
|
-
var _default = (0, _WithContextApi.default)()(PowerConsumption);
|
|
53
|
-
exports.default = _default;
|
|
56
|
+
var _default = exports.default = (0, _WithContextApi.default)()(PowerConsumption);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -14,35 +13,37 @@ var _utils = require("../../utils");
|
|
|
14
13
|
var _PowerConsumption = _interopRequireDefault(require("./components/PowerConsumption"));
|
|
15
14
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
function _getRequireWildcardCache(
|
|
18
|
-
function _interopRequireWildcard(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
const PowerProgresBar = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
contextApiInfo,
|
|
21
|
+
hiredPowerConsumption,
|
|
22
|
+
registeredPowerConsumption,
|
|
23
|
+
exceededPower
|
|
24
|
+
} = _ref;
|
|
25
|
+
const {
|
|
26
|
+
ProgressBar,
|
|
27
|
+
config,
|
|
28
|
+
Label,
|
|
29
|
+
assets
|
|
30
|
+
} = contextApiInfo;
|
|
31
|
+
const {
|
|
32
|
+
texts
|
|
33
|
+
} = config;
|
|
34
|
+
const {
|
|
35
|
+
RedAlertIcon
|
|
36
|
+
} = assets;
|
|
37
|
+
const powerExceeded = exceededPower.alert_message;
|
|
38
|
+
const powerConsumption = (consumption, unit, text, isHired) => /*#__PURE__*/_react.default.createElement(_PowerConsumption.default, {
|
|
39
|
+
consumption: consumption,
|
|
40
|
+
unit: unit,
|
|
41
|
+
text: text,
|
|
42
|
+
isHired: isHired,
|
|
43
|
+
powerExceeded: !!powerExceeded
|
|
44
|
+
});
|
|
45
|
+
const HiredPowerLabel = () => powerConsumption(hiredPowerConsumption.value, hiredPowerConsumption.unit, texts.commons.hired, true);
|
|
46
|
+
const RegisteredPowerLabel = () => powerConsumption(registeredPowerConsumption.value, registeredPowerConsumption.unit, texts.commons.registered);
|
|
46
47
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
47
48
|
className: _stylesModule.default.container
|
|
48
49
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -88,5 +89,4 @@ PowerProgresBar.propTypes = {
|
|
|
88
89
|
registeredPowerConsumption: _billDataTypes.consumptionTypes,
|
|
89
90
|
exceededPower: _billDataTypes.consumptionTypes
|
|
90
91
|
};
|
|
91
|
-
var _default = (0, _WithContextApi.default)()(PowerProgresBar);
|
|
92
|
-
exports.default = _default;
|
|
92
|
+
var _default = exports.default = (0, _WithContextApi.default)()(PowerProgresBar);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
8
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
8
|
var _propTypes = require("prop-types");
|
|
10
9
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
11
10
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
@@ -13,31 +12,30 @@ var _utils = require("../../utils");
|
|
|
13
12
|
var _aliases = require("../../shared/constants/aliases");
|
|
14
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
15
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Label
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
15
|
+
const RatePrices = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
rate,
|
|
19
|
+
category,
|
|
20
|
+
title,
|
|
21
|
+
classes = {},
|
|
22
|
+
showCategory
|
|
23
|
+
} = _ref;
|
|
24
|
+
const {
|
|
25
|
+
config,
|
|
26
|
+
Label
|
|
27
|
+
} = contextApiInfo;
|
|
28
|
+
const {
|
|
29
|
+
commons
|
|
30
|
+
} = config.texts;
|
|
31
|
+
const Title = () => /*#__PURE__*/_react.default.createElement(Label, {
|
|
32
|
+
alias: _aliases.TITLE,
|
|
33
|
+
className: "".concat(classes.title)
|
|
34
|
+
}, title);
|
|
35
|
+
const Category = () => /*#__PURE__*/_react.default.createElement(Label, {
|
|
36
|
+
alias: _aliases.CATEGORY,
|
|
37
|
+
className: "".concat(_stylesModule.default.category, " ").concat(classes.category)
|
|
38
|
+
}, "".concat(commons.category, " ").concat((0, _utils.stringOrDash)(category)));
|
|
41
39
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
40
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
43
41
|
}, showCategory ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -59,5 +57,4 @@ RatePrices.propTypes = {
|
|
|
59
57
|
}),
|
|
60
58
|
showCategory: _propTypes.bool
|
|
61
59
|
};
|
|
62
|
-
var _default = (0, _WithContextApi.default)()(RatePrices);
|
|
63
|
-
exports.default = _default;
|
|
60
|
+
var _default = exports.default = (0, _WithContextApi.default)()(RatePrices);
|
|
@@ -12,19 +12,26 @@ var _StyledAmount = _interopRequireDefault(require("../../../../../StyledAmount"
|
|
|
12
12
|
var _aliases = require("../../../../../../shared/constants/aliases");
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
const RateAndCategory = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
fixedChargeValue,
|
|
19
|
+
variableChargeValue
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
config,
|
|
23
|
+
ExternalLink,
|
|
24
|
+
Label
|
|
25
|
+
} = contextApiInfo;
|
|
26
|
+
const {
|
|
27
|
+
ratesTableLink
|
|
28
|
+
} = config.externalLinks;
|
|
29
|
+
const {
|
|
30
|
+
fixedCharge,
|
|
31
|
+
variableCharge,
|
|
32
|
+
currency,
|
|
33
|
+
seeRatesTable
|
|
34
|
+
} = config.texts.ratesDefinition;
|
|
28
35
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
36
|
className: _stylesModule.default.container
|
|
30
37
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -63,5 +70,4 @@ RateAndCategory.propTypes = {
|
|
|
63
70
|
fixedChargeValue: _propTypes.number,
|
|
64
71
|
variableChargeValue: _propTypes.number
|
|
65
72
|
};
|
|
66
|
-
var _default = (0, _WithContextApi.default)()(RateAndCategory);
|
|
67
|
-
exports.default = _default;
|
|
73
|
+
var _default = exports.default = (0, _WithContextApi.default)()(RateAndCategory);
|
|
@@ -12,20 +12,30 @@ var _aliases = require("../../../../shared/constants/aliases");
|
|
|
12
12
|
var _RatePrices = _interopRequireDefault(require("./components/RatePrices"));
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
const BillRate = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
rate,
|
|
19
|
+
category,
|
|
20
|
+
fixedCharge,
|
|
21
|
+
variableCharge
|
|
22
|
+
} = _ref;
|
|
23
|
+
const {
|
|
24
|
+
assets,
|
|
25
|
+
config,
|
|
26
|
+
Label,
|
|
27
|
+
Tooltip
|
|
28
|
+
} = contextApiInfo;
|
|
29
|
+
const {
|
|
30
|
+
texts,
|
|
31
|
+
colors
|
|
32
|
+
} = config;
|
|
33
|
+
const {
|
|
34
|
+
rateFormatter
|
|
35
|
+
} = config.formatters;
|
|
36
|
+
const {
|
|
37
|
+
billRatePrices
|
|
38
|
+
} = config.texts.ratesDefinition;
|
|
29
39
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
30
40
|
className: _stylesModule.default.container
|
|
31
41
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -54,5 +64,4 @@ BillRate.propTypes = {
|
|
|
54
64
|
fixedCharge: _propTypes.number,
|
|
55
65
|
variableCharge: _propTypes.number
|
|
56
66
|
};
|
|
57
|
-
var _default = (0, _WithContextApi.default)()(BillRate);
|
|
58
|
-
exports.default = _default;
|
|
67
|
+
var _default = exports.default = (0, _WithContextApi.default)()(BillRate);
|
|
@@ -12,15 +12,20 @@ var _utils = require("../../../../../../utils");
|
|
|
12
12
|
var _aliases = require("../../../../../../shared/constants/aliases");
|
|
13
13
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
const Category = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
contextApiInfo,
|
|
18
|
+
category,
|
|
19
|
+
wrap
|
|
20
|
+
} = _ref;
|
|
21
|
+
const {
|
|
22
|
+
config,
|
|
23
|
+
Label
|
|
24
|
+
} = contextApiInfo;
|
|
25
|
+
const {
|
|
26
|
+
commons,
|
|
27
|
+
ratesDefinition
|
|
28
|
+
} = config.texts;
|
|
24
29
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
30
|
className: wrap ? _stylesModule.default.containerWrap : _stylesModule.default.container
|
|
26
31
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -36,5 +41,4 @@ Category.propTypes = {
|
|
|
36
41
|
category: _propTypes.string,
|
|
37
42
|
wrap: _propTypes.bool
|
|
38
43
|
};
|
|
39
|
-
var _default = (0, _WithContextApi.default)()(Category);
|
|
40
|
-
exports.default = _default;
|
|
44
|
+
var _default = exports.default = (0, _WithContextApi.default)()(Category);
|