@tesouro/embedded-components-react 0.11.69 → 0.11.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +6 -13
- package/dist/index.d.ts +18 -2
- package/dist/lib/WidgetSuite.d.ts +18 -2
- package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +30 -32
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +29 -30
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetContainer/WidgetContainer.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetFrame/WidgetFrame.js +14 -21
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +72 -74
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js +25 -23
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js +74 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +20 -16
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/TransfersSection.js +23 -21
- package/dist/packages/shared-ui-shadcn/dist/index.js +1040 -996
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js +0 -12
|
@@ -11,18 +11,17 @@ import { TransferAccountValue as p } from "./TransferAccountValue.js";
|
|
|
11
11
|
import { TransferMoneyModal as m } from "../TransferMoneyModal/TransferMoneyModal.js";
|
|
12
12
|
import { TransferDetailSheet as h } from "./TransferDetailSheet.js";
|
|
13
13
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
|
-
import { ArrowDownUp as y } from "lucide-react";
|
|
15
14
|
// ../../libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let
|
|
15
|
+
var y = [], b = () => void 0;
|
|
16
|
+
function x({ transferRows: e, isLoading: r, isError: a, onRetry: f, showTransferMoneyCta: p, isTransferMoneyCtaDisabled: x = !1, onTransferMoneyClick: E, transferMoneyModal: D, pagination: O, selectedRowKey: k, onRowClick: A, transferDetail: j, onTransferDetailClose: M, onLinkAccountClick: N, labels: P, testIds: F }) {
|
|
17
|
+
let I = {
|
|
19
18
|
...d,
|
|
20
|
-
...
|
|
21
|
-
},
|
|
19
|
+
...P
|
|
20
|
+
}, L = [
|
|
22
21
|
{
|
|
23
22
|
id: "date",
|
|
24
23
|
meta: { fitContent: !0 },
|
|
25
|
-
header:
|
|
24
|
+
header: I.tableHeaderDate,
|
|
26
25
|
cell: ({ row: e }) => /* @__PURE__ */ _("span", {
|
|
27
26
|
className: "ttw:font-normal ttw:whitespace-nowrap ttw:text-muted-foreground",
|
|
28
27
|
children: e.original.dateLabel
|
|
@@ -30,125 +29,124 @@ function S({ transferRows: e, isLoading: r, isError: a, onRetry: f, showTransfer
|
|
|
30
29
|
},
|
|
31
30
|
{
|
|
32
31
|
id: "from",
|
|
33
|
-
header:
|
|
34
|
-
cell: ({ row: e }) => /* @__PURE__ */ _(
|
|
32
|
+
header: I.transferFromLabel,
|
|
33
|
+
cell: ({ row: e }) => /* @__PURE__ */ _(S, {
|
|
35
34
|
account: e.original.from,
|
|
36
|
-
labels:
|
|
35
|
+
labels: I
|
|
37
36
|
})
|
|
38
37
|
},
|
|
39
38
|
{
|
|
40
39
|
id: "to",
|
|
41
|
-
header:
|
|
42
|
-
cell: ({ row: e }) => /* @__PURE__ */ _(
|
|
40
|
+
header: I.transferToLabel,
|
|
41
|
+
cell: ({ row: e }) => /* @__PURE__ */ _(S, {
|
|
43
42
|
account: e.original.to,
|
|
44
|
-
labels:
|
|
43
|
+
labels: I
|
|
45
44
|
})
|
|
46
45
|
},
|
|
47
46
|
{
|
|
48
47
|
id: "status",
|
|
49
48
|
meta: { fitContent: !0 },
|
|
50
|
-
header:
|
|
51
|
-
cell: ({ row: e }) => /* @__PURE__ */ _(
|
|
49
|
+
header: I.tableHeaderStatus,
|
|
50
|
+
cell: ({ row: e }) => /* @__PURE__ */ _(C, { row: e.original })
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
id: "amount",
|
|
55
54
|
meta: { fitContent: !0 },
|
|
56
55
|
header: () => /* @__PURE__ */ _("span", {
|
|
57
56
|
className: "ttw:block ttw:text-right",
|
|
58
|
-
children:
|
|
57
|
+
children: I.tableHeaderAmount
|
|
59
58
|
}),
|
|
60
|
-
cell: ({ row: e }) => /* @__PURE__ */ _(
|
|
59
|
+
cell: ({ row: e }) => /* @__PURE__ */ _(w, { row: e.original })
|
|
61
60
|
}
|
|
62
|
-
],
|
|
63
|
-
onRowClick: (e) =>
|
|
61
|
+
], R = A ? {
|
|
62
|
+
onRowClick: (e) => A(e.rowKey),
|
|
64
63
|
rowAriaLabel: (e) => e.ariaLabel
|
|
65
|
-
} : {},
|
|
66
|
-
...
|
|
64
|
+
} : {}, z = O ? /* @__PURE__ */ _(u, {
|
|
65
|
+
...O,
|
|
67
66
|
labels: {
|
|
68
|
-
rowsPerPageLabel:
|
|
69
|
-
previousPageButton:
|
|
70
|
-
nextPageButton:
|
|
67
|
+
rowsPerPageLabel: I.paginationRowsPerPage,
|
|
68
|
+
previousPageButton: I.paginationPreviousPage,
|
|
69
|
+
nextPageButton: I.paginationNextPage
|
|
71
70
|
}
|
|
72
|
-
}) : null,
|
|
71
|
+
}) : null, B = p && !r ? /* @__PURE__ */ _("span", {
|
|
73
72
|
className: "ttw:inline-flex ttw:shrink-0",
|
|
74
|
-
title:
|
|
73
|
+
title: x ? I.transferMoneyCtaDisabledTooltip : void 0,
|
|
75
74
|
children: /* @__PURE__ */ _(t, {
|
|
76
75
|
type: "button",
|
|
77
76
|
size: "sm",
|
|
78
77
|
className: "ttw:whitespace-nowrap",
|
|
79
|
-
disabled:
|
|
80
|
-
onClick:
|
|
81
|
-
"data-testid":
|
|
82
|
-
children:
|
|
78
|
+
disabled: x,
|
|
79
|
+
onClick: x ? void 0 : E,
|
|
80
|
+
"data-testid": F?.transferMoneyButton,
|
|
81
|
+
children: I.transferMoneyCta
|
|
83
82
|
})
|
|
84
|
-
}) : void 0,
|
|
83
|
+
}) : void 0, V = !r && !a && e.length > 0;
|
|
85
84
|
return /* @__PURE__ */ v(g, { children: [
|
|
86
85
|
/* @__PURE__ */ _(o, {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
bodyClassName: H ? "ttw:p-0" : void 0,
|
|
86
|
+
title: I.widgetTitle,
|
|
87
|
+
action: B,
|
|
88
|
+
bodyClassName: V ? "ttw:p-0" : void 0,
|
|
91
89
|
children: r ? /* @__PURE__ */ _(l, {
|
|
92
90
|
isLoading: !0,
|
|
93
|
-
loadingLabel:
|
|
91
|
+
loadingLabel: I.loadingLabel,
|
|
94
92
|
children: /* @__PURE__ */ _(i, {
|
|
95
|
-
"data-testid":
|
|
93
|
+
"data-testid": F?.skeleton,
|
|
96
94
|
height: 120,
|
|
97
95
|
width: "100%",
|
|
98
96
|
className: "ttw:rounded-md"
|
|
99
97
|
})
|
|
100
98
|
}) : a ? /* @__PURE__ */ _(c, {
|
|
101
|
-
title:
|
|
102
|
-
description:
|
|
103
|
-
retryLabel:
|
|
99
|
+
title: I.loadErrorTitle,
|
|
100
|
+
description: I.loadErrorDescription,
|
|
101
|
+
retryLabel: I.loadErrorRetry,
|
|
104
102
|
onRetry: f,
|
|
105
|
-
testId:
|
|
103
|
+
testId: F?.error
|
|
106
104
|
}) : e.length === 0 ? /* @__PURE__ */ v("div", {
|
|
107
105
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
108
106
|
children: [/* @__PURE__ */ _(s, {
|
|
109
|
-
title:
|
|
110
|
-
description:
|
|
111
|
-
testId:
|
|
112
|
-
}),
|
|
107
|
+
title: I.emptyTitle,
|
|
108
|
+
description: I.emptyDescription,
|
|
109
|
+
testId: F?.empty
|
|
110
|
+
}), O && !O.isPreviousDisabled ? z : null]
|
|
113
111
|
}) : /* @__PURE__ */ v("div", {
|
|
114
112
|
className: "ttw:flex ttw:flex-col",
|
|
115
113
|
children: [/* @__PURE__ */ _(n, {
|
|
116
114
|
framed: !1,
|
|
117
|
-
columns:
|
|
115
|
+
columns: L,
|
|
118
116
|
data: e,
|
|
119
117
|
getRowId: (e) => e.rowKey,
|
|
120
|
-
rowTestId:
|
|
121
|
-
rowClassName: (e) => e.rowKey ===
|
|
122
|
-
...
|
|
123
|
-
renderCard: (e) => /* @__PURE__ */ _(
|
|
118
|
+
rowTestId: F?.transferRow,
|
|
119
|
+
rowClassName: (e) => e.rowKey === k ? "ttw:bg-muted" : void 0,
|
|
120
|
+
...R,
|
|
121
|
+
renderCard: (e) => /* @__PURE__ */ _(T, {
|
|
124
122
|
row: e,
|
|
125
|
-
labels:
|
|
123
|
+
labels: I
|
|
126
124
|
}),
|
|
127
125
|
showPagination: !1,
|
|
128
|
-
sorting:
|
|
129
|
-
onSortingChange:
|
|
126
|
+
sorting: y,
|
|
127
|
+
onSortingChange: b,
|
|
130
128
|
pageSize: e.length,
|
|
131
|
-
pageSizeOptions:
|
|
132
|
-
onPageSizeChange:
|
|
133
|
-
onNextPage:
|
|
134
|
-
onPrevPage:
|
|
135
|
-
}),
|
|
129
|
+
pageSizeOptions: O?.pageSizeOptions ?? [],
|
|
130
|
+
onPageSizeChange: b,
|
|
131
|
+
onNextPage: b,
|
|
132
|
+
onPrevPage: b
|
|
133
|
+
}), z]
|
|
136
134
|
})
|
|
137
135
|
}),
|
|
138
136
|
/* @__PURE__ */ _(m, {
|
|
139
|
-
...
|
|
140
|
-
labels:
|
|
137
|
+
...D,
|
|
138
|
+
labels: I
|
|
141
139
|
}),
|
|
142
140
|
/* @__PURE__ */ _(h, {
|
|
143
|
-
detail:
|
|
144
|
-
onClose:
|
|
145
|
-
onLinkAccountClick:
|
|
146
|
-
labels:
|
|
147
|
-
testIds:
|
|
141
|
+
detail: j,
|
|
142
|
+
onClose: M,
|
|
143
|
+
onLinkAccountClick: N,
|
|
144
|
+
labels: I,
|
|
145
|
+
testIds: F?.transferDetail
|
|
148
146
|
})
|
|
149
147
|
] });
|
|
150
148
|
}
|
|
151
|
-
function
|
|
149
|
+
function S({ account: e, labels: t }) {
|
|
152
150
|
return /* @__PURE__ */ _(p, {
|
|
153
151
|
singleLine: !0,
|
|
154
152
|
numberLabels: f(t),
|
|
@@ -156,19 +154,19 @@ function C({ account: e, labels: t }) {
|
|
|
156
154
|
number: e.number
|
|
157
155
|
});
|
|
158
156
|
}
|
|
159
|
-
function
|
|
157
|
+
function C({ row: t }) {
|
|
160
158
|
return /* @__PURE__ */ _(e, {
|
|
161
159
|
tone: t.statusTone,
|
|
162
160
|
children: t.statusLabel
|
|
163
161
|
});
|
|
164
162
|
}
|
|
165
|
-
function
|
|
163
|
+
function w({ row: e }) {
|
|
166
164
|
return /* @__PURE__ */ _("span", {
|
|
167
165
|
className: a("ttw:block ttw:text-right ttw:font-semibold ttw:whitespace-nowrap ttw:tabular-nums", e.isAmountStruckThrough && "ttw:line-through"),
|
|
168
166
|
children: e.amountLabel
|
|
169
167
|
});
|
|
170
168
|
}
|
|
171
|
-
function
|
|
169
|
+
function T({ row: e, labels: t }) {
|
|
172
170
|
return /* @__PURE__ */ v("div", {
|
|
173
171
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
174
172
|
children: [
|
|
@@ -177,23 +175,23 @@ function E({ row: e, labels: t }) {
|
|
|
177
175
|
children: [/* @__PURE__ */ _("span", {
|
|
178
176
|
className: "ttw:text-muted-foreground",
|
|
179
177
|
children: e.dateLabel
|
|
180
|
-
}), /* @__PURE__ */ _(
|
|
178
|
+
}), /* @__PURE__ */ _(w, { row: e })]
|
|
181
179
|
}),
|
|
182
180
|
/* @__PURE__ */ _(r, { items: [{
|
|
183
181
|
label: t.transferFromLabel,
|
|
184
|
-
value: /* @__PURE__ */ _(
|
|
182
|
+
value: /* @__PURE__ */ _(S, {
|
|
185
183
|
account: e.from,
|
|
186
184
|
labels: t
|
|
187
185
|
})
|
|
188
186
|
}, {
|
|
189
187
|
label: t.transferToLabel,
|
|
190
|
-
value: /* @__PURE__ */ _(
|
|
188
|
+
value: /* @__PURE__ */ _(S, {
|
|
191
189
|
account: e.to,
|
|
192
190
|
labels: t
|
|
193
191
|
})
|
|
194
192
|
}] }),
|
|
195
|
-
/* @__PURE__ */ _(
|
|
193
|
+
/* @__PURE__ */ _(C, { row: e })
|
|
196
194
|
]
|
|
197
195
|
});
|
|
198
196
|
}
|
|
199
|
-
export { d as TRANSFERS_WIDGET_LABELS_EN,
|
|
197
|
+
export { d as TRANSFERS_WIDGET_LABELS_EN, x as TransfersWidget };
|
|
@@ -17,10 +17,16 @@ function l({ sections: t, availableSections: r, grantedScopes: l, labels: u, sec
|
|
|
17
17
|
i(() => {
|
|
18
18
|
v !== e.Accounts && b(null);
|
|
19
19
|
}, [v]);
|
|
20
|
-
let x =
|
|
20
|
+
let [x, S] = a(null);
|
|
21
|
+
i(() => {
|
|
22
|
+
S((e) => e === v ? e : null);
|
|
23
|
+
}, [v]);
|
|
24
|
+
let C = n((e) => {
|
|
21
25
|
_(e), p?.(e);
|
|
22
|
-
}, [p, _]),
|
|
26
|
+
}, [p, _]), w = n((t) => {
|
|
23
27
|
b(t), _(e.Accounts), p?.(e.Accounts);
|
|
28
|
+
}, [p, _]), T = n((e) => {
|
|
29
|
+
S(e), _(e), p?.(e);
|
|
24
30
|
}, [p, _]);
|
|
25
31
|
return /* @__PURE__ */ o(c.Provider, {
|
|
26
32
|
value: {
|
|
@@ -29,8 +35,10 @@ function l({ sections: t, availableSections: r, grantedScopes: l, labels: u, sec
|
|
|
29
35
|
grantedScopes: l,
|
|
30
36
|
labels: u,
|
|
31
37
|
arrivingAccountId: y,
|
|
32
|
-
navigate:
|
|
33
|
-
openAccount:
|
|
38
|
+
navigate: C,
|
|
39
|
+
openAccount: w,
|
|
40
|
+
arrivingFlow: x,
|
|
41
|
+
openFlow: T,
|
|
34
42
|
cardArtSrc: m
|
|
35
43
|
},
|
|
36
44
|
children: h
|
|
@@ -16,6 +16,15 @@ var n = {
|
|
|
16
16
|
settings: "Settings"
|
|
17
17
|
},
|
|
18
18
|
sectionTitle: { bankTagline: "Business Banking provided by {bankName}" },
|
|
19
|
+
quickActions: {
|
|
20
|
+
groupLabel: "Quick actions",
|
|
21
|
+
transferMoney: "Transfer money",
|
|
22
|
+
payBill: "Pay a bill",
|
|
23
|
+
createInvoice: "Create an invoice",
|
|
24
|
+
uploadReceipt: "Upload a receipt",
|
|
25
|
+
issueCard: "Issue a card",
|
|
26
|
+
inviteTeammate: "Invite a teammate"
|
|
27
|
+
},
|
|
19
28
|
disclosure: {
|
|
20
29
|
initFailedState: {
|
|
21
30
|
title: "We couldn't load this page",
|
|
@@ -2,17 +2,20 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { WidgetSuiteSectionId as e } from "./sectionIds.js";
|
|
6
|
+
import { useWidgetSuiteProvider as t } from "../WidgetSuiteProvider.js";
|
|
7
|
+
import { Scope as n } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
6
8
|
import "../../../../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { BillPayWidget as
|
|
9
|
+
import { BillPayWidget as r } from "../../../../../../bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js";
|
|
8
10
|
import "../../../../../../bill-pay-widget/feature/dist/index.js";
|
|
9
|
-
import { jsx as
|
|
11
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
10
12
|
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
+
function a() {
|
|
14
|
+
let { arrivingFlow: n } = t();
|
|
15
|
+
return /* @__PURE__ */ i(r, { ...n === e.BillPay && { initialView: "create" } });
|
|
13
16
|
}
|
|
14
|
-
var
|
|
15
|
-
anyOfScopes: [
|
|
16
|
-
Content:
|
|
17
|
+
var o = {
|
|
18
|
+
anyOfScopes: [n.PayableReadOrg],
|
|
19
|
+
Content: a
|
|
17
20
|
};
|
|
18
|
-
export {
|
|
21
|
+
export { a as BillPaySection, o as billPaySection };
|
|
@@ -2,39 +2,41 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { WidgetSuiteSectionId as e } from "./sectionIds.js";
|
|
6
|
+
import { useWidgetSuiteProvider as t } from "../WidgetSuiteProvider.js";
|
|
7
|
+
import { hasAnyScope as n } from "../../../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
8
|
+
import { Scope as r } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
8
9
|
import "../../../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { SectionHeading as
|
|
10
|
+
import { SectionHeading as i } from "../../../../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
|
|
10
11
|
import "../../../../../../shared/ui/dist/index.js";
|
|
11
|
-
import { CreditCardsWidget as
|
|
12
|
-
import { DebitCardsWidget as
|
|
12
|
+
import { CreditCardsWidget as a } from "../../../../../../cards-widget/feature/dist/lib/CreditCardsWidget.js";
|
|
13
|
+
import { DebitCardsWidget as o } from "../../../../../../cards-widget/feature/dist/lib/DebitCardsWidget.js";
|
|
13
14
|
import "../../../../../../cards-widget/feature/dist/index.js";
|
|
14
|
-
import { jsx as
|
|
15
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
15
16
|
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js
|
|
16
|
-
function
|
|
17
|
-
let { grantedScopes:
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
function l() {
|
|
18
|
+
let { grantedScopes: l, labels: u, cardArtSrc: d, arrivingFlow: f } = t(), p = u.sections.cards, m = n(l, [r.CreditCardReadOrg]), h = n(l, [r.DebitCardReadOrg]), g = m && h;
|
|
19
|
+
return /* @__PURE__ */ c("div", {
|
|
19
20
|
className: "ttw:grid ttw:gap-8",
|
|
20
|
-
children: [
|
|
21
|
-
...
|
|
22
|
-
headerStart:
|
|
21
|
+
children: [m && /* @__PURE__ */ s(a, {
|
|
22
|
+
...p.creditCards,
|
|
23
|
+
headerStart: g && /* @__PURE__ */ s(i, {
|
|
23
24
|
className: "ttw:mb-0",
|
|
24
|
-
children:
|
|
25
|
+
children: p.creditCardsTitle
|
|
25
26
|
})
|
|
26
|
-
}),
|
|
27
|
-
...
|
|
28
|
-
cardArtSrc:
|
|
29
|
-
|
|
27
|
+
}), h && /* @__PURE__ */ s(o, {
|
|
28
|
+
...p.debitCards,
|
|
29
|
+
cardArtSrc: d,
|
|
30
|
+
...f === e.Cards && { initialView: "create" },
|
|
31
|
+
headerStart: g && /* @__PURE__ */ s(i, {
|
|
30
32
|
className: "ttw:mb-0",
|
|
31
|
-
children:
|
|
33
|
+
children: p.debitCardsTitle
|
|
32
34
|
})
|
|
33
35
|
})]
|
|
34
36
|
});
|
|
35
37
|
}
|
|
36
|
-
var
|
|
37
|
-
anyOfScopes: [
|
|
38
|
-
Content:
|
|
38
|
+
var u = {
|
|
39
|
+
anyOfScopes: [r.CreditCardReadOrg, r.DebitCardReadOrg],
|
|
40
|
+
Content: l
|
|
39
41
|
};
|
|
40
|
-
export {
|
|
42
|
+
export { l as CardsSection, u as cardsSection };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { QuickActionsBar as e } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { WidgetSuiteSectionId as t } from "./sectionIds.js";
|
|
7
|
+
import { useWidgetSuiteProvider as n } from "../WidgetSuiteProvider.js";
|
|
8
|
+
import { hasAnyScope as r } from "../../../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
9
|
+
import { Scope as i } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
10
|
+
import "../../../../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
12
|
+
import { ArrowRightLeft as o, Banknote as s, CreditCard as c, File as l, ReceiptText as u, UserPlus as d } from "lucide-react";
|
|
13
|
+
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js
|
|
14
|
+
var f = {
|
|
15
|
+
root: "widget-suite-quick-actions",
|
|
16
|
+
transferMoney: "widget-suite-quick-actions-transfer-money",
|
|
17
|
+
payBill: "widget-suite-quick-actions-pay-bill",
|
|
18
|
+
createInvoice: "widget-suite-quick-actions-create-invoice",
|
|
19
|
+
uploadReceipt: "widget-suite-quick-actions-upload-receipt",
|
|
20
|
+
issueCard: "widget-suite-quick-actions-issue-card",
|
|
21
|
+
inviteTeammate: "widget-suite-quick-actions-invite-teammate"
|
|
22
|
+
}, p = [
|
|
23
|
+
{
|
|
24
|
+
key: "transferMoney",
|
|
25
|
+
section: t.Transfers,
|
|
26
|
+
anyOfScopes: [i.TransferWriteOrg],
|
|
27
|
+
icon: /* @__PURE__ */ a(o, {})
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
key: "payBill",
|
|
31
|
+
section: t.BillPay,
|
|
32
|
+
anyOfScopes: [i.PayablePayOrg],
|
|
33
|
+
icon: /* @__PURE__ */ a(s, {})
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: "createInvoice",
|
|
37
|
+
section: t.Invoicing,
|
|
38
|
+
anyOfScopes: [i.InvoiceWriteOrg],
|
|
39
|
+
icon: /* @__PURE__ */ a(l, {})
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: "uploadReceipt",
|
|
43
|
+
section: t.Expenses,
|
|
44
|
+
anyOfScopes: [i.ExpenseWriteSelf, i.ExpenseWriteOrg],
|
|
45
|
+
icon: /* @__PURE__ */ a(u, {})
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: "issueCard",
|
|
49
|
+
section: t.Cards,
|
|
50
|
+
anyOfScopes: [i.DebitCardIssueOrg],
|
|
51
|
+
icon: /* @__PURE__ */ a(c, {})
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: "inviteTeammate",
|
|
55
|
+
section: t.Settings,
|
|
56
|
+
anyOfScopes: [i.UserWriteOrg],
|
|
57
|
+
icon: /* @__PURE__ */ a(d, {})
|
|
58
|
+
}
|
|
59
|
+
];
|
|
60
|
+
function m() {
|
|
61
|
+
let { grantedScopes: t, availableSections: i, labels: o, openFlow: s } = n(), c = p.filter(({ section: e, anyOfScopes: n }) => i.includes(e) && r(t, n)).map(({ key: e, section: t, icon: n }) => ({
|
|
62
|
+
id: e,
|
|
63
|
+
label: o.quickActions[e],
|
|
64
|
+
icon: n,
|
|
65
|
+
onClick: () => s(t),
|
|
66
|
+
testId: f[e]
|
|
67
|
+
}));
|
|
68
|
+
return /* @__PURE__ */ a(e, {
|
|
69
|
+
actions: c,
|
|
70
|
+
labels: { groupLabel: o.quickActions.groupLabel },
|
|
71
|
+
testIds: { root: f.root }
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export { f as DASHBOARD_QUICK_ACTIONS_TEST_IDS, m as DashboardQuickActions };
|
|
@@ -8,25 +8,29 @@ import { useWidgetSuiteProvider as n } from "../WidgetSuiteProvider.js";
|
|
|
8
8
|
import { hasAnyScope as r } from "../../../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
9
9
|
import { Scope as i } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
10
10
|
import "../../../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import {
|
|
11
|
+
import { DashboardQuickActions as a } from "./DashboardQuickActions.js";
|
|
12
|
+
import { BalancesWidget as o } from "../../../../../../balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetFeature.js";
|
|
12
13
|
import "../../../../../../balances-widget/feature/dist/index.js";
|
|
13
|
-
import { InsightsWidget as
|
|
14
|
+
import { InsightsWidget as s } from "../../../../../../insights-widget/feature/dist/lib/InsightsWidget/InsightsWidgetFeature.js";
|
|
14
15
|
import "../../../../../../insights-widget/feature/dist/index.js";
|
|
15
|
-
import { jsx as
|
|
16
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
16
17
|
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js
|
|
17
|
-
function
|
|
18
|
-
let { grantedScopes:
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
className:
|
|
21
|
-
children: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
function u() {
|
|
19
|
+
let { grantedScopes: u, availableSections: d, labels: f, navigate: p, openAccount: m } = n(), h = r(u, [i.BankAccountReadOrg]), g = d.includes(t.Accounts), _ = d.includes(t.Transfers), v = g ? () => p(t.Accounts) : void 0;
|
|
20
|
+
return /* @__PURE__ */ l("div", {
|
|
21
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
22
|
+
children: [/* @__PURE__ */ c(a, {}), /* @__PURE__ */ l("div", {
|
|
23
|
+
className: e("ttw:grid ttw:gap-4", h && "ttw:md:grid-cols-2"),
|
|
24
|
+
children: [h && /* @__PURE__ */ c(o, {
|
|
25
|
+
...f.sections.dashboard.balances,
|
|
26
|
+
onViewAllAccountsClick: v,
|
|
27
|
+
onBalanceRowClick: g ? m : void 0
|
|
28
|
+
}), /* @__PURE__ */ c(s, {
|
|
29
|
+
...f.sections.dashboard.insights,
|
|
30
|
+
onLinkExternalAccountClick: _ ? () => p(t.Transfers) : void 0
|
|
31
|
+
})]
|
|
28
32
|
})]
|
|
29
33
|
});
|
|
30
34
|
}
|
|
31
|
-
var
|
|
32
|
-
export {
|
|
35
|
+
var d = { Content: u };
|
|
36
|
+
export { u as DashboardSection, d as dashboardSection };
|
|
@@ -2,18 +2,24 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { WidgetSuiteSectionId as e } from "./sectionIds.js";
|
|
6
|
+
import { useWidgetSuiteProvider as t } from "../WidgetSuiteProvider.js";
|
|
7
|
+
import { Scope as n } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
6
8
|
import "../../../../../../shared/data-access/dist/index.js";
|
|
7
|
-
import { ReceivablesWidget as
|
|
9
|
+
import { ReceivablesWidget as r } from "../../../../../../invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js";
|
|
8
10
|
import "../../../../../../invoicing-widget/feature/dist/index.js";
|
|
9
|
-
import { jsx as
|
|
11
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
10
12
|
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js
|
|
11
|
-
function
|
|
12
|
-
|
|
13
|
+
function a({ renderTitle: n } = {}) {
|
|
14
|
+
let { arrivingFlow: a } = t();
|
|
15
|
+
return /* @__PURE__ */ i(r, {
|
|
16
|
+
headerStart: n?.(),
|
|
17
|
+
...a === e.Invoicing && { initialView: "create" }
|
|
18
|
+
});
|
|
13
19
|
}
|
|
14
|
-
var
|
|
15
|
-
anyOfScopes: [
|
|
20
|
+
var o = {
|
|
21
|
+
anyOfScopes: [n.InvoiceReadOrg],
|
|
16
22
|
placesOwnTitle: !0,
|
|
17
|
-
Content:
|
|
23
|
+
Content: a
|
|
18
24
|
};
|
|
19
|
-
export {
|
|
25
|
+
export { a as InvoicingSection, o as invoicingSection };
|
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { WidgetSuiteSectionId as e } from "./sectionIds.js";
|
|
6
|
+
import { useWidgetSuiteProvider as t } from "../WidgetSuiteProvider.js";
|
|
7
|
+
import { SettingsWidget as n } from "../../../../../../settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js";
|
|
7
8
|
import "../../../../../../settings-widget/feature/dist/index.js";
|
|
8
|
-
import { jsx as
|
|
9
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
9
10
|
// ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js
|
|
10
|
-
function
|
|
11
|
-
let { labels:
|
|
12
|
-
return /* @__PURE__ */ n
|
|
11
|
+
function i() {
|
|
12
|
+
let { labels: i, arrivingFlow: a } = t();
|
|
13
|
+
return /* @__PURE__ */ r(n, {
|
|
14
|
+
...i.sections.settings,
|
|
15
|
+
...a === e.Settings && {
|
|
16
|
+
defaultSelectedSection: "team",
|
|
17
|
+
teamInitialView: "invite"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
13
20
|
}
|
|
14
|
-
var
|
|
15
|
-
export {
|
|
21
|
+
var a = { Content: i };
|
|
22
|
+
export { i as SettingsSection, a as settingsSection };
|