@widergy/utilitygo-smart-bill-web 3.18.0 → 3.18.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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [3.18.1](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.18.0...v3.18.1) (2025-12-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * loading when download smartbill ([#74](https://github.com/widergy/UtilityGO-Smart-Bill-Web/issues/74)) ([a3b9bb3](https://github.com/widergy/UtilityGO-Smart-Bill-Web/commit/a3b9bb32b1efb5956289187bc6d78bc88435e85a))
7
+
1
8
  # [3.18.0](https://github.com/widergy/UtilityGO-Smart-Bill-Web/compare/v3.17.0...v3.18.0) (2025-11-06)
2
9
 
3
10
 
@@ -14,6 +14,7 @@ var _utils = require("./utils");
14
14
  var _AIPanel = _interopRequireDefault(require("./components/AIPanel"));
15
15
  var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
16
16
  var _BillHeader = _interopRequireDefault(require("./tabs/Billing/components/BillHeader"));
17
+ var _SecondHeader = _interopRequireDefault(require("./tabs/Billing/components/SecondHeader"));
17
18
  var _utils2 = require("./tabs/Billing/utils");
18
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
20
  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); }
@@ -27,6 +28,7 @@ const SmartBillSummary = _ref => {
27
28
  components,
28
29
  constants,
29
30
  downloadSmartbillEnabled,
31
+ downloadSmartBillLoading,
30
32
  handlers,
31
33
  loading,
32
34
  showOnboarding = false,
@@ -152,8 +154,17 @@ const SmartBillSummary = _ref => {
152
154
  debtStatusValidation: smartBill.debt_status_label !== null,
153
155
  debtStatusLabel: smartBill.debt_status_label,
154
156
  downloadSmartbillEnabled,
157
+ downloadSmartBillLoading,
155
158
  handleDownloadSmartBill,
156
159
  smartBill
160
+ }), tabs.find(tab => tab.value === currentTab)?.header && /*#__PURE__*/_react.default.createElement(_SecondHeader.default, {
161
+ accountNumber: smartBill.client?.client_number,
162
+ accountNumberHelpText: translations.billingTab.secondHeader?.accountNumberHelpText,
163
+ supplyAddress: smartBill.client?.account_address,
164
+ city: currentAccount?.city,
165
+ district: currentAccount?.district,
166
+ supplyAddressHelpText: translations.billingTab.secondHeader?.supplyAddressHelpText,
167
+ clientNumberFormatter: utils?.formatters?.clientNumberFormatter
157
168
  }), _constants.TAB_COMPONENT_MAPPER?.[currentTab]?.({
158
169
  assets,
159
170
  billingLayout,
@@ -220,6 +231,7 @@ SmartBillSummary.propTypes = {
220
231
  }),
221
232
  constants: _propTypes.object,
222
233
  downloadSmartbillEnabled: _propTypes.bool,
234
+ downloadSmartBillLoading: _propTypes.bool,
223
235
  handlers: (0, _propTypes.shape)({
224
236
  [_propTypes.string]: _propTypes.func
225
237
  }),
@@ -21,6 +21,7 @@ const BillHeader = _ref => {
21
21
  debtStatusLabel,
22
22
  debtStatusValidation,
23
23
  downloadSmartbillEnabled,
24
+ downloadSmartBillLoading,
24
25
  handleDownloadSmartBill,
25
26
  issuedOnDate,
26
27
  smartBill,
@@ -58,6 +59,7 @@ const BillHeader = _ref => {
58
59
  variant: "text",
59
60
  disabled: true
60
61
  }, "Anexos"), downloadSmartbillEnabled && /*#__PURE__*/_react.default.createElement(_energyUi.UTButton, {
62
+ loading: downloadSmartBillLoading,
61
63
  onClick: handleDownloadSmartBill,
62
64
  Icon: "IconDownload",
63
65
  variant: "text"
@@ -72,6 +74,7 @@ BillHeader.propTypes = {
72
74
  debtStatusLabel: _propTypes.string,
73
75
  debtStatusValidation: _propTypes.bool,
74
76
  downloadSmartbillEnabled: _propTypes.bool,
77
+ downloadSmartBillLoading: _propTypes.bool,
75
78
  handleDownloadSmartBill: _propTypes.func,
76
79
  issuedOnDate: _propTypes.string,
77
80
  smartBill: _propTypes.object,
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _energyUi = require("@widergy/energy-ui");
9
+ var _propTypes = require("prop-types");
10
+ var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const SecondHeader = _ref => {
13
+ let {
14
+ accountNumber,
15
+ accountNumberHelpText,
16
+ supplyAddress,
17
+ city,
18
+ district,
19
+ supplyAddressHelpText,
20
+ clientNumberFormatter
21
+ } = _ref;
22
+ return /*#__PURE__*/_react.default.createElement("div", {
23
+ className: _stylesModule.default.secondHeader
24
+ }, /*#__PURE__*/_react.default.createElement("div", {
25
+ className: _stylesModule.default.accountNumber
26
+ }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
27
+ variant: "small",
28
+ weight: "bold"
29
+ }, accountNumber && clientNumberFormatter?.(accountNumber) || accountNumber), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
30
+ colorTheme: "gray",
31
+ variant: "small"
32
+ }, accountNumberHelpText)), /*#__PURE__*/_react.default.createElement("div", {
33
+ className: _stylesModule.default.locationTooltip
34
+ }, /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
35
+ variant: "small",
36
+ weight: "bold"
37
+ }, supplyAddress), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
38
+ variant: "small"
39
+ }, `${city} - ${district}`), /*#__PURE__*/_react.default.createElement(_energyUi.UTLabel, {
40
+ colorTheme: "gray",
41
+ variant: "small"
42
+ }, supplyAddressHelpText)));
43
+ };
44
+ SecondHeader.propTypes = {
45
+ accountNumber: _propTypes.string,
46
+ accountNumberHelpText: _propTypes.string,
47
+ supplyAddress: _propTypes.string,
48
+ city: _propTypes.string,
49
+ district: _propTypes.string,
50
+ supplyAddressHelpText: _propTypes.string,
51
+ clientNumberFormatter: _propTypes.func
52
+ };
53
+ var _default = exports.default = SecondHeader;
@@ -0,0 +1,40 @@
1
+ @import '../../../../../../scss/variables/mediaQueries.module.scss';
2
+
3
+ .secondHeader {
4
+ align-items: center;
5
+ background-color: var(--light01);
6
+ border-radius: 8px;
7
+ box-shadow: var(--shadowGrayBottom1);
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ grid-gap: 50%;
11
+ justify-content: flex-start;
12
+ padding: 24px 48px;
13
+ margin: 16px 32px 0 32px;
14
+
15
+ @media #{$mobile} {
16
+ margin: 16px 16px 0 16px;
17
+ padding: 16px;
18
+ flex-wrap: nowrap;
19
+ justify-content: space-between;
20
+ }
21
+ }
22
+
23
+ .accountNumber {
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: flex-start;
27
+ grid-gap: 4px;
28
+ }
29
+
30
+ .locationTooltip {
31
+ display: flex;
32
+ flex-direction: column;
33
+ grid-gap: 4px;
34
+ text-align: left;
35
+ align-items: flex-start;
36
+
37
+ @media #{$mobile} {
38
+ text-align: left;
39
+ }
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/utilitygo-smart-bill-web",
3
- "version": "3.18.0",
3
+ "version": "3.18.1",
4
4
  "description": "UtilityGO SmartBill Web",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",