@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.
Files changed (23) hide show
  1. package/dist/index.css +6 -13
  2. package/dist/index.d.ts +18 -2
  3. package/dist/lib/WidgetSuite.d.ts +18 -2
  4. package/dist/libs/tesouro-embedded-components-react/balances-widget/ui/dist/lib/BalancesWidget/BalancesWidget.js +33 -34
  5. package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/InsightsWidget.js +30 -32
  6. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +29 -30
  7. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +3 -4
  9. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetContainer/WidgetContainer.js +3 -4
  10. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetFrame/WidgetFrame.js +14 -21
  11. package/dist/libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/TransfersWidget.js +72 -74
  12. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +12 -4
  13. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js +9 -0
  14. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +12 -9
  15. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js +25 -23
  16. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js +74 -0
  17. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +20 -16
  18. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +15 -9
  19. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js +15 -8
  20. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/TransfersSection.js +23 -21
  21. package/dist/packages/shared-ui-shadcn/dist/index.js +1040 -996
  22. package/package.json +1 -1
  23. 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 b = [], x = () => void 0;
17
- function S({ transferRows: e, isLoading: r, isError: a, onRetry: f, showTransferMoneyCta: p, isTransferMoneyCtaDisabled: S = !1, onTransferMoneyClick: D, transferMoneyModal: O, pagination: k, selectedRowKey: A, onRowClick: j, transferDetail: M, onTransferDetailClose: N, onLinkAccountClick: P, labels: F, testIds: I }) {
18
- let L = {
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
- ...F
21
- }, R = [
19
+ ...P
20
+ }, L = [
22
21
  {
23
22
  id: "date",
24
23
  meta: { fitContent: !0 },
25
- header: L.tableHeaderDate,
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: L.transferFromLabel,
34
- cell: ({ row: e }) => /* @__PURE__ */ _(C, {
32
+ header: I.transferFromLabel,
33
+ cell: ({ row: e }) => /* @__PURE__ */ _(S, {
35
34
  account: e.original.from,
36
- labels: L
35
+ labels: I
37
36
  })
38
37
  },
39
38
  {
40
39
  id: "to",
41
- header: L.transferToLabel,
42
- cell: ({ row: e }) => /* @__PURE__ */ _(C, {
40
+ header: I.transferToLabel,
41
+ cell: ({ row: e }) => /* @__PURE__ */ _(S, {
43
42
  account: e.original.to,
44
- labels: L
43
+ labels: I
45
44
  })
46
45
  },
47
46
  {
48
47
  id: "status",
49
48
  meta: { fitContent: !0 },
50
- header: L.tableHeaderStatus,
51
- cell: ({ row: e }) => /* @__PURE__ */ _(w, { row: e.original })
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: L.tableHeaderAmount
57
+ children: I.tableHeaderAmount
59
58
  }),
60
- cell: ({ row: e }) => /* @__PURE__ */ _(T, { row: e.original })
59
+ cell: ({ row: e }) => /* @__PURE__ */ _(w, { row: e.original })
61
60
  }
62
- ], z = j ? {
63
- onRowClick: (e) => j(e.rowKey),
61
+ ], R = A ? {
62
+ onRowClick: (e) => A(e.rowKey),
64
63
  rowAriaLabel: (e) => e.ariaLabel
65
- } : {}, B = k ? /* @__PURE__ */ _(u, {
66
- ...k,
64
+ } : {}, z = O ? /* @__PURE__ */ _(u, {
65
+ ...O,
67
66
  labels: {
68
- rowsPerPageLabel: L.paginationRowsPerPage,
69
- previousPageButton: L.paginationPreviousPage,
70
- nextPageButton: L.paginationNextPage
67
+ rowsPerPageLabel: I.paginationRowsPerPage,
68
+ previousPageButton: I.paginationPreviousPage,
69
+ nextPageButton: I.paginationNextPage
71
70
  }
72
- }) : null, V = p && !r ? /* @__PURE__ */ _("span", {
71
+ }) : null, B = p && !r ? /* @__PURE__ */ _("span", {
73
72
  className: "ttw:inline-flex ttw:shrink-0",
74
- title: S ? L.transferMoneyCtaDisabledTooltip : void 0,
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: S,
80
- onClick: S ? void 0 : D,
81
- "data-testid": I?.transferMoneyButton,
82
- children: L.transferMoneyCta
78
+ disabled: x,
79
+ onClick: x ? void 0 : E,
80
+ "data-testid": F?.transferMoneyButton,
81
+ children: I.transferMoneyCta
83
82
  })
84
- }) : void 0, H = !r && !a && e.length > 0;
83
+ }) : void 0, V = !r && !a && e.length > 0;
85
84
  return /* @__PURE__ */ v(g, { children: [
86
85
  /* @__PURE__ */ _(o, {
87
- icon: /* @__PURE__ */ _(y, {}),
88
- title: L.widgetTitle,
89
- action: V,
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: L.loadingLabel,
91
+ loadingLabel: I.loadingLabel,
94
92
  children: /* @__PURE__ */ _(i, {
95
- "data-testid": I?.skeleton,
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: L.loadErrorTitle,
102
- description: L.loadErrorDescription,
103
- retryLabel: L.loadErrorRetry,
99
+ title: I.loadErrorTitle,
100
+ description: I.loadErrorDescription,
101
+ retryLabel: I.loadErrorRetry,
104
102
  onRetry: f,
105
- testId: I?.error
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: L.emptyTitle,
110
- description: L.emptyDescription,
111
- testId: I?.empty
112
- }), k && !k.isPreviousDisabled ? B : null]
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: R,
115
+ columns: L,
118
116
  data: e,
119
117
  getRowId: (e) => e.rowKey,
120
- rowTestId: I?.transferRow,
121
- rowClassName: (e) => e.rowKey === A ? "ttw:bg-muted" : void 0,
122
- ...z,
123
- renderCard: (e) => /* @__PURE__ */ _(E, {
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: L
123
+ labels: I
126
124
  }),
127
125
  showPagination: !1,
128
- sorting: b,
129
- onSortingChange: x,
126
+ sorting: y,
127
+ onSortingChange: b,
130
128
  pageSize: e.length,
131
- pageSizeOptions: k?.pageSizeOptions ?? [],
132
- onPageSizeChange: x,
133
- onNextPage: x,
134
- onPrevPage: x
135
- }), B]
129
+ pageSizeOptions: O?.pageSizeOptions ?? [],
130
+ onPageSizeChange: b,
131
+ onNextPage: b,
132
+ onPrevPage: b
133
+ }), z]
136
134
  })
