@tesouro/embedded-components-react 0.2.264 → 0.2.266
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 +8 -6
- package/dist/experimental/WidgetSuite.d.ts +93 -2
- package/dist/experimental/WidgetSuite.js +5 -5
- package/dist/experimental/index.d.ts +93 -2
- package/dist/experimental/index.js +5 -5
- package/dist/index.d.ts +29 -9
- package/dist/index.js +1 -1
- package/dist/lib/AcceptDisclosuresWidget.d.ts +17 -5
- package/dist/lib/AcceptDisclosuresWidget.js +1 -1
- package/dist/lib/WidgetProvider.d.ts +12 -4
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/data-access/dist/index2.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +36 -34
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/{index3.js → lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/{index2.js → lib/AcceptDisclosuresWidget/labels.js} +1 -1
- 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 +5 -5
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js +4 -15
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +26 -91
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +87 -74
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +142 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index3.js +49 -33
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { AcceptDisclosuresWidgetAnalyticsEvent as e, WIDGET_NAME as t } from "./index2.js";
|
|
6
|
-
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as n } from "../../ui/dist/
|
|
7
|
-
import { AcceptDisclosuresWidget as r } from "../../ui/dist/
|
|
6
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as n } from "../../ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
7
|
+
import { AcceptDisclosuresWidget as r } from "../../ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
8
8
|
import "../../ui/dist/index.js";
|
|
9
9
|
import { resolveAcceptDisclosuresContent as i } from "./index3.js";
|
|
10
10
|
import { useAcceptWidgetDisclosures as a } from "../../data-access/dist/index2.js";
|
|
@@ -12,12 +12,12 @@ import "../../data-access/dist/index.js";
|
|
|
12
12
|
import { useAnalyticsTrack as o } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
13
13
|
import { WidgetProvider as s } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
14
14
|
import { extractApiErrorMessage as c } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
15
|
-
import { useRefetchWidget as l, useWidgetConfig as u } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
15
|
+
import { useRefetchWidget as l, useWidgetConfig as u, useWidgetInitStaleForToken as d } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
16
16
|
import "../../../shared/feature/dist/index.js";
|
|
17
|
-
import { useCallback as
|
|
18
|
-
import { Fragment as
|
|
17
|
+
import { useCallback as f, useEffect as p, useRef as m, useState as h } from "react";
|
|
18
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
19
19
|
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js
|
|
20
|
-
function
|
|
20
|
+
function y(e) {
|
|
21
21
|
return {
|
|
22
22
|
...n,
|
|
23
23
|
...e,
|
|
@@ -27,43 +27,45 @@ function v(e) {
|
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
return /* @__PURE__ */
|
|
30
|
+
function b(e, t, n) {
|
|
31
|
+
return /* @__PURE__ */ v(g, { children: [
|
|
32
32
|
n.providerAttributionPrefix,
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ _("strong", { children: e }),
|
|
34
34
|
n.providerAttributionMiddle,
|
|
35
35
|
t,
|
|
36
36
|
n.providerAttributionSuffix
|
|
37
37
|
] });
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
let c = o(), { initResponse: l } = u(), d =
|
|
41
|
-
|
|
39
|
+
function x({ invitationToken: t, userId: n, disclosureLinks: r, labels: a, onAccepted: s }) {
|
|
40
|
+
let c = o(), { initResponse: l } = u(), f = d(), m = y(a);
|
|
41
|
+
p(() => {
|
|
42
42
|
c(e.Mounted);
|
|
43
43
|
}, [c]);
|
|
44
|
-
let
|
|
44
|
+
let h = i({
|
|
45
45
|
disclosureLinks: r,
|
|
46
46
|
vspName: l?.vspName,
|
|
47
47
|
bankName: l?.bankName,
|
|
48
48
|
labels: a
|
|
49
49
|
});
|
|
50
|
-
if (!
|
|
51
|
-
let
|
|
52
|
-
|
|
50
|
+
if (!h) return null;
|
|
51
|
+
let g = !!(t && n);
|
|
52
|
+
if (!g && f) return null;
|
|
53
|
+
let v = `${g ? `invite:${t}:${n}` : `user:${l?.userId ?? ""}`}:${h.vspName}:${h.bankName}:${h.agreementText}:${h.disclosureLinks.map((e) => e.href).join("|")}`;
|
|
54
|
+
return /* @__PURE__ */ _(S, {
|
|
53
55
|
invitationToken: t,
|
|
54
56
|
userId: n,
|
|
55
57
|
labelOverrides: a,
|
|
56
|
-
content:
|
|
57
|
-
labels:
|
|
58
|
+
content: h,
|
|
59
|
+
labels: m,
|
|
58
60
|
onAccepted: s
|
|
59
|
-
},
|
|
61
|
+
}, v);
|
|
60
62
|
}
|
|
61
|
-
function
|
|
62
|
-
let [u,
|
|
63
|
-
|
|
64
|
-
}, []), D =
|
|
63
|
+
function S({ invitationToken: e, userId: t, labelOverrides: n, content: i, labels: o, onAccepted: s }) {
|
|
64
|
+
let [u, d] = h(!1), [p, g] = h(), [v, y] = h(!1), [x, S] = h(!1), C = m(!1), { mutateAsync: w } = a(), T = l(), E = f((e) => {
|
|
65
|
+
g(void 0), d(e);
|
|
66
|
+
}, []), D = f(async () => {
|
|
65
67
|
if (!(!u || v || x)) {
|
|
66
|
-
|
|
68
|
+
g(void 0), y(!0);
|
|
67
69
|
try {
|
|
68
70
|
if (!C.current) try {
|
|
69
71
|
await w({
|
|
@@ -71,18 +73,18 @@ function x({ invitationToken: e, userId: t, labelOverrides: n, content: i, label
|
|
|
71
73
|
userId: t
|
|
72
74
|
}), C.current = !0;
|
|
73
75
|
} catch (e) {
|
|
74
|
-
|
|
76
|
+
g(c(e) ?? o.acceptErrorFallback);
|
|
75
77
|
return;
|
|
76
78
|
}
|
|
77
79
|
try {
|
|
78
80
|
await s?.();
|
|
79
81
|
} catch (e) {
|
|
80
|
-
|
|
82
|
+
g(c(e) ?? o.acceptErrorFallback);
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
T(), S(!0);
|
|
84
86
|
} finally {
|
|
85
|
-
|
|
87
|
+
y(!1);
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
}, [
|
|
@@ -96,9 +98,9 @@ function x({ invitationToken: e, userId: t, labelOverrides: n, content: i, label
|
|
|
96
98
|
T,
|
|
97
99
|
t
|
|
98
100
|
]);
|
|
99
|
-
return /* @__PURE__ */
|
|
101
|
+
return /* @__PURE__ */ _(r, {
|
|
100
102
|
labels: n,
|
|
101
|
-
providerAttribution:
|
|
103
|
+
providerAttribution: b(i.vspName, i.bankName, o),
|
|
102
104
|
agreementText: i.agreementText,
|
|
103
105
|
disclosureLinks: i.disclosureLinks,
|
|
104
106
|
isAgreed: u,
|
|
@@ -108,11 +110,11 @@ function x({ invitationToken: e, userId: t, labelOverrides: n, content: i, label
|
|
|
108
110
|
},
|
|
109
111
|
isSubmitting: v,
|
|
110
112
|
isAccepted: x,
|
|
111
|
-
errorMessage:
|
|
113
|
+
errorMessage: p
|
|
112
114
|
});
|
|
113
115
|
}
|
|
114
|
-
function
|
|
115
|
-
return /* @__PURE__ */
|
|
116
|
+
function C({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, linkComponent: a, implementation: o, uiFramework: c, errorFallback: l, onError: u, analytics: d, ...f }) {
|
|
117
|
+
return /* @__PURE__ */ _(s, {
|
|
116
118
|
widgetName: t,
|
|
117
119
|
baseUrl: e,
|
|
118
120
|
widgetToken: n,
|
|
@@ -124,8 +126,8 @@ function S({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, lin
|
|
|
124
126
|
errorFallback: l,
|
|
125
127
|
onError: u,
|
|
126
128
|
analytics: d,
|
|
127
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ _(x, { ...f })
|
|
128
130
|
});
|
|
129
131
|
}
|
|
130
132
|
//#endregion
|
|
131
|
-
export {
|
|
133
|
+
export { C as AcceptDisclosuresWidget };
|
package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./
|
|
2
|
-
import { AcceptDisclosuresWidget as t } from "./
|
|
1
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./lib/AcceptDisclosuresWidget/labels.js";
|
|
2
|
+
import { AcceptDisclosuresWidget as t } from "./lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js";
|
|
3
3
|
export { e as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, t as AcceptDisclosuresWidget };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./
|
|
2
|
-
import { Button as t, Checkbox as n } from "
|
|
1
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as e } from "./labels.js";
|
|
2
|
+
import { Button as t, Checkbox as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
3
3
|
import { useId as r } from "react";
|
|
4
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/
|
|
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 }) {
|
|
7
7
|
let g = f || p, _ = {
|
|
8
8
|
...e,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
title: "Review and accept these banking disclosures",
|
|
4
4
|
acceptButton: "Accept",
|
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.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.266", n = "156a33c6913a844493fc8f31e8c4483f45f2853b", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WIDGET_SUITE_CONTENT_LABELS_EN as e,
|
|
2
|
-
import { WIDGET_SUITE_DEFAULT_SECTIONS as
|
|
3
|
-
import { WIDGET_SUITE_SHELL_LABELS_EN as
|
|
1
|
+
import { WIDGET_SUITE_CONTENT_LABELS_EN as e, WIDGET_SUITE_DISCLOSURE_LABELS_EN as t, WIDGET_SUITE_SECTION_LABELS_EN as n, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as r } from "./index4.js";
|
|
2
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as i, WidgetSuiteSectionId as a } from "./index5.js";
|
|
3
|
+
import { WIDGET_SUITE_SHELL_LABELS_EN as o } from "../../ui/dist/index2.js";
|
|
4
4
|
import "../../ui/dist/index.js";
|
|
5
|
-
import { WidgetSuite as
|
|
6
|
-
export { e as WIDGET_SUITE_CONTENT_LABELS_EN,
|
|
5
|
+
import { WidgetSuite as s } from "./index6.js";
|
|
6
|
+
export { e as WIDGET_SUITE_CONTENT_LABELS_EN, i as WIDGET_SUITE_DEFAULT_SECTIONS, t as WIDGET_SUITE_DISCLOSURE_LABELS_EN, n as WIDGET_SUITE_SECTION_LABELS_EN, r as WIDGET_SUITE_SECTION_TITLE_LABELS_EN, o as WIDGET_SUITE_SHELL_LABELS_EN, s as WidgetSuite, a as WidgetSuiteSectionId };
|
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
cards: "Cards",
|
|
6
|
-
transfers: "Transfers",
|
|
7
|
-
"bill-pay": "Bill Pay",
|
|
8
|
-
invoicing: "Invoicing",
|
|
9
|
-
expenses: "Expenses",
|
|
10
|
-
settings: "Settings"
|
|
11
|
-
}, t = { bankTagline: "Business Banking provided by {bankName}" }, n = {
|
|
12
|
-
creditCards: { title: "Credit cards" },
|
|
13
|
-
debitCards: { title: "Debit cards" },
|
|
14
|
-
expensePlaceholders: { expensesUnavailable: "Expenses are not available in this suite yet." }
|
|
15
|
-
};
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e ? e.disclosuresRequired === "REQUIRED" && !e.disclosuresAccepted : !1;
|
|
4
|
+
}
|
|
16
5
|
//#endregion
|
|
17
|
-
export {
|
|
6
|
+
export { e as needsDisclosureAcceptance };
|
|
@@ -1,97 +1,32 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import { CardProgram as n } from "../../../shared/feature/dist/lib/card/cardProgram.js";
|
|
9
|
-
import "../../../shared/feature/dist/index.js";
|
|
10
|
-
import { BankAccountsWidget as r } from "../../../bank-accounts-widget/feature/dist/index8.js";
|
|
11
|
-
import "../../../bank-accounts-widget/feature/dist/index.js";
|
|
12
|
-
import { BillPayWidget as i } from "../../../bill-pay-widget/feature/dist/index28.js";
|
|
13
|
-
import "../../../bill-pay-widget/feature/dist/index.js";
|
|
14
|
-
import { CardsWidget as a } from "../../../cards-widget/feature/dist/index8.js";
|
|
15
|
-
import "../../../cards-widget/feature/dist/index.js";
|
|
16
|
-
import { BalancesWidget as o } from "../../../balances-widget/feature/dist/index5.js";
|
|
17
|
-
import "../../../balances-widget/feature/dist/index.js";
|
|
18
|
-
import { InsightsWidget as s } from "../../../insights-widget/feature/dist/index11.js";
|
|
19
|
-
import "../../../insights-widget/feature/dist/index.js";
|
|
20
|
-
import { InvoicingWidget as c } from "../../../invoicing-widget/feature/dist/index3.js";
|
|
21
|
-
import "../../../invoicing-widget/feature/dist/index.js";
|
|
22
|
-
import { SettingsWidget as l } from "../../../settings-widget/feature/dist/index6.js";
|
|
23
|
-
import "../../../settings-widget/feature/dist/index.js";
|
|
24
|
-
import { TransfersWidget as u } from "../../../transfers-widget/feature/dist/index6.js";
|
|
25
|
-
import "../../../transfers-widget/feature/dist/index.js";
|
|
26
|
-
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
27
1
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
m.Invoicing,
|
|
47
|
-
m.Expenses,
|
|
48
|
-
m.Settings
|
|
49
|
-
], g = {
|
|
50
|
-
[m.Dashboard]: { render: ({ grantedScopes: n }) => {
|
|
51
|
-
let r = e(n, [t.BankAccountReadOrg]);
|
|
52
|
-
return /* @__PURE__ */ f("div", {
|
|
53
|
-
className: r ? "ttw:grid ttw:gap-4 ttw:md:grid-cols-2" : "ttw:grid ttw:gap-4",
|
|
54
|
-
children: [r && /* @__PURE__ */ d(o, {}), /* @__PURE__ */ d(s, {})]
|
|
55
|
-
});
|
|
56
|
-
} },
|
|
57
|
-
[m.Accounts]: {
|
|
58
|
-
anyOfScopes: [t.BankAccountReadOrg, t.ExternalBankAccountReadOrg],
|
|
59
|
-
rendersOwnTitle: !0,
|
|
60
|
-
render: () => /* @__PURE__ */ d(r, {})
|
|
2
|
+
var e = {
|
|
3
|
+
dashboard: "Dashboard",
|
|
4
|
+
accounts: "Accounts",
|
|
5
|
+
cards: "Cards",
|
|
6
|
+
transfers: "Transfers",
|
|
7
|
+
"bill-pay": "Bill Pay",
|
|
8
|
+
invoicing: "Invoicing",
|
|
9
|
+
expenses: "Expenses",
|
|
10
|
+
settings: "Settings"
|
|
11
|
+
}, t = { bankTagline: "Business Banking provided by {bankName}" }, n = {
|
|
12
|
+
creditCards: { title: "Credit cards" },
|
|
13
|
+
debitCards: { title: "Debit cards" },
|
|
14
|
+
expensePlaceholders: { expensesUnavailable: "Expenses are not available in this suite yet." }
|
|
15
|
+
}, r = {
|
|
16
|
+
initFailedState: {
|
|
17
|
+
title: "We couldn't load this page",
|
|
18
|
+
body: "Please try again.",
|
|
19
|
+
retryButton: "Try again"
|
|
61
20
|
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
children: [e(r, [t.CreditCardReadOrg]) && /* @__PURE__ */ d(a, {
|
|
67
|
-
cardProgram: n.Credit,
|
|
68
|
-
labels: i.creditCards
|
|
69
|
-
}), e(r, [t.DebitCardReadOrg]) && /* @__PURE__ */ d(a, {
|
|
70
|
-
cardProgram: n.Debit,
|
|
71
|
-
labels: i.debitCards
|
|
72
|
-
})]
|
|
73
|
-
})
|
|
21
|
+
refreshFailedState: {
|
|
22
|
+
title: "We couldn't finish loading this page",
|
|
23
|
+
body: "Your disclosure acceptance was saved, so you won't need to accept again.",
|
|
24
|
+
retryButton: "Try again"
|
|
74
25
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
[m.BillPay]: {
|
|
80
|
-
anyOfScopes: [t.PayableReadOrg],
|
|
81
|
-
render: () => /* @__PURE__ */ d(i, {})
|
|
82
|
-
},
|
|
83
|
-
[m.Invoicing]: {
|
|
84
|
-
anyOfScopes: [t.InvoiceReadOrg],
|
|
85
|
-
render: () => /* @__PURE__ */ d(c, {})
|
|
86
|
-
},
|
|
87
|
-
[m.Expenses]: {
|
|
88
|
-
anyOfScopes: [t.ExpenseReadOrg, t.ExpenseReadSelf],
|
|
89
|
-
render: ({ labels: e }) => /* @__PURE__ */ d(p, { children: e.expensePlaceholders.expensesUnavailable })
|
|
90
|
-
},
|
|
91
|
-
[m.Settings]: {
|
|
92
|
-
rendersOwnTitle: !0,
|
|
93
|
-
render: () => /* @__PURE__ */ d(l, {})
|
|
26
|
+
unavailableState: {
|
|
27
|
+
title: "This account needs to accept disclosures",
|
|
28
|
+
body: "The documents are not available right now. Please contact support to continue."
|
|
94
29
|
}
|
|
95
30
|
};
|
|
96
31
|
//#endregion
|
|
97
|
-
export {
|
|
32
|
+
export { n as WIDGET_SUITE_CONTENT_LABELS_EN, r as WIDGET_SUITE_DISCLOSURE_LABELS_EN, e as WIDGET_SUITE_SECTION_LABELS_EN, t as WIDGET_SUITE_SECTION_TITLE_LABELS_EN };
|
|
@@ -3,82 +3,95 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
6
7
|
import "../../../shared/data-access/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
|
+
import { CardProgram as n } from "../../../shared/feature/dist/lib/card/cardProgram.js";
|
|
10
9
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import "
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
10
|
+
import { BankAccountsWidget as r } from "../../../bank-accounts-widget/feature/dist/index8.js";
|
|
11
|
+
import "../../../bank-accounts-widget/feature/dist/index.js";
|
|
12
|
+
import { BillPayWidget as i } from "../../../bill-pay-widget/feature/dist/index28.js";
|
|
13
|
+
import "../../../bill-pay-widget/feature/dist/index.js";
|
|
14
|
+
import { CardsWidget as a } from "../../../cards-widget/feature/dist/index8.js";
|
|
15
|
+
import "../../../cards-widget/feature/dist/index.js";
|
|
16
|
+
import { BalancesWidget as o } from "../../../balances-widget/feature/dist/index5.js";
|
|
17
|
+
import "../../../balances-widget/feature/dist/index.js";
|
|
18
|
+
import { InsightsWidget as s } from "../../../insights-widget/feature/dist/index11.js";
|
|
19
|
+
import "../../../insights-widget/feature/dist/index.js";
|
|
20
|
+
import { InvoicingWidget as c } from "../../../invoicing-widget/feature/dist/index3.js";
|
|
21
|
+
import "../../../invoicing-widget/feature/dist/index.js";
|
|
22
|
+
import { SettingsWidget as l } from "../../../settings-widget/feature/dist/index6.js";
|
|
23
|
+
import "../../../settings-widget/feature/dist/index.js";
|
|
24
|
+
import { TransfersWidget as u } from "../../../transfers-widget/feature/dist/index6.js";
|
|
25
|
+
import "../../../transfers-widget/feature/dist/index.js";
|
|
26
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
19
27
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
let r = C[t], i = n.render({
|
|
48
|
-
grantedScopes: T,
|
|
49
|
-
labels: E
|
|
28
|
+
var p = ({ children: e }) => /* @__PURE__ */ d("div", {
|
|
29
|
+
className: "ttw:rounded-md ttw:border ttw:border-dashed ttw:border-border ttw:p-8 ttw:text-sm ttw:text-muted-foreground",
|
|
30
|
+
children: e
|
|
31
|
+
}), m = {
|
|
32
|
+
Dashboard: "dashboard",
|
|
33
|
+
Accounts: "accounts",
|
|
34
|
+
Cards: "cards",
|
|
35
|
+
Transfers: "transfers",
|
|
36
|
+
BillPay: "bill-pay",
|
|
37
|
+
Invoicing: "invoicing",
|
|
38
|
+
Expenses: "expenses",
|
|
39
|
+
Settings: "settings"
|
|
40
|
+
}, h = [
|
|
41
|
+
m.Dashboard,
|
|
42
|
+
m.Accounts,
|
|
43
|
+
m.Cards,
|
|
44
|
+
m.Transfers,
|
|
45
|
+
m.BillPay,
|
|
46
|
+
m.Invoicing,
|
|
47
|
+
m.Expenses,
|
|
48
|
+
m.Settings
|
|
49
|
+
], g = {
|
|
50
|
+
[m.Dashboard]: { render: ({ grantedScopes: n }) => {
|
|
51
|
+
let r = e(n, [t.BankAccountReadOrg]);
|
|
52
|
+
return /* @__PURE__ */ f("div", {
|
|
53
|
+
className: r ? "ttw:grid ttw:gap-4 ttw:md:grid-cols-2" : "ttw:grid ttw:gap-4",
|
|
54
|
+
children: [r && /* @__PURE__ */ d(o, {}), /* @__PURE__ */ d(s, {})]
|
|
50
55
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
56
|
+
} },
|
|
57
|
+
[m.Accounts]: {
|
|
58
|
+
anyOfScopes: [t.BankAccountReadOrg, t.ExternalBankAccountReadOrg],
|
|
59
|
+
rendersOwnTitle: !0,
|
|
60
|
+
render: () => /* @__PURE__ */ d(r, {})
|
|
61
|
+
},
|
|
62
|
+
[m.Cards]: {
|
|
63
|
+
anyOfScopes: [t.CreditCardReadOrg, t.DebitCardReadOrg],
|
|
64
|
+
render: ({ grantedScopes: r, labels: i }) => /* @__PURE__ */ f("div", {
|
|
65
|
+
className: "ttw:grid ttw:gap-8",
|
|
66
|
+
children: [e(r, [t.CreditCardReadOrg]) && /* @__PURE__ */ d(a, {
|
|
67
|
+
cardProgram: n.Credit,
|
|
68
|
+
labels: i.creditCards
|
|
69
|
+
}), e(r, [t.DebitCardReadOrg]) && /* @__PURE__ */ d(a, {
|
|
70
|
+
cardProgram: n.Debit,
|
|
71
|
+
labels: i.debitCards
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
[m.Transfers]: {
|
|
76
|
+
anyOfScopes: [t.BankAccountReadOrg],
|
|
77
|
+
render: () => /* @__PURE__ */ d(u, {})
|
|
78
|
+
},
|
|
79
|
+
[m.BillPay]: {
|
|
80
|
+
anyOfScopes: [t.PayableReadOrg],
|
|
81
|
+
render: () => /* @__PURE__ */ d(i, {})
|
|
82
|
+
},
|
|
83
|
+
[m.Invoicing]: {
|
|
84
|
+
anyOfScopes: [t.InvoiceReadOrg],
|
|
85
|
+
render: () => /* @__PURE__ */ d(c, {})
|
|
86
|
+
},
|
|
87
|
+
[m.Expenses]: {
|
|
88
|
+
anyOfScopes: [t.ExpenseReadOrg, t.ExpenseReadSelf],
|
|
89
|
+
render: ({ labels: e }) => /* @__PURE__ */ d(p, { children: e.expensePlaceholders.expensesUnavailable })
|
|
90
|
+
},
|
|
91
|
+
[m.Settings]: {
|
|
92
|
+
rendersOwnTitle: !0,
|
|
93
|
+
render: () => /* @__PURE__ */ d(l, {})
|
|
94
|
+
}
|
|
95
|
+
};
|
|
83
96
|
//#endregion
|
|
84
|
-
export {
|
|
97
|
+
export { h as WIDGET_SUITE_DEFAULT_SECTIONS, g as WIDGET_SUITE_SECTIONS, m as WidgetSuiteSectionId };
|