@widergy/utilitygo-smart-bill-web 1.7.3 → 1.10.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 +28 -0
- package/dist/components/Advice/index.js +1 -2
- package/dist/components/Advice/styles.module.scss +2 -1
- package/dist/components/Amount/index.js +2 -2
- package/dist/components/Amount/styles.module.scss +10 -2
- package/dist/components/BarChart/constants.js +19 -3
- package/dist/components/BarChart/index.js +70 -101
- package/dist/components/BarChart/styles.module.scss +71 -0
- package/dist/components/BarChart/utils.js +31 -15
- package/dist/components/BillCalculation/components/ConceptCard/index.js +28 -9
- package/dist/components/BillCalculation/components/ConceptCard/styles.module.scss +16 -6
- package/dist/components/BillCalculation/index.js +10 -5
- package/dist/components/BillCalculation/utils.js +14 -9
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/index.js +11 -18
- package/dist/components/BillSummary/components/BilledConcepts/components/Concept/styles.module.scss +1 -5
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/constants.js +9 -3
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/index.js +21 -28
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/styles.module.scss +2 -2
- package/dist/components/BillSummary/components/BilledConcepts/constants.js +1 -1
- package/dist/components/BillSummary/components/BilledConcepts/index.js +8 -3
- package/dist/components/BillSummary/components/BilledConcepts/styles.module.scss +1 -1
- package/dist/components/BillSummary/components/BilledConcepts/utils.js +20 -6
- package/dist/components/BillSummary/styles.module.scss +2 -3
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/index.js +3 -3
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/DataLine/styles.module.scss +4 -2
- package/dist/components/ConsumptionComparison/components/ComparisonTable/components/Season/index.js +3 -3
- package/dist/components/ConsumptionComparison/components/ComparisonTable/constants.js +61 -37
- package/dist/components/ConsumptionComparison/components/ComparisonTable/styles.module.scss +14 -6
- package/dist/components/ConsumptionComparison/components/ComparisonTable/utils.js +4 -2
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/index.js +2 -5
- package/dist/components/ConsumptionComparison/components/ConsumptionAdvice/styles.module.scss +4 -5
- package/dist/components/ConsumptionComparison/components/PercentageComparison/index.js +4 -3
- package/dist/components/ConsumptionComparison/components/PercentageComparison/styles.module.scss +3 -12
- package/dist/components/ConsumptionComparison/index.js +9 -11
- package/dist/components/ConsumptionComparison/styles.module.scss +5 -4
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/index.js +26 -2
- package/dist/components/ConsumptionEnergyDetails/components/ConsumptionEnergyComparison/styles.module.scss +2 -0
- package/dist/components/ConsumptionEnergyDetails/components/PercentageComparison/styles.module.scss +1 -1
- package/dist/components/ConsumptionEnergyDetails/index.js +21 -11
- package/dist/components/ConsumptionEnergyDetails/styles.module.scss +13 -1
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/index.js +61 -42
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/styles.module.scss +33 -20
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/Card/utils.js +24 -0
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/index.js +13 -19
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderConsumption/styles.module.scss +3 -6
- package/dist/components/ConsumptionIncluded/components/TimelineRow/components/HeaderSettlement/index.js +7 -9
- package/dist/components/ConsumptionIncluded/components/TimelineRow/index.js +11 -3
- package/dist/components/ConsumptionIncluded/components/TimelineRow/styles.module.scss +10 -13
- package/dist/components/ConsumptionIncluded/styles.module.scss +5 -0
- package/dist/components/ConsumptionIncluded/utils.js +6 -6
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/components/ReadingRow/styles.module.scss +2 -0
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/index.js +8 -6
- package/dist/components/ConsumptionPeriod/components/ConsumptionSummary/styles.module.scss +16 -4
- package/dist/components/ConsumptionPeriod/components/HistoryGraph/index.js +1 -7
- package/dist/components/ConsumptionPeriod/components/Reading/index.js +26 -9
- package/dist/components/ConsumptionPeriod/components/Reading/styles.module.scss +13 -8
- package/dist/components/ConsumptionPeriod/styles.module.scss +11 -10
- package/dist/components/Date/index.js +2 -2
- package/dist/components/Date/styles.module.scss +3 -0
- package/dist/components/DebtState/styles.module.scss +1 -1
- package/dist/components/IconAndDetails/index.js +4 -1
- package/dist/components/IconAndDetails/styles.module.scss +2 -2
- package/dist/components/Magnitude/index.js +6 -5
- package/dist/components/Magnitude/styles.module.scss +5 -5
- package/dist/components/MainBillData/components/BillAlert/components/BillParticularConditions/index.js +5 -5
- package/dist/components/MainBillData/components/BillAlert/styles.module.scss +5 -3
- package/dist/components/MainBillData/components/BillBody/components/ClientData/index.js +13 -13
- package/dist/components/MainBillData/components/BillBody/components/ClientData/styles.module.scss +3 -3
- package/dist/components/MainBillData/components/BillBody/components/ReadingDetails/styles.module.scss +1 -1
- package/dist/components/MainBillData/components/BillBody/styles.module.scss +4 -3
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/index.js +3 -2
- package/dist/components/MainBillData/components/BillHeader/components/TypeAndNumber/styles.module.scss +7 -3
- package/dist/components/MainBillData/components/BillHeader/index.js +2 -2
- package/dist/components/MainBillData/components/BillHeader/styles.module.scss +10 -9
- package/dist/components/MainBillData/styles.module.scss +0 -1
- package/dist/components/Period/index.js +39 -11
- package/dist/components/Period/styles.module.scss +13 -4
- package/dist/components/PowerProgresBar/components/PowerConsumption/index.js +2 -3
- package/dist/components/PowerProgresBar/index.js +3 -4
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/index.js +6 -17
- package/dist/components/RatesDefinition/components/BillRate/components/RatePrices/styles.module.scss +8 -3
- package/dist/components/RatesDefinition/components/BillRate/index.js +10 -11
- package/dist/components/RatesDefinition/components/BillRate/styles.module.scss +8 -29
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/index.js +9 -5
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/Category/styles.module.scss +12 -18
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/components/SubStage/index.js +4 -3
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/index.js +13 -62
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/components/Stage/styles.module.scss +2 -6
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Bars/index.js +1 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/index.js +18 -12
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/components/IndicatorLabel/styles.module.scss +7 -3
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/index.js +23 -14
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/styles.module.scss +6 -19
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/Indicator/utils.js +35 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/index.js +80 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/components/LegendItem/styles.module.scss +57 -0
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/constants.js +17 -9
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/styles.module.scss +2 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/components/RateStagesGraph/utils.js +1 -1
- package/dist/components/RatesDefinition/components/CategoryByConsumption/index.js +61 -7
- package/dist/components/RatesDefinition/components/CategoryByConsumption/styles.module.scss +20 -4
- package/dist/components/RatesDefinition/components/PurchasedRate/index.js +12 -22
- package/dist/components/RatesDefinition/components/PurchasedRate/styles.module.scss +14 -44
- package/dist/components/RatesDefinition/index.js +16 -12
- package/dist/components/RatesDefinition/styles.module.scss +38 -10
- package/dist/components/StyledAmount/constants.js +0 -45
- package/dist/components/StyledAmount/index.js +5 -14
- package/dist/components/StyledAmount/styles.module.scss +14 -8
- package/dist/components/WithContextApi/index.js +9 -1
- package/dist/constants/deviceSizes.js +1 -1
- package/dist/index.js +28 -15
- package/dist/shared/Context/index.js +1 -1
- package/dist/shared/constants/aliases.js +532 -10
- package/dist/shared/constants/components.js +3 -1
- package/dist/shared/constants/consumptions.js +1 -1
- package/dist/shared/constants/readings.js +1 -1
- package/dist/shared/constants/stagesGraph.js +1 -1
- package/dist/shared/types/assetsTypes.js +1 -30
- package/dist/shared/types/billDataTypes.js +1 -1
- package/dist/shared/types/componentsTypes.js +4 -2
- package/dist/shared/types/rateStagesTypes.js +1 -1
- package/dist/shared/utils/consumptions.js +3 -3
- package/dist/shared/utils/context.js +3 -1
- package/dist/shared/utils/periods.js +1 -1
- package/dist/shared/utils/readings.js +1 -1
- package/dist/shared/utils/stagesGraph.js +1 -1
- package/dist/utils.js +1 -1
- package/package.json +2 -3
- package/dist/components/BarChart/components/CustomBar/index.js +0 -111
- package/dist/components/BarChart/components/CustomLabelText/index.js +0 -48
- package/dist/components/BarChart/components/CustomXAxisLabel/index.js +0 -58
- package/dist/components/BarChart/styles.js +0 -90
- package/dist/components/BillSummary/components/BilledConcepts/components/PieChartContainer/utils.js +0 -27
- package/dist/components/BillSummary/components/Rate/index.js +0 -56
- package/dist/components/BillSummary/components/Rate/styles.module.scss +0 -43
|
@@ -4,67 +4,37 @@
|
|
|
4
4
|
@import '../../../../scss/variables/_fontSizes.scss';
|
|
5
5
|
|
|
6
6
|
.container {
|
|
7
|
-
|
|
8
|
-
border: 1px solid $borders-gray;
|
|
9
|
-
border-radius: $default-container-border-radius;
|
|
7
|
+
align-items: center;
|
|
8
|
+
border-right: 1px solid $borders-gray;
|
|
10
9
|
display: flex;
|
|
11
10
|
flex-flow: column;
|
|
12
|
-
|
|
13
|
-
padding:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
margin-right: 10px;
|
|
17
|
-
}
|
|
11
|
+
gap: 16px;
|
|
12
|
+
padding: 16px;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
min-width: 50%;
|
|
18
15
|
|
|
19
16
|
@media #{$tablet-mobile} {
|
|
17
|
+
border-bottom: 1px solid $borders-gray;
|
|
18
|
+
border-right: none;
|
|
20
19
|
margin-bottom: 10px;
|
|
20
|
+
min-width: auto;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
25
|
-
|
|
24
|
+
.rateAndCategoryContainer {
|
|
25
|
+
flex-direction: column-reverse;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.data {
|
|
29
29
|
align-items: center;
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-flow: column;
|
|
32
|
+
gap: 24px;
|
|
32
33
|
height: 100%;
|
|
33
|
-
justify-content:
|
|
34
|
-
|
|
35
|
-
@media #{$tablet-mobile} {
|
|
36
|
-
flex-flow: row;
|
|
37
|
-
position: relative;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.rateAndDescription {
|
|
42
|
-
align-items: center;
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: column;
|
|
45
|
-
margin: 0 auto 24px;
|
|
46
|
-
|
|
47
|
-
@media #{$tablet-mobile} {
|
|
48
|
-
margin: 0 auto;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.purchasedRate {
|
|
53
|
-
font-size: $purchased-rate-font-size;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.description {
|
|
57
|
-
@media #{$tablet-mobile} {
|
|
58
|
-
display: none;
|
|
59
|
-
}
|
|
34
|
+
justify-content: space-between;
|
|
60
35
|
}
|
|
61
36
|
|
|
62
37
|
.link {
|
|
38
|
+
color: $primary;
|
|
63
39
|
text-decoration: underline;
|
|
64
|
-
|
|
65
|
-
@media #{$tablet-mobile} {
|
|
66
|
-
bottom: 8px;
|
|
67
|
-
position: absolute;
|
|
68
|
-
right: 0;
|
|
69
|
-
}
|
|
70
40
|
}
|
|
@@ -27,6 +27,8 @@ var _WithContextApi = _interopRequireDefault(require("../WithContextApi"));
|
|
|
27
27
|
|
|
28
28
|
var _Advice = _interopRequireDefault(require("../Advice"));
|
|
29
29
|
|
|
30
|
+
var _aliases = require("../../shared/constants/aliases");
|
|
31
|
+
|
|
30
32
|
var _CategoryByConsumption = _interopRequireDefault(require("./components/CategoryByConsumption"));
|
|
31
33
|
|
|
32
34
|
var _PurchasedRate = _interopRequireDefault(require("./components/PurchasedRate"));
|
|
@@ -45,38 +47,40 @@ var RatesDefinition = function RatesDefinition(_ref) {
|
|
|
45
47
|
var description = (0, _seamlessImmutable.getIn)(billData, ['client', 'rate', 'description']);
|
|
46
48
|
var fixedCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.FIXED).amount;
|
|
47
49
|
var variableCharge = (0, _rates.getCharge)(billData, _rates2.CHARGE_TYPES.VARIABLE).amount;
|
|
50
|
+
var Label = contextApiInfo.Label;
|
|
48
51
|
var currentPeriod = (0, _periods.getCurrentPeriod)(billData);
|
|
49
52
|
var currentConsumption = (0, _consumptions.getCurrentConsumption)(currentPeriod, _consumptions2.ENERGY_TYPES.ACTIVE);
|
|
50
53
|
var _contextApiInfo$confi = contextApiInfo.config.texts.ratesDefinition,
|
|
51
54
|
adviceTitle = _contextApiInfo$confi.adviceTitle,
|
|
52
|
-
adviceText = _contextApiInfo$confi.adviceText
|
|
55
|
+
adviceText = _contextApiInfo$confi.adviceText,
|
|
56
|
+
rateDataTitle = _contextApiInfo$confi.rateDataTitle;
|
|
53
57
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
54
58
|
className: _stylesModule.default.container
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
56
|
-
rate: rate,
|
|
57
|
-
classes: {
|
|
58
|
-
container: _stylesModule.default.hiddenDesktop
|
|
59
|
-
},
|
|
60
|
-
billData: billData
|
|
61
|
-
}), /*#__PURE__*/_react.default.createElement(_CategoryByConsumption.default, {
|
|
59
|
+
}, /*#__PURE__*/_react.default.createElement(_CategoryByConsumption.default, {
|
|
62
60
|
value: currentConsumption.value,
|
|
63
61
|
unit: currentConsumption.unit,
|
|
64
62
|
category: category
|
|
65
63
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
+
className: _stylesModule.default.bottomData
|
|
65
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: _stylesModule.default.rateDataContainer
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: _stylesModule.default.rateDataTitle
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
70
|
+
alias: _aliases.TITLE
|
|
71
|
+
}, rateDataTitle)), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
72
|
className: _stylesModule.default.rateData
|
|
67
73
|
}, /*#__PURE__*/_react.default.createElement(_PurchasedRate.default, {
|
|
68
74
|
rate: rate,
|
|
75
|
+
category: category,
|
|
69
76
|
description: description,
|
|
70
|
-
classes: {
|
|
71
|
-
container: _stylesModule.default.hiddenMobile
|
|
72
|
-
},
|
|
73
77
|
billData: billData
|
|
74
78
|
}), /*#__PURE__*/_react.default.createElement(_BillRate.default, {
|
|
75
79
|
rate: rate,
|
|
76
80
|
category: category,
|
|
77
81
|
fixedCharge: fixedCharge,
|
|
78
82
|
variableCharge: variableCharge
|
|
79
|
-
}), adviceTitle && adviceText && /*#__PURE__*/_react.default.createElement(_Advice.default, {
|
|
83
|
+
}))), adviceTitle && adviceText && /*#__PURE__*/_react.default.createElement(_Advice.default, {
|
|
80
84
|
title: adviceTitle,
|
|
81
85
|
contentText: adviceText
|
|
82
86
|
})));
|
|
@@ -7,28 +7,56 @@
|
|
|
7
7
|
flex-flow: column;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.bottomData {
|
|
11
11
|
display: flex;
|
|
12
|
-
|
|
13
|
-
width: 100%;
|
|
12
|
+
height: 260px;
|
|
14
13
|
|
|
15
|
-
@media #{$
|
|
16
|
-
|
|
14
|
+
@media #{$tablet-mobile} {
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
height: auto;
|
|
17
17
|
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.rateDataTitle {
|
|
21
|
+
align-items: center;
|
|
22
|
+
display: flex;
|
|
23
|
+
height: min-content;
|
|
24
|
+
border-bottom: 1px solid $borders-gray;
|
|
25
|
+
padding: 16px;
|
|
18
26
|
|
|
19
27
|
@media #{$tablet-mobile} {
|
|
20
|
-
|
|
28
|
+
justify-content: center;
|
|
21
29
|
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
|
-
.
|
|
32
|
+
.rateDataContainer {
|
|
33
|
+
background-color: $white;
|
|
34
|
+
border: 1px solid $borders-gray;
|
|
35
|
+
border-radius: $default-container-border-radius;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
height: 100%;
|
|
39
|
+
min-width: 546px;
|
|
40
|
+
|
|
25
41
|
@media #{$desktop} {
|
|
26
|
-
|
|
42
|
+
margin-right: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media #{$tablet-mobile} {
|
|
46
|
+
flex-flow: column;
|
|
47
|
+
margin-bottom: 16px;
|
|
48
|
+
min-width: auto;
|
|
49
|
+
width: 100%;
|
|
27
50
|
}
|
|
28
51
|
}
|
|
29
52
|
|
|
30
|
-
.
|
|
53
|
+
.rateData {
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
height: 100%;
|
|
57
|
+
width: 100%;
|
|
58
|
+
|
|
31
59
|
@media #{$tablet-mobile} {
|
|
32
|
-
|
|
60
|
+
flex-direction: column;
|
|
33
61
|
}
|
|
34
62
|
}
|
|
@@ -11,67 +11,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
11
|
|
|
12
12
|
var VARIANTS = {
|
|
13
13
|
small: {
|
|
14
|
-
currencyLabel: {
|
|
15
|
-
small: true
|
|
16
|
-
},
|
|
17
|
-
integerLabel: {
|
|
18
|
-
small: true
|
|
19
|
-
},
|
|
20
|
-
decimalLabel: {
|
|
21
|
-
xsmall: true
|
|
22
|
-
},
|
|
23
14
|
currencyLabelStyle: _stylesModule.default.smallCurrency,
|
|
24
15
|
decimalLabelStyle: _stylesModule.default.smallDecimalPart
|
|
25
16
|
},
|
|
26
17
|
medium: {
|
|
27
|
-
currencyLabel: {
|
|
28
|
-
medium: true
|
|
29
|
-
},
|
|
30
|
-
integerLabel: {
|
|
31
|
-
medium: true
|
|
32
|
-
},
|
|
33
|
-
decimalLabel: {
|
|
34
|
-
xsmall: true
|
|
35
|
-
},
|
|
36
18
|
currencyLabelStyle: _stylesModule.default.mediumCurrency,
|
|
37
19
|
decimalLabelStyle: _stylesModule.default.mediumDecimalPart
|
|
38
20
|
},
|
|
39
21
|
large: {
|
|
40
|
-
currencyLabel: {
|
|
41
|
-
large: true
|
|
42
|
-
},
|
|
43
|
-
integerLabel: {
|
|
44
|
-
large: true
|
|
45
|
-
},
|
|
46
|
-
decimalLabel: {
|
|
47
|
-
xxsmall: true
|
|
48
|
-
},
|
|
49
22
|
currencyLabelStyle: _stylesModule.default.largeCurrency,
|
|
50
23
|
decimalLabelStyle: _stylesModule.default.largeDecimalPart
|
|
51
24
|
},
|
|
52
25
|
xlarge: {
|
|
53
|
-
currencyLabel: {
|
|
54
|
-
xlarge: true
|
|
55
|
-
},
|
|
56
|
-
integerLabel: {
|
|
57
|
-
xlarge: true
|
|
58
|
-
},
|
|
59
|
-
decimalLabel: {
|
|
60
|
-
xsmall: true
|
|
61
|
-
},
|
|
62
26
|
currencyLabelStyle: _stylesModule.default.mediumCurrency,
|
|
63
27
|
decimalLabelStyle: _stylesModule.default.mediumDecimalPart
|
|
64
28
|
},
|
|
65
29
|
title: {
|
|
66
|
-
currencyLabel: {
|
|
67
|
-
title: true
|
|
68
|
-
},
|
|
69
|
-
integerLabel: {
|
|
70
|
-
title: true
|
|
71
|
-
},
|
|
72
|
-
decimalLabel: {
|
|
73
|
-
medium: true
|
|
74
|
-
},
|
|
75
30
|
currencyLabelStyle: _stylesModule.default.titleCurrency,
|
|
76
31
|
decimalLabelStyle: _stylesModule.default.titleDecimalPart
|
|
77
32
|
}
|
|
@@ -21,8 +21,6 @@ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
27
25
|
|
|
28
26
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -51,10 +49,7 @@ var StyledAmount = function StyledAmount(_ref) {
|
|
|
51
49
|
var Label = contextApiInfo.Label;
|
|
52
50
|
var _VARIANTS$variant = _constants.VARIANTS[variant],
|
|
53
51
|
currencyLabelStyle = _VARIANTS$variant.currencyLabelStyle,
|
|
54
|
-
decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle
|
|
55
|
-
currencyLabel = _VARIANTS$variant.currencyLabel,
|
|
56
|
-
integerLabel = _VARIANTS$variant.integerLabel,
|
|
57
|
-
decimalLabel = _VARIANTS$variant.decimalLabel;
|
|
52
|
+
decimalLabelStyle = _VARIANTS$variant.decimalLabelStyle;
|
|
58
53
|
|
|
59
54
|
var _ref2 = amount !== null && amount !== undefined && (0, _numeral.default)(amount).format(amountFormat).split(splitChar) || ['-', '-'],
|
|
60
55
|
_ref3 = _slicedToArray(_ref2, 2),
|
|
@@ -63,15 +58,15 @@ var StyledAmount = function StyledAmount(_ref) {
|
|
|
63
58
|
|
|
64
59
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
65
60
|
className: _stylesModule.default.container
|
|
66
|
-
}, /*#__PURE__*/_react.default.createElement(Label,
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(Label, {
|
|
67
62
|
alias: alias,
|
|
68
63
|
className: currencyLabelStyle
|
|
69
|
-
},
|
|
64
|
+
}, currency), /*#__PURE__*/_react.default.createElement(Label, {
|
|
70
65
|
alias: alias
|
|
71
|
-
},
|
|
66
|
+
}, integerPart), /*#__PURE__*/_react.default.createElement(Label, {
|
|
72
67
|
alias: aliasDecimal,
|
|
73
68
|
className: decimalLabelStyle
|
|
74
|
-
},
|
|
69
|
+
}, decimalPart));
|
|
75
70
|
};
|
|
76
71
|
|
|
77
72
|
StyledAmount.propTypes = {
|
|
@@ -80,10 +75,6 @@ StyledAmount.propTypes = {
|
|
|
80
75
|
amount: _propTypes.number,
|
|
81
76
|
amountFormat: _propTypes.string,
|
|
82
77
|
splitChar: _propTypes.string,
|
|
83
|
-
primary: _propTypes.bool,
|
|
84
|
-
white: _propTypes.bool,
|
|
85
|
-
bold: _propTypes.bool,
|
|
86
|
-
semibold: _propTypes.bool,
|
|
87
78
|
alias: _propTypes.string,
|
|
88
79
|
aliasDecimal: _propTypes.string,
|
|
89
80
|
variant: _propTypes.string
|
|
@@ -1,36 +1,42 @@
|
|
|
1
|
+
$title-gap: 4px;
|
|
2
|
+
|
|
1
3
|
.container {
|
|
2
4
|
align-items: flex-start;
|
|
3
5
|
display: flex;
|
|
4
6
|
}
|
|
5
7
|
|
|
6
8
|
.smallCurrency {
|
|
7
|
-
margin-right:
|
|
9
|
+
margin-right: 4px;
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.smallDecimalPart {
|
|
11
|
-
margin-left:
|
|
13
|
+
margin-left: 4px;
|
|
14
|
+
margin-top: -6px;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
.mediumCurrency {
|
|
15
|
-
margin-right:
|
|
18
|
+
margin-right: 4px;
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
.mediumDecimalPart {
|
|
19
|
-
margin-
|
|
22
|
+
margin-top: -4px;
|
|
23
|
+
margin-left: 4px;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.largeCurrency {
|
|
23
|
-
margin-right:
|
|
27
|
+
margin-right: 4px;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
30
|
.largeDecimalPart {
|
|
27
|
-
margin-
|
|
31
|
+
margin-top: -4px;
|
|
32
|
+
margin-left: 4px;
|
|
28
33
|
}
|
|
29
34
|
|
|
30
35
|
.titleCurrency {
|
|
31
|
-
margin-right:
|
|
36
|
+
margin-right: $title-gap;
|
|
32
37
|
}
|
|
33
38
|
|
|
34
39
|
.titleDecimalPart {
|
|
35
|
-
margin-top:
|
|
40
|
+
margin-top: 5px;
|
|
41
|
+
margin-left: $title-gap;
|
|
36
42
|
}
|
|
@@ -7,6 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _aliases = require("../../shared/constants/aliases");
|
|
11
|
+
|
|
10
12
|
var _Context = require("../../shared/Context");
|
|
11
13
|
|
|
12
14
|
var _context = require("../../shared/utils/context");
|
|
@@ -29,10 +31,16 @@ var withContextApi = function withContextApi(retrieveStyle) {
|
|
|
29
31
|
return /*#__PURE__*/_react.default.createElement(_Context.SmartBillConsumer, null, function (contextApiInfo) {
|
|
30
32
|
var infoWithUnpackedComponents = _objectSpread(_objectSpread({}, contextApiInfo), (0, _context.unpackComponents)(contextApiInfo));
|
|
31
33
|
|
|
34
|
+
var infoWithDefaultColors = _objectSpread(_objectSpread({}, infoWithUnpackedComponents), {}, {
|
|
35
|
+
config: _objectSpread({
|
|
36
|
+
colors: contextApiInfo.colors || _aliases.DEFAULT_COLORS
|
|
37
|
+
}, contextApiInfo.config)
|
|
38
|
+
});
|
|
39
|
+
|
|
32
40
|
delete infoWithUnpackedComponents.components;
|
|
33
41
|
return /*#__PURE__*/_react.default.createElement(_layout.default, _extends({}, props, {
|
|
34
42
|
Component: Component,
|
|
35
|
-
contextApiInfo:
|
|
43
|
+
contextApiInfo: infoWithDefaultColors,
|
|
36
44
|
retrieveStyle: retrieveStyle
|
|
37
45
|
}));
|
|
38
46
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.TabletViewport = exports.TabletMobileViewport = exports.TabletBreakpoint = exports.TABLET = exports.MobileViewport = exports.MobileBreakpoint = exports.MOBILE = exports.HDBreakpoint = exports.FullHDBreakpoint = exports.DesktopViewport = exports.DefaultViewport = exports.DESKTOP = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
package/dist/index.js
CHANGED
|
@@ -5,30 +5,26 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _SmartBillProvider.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "MainBillData", {
|
|
8
|
+
exports.Aliases = void 0;
|
|
9
|
+
Object.defineProperty(exports, "BillCalculation", {
|
|
15
10
|
enumerable: true,
|
|
16
11
|
get: function get() {
|
|
17
|
-
return
|
|
12
|
+
return _BillCalculation.default;
|
|
18
13
|
}
|
|
19
14
|
});
|
|
20
|
-
Object.defineProperty(exports, "
|
|
15
|
+
Object.defineProperty(exports, "BillSummary", {
|
|
21
16
|
enumerable: true,
|
|
22
17
|
get: function get() {
|
|
23
|
-
return
|
|
18
|
+
return _BillSummary.default;
|
|
24
19
|
}
|
|
25
20
|
});
|
|
26
|
-
Object.defineProperty(exports, "
|
|
21
|
+
Object.defineProperty(exports, "ColorAliases", {
|
|
27
22
|
enumerable: true,
|
|
28
23
|
get: function get() {
|
|
29
|
-
return
|
|
24
|
+
return Aliases.COLORS;
|
|
30
25
|
}
|
|
31
26
|
});
|
|
27
|
+
exports.ComponentNames = void 0;
|
|
32
28
|
Object.defineProperty(exports, "ConsumptionComparison", {
|
|
33
29
|
enumerable: true,
|
|
34
30
|
get: function get() {
|
|
@@ -41,16 +37,34 @@ Object.defineProperty(exports, "ConsumptionIncluded", {
|
|
|
41
37
|
return _ConsumptionIncluded.default;
|
|
42
38
|
}
|
|
43
39
|
});
|
|
40
|
+
Object.defineProperty(exports, "ConsumptionPeriod", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function get() {
|
|
43
|
+
return _ConsumptionPeriod.default;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "DefaultLabelProps", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function get() {
|
|
49
|
+
return Aliases.DEFAULT_PROPS;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "MainBillData", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function get() {
|
|
55
|
+
return _MainBillData.default;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
44
58
|
Object.defineProperty(exports, "RatesDefinition", {
|
|
45
59
|
enumerable: true,
|
|
46
60
|
get: function get() {
|
|
47
61
|
return _RatesDefinition.default;
|
|
48
62
|
}
|
|
49
63
|
});
|
|
50
|
-
Object.defineProperty(exports, "
|
|
64
|
+
Object.defineProperty(exports, "SmartBillProvider", {
|
|
51
65
|
enumerable: true,
|
|
52
66
|
get: function get() {
|
|
53
|
-
return
|
|
67
|
+
return _SmartBillProvider.default;
|
|
54
68
|
}
|
|
55
69
|
});
|
|
56
70
|
Object.defineProperty(exports, "billDataTypes", {
|
|
@@ -65,7 +79,6 @@ Object.defineProperty(exports, "rateStagesTypes", {
|
|
|
65
79
|
return _rateStagesTypes.rateStagesTypes;
|
|
66
80
|
}
|
|
67
81
|
});
|
|
68
|
-
exports.Aliases = exports.ComponentNames = void 0;
|
|
69
82
|
|
|
70
83
|
var _SmartBillProvider = _interopRequireDefault(require("./components/SmartBillProvider"));
|
|
71
84
|
|