@widergy/utilitygo-smart-bill-web 3.20.1 → 3.21.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,17 @@
|
|
|
1
|
+
# [3.21.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.20.2...v3.21.0) (2026-01-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* format number ([#78](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/78)) ([090a4a9](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/090a4a9519c9edd45f4fe4a9162fcd9beca11aa9))
|
|
7
|
+
|
|
8
|
+
## [3.20.2](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.20.1...v3.20.2) (2026-01-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* banner, tooltip and new link ([#79](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/79)) ([9edc1d4](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/9edc1d4b95fadd658390e38abd34f3289e696480))
|
|
14
|
+
|
|
1
15
|
## [3.20.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.20.0...v3.20.1) (2026-01-16)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -50,6 +50,7 @@ const Billing = _ref => {
|
|
|
50
50
|
notAdhered,
|
|
51
51
|
rateCard: rateCardTranslations,
|
|
52
52
|
ratesTableLink,
|
|
53
|
+
meetBillLink,
|
|
53
54
|
titularCard = {},
|
|
54
55
|
totalAmountLabel,
|
|
55
56
|
totalCard = {},
|
|
@@ -163,6 +164,7 @@ const Billing = _ref => {
|
|
|
163
164
|
normalizedRate,
|
|
164
165
|
rateCardTranslations,
|
|
165
166
|
ratesTableLink,
|
|
167
|
+
meetBillLink,
|
|
166
168
|
smartBill,
|
|
167
169
|
subsidy,
|
|
168
170
|
subsidyLevels,
|
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _propTypes = require("prop-types");
|
|
9
9
|
var _energyUi = require("@widergy/energy-ui");
|
|
10
10
|
var _lodash = require("lodash");
|
|
11
|
+
var _numeral = _interopRequireDefault(require("numeral"));
|
|
11
12
|
var _billDataTypes = require("../../../../../../shared/types/billDataTypes");
|
|
12
13
|
var _utils = require("./utils");
|
|
13
14
|
var _constants = require("./constants");
|
|
@@ -64,6 +65,7 @@ const Billing = _ref => {
|
|
|
64
65
|
const monthName = (0, _utils.getMonthName)(issuedOn);
|
|
65
66
|
const consumptionValue = consumptions?.[0].value;
|
|
66
67
|
const consumptionUnit = consumptions?.[0].unit;
|
|
68
|
+
const totalConsumptionFormatted = (0, _numeral.default)(consumptionValue).format('0,0.[00]');
|
|
67
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
68
70
|
key: issuedOn,
|
|
69
71
|
className: `${_stylesModule.default.billing} ${current ? _stylesModule.default.currentBilling : ''}`
|
|
@@ -74,7 +76,7 @@ const Billing = _ref => {
|
|
|
74
76
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
75
77
|
variant: "title3",
|
|
76
78
|
weight: "medium"
|
|
77
|
-
}, unitAlignment === _constants.RIGHT_UNIT_ALIGNMENT ?
|
|
79
|
+
}, unitAlignment === _constants.RIGHT_UNIT_ALIGNMENT ? totalConsumptionFormatted : `${unit || consumptionUnit}${totalConsumptionFormatted}`), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
78
80
|
variant: "subtitle1",
|
|
79
81
|
weight: "medium"
|
|
80
82
|
}, unitAlignment === _constants.RIGHT_UNIT_ALIGNMENT && (unit || consumptionUnit))), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -32,6 +32,7 @@ const RateCard = _ref => {
|
|
|
32
32
|
normalizedRate = '',
|
|
33
33
|
rateCardTranslations = {},
|
|
34
34
|
ratesTableLink,
|
|
35
|
+
meetBillLink,
|
|
35
36
|
seeFooter = true,
|
|
36
37
|
smallTitle = false,
|
|
37
38
|
smartBill = {},
|
|
@@ -48,7 +49,6 @@ const RateCard = _ref => {
|
|
|
48
49
|
startRateValueLabel,
|
|
49
50
|
title,
|
|
50
51
|
tooltipContent,
|
|
51
|
-
tooltipText,
|
|
52
52
|
unit,
|
|
53
53
|
yourConsumption,
|
|
54
54
|
yourRate
|
|
@@ -104,9 +104,9 @@ const RateCard = _ref => {
|
|
|
104
104
|
debouncedTrackRedirection.cancel();
|
|
105
105
|
};
|
|
106
106
|
}, [debouncedTrackRedirection]);
|
|
107
|
-
const handleClickButton =
|
|
108
|
-
debouncedTrackRedirection(
|
|
109
|
-
if (
|
|
107
|
+
const handleClickButton = link => {
|
|
108
|
+
debouncedTrackRedirection(link);
|
|
109
|
+
if (link) window.open(link, '_blank');
|
|
110
110
|
};
|
|
111
111
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
112
|
className: _stylesModule.default.container
|
|
@@ -121,7 +121,7 @@ const RateCard = _ref => {
|
|
|
121
121
|
}, title), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
|
|
122
122
|
colorTheme: "gray",
|
|
123
123
|
dataTestId: smartBillTestIds.rateCard.helpText
|
|
124
|
-
}, helpText), banner && limitSubsidyValue !== 0 && totalConsumption > limitSubsidyValue && /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
+
}, helpText), !(0, _isEmpty.default)(banner.label) && limitSubsidyValue !== 0 && totalConsumption > limitSubsidyValue && /*#__PURE__*/_react.default.createElement("div", {
|
|
125
125
|
className: _stylesModule.default.bannerDetail,
|
|
126
126
|
"data-testid": smartBillTestIds.rateCard.banner
|
|
127
127
|
}, /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
|
|
@@ -176,7 +176,7 @@ const RateCard = _ref => {
|
|
|
176
176
|
dataTestId: smartBillTestIds.rateCard.levelLabel,
|
|
177
177
|
variant: "subtitle1"
|
|
178
178
|
}, banner.level?.(levelNumber)), /*#__PURE__*/_react.default.createElement(_energyUi.UTTooltip, {
|
|
179
|
-
content:
|
|
179
|
+
content: rateCardTranslations[`tooltipSubsidy${levelNumber}`],
|
|
180
180
|
dataTestId: smartBillTestIds.rateCard.levelTooltip
|
|
181
181
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_energyUi.UTIcon, {
|
|
182
182
|
name: "IconHelp"
|
|
@@ -208,7 +208,7 @@ const RateCard = _ref => {
|
|
|
208
208
|
dataTestId: smartBillTestIds.rateCard.seeRatesTable,
|
|
209
209
|
Icon: "IconChevronRight",
|
|
210
210
|
iconPlacement: "right",
|
|
211
|
-
onClick: handleClickButton,
|
|
211
|
+
onClick: () => handleClickButton(ratesTableLink),
|
|
212
212
|
variant: "text"
|
|
213
213
|
}, seeRatesTable), !(0, _isEmpty.default)(seeBill) && /*#__PURE__*/_react.default.createElement(_energyUi.UTButton, {
|
|
214
214
|
classNames: {
|
|
@@ -219,7 +219,7 @@ const RateCard = _ref => {
|
|
|
219
219
|
dataTestId: smartBillTestIds.rateCard.seeBill,
|
|
220
220
|
Icon: "IconChevronRight",
|
|
221
221
|
iconPlacement: "right",
|
|
222
|
-
onClick: handleClickButton,
|
|
222
|
+
onClick: () => handleClickButton(meetBillLink),
|
|
223
223
|
variant: "text"
|
|
224
224
|
}, seeBill)));
|
|
225
225
|
};
|
|
@@ -231,6 +231,7 @@ RateCard.propTypes = {
|
|
|
231
231
|
normalizedRate: _propTypes.string,
|
|
232
232
|
rateCardTranslations: _propTypes.object,
|
|
233
233
|
ratesTableLink: _propTypes.string,
|
|
234
|
+
meetBillLink: _propTypes.string,
|
|
234
235
|
seeFooter: _propTypes.bool,
|
|
235
236
|
smallTitle: _propTypes.bool,
|
|
236
237
|
smartBill: _propTypes.object,
|