137
135
  }),
138
136
  /* @__PURE__ */ _(m, {
139
- ...O,
140
- labels: L
137
+ ...D,
138
+ labels: I
141
139
  }),
142
140
  /* @__PURE__ */ _(h, {
143
- detail: M,
144
- onClose: N,
145
- onLinkAccountClick: P,
146
- labels: L,
147
- testIds: I?.transferDetail
141
+ detail: j,
142
+ onClose: M,
143
+ onLinkAccountClick: N,
144
+ labels: I,
145
+ testIds: F?.transferDetail
148
146
  })
149
147
  ] });
150
148
  }
151
- function C({ account: e, labels: t }) {
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 w({ row: t }) {
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 T({ row: e }) {
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 E({ row: e, labels: t }) {
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__ */ _(T, { row: e })]
178
+ }), /* @__PURE__ */ _(w, { row: e })]
181
179
  }),
182
180
  /* @__PURE__ */ _(r, { items: [{
183
181
  label: t.transferFromLabel,
184
- value: /* @__PURE__ */ _(C, {
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__ */ _(C, {
188
+ value: /* @__PURE__ */ _(S, {
191
189
  account: e.to,
192
190
  labels: t
193
191
  })
194
192
  }] }),
195
- /* @__PURE__ */ _(w, { row: e })
193
+ /* @__PURE__ */ _(C, { row: e })
196
194
  ]
197
195
  });
198
196
  }
