@widergy/utilitygo-smart-bill-mobile 2.7.1 → 2.8.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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [2.8.0](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v2.7.1...v2.8.0) (2025-09-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [UGEE-418] import value instead of energy in billing ([#44](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/issues/44)) ([8b84d58](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/commit/8b84d580c6fec9263212a753696b71395852ab39))
|
|
7
|
+
|
|
1
8
|
## [2.7.1](https://github.com/widergy/UtilityGO-Smart-Bill-Mobile/compare/v2.7.0...v2.7.1) (2025-08-25)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
/* eslint-disable react/forbid-prop-types */
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { object } from 'prop-types';
|
|
3
|
+
import { bool, object, string } from 'prop-types';
|
|
4
4
|
import { Surface, UTIcon, UTLabel } from '@widergy/mobile-ui';
|
|
5
5
|
import { capitalize } from 'lodash';
|
|
6
6
|
import { View } from 'react-native';
|
|
7
7
|
|
|
8
8
|
import { getBillingsToShow, getMonthName } from './utils';
|
|
9
|
-
import { DEFAULT_TAG_COLOR_THEME, DEFAULT_TAG_ICON, TAG_ICON_SIZE } from './constants';
|
|
9
|
+
import { DEFAULT_TAG_COLOR_THEME, DEFAULT_TAG_ICON, RIGHT_UNIT_ALIGNMENT, TAG_ICON_SIZE } from './constants';
|
|
10
10
|
import { createStyles } from './styles';
|
|
11
11
|
|
|
12
|
-
const Billing = ({
|
|
12
|
+
const Billing = ({
|
|
13
|
+
colors,
|
|
14
|
+
smartBill,
|
|
15
|
+
texts,
|
|
16
|
+
withElevation = true,
|
|
17
|
+
unitAlignment = RIGHT_UNIT_ALIGNMENT,
|
|
18
|
+
unit
|
|
19
|
+
}) => {
|
|
13
20
|
const styles = createStyles(colors);
|
|
14
21
|
const { title, tagLabel, clarification, periodDetail } = texts?.billing || {};
|
|
15
22
|
const currentPeriod = smartBill?.periods.find(period => period.current);
|
|
@@ -32,11 +39,15 @@ const Billing = ({ colors, smartBill, texts, withElevation = true }) => {
|
|
|
32
39
|
<View style={styles.consumptionDetail}>
|
|
33
40
|
<View style={styles.consumption}>
|
|
34
41
|
<UTLabel variant="title3" weight="medium">
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
{consumptionUnit}
|
|
42
|
+
{unitAlignment === RIGHT_UNIT_ALIGNMENT
|
|
43
|
+
? consumptionValue
|
|
44
|
+
: `${unit || consumptionUnit}${consumptionValue}`}
|
|
39
45
|
</UTLabel>
|
|
46
|
+
{unitAlignment === RIGHT_UNIT_ALIGNMENT && (
|
|
47
|
+
<UTLabel variant="subtitle1" weight="medium">
|
|
48
|
+
{unit || consumptionUnit}
|
|
49
|
+
</UTLabel>
|
|
50
|
+
)}
|
|
40
51
|
</View>
|
|
41
52
|
|
|
42
53
|
<View style={[styles.tag, current ? styles.billedTag : {}]}>
|
|
@@ -74,7 +85,10 @@ const Billing = ({ colors, smartBill, texts, withElevation = true }) => {
|
|
|
74
85
|
Billing.propTypes = {
|
|
75
86
|
colors: object,
|
|
76
87
|
smartBill: object,
|
|
77
|
-
texts: object
|
|
88
|
+
texts: object,
|
|
89
|
+
withElevation: bool,
|
|
90
|
+
unitAlignment: string,
|
|
91
|
+
unit: string
|
|
78
92
|
};
|
|
79
93
|
|
|
80
94
|
export default Billing;
|