@tesouro/embedded-components-react 0.3.34 → 0.3.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/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +33 -31
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index6.js +5 -9
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +98 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +26 -300
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +314 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +39 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +5 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +28 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +115 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +60 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +6 -10
- 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/bank-accounts-widget/data-access/dist/index5.js
CHANGED
|
@@ -12,17 +12,18 @@ import { useEffect as a, useMemo as o } from "react";
|
|
|
12
12
|
import { useInfiniteQuery as s } from "@tanstack/react-query";
|
|
13
13
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js
|
|
14
14
|
var c = 100, l = ["ACTIVE", "INVITED"];
|
|
15
|
-
function u(l, u) {
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers:
|
|
15
|
+
function u(l, u, d) {
|
|
16
|
+
let { client: f, organizationId: p, authEpoch: m } = e(), h = t(p), g = d?.length ? { Permissions: d } : {}, _ = r({
|
|
17
|
+
client: f,
|
|
18
|
+
headers: h,
|
|
19
19
|
query: {
|
|
20
20
|
Status: l,
|
|
21
|
-
Limit: c
|
|
21
|
+
Limit: c,
|
|
22
|
+
...g
|
|
22
23
|
}
|
|
23
|
-
}),
|
|
24
|
+
}), v = s({
|
|
24
25
|
queryKey: [
|
|
25
|
-
...i(
|
|
26
|
+
...i(_, m).queryKey,
|
|
26
27
|
"all",
|
|
27
28
|
l
|
|
28
29
|
],
|
|
@@ -30,11 +31,12 @@ function u(l, u) {
|
|
|
30
31
|
initialPageParam: void 0,
|
|
31
32
|
queryFn: async ({ signal: e, pageParam: t }) => {
|
|
32
33
|
let { data: r } = await n({
|
|
33
|
-
client:
|
|
34
|
-
headers:
|
|
34
|
+
client: f,
|
|
35
|
+
headers: h,
|
|
35
36
|
query: {
|
|
36
37
|
Status: l,
|
|
37
38
|
Limit: c,
|
|
39
|
+
...g,
|
|
38
40
|
...t ? { PaginationToken: t } : {}
|
|
39
41
|
},
|
|
40
42
|
signal: e,
|
|
@@ -48,31 +50,31 @@ function u(l, u) {
|
|
|
48
50
|
}
|
|
49
51
|
});
|
|
50
52
|
a(() => {
|
|
51
|
-
!u || !
|
|
53
|
+
!u || !v.hasNextPage || v.isFetchingNextPage || v.isError || v.fetchNextPage();
|
|
52
54
|
}, [
|
|
53
55
|
u,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
v.hasNextPage,
|
|
57
|
+
v.isFetchingNextPage,
|
|
58
|
+
v.isError,
|
|
59
|
+
v.fetchNextPage
|
|
58
60
|
]);
|
|
59
|
-
let
|
|
60
|
-
if (
|
|
61
|
-
data:
|
|
61
|
+
let y = o(() => {
|
|
62
|
+
if (v.data) return {
|
|
63
|
+
data: v.data.pages.flatMap((e) => e.data ?? []),
|
|
62
64
|
nextPaginationToken: null,
|
|
63
65
|
prevPaginationToken: null
|
|
64
66
|
};
|
|
65
|
-
}, [
|
|
67
|
+
}, [v.data]);
|
|
66
68
|
return {
|
|
67
|
-
...
|
|
68
|
-
data:
|
|
69
|
+
...v,
|
|
70
|
+
data: y
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
|
-
function d({ enabled: t } = {}) {
|
|
72
|
-
let { organizationId:
|
|
73
|
+
function d({ enabled: t, permissions: n } = {}) {
|
|
74
|
+
let { organizationId: r, widgetToken: i } = e(), a = !!(r && i) && (t === !0 || t === void 0), s = u("ACTIVE", a, n), c = u("INVITED", a, n), d = o(() => {
|
|
73
75
|
let e = /* @__PURE__ */ new Map();
|
|
74
76
|
for (let t of l) {
|
|
75
|
-
let n = t === "ACTIVE" ?
|
|
77
|
+
let n = t === "ACTIVE" ? s.data?.data ?? [] : c.data?.data ?? [];
|
|
76
78
|
for (let t of n) e.set(t.id, t);
|
|
77
79
|
}
|
|
78
80
|
return {
|
|
@@ -80,15 +82,15 @@ function d({ enabled: t } = {}) {
|
|
|
80
82
|
nextPaginationToken: null,
|
|
81
83
|
prevPaginationToken: null
|
|
82
84
|
};
|
|
83
|
-
}, [
|
|
85
|
+
}, [s.data, c.data]), f = s.isLoading || c.isLoading, p = s.isFetchingNextPage || c.isFetchingNextPage, m = s.hasNextPage || c.hasNextPage, h = s.isError || c.isError;
|
|
84
86
|
return {
|
|
85
|
-
...
|
|
86
|
-
data:
|
|
87
|
-
isLoading:
|
|
88
|
-
isFetchingNextPage:
|
|
89
|
-
hasNextPage:
|
|
90
|
-
isError:
|
|
91
|
-
isSuccess:
|
|
87
|
+
...s,
|
|
88
|
+
data: d,
|
|
89
|
+
isLoading: f,
|
|
90
|
+
isFetchingNextPage: p,
|
|
91
|
+
hasNextPage: m,
|
|
92
|
+
isError: h,
|
|
93
|
+
isSuccess: s.isSuccess && c.isSuccess
|
|
92
94
|
};
|
|
93
95
|
}
|
|
94
96
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index6.js
CHANGED
|
@@ -26,25 +26,21 @@ function r(e, n) {
|
|
|
26
26
|
if (r) return e.find((e) => e.key.toLowerCase() === r.toLowerCase())?.description;
|
|
27
27
|
}
|
|
28
28
|
function i(e) {
|
|
29
|
-
let t = e?.trim().toLowerCase() ?? "", n = t.includes(":") ? t.slice(t.lastIndexOf(":") + 1) : t;
|
|
30
|
-
return n === "admin" || n === "administrator";
|
|
31
|
-
}
|
|
32
|
-
function a(e) {
|
|
33
29
|
return e.trim() ? e.split("_").filter(Boolean).map((e) => e.length <= 3 && e === e.toUpperCase() ? e.toUpperCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join(" ") : "";
|
|
34
30
|
}
|
|
35
|
-
function
|
|
31
|
+
function a(e, a, o) {
|
|
36
32
|
return e.map((e) => {
|
|
37
|
-
let s = e.role ?? "", c = t(
|
|
33
|
+
let s = e.role ?? "", c = t(a, s) || s.trim(), l = n(a, s) || i(c), u = r(a, s) ?? "";
|
|
38
34
|
return {
|
|
39
35
|
id: e.id,
|
|
40
36
|
name: e.name,
|
|
41
37
|
role: l,
|
|
42
38
|
roleDescription: u,
|
|
43
|
-
locked:
|
|
39
|
+
locked: o.has(e.id)
|
|
44
40
|
};
|
|
45
41
|
});
|
|
46
42
|
}
|
|
47
|
-
function
|
|
43
|
+
function o(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggle: i }) {
|
|
48
44
|
return e.map((e) => ({
|
|
49
45
|
key: e.id,
|
|
50
46
|
name: e.name,
|
|
@@ -58,4 +54,4 @@ function s(e, { selectedUserIds: t, disabled: n, fallbackTooltip: r, onUserToggl
|
|
|
58
54
|
}));
|
|
59
55
|
}
|
|
60
56
|
//#endregion
|
|
61
|
-
export {
|
|
57
|
+
export { r as resolveOrganizationRoleDescription, n as resolveOrganizationRoleDisplayName, t as resolveOrganizationRoleKey, o as toAccessRows, e as toOrganizationRoleOptions, a as toTeamMembers };
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
CHANGED
|
@@ -3,53 +3,55 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import { useAllBankAccountsQuery as n } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
8
|
+
import { useAllOrganizationRolesQuery as r } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
10
|
import "../../../shared/ui/dist/index.js";
|
|
9
|
-
import { useAnalyticsTrack as
|
|
10
|
-
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as
|
|
11
|
-
import { useWidgetConfig as
|
|
11
|
+
import { useAnalyticsTrack as ee } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
12
|
+
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as te, emitWidgetDomEvent as ne } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
13
|
+
import { useWidgetConfig as re, useWidgetError as ie, useWidgetLoading as ae } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
14
|
import "../../../shared/feature/dist/index.js";
|
|
13
15
|
import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
|
|
14
|
-
import { copyTextToClipboard as
|
|
15
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
16
|
-
import { getBankAccountsPermissions as
|
|
17
|
-
import { toAccessRows as
|
|
18
|
-
import { DEFAULT_LABELS as
|
|
16
|
+
import { copyTextToClipboard as oe, formatAmountLabel as a, formatTotalAvailableBalanceLabel as se, maskAccountNumber as o } from "./index3.js";
|
|
17
|
+
import { DEFAULT_FEATURE_LABELS as ce } from "./index4.js";
|
|
18
|
+
import { getBankAccountsPermissions as le } from "./index5.js";
|
|
19
|
+
import { toAccessRows as ue, toOrganizationRoleOptions as de, toTeamMembers as fe } from "./index6.js";
|
|
20
|
+
import { DEFAULT_LABELS as pe } from "../../ui/dist/lib/labels.js";
|
|
19
21
|
import "../../ui/dist/index.js";
|
|
20
|
-
import { useCreateBankAccountMutation as
|
|
21
|
-
import { useGrantBankAccountAccessMutation as
|
|
22
|
-
import { useAllOrganizationUsersQuery as
|
|
22
|
+
import { useCreateBankAccountMutation as me } from "../../data-access/dist/index3.js";
|
|
23
|
+
import { useGrantBankAccountAccessMutation as he } from "../../data-access/dist/index4.js";
|
|
24
|
+
import { useAllOrganizationUsersQuery as s } from "../../data-access/dist/index5.js";
|
|
23
25
|
import "../../data-access/dist/index.js";
|
|
24
26
|
import { filterRolesForOrganization as ge } from "../../../../shared/util-validation/dist/index6.js";
|
|
25
|
-
import { useCallback as _e, useEffect as
|
|
26
|
-
import { useControllableState as
|
|
27
|
+
import { useCallback as _e, useEffect as ve, useMemo as c, useRef as ye, useState as l } from "react";
|
|
28
|
+
import { useControllableState as be } from "@radix-ui/react-use-controllable-state";
|
|
27
29
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
|
|
28
|
-
var u = { nickname: "" };
|
|
30
|
+
var u = { nickname: "" }, xe = t.BankAccountWriteOrg;
|
|
29
31
|
function d(e, t) {
|
|
30
32
|
return e !== void 0 && t !== void 0 && e !== t;
|
|
31
33
|
}
|
|
32
|
-
function f({ labels:
|
|
33
|
-
let
|
|
34
|
-
...
|
|
35
|
-
...
|
|
34
|
+
function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankLogoSrc: f, bankLogoAlt: Ce, depositAgreementUrl: we, selectedAccountId: Te, defaultSelectedAccountId: Ee, onSelectedAccountIdChange: De, "data-testid": Oe } = {}) {
|
|
35
|
+
let ke = {
|
|
36
|
+
...pe,
|
|
37
|
+
...t
|
|
36
38
|
}, p = {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
39
|
-
}, m =
|
|
40
|
-
h !== void 0 && h !== x &&
|
|
41
|
-
let [S,
|
|
42
|
-
b !== void 0 && b !== S &&
|
|
43
|
-
let [
|
|
44
|
-
prop:
|
|
45
|
-
defaultProp:
|
|
46
|
-
onChange:
|
|
39
|
+
...ce,
|
|
40
|
+
...a
|
|
41
|
+
}, m = ee(), { organizationId: h, widgetToken: Ae, initResponse: g } = re(), je = ae(), _ = !!ie(), v = !!(h && Ae), y = c(() => le(g?.scopes), [g?.scopes]), Me = v && y.canRead && !!g, b = g?.userId ?? void 0, [x, Ne] = l(h);
|
|
42
|
+
h !== void 0 && h !== x && Ne(h);
|
|
43
|
+
let [S, Pe] = l(b);
|
|
44
|
+
b !== void 0 && b !== S && Pe(b);
|
|
45
|
+
let [Fe, C] = be({
|
|
46
|
+
prop: Te,
|
|
47
|
+
defaultProp: Ee ?? null,
|
|
48
|
+
onChange: De,
|
|
47
49
|
caller: "BankAccountsWidget"
|
|
48
|
-
}), w =
|
|
50
|
+
}), w = ye({
|
|
49
51
|
organizationId: x,
|
|
50
52
|
userId: S
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
+
}), Ie = d(w.current.organizationId, x) || d(w.current.userId, S);
|
|
54
|
+
ve(() => {
|
|
53
55
|
let e = w.current;
|
|
54
56
|
w.current = {
|
|
55
57
|
organizationId: x,
|
|
@@ -60,63 +62,67 @@ function f({ labels: a, featureLabels: o, isBankingTaglineVisible: f = !0, bankL
|
|
|
60
62
|
S,
|
|
61
63
|
C
|
|
62
64
|
]);
|
|
63
|
-
let T =
|
|
65
|
+
let T = Ie ? null : Fe, E = Me && !T, D = _e((e) => {
|
|
64
66
|
C(e);
|
|
65
|
-
}, [C]), [O, k] = l(!1), [A, j] = l(u), [M, N] = l([]), [
|
|
66
|
-
|
|
67
|
+
}, [C]), [O, k] = l(!1), [A, j] = l(u), [M, N] = l([]), [Le, P] = l(!1), [F, I] = l(), [L, Re] = l({}), [R, z] = l({});
|
|
68
|
+
ve(() => {
|
|
67
69
|
m(i.Mounted);
|
|
68
70
|
}, [m]);
|
|
69
|
-
let
|
|
70
|
-
|
|
71
|
+
let B = n({ enabled: E }), V = me(), H = he(), U = O, W = s({ enabled: U }), G = r({ enabled: U }), K = s({
|
|
72
|
+
enabled: U,
|
|
73
|
+
permissions: [xe]
|
|
74
|
+
}), ze = c(() => new Set((K.data?.data ?? []).filter((e) => e.organizationId === h).map((e) => e.id)), [K.data?.data, h]), q = c(() => {
|
|
75
|
+
let e = G.data?.data ?? [], t = h ? ge(e, {
|
|
71
76
|
organizationId: h,
|
|
72
77
|
organizationTypes: g?.organizationTypes ?? []
|
|
73
78
|
}) : e;
|
|
74
|
-
return
|
|
79
|
+
return fe(W.data?.data ?? [], de(t), ze);
|
|
75
80
|
}, [
|
|
81
|
+
ze,
|
|
82
|
+
G.data?.data,
|
|
76
83
|
W.data?.data,
|
|
77
|
-
U.data?.data,
|
|
78
84
|
h,
|
|
79
85
|
g?.organizationTypes
|
|
80
|
-
]),
|
|
81
|
-
await
|
|
86
|
+
]), Be = W.isLoading || W.isFetchingNextPage || !!W.hasNextPage || G.isResolving || K.isLoading || K.isFetchingNextPage || !!K.hasNextPage, Ve = !Be && !W.isError && !K.isError, J = E ? B.data?.data ?? [] : [], Y = [.../* @__PURE__ */ new Set([...q.filter((e) => e.locked).map((e) => e.id), ...M])], He = g?.bankName?.trim() ?? "", Ue = g?.vspName?.trim() ?? "", We = we?.trim() || void 0, X = v && y.canWrite, Z = !B.hasNextPage && !B.isFetchingNextPage, Ge = c(() => Z ? se(J) : void 0, [J, Z]), Ke = J.length > 1 && y.canRead && Z, Q = _e(async (t, n, r) => {
|
|
87
|
+
await oe(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), z((e) => ({
|
|
82
88
|
...e,
|
|
83
89
|
[t]: n
|
|
84
90
|
})), window.setTimeout(() => {
|
|
85
|
-
|
|
91
|
+
z((e) => ({
|
|
86
92
|
...e,
|
|
87
93
|
[t]: void 0
|
|
88
94
|
}));
|
|
89
95
|
}, 2e3));
|
|
90
|
-
}, [p.copyAccountNumberToast, p.copyRoutingNumberToast]),
|
|
91
|
-
isAccountNumberVisible:
|
|
92
|
-
isAccountNumberCopied:
|
|
93
|
-
isRoutingNumberCopied:
|
|
96
|
+
}, [p.copyAccountNumberToast, p.copyRoutingNumberToast]), qe = c(() => J.map((e) => Se(e, p, {
|
|
97
|
+
isAccountNumberVisible: L[e.id] ?? !1,
|
|
98
|
+
isAccountNumberCopied: R[e.id] === "account",
|
|
99
|
+
isRoutingNumberCopied: R[e.id] === "routing",
|
|
94
100
|
onToggleAccountNumberVisibility: () => Re((t) => ({
|
|
95
101
|
...t,
|
|
96
102
|
[e.id]: !t[e.id]
|
|
97
103
|
})),
|
|
98
|
-
onCopyAccountNumber: () => void
|
|
99
|
-
onCopyRoutingNumber: () => void
|
|
104
|
+
onCopyAccountNumber: () => void Q(e.id, "account", e.accountNumber),
|
|
105
|
+
onCopyRoutingNumber: () => void Q(e.id, "routing", e.routingNumber),
|
|
100
106
|
onSelect: () => {
|
|
101
107
|
D(e.id), m(i.AccountSelected, { accountId: e.id });
|
|
102
108
|
}
|
|
103
109
|
})), [
|
|
104
110
|
J,
|
|
105
|
-
Le,
|
|
106
111
|
L,
|
|
112
|
+
R,
|
|
107
113
|
p,
|
|
108
|
-
|
|
114
|
+
Q,
|
|
109
115
|
D,
|
|
110
116
|
m
|
|
111
|
-
]),
|
|
112
|
-
|
|
117
|
+
]), Je = (t) => {
|
|
118
|
+
H.mutate({
|
|
113
119
|
path: { id: t },
|
|
114
120
|
body: { userIds: Y }
|
|
115
121
|
}, { onSuccess: () => {
|
|
116
|
-
te
|
|
122
|
+
ne(te), e.success(p.createSuccessToast), j(u), N([]), I(void 0), P(!1), k(!1);
|
|
117
123
|
} });
|
|
118
|
-
},
|
|
119
|
-
if (
|
|
124
|
+
}, Ye = () => {
|
|
125
|
+
if (X && Ve) {
|
|
120
126
|
if (A.nickname.trim() === "") {
|
|
121
127
|
P(!0);
|
|
122
128
|
return;
|
|
@@ -126,61 +132,61 @@ function f({ labels: a, featureLabels: o, isBankingTaglineVisible: f = !0, bankL
|
|
|
126
132
|
return;
|
|
127
133
|
}
|
|
128
134
|
if (F) {
|
|
129
|
-
|
|
135
|
+
Je(F);
|
|
130
136
|
return;
|
|
131
137
|
}
|
|
132
|
-
|
|
133
|
-
m(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id),
|
|
138
|
+
V.mutate({ body: { nickname: A.nickname.trim() } }, { onSuccess: (e) => {
|
|
139
|
+
m(i.AccountCreated, { accountId: e?.id }), e?.id && (I(e.id), Je(e.id));
|
|
134
140
|
} });
|
|
135
141
|
}
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
e && !
|
|
140
|
-
},
|
|
142
|
+
}, Xe = (e, t) => {
|
|
143
|
+
q.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
|
|
144
|
+
}, Ze = (e) => {
|
|
145
|
+
e && !X || (e && (j(u), N([]), I(void 0), P(!1), V.reset(), H.reset()), k(e));
|
|
146
|
+
}, $ = V.isPending || H.isPending, Qe = ue(q, {
|
|
141
147
|
selectedUserIds: M,
|
|
142
|
-
disabled:
|
|
143
|
-
fallbackTooltip:
|
|
144
|
-
onUserToggle:
|
|
148
|
+
disabled: $ || !y.canWrite,
|
|
149
|
+
fallbackTooltip: ke.teamMemberAccessTooltip,
|
|
150
|
+
onUserToggle: Xe
|
|
145
151
|
});
|
|
146
152
|
return {
|
|
147
|
-
"data-testid":
|
|
153
|
+
"data-testid": Oe,
|
|
148
154
|
selectedAccountId: T,
|
|
149
|
-
bankDisplayName:
|
|
150
|
-
bankLogoSrc:
|
|
151
|
-
bankLogoAlt:
|
|
152
|
-
availableBalanceLabel:
|
|
153
|
-
shouldDisplayAvailableBalance:
|
|
154
|
-
isBankingTaglineVisible:
|
|
155
|
-
accountCards:
|
|
155
|
+
bankDisplayName: He,
|
|
156
|
+
bankLogoSrc: f,
|
|
157
|
+
bankLogoAlt: Ce,
|
|
158
|
+
availableBalanceLabel: Ge,
|
|
159
|
+
shouldDisplayAvailableBalance: Ke,
|
|
160
|
+
isBankingTaglineVisible: o,
|
|
161
|
+
accountCards: qe,
|
|
156
162
|
shouldDisplayAddAccountCard: y.canWrite,
|
|
157
|
-
isLoading: !_ && (!v ||
|
|
158
|
-
isError: _ || E &&
|
|
163
|
+
isLoading: !_ && (!v || je && !g || E && (B.isLoading || B.isFetchingNextPage || B.hasNextPage)),
|
|
164
|
+
isError: _ || E && B.isError,
|
|
159
165
|
isCreateOpen: O,
|
|
160
166
|
createForm: A,
|
|
161
167
|
legalCopy: {
|
|
162
|
-
bankName:
|
|
163
|
-
vspName:
|
|
164
|
-
agreementUrl:
|
|
168
|
+
bankName: He,
|
|
169
|
+
vspName: Ue,
|
|
170
|
+
agreementUrl: We
|
|
165
171
|
},
|
|
166
|
-
accessRows:
|
|
167
|
-
isTeamMembersLoading:
|
|
168
|
-
isTeamMembersError:
|
|
169
|
-
isCreateSubmitDisabled: !
|
|
170
|
-
isCreateError:
|
|
171
|
-
hasNicknameError:
|
|
172
|
-
isSubmitting:
|
|
173
|
-
isCreateDisabled: !
|
|
174
|
-
onCreateOpenChange:
|
|
172
|
+
accessRows: Qe,
|
|
173
|
+
isTeamMembersLoading: Be,
|
|
174
|
+
isTeamMembersError: W.isError || K.isError,
|
|
175
|
+
isCreateSubmitDisabled: !X || !Ve || A.nickname.trim() === "" || Y.length === 0,
|
|
176
|
+
isCreateError: V.isError || H.isError,
|
|
177
|
+
hasNicknameError: Le,
|
|
178
|
+
isSubmitting: $,
|
|
179
|
+
isCreateDisabled: !X,
|
|
180
|
+
onCreateOpenChange: Ze,
|
|
175
181
|
onCreateFormChange: (e) => {
|
|
176
182
|
P(!1), j(e);
|
|
177
183
|
},
|
|
178
|
-
onCreateSubmit:
|
|
179
|
-
onAddAccountClick: () =>
|
|
184
|
+
onCreateSubmit: Ye,
|
|
185
|
+
onAddAccountClick: () => Ze(!0),
|
|
180
186
|
onSelectAccount: D
|
|
181
187
|
};
|
|
182
188
|
}
|
|
183
|
-
function
|
|
189
|
+
function Se(e, t, n) {
|
|
184
190
|
return {
|
|
185
191
|
id: e.id,
|
|
186
192
|
name: e.nickname?.trim() || t.accountFallback,
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
2
2
|
import "../../../shared/data-access/dist/index.js";
|
|
3
|
-
import "./index3.js";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
3
|
+
import { isLiveScheduledPaymentRecord as t } from "./index3.js";
|
|
4
|
+
import "./index4.js";
|
|
5
|
+
import { useApprovePayableApprovalRequestMutation as n, usePayableApprovalRequestsQuery as r, useRejectPayableApprovalRequestMutation as i } from "./index6.js";
|
|
6
|
+
import { usePayableHistoryQuery as a } from "./index7.js";
|
|
7
|
+
import { useAllPayableLineItemsQuery as o, useReplacePayableLineItemsMutation as s } from "./index8.js";
|
|
8
|
+
import { usePayablePaymentRecordsQuery as c } from "./index9.js";
|
|
9
|
+
import { useSchedulePaymentMutation as l } from "./index10.js";
|
|
10
|
+
import { useAttachPayableFileMutation as u, useCancelPayableMutation as d, useCancelScheduledPaymentMutation as f, useCreatePayableMutation as p, useDeletePayableFileMutation as m, useDeletePayableMutation as h, useForceApprovePayableMutation as g, useForceRejectPayableMutation as _, useMarkPayableAsPaidMutation as v, useReopenPayableMutation as y, useSubmitPayableForApprovalMutation as b, useUpdatePayableMutation as x, useUploadPayableFromFileMutation as S, useValidatePayableMutation as C } from "./index11.js";
|
|
11
|
+
import { usePayableOcrQueries as w } from "./index13.js";
|
|
12
|
+
import { usePayableQuery as T, usePayablesQuery as E, usePayablesTotalCountQuery as D } from "./index14.js";
|
|
13
|
+
import { usePayableSuggestionsQuery as O } from "./index15.js";
|
|
14
|
+
export { t as isLiveScheduledPaymentRecord, o as useAllPayableLineItemsQuery, n as useApprovePayableApprovalRequestMutation, u as useAttachPayableFileMutation, d as useCancelPayableMutation, f as useCancelScheduledPaymentMutation, p as useCreatePayableMutation, m as useDeletePayableFileMutation, h as useDeletePayableMutation, e as useEmbedApi, g as useForceApprovePayableMutation, _ as useForceRejectPayableMutation, v as useMarkPayableAsPaidMutation, r as usePayableApprovalRequestsQuery, a as usePayableHistoryQuery, w as usePayableOcrQueries, c as usePayablePaymentRecordsQuery, T as usePayableQuery, O as usePayableSuggestionsQuery, E as usePayablesQuery, D as usePayablesTotalCountQuery, i as useRejectPayableApprovalRequestMutation, y as useReopenPayableMutation, s as useReplacePayableLineItemsMutation, l as useSchedulePaymentMutation, b as useSubmitPayableForApprovalMutation, x as useUpdatePayableMutation, S as useUploadPayableFromFileMutation, C as useValidatePayableMutation };
|