@tesouro/embedded-components-react 0.7.35 → 0.7.36
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/dist/index.d.ts +0 -1
- package/dist/lib/CounterpartsWidget.d.ts +0 -1
- package/dist/lib/CounterpartsWidgetPublic.d.ts +0 -1
- package/dist/lib/CustomersWidget.d.ts +0 -1
- package/dist/lib/ReceivablesWidget.d.ts +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +109 -110
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsPanel.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index4.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +48 -50
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +4 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +3 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +48 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +4 -48
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +28 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index6.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +0 -92
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +0 -4
|
@@ -2,6 +2,93 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
+
import { deleteCounterpartsIdBankAccountsId as e, patchCounterpartsIdBankAccountsId as t, postCounterpartsIdBankAccounts as n } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getCounterpartsIdBankAccountsOptions as r } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as i } from "../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as a } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as o } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { organizationHeaders as s } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
5
11
|
import "../../../data-access/dist/index.js";
|
|
6
|
-
import "./index2.js";
|
|
7
|
-
import "@tanstack/react-query";
|
|
12
|
+
import { counterpartBankAccountsInvalidationKey as c } from "./index2.js";
|
|
13
|
+
import { useMutation as l, useQuery as u } from "@tanstack/react-query";
|
|
14
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index4.js
|
|
15
|
+
function d(e, { enabled: t = !0 } = {}) {
|
|
16
|
+
let { client: n, organizationId: a, widgetToken: c, authEpoch: l, organizationStatus: d } = o(), f = !!(t && a && c && e), p = r({
|
|
17
|
+
client: n,
|
|
18
|
+
headers: s(a),
|
|
19
|
+
path: { counterpart_id: e ?? "" }
|
|
20
|
+
});
|
|
21
|
+
return u({
|
|
22
|
+
...i(p, {
|
|
23
|
+
authEpoch: l,
|
|
24
|
+
organizationStatus: d
|
|
25
|
+
}),
|
|
26
|
+
enabled: f
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function f() {
|
|
30
|
+
let { client: e, organizationId: t } = o();
|
|
31
|
+
return l({
|
|
32
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
33
|
+
let { data: a } = await n({
|
|
34
|
+
client: e,
|
|
35
|
+
headers: s(t),
|
|
36
|
+
path: r,
|
|
37
|
+
body: i,
|
|
38
|
+
throwOnError: !0
|
|
39
|
+
});
|
|
40
|
+
return a;
|
|
41
|
+
},
|
|
42
|
+
onSuccess: async (n, r) => {
|
|
43
|
+
await a(c({
|
|
44
|
+
client: e,
|
|
45
|
+
organizationId: t,
|
|
46
|
+
counterpartId: r.path.counterpart_id
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function p() {
|
|
52
|
+
let { client: e, organizationId: n } = o();
|
|
53
|
+
return l({
|
|
54
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
55
|
+
let { data: a } = await t({
|
|
56
|
+
client: e,
|
|
57
|
+
headers: s(n),
|
|
58
|
+
path: r,
|
|
59
|
+
body: i,
|
|
60
|
+
throwOnError: !0
|
|
61
|
+
});
|
|
62
|
+
return a;
|
|
63
|
+
},
|
|
64
|
+
onSuccess: async (t, r) => {
|
|
65
|
+
await a(c({
|
|
66
|
+
client: e,
|
|
67
|
+
organizationId: n,
|
|
68
|
+
counterpartId: r.path.counterpart_id
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function m() {
|
|
74
|
+
let { client: t, organizationId: n } = o();
|
|
75
|
+
return l({
|
|
76
|
+
mutationFn: async ({ path: r }) => {
|
|
77
|
+
await e({
|
|
78
|
+
client: t,
|
|
79
|
+
headers: s(n),
|
|
80
|
+
path: r,
|
|
81
|
+
throwOnError: !0
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
onSuccess: async (e, r) => {
|
|
85
|
+
await a(c({
|
|
86
|
+
client: t,
|
|
87
|
+
organizationId: n,
|
|
88
|
+
counterpartId: r.path.counterpart_id
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { d as useCounterpartBankAccountsQuery, f as useCreateCounterpartBankAccountMutation, m as useDeleteCounterpartBankAccountMutation, p as useUpdateCounterpartBankAccountMutation };
|
|
@@ -2,59 +2,51 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { withAuthEpoch as
|
|
8
|
-
import { invalidateAllClients as
|
|
9
|
-
import { useEmbedApi as
|
|
10
|
-
import { organizationHeaders as
|
|
5
|
+
import { patchCounterpartsIdAddressesId as e, postCounterpartsIdAddresses as t } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getCounterpartsIdAddressesOptions as n } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as r } from "../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as i } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as a } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { organizationHeaders as o } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
11
11
|
import "../../../data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { useMutation as l,
|
|
12
|
+
import { counterpartAddressesInvalidationKey as s, counterpartInvalidationKey as c } from "./index2.js";
|
|
13
|
+
import { useMutation as l, useQueries as u, useQuery as d } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js
|
|
15
|
-
function
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
15
|
+
function f(e) {
|
|
16
|
+
let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = !!(i && s && e), f = n({
|
|
17
|
+
client: t,
|
|
18
|
+
headers: o(i),
|
|
19
19
|
path: { counterpart_id: e ?? "" }
|
|
20
20
|
});
|
|
21
|
-
return
|
|
22
|
-
...
|
|
23
|
-
authEpoch:
|
|
24
|
-
organizationStatus:
|
|
21
|
+
return d({
|
|
22
|
+
...r(f, {
|
|
23
|
+
authEpoch: c,
|
|
24
|
+
organizationStatus: l
|
|
25
25
|
}),
|
|
26
|
-
enabled:
|
|
26
|
+
enabled: u
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
let { client:
|
|
31
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onSuccess: async (n, r) => {
|
|
43
|
-
await a(c({
|
|
44
|
-
client: e,
|
|
45
|
-
organizationId: t,
|
|
46
|
-
counterpartId: r.path.counterpart_id
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
});
|
|
29
|
+
function p({ counterpartIds: e, enabled: t }) {
|
|
30
|
+
let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
|
|
31
|
+
return u({ queries: e.map((e) => ({
|
|
32
|
+
...r(n({
|
|
33
|
+
client: i,
|
|
34
|
+
headers: o(s),
|
|
35
|
+
path: { counterpart_id: e }
|
|
36
|
+
}), {
|
|
37
|
+
authEpoch: l,
|
|
38
|
+
organizationStatus: d
|
|
39
|
+
}),
|
|
40
|
+
enabled: f && !!e
|
|
41
|
+
})) });
|
|
50
42
|
}
|
|
51
|
-
function
|
|
52
|
-
let { client: e, organizationId: n } =
|
|
43
|
+
function m() {
|
|
44
|
+
let { client: e, organizationId: n } = a();
|
|
53
45
|
return l({
|
|
54
46
|
mutationFn: async ({ path: r, body: i }) => {
|
|
55
47
|
let { data: a } = await t({
|
|
56
48
|
client: e,
|
|
57
|
-
headers:
|
|
49
|
+
headers: o(n),
|
|
58
50
|
path: r,
|
|
59
51
|
body: i,
|
|
60
52
|
throwOnError: !0
|
|
@@ -62,27 +54,33 @@ function p() {
|
|
|
62
54
|
return a;
|
|
63
55
|
},
|
|
64
56
|
onSuccess: async (t, r) => {
|
|
65
|
-
await
|
|
57
|
+
await Promise.all([i(s({
|
|
66
58
|
client: e,
|
|
67
59
|
organizationId: n,
|
|
68
60
|
counterpartId: r.path.counterpart_id
|
|
69
|
-
}))
|
|
61
|
+
})), i(c({
|
|
62
|
+
client: e,
|
|
63
|
+
organizationId: n,
|
|
64
|
+
counterpartId: r.path.counterpart_id
|
|
65
|
+
}))]);
|
|
70
66
|
}
|
|
71
67
|
});
|
|
72
68
|
}
|
|
73
|
-
function
|
|
74
|
-
let { client: t, organizationId: n } =
|
|
69
|
+
function h() {
|
|
70
|
+
let { client: t, organizationId: n } = a();
|
|
75
71
|
return l({
|
|
76
|
-
mutationFn: async ({ path: r }) => {
|
|
77
|
-
await e({
|
|
72
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
73
|
+
let { data: a } = await e({
|
|
78
74
|
client: t,
|
|
79
|
-
headers:
|
|
75
|
+
headers: o(n),
|
|
80
76
|
path: r,
|
|
77
|
+
body: i,
|
|
81
78
|
throwOnError: !0
|
|
82
79
|
});
|
|
80
|
+
return a;
|
|
83
81
|
},
|
|
84
82
|
onSuccess: async (e, r) => {
|
|
85
|
-
await
|
|
83
|
+
await i(s({
|
|
86
84
|
client: t,
|
|
87
85
|
organizationId: n,
|
|
88
86
|
counterpartId: r.path.counterpart_id
|
|
@@ -91,4 +89,4 @@ function m() {
|
|
|
91
89
|
});
|
|
92
90
|
}
|
|
93
91
|
//#endregion
|
|
94
|
-
export {
|
|
92
|
+
export { p as useCounterpartAddressesForRowsQuery, f as useCounterpartAddressesQuery, m as useCreateCounterpartAddressMutation, h as useUpdateCounterpartAddressMutation };
|
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
import "../../../util/dist/lib/apiErrors.js";
|
|
2
2
|
import "../../ui/dist/index5.js";
|
|
3
3
|
import { CounterpartFormFields as e, CounterpartFormSheet as t, useFocusFirstInvalidField as n } from "../../ui/dist/index10.js";
|
|
4
|
-
import { BankAccountFormSheet as r } from "../../ui/dist/
|
|
5
|
-
import { ConfirmDeleteDialog as i } from "../../ui/dist/
|
|
4
|
+
import { BankAccountFormSheet as r } from "../../ui/dist/index11.js";
|
|
5
|
+
import { ConfirmDeleteDialog as i } from "../../ui/dist/index13.js";
|
|
6
6
|
import "../../ui/dist/index.js";
|
|
7
7
|
import { COUNTERPART_MESSAGE_LABELS_EN as a } from "./lib/labels.js";
|
|
8
8
|
import { addressResponseToFormValues as o, bankAccountToAchFormValues as s, buildAnalyticsMap as c, buildCounterpartFormTaxIdField as l, buildCounterpartRows as u, counterpartFormBankAccountToCreatePayload as d, counterpartFormBankAccountToUpdatePayload as f, counterpartToFormValues as p, emptyCounterpartFormValues as m, formatMoney as h, getAchInstructions as g, getCounterpartEmail as _, getCounterpartName as v, getPayableAchInstructions as y, hasCounterpartFormErrors as b, hasSelectedText as x, isAchCompatibleBankAccount as S, resolveCounterpartBankAccountWrite as C, validateAchFormValues as w, validateCounterpartForm as T } from "./lib/helpers.js";
|
|
9
9
|
import { useCounterpartQuery as E, useCounterpartsByIdsQuery as D, useCounterpartsQuery as O, useCreateCounterpartMutation as k } from "../../data-access/dist/index3.js";
|
|
10
|
-
import { useCreateCounterpartBankAccountMutation as A, useUpdateCounterpartBankAccountMutation as j } from "../../data-access/dist/
|
|
11
|
-
import { useCounterpartAddressesForRowsQuery as M, useCounterpartAddressesQuery as N } from "../../data-access/dist/
|
|
10
|
+
import { useCreateCounterpartBankAccountMutation as A, useUpdateCounterpartBankAccountMutation as j } from "../../data-access/dist/index4.js";
|
|
11
|
+
import { useCounterpartAddressesForRowsQuery as M, useCounterpartAddressesQuery as N } from "../../data-access/dist/index5.js";
|
|
12
12
|
import "../../data-access/dist/index.js";
|
|
13
13
|
import { useAddressForm as P } from "./lib/useAddressForm.js";
|
|
14
14
|
import { useCounterpartDetails as F } from "./lib/useCounterpartDetails.js";
|
|
15
15
|
import { usePayableAchInstructions as I } from "./lib/usePayableAchInstructions.js";
|
|
16
16
|
import { useCounterpartForm as L } from "./lib/useCounterpartForm.js";
|
|
17
|
-
import "./lib/useCounterpartSelector.js";
|
|
18
|
-
import "./lib/CounterpartSelector.js";
|
|
19
17
|
import { useDeleteController as R } from "./lib/useDeleteController.js";
|
|
20
18
|
import "./lib/useSubEntityForm.js";
|
|
21
19
|
import { useBankAccountForm as z } from "./lib/subEntityForms.js";
|
|
@@ -120,11 +120,10 @@ function C(e, t = "USD", n) {
|
|
|
120
120
|
let i = (e ?? []).filter((e) => e.currency === t && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
|
|
121
121
|
return i.find((e) => e.is_default_for_currency) ?? i[0];
|
|
122
122
|
}
|
|
123
|
-
function w(e
|
|
124
|
-
let n = e.line2.trim();
|
|
123
|
+
function w(e) {
|
|
125
124
|
return {
|
|
126
125
|
line1: e.line1.trim(),
|
|
127
|
-
line2:
|
|
126
|
+
line2: e.line2.trim() || void 0,
|
|
128
127
|
city: e.city.trim(),
|
|
129
128
|
state: e.state || void 0,
|
|
130
129
|
postal_code: e.postalCode.trim(),
|
|
@@ -14,7 +14,6 @@ var e = {
|
|
|
14
14
|
accountHolderNameRequired: "Account holder name is required",
|
|
15
15
|
routingNumberInvalid: "Enter a valid 9-digit ABA routing number",
|
|
16
16
|
accountNumberInvalid: "Enter a valid account number",
|
|
17
|
-
vatIdValueRequired: "VAT ID is required",
|
|
18
17
|
genericError: "Something went wrong. Please try again.",
|
|
19
18
|
amountsUnavailable: "Some amounts could not be loaded. Try refreshing the page.",
|
|
20
19
|
deleteTitle: "Delete {name}?",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import "../../../../ui/dist/index.js";
|
|
7
7
|
import { bankAccountToAchFormValues as t, counterpartFormBankAccountToCreatePayload as n, counterpartFormBankAccountToUpdatePayload as r, emptyAchFormValues as i, hasAchFormErrors as a, resolveCounterpartBankAccountWrite as o, validateAchFormValues as s } from "./helpers.js";
|
|
8
|
-
import { useCreateCounterpartBankAccountMutation as c, useUpdateCounterpartBankAccountMutation as l } from "../../../data-access/dist/
|
|
8
|
+
import { useCreateCounterpartBankAccountMutation as c, useUpdateCounterpartBankAccountMutation as l } from "../../../data-access/dist/index4.js";
|
|
9
9
|
import "../../../data-access/dist/index.js";
|
|
10
10
|
import { useSubEntityForm as u } from "./useSubEntityForm.js";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js
|
|
@@ -6,7 +6,7 @@ import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/
|
|
|
6
6
|
import { extractApiErrorMessage as t } from "../../../../util/dist/lib/apiErrors.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
import { addressFormToCreatePayload as n, addressFormToUpdatePayload as r, addressResponseToFormValues as i, validateAddressForm as a } from "./helpers.js";
|
|
9
|
-
import { useCreateCounterpartAddressMutation as o, useUpdateCounterpartAddressMutation as s } from "../../../data-access/dist/
|
|
9
|
+
import { useCreateCounterpartAddressMutation as o, useUpdateCounterpartAddressMutation as s } from "../../../data-access/dist/index5.js";
|
|
10
10
|
import "../../../data-access/dist/index.js";
|
|
11
11
|
import { useCallback as c, useState as l } from "react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { buildBankAccountItems as e, buildCounterpartDetailsView as t } from "./helpers.js";
|
|
6
6
|
import { useCounterpartQuery as n } from "../../../data-access/dist/index3.js";
|
|
7
|
-
import { useCounterpartBankAccountsQuery as r } from "../../../data-access/dist/
|
|
8
|
-
import { useCounterpartAddressesQuery as i } from "../../../data-access/dist/
|
|
7
|
+
import { useCounterpartBankAccountsQuery as r } from "../../../data-access/dist/index4.js";
|
|
8
|
+
import { useCounterpartAddressesQuery as i } from "../../../data-access/dist/index5.js";
|
|
9
9
|
import "../../../data-access/dist/index.js";
|
|
10
10
|
import { useMemo as a } from "react";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
|
|
6
6
|
import { addressFormToCreatePayload as t, addressFormToUpdatePayload as n, addressResponseToFormValues as r, bankAccountToAchFormValues as i, counterpartFormBankAccountToCreatePayload as a, counterpartFormBankAccountToUpdatePayload as o, counterpartFormToCreatePayload as s, counterpartFormToUpdatePayload as ee, counterpartToFormValues as c, emptyCounterpartFormValues as l, getAchInstructions as u, hasCounterpartFormAddressValues as d, hasCounterpartFormBankAccountValues as f, hasCounterpartFormErrors as p, resolveCounterpartBankAccountWrite as m, validateCounterpartForm as h, withoutUnchangedContactErrors as g } from "./helpers.js";
|
|
7
7
|
import { useCreateCounterpartMutation as _, useUpdateCounterpartMutation as te } from "../../../data-access/dist/index3.js";
|
|
8
|
-
import { useCreateCounterpartBankAccountMutation as v, useUpdateCounterpartBankAccountMutation as y } from "../../../data-access/dist/
|
|
9
|
-
import { useCreateCounterpartAddressMutation as ne, useUpdateCounterpartAddressMutation as re } from "../../../data-access/dist/
|
|
8
|
+
import { useCreateCounterpartBankAccountMutation as v, useUpdateCounterpartBankAccountMutation as y } from "../../../data-access/dist/index4.js";
|
|
9
|
+
import { useCreateCounterpartAddressMutation as ne, useUpdateCounterpartAddressMutation as re } from "../../../data-access/dist/index5.js";
|
|
10
10
|
import "../../../data-access/dist/index.js";
|
|
11
11
|
import { useCallback as b, useLayoutEffect as ie, useState as x } from "react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js
|
|
@@ -6,7 +6,7 @@ import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/
|
|
|
6
6
|
import { extractApiErrorMessage as t } from "../../../../util/dist/lib/apiErrors.js";
|
|
7
7
|
import "../../../../ui/dist/index.js";
|
|
8
8
|
import { useDeleteCounterpartMutation as n } from "../../../data-access/dist/index3.js";
|
|
9
|
-
import { useDeleteCounterpartBankAccountMutation as r } from "../../../data-access/dist/
|
|
9
|
+
import { useDeleteCounterpartBankAccountMutation as r } from "../../../data-access/dist/index4.js";
|
|
10
10
|
import "../../../data-access/dist/index.js";
|
|
11
11
|
import { useCallback as i, useState as a } from "react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { getPayableAchInstructions as e } from "./helpers.js";
|
|
6
|
-
import { useCounterpartBankAccountsQuery as t } from "../../../data-access/dist/
|
|
6
|
+
import { useCounterpartBankAccountsQuery as t } from "../../../data-access/dist/index4.js";
|
|
7
7
|
import "../../../data-access/dist/index.js";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js
|
|
9
9
|
function n({ counterpartId: n, currency: r, currentBankAccountId: i, enabled: a = !0 } = {}) {
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js
CHANGED
|
@@ -5,10 +5,7 @@ import { EMPTY_ADDRESS_FORM_VALUES as r } from "./index6.js";
|
|
|
5
5
|
import { CounterpartAddressFields as i } from "./index7.js";
|
|
6
6
|
import "./index8.js";
|
|
7
7
|
import { CounterpartFormFields as a, CounterpartFormSheet as o, countErrors as s, useFocusFirstInvalidField as c } from "./index10.js";
|
|
8
|
-
import "./index11.js";
|
|
9
|
-
import
|
|
10
|
-
import "./index13.js";
|
|
11
|
-
import "./index14.js";
|
|
12
|
-
import { ConfirmDeleteDialog as u } from "./index15.js";
|
|
13
|
-
import "./index16.js";
|
|
8
|
+
import { BankAccountFormSheet as l } from "./index11.js";
|
|
9
|
+
import "./index12.js";
|
|
10
|
+
import { ConfirmDeleteDialog as u } from "./index13.js";
|
|
14
11
|
export { e as ACH_FIELD_GROUP_LABELS_EN, n as AchFieldGroup, l as BankAccountFormSheet, t as COUNTERPART_FORM_SHEET_LABELS_EN, u as ConfirmDeleteDialog, i as CounterpartAddressFields, a as CounterpartFormFields, o as CounterpartFormSheet, r as EMPTY_ADDRESS_FORM_VALUES, s as countErrors, c as useFocusFirstInvalidField };
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
CHANGED
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import "./index2.js";
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "
|
|
6
|
-
import "react";
|
|
7
|
-
|
|
1
|
+
import { Typography as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as t } from "./index2.js";
|
|
3
|
+
import { AchFieldGroup as n } from "./index5.js";
|
|
4
|
+
import { FormSheet as r } from "./index9.js";
|
|
5
|
+
import { useId as i } from "react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
|
|
8
|
+
function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlightedFields: f, inProgress: p, submitDisabled: m, onChange: h, onSubmit: g, onCancel: _, labels: v }) {
|
|
9
|
+
let y = {
|
|
10
|
+
...t,
|
|
11
|
+
...v,
|
|
12
|
+
fieldMarkers: {
|
|
13
|
+
...t.fieldMarkers,
|
|
14
|
+
...v?.fieldMarkers
|
|
15
|
+
}
|
|
16
|
+
}, b = i();
|
|
17
|
+
return /* @__PURE__ */ o(r, {
|
|
18
|
+
open: s,
|
|
19
|
+
onOpenChange: c,
|
|
20
|
+
title: l === "edit" ? y.editTitle : y.createTitle,
|
|
21
|
+
formError: d?.form,
|
|
22
|
+
inProgress: p,
|
|
23
|
+
submitDisabled: m,
|
|
24
|
+
submitLabel: y.saveButton,
|
|
25
|
+
cancelLabel: y.cancelButton,
|
|
26
|
+
onSubmit: g,
|
|
27
|
+
onCancel: _,
|
|
28
|
+
children: [/* @__PURE__ */ a(n, {
|
|
29
|
+
idPrefix: b,
|
|
30
|
+
values: u,
|
|
31
|
+
errors: d,
|
|
32
|
+
highlighted: f,
|
|
33
|
+
onChange: h,
|
|
34
|
+
labels: {
|
|
35
|
+
accountHolderName: y.accountHolderNameLabel,
|
|
36
|
+
routingNumber: y.routingNumberLabel,
|
|
37
|
+
accountNumber: y.accountNumberLabel,
|
|
38
|
+
fieldMarkers: y.fieldMarkers
|
|
39
|
+
}
|
|
40
|
+
}), /* @__PURE__ */ a(e, {
|
|
41
|
+
variant: "body2",
|
|
42
|
+
color: "muted",
|
|
43
|
+
children: y.helperText
|
|
44
|
+
})]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { s as BankAccountFormSheet, s as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js
CHANGED
|
@@ -1,48 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useId as i } from "react";
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js
|
|
8
|
-
function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlightedFields: f, inProgress: p, submitDisabled: m, onChange: h, onSubmit: g, onCancel: _, labels: v }) {
|
|
9
|
-
let y = {
|
|
10
|
-
...t,
|
|
11
|
-
...v,
|
|
12
|
-
fieldMarkers: {
|
|
13
|
-
...t.fieldMarkers,
|
|
14
|
-
...v?.fieldMarkers
|
|
15
|
-
}
|
|
16
|
-
}, b = i();
|
|
17
|
-
return /* @__PURE__ */ o(r, {
|
|
18
|
-
open: s,
|
|
19
|
-
onOpenChange: c,
|
|
20
|
-
title: l === "edit" ? y.editTitle : y.createTitle,
|
|
21
|
-
formError: d?.form,
|
|
22
|
-
inProgress: p,
|
|
23
|
-
submitDisabled: m,
|
|
24
|
-
submitLabel: y.saveButton,
|
|
25
|
-
cancelLabel: y.cancelButton,
|
|
26
|
-
onSubmit: g,
|
|
27
|
-
onCancel: _,
|
|
28
|
-
children: [/* @__PURE__ */ a(n, {
|
|
29
|
-
idPrefix: b,
|
|
30
|
-
values: u,
|
|
31
|
-
errors: d,
|
|
32
|
-
highlighted: f,
|
|
33
|
-
onChange: h,
|
|
34
|
-
labels: {
|
|
35
|
-
accountHolderName: y.accountHolderNameLabel,
|
|
36
|
-
routingNumber: y.routingNumberLabel,
|
|
37
|
-
accountNumber: y.accountNumberLabel,
|
|
38
|
-
fieldMarkers: y.fieldMarkers
|
|
39
|
-
}
|
|
40
|
-
}), /* @__PURE__ */ a(e, {
|
|
41
|
-
variant: "body2",
|
|
42
|
-
color: "muted",
|
|
43
|
-
children: y.helperText
|
|
44
|
-
})]
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { s as BankAccountFormSheet, s as default };
|
|
1
|
+
import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import "./index2.js";
|
|
3
|
+
import "./index6.js";
|
|
4
|
+
import "react/jsx-runtime";
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import "./index2.js";
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { CONFIRM_DELETE_DIALOG_LABELS_EN as s } from "./index2.js";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
|
|
5
|
+
function u({ open: u, onOpenChange: d, title: f, message: p, isDeleting: m, onConfirm: h, onCancel: g, labels: _ }) {
|
|
6
|
+
let v = {
|
|
7
|
+
...s,
|
|
8
|
+
..._
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ c(e, {
|
|
11
|
+
open: u,
|
|
12
|
+
onOpenChange: d,
|
|
13
|
+
children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: f }), /* @__PURE__ */ c(n, { children: p })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
14
|
+
variant: "ghost",
|
|
15
|
+
onClick: g,
|
|
16
|
+
disabled: m,
|
|
17
|
+
children: v.cancelButton
|
|
18
|
+
}), /* @__PURE__ */ c(o, {
|
|
19
|
+
variant: "destructive",
|
|
20
|
+
onClick: h,
|
|
21
|
+
disabled: m,
|
|
22
|
+
loading: m,
|
|
23
|
+
children: v.confirmButton
|
|
24
|
+
})] })] })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { u as ConfirmDeleteDialog, u as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.7.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.7.36", n = "33e8f601ef34560d21f1bf6c3b66adea54239146", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/package.json
CHANGED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { patchCounterpartsIdAddressesId as e, postCounterpartsIdAddresses as t } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { getCounterpartsIdAddressesOptions as n } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import { withAuthEpoch as r } from "../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
-
import { invalidateAllClients as i } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
-
import { useEmbedApi as a } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
-
import { organizationHeaders as o } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
11
|
-
import "../../../data-access/dist/index.js";
|
|
12
|
-
import { counterpartAddressesInvalidationKey as s, counterpartInvalidationKey as c } from "./index2.js";
|
|
13
|
-
import { useMutation as l, useQueries as u, useQuery as d } from "@tanstack/react-query";
|
|
14
|
-
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js
|
|
15
|
-
function f(e) {
|
|
16
|
-
let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = !!(i && s && e), f = n({
|
|
17
|
-
client: t,
|
|
18
|
-
headers: o(i),
|
|
19
|
-
path: { counterpart_id: e ?? "" }
|
|
20
|
-
});
|
|
21
|
-
return d({
|
|
22
|
-
...r(f, {
|
|
23
|
-
authEpoch: c,
|
|
24
|
-
organizationStatus: l
|
|
25
|
-
}),
|
|
26
|
-
enabled: u
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
function p({ counterpartIds: e, enabled: t }) {
|
|
30
|
-
let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
|
|
31
|
-
return u({ queries: e.map((e) => ({
|
|
32
|
-
...r(n({
|
|
33
|
-
client: i,
|
|
34
|
-
headers: o(s),
|
|
35
|
-
path: { counterpart_id: e }
|
|
36
|
-
}), {
|
|
37
|
-
authEpoch: l,
|
|
38
|
-
organizationStatus: d
|
|
39
|
-
}),
|
|
40
|
-
enabled: f && !!e
|
|
41
|
-
})) });
|
|
42
|
-
}
|
|
43
|
-
function m() {
|
|
44
|
-
let { client: e, organizationId: n } = a();
|
|
45
|
-
return l({
|
|
46
|
-
mutationFn: async ({ path: r, body: i }) => {
|
|
47
|
-
let { data: a } = await t({
|
|
48
|
-
client: e,
|
|
49
|
-
headers: o(n),
|
|
50
|
-
path: r,
|
|
51
|
-
body: i,
|
|
52
|
-
throwOnError: !0
|
|
53
|
-
});
|
|
54
|
-
return a;
|
|
55
|
-
},
|
|
56
|
-
onSuccess: async (t, r) => {
|
|
57
|
-
await Promise.all([i(s({
|
|
58
|
-
client: e,
|
|
59
|
-
organizationId: n,
|
|
60
|
-
counterpartId: r.path.counterpart_id
|
|
61
|
-
})), i(c({
|
|
62
|
-
client: e,
|
|
63
|
-
organizationId: n,
|
|
64
|
-
counterpartId: r.path.counterpart_id
|
|
65
|
-
}))]);
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function h() {
|
|
70
|
-
let { client: t, organizationId: n } = a();
|
|
71
|
-
return l({
|
|
72
|
-
mutationFn: async ({ path: r, body: i }) => {
|
|
73
|
-
let { data: a } = await e({
|
|
74
|
-
client: t,
|
|
75
|
-
headers: o(n),
|
|
76
|
-
path: r,
|
|
77
|
-
body: i,
|
|
78
|
-
throwOnError: !0
|
|
79
|
-
});
|
|
80
|
-
return a;
|
|
81
|
-
},
|
|
82
|
-
onSuccess: async (e, r) => {
|
|
83
|
-
await i(s({
|
|
84
|
-
client: t,
|
|
85
|
-
organizationId: n,
|
|
86
|
-
counterpartId: r.path.counterpart_id
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
export { p as useCounterpartAddressesForRowsQuery, f as useCounterpartAddressesQuery, m as useCreateCounterpartAddressMutation, h as useUpdateCounterpartAddressMutation };
|