@tesouro/embedded-components-react 0.3.43 → 0.3.44
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 +18 -2
- package/dist/experimental/index.d.ts +1 -975
- package/dist/experimental/index.js +0 -6
- package/dist/index.d.ts +1730 -1425
- package/dist/index.js +65 -61
- package/dist/lib/WidgetProvider.js +7 -7
- package/dist/lib/WidgetSuite.d.ts +2081 -0
- package/dist/lib/WidgetSuite.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +45 -45
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +118 -118
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index10.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index12.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index13.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +21 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index15.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +116 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +46 -23
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +20 -88
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +31 -34
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +12 -132
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +11 -137
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +12 -12
- package/package.json +1 -1
- package/dist/experimental/WidgetSuite.d.ts +0 -976
- package/dist/experimental/WidgetSuite.js +0 -6
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { WIDGET_SUITE_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js";
|
|
2
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as t, WidgetSuiteSectionId as n } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js";
|
|
3
|
+
import { WidgetSuite as r } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
|
|
4
|
+
import "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index.js";
|
|
5
|
+
export { t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, r as WidgetSuite, n as WidgetSuiteSectionId };
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "../../ui/dist/index.js";
|
|
9
|
-
import { resolveAcceptDisclosuresContent as i } from "./index3.js";
|
|
10
|
-
import { acceptDisclosuresWidgetTestIds as a } from "./index4.js";
|
|
11
|
-
import { useAcceptWidgetDisclosures as o } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
12
|
-
import { useDisclosuresQuery as s } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
13
|
-
import "../../data-access/dist/index.js";
|
|
14
|
-
import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
5
|
+
import { useAcceptWidgetDisclosures as e } from "../../../shared/data-access/dist/lib/disclosures/useAcceptWidgetDisclosures.js";
|
|
6
|
+
import { useDisclosuresQuery as t } from "../../../shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js";
|
|
7
|
+
import { ErrorState as n } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
15
8
|
import "../../../shared/ui/dist/index.js";
|
|
16
|
-
import { useAnalyticsTrack as
|
|
17
|
-
import { WidgetProvider as
|
|
18
|
-
import { extractApiErrorMessage as
|
|
19
|
-
import { useRefetchWidget as
|
|
9
|
+
import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
10
|
+
import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
11
|
+
import { extractApiErrorMessage as a } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
12
|
+
import { useRefetchWidget as o, useWidgetConfig as s, useWidgetInitStaleForToken as c } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
20
13
|
import "../../../shared/feature/dist/index.js";
|
|
14
|
+
import { AcceptDisclosuresWidgetAnalyticsEvent as l, WIDGET_NAME as u } from "./index2.js";
|
|
15
|
+
import { mergeAcceptDisclosuresWidgetLabels as d } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
16
|
+
import { AcceptDisclosuresWidget as f } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
17
|
+
import "../../ui/dist/index.js";
|
|
18
|
+
import { resolveAcceptDisclosuresContent as p } from "./index3.js";
|
|
19
|
+
import { acceptDisclosuresWidgetTestIds as m } from "./index4.js";
|
|
20
|
+
import "../../data-access/dist/index.js";
|
|
21
21
|
import { useCallback as h, useEffect as g, useRef as _, useState as v } from "react";
|
|
22
22
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
23
23
|
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js
|
|
@@ -30,59 +30,59 @@ function S(e, t, n) {
|
|
|
30
30
|
n.providerAttributionSuffix
|
|
31
31
|
] });
|
|
32
32
|
}
|
|
33
|
-
function C({ labels:
|
|
34
|
-
let
|
|
33
|
+
function C({ labels: e, onAccepted: i }) {
|
|
34
|
+
let o = r(), { initResponse: u } = s(), f = c(), m = d(e), { data: h, isError: _, error: v, refetch: y } = t({ userId: u?.userId ?? void 0 });
|
|
35
35
|
if (g(() => {
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
title:
|
|
39
|
-
description:
|
|
40
|
-
retryLabel:
|
|
36
|
+
o(l.Mounted);
|
|
37
|
+
}, [o]), _) return /* @__PURE__ */ b(n, {
|
|
38
|
+
title: m.loadErrorTitle,
|
|
39
|
+
description: a(v) ?? m.loadErrorFallback,
|
|
40
|
+
retryLabel: m.loadErrorRetryLabel,
|
|
41
41
|
onRetry: () => {
|
|
42
42
|
y();
|
|
43
43
|
},
|
|
44
44
|
testId: "accept-disclosures-load-error"
|
|
45
45
|
});
|
|
46
|
-
let x =
|
|
46
|
+
let x = p({
|
|
47
47
|
documents: h?.documents,
|
|
48
|
-
vspName:
|
|
49
|
-
bankName:
|
|
50
|
-
labels:
|
|
48
|
+
vspName: u?.vspName,
|
|
49
|
+
bankName: u?.bankName,
|
|
50
|
+
labels: e
|
|
51
51
|
});
|
|
52
52
|
if (!x) return null;
|
|
53
53
|
let S = h?.version ?? null;
|
|
54
|
-
if (
|
|
55
|
-
let C = `${`user:${
|
|
54
|
+
if (f) return null;
|
|
55
|
+
let C = `${`user:${u?.userId ?? ""}`}:${S}:${x.vspName}:${x.bankName}:${x.agreementText}:${x.disclosureLinks.map((e) => e.href).join("|")}`;
|
|
56
56
|
return /* @__PURE__ */ b(w, {
|
|
57
57
|
displayedVersion: S,
|
|
58
|
-
labelOverrides:
|
|
58
|
+
labelOverrides: e,
|
|
59
59
|
content: x,
|
|
60
|
-
labels:
|
|
61
|
-
onAccepted:
|
|
60
|
+
labels: m,
|
|
61
|
+
onAccepted: i,
|
|
62
62
|
onDisclosuresVersionChanged: y
|
|
63
63
|
}, C);
|
|
64
64
|
}
|
|
65
|
-
function w({ displayedVersion:
|
|
66
|
-
let [l, u] = v(!1), [
|
|
67
|
-
|
|
65
|
+
function w({ displayedVersion: t, labelOverrides: n, content: r, labels: i, onAccepted: s, onDisclosuresVersionChanged: c }) {
|
|
66
|
+
let [l, u] = v(!1), [d, p] = v(), [g, y] = v(!1), [x, C] = v(!1), w = _(!1), { mutateAsync: T } = e(), E = o(), D = h((e) => {
|
|
67
|
+
p(void 0), u(e);
|
|
68
68
|
}, []), O = h(async () => {
|
|
69
69
|
if (!(!l || g || x)) {
|
|
70
|
-
|
|
70
|
+
p(void 0), y(!0);
|
|
71
71
|
try {
|
|
72
72
|
if (!w.current) try {
|
|
73
|
-
await T({ displayedVersion:
|
|
73
|
+
await T({ displayedVersion: t }), w.current = !0;
|
|
74
74
|
} catch (e) {
|
|
75
75
|
if (e instanceof Error && e.name === "DisclosuresVersionChangedError") {
|
|
76
|
-
|
|
76
|
+
p(i.disclosuresUpdatedFallback), c();
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
p(a(e) ?? i.acceptErrorFallback);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
try {
|
|
83
83
|
await s?.();
|
|
84
84
|
} catch (e) {
|
|
85
|
-
|
|
85
|
+
p(a(e) ?? i.acceptErrorFallback);
|
|
86
86
|
return;
|
|
87
87
|
}
|
|
88
88
|
E(), C(!0);
|
|
@@ -92,7 +92,7 @@ function w({ displayedVersion: e, labelOverrides: t, content: n, labels: i, onAc
|
|
|
92
92
|
}
|
|
93
93
|
}, [
|
|
94
94
|
T,
|
|
95
|
-
|
|
95
|
+
t,
|
|
96
96
|
x,
|
|
97
97
|
l,
|
|
98
98
|
g,
|
|
@@ -102,15 +102,15 @@ function w({ displayedVersion: e, labelOverrides: t, content: n, labels: i, onAc
|
|
|
102
102
|
c,
|
|
103
103
|
E
|
|
104
104
|
]);
|
|
105
|
-
return /* @__PURE__ */ b(
|
|
105
|
+
return /* @__PURE__ */ b(f, {
|
|
106
106
|
labels: {
|
|
107
|
-
...
|
|
108
|
-
title:
|
|
109
|
-
agreementCheckboxAriaLabel:
|
|
107
|
+
...n,
|
|
108
|
+
title: r.title,
|
|
109
|
+
agreementCheckboxAriaLabel: r.agreementCheckboxAriaLabel
|
|
110
110
|
},
|
|
111
|
-
providerAttribution: S(
|
|
112
|
-
agreementText:
|
|
113
|
-
disclosureLinks:
|
|
111
|
+
providerAttribution: S(r.vspName, r.bankName, i),
|
|
112
|
+
agreementText: r.agreementText,
|
|
113
|
+
disclosureLinks: r.disclosureLinks,
|
|
114
114
|
isAgreed: l,
|
|
115
115
|
onAgreedChange: D,
|
|
116
116
|
onAccept: () => {
|
|
@@ -118,25 +118,25 @@ function w({ displayedVersion: e, labelOverrides: t, content: n, labels: i, onAc
|
|
|
118
118
|
},
|
|
119
119
|
isSubmitting: g,
|
|
120
120
|
isAccepted: x,
|
|
121
|
-
errorMessage:
|
|
121
|
+
errorMessage: d,
|
|
122
122
|
testIds: {
|
|
123
|
-
root:
|
|
124
|
-
providerAttribution:
|
|
125
|
-
disclosureLinks:
|
|
126
|
-
agreeCheckbox:
|
|
127
|
-
agreementText:
|
|
128
|
-
acceptButton:
|
|
129
|
-
error:
|
|
123
|
+
root: m.root,
|
|
124
|
+
providerAttribution: m.providerAttribution,
|
|
125
|
+
disclosureLinks: m.disclosureLinks,
|
|
126
|
+
agreeCheckbox: m.agreeCheckbox,
|
|
127
|
+
agreementText: m.agreementText,
|
|
128
|
+
acceptButton: m.acceptButton,
|
|
129
|
+
error: m.error
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
function T({ baseUrl: e, widgetToken:
|
|
134
|
-
return /* @__PURE__ */ b(
|
|
135
|
-
widgetName:
|
|
133
|
+
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
134
|
+
return /* @__PURE__ */ b(i, {
|
|
135
|
+
widgetName: u,
|
|
136
136
|
baseUrl: e,
|
|
137
|
-
widgetToken:
|
|
138
|
-
organizationId:
|
|
139
|
-
configClient:
|
|
137
|
+
widgetToken: t,
|
|
138
|
+
organizationId: n,
|
|
139
|
+
configClient: r,
|
|
140
140
|
gatewayRouting: a,
|
|
141
141
|
linkComponent: o,
|
|
142
142
|
implementation: s,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Button as e, Checkbox as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeAcceptDisclosuresWidgetLabels as n } from "./labels.js";
|
|
3
3
|
import { useId as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js
|
|
6
6
|
function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgreed: l, onAgreedChange: u, onAccept: d, isSubmitting: f = !1, isAccepted: p = !1, errorMessage: m, labels: h, testIds: g }) {
|
|
7
|
-
let _ = f || p, v =
|
|
7
|
+
let _ = f || p, v = n(h), y = r(), b = `${y}-agree`, x = `${y}-agree-description`, S = `${y}-accept-error`;
|
|
8
8
|
return /* @__PURE__ */ a("div", {
|
|
9
9
|
"data-testid": g?.root,
|
|
10
10
|
className: "ttw:block ttw:w-full ttw:rounded-lg ttw:border ttw:border-border ttw:bg-background ttw:p-6",
|
|
@@ -34,7 +34,7 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
|
|
|
34
34
|
}) : null,
|
|
35
35
|
/* @__PURE__ */ a("div", {
|
|
36
36
|
className: "ttw:mb-4 ttw:flex ttw:items-start ttw:gap-3",
|
|
37
|
-
children: [/* @__PURE__ */ i(
|
|
37
|
+
children: [/* @__PURE__ */ i(t, {
|
|
38
38
|
id: b,
|
|
39
39
|
"data-testid": g?.agreeCheckbox,
|
|
40
40
|
checked: l,
|
|
@@ -50,7 +50,7 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
|
|
|
50
50
|
children: s
|
|
51
51
|
})]
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */ i(
|
|
53
|
+
/* @__PURE__ */ i(e, {
|
|
54
54
|
type: "button",
|
|
55
55
|
"data-testid": g?.acceptButton,
|
|
56
56
|
disabled: !l || _,
|
|
@@ -70,4 +70,4 @@ function o({ providerAttribution: o, agreementText: s, disclosureLinks: c, isAgr
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
|
-
export { o as AcceptDisclosuresWidget,
|
|
73
|
+
export { o as AcceptDisclosuresWidget, n as mergeAcceptDisclosuresWidgetLabels };
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js
CHANGED
|
@@ -7,18 +7,18 @@ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
|
7
7
|
import { useAllBankAccountsQuery as n } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
8
8
|
import { useAllOrganizationRolesQuery as r } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import "../../../shared/ui/dist/index.js";
|
|
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";
|
|
14
|
-
import "../../../shared/feature/dist/index.js";
|
|
15
10
|
import { BankAccountsWidgetAnalyticsEvent as i } from "./index2.js";
|
|
16
|
-
import { copyTextToClipboard as
|
|
17
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
18
|
-
import { getBankAccountsPermissions as
|
|
19
|
-
import { toAccessRows as
|
|
20
|
-
import { DEFAULT_LABELS as
|
|
11
|
+
import { copyTextToClipboard as ee, formatAmountLabel as a, formatTotalAvailableBalanceLabel as te, maskAccountNumber as o } from "./index3.js";
|
|
12
|
+
import { DEFAULT_FEATURE_LABELS as ne } from "./index4.js";
|
|
13
|
+
import { getBankAccountsPermissions as re } from "./index5.js";
|
|
14
|
+
import { toAccessRows as ie, toOrganizationRoleOptions as ae, toTeamMembers as oe } from "./index6.js";
|
|
15
|
+
import { DEFAULT_LABELS as se } from "../../ui/dist/lib/labels.js";
|
|
16
|
+
import "../../../shared/ui/dist/index.js";
|
|
21
17
|
import "../../ui/dist/index.js";
|
|
18
|
+
import { useAnalyticsTrack as ce } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
19
|
+
import { TESOURO_NEW_EMBEDDED_BANK_ACCOUNT_CREATED_SUCCESS_EVENT as le, emitWidgetDomEvent as ue } from "../../../shared/util/dist/lib/widgetDomEvents.js";
|
|
20
|
+
import { useWidgetConfig as de, useWidgetError as fe, useWidgetLoading as pe } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
21
|
+
import "../../../shared/feature/dist/index.js";
|
|
22
22
|
import { useCreateBankAccountMutation as me } from "../../data-access/dist/index3.js";
|
|
23
23
|
import { useGrantBankAccountAccessMutation as he } from "../../data-access/dist/index4.js";
|
|
24
24
|
import { useAllOrganizationUsersQuery as s } from "../../data-access/dist/index5.js";
|
|
@@ -33,12 +33,12 @@ function d(e, t) {
|
|
|
33
33
|
}
|
|
34
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
35
|
let ke = {
|
|
36
|
-
...
|
|
36
|
+
...se,
|
|
37
37
|
...t
|
|
38
38
|
}, p = {
|
|
39
|
-
...
|
|
39
|
+
...ne,
|
|
40
40
|
...a
|
|
41
|
-
}, m =
|
|
41
|
+
}, m = ce(), { organizationId: h, widgetToken: Ae, initResponse: g } = de(), je = pe(), _ = !!fe(), v = !!(h && Ae), y = c(() => re(g?.scopes), [g?.scopes]), Me = v && y.canRead && !!g, b = g?.userId ?? void 0, [x, Ne] = l(h);
|
|
42
42
|
h !== void 0 && h !== x && Ne(h);
|
|
43
43
|
let [S, Pe] = l(b);
|
|
44
44
|
b !== void 0 && b !== S && Pe(b);
|
|
@@ -76,15 +76,15 @@ function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankL
|
|
|
76
76
|
organizationId: h,
|
|
77
77
|
organizationTypes: g?.organizationTypes ?? []
|
|
78
78
|
}) : e;
|
|
79
|
-
return
|
|
79
|
+
return oe(W.data?.data ?? [], ae(t), ze);
|
|
80
80
|
}, [
|
|
81
81
|
ze,
|
|
82
82
|
G.data?.data,
|
|
83
83
|
W.data?.data,
|
|
84
84
|
h,
|
|
85
85
|
g?.organizationTypes
|
|
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 ?
|
|
87
|
-
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 ? te(J) : void 0, [J, Z]), Ke = J.length > 1 && y.canRead && Z, Q = _e(async (t, n, r) => {
|
|
87
|
+
await ee(r) && (e.success(n === "account" ? p.copyAccountNumberToast : p.copyRoutingNumberToast), z((e) => ({
|
|
88
88
|
...e,
|
|
89
89
|
[t]: n
|
|
90
90
|
})), window.setTimeout(() => {
|
|
@@ -119,7 +119,7 @@ function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankL
|
|
|
119
119
|
path: { id: t },
|
|
120
120
|
body: { userIds: Y }
|
|
121
121
|
}, { onSuccess: () => {
|
|
122
|
-
|
|
122
|
+
ue(le), e.success(p.createSuccessToast), j(u), N([]), I(void 0), P(!1), k(!1);
|
|
123
123
|
} });
|
|
124
124
|
}, Ye = () => {
|
|
125
125
|
if (X && Ve) {
|
|
@@ -143,7 +143,7 @@ function f({ labels: t, featureLabels: a, isBankingTaglineVisible: o = !0, bankL
|
|
|
143
143
|
q.find((t) => t.id === e)?.locked || N((n) => t ? [.../* @__PURE__ */ new Set([...n, e])] : n.filter((t) => t !== e));
|
|
144
144
|
}, Ze = (e) => {
|
|
145
145
|
e && !X || (e && (j(u), N([]), I(void 0), P(!1), V.reset(), H.reset()), k(e));
|
|
146
|
-
}, $ = V.isPending || H.isPending, Qe =
|
|
146
|
+
}, $ = V.isPending || H.isPending, Qe = ie(q, {
|
|
147
147
|
selectedUserIds: M,
|
|
148
148
|
disabled: $ || !y.canWrite,
|
|
149
149
|
fallbackTooltip: ke.teamMemberAccessTooltip,
|
package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { WIDGET_NAME as e } from "./index2.js";
|
|
6
|
+
import { EmbeddedToaster as t } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
6
7
|
import "../../../shared/ui/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import "../../../shared/feature/dist/index.js";
|
|
9
|
-
import { WIDGET_NAME as n } from "./index2.js";
|
|
10
|
-
import { BankAccountsWidgetUi as r } from "../../ui/dist/lib/BankAccountsWidgetUi.js";
|
|
8
|
+
import { BankAccountsWidgetUi as n } from "../../ui/dist/lib/BankAccountsWidgetUi.js";
|
|
11
9
|
import "../../ui/dist/index.js";
|
|
10
|
+
import { WidgetProvider as r } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
12
|
import { useBankAccountsWidget as i } from "./index7.js";
|
|
13
13
|
import { AccountDetailsWidget as a } from "../../account-details/feature/dist/index8.js";
|
|
14
14
|
import "../../account-details/feature/dist/index.js";
|
|
15
15
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js
|
|
17
|
-
function l({ labels:
|
|
17
|
+
function l({ labels: e, accountDetailsLabels: r, featureLabels: l, isBankingTaglineVisible: u, bankLogoSrc: d, bankLogoAlt: f, depositAgreementUrl: p, bankAddress: m, supportTeamUrl: h, "data-testid": g, selectedAccountId: _, defaultSelectedAccountId: v, onSelectedAccountIdChange: y }) {
|
|
18
18
|
let b = i({
|
|
19
|
-
labels:
|
|
19
|
+
labels: e,
|
|
20
20
|
featureLabels: l,
|
|
21
21
|
isBankingTaglineVisible: u,
|
|
22
22
|
bankLogoSrc: d,
|
|
@@ -27,9 +27,9 @@ function l({ labels: t, accountDetailsLabels: n, featureLabels: l, isBankingTagl
|
|
|
27
27
|
defaultSelectedAccountId: v,
|
|
28
28
|
onSelectedAccountIdChange: y
|
|
29
29
|
});
|
|
30
|
-
if (b.selectedAccountId) return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(
|
|
30
|
+
if (b.selectedAccountId) return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ s(a, {
|
|
31
31
|
accountId: b.selectedAccountId,
|
|
32
|
-
labels:
|
|
32
|
+
labels: r,
|
|
33
33
|
featureLabels: l,
|
|
34
34
|
isBankingTaglineVisible: b.isBankingTaglineVisible,
|
|
35
35
|
bankLogoSrc: b.bankLogoSrc,
|
|
@@ -39,17 +39,17 @@ function l({ labels: t, accountDetailsLabels: n, featureLabels: l, isBankingTagl
|
|
|
39
39
|
onBack: () => b.onSelectAccount(null)
|
|
40
40
|
}, b.selectedAccountId)] });
|
|
41
41
|
let { selectedAccountId: x, onSelectAccount: S, ...C } = b;
|
|
42
|
-
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(
|
|
43
|
-
labels:
|
|
42
|
+
return /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(t, {}), /* @__PURE__ */ s(n, {
|
|
43
|
+
labels: e,
|
|
44
44
|
accountCardTestId: "bank-accounts-widget-account-card",
|
|
45
45
|
...C
|
|
46
46
|
})] });
|
|
47
47
|
}
|
|
48
|
-
function u({ baseUrl:
|
|
49
|
-
return /* @__PURE__ */ s(
|
|
50
|
-
widgetName:
|
|
51
|
-
baseUrl:
|
|
52
|
-
widgetToken:
|
|
48
|
+
function u({ baseUrl: t, widgetToken: n, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: c, implementation: u, uiFramework: d, errorFallback: f, onError: p, analytics: m, disclosuresAcceptance: h, providerLabels: g, ..._ }) {
|
|
49
|
+
return /* @__PURE__ */ s(r, {
|
|
50
|
+
widgetName: e,
|
|
51
|
+
baseUrl: t,
|
|
52
|
+
widgetToken: n,
|
|
53
53
|
organizationId: i,
|
|
54
54
|
configClient: a,
|
|
55
55
|
gatewayRouting: o,
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { DEFAULT_LABELS as e } from "./labels.js";
|
|
6
|
+
import { AccountCard as t, AddAccountCard as n } from "./AccountCard.js";
|
|
7
|
+
import { AccountCardSkeleton as r, BankingHeader as i } from "./BankingHeader.js";
|
|
8
|
+
import { InlineErrorAlert as a } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
6
9
|
import "../../../../shared/ui/dist/index.js";
|
|
7
|
-
import { DEFAULT_LABELS as t } from "./labels.js";
|
|
8
|
-
import { AccountCard as n, AddAccountCard as r } from "./AccountCard.js";
|
|
9
|
-
import { AccountCardSkeleton as i, BankingHeader as a } from "./BankingHeader.js";
|
|
10
10
|
import { CreateAccountDialog as o } from "./CreateAccountDialog.js";
|
|
11
11
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js
|
|
13
13
|
function u({ labels: u, "data-testid": d, bankDisplayName: f, bankLogoSrc: p, bankLogoAlt: m, availableBalanceLabel: h, shouldDisplayAvailableBalance: g, isBankingTaglineVisible: _, accountCards: v, accountCardTestId: y, shouldDisplayAddAccountCard: b, isLoading: x, isError: S, isCreateOpen: C, createForm: w, legalCopy: T, accessRows: E, isTeamMembersLoading: D, isTeamMembersError: O, isCreateSubmitDisabled: k, isCreateError: A, hasNicknameError: j, isSubmitting: M, isCreateDisabled: N, onCreateOpenChange: P, onCreateFormChange: F, onCreateSubmit: I, onAddAccountClick: L }) {
|
|
14
14
|
let R = {
|
|
15
|
-
...
|
|
15
|
+
...e,
|
|
16
16
|
...u
|
|
17
17
|
};
|
|
18
18
|
return /* @__PURE__ */ l("section", {
|
|
@@ -35,7 +35,7 @@ function u({ labels: u, "data-testid": d, bankDisplayName: f, bankLogoSrc: p, ba
|
|
|
35
35
|
onFormChange: F,
|
|
36
36
|
onSubmit: I
|
|
37
37
|
}),
|
|
38
|
-
/* @__PURE__ */ c(
|
|
38
|
+
/* @__PURE__ */ c(i, {
|
|
39
39
|
labels: R,
|
|
40
40
|
bankDisplayName: f,
|
|
41
41
|
bankLogoSrc: p,
|
|
@@ -44,24 +44,24 @@ function u({ labels: u, "data-testid": d, bankDisplayName: f, bankLogoSrc: p, ba
|
|
|
44
44
|
shouldDisplayAvailableBalance: g,
|
|
45
45
|
isBankingTaglineVisible: _
|
|
46
46
|
}),
|
|
47
|
-
S ? /* @__PURE__ */ c(
|
|
47
|
+
S ? /* @__PURE__ */ c(a, {
|
|
48
48
|
className: "ttw:mb-4",
|
|
49
49
|
children: R.errorTitle
|
|
50
50
|
}) : null,
|
|
51
51
|
/* @__PURE__ */ l("div", {
|
|
52
52
|
className: "ttw:flex ttw:flex-wrap ttw:gap-6",
|
|
53
53
|
children: [
|
|
54
|
-
x ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(
|
|
54
|
+
x ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(r, {}), /* @__PURE__ */ c(r, {})] }) : null,
|
|
55
55
|
!x && v.length === 0 && !b ? /* @__PURE__ */ c("p", {
|
|
56
56
|
className: "ttw:font-medium",
|
|
57
57
|
children: R.emptyAccountsLabel
|
|
58
58
|
}) : null,
|
|
59
|
-
x ? null : v.map((e) => /* @__PURE__ */ c(
|
|
59
|
+
x ? null : v.map((e) => /* @__PURE__ */ c(t, {
|
|
60
60
|
labels: R,
|
|
61
61
|
card: e,
|
|
62
62
|
testId: y
|
|
63
63
|
}, e.id)),
|
|
64
|
-
!x && b ? /* @__PURE__ */ c(
|
|
64
|
+
!x && b ? /* @__PURE__ */ c(n, {
|
|
65
65
|
labels: R,
|
|
66
66
|
disabled: N,
|
|
67
67
|
onClick: L
|
|
@@ -13,104 +13,104 @@ import { TemplateSettings as a } from "../../../monite-sdk/dist/index613.js";
|
|
|
13
13
|
import "../../../monite-sdk/dist/index.js";
|
|
14
14
|
import { MoniteRegionProvider as o } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
|
|
15
15
|
import "../../../shared/monite-wrapper/feature/dist/index.js";
|
|
16
|
-
import {
|
|
17
|
-
import "
|
|
18
|
-
import {
|
|
19
|
-
import "
|
|
20
|
-
import {
|
|
21
|
-
import "../../../profile-widget/feature/dist/index.js";
|
|
22
|
-
import { DEFAULT_FEATURE_LABELS as u } from "./index3.js";
|
|
23
|
-
import { SettingsSection as d, mergeAdditionalSections as f } from "./index4.js";
|
|
24
|
-
import { SettingsWidgetAnalyticsEvent as p, WIDGET_NAME as m } from "./index2.js";
|
|
25
|
-
import { ExpenseSettingsTabs as h } from "./index5.js";
|
|
26
|
-
import { TagsWidget as g } from "../../../tags-widget/feature/dist/index11.js";
|
|
16
|
+
import { DEFAULT_FEATURE_LABELS as s } from "./index3.js";
|
|
17
|
+
import { SettingsSection as c, mergeAdditionalSections as l } from "./index4.js";
|
|
18
|
+
import { SettingsWidgetAnalyticsEvent as u, WIDGET_NAME as d } from "./index2.js";
|
|
19
|
+
import { ExpenseSettingsTabs as f } from "./index5.js";
|
|
20
|
+
import { TagsWidget as p } from "../../../tags-widget/feature/dist/index11.js";
|
|
27
21
|
import "../../../tags-widget/feature/dist/index.js";
|
|
28
|
-
import { TeamWidget as
|
|
22
|
+
import { TeamWidget as m } from "../../../team-widget/feature/dist/index17.js";
|
|
29
23
|
import "../../../team-widget/feature/dist/index.js";
|
|
30
|
-
import { SettingsWidgetUi as
|
|
24
|
+
import { SettingsWidgetUi as h } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
|
|
31
25
|
import "../../ui/dist/index.js";
|
|
26
|
+
import { ChartOfAccountsWidget as g } from "../../../gl-code-table-widget/feature/dist/index8.js";
|
|
27
|
+
import "../../../gl-code-table-widget/feature/dist/index.js";
|
|
28
|
+
import { HelpWidget as _ } from "../../../help-widget/feature/dist/index3.js";
|
|
29
|
+
import "../../../help-widget/feature/dist/index.js";
|
|
30
|
+
import { ProfileWidget as v } from "../../../profile-widget/feature/dist/index4.js";
|
|
31
|
+
import "../../../profile-widget/feature/dist/index.js";
|
|
32
32
|
import { useEffect as y } from "react";
|
|
33
33
|
import { jsx as b } from "react/jsx-runtime";
|
|
34
34
|
import { useControllableState as x } from "@radix-ui/react-use-controllable-state";
|
|
35
35
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js
|
|
36
36
|
var S = {
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
37
|
+
[c.Profile]: [],
|
|
38
|
+
[c.Team]: [t.UserReadOrg],
|
|
39
|
+
[c.Invoice]: [t.OrganizationSettingsWriteOrg],
|
|
40
|
+
[c.BillPay]: [t.ApprovalPolicyWriteOrg, t.PayableWriteOrg],
|
|
41
|
+
[c.Accounting]: [t.AccountingConfigReadOrg],
|
|
42
|
+
[c.Tags]: [t.AccountingConfigReadOrg],
|
|
43
|
+
[c.Expense]: [t.ApprovalPolicyWriteOrg, t.ExpenseWriteOrg],
|
|
44
|
+
[c.Help]: []
|
|
45
45
|
};
|
|
46
|
-
function C({ labels: t, featureLabels: o, acceptInviteRedirectUri:
|
|
46
|
+
function C({ labels: t, featureLabels: o, acceptInviteRedirectUri: d, helpContactUrl: C, profileContactUrl: w, selectedSection: T, defaultSelectedSection: E, onSelectedSectionChange: D, additionalSections: O, profileContent: k, teamContent: A, billPayContent: j, helpContent: M, expenseContent: N, accountingContent: P, tagsContent: F, invoiceContent: I }) {
|
|
47
47
|
let L = {
|
|
48
|
-
...
|
|
48
|
+
...s,
|
|
49
49
|
...o
|
|
50
50
|
}, R = n();
|
|
51
51
|
y(() => {
|
|
52
|
-
R(
|
|
52
|
+
R(u.Mounted);
|
|
53
53
|
}, [R]);
|
|
54
54
|
let { initResponse: z } = r(), B = z?.scopes, V = [
|
|
55
55
|
{
|
|
56
|
-
id:
|
|
56
|
+
id: c.Profile,
|
|
57
57
|
label: L.profileSection,
|
|
58
|
-
content: k ?? /* @__PURE__ */ b(
|
|
58
|
+
content: k ?? /* @__PURE__ */ b(v, { contactUrl: w })
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
id:
|
|
61
|
+
id: c.Team,
|
|
62
62
|
label: L.teamSection,
|
|
63
|
-
content: A ?? /* @__PURE__ */ b(
|
|
63
|
+
content: A ?? /* @__PURE__ */ b(m, { acceptInviteRedirectUri: d })
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
|
-
id:
|
|
66
|
+
id: c.Invoice,
|
|
67
67
|
label: L.invoiceSection,
|
|
68
68
|
content: I ?? /* @__PURE__ */ b(a, {})
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
|
-
id:
|
|
71
|
+
id: c.Expense,
|
|
72
72
|
label: L.expenseSection,
|
|
73
|
-
content: N ?? /* @__PURE__ */ b(
|
|
73
|
+
content: N ?? /* @__PURE__ */ b(f, {
|
|
74
74
|
approvalsLabel: L.expenseApprovalsTab,
|
|
75
75
|
requirementsLabel: L.expenseRequirementsTab
|
|
76
76
|
})
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
-
id:
|
|
79
|
+
id: c.BillPay,
|
|
80
80
|
label: L.billPaySection,
|
|
81
81
|
content: j ?? /* @__PURE__ */ b(i, {})
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
id:
|
|
84
|
+
id: c.Accounting,
|
|
85
85
|
label: L.accountingSection,
|
|
86
|
-
content: P ?? /* @__PURE__ */ b(
|
|
86
|
+
content: P ?? /* @__PURE__ */ b(g, {})
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
|
-
id:
|
|
89
|
+
id: c.Tags,
|
|
90
90
|
label: L.tagsSection,
|
|
91
|
-
content: F ?? /* @__PURE__ */ b(
|
|
91
|
+
content: F ?? /* @__PURE__ */ b(p, {})
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
id:
|
|
94
|
+
id: c.Help,
|
|
95
95
|
label: L.helpSection,
|
|
96
|
-
content: M ?? /* @__PURE__ */ b(
|
|
96
|
+
content: M ?? /* @__PURE__ */ b(_, { contactUrl: C })
|
|
97
97
|
}
|
|
98
|
-
], H =
|
|
98
|
+
], H = l(V.filter((t) => S[t.id].every((t) => e(B, [t]))), O ?? []), U = H[0]?.id ?? "", [W, G] = x({
|
|
99
99
|
prop: T,
|
|
100
100
|
defaultProp: E ?? U,
|
|
101
101
|
onChange: D,
|
|
102
102
|
caller: "SettingsWidget"
|
|
103
103
|
}), K = H.some((e) => e.id === W) ? W : U;
|
|
104
|
-
return /* @__PURE__ */ b(
|
|
104
|
+
return /* @__PURE__ */ b(h, {
|
|
105
105
|
labels: t,
|
|
106
106
|
sections: H,
|
|
107
107
|
selectedSectionId: K,
|
|
108
108
|
onSectionChange: G
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors:
|
|
111
|
+
function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: s, uiFramework: c, errorFallback: l, onError: u, finopsThemeColors: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
|
|
112
112
|
return /* @__PURE__ */ b(o, {
|
|
113
|
-
widgetName:
|
|
113
|
+
widgetName: d,
|
|
114
114
|
baseUrl: e,
|
|
115
115
|
widgetToken: t,
|
|
116
116
|
organizationId: n,
|
|
@@ -121,9 +121,9 @@ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
121
121
|
uiFramework: c,
|
|
122
122
|
errorFallback: l,
|
|
123
123
|
onError: u,
|
|
124
|
-
finopsThemeColors:
|
|
125
|
-
analytics:
|
|
126
|
-
disclosuresAcceptance:
|
|
124
|
+
finopsThemeColors: f,
|
|
125
|
+
analytics: p,
|
|
126
|
+
disclosuresAcceptance: m,
|
|
127
127
|
providerLabels: h,
|
|
128
128
|
children: /* @__PURE__ */ b(C, { ...g })
|
|
129
129
|
});
|