@tesouro/embedded-components-react 0.11.188 → 0.11.190
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/README.md +12 -8
- package/dist/fixtures/index.d.ts +13 -46
- package/dist/index.css +3 -0
- package/dist/index.d.ts +18 -1
- package/dist/index.js +40 -39
- package/dist/lib/BankAccountsWidget.d.ts +2 -0
- package/dist/lib/BillPayWidget.d.ts +16 -1
- package/dist/lib/BillPayWidget.js +3 -1
- package/dist/lib/WidgetSuite.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +17 -14
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +9 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +76 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +180 -180
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +62 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +101 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +19 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +169 -138
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +227 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +208 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +212 -212
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js +9 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +43 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +66 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +20 -20
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +77 -77
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +129 -122
- package/dist/packages/shared-ui-shadcn/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js
CHANGED
|
@@ -5,23 +5,27 @@ import { BILL_SUMMARY_CARDS_LABELS_EN as i } from "./index8.js";
|
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js
|
|
7
7
|
var o = 4;
|
|
8
|
-
function s({ view: s, labels: c }) {
|
|
9
|
-
let
|
|
8
|
+
function s({ view: s, labels: c, onSelect: l }) {
|
|
9
|
+
let u = {
|
|
10
10
|
...i,
|
|
11
11
|
...c
|
|
12
12
|
};
|
|
13
13
|
return /* @__PURE__ */ a(r, {
|
|
14
14
|
isLoading: s.kind === "loading",
|
|
15
|
-
loadingLabel:
|
|
15
|
+
loadingLabel: u.loading,
|
|
16
16
|
children: /* @__PURE__ */ a(n, {
|
|
17
|
-
"aria-label":
|
|
17
|
+
"aria-label": u.group,
|
|
18
18
|
children: s.kind === "loading" ? Array.from({ length: o }).map((t, n) => /* @__PURE__ */ a(e, { className: "ttw:h-28 ttw:rounded-lg" }, n)) : s.cards.map((e) => /* @__PURE__ */ a(t, {
|
|
19
19
|
label: e.label,
|
|
20
20
|
labelTone: e.labelTone,
|
|
21
21
|
amount: e.amountLabel,
|
|
22
22
|
caption: e.captionLabel,
|
|
23
23
|
description: e.description,
|
|
24
|
-
labels: { info:
|
|
24
|
+
labels: { info: u.info },
|
|
25
|
+
...l ? {
|
|
26
|
+
selected: e.selected,
|
|
27
|
+
onClick: () => l(e.id)
|
|
28
|
+
} : {}
|
|
25
29
|
}, e.id))
|
|
26
30
|
})
|
|
27
31
|
});
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { BillSummaryCard as e } from "../../bills-list/feature/dist/index10.js";
|
|
2
|
+
import { BillPayWidget as t } from "./lib/BillPayWidget/BillPayWidget.js";
|
|
2
3
|
import "./lib/BillPayWidget/index.js";
|
|
4
|
+
export { t as BillPayWidget, e as BillSummaryCard };
|
|
@@ -16,11 +16,13 @@ import "../../../../../shared/feature/dist/index.js";
|
|
|
16
16
|
import { BillPayWidgetAnalyticsEvent as c, WIDGET_NAME as l } from "../analytics/events.js";
|
|
17
17
|
import { BillPayWidgetUi as u } from "../../../../ui/dist/index14.js";
|
|
18
18
|
import "../../../../ui/dist/index.js";
|
|
19
|
-
import {
|
|
19
|
+
import { BillSummaryCard as d } from "../../../../bills-list/feature/dist/index10.js";
|
|
20
|
+
import "../../../../bills-list/feature/dist/index.js";
|
|
21
|
+
import { BillUploadWidget as f } from "../../../../bill-upload/feature/dist/index8.js";
|
|
20
22
|
import "../../../../bill-upload/feature/dist/index.js";
|
|
21
|
-
import { BillsTab as
|
|
22
|
-
import { BILL_PAY_WIDGET_LABELS_EN as
|
|
23
|
-
import { CounterpartsWidget as
|
|
23
|
+
import { BillsTab as p } from "./BillsTab.js";
|
|
24
|
+
import { BILL_PAY_WIDGET_LABELS_EN as m } from "./labels.js";
|
|
25
|
+
import { CounterpartsWidget as ee } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js";
|
|
24
26
|
import "../../../../../counterparts-widget/feature/dist/index.js";
|
|
25
27
|
import { useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
26
28
|
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
@@ -29,75 +31,77 @@ var C = {
|
|
|
29
31
|
Bills: "bills",
|
|
30
32
|
Vendors: "vendors"
|
|
31
33
|
}, w = [C.Bills, C.Vendors];
|
|
32
|
-
function
|
|
34
|
+
function te(e) {
|
|
33
35
|
return w.includes(e);
|
|
34
36
|
}
|
|
35
|
-
function
|
|
37
|
+
function T({ labels: a, initialTab: l = C.Bills, selectedTab: d, onTabChange: T, initialView: E, poweredByBankName: D, onSettingsClick: O, selectedSummaryCard: k, onSummaryCardChange: A }) {
|
|
36
38
|
let j = i();
|
|
37
39
|
g(() => {
|
|
38
40
|
j(c.Mounted);
|
|
39
41
|
}, [j]);
|
|
40
|
-
let M = _(() => e(
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
|
|
46
|
-
}, [
|
|
47
|
-
|
|
42
|
+
let M = _(() => e(m, a), [a]), { initResponse: N } = o(), ne = t(N?.scopes, [n.PayableReadOrg]), P = t(N?.scopes, [n.PayableWriteOrg]), F = t(N?.scopes, [n.ApprovalPolicyWriteOrg]) && t(N?.scopes, [n.PayableWriteOrg]) && t(N?.scopes, [n.RoleReadOrg]) && t(N?.scopes, [n.UserReadOrg]), [I, L] = y(l), R = d ?? I, z = h((e) => {
|
|
43
|
+
te(e) && (L(e), T?.(e));
|
|
44
|
+
}, [T]), [B, V] = y(null), [H, U] = y(), W = h((e) => {
|
|
45
|
+
z(C.Bills), U(e);
|
|
46
|
+
}, [z]), G = v(null), K = h((e) => G.current?.enqueue(e), []), [q, J] = y(), Y = h((e) => {
|
|
47
|
+
z(C.Bills), J(e);
|
|
48
|
+
}, [z]), X = s(), [Z, re] = y(E === "create"), [ie, Q] = y(!1);
|
|
49
|
+
Z && N && !X && (re(!1), P && R === C.Bills && Q(!0));
|
|
48
50
|
let $ = [{
|
|
49
51
|
id: C.Bills,
|
|
50
52
|
label: M.tabs.bills,
|
|
51
|
-
content: /* @__PURE__ */ x(
|
|
53
|
+
content: /* @__PURE__ */ x(p, {
|
|
52
54
|
labels: M,
|
|
53
|
-
onEnqueueFiles:
|
|
54
|
-
openPayableId:
|
|
55
|
-
onOpenPayableHandled: () =>
|
|
56
|
-
vendorIntent:
|
|
57
|
-
onVendorIntentHandled: () =>
|
|
58
|
-
openAddBill:
|
|
55
|
+
onEnqueueFiles: K,
|
|
56
|
+
openPayableId: H,
|
|
57
|
+
onOpenPayableHandled: () => U(void 0),
|
|
58
|
+
vendorIntent: q,
|
|
59
|
+
onVendorIntentHandled: () => J(void 0),
|
|
60
|
+
openAddBill: ie,
|
|
59
61
|
onOpenAddBillHandled: () => Q(!1),
|
|
60
|
-
poweredByBankName:
|
|
61
|
-
headerActionContainer:
|
|
62
|
+
poweredByBankName: D,
|
|
63
|
+
headerActionContainer: B,
|
|
64
|
+
selectedSummaryCard: k,
|
|
65
|
+
onSummaryCardChange: A
|
|
62
66
|
})
|
|
63
67
|
}, {
|
|
64
68
|
id: C.Vendors,
|
|
65
69
|
label: M.tabs.vendors,
|
|
66
|
-
content: /* @__PURE__ */ x(
|
|
70
|
+
content: /* @__PURE__ */ x(ee, {
|
|
67
71
|
...M.vendors,
|
|
68
72
|
counterpartType: "vendor",
|
|
69
73
|
passThrough: !0,
|
|
70
|
-
headerActionContainer:
|
|
71
|
-
onViewAllDocuments:
|
|
74
|
+
headerActionContainer: B,
|
|
75
|
+
onViewAllDocuments: ne ? (e) => Y({
|
|
72
76
|
vendorId: e.id,
|
|
73
77
|
vendorName: e.name,
|
|
74
78
|
action: "viewBills"
|
|
75
79
|
}) : void 0,
|
|
76
|
-
onCreateDocument:
|
|
80
|
+
onCreateDocument: P ? (e) => Y({
|
|
77
81
|
vendorId: e.id,
|
|
78
82
|
vendorName: e.name,
|
|
79
83
|
action: "createBill"
|
|
80
84
|
}) : void 0
|
|
81
85
|
})
|
|
82
|
-
}],
|
|
86
|
+
}], ae = $.some((e) => e.id === R) ? R : w.find((e) => $.some((t) => t.id === e)) ?? $[0]?.id ?? "";
|
|
83
87
|
return /* @__PURE__ */ S(b, { children: [
|
|
84
88
|
/* @__PURE__ */ x(r, {}),
|
|
85
89
|
/* @__PURE__ */ x(u, {
|
|
86
90
|
labels: M.widget,
|
|
87
91
|
tabs: $,
|
|
88
|
-
selectedTabId:
|
|
89
|
-
onTabChange:
|
|
90
|
-
onSettingsClick:
|
|
91
|
-
actionContainerRef:
|
|
92
|
+
selectedTabId: ae,
|
|
93
|
+
onTabChange: z,
|
|
94
|
+
onSettingsClick: O && F ? O : void 0,
|
|
95
|
+
actionContainerRef: V
|
|
92
96
|
}),
|
|
93
|
-
/* @__PURE__ */ x(
|
|
94
|
-
ref:
|
|
95
|
-
onOpenBill:
|
|
97
|
+
/* @__PURE__ */ x(f, {
|
|
98
|
+
ref: G,
|
|
99
|
+
onOpenBill: W,
|
|
96
100
|
labels: M.billUpload
|
|
97
101
|
})
|
|
98
102
|
] });
|
|
99
103
|
}
|
|
100
|
-
function
|
|
104
|
+
function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...m }) {
|
|
101
105
|
return /* @__PURE__ */ x(a, {
|
|
102
106
|
widgetName: l,
|
|
103
107
|
baseUrl: e,
|
|
@@ -112,8 +116,8 @@ function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
112
116
|
analytics: d,
|
|
113
117
|
disclosuresAcceptance: f,
|
|
114
118
|
providerLabels: p,
|
|
115
|
-
children: /* @__PURE__ */ x(
|
|
119
|
+
children: /* @__PURE__ */ x(T, { ...m })
|
|
116
120
|
});
|
|
117
121
|
}
|
|
118
|
-
var
|
|
119
|
-
export {
|
|
122
|
+
var D = E;
|
|
123
|
+
export { D as BillPayWidget, D as default, E as BillPayWidgetWithLabels, d as BillSummaryCard };
|
|
@@ -8,32 +8,32 @@ import "../../../../../shared/data-access/dist/index.js";
|
|
|
8
8
|
import { useWidgetConfig as n } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
9
9
|
import "../../../../../shared/feature/dist/index.js";
|
|
10
10
|
import { billsTabTestIds as r } from "./testIds.js";
|
|
11
|
-
import {
|
|
11
|
+
import { BillsListWidget as i } from "../../../../bills-list/feature/dist/index21.js";
|
|
12
|
+
import "../../../../bills-list/feature/dist/index.js";
|
|
13
|
+
import { BillDetailsWidget as a, BillDialogWidget as o } from "../../../../bill-detail/feature/dist/index51.js";
|
|
12
14
|
import "../../../../bill-detail/feature/dist/index.js";
|
|
13
15
|
import "../../../../bill-upload/feature/dist/index.js";
|
|
14
|
-
import { BillsListWidget as o } from "../../../../bills-list/feature/dist/index21.js";
|
|
15
|
-
import "../../../../bills-list/feature/dist/index.js";
|
|
16
16
|
import { PayBillWidget as s } from "../../../../pay-bill/feature/dist/index14.js";
|
|
17
17
|
import "../../../../pay-bill/feature/dist/index.js";
|
|
18
18
|
import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
19
19
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
20
20
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js
|
|
21
|
-
function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C, headerActionContainer: w }) {
|
|
22
|
-
let
|
|
23
|
-
create:
|
|
24
|
-
details:
|
|
25
|
-
view:
|
|
26
|
-
}[
|
|
21
|
+
function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C, headerActionContainer: w, selectedSummaryCard: T, onSummaryCardChange: E }) {
|
|
22
|
+
let D = d(null), [O, k] = f(), [A, j] = f(), [M, N] = f(!1), [P, F] = f(), [I, L] = f(!1), [R, z] = f(!1), [B, V] = f(null), H = !B || {
|
|
23
|
+
create: M,
|
|
24
|
+
details: I,
|
|
25
|
+
view: R
|
|
26
|
+
}[B.surface];
|
|
27
27
|
l(() => {
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
let
|
|
28
|
+
H || V(null);
|
|
29
|
+
}, [H]);
|
|
30
|
+
let U = h?.payBill, W = u(() => {
|
|
31
31
|
let e = (e) => (t) => /* @__PURE__ */ p(s, {
|
|
32
32
|
...t,
|
|
33
33
|
poweredByBankName: C,
|
|
34
|
-
labels:
|
|
35
|
-
openFlow:
|
|
36
|
-
onOpenFlowChange: (t) =>
|
|
34
|
+
labels: U,
|
|
35
|
+
openFlow: B?.surface === e ? B.flow : null,
|
|
36
|
+
onOpenFlowChange: (t) => V(t ? {
|
|
37
37
|
surface: e,
|
|
38
38
|
flow: t
|
|
39
39
|
} : null)
|
|
@@ -44,83 +44,85 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
|
|
|
44
44
|
view: e("view")
|
|
45
45
|
};
|
|
46
46
|
}, [
|
|
47
|
-
|
|
47
|
+
B,
|
|
48
48
|
C,
|
|
49
|
-
|
|
50
|
-
]), { initResponse:
|
|
51
|
-
t &&
|
|
52
|
-
}, [
|
|
53
|
-
|
|
54
|
-
}, q = () => {
|
|
55
|
-
F(!1), L(!0);
|
|
56
|
-
}, J = () => {
|
|
57
|
-
L(!1), F(!0);
|
|
49
|
+
U
|
|
50
|
+
]), { initResponse: G } = n(), K = !G || e(G.scopes, [t.PayableWriteOrg]), q = c((e, t) => {
|
|
51
|
+
t && K ? (k(e), j(void 0), N(!0)) : (F(e), z(!0));
|
|
52
|
+
}, [K]), J = (e, t) => {
|
|
53
|
+
N(!1), z(!1), q(e, t);
|
|
58
54
|
}, Y = () => {
|
|
59
|
-
|
|
60
|
-
}, X =
|
|
61
|
-
|
|
55
|
+
L(!1), z(!0);
|
|
56
|
+
}, X = () => {
|
|
57
|
+
z(!1), L(!0);
|
|
58
|
+
}, Z = () => {
|
|
59
|
+
L(!1), z(!1), k(P), j(void 0), N(!0);
|
|
60
|
+
}, Q = c((e) => {
|
|
61
|
+
k(void 0), j(e), N(!0);
|
|
62
62
|
}, []);
|
|
63
63
|
return l(() => {
|
|
64
|
-
_ && (
|
|
64
|
+
_ && (k(_), j(void 0), N(!0), v?.());
|
|
65
65
|
}, [v, _]), l(() => {
|
|
66
|
-
y && (y.action === "createBill" ?
|
|
66
|
+
y && (y.action === "createBill" ? K && Q(y.vendorId) : D.current?.showVendorBills({
|
|
67
67
|
id: y.vendorId,
|
|
68
68
|
name: y.vendorName
|
|
69
69
|
}), b?.());
|
|
70
70
|
}, [
|
|
71
|
-
|
|
71
|
+
K,
|
|
72
72
|
b,
|
|
73
|
-
|
|
73
|
+
Q,
|
|
74
74
|
y
|
|
75
75
|
]), l(() => {
|
|
76
|
-
x && (
|
|
76
|
+
x && (K && D.current?.openAddBill(), S?.());
|
|
77
77
|
}, [
|
|
78
|
-
|
|
78
|
+
K,
|
|
79
79
|
S,
|
|
80
80
|
x
|
|
81
81
|
]), /* @__PURE__ */ m("div", {
|
|
82
82
|
"data-testid": r.root,
|
|
83
83
|
children: [
|
|
84
|
-
/* @__PURE__ */ p(
|
|
85
|
-
ref:
|
|
84
|
+
/* @__PURE__ */ p(i, {
|
|
85
|
+
ref: D,
|
|
86
86
|
labels: h?.billsList,
|
|
87
|
-
onOpenBill:
|
|
88
|
-
onEnterManually: () =>
|
|
87
|
+
onOpenBill: q,
|
|
88
|
+
onEnterManually: () => Q(),
|
|
89
89
|
onFilesSelected: g,
|
|
90
90
|
maxFiles: 10,
|
|
91
|
-
headerActionContainer: w
|
|
91
|
+
headerActionContainer: w,
|
|
92
|
+
selectedSummaryCard: T,
|
|
93
|
+
onSummaryCardChange: E
|
|
92
94
|
}),
|
|
93
|
-
|
|
94
|
-
open:
|
|
95
|
-
onOpenChange:
|
|
96
|
-
payableId:
|
|
97
|
-
initialCounterpartId:
|
|
98
|
-
onOpenBill:
|
|
99
|
-
renderPaymentFlows:
|
|
95
|
+
M ? /* @__PURE__ */ p(o, {
|
|
96
|
+
open: M,
|
|
97
|
+
onOpenChange: N,
|
|
98
|
+
payableId: O,
|
|
99
|
+
initialCounterpartId: A,
|
|
100
|
+
onOpenBill: J,
|
|
101
|
+
renderPaymentFlows: W.create,
|
|
100
102
|
copy: h?.billDialog
|
|
101
|
-
},
|
|
102
|
-
P ? /* @__PURE__ */ p(i, {
|
|
103
|
-
open: P,
|
|
104
|
-
onOpenChange: F,
|
|
105
|
-
payableId: M,
|
|
106
|
-
onClose: () => F(!1),
|
|
107
|
-
onExpand: q,
|
|
108
|
-
onEdit: Y,
|
|
109
|
-
testId: r.detailsSheet,
|
|
110
|
-
renderPaymentFlows: H.details,
|
|
111
|
-
labels: h?.billDetails
|
|
112
|
-
}) : null,
|
|
103
|
+
}, O) : null,
|
|
113
104
|
I ? /* @__PURE__ */ p(a, {
|
|
114
105
|
open: I,
|
|
115
106
|
onOpenChange: L,
|
|
116
|
-
payableId:
|
|
107
|
+
payableId: P,
|
|
108
|
+
onClose: () => L(!1),
|
|
109
|
+
onExpand: Y,
|
|
110
|
+
onEdit: Z,
|
|
111
|
+
testId: r.detailsSheet,
|
|
112
|
+
renderPaymentFlows: W.details,
|
|
113
|
+
labels: h?.billDetails
|
|
114
|
+
}) : null,
|
|
115
|
+
R ? /* @__PURE__ */ p(o, {
|
|
116
|
+
open: R,
|
|
117
|
+
onOpenChange: z,
|
|
118
|
+
payableId: P,
|
|
117
119
|
readOnly: !0,
|
|
118
|
-
onCollapse:
|
|
119
|
-
onEdit:
|
|
120
|
-
onOpenBill:
|
|
121
|
-
renderPaymentFlows:
|
|
120
|
+
onCollapse: X,
|
|
121
|
+
onEdit: Z,
|
|
122
|
+
onOpenBill: J,
|
|
123
|
+
renderPaymentFlows: W.view,
|
|
122
124
|
copy: h?.billDialog
|
|
123
|
-
},
|
|
125
|
+
}, P) : null
|
|
124
126
|
]
|
|
125
127
|
});
|
|
126
128
|
}
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js
CHANGED
|
@@ -12,7 +12,7 @@ function r(e) {
|
|
|
12
12
|
return e.slice(-4);
|
|
13
13
|
}
|
|
14
14
|
function i(i, a = n) {
|
|
15
|
-
return i.filter((e) => e.status === "ACTIVE").map((n) => {
|
|
15
|
+
return i.filter((e) => e.status === "ACTIVE" && !!e.accountNumber).map((n) => {
|
|
16
16
|
let i = e(n.balance.value), o = n.balance.currencyCode;
|
|
17
17
|
return {
|
|
18
18
|
id: n.id,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { BILL_STATUS_BADGE_LABELS_EN as e } from "../../../../../shared/document-status/ui/dist/index2.js";
|
|
2
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as t } from "../../../../../shared/document-status/ui/dist/index6.js";
|
|
3
|
+
import { derivePayableStatus as n, isPayableApiStatus as r } from "../../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
4
|
+
import { receivableFilledTone as i } from "../../../../../shared/document-status/util/dist/lib/receivableFilledTone.js";
|
|
5
5
|
import "../../../../../shared/document-status/ui/dist/index.js";
|
|
6
6
|
import { formatMoney as a, isAchCompatibleBankAccount as o } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
7
7
|
import "../../../../../shared/counterpart-management/feature/dist/index.js";
|
|
@@ -16,23 +16,23 @@ function s(e) {
|
|
|
16
16
|
function c(a, o, s, c) {
|
|
17
17
|
if (a === "invoice") {
|
|
18
18
|
let e = {
|
|
19
|
-
...
|
|
19
|
+
...t,
|
|
20
20
|
...c.invoiceStatusBadge
|
|
21
21
|
};
|
|
22
22
|
return {
|
|
23
23
|
status: {
|
|
24
24
|
kind: "invoice",
|
|
25
25
|
label: o && Object.hasOwn(e, o) ? e[o] : e.unknown,
|
|
26
|
-
tone:
|
|
26
|
+
tone: i(o)
|
|
27
27
|
},
|
|
28
28
|
isOverdue: !1
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
let l = {
|
|
32
|
-
...
|
|
32
|
+
...e,
|
|
33
33
|
...c.billStatusBadge
|
|
34
34
|
};
|
|
35
|
-
if (!
|
|
35
|
+
if (!r(o)) return {
|
|
36
36
|
status: {
|
|
37
37
|
kind: "bill",
|
|
38
38
|
label: l.unknown,
|
|
@@ -40,7 +40,7 @@ function c(a, o, s, c) {
|
|
|
40
40
|
},
|
|
41
41
|
isOverdue: !1
|
|
42
42
|
};
|
|
43
|
-
let u =
|
|
43
|
+
let u = n({
|
|
44
44
|
apiStatus: o,
|
|
45
45
|
dueDate: s
|
|
46
46
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../../util/dist/lib/apiErrors.js";
|
|
2
2
|
import "../../../util/dist/index.js";
|
|
3
|
+
import { COUNTERPART_MESSAGE_LABELS_EN as e } from "./lib/labels.js";
|
|
3
4
|
import "../../ui/dist/index5.js";
|
|
4
|
-
import { CounterpartFormFields as
|
|
5
|
-
import { BankAccountFormSheet as
|
|
6
|
-
import { ConfirmDeleteDialog as
|
|
5
|
+
import { CounterpartFormFields as t, CounterpartFormSheet as n, useFocusFirstInvalidField as r } from "../../ui/dist/index10.js";
|
|
6
|
+
import { BankAccountFormSheet as i } from "../../ui/dist/index11.js";
|
|
7
|
+
import { ConfirmDeleteDialog as a } from "../../ui/dist/index13.js";
|
|
7
8
|
import "../../ui/dist/index.js";
|
|
8
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as a } from "./lib/labels.js";
|
|
9
9
|
import { bankAccountToAchFormValues as o, buildAnalyticsMap as s, buildCounterpartFormTaxIdField as c, buildCounterpartRows as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartToFormValues as f, emptyCounterpartFormValues as p, formatMoney as m, getAchInstructions as h, getCounterpartEmail as g, getCounterpartName as _, getPayableAchInstructions as v, hasCounterpartFormErrors as y, hasSelectedText as b, isAchCompatibleBankAccount as x, resolveCounterpartBankAccountWrite as S, validateAchFormValues as C, validateCounterpartForm as w } from "./lib/helpers.js";
|
|
10
10
|
import { useCounterpartQuery as T, useCounterpartsByIdsQuery as E, useCounterpartsQuery as D, useCreateCounterpartMutation as O } from "../../data-access/dist/index3.js";
|
|
11
11
|
import { useCreateCounterpartBankAccountMutation as k, useUpdateCounterpartBankAccountMutation as A } from "../../data-access/dist/index4.js";
|
|
@@ -18,4 +18,4 @@ import { useCounterpartForm as F } from "./lib/useCounterpartForm.js";
|
|
|
18
18
|
import { useDeleteController as I } from "./lib/useDeleteController.js";
|
|
19
19
|
import "./lib/useSubEntityForm.js";
|
|
20
20
|
import { useBankAccountForm as L } from "./lib/subEntityForms.js";
|
|
21
|
-
export {
|
|
21
|
+
export { i as BankAccountFormSheet, e as COUNTERPART_MESSAGE_LABELS_EN, a as ConfirmDeleteDialog, t as CounterpartFormFields, n as CounterpartFormSheet, o as bankAccountToAchFormValues, s as buildAnalyticsMap, c as buildCounterpartFormTaxIdField, l as buildCounterpartRows, u as counterpartFormBankAccountToCreatePayload, d as counterpartFormBankAccountToUpdatePayload, f as counterpartToFormValues, p as emptyCounterpartFormValues, m as formatMoney, h as getAchInstructions, g as getCounterpartEmail, _ as getCounterpartName, v as getPayableAchInstructions, y as hasCounterpartFormErrors, b as hasSelectedText, x as isAchCompatibleBankAccount, S as resolveCounterpartBankAccountWrite, L as useBankAccountForm, j as useCounterpartAddressesForRowsQuery, M as useCounterpartAddressesQuery, N as useCounterpartDetails, F as useCounterpartForm, T as useCounterpartQuery, E as useCounterpartsByIdsQuery, D as useCounterpartsQuery, k as useCreateCounterpartBankAccountMutation, O as useCreateCounterpartMutation, I as useDeleteController, r as useFocusFirstInvalidField, P as usePayableAchInstructions, A as useUpdateCounterpartBankAccountMutation, C as validateAchFormValues, w as validateCounterpartForm };
|
|
@@ -2,10 +2,10 @@ import { formatMoneyExact as e } from "../../../../util/dist/lib/formatMoneyExac
|
|
|
2
2
|
import { isValidAchAccountNumber as t } from "../../../../util/dist/lib/isValidAchAccountNumber.js";
|
|
3
3
|
import { US_STATE_NAMES_EN as n } from "../../../../util/dist/lib/usStates.js";
|
|
4
4
|
import "../../../../util/dist/index.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { COUNTERPART_MESSAGE_LABELS_EN as r } from "./labels.js";
|
|
6
|
+
import { COUNTERPART_FORM_SHEET_LABELS_EN as i } from "../../../ui/dist/index2.js";
|
|
7
|
+
import { EMPTY_ADDRESS_FORM_VALUES as a } from "../../../ui/dist/index6.js";
|
|
7
8
|
import "../../../ui/dist/index.js";
|
|
8
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as a } from "./labels.js";
|
|
9
9
|
// ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js
|
|
10
10
|
function o(e) {
|
|
11
11
|
try {
|
|
@@ -176,7 +176,7 @@ function O(e = "organization", t) {
|
|
|
176
176
|
phone: "",
|
|
177
177
|
taxId: "",
|
|
178
178
|
remindersEnabled: t === "customer",
|
|
179
|
-
address: { ...
|
|
179
|
+
address: { ...a },
|
|
180
180
|
bankAccount: {
|
|
181
181
|
accountHolderName: "",
|
|
182
182
|
routingNumber: "",
|
|
@@ -253,14 +253,14 @@ function N(e, t) {
|
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
255
|
function P(e, t, n) {
|
|
256
|
-
let
|
|
257
|
-
...
|
|
256
|
+
let r = {
|
|
257
|
+
...i,
|
|
258
258
|
...n
|
|
259
259
|
}, a = e === "individual";
|
|
260
260
|
return {
|
|
261
|
-
label: a ? n?.taxIdSsnLabel ?? n?.taxIdLabel ??
|
|
262
|
-
placeholder: a ?
|
|
263
|
-
description: t === "vendor" ?
|
|
261
|
+
label: a ? n?.taxIdSsnLabel ?? n?.taxIdLabel ?? r.taxIdSsnLabel : n?.taxIdEinLabel ?? n?.taxIdLabel ?? r.taxIdEinLabel,
|
|
262
|
+
placeholder: a ? r.taxIdSsnPlaceholder : r.taxIdEinPlaceholder,
|
|
263
|
+
description: t === "vendor" ? r.vendorTaxIdHelp : r.customerTaxIdHelp
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
function F(e) {
|
|
@@ -357,9 +357,9 @@ function J(e) {
|
|
|
357
357
|
let t = [...e].map(Number);
|
|
358
358
|
return (3 * (t[0] + t[3] + t[6]) + 7 * (t[1] + t[4] + t[7]) + (t[2] + t[5] + t[8])) % 10 == 0;
|
|
359
359
|
}
|
|
360
|
-
function Y(e, n =
|
|
361
|
-
let
|
|
362
|
-
return
|
|
360
|
+
function Y(e, n = r) {
|
|
361
|
+
let i = {}, a = e.accountHolderName.trim(), o = e.routingNumber.trim(), s = e.accountNumber.trim();
|
|
362
|
+
return a.length === 0 && (i.accountHolderName = n.accountHolderNameRequired), o.length !== 0 && J(o) || (i.routingNumber = n.routingNumberInvalid), t(s) || (i.accountNumber = n.accountNumberInvalid), i;
|
|
363
363
|
}
|
|
364
364
|
function X(e) {
|
|
365
365
|
let t = (/^(\+?[\d\s().-]+?)\s*(?:(?:x|ext\.?)\s*\d+)?$/i.exec(e)?.[1])?.replace(/\D/g, "").length ?? 0;
|
|
@@ -368,21 +368,21 @@ function X(e) {
|
|
|
368
368
|
function Z(e) {
|
|
369
369
|
return /^[\d\s-]+$/.test(e) && e.replace(/\D/g, "").length === 9;
|
|
370
370
|
}
|
|
371
|
-
function Q(e, t =
|
|
372
|
-
let
|
|
373
|
-
e.entityType === "organization" ? e.legalName.trim().length === 0 && (
|
|
371
|
+
function Q(e, t = r, n = "customer", i = !1) {
|
|
372
|
+
let a = {};
|
|
373
|
+
e.entityType === "organization" ? e.legalName.trim().length === 0 && (a.legalName = t.legalNameRequired) : (e.firstName.trim().length === 0 && (a.firstName = t.firstNameRequired), e.lastName.trim().length === 0 && (a.lastName = t.lastNameRequired)), e.email.trim().length === 0 ? a.email = t.emailRequired : G(e.email.trim()) || (a.email = t.emailInvalid);
|
|
374
374
|
let o = e.phone.trim();
|
|
375
|
-
o && !X(o) && (
|
|
375
|
+
o && !X(o) && (a.phone = t.phoneInvalid);
|
|
376
376
|
let s = e.taxId.trim();
|
|
377
|
-
if (s && !Z(s) && (
|
|
377
|
+
if (s && !Z(s) && (a.taxId = t.taxIdInvalid), n === "vendor" || A(e.address)) {
|
|
378
378
|
let n = K(e.address, t);
|
|
379
|
-
q(n) && (
|
|
379
|
+
q(n) && (a.address = n);
|
|
380
380
|
}
|
|
381
|
-
if (n === "vendor" && (
|
|
381
|
+
if (n === "vendor" && (i || L(e))) {
|
|
382
382
|
let n = Y(e.bankAccount, t);
|
|
383
|
-
q(n) && (
|
|
383
|
+
q(n) && (a.bankAccount = n);
|
|
384
384
|
}
|
|
385
|
-
return
|
|
385
|
+
return a;
|
|
386
386
|
}
|
|
387
387
|
function $(e, t, n) {
|
|
388
388
|
if (!n) return e;
|