199
- export { d as TRANSFERS_WIDGET_LABELS_EN, S as TransfersWidget };
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 = n((e) => {
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, _]), S = n((t) => {
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: x,
33
- openAccount: S,
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 { Scope as e } from "../../../../../../shared/data-access/dist/lib/scopes.js";
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 t } from "../../../../../../bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js";
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 n } from "react/jsx-runtime";
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 r() {
12
- return /* @__PURE__ */ n(t, {});
13
+ function a() {
14
+ let { arrivingFlow: n } = t();
15
+ return /* @__PURE__ */ i(r, { ...n === e.BillPay && { initialView: "create" } });
13
16
  }
14
- var i = {
15
- anyOfScopes: [e.PayableReadOrg],
16
- Content: r
17
+ var o = {
18
+ anyOfScopes: [n.PayableReadOrg],
19
+ Content: a
17
20
  };
18
- export { r as BillPaySection, i as billPaySection };
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 { useWidgetSuiteProvider as e } from "../WidgetSuiteProvider.js";
6
- import { hasAnyScope as t } from "../../../../../../shared/data-access/dist/lib/hasAnyScope.js";
7
- import { Scope as n } from "../../../../../../shared/data-access/dist/lib/scopes.js";
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 r } from "../../../../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
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 i } from "../../../../../../cards-widget/feature/dist/lib/CreditCardsWidget.js";
12
- import { DebitCardsWidget as a } from "../../../../../../cards-widget/feature/dist/lib/DebitCardsWidget.js";
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 o, jsxs as s } from "react/jsx-runtime";
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 c() {
17
- let { grantedScopes: c, labels: l, cardArtSrc: u } = e(), d = l.sections.cards, f = t(c, [n.CreditCardReadOrg]), p = t(c, [n.DebitCardReadOrg]), m = f && p;
18
- return /* @__PURE__ */ s("div", {
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: [f && /* @__PURE__ */ o(i, {
21
- ...d.creditCards,
22
- headerStart: m && /* @__PURE__ */ o(r, {
21
+ children: [m && /* @__PURE__ */ s(a, {
22
+ ...p.creditCards,
23
+ headerStart: g && /* @__PURE__ */ s(i, {
23
24
  className: "ttw:mb-0",
24
- children: d.creditCardsTitle
25
+ children: p.creditCardsTitle
25
26
  })
26
- }), p && /* @__PURE__ */ o(a, {
27
- ...d.debitCards,
28
- cardArtSrc: u,
29
- headerStart: m && /* @__PURE__ */ o(r, {
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: d.debitCardsTitle
33
+ children: p.debitCardsTitle
32
34
  })
33
35
  })]
34
36
  });
35
37
  }
36
- var l = {
37
- anyOfScopes: [n.CreditCardReadOrg, n.DebitCardReadOrg],
38
- Content: c
38
+ var u = {
39
+ anyOfScopes: [r.CreditCardReadOrg, r.DebitCardReadOrg],
40
+ Content: l
39
41
  };
40
- export { c as CardsSection, l as cardsSection };
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 { BalancesWidget as a } from "../../../../../../balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetFeature.js";
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 o } from "../../../../../../insights-widget/feature/dist/lib/InsightsWidget/InsightsWidgetFeature.js";
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 s, jsxs as c } from "react/jsx-runtime";
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 l() {
18
- let { grantedScopes: l, availableSections: u, labels: d, navigate: f, openAccount: p } = n(), m = r(l, [i.BankAccountReadOrg]), h = u.includes(t.Accounts), g = u.includes(t.Transfers), _ = h ? () => f(t.Accounts) : void 0;
19
- return /* @__PURE__ */ c("div", {
20
- className: e("ttw:grid ttw:gap-4", m && "ttw:md:grid-cols-2"),
21
- children: [m && /* @__PURE__ */ s(a, {
22
- ...d.sections.dashboard.balances,
23
- onViewAllAccountsClick: _,
24
- onBalanceRowClick: h ? p : void 0
25
- }), /* @__PURE__ */ s(o, {
26
- ...d.sections.dashboard.insights,
27
- onLinkExternalAccountClick: g ? () => f(t.Transfers) : void 0
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 u = { Content: l };
32
- export { l as DashboardSection, u as dashboardSection };
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 { Scope as e } from "../../../../../../shared/data-access/dist/lib/scopes.js";
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 t } from "../../../../../../invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js";
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 n } from "react/jsx-runtime";
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 r({ renderTitle: e } = {}) {
12
- return /* @__PURE__ */ n(t, { headerStart: e?.() });
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 i = {
15
- anyOfScopes: [e.InvoiceReadOrg],
20
+ var o = {
21
+ anyOfScopes: [n.InvoiceReadOrg],
16
22
  placesOwnTitle: !0,
17
- Content: r
23
+ Content: a
18
24
  };
19
- export { r as InvoicingSection, i as invoicingSection };
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 { useWidgetSuiteProvider as e } from "../WidgetSuiteProvider.js";
6
- import { SettingsWidget as t } from "../../../../../../settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js";
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 n } from "react/jsx-runtime";
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 r() {
11
- let { labels: r } = e();
12
- return /* @__PURE__ */ n(t, { ...r.sections.settings });
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 i = { Content: r };
15
- export { r as SettingsSection, i as settingsSection };
21
+ var a = { Content: i };
22
+ export { i as SettingsSection, a as settingsSection };