@widergy/utilitygo-smart-bill-web 1.13.3 → 2.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 +19 -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 +13 -33
- 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 +3 -16
- 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 +17 -34
- 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 +2 -21
- 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 +5 -28
- 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 +7 -28
- 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 +5 -16
- package/dist/components/WithContextApi/layout.js +0 -9
- package/dist/components/WithSeason/index.js +1 -7
- 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 +86 -83
- 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
|
@@ -4,38 +4,25 @@ 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 _consumptions = require("../../../../../../shared/utils/consumptions");
|
|
13
|
-
|
|
14
10
|
var _periods = require("../../../../../../shared/utils/periods");
|
|
15
|
-
|
|
16
11
|
var _consumptions2 = require("../../../../../../shared/constants/consumptions");
|
|
17
|
-
|
|
18
12
|
var _billDataTypes = require("../../../../../../shared/types/billDataTypes");
|
|
19
|
-
|
|
20
13
|
var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
|
|
21
|
-
|
|
22
14
|
var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
|
|
23
|
-
|
|
24
15
|
var _PowerProgresBar = _interopRequireDefault(require("../../../../../PowerProgresBar"));
|
|
25
|
-
|
|
26
16
|
var _ConsumptionEnergyDetails = _interopRequireDefault(require("../../../../../ConsumptionEnergyDetails"));
|
|
27
|
-
|
|
28
17
|
var _utils = require("./utils");
|
|
29
|
-
|
|
30
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
19
|
var Consumption = function Consumption(_ref) {
|
|
33
20
|
var billData = _ref.billData,
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
multipleSettlements = _ref.multipleSettlements,
|
|
22
|
+
contextApiInfo = _ref.contextApiInfo;
|
|
36
23
|
var _contextApiInfo$confi = contextApiInfo.config.validations,
|
|
37
|
-
|
|
38
|
-
|
|
24
|
+
showPower = _contextApiInfo$confi.showPower,
|
|
25
|
+
showActiveReactiveComparison = _contextApiInfo$confi.showActiveReactiveComparison;
|
|
39
26
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
40
27
|
var hiredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.PURCHASED);
|
|
41
28
|
var registeredPowerConsumption = (0, _consumptions.getTotalConsumption)(currentPeriod, _consumptions2.POWER_TYPES.REGISTERED);
|
|
@@ -51,13 +38,10 @@ var Consumption = function Consumption(_ref) {
|
|
|
51
38
|
exceededPower: exceededPower
|
|
52
39
|
}));
|
|
53
40
|
};
|
|
54
|
-
|
|
55
41
|
Consumption.propTypes = {
|
|
56
42
|
billData: _billDataTypes.billDataTypes,
|
|
57
43
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
58
44
|
multipleSettlements: _propTypes.bool
|
|
59
45
|
};
|
|
60
|
-
|
|
61
46
|
var _default = (0, _WithContextApi.default)()(Consumption);
|
|
62
|
-
|
|
63
47
|
exports.default = _default;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.validateConsumptions = void 0;
|
|
7
|
-
|
|
8
7
|
var validateConsumptions = function validateConsumptions(registeredPowerConsumption, hiredPowerConsumption) {
|
|
9
8
|
return registeredPowerConsumption !== null && registeredPowerConsumption !== undefined && hiredPowerConsumption !== null && hiredPowerConsumption !== undefined;
|
|
10
9
|
};
|
|
11
|
-
|
|
12
10
|
exports.validateConsumptions = validateConsumptions;
|
|
@@ -4,40 +4,29 @@ 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 _aliases = require("../../../../../../shared/constants/aliases");
|
|
13
|
-
|
|
14
10
|
var _smartBillTypes = require("../../../../../../shared/types/smartBillTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../../../../../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _IconAndDetails = _interopRequireDefault(require("../../../../../IconAndDetails"));
|
|
19
|
-
|
|
20
13
|
var _billDataTypes = require("../../../../../../shared/types/billDataTypes");
|
|
21
|
-
|
|
22
14
|
var _utils = require("./utils");
|
|
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
|
var ReadingDetails = function ReadingDetails(_ref) {
|
|
29
18
|
var contextApiInfo = _ref.contextApiInfo,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
meterNumber = _ref.meterNumber,
|
|
20
|
+
readingType = _ref.readingType,
|
|
21
|
+
withParticularConditions = _ref.withParticularConditions,
|
|
22
|
+
transformationCenter = _ref.transformationCenter,
|
|
23
|
+
feederLine = _ref.feederLine,
|
|
24
|
+
billData = _ref.billData;
|
|
36
25
|
var assets = contextApiInfo.assets,
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
config = contextApiInfo.config,
|
|
27
|
+
Label = contextApiInfo.Label;
|
|
39
28
|
var texts = config.texts,
|
|
40
|
-
|
|
29
|
+
validations = config.validations;
|
|
41
30
|
var showFeederLine = validations.showFeederLine;
|
|
42
31
|
var longMeterNumber = (meterNumber === null || meterNumber === void 0 ? void 0 : meterNumber.length) > 6;
|
|
43
32
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -91,28 +80,25 @@ var ReadingDetails = function ReadingDetails(_ref) {
|
|
|
91
80
|
secondaryAlias: _aliases.DETAIL
|
|
92
81
|
})));
|
|
93
82
|
};
|
|
94
|
-
|
|
95
83
|
ReadingDetails.propTypes = {
|
|
96
84
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
97
85
|
meterNumber: _propTypes.string,
|
|
98
|
-
readingType: (0, _propTypes.
|
|
86
|
+
readingType: (0, _propTypes.shape)({
|
|
99
87
|
date: _propTypes.string,
|
|
100
|
-
type: _propTypes.string,
|
|
101
88
|
moment: _propTypes.string,
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
records: (0, _propTypes.arrayOf)((0, _propTypes.shape)({
|
|
90
|
+
magnitude: _propTypes.string,
|
|
104
91
|
type: _propTypes.string,
|
|
105
92
|
unit: _propTypes.string,
|
|
106
|
-
magnitude: _propTypes.string,
|
|
107
93
|
value: _propTypes.number
|
|
108
|
-
}
|
|
109
|
-
|
|
94
|
+
})),
|
|
95
|
+
subtype: _propTypes.string,
|
|
96
|
+
type: _propTypes.string
|
|
97
|
+
}),
|
|
110
98
|
withParticularConditions: _propTypes.bool,
|
|
111
99
|
transformationCenter: _propTypes.string,
|
|
112
100
|
billData: _billDataTypes.billDataTypes,
|
|
113
101
|
feederLine: _propTypes.string
|
|
114
102
|
};
|
|
115
|
-
|
|
116
103
|
var _default = (0, _WithContextApi.default)()(ReadingDetails);
|
|
117
|
-
|
|
118
104
|
exports.default = _default;
|
|
@@ -4,20 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.mainText = void 0;
|
|
7
|
-
|
|
8
7
|
var _readings = require("../../../../../../shared/constants/readings");
|
|
9
|
-
|
|
10
8
|
var mainText = function mainText(readingType, texts) {
|
|
11
9
|
switch (readingType.type) {
|
|
12
10
|
case _readings.READING_TYPES.FACE_TO_FACE:
|
|
13
11
|
return readingType.subtype === _readings.READING_TYPES.TELEMEDITION ? texts.commons.telemeditionReading : texts.commons.faceToFaceReading;
|
|
14
|
-
|
|
15
12
|
case _readings.READING_TYPES.ESTIMATED:
|
|
16
13
|
return texts.commons.estimatedReading;
|
|
17
|
-
|
|
18
14
|
default:
|
|
19
15
|
return undefined;
|
|
20
16
|
}
|
|
21
17
|
};
|
|
22
|
-
|
|
23
18
|
exports.mainText = mainText;
|
|
@@ -1,62 +1,37 @@
|
|
|
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 _array = require("@widergy/web-utils/lib/array");
|
|
13
|
-
|
|
14
10
|
var _propTypes = require("prop-types");
|
|
15
|
-
|
|
16
11
|
var _periods = require("../../../../shared/utils/periods");
|
|
17
|
-
|
|
18
12
|
var _billDataTypes = require("../../../../shared/types/billDataTypes");
|
|
19
|
-
|
|
20
13
|
var _readings = require("../../../../shared/utils/readings");
|
|
21
|
-
|
|
22
14
|
var _readings2 = require("../../../../shared/constants/readings");
|
|
23
|
-
|
|
24
15
|
var _Amount = _interopRequireDefault(require("../../../Amount"));
|
|
25
|
-
|
|
26
16
|
var _hooks = require("../../../../utils/hooks");
|
|
27
|
-
|
|
28
17
|
var _BillAlert = _interopRequireDefault(require("../BillAlert"));
|
|
29
|
-
|
|
30
18
|
var _Period = _interopRequireDefault(require("../../../Period"));
|
|
31
|
-
|
|
32
19
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
33
|
-
|
|
34
20
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
35
|
-
|
|
36
21
|
var _ReadingDetails = _interopRequireDefault(require("./components/ReadingDetails"));
|
|
37
|
-
|
|
38
22
|
var _Consumption = _interopRequireDefault(require("./components/Consumption"));
|
|
39
|
-
|
|
40
23
|
var _ClientData = _interopRequireDefault(require("./components/ClientData"));
|
|
41
|
-
|
|
42
24
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
43
|
-
|
|
44
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
45
|
-
|
|
46
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
|
-
|
|
48
27
|
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; }
|
|
49
|
-
|
|
50
28
|
var BillBody = function BillBody(_ref) {
|
|
51
29
|
var _billData$client, _billData$client2;
|
|
52
|
-
|
|
53
30
|
var billData = _ref.billData,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
31
|
+
multipleSettlements = _ref.multipleSettlements,
|
|
32
|
+
contextApiInfo = _ref.contextApiInfo;
|
|
57
33
|
var _useScreenSize = (0, _hooks.useScreenSize)(),
|
|
58
|
-
|
|
59
|
-
|
|
34
|
+
isDesktopSize = _useScreenSize.isDesktopSize;
|
|
60
35
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
61
36
|
var showAlternativeMainBillDataLayout = contextApiInfo.config.validations.showAlternativeMainBillDataLayout;
|
|
62
37
|
var withParticularConditions = !(0, _array.isEmpty)(billData.particular_conditions);
|
|
@@ -64,14 +39,12 @@ var BillBody = function BillBody(_ref) {
|
|
|
64
39
|
var transformationCenter = (_billData$client = billData.client) === null || _billData$client === void 0 ? void 0 : _billData$client.transformation_center;
|
|
65
40
|
var feederLine = (_billData$client2 = billData.client) === null || _billData$client2 === void 0 ? void 0 : _billData$client2.feeder_line;
|
|
66
41
|
var readingType = (0, _readings.getReadingPeriod)(billData, _readings2.READING_MOMENTS.FINAL);
|
|
67
|
-
|
|
68
42
|
var RenderClientData = function RenderClientData() {
|
|
69
43
|
return /*#__PURE__*/_react.default.createElement(_ClientData.default, {
|
|
70
44
|
billData: billData,
|
|
71
45
|
multipleSettlements: multipleSettlements
|
|
72
46
|
});
|
|
73
47
|
};
|
|
74
|
-
|
|
75
48
|
var RenderReadingDetails = function RenderReadingDetails() {
|
|
76
49
|
return /*#__PURE__*/_react.default.createElement(_ReadingDetails.default, {
|
|
77
50
|
meterNumber: billData.meter_number,
|
|
@@ -82,7 +55,6 @@ var BillBody = function BillBody(_ref) {
|
|
|
82
55
|
billData: billData
|
|
83
56
|
});
|
|
84
57
|
};
|
|
85
|
-
|
|
86
58
|
var AmountAndonsumptionRender = function AmountAndonsumptionRender() {
|
|
87
59
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_Amount.default, {
|
|
88
60
|
billData: billData,
|
|
@@ -95,7 +67,6 @@ var BillBody = function BillBody(_ref) {
|
|
|
95
67
|
multipleSettlements: multipleSettlements
|
|
96
68
|
}));
|
|
97
69
|
};
|
|
98
|
-
|
|
99
70
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
100
71
|
className: _stylesModule.default.container
|
|
101
72
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -110,13 +81,10 @@ var BillBody = function BillBody(_ref) {
|
|
|
110
81
|
multipleSettlements: multipleSettlements
|
|
111
82
|
}), !isDesktopSize && /*#__PURE__*/_react.default.createElement(RenderReadingDetails, null), /*#__PURE__*/_react.default.createElement(RenderClientData, null)) : /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(AmountAndonsumptionRender, null), !isDesktopSize && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(RenderReadingDetails, null), /*#__PURE__*/_react.default.createElement(RenderClientData, null)))));
|
|
112
83
|
};
|
|
113
|
-
|
|
114
84
|
BillBody.propTypes = {
|
|
115
85
|
billData: _billDataTypes.billDataTypes,
|
|
116
86
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
117
87
|
multipleSettlements: _propTypes.bool
|
|
118
88
|
};
|
|
119
|
-
|
|
120
89
|
var _default = (0, _WithContextApi.default)()(BillBody);
|
|
121
|
-
|
|
122
90
|
exports.default = _default;
|
package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js
CHANGED
|
@@ -4,33 +4,24 @@ 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 TypeAndNumber = function TypeAndNumber(_ref) {
|
|
25
16
|
var contextApiInfo = _ref.contextApiInfo,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
billType = _ref.billType,
|
|
18
|
+
billNumber = _ref.billNumber,
|
|
19
|
+
mainAlias = _ref.mainAlias,
|
|
20
|
+
detailAlias = _ref.detailAlias,
|
|
21
|
+
_ref$classes = _ref.classes,
|
|
22
|
+
classes = _ref$classes === void 0 ? {} : _ref$classes;
|
|
32
23
|
var config = contextApiInfo.config,
|
|
33
|
-
|
|
24
|
+
Label = contextApiInfo.Label;
|
|
34
25
|
var texts = config.texts;
|
|
35
26
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
27
|
className: "".concat(_stylesModule.default.container, " ").concat(classes.container)
|
|
@@ -46,7 +37,6 @@ var TypeAndNumber = function TypeAndNumber(_ref) {
|
|
|
46
37
|
alias: detailAlias
|
|
47
38
|
}, texts.mainBillData.billTypeAndNumber));
|
|
48
39
|
};
|
|
49
|
-
|
|
50
40
|
TypeAndNumber.propTypes = {
|
|
51
41
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
52
42
|
billType: _propTypes.string,
|
|
@@ -58,7 +48,5 @@ TypeAndNumber.propTypes = {
|
|
|
58
48
|
}),
|
|
59
49
|
detailAlias: _propTypes.string
|
|
60
50
|
};
|
|
61
|
-
|
|
62
51
|
var _default = (0, _WithContextApi.default)()(TypeAndNumber);
|
|
63
|
-
|
|
64
52
|
exports.default = _default;
|
|
@@ -4,48 +4,30 @@ 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 _periods = require("../../../../shared/utils/periods");
|
|
11
|
-
|
|
12
9
|
var _smartBillTypes = require("../../../../shared/types/smartBillTypes");
|
|
13
|
-
|
|
14
10
|
var _billDataTypes = require("../../../../shared/types/billDataTypes");
|
|
15
|
-
|
|
16
11
|
var _WithContextApi = _interopRequireDefault(require("../../../WithContextApi"));
|
|
17
|
-
|
|
18
12
|
var _Date = _interopRequireDefault(require("../../../Date"));
|
|
19
|
-
|
|
20
13
|
var _DebtState = _interopRequireDefault(require("../../../DebtState"));
|
|
21
|
-
|
|
22
14
|
var _Period = _interopRequireDefault(require("../../../Period"));
|
|
23
|
-
|
|
24
15
|
var _hooks = require("../../../../utils/hooks");
|
|
25
|
-
|
|
26
16
|
var _aliases = require("../../../../shared/constants/aliases");
|
|
27
|
-
|
|
28
17
|
var _TypeAndNumber = _interopRequireDefault(require("./components/TypeAndNumber"));
|
|
29
|
-
|
|
30
18
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
31
|
-
|
|
32
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
|
-
|
|
34
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
|
-
|
|
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); }
|
|
36
21
|
var BillHeader = function BillHeader(_ref) {
|
|
37
22
|
var _currentPeriod$settle, _currentPeriod$settle2, _currentPeriod$settle3;
|
|
38
|
-
|
|
39
23
|
var contextApiInfo = _ref.contextApiInfo,
|
|
40
|
-
|
|
24
|
+
billData = _ref.billData;
|
|
41
25
|
var assets = contextApiInfo.assets,
|
|
42
|
-
|
|
26
|
+
config = contextApiInfo.config;
|
|
43
27
|
var texts = config.texts;
|
|
44
|
-
|
|
45
28
|
var _useScreenSize = (0, _hooks.useScreenSize)(),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
29
|
+
isDesktopSize = _useScreenSize.isDesktopSize,
|
|
30
|
+
isMobileOrTablet = _useScreenSize.isMobileOrTablet;
|
|
49
31
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
50
32
|
var issuedOnDate = currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : (_currentPeriod$settle2 = _currentPeriod$settle.current) === null || _currentPeriod$settle2 === void 0 ? void 0 : _currentPeriod$settle2.issued_on;
|
|
51
33
|
var totalSettlements = currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle3 = currentPeriod.settlements) === null || _currentPeriod$settle3 === void 0 ? void 0 : _currentPeriod$settle3.total_settlements;
|
|
@@ -56,7 +38,6 @@ var BillHeader = function BillHeader(_ref) {
|
|
|
56
38
|
mainAlias: _aliases.MAIN_LIGHT,
|
|
57
39
|
detailAlias: _aliases.DETAIL
|
|
58
40
|
};
|
|
59
|
-
|
|
60
41
|
var DebtStatusLabel = function DebtStatusLabel() {
|
|
61
42
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
62
43
|
className: "".concat(billData.warning ? _stylesModule.default.pendingDebtLabelContainer : _stylesModule.default.adheredToAutomaticDebtContainer)
|
|
@@ -65,7 +46,6 @@ var BillHeader = function BillHeader(_ref) {
|
|
|
65
46
|
isWarning: billData.warning
|
|
66
47
|
}));
|
|
67
48
|
};
|
|
68
|
-
|
|
69
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
70
50
|
className: _stylesModule.default.container
|
|
71
51
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -97,12 +77,9 @@ var BillHeader = function BillHeader(_ref) {
|
|
|
97
77
|
multipleSettlements: multipleSettlements
|
|
98
78
|
})));
|
|
99
79
|
};
|
|
100
|
-
|
|
101
80
|
BillHeader.propTypes = {
|
|
102
81
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
103
82
|
billData: _billDataTypes.billDataTypes
|
|
104
83
|
};
|
|
105
|
-
|
|
106
84
|
var _default = (0, _WithContextApi.default)()(BillHeader);
|
|
107
|
-
|
|
108
85
|
exports.default = _default;
|
|
@@ -4,32 +4,20 @@ 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 _billDataTypes = require("../../shared/types/billDataTypes");
|
|
13
|
-
|
|
14
10
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
15
|
-
|
|
16
11
|
var _periods = require("../../shared/utils/periods");
|
|
17
|
-
|
|
18
12
|
var _theme = require("./theme");
|
|
19
|
-
|
|
20
13
|
var _BillHeader = _interopRequireDefault(require("./components/BillHeader"));
|
|
21
|
-
|
|
22
14
|
var _BillBody = _interopRequireDefault(require("./components/BillBody"));
|
|
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
|
var MainBillData = function MainBillData(_ref) {
|
|
29
18
|
var _currentPeriod$settle;
|
|
30
|
-
|
|
31
19
|
var billData = _ref.billData,
|
|
32
|
-
|
|
20
|
+
classes = _ref.classes;
|
|
33
21
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
34
22
|
var multipleSettlements = (currentPeriod === null || currentPeriod === void 0 ? void 0 : (_currentPeriod$settle = currentPeriod.settlements) === null || _currentPeriod$settle === void 0 ? void 0 : _currentPeriod$settle.total_settlements) > 1;
|
|
35
23
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -41,14 +29,11 @@ var MainBillData = function MainBillData(_ref) {
|
|
|
41
29
|
multipleSettlements: multipleSettlements
|
|
42
30
|
}));
|
|
43
31
|
};
|
|
44
|
-
|
|
45
32
|
MainBillData.propTypes = {
|
|
46
33
|
billData: _billDataTypes.billDataTypes,
|
|
47
34
|
classes: (0, _propTypes.shape)({
|
|
48
35
|
container: _propTypes.string
|
|
49
36
|
})
|
|
50
37
|
};
|
|
51
|
-
|
|
52
38
|
var _default = (0, _WithContextApi.default)(_theme.retrieveStyle)(MainBillData);
|
|
53
|
-
|
|
54
39
|
exports.default = _default;
|
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.retrieveStyle = void 0;
|
|
7
|
-
|
|
8
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
9
|
-
|
|
10
8
|
var retrieveStyle = function retrieveStyle(theme) {
|
|
11
9
|
return {
|
|
12
10
|
container: {
|
|
@@ -16,5 +14,4 @@ var retrieveStyle = function retrieveStyle(theme) {
|
|
|
16
14
|
}
|
|
17
15
|
};
|
|
18
16
|
};
|
|
19
|
-
|
|
20
17
|
exports.retrieveStyle = retrieveStyle;
|
|
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getCurrentPeriod = void 0;
|
|
7
|
-
|
|
8
7
|
var _seamlessImmutable = require("seamless-immutable");
|
|
9
|
-
|
|
10
8
|
var getCurrentPeriod = function getCurrentPeriod(billData) {
|
|
11
9
|
return (0, _seamlessImmutable.getIn)(billData, ['periods'], []).find(function (period) {
|
|
12
10
|
return period.current;
|
|
13
11
|
}) || {};
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
exports.getCurrentPeriod = getCurrentPeriod;
|
|
@@ -1,78 +1,57 @@
|
|
|
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 _dayjs = _interopRequireDefault(require("dayjs"));
|
|
13
|
-
|
|
14
10
|
var _propTypes = require("prop-types");
|
|
15
|
-
|
|
16
11
|
var _string = require("@widergy/web-utils/lib/string");
|
|
17
|
-
|
|
18
12
|
var _periodicities = require("../../shared/constants/periodicities");
|
|
19
|
-
|
|
20
13
|
var _smartBillTypes = require("../../shared/types/smartBillTypes");
|
|
21
|
-
|
|
22
14
|
var _billDataTypes = require("../../shared/types/billDataTypes");
|
|
23
|
-
|
|
24
15
|
var _utils = require("../../utils");
|
|
25
|
-
|
|
26
16
|
var _hooks = require("../../utils/hooks");
|
|
27
|
-
|
|
28
17
|
var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
29
|
-
|
|
30
18
|
var _DebtState = _interopRequireDefault(require("../DebtState"));
|
|
31
|
-
|
|
32
19
|
var _aliases = require("../../shared/constants/aliases");
|
|
33
|
-
|
|
34
20
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
35
|
-
|
|
36
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
|
-
|
|
38
22
|
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); }
|
|
39
|
-
|
|
40
23
|
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; }
|
|
41
|
-
|
|
42
24
|
var Period = function Period(_ref) {
|
|
43
25
|
var _settlements$current;
|
|
44
|
-
|
|
45
26
|
var contextApiInfo = _ref.contextApiInfo,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
27
|
+
billData = _ref.billData,
|
|
28
|
+
currentPeriod = _ref.currentPeriod,
|
|
29
|
+
multipleSettlements = _ref.multipleSettlements,
|
|
30
|
+
issueedDate = _ref.issueedDate,
|
|
31
|
+
alias = _ref.alias;
|
|
51
32
|
var assets = contextApiInfo.assets,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
config = contextApiInfo.config,
|
|
34
|
+
Label = contextApiInfo.Label,
|
|
35
|
+
Tooltip = contextApiInfo.Tooltip;
|
|
55
36
|
var texts = config.texts,
|
|
56
|
-
|
|
57
|
-
|
|
37
|
+
formatters = config.formatters,
|
|
38
|
+
colors = config.colors;
|
|
58
39
|
var periodFormatter = formatters.periodFormatter;
|
|
59
40
|
var _texts$commons = texts.commons,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
41
|
+
bimester = _texts$commons.bimester,
|
|
42
|
+
ofPreposition = _texts$commons.ofPreposition,
|
|
43
|
+
settlement = _texts$commons.settlement,
|
|
44
|
+
period = _texts$commons.period,
|
|
45
|
+
issuedOnDate = _texts$commons.issuedOnDate;
|
|
65
46
|
var desktopAlias = alias || _aliases.PERIOD;
|
|
66
|
-
|
|
67
47
|
var _useScreenSize = (0, _hooks.useScreenSize)(),
|
|
68
|
-
|
|
69
|
-
|
|
48
|
+
isDesktopSize = _useScreenSize.isDesktopSize;
|
|
70
49
|
var debtStatusLabel = billData === null || billData === void 0 ? void 0 : billData.debt_status_label;
|
|
71
50
|
var debtStatusValidation = !!debtStatusLabel;
|
|
72
51
|
var settlements = currentPeriod === null || currentPeriod === void 0 ? void 0 : currentPeriod.settlements;
|
|
73
52
|
var periodicity = settlements === null || settlements === void 0 ? void 0 : settlements.periodicity;
|
|
74
53
|
var periodNumber = currentPeriod.number,
|
|
75
|
-
|
|
54
|
+
year = currentPeriod.year;
|
|
76
55
|
var currentSettlement = settlements === null || settlements === void 0 ? void 0 : (_settlements$current = settlements.current) === null || _settlements$current === void 0 ? void 0 : _settlements$current.number;
|
|
77
56
|
var totalSettlements = settlements === null || settlements === void 0 ? void 0 : settlements.total_settlements;
|
|
78
57
|
var startDate = (0, _dayjs.default)(settlements === null || settlements === void 0 ? void 0 : settlements.start_date).format('DD/MM');
|
|
@@ -80,7 +59,6 @@ var Period = function Period(_ref) {
|
|
|
80
59
|
var periodicityLabel = "".concat(multipleSettlements ? (0, _string.stringToCompareWithoutAccentsInclusive)(periodicity, _periodicities.PERIODICITY.BIMONTHLY) ? bimester : '-' : period, " ").concat((0, _utils.stringOrDash)(periodNumber));
|
|
81
60
|
var settlementLabel = "".concat(settlement, " ").concat((0, _utils.numberOrDash)(currentSettlement), " ").concat(ofPreposition, " ").concat((0, _utils.numberOrDash)(totalSettlements));
|
|
82
61
|
var issuedDateLabel = "".concat((0, _dayjs.default)(issueedDate, 'YYYY-MM-DD').format('DD/MM/YYYY'));
|
|
83
|
-
|
|
84
62
|
var issuedOnDateLabel = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
85
63
|
className: _stylesModule.default.issueDateContainer
|
|
86
64
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -89,7 +67,6 @@ var Period = function Period(_ref) {
|
|
|
89
67
|
}, "".concat(issuedOnDate, ":\xA0")), /*#__PURE__*/_react.default.createElement(Label, {
|
|
90
68
|
alias: _aliases.PERIOD_ISSUED_DATE
|
|
91
69
|
}, issuedDateLabel)));
|
|
92
|
-
|
|
93
70
|
var yearAndPeriodicityLabel = "".concat((0, _utils.stringOrDash)(year), " - ").concat(periodicityLabel);
|
|
94
71
|
var bimesterOfYearLabel = "".concat(periodicityLabel, " ").concat(ofPreposition, " ").concat((0, _utils.stringOrDash)(year));
|
|
95
72
|
return periodFormatter ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -120,7 +97,7 @@ var Period = function Period(_ref) {
|
|
|
120
97
|
className: _stylesModule.default.header
|
|
121
98
|
}, isDesktopSize ? /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(Label, {
|
|
122
99
|
alias: desktopAlias,
|
|
123
|
-
className: _stylesModule.default.periodLabel
|
|
100
|
+
className: "".concat(_stylesModule.default.periodLabel, " ").concat(_stylesModule.default.labelSpacing)
|
|
124
101
|
}, multipleSettlements ? "".concat(bimesterOfYearLabel, " - ").concat(settlementLabel) : "".concat(yearAndPeriodicityLabel)), /*#__PURE__*/_react.default.createElement("div", {
|
|
125
102
|
className: _stylesModule.default.issuedOnDateAndLabel
|
|
126
103
|
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
@@ -163,7 +140,6 @@ var Period = function Period(_ref) {
|
|
|
163
140
|
}
|
|
164
141
|
})));
|
|
165
142
|
};
|
|
166
|
-
|
|
167
143
|
Period.propTypes = {
|
|
168
144
|
contextApiInfo: _smartBillTypes.contextApiInfoTypes,
|
|
169
145
|
billData: _billDataTypes.billDataTypes,
|
|
@@ -172,7 +148,5 @@ Period.propTypes = {
|
|
|
172
148
|
issueedDate: _propTypes.string,
|
|
173
149
|
alias: _propTypes.string
|
|
174
150
|
};
|
|
175
|
-
|
|
176
151
|
var _default = (0, _WithContextApi.default)()(Period);
|
|
177
|
-
|
|
178
152
|
exports.default = _default;
|