@tesouro/embedded-components-react 0.2.260 → 0.2.262
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 +24 -19
- package/dist/experimental/WidgetSuite.d.ts +77 -5
- package/dist/experimental/WidgetSuite.js +5 -5
- package/dist/experimental/index.d.ts +77 -5
- package/dist/experimental/index.js +5 -5
- package/dist/index.d.ts +80 -2
- package/dist/index.js +12 -11
- package/dist/lib/BalancesWidget.js +1 -1
- package/dist/lib/InsightsWidget.js +2 -2
- package/dist/lib/ProfileWidget.d.ts +16 -0
- package/dist/lib/SettingsWidget.d.ts +65 -3
- package/dist/lib/SettingsWidget.js +3 -2
- package/dist/lib/TransfersWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/{index3.js → lib/BalancesWidget/BalancesWidget.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/{index4.js → lib/BalancesWidget/SingleBalance/SingleBalance.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/{index2.js → lib/BalancesWidget/labels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/{index3.js → lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/index.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/{index2.js → lib/ExpenseManagementWidgetUi/labels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/{index3.js → lib/InsightsWidget/InsightsWidget.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/{index5.js → lib/InsightsWidget/SingleInsight/SingleInsight.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/{index4.js → lib/InsightsWidget/SingleInsight/labels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/{index2.js → lib/InsightsWidget/labels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +59 -56
- package/dist/libs/tesouro-embedded-components-react/profile-widget/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/profile-widget/ui/dist/index3.js +25 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +20 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +37 -122
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +133 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index7.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index4.js → lib/TransferMoneyModal/ReviewTransferStep.js} +4 -4
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index8.js → lib/TransferMoneyModal/TransferMoneyModal.js} +5 -5
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index5.js → lib/TransferMoneyModal/TransferMoneyModalHeader.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index7.js → lib/TransferMoneyModal/TransferResultStep.js} +3 -3
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index2.js → lib/TransferMoneyModal/TransferReviewAccountCard.js} +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index3.js → lib/TransferMoneyModal/reviewTransferStepLabels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index6.js → lib/TransferMoneyModal/transferResultStepLabels.js} +1 -1
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index10.js → lib/TransfersWidget/TransfersWidget.js} +6 -6
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/{index9.js → lib/TransfersWidget/labels.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 +10 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +74 -11
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js +58 -33
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/ui/dist/index4.js +29 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index4.js +0 -2
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.262", n = "2efd449d245f11c88723dfbe989b39bad5cf891d", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -16,8 +16,8 @@ import { useTransferExternalAccountsQuery as l } from "../../data-access/dist/in
|
|
|
16
16
|
import { useMergedRecentBankAccountTransfersQuery as u } from "../../data-access/dist/index6.js";
|
|
17
17
|
import "../../data-access/dist/index.js";
|
|
18
18
|
import { mapTransferToRowView as d, useTransferMoneyModalController as f } from "./index4.js";
|
|
19
|
-
import { TRANSFERS_WIDGET_LABELS_EN as p } from "../../ui/dist/
|
|
20
|
-
import { TransfersWidget as ee } from "../../ui/dist/
|
|
19
|
+
import { TRANSFERS_WIDGET_LABELS_EN as p } from "../../ui/dist/lib/TransfersWidget/labels.js";
|
|
20
|
+
import { TransfersWidget as ee } from "../../ui/dist/lib/TransfersWidget/TransfersWidget.js";
|
|
21
21
|
import "../../ui/dist/index.js";
|
|
22
22
|
import { useCallback as m, useEffect as h, useMemo as g } from "react";
|
|
23
23
|
import { jsx as _ } from "react/jsx-runtime";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TRANSFERS_WIDGET_LABELS_EN as e } from "./
|
|
2
|
-
import { TransfersWidget as t } from "./
|
|
1
|
+
import { TRANSFERS_WIDGET_LABELS_EN as e } from "./lib/TransfersWidget/labels.js";
|
|
2
|
+
import { TransfersWidget as t } from "./lib/TransfersWidget/TransfersWidget.js";
|
|
3
3
|
export { e as TRANSFERS_WIDGET_LABELS_EN, t as TransfersWidget };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Button as e, Separator as t, Typography as n } from "
|
|
2
|
-
import { TransferReviewAccountCard as r } from "./
|
|
3
|
-
import { DEFAULT_REVIEW_TRANSFER_STEP_LABELS as i } from "./
|
|
1
|
+
import { Button as e, Separator as t, Typography as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { TransferReviewAccountCard as r } from "./TransferReviewAccountCard.js";
|
|
3
|
+
import { DEFAULT_REVIEW_TRANSFER_STEP_LABELS as i } from "./reviewTransferStepLabels.js";
|
|
4
4
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
5
|
import { ArrowLeft as c, ArrowRight as l } from "lucide-react";
|
|
6
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
6
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/ReviewTransferStep.js
|
|
7
7
|
function u({ fromAccount: u, toAccount: d, amountLabel: f, isSubmitting: p, onConfirm: m, onGoBack: h, labels: g }) {
|
|
8
8
|
let _ = {
|
|
9
9
|
...i,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Button as e, Dialog as t, DialogContent as n, DialogFooter as r, Input as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, Separator as u, Typography as d } from "
|
|
2
|
-
import { ReviewTransferStep as f } from "./
|
|
3
|
-
import { TransferMoneyModalHeader as p } from "./
|
|
4
|
-
import { TransferResultStep as m } from "./
|
|
1
|
+
import { Button as e, Dialog as t, DialogContent as n, DialogFooter as r, Input as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, Separator as u, Typography as d } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ReviewTransferStep as f } from "./ReviewTransferStep.js";
|
|
3
|
+
import { TransferMoneyModalHeader as p } from "./TransferMoneyModalHeader.js";
|
|
4
|
+
import { TransferResultStep as m } from "./TransferResultStep.js";
|
|
5
5
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
6
6
|
import { ArrowRight as v } from "lucide-react";
|
|
7
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModal.js
|
|
8
8
|
var y = "ttw:flex ttw:h-auto ttw:min-h-14 ttw:w-full ttw:cursor-pointer ttw:items-center ttw:justify-start ttw:rounded-lg ttw:border-border ttw:px-5 ttw:py-3.5 ttw:text-left ttw:text-base ttw:font-normal ttw:text-foreground ttw:disabled:cursor-not-allowed ttw:[&_svg]:ml-auto ttw:[&_svg]:shrink-0", b = {
|
|
9
9
|
position: "popper",
|
|
10
10
|
align: "start",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DialogDescription as e, DialogTitle as t } from "
|
|
1
|
+
import { DialogDescription as e, DialogTitle as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowRightLeft as i } from "lucide-react";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferMoneyModalHeader.js
|
|
5
5
|
function a({ title: a, subtitle: o }) {
|
|
6
6
|
return /* @__PURE__ */ n("div", {
|
|
7
7
|
className: "ttw:pb-4",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button as e, Typography as t } from "
|
|
2
|
-
import { DEFAULT_TRANSFER_RESULT_STEP_LABELS as n } from "./
|
|
1
|
+
import { Button as e, Typography as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { DEFAULT_TRANSFER_RESULT_STEP_LABELS as n } from "./transferResultStepLabels.js";
|
|
3
3
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
4
|
import { ArrowLeft as a, CheckCircle2 as o, X as s } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferResultStep.js
|
|
6
6
|
function c({ amountLabel: c, isSuccess: l, onBackToTransfers: u, labels: d }) {
|
|
7
7
|
let f = {
|
|
8
8
|
...n,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Typography as e } from "
|
|
1
|
+
import { Typography as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { Landmark as r } from "lucide-react";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/TransferReviewAccountCard.js
|
|
5
5
|
function i({ account: i }) {
|
|
6
6
|
let a = !!i.balanceLabel;
|
|
7
7
|
return /* @__PURE__ */ n("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/reviewTransferStepLabels.js
|
|
2
2
|
var e = {
|
|
3
3
|
fromAccountSection: "From Account",
|
|
4
4
|
toAccountSection: "To Account",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransferMoneyModal/transferResultStepLabels.js
|
|
2
2
|
var e = {
|
|
3
3
|
successTitle: "Success!",
|
|
4
4
|
errorTitle: "Error",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Button as e, Skeleton as t, Typography as n } from "
|
|
2
|
-
import { WidgetTitleWithIconAndChildren as r } from "
|
|
3
|
-
import "
|
|
4
|
-
import { TRANSFERS_WIDGET_LABELS_EN as i } from "./
|
|
5
|
-
import { TransferMoneyModal as a } from "
|
|
1
|
+
import { Button as e, Skeleton as t, Typography as n } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { WidgetTitleWithIconAndChildren as r } from "../../../../../shared/ui/dist/lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
|
|
3
|
+
import "../../../../../shared/ui/dist/index.js";
|
|
4
|
+
import { TRANSFERS_WIDGET_LABELS_EN as i } from "./labels.js";
|
|
5
|
+
import { TransferMoneyModal as a } from "../TransferMoneyModal/TransferMoneyModal.js";
|
|
6
6
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
7
|
import { ArrowDownToLine as l, ArrowDownUp as u, ArrowUpFromLine as d } from "lucide-react";
|
|
8
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
8
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js
|
|
9
9
|
function f({ transferRows: f, isLoading: p, isError: m, onRetry: h, showTransferMoneyCta: g, isTransferMoneyCtaDisabled: _ = !1, onTransferMoneyClick: v, transferMoneyModal: y, labels: b }) {
|
|
10
10
|
let x = {
|
|
11
11
|
...i,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
widgetTitle: "Transfer money",
|
|
4
4
|
transferMoneyCta: "Transfer money",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { WidgetSuiteSectionId as
|
|
3
|
-
import { WIDGET_SUITE_SHELL_LABELS_EN as
|
|
1
|
+
import { WIDGET_SUITE_CONTENT_LABELS_EN as e, WIDGET_SUITE_SECTION_LABELS_EN as t, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as n } from "./index3.js";
|
|
2
|
+
import { WIDGET_SUITE_DEFAULT_SECTIONS as r, WidgetSuiteSectionId as i } from "./index4.js";
|
|
3
|
+
import { WIDGET_SUITE_SHELL_LABELS_EN as a } from "../../ui/dist/index2.js";
|
|
4
4
|
import "../../ui/dist/index.js";
|
|
5
|
-
import { WidgetSuite as
|
|
6
|
-
export { e as WIDGET_SUITE_SECTION_LABELS_EN, n as WIDGET_SUITE_SHELL_LABELS_EN,
|
|
5
|
+
import { WidgetSuite as o } from "./index5.js";
|
|
6
|
+
export { e as WIDGET_SUITE_CONTENT_LABELS_EN, r as WIDGET_SUITE_DEFAULT_SECTIONS, t as WIDGET_SUITE_SECTION_LABELS_EN, n as WIDGET_SUITE_SECTION_TITLE_LABELS_EN, a as WIDGET_SUITE_SHELL_LABELS_EN, o as WidgetSuite, i as WidgetSuiteSectionId };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index3.js
|
|
2
2
|
var e = {
|
|
3
|
+
dashboard: "Dashboard",
|
|
3
4
|
accounts: "Accounts",
|
|
4
5
|
cards: "Cards",
|
|
6
|
+
transfers: "Transfers",
|
|
7
|
+
"bill-pay": "Bill Pay",
|
|
8
|
+
invoicing: "Invoicing",
|
|
9
|
+
expenses: "Expenses",
|
|
5
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." }
|
|
6
15
|
};
|
|
7
16
|
//#endregion
|
|
8
|
-
export { e as WIDGET_SUITE_SECTION_LABELS_EN };
|
|
17
|
+
export { n as WIDGET_SUITE_CONTENT_LABELS_EN, e as WIDGET_SUITE_SECTION_LABELS_EN, t as WIDGET_SUITE_SECTION_TITLE_LABELS_EN };
|
|
@@ -9,26 +9,89 @@ import { CardProgram as n } from "../../../shared/feature/dist/lib/card/cardProg
|
|
|
9
9
|
import "../../../shared/feature/dist/index.js";
|
|
10
10
|
import { BankAccountsWidget as r } from "../../../bank-accounts-widget/feature/dist/index8.js";
|
|
11
11
|
import "../../../bank-accounts-widget/feature/dist/index.js";
|
|
12
|
-
import {
|
|
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";
|
|
13
15
|
import "../../../cards-widget/feature/dist/index.js";
|
|
14
|
-
import {
|
|
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";
|
|
15
23
|
import "../../../settings-widget/feature/dist/index.js";
|
|
16
|
-
import {
|
|
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";
|
|
17
27
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js
|
|
18
|
-
var
|
|
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",
|
|
19
33
|
Accounts: "accounts",
|
|
20
34
|
Cards: "cards",
|
|
35
|
+
Transfers: "transfers",
|
|
36
|
+
BillPay: "bill-pay",
|
|
37
|
+
Invoicing: "invoicing",
|
|
38
|
+
Expenses: "expenses",
|
|
21
39
|
Settings: "settings"
|
|
22
|
-
},
|
|
23
|
-
|
|
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, {})]
|
|
55
|
+
});
|
|
56
|
+
} },
|
|
57
|
+
[m.Accounts]: {
|
|
24
58
|
anyOfScopes: [t.BankAccountReadOrg, t.ExternalBankAccountReadOrg],
|
|
25
|
-
|
|
59
|
+
rendersOwnTitle: !0,
|
|
60
|
+
render: () => /* @__PURE__ */ d(r, {})
|
|
26
61
|
},
|
|
27
|
-
[
|
|
62
|
+
[m.Cards]: {
|
|
28
63
|
anyOfScopes: [t.CreditCardReadOrg, t.DebitCardReadOrg],
|
|
29
|
-
render: (r) => /* @__PURE__ */
|
|
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
|
+
})
|
|
30
74
|
},
|
|
31
|
-
[
|
|
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
|
+
}
|
|
32
95
|
};
|
|
33
96
|
//#endregion
|
|
34
|
-
export {
|
|
97
|
+
export { h as WIDGET_SUITE_DEFAULT_SECTIONS, g as WIDGET_SUITE_SECTIONS, m as WidgetSuiteSectionId };
|
|
@@ -8,52 +8,77 @@ import { useAnalyticsTrack as t } from "../../../shared/feature/dist/lib/analyti
|
|
|
8
8
|
import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
9
|
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
10
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { WIDGET_SUITE_SECTIONS as
|
|
13
|
-
import { WIDGET_NAME as
|
|
14
|
-
import { WidgetSuiteShell as
|
|
11
|
+
import { WIDGET_SUITE_CONTENT_LABELS_EN as i, WIDGET_SUITE_SECTION_LABELS_EN as a, WIDGET_SUITE_SECTION_TITLE_LABELS_EN as o } from "./index3.js";
|
|
12
|
+
import { WIDGET_SUITE_SECTIONS as s } from "./index4.js";
|
|
13
|
+
import { WIDGET_NAME as c, WidgetSuiteAnalyticsEvent as l } from "./index2.js";
|
|
14
|
+
import { WidgetSuiteShell as u } from "../../ui/dist/index3.js";
|
|
15
|
+
import { SectionPageTitle as d } from "../../ui/dist/index4.js";
|
|
15
16
|
import "../../ui/dist/index.js";
|
|
16
|
-
import { useEffect as
|
|
17
|
-
import { jsx as
|
|
17
|
+
import { useEffect as f, useMemo as p, useState as m } from "react";
|
|
18
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
18
19
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index5.js
|
|
19
|
-
function
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
let
|
|
25
|
-
...
|
|
26
|
-
...
|
|
27
|
-
}, { initResponse:
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
function v({ sections: n, labels: c, sectionLabels: v, sectionTitleLabels: y, contentLabels: b, showSectionTitle: x = !0 }) {
|
|
21
|
+
let S = t();
|
|
22
|
+
f(() => {
|
|
23
|
+
S(l.Mounted);
|
|
24
|
+
}, [S]);
|
|
25
|
+
let C = {
|
|
26
|
+
...a,
|
|
27
|
+
...v
|
|
28
|
+
}, { initResponse: w } = r(), T = w?.scopes, E = p(() => ({
|
|
29
|
+
creditCards: {
|
|
30
|
+
...i.creditCards,
|
|
31
|
+
...b?.creditCards
|
|
32
|
+
},
|
|
33
|
+
debitCards: {
|
|
34
|
+
...i.debitCards,
|
|
35
|
+
...b?.debitCards
|
|
36
|
+
},
|
|
37
|
+
expensePlaceholders: {
|
|
38
|
+
...i.expensePlaceholders,
|
|
39
|
+
...b?.expensePlaceholders
|
|
40
|
+
}
|
|
41
|
+
}), [b]), D = w?.bankName?.trim(), O = D ? {
|
|
42
|
+
...o,
|
|
43
|
+
...y
|
|
44
|
+
}.bankTagline.replaceAll("{bankName}", D) : void 0, k = n.flatMap((t) => {
|
|
45
|
+
let n = s[t];
|
|
46
|
+
if (!n || n.anyOfScopes && !e(T, n.anyOfScopes)) return [];
|
|
47
|
+
let r = C[t], i = n.render({
|
|
48
|
+
grantedScopes: T,
|
|
49
|
+
labels: E
|
|
50
|
+
});
|
|
51
|
+
return [{
|
|
30
52
|
id: t,
|
|
31
|
-
label:
|
|
32
|
-
content: n.
|
|
53
|
+
label: r,
|
|
54
|
+
content: x && !n.rendersOwnTitle ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
|
|
55
|
+
title: r,
|
|
56
|
+
bankTagline: O
|
|
57
|
+
}), i] }) : i
|
|
33
58
|
}];
|
|
34
|
-
}), [
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
sections:
|
|
37
|
-
selectedSectionId:
|
|
38
|
-
onSectionChange:
|
|
39
|
-
labels:
|
|
59
|
+
}), [A, j] = m(n[0] ?? ""), M = k.some((e) => e.id === A) ? A : k[0]?.id ?? "";
|
|
60
|
+
return /* @__PURE__ */ g(u, {
|
|
61
|
+
sections: k,
|
|
62
|
+
selectedSectionId: M,
|
|
63
|
+
onSectionChange: j,
|
|
64
|
+
labels: c
|
|
40
65
|
});
|
|
41
66
|
}
|
|
42
|
-
function
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
widgetName:
|
|
67
|
+
function y({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: l, onError: u, analytics: d, ...f }) {
|
|
68
|
+
return /* @__PURE__ */ g(n, {
|
|
69
|
+
widgetName: c,
|
|
45
70
|
baseUrl: e,
|
|
46
71
|
widgetToken: t,
|
|
47
72
|
organizationId: r,
|
|
48
73
|
configClient: i,
|
|
49
74
|
linkComponent: a,
|
|
50
|
-
implementation:
|
|
51
|
-
uiFramework:
|
|
75
|
+
implementation: o,
|
|
76
|
+
uiFramework: s,
|
|
52
77
|
errorFallback: l,
|
|
53
78
|
onError: u,
|
|
54
|
-
analytics:
|
|
55
|
-
children: /* @__PURE__ */
|
|
79
|
+
analytics: d,
|
|
80
|
+
children: /* @__PURE__ */ g(v, { ...f })
|
|
56
81
|
});
|
|
57
82
|
}
|
|
58
83
|
//#endregion
|
|
59
|
-
export {
|
|
84
|
+
export { y as WidgetSuite, y as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { WIDGET_SUITE_SHELL_LABELS_EN as e } from "./index2.js";
|
|
2
2
|
import { WidgetSuiteShell as t } from "./index3.js";
|
|
3
|
-
|
|
3
|
+
import { SectionPageTitle as n } from "./index4.js";
|
|
4
|
+
export { n as SectionPageTitle, e as WIDGET_SUITE_SHELL_LABELS_EN, t as WidgetSuiteShell };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/widget-suite/ui/dist/index4.js
|
|
8
|
+
function r({ title: r, bankTagline: i, testId: a, children: o }) {
|
|
9
|
+
return /* @__PURE__ */ n("div", {
|
|
10
|
+
className: "ttw:mb-6 ttw:flex ttw:justify-between ttw:gap-4",
|
|
11
|
+
children: [/* @__PURE__ */ n("div", {
|
|
12
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
13
|
+
children: [/* @__PURE__ */ t(e, {
|
|
14
|
+
variant: "h1",
|
|
15
|
+
"data-testid": a,
|
|
16
|
+
children: r
|
|
17
|
+
}), i && /* @__PURE__ */ t(e, {
|
|
18
|
+
color: "muted",
|
|
19
|
+
variant: "body1",
|
|
20
|
+
children: i
|
|
21
|
+
})]
|
|
22
|
+
}), /* @__PURE__ */ t("div", {
|
|
23
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
24
|
+
children: o
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { r as SectionPageTitle };
|
package/package.json
CHANGED