@tesouro/embedded-components-react 0.11.101 → 0.11.102

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 (48) hide show
  1. package/dist/index.css +21 -17
  2. package/dist/index.d.ts +10 -6
  3. package/dist/lib/CardDetailsWidget.d.ts +6 -4
  4. package/dist/lib/CreditCardsWidget.d.ts +6 -4
  5. package/dist/lib/DebitCardsWidget.d.ts +6 -4
  6. package/dist/lib/SettingsWidget.d.ts +2 -1
  7. package/dist/lib/WidgetSuite.d.ts +8 -5
  8. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +199 -168
  9. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +44 -43
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +9 -9
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +2 -2
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +25 -284
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +291 -0
  16. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +3 -3
  17. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +28 -17
  18. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +21 -34
  19. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +71 -78
  20. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +71 -77
  21. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +43 -49
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +8 -1
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +98 -91
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +24 -21
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +14 -8
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +87 -81
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +63 -44
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +9 -6
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +302 -276
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +10 -10
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +36 -36
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +27 -13
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsSectionContent.js +22 -0
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +6 -7
  37. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +39 -37
  38. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -9
  39. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +39 -35
  40. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +59 -61
  41. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js +2 -2
  42. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js +2 -2
  43. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +3 -3
  44. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -103
  45. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +12 -12
  47. package/dist/packages/shared-ui-shadcn/dist/index.js +18 -15
  48. package/package.json +1 -1
@@ -3,59 +3,66 @@ import { EmptyState as p } from "../../../../shared/ui/dist/lib/EmptyState/Empty
3
3
  import { ErrorState as m } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
4
  import "../../../../shared/ui/dist/index.js";
5
5
  import { CHART_OF_ACCOUNTS_LABELS_EN as h } from "./index2.js";
6
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { ArrowDownIcon as y, ArrowUpDownIcon as b, ArrowUpIcon as x, MoreVerticalIcon as S, PencilIcon as C, Trash2Icon as w } from "lucide-react";
6
+ import { createPortal as g } from "react-dom";
7
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ import { ArrowDownIcon as b, ArrowUpDownIcon as x, ArrowUpIcon as S, MoreVerticalIcon as C, PencilIcon as w, Trash2Icon as T } from "lucide-react";
8
9
  // ../../libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js
9
- function T({ data: T, isLoading: E, isError: D, sorting: O, onSortingChange: k, pageSize: A, onPageSizeChange: j, pageSizeOptions: M, hasNextPage: N, hasPrevPage: P, onNextPage: F, onPrevPage: I, labels: L, emptyStateTestId: R, onEdit: z, onDelete: B, onAdd: V }) {
10
- let H = {
10
+ function E({ headerStart: E, headerActionContainer: D, data: O, isLoading: k, isError: A, sorting: j, onSortingChange: M, pageSize: N, onPageSizeChange: P, pageSizeOptions: F, hasNextPage: I, hasPrevPage: L, onNextPage: R, onPrevPage: z, labels: B, emptyStateTestId: V, onEdit: H, onDelete: U, onAdd: W }) {
11
+ let G = {
11
12
  ...h,
12
- ...L
13
- }, U = !!(z ?? B), W = H.subtitle ? /* @__PURE__ */ _("div", {
14
- className: "ttw:mb-4",
15
- children: /* @__PURE__ */ _("p", {
16
- className: "ttw:text-sm ttw:text-muted-foreground",
17
- children: H.subtitle
18
- })
19
- }) : null, G = T.length === 0 && !P, K = /* @__PURE__ */ v(g, { children: [W, V && !G && /* @__PURE__ */ _("div", {
20
- className: "ttw:mb-4 ttw:flex ttw:items-center ttw:justify-end",
21
- children: /* @__PURE__ */ _(e, {
22
- onClick: V,
23
- children: H.addAccount
24
- })
25
- })] }), q = (t) => t.is_external ? null : /* @__PURE__ */ _("div", {
13
+ ...B
14
+ }, K = !!(H ?? U), q = G.subtitle ? /* @__PURE__ */ v("p", {
15
+ className: "ttw:text-sm ttw:text-muted-foreground",
16
+ children: G.subtitle
17
+ }) : null, J = O.length === 0 && !L, Y = W && !J ? /* @__PURE__ */ v(e, {
18
+ size: "sm",
19
+ className: "ttw:ml-auto ttw:shrink-0",
20
+ onClick: W,
21
+ children: G.addAccount
22
+ }) : null, X = /* @__PURE__ */ y("div", {
23
+ className: "ttw:mb-4 ttw:flex ttw:flex-col ttw:gap-2",
24
+ children: [
25
+ D ? g(Y, D) : null,
26
+ E || D === void 0 && Y ? /* @__PURE__ */ y("div", {
27
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
28
+ children: [E, D === void 0 ? Y : null]
29
+ }) : null,
30
+ q
31
+ ]
32
+ }), Z = (t) => t.is_external ? null : /* @__PURE__ */ v("div", {
26
33
  className: "ttw:flex ttw:justify-end",
27
- children: /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _(d, { children: /* @__PURE__ */ v(l, { children: [/* @__PURE__ */ _(f, {
34
+ children: /* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(d, { children: /* @__PURE__ */ y(l, { children: [/* @__PURE__ */ v(f, {
28
35
  asChild: !0,
29
- children: /* @__PURE__ */ _(c, {
36
+ children: /* @__PURE__ */ v(c, {
30
37
  asChild: !0,
31
- children: /* @__PURE__ */ _(e, {
38
+ children: /* @__PURE__ */ v(e, {
32
39
  variant: "ghost",
33
40
  size: "icon-sm",
34
- "aria-label": H.openActionsMenu,
41
+ "aria-label": G.openActionsMenu,
35
42
  onClick: (e) => e.stopPropagation(),
36
- children: /* @__PURE__ */ _(S, { className: "ttw:h-4 ttw:w-4" })
43
+ children: /* @__PURE__ */ v(C, { className: "ttw:h-4 ttw:w-4" })
37
44
  })
38
45
  })
39
- }), /* @__PURE__ */ _(u, { children: H.openActionsMenu })] }) }), /* @__PURE__ */ v(a, {
46
+ }), /* @__PURE__ */ v(u, { children: G.openActionsMenu })] }) }), /* @__PURE__ */ y(a, {
40
47
  align: "end",
41
48
  onClick: (e) => e.stopPropagation(),
42
49
  children: [
43
- z && /* @__PURE__ */ v(o, {
44
- onClick: () => z(t),
45
- children: [/* @__PURE__ */ _(C, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), H.actionEdit]
50
+ H && /* @__PURE__ */ y(o, {
51
+ onClick: () => H(t),
52
+ children: [/* @__PURE__ */ v(w, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), G.actionEdit]
46
53
  }),
47
- z && B && /* @__PURE__ */ _(s, {}),
48
- B && /* @__PURE__ */ v(o, {
54
+ H && U && /* @__PURE__ */ v(s, {}),
55
+ U && /* @__PURE__ */ y(o, {
49
56
  variant: "destructive",
50
- onClick: () => B(t),
51
- children: [/* @__PURE__ */ _(w, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), H.actionDelete]
57
+ onClick: () => U(t),
58
+ children: [/* @__PURE__ */ v(T, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), G.actionDelete]
52
59
  })
53
60
  ]
54
61
  })] })
55
- }), J = [
62
+ }), Q = [
56
63
  {
57
64
  accessorKey: "nominal_code",
58
- header: H.columnGlCode,
65
+ header: G.columnGlCode,
59
66
  meta: { fitContent: !0 }
60
67
  },
61
68
  {
@@ -63,105 +70,105 @@ function T({ data: T, isLoading: E, isError: D, sorting: O, onSortingChange: k,
63
70
  enableSorting: !0,
64
71
  header: ({ column: t }) => {
65
72
  let n = t.getIsSorted();
66
- return /* @__PURE__ */ v("div", {
73
+ return /* @__PURE__ */ y("div", {
67
74
  className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
68
- children: [H.columnName, /* @__PURE__ */ _(e, {
75
+ children: [G.columnName, /* @__PURE__ */ v(e, {
69
76
  variant: "ghost",
70
- "aria-label": H.sortByName,
77
+ "aria-label": G.sortByName,
71
78
  onClick: () => t.toggleSorting(n === "asc"),
72
- children: _(n === "asc" ? x : n === "desc" ? y : b, { className: "ttw:size-4" })
79
+ children: v(n === "asc" ? S : n === "desc" ? b : x, { className: "ttw:size-4" })
73
80
  })]
74
81
  });
75
82
  }
76
83
  },
77
84
  {
78
85
  accessorKey: "description",
79
- header: H.columnDescription,
80
- cell: ({ row: e }) => /* @__PURE__ */ _("span", {
86
+ header: G.columnDescription,
87
+ cell: ({ row: e }) => /* @__PURE__ */ v("span", {
81
88
  className: "ttw:block ttw:max-w-50 ttw:truncate",
82
89
  title: e.original.description,
83
90
  children: e.original.description
84
91
  })
85
92
  },
86
- ...U ? [{
93
+ ...K ? [{
87
94
  id: "actions",
88
- header: () => /* @__PURE__ */ _("div", {
95
+ header: () => /* @__PURE__ */ v("div", {
89
96
  className: "ttw:flex ttw:justify-end",
90
- children: H.columnActions
97
+ children: G.columnActions
91
98
  }),
92
- cell: ({ row: e }) => q(e.original),
99
+ cell: ({ row: e }) => Z(e.original),
93
100
  meta: { fitContent: !0 }
94
101
  }] : []
95
- ], Y = z ? {
96
- onRowClick: (e) => z(e),
97
- rowAriaLabel: (e) => `${H.editAccount}: ${e.name}, ${e.nominal_code}`,
102
+ ], $ = H ? {
103
+ onRowClick: (e) => H(e),
104
+ rowAriaLabel: (e) => `${G.editAccount}: ${e.name}, ${e.nominal_code}`,
98
105
  isRowActionable: (e) => !e.is_external
99
106
  } : {};
100
- return /* @__PURE__ */ v(g, { children: [K, /* @__PURE__ */ _(r, {
101
- columns: J,
102
- data: D ? [] : T,
103
- sorting: O,
104
- onSortingChange: k,
105
- pageSize: A,
106
- onPageSizeChange: j,
107
- pageSizeOptions: M,
108
- hasNextPage: N,
109
- hasPrevPage: P,
110
- onNextPage: F,
111
- onPrevPage: I,
112
- showPagination: T.length > 0 || !!P,
113
- isLoading: !(!E || T.length !== 0 || D),
107
+ return /* @__PURE__ */ y(_, { children: [X, /* @__PURE__ */ v(r, {
108
+ columns: Q,
109
+ data: A ? [] : O,
110
+ sorting: j,
111
+ onSortingChange: M,
112
+ pageSize: N,
113
+ onPageSizeChange: P,
114
+ pageSizeOptions: F,
115
+ hasNextPage: I,
116
+ hasPrevPage: L,
117
+ onNextPage: R,
118
+ onPrevPage: z,
119
+ showPagination: O.length > 0 || !!L,
120
+ isLoading: !(!k || O.length !== 0 || A),
114
121
  labels: {
115
- loading: H.loading,
116
- previousPage: H.paginationPrev,
117
- nextPage: H.paginationNext
122
+ loading: G.loading,
123
+ previousPage: G.paginationPrev,
124
+ nextPage: G.paginationNext
118
125
  },
119
126
  getRowId: (e) => e.id,
120
- ...Y,
121
- rowContextMenu: (e) => !e.is_external && (z || B) ? /* @__PURE__ */ v(g, { children: [
122
- z && /* @__PURE__ */ _(t, {
123
- onClick: () => z(e),
124
- children: H.actionEdit
127
+ ...$,
128
+ rowContextMenu: (e) => !e.is_external && (H || U) ? /* @__PURE__ */ y(_, { children: [
129
+ H && /* @__PURE__ */ v(t, {
130
+ onClick: () => H(e),
131
+ children: G.actionEdit
125
132
  }),
126
- z && B && /* @__PURE__ */ _(n, {}),
127
- B && /* @__PURE__ */ _(t, {
133
+ H && U && /* @__PURE__ */ v(n, {}),
134
+ U && /* @__PURE__ */ v(t, {
128
135
  variant: "destructive",
129
- onClick: () => B(e),
130
- children: H.actionDelete
136
+ onClick: () => U(e),
137
+ children: G.actionDelete
131
138
  })
132
139
  ] }) : void 0,
133
- renderCard: !D && T.length > 0 ? (e) => /* @__PURE__ */ v("div", {
140
+ renderCard: !A && O.length > 0 ? (e) => /* @__PURE__ */ y("div", {
134
141
  className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
135
- children: [/* @__PURE__ */ v("div", {
142
+ children: [/* @__PURE__ */ y("div", {
136
143
  className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
137
144
  children: [
138
- /* @__PURE__ */ _("span", {
145
+ /* @__PURE__ */ v("span", {
139
146
  className: "ttw:truncate ttw:font-medium",
140
147
  title: e.name,
141
148
  children: e.name
142
149
  }),
143
- /* @__PURE__ */ _("span", { children: e.nominal_code }),
144
- /* @__PURE__ */ _("span", {
150
+ /* @__PURE__ */ v("span", { children: e.nominal_code }),
151
+ /* @__PURE__ */ v("span", {
145
152
  className: "ttw:truncate ttw:text-muted-foreground",
146
153
  title: e.description,
147
154
  children: e.description
148
155
  })
149
156
  ]
150
- }), U && q(e)]
157
+ }), K && Z(e)]
151
158
  }) : void 0,
152
- children: D ? /* @__PURE__ */ _(m, {
153
- title: H.errorTitle,
154
- description: H.errorDescription
155
- }) : P ? /* @__PURE__ */ _(p, {
156
- title: H.emptyPageTitle,
157
- description: H.emptyPageDescription
158
- }) : /* @__PURE__ */ _(p, {
159
- title: H.emptyTitle,
160
- description: H.emptyDescription,
161
- actionLabel: H.addAccount,
162
- onAction: V,
163
- testId: R
159
+ children: A ? /* @__PURE__ */ v(m, {
160
+ title: G.errorTitle,
161
+ description: G.errorDescription
162
+ }) : L ? /* @__PURE__ */ v(p, {
163
+ title: G.emptyPageTitle,
164
+ description: G.emptyPageDescription
165
+ }) : /* @__PURE__ */ v(p, {
166
+ title: G.emptyTitle,
167
+ description: G.emptyDescription,
168
+ actionLabel: G.addAccount,
169
+ onAction: W,
170
+ testId: V
164
171
  })
165
172
  })] });
166
173
  }
167
- export { T as ChartOfAccountsTable, T as default };
174
+ export { E as ChartOfAccountsTable, E as default };
@@ -3,42 +3,45 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { ExpenseApprovalPoliciesWidget as i } from "../../../../../expense-management-widget/approval-policies/feature/dist/index6.js";
6
+ import { ExpenseApprovalPoliciesWidget as i } from "../../../../../expense-management-widget/approval-policies/feature/dist/index7.js";
7
7
  import "../../../../../expense-management-widget/feature/dist/index.js";
8
8
  import { ExpenseRequirementsWidget as a } from "../../../../../shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js";
9
9
  import "../../../../../shared/expense-requirements/feature/dist/index.js";
10
10
  import { useState as o } from "react";
11
11
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
12
12
  // ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js
13
- function l({ approvalsLabel: l, requirementsLabel: u }) {
14
- let [d, f] = o("approvals"), [p, m] = o(null);
15
- return /* @__PURE__ */ s("div", {
16
- className: "ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
17
- children: /* @__PURE__ */ c(e, {
18
- value: d,
19
- onValueChange: f,
20
- className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
13
+ function l({ headerStart: l, headerActionContainer: u, approvalsLabel: d, requirementsLabel: f }) {
14
+ let [p, m] = o("approvals"), [h, g] = o(null);
15
+ return /* @__PURE__ */ c(e, {
16
+ value: p,
17
+ onValueChange: m,
18
+ className: "ttw:w-full ttw:gap-4",
19
+ children: [u === void 0 ? /* @__PURE__ */ c("header", {
20
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
21
+ children: [l, /* @__PURE__ */ s("div", {
22
+ ref: g,
23
+ className: "ttw:ml-auto ttw:shrink-0"
24
+ })]
25
+ }) : null, /* @__PURE__ */ c("div", {
26
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
21
27
  children: [
22
- /* @__PURE__ */ c("div", {
23
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
24
- children: [/* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
25
- value: "approvals",
26
- children: l
27
- }), /* @__PURE__ */ s(r, {
28
- value: "requirements",
29
- children: u
30
- })] }), /* @__PURE__ */ s("div", { ref: m })]
31
- }),
28
+ /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ s(r, {
29
+ value: "approvals",
30
+ children: d
31
+ }), /* @__PURE__ */ s(r, {
32
+ value: "requirements",
33
+ children: f
34
+ })] }),
32
35
  /* @__PURE__ */ s(t, {
33
36
  value: "approvals",
34
- children: /* @__PURE__ */ s(i, { headerActionContainer: p })
37
+ children: /* @__PURE__ */ s(i, { headerActionContainer: u === void 0 ? h : u })
35
38
  }),
36
39
  /* @__PURE__ */ s(t, {
37
40
  value: "requirements",
38
41
  children: /* @__PURE__ */ s(a, {})
39
42
  })
40
43
  ]
41
- })
44
+ })]
42
45
  });
43
46
  }
44
47
  export { l as ExpenseSettingsTabs, l as default };
@@ -68,36 +68,42 @@ function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitia
68
68
  {
69
69
  id: s.Team,
70
70
  label: z.teamSection,
71
- content: re ?? /* @__PURE__ */ C(m, {
71
+ content: re ?? ((e) => /* @__PURE__ */ C(m, {
72
+ headerActionContainer: e,
72
73
  acceptInviteRedirectUri: u,
73
74
  initialView: K ? void 0 : E
74
- })
75
+ }))
75
76
  },
76
77
  {
77
78
  id: s.Invoice,
78
79
  label: z.invoiceSection,
79
- content: L ?? /* @__PURE__ */ C(f, { ref: B })
80
+ content: L ?? ((e) => /* @__PURE__ */ C(f, {
81
+ headerActionContainer: e,
82
+ ref: B
83
+ }))
80
84
  },
81
85
  {
82
86
  id: s.Expense,
83
87
  label: z.expenseSection,
84
- content: F ?? /* @__PURE__ */ C(d, {
88
+ content: F ?? ((e) => /* @__PURE__ */ C(d, {
89
+ headerActionContainer: e,
85
90
  approvalsLabel: z.expenseApprovalsTab,
86
91
  requirementsLabel: z.expenseRequirementsTab
87
- })
92
+ }))
88
93
  },
89
94
  {
90
95
  id: s.BillPay,
91
96
  label: z.billPaySection,
92
- content: N ?? /* @__PURE__ */ C(a, {
97
+ content: N ?? ((e) => /* @__PURE__ */ C(a, {
98
+ headerActionContainer: e,
93
99
  showHeaderTitle: !1,
94
100
  componentLabels: { header: { Description: z.billPayDescription } }
95
- })
101
+ }))
96
102
  },
97
103
  {
98
104
  id: s.Accounting,
99
105
  label: z.accountingSection,
100
- content: I ?? /* @__PURE__ */ C(g, {})
106
+ content: I ?? ((e) => /* @__PURE__ */ C(g, { headerActionContainer: e }))
101
107
  },
102
108
  {
103
109
  id: s.Legal,
@@ -17,7 +17,7 @@ function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
17
17
  children: [u.map((a) => /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
18
18
  variant: "section",
19
19
  level: 3,
20
- className: "ttw:mb-2",
20
+ className: "ttw:mb-4",
21
21
  children: a.title
22
22
  }), /* @__PURE__ */ s(e, {
23
23
  type: "single",
@@ -31,7 +31,7 @@ function u({ faq: u, bankName: d, contactUrl: f, labels: p }) {
31
31
  })] }, a.title)), f && d && /* @__PURE__ */ c("section", { children: [/* @__PURE__ */ s(i, {
32
32
  variant: "section",
33
33
  level: 3,
34
- className: "ttw:mb-1",
34
+ className: "ttw:mb-4",
35
35
  children: m.contactUsTitle
36
36
  }), /* @__PURE__ */ c("p", {
37
37
  className: "ttw:text-sm ttw:text-muted-foreground",
@@ -26,101 +26,107 @@ import { useLogoUpload as g } from "./index8.js";
26
26
  import { useEffect as _, useImperativeHandle as v, useMemo as y, useRef as b } from "react";
27
27
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
28
28
  // ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js
29
- function w({ entityId: e, entitySettings: t, nextNumbers: n, logo: r, confirmLeaveRef: i, panelLabels: a, numberingLabels: o, pdfLabels: s, discardLabels: c, messageLabels: l }) {
30
- let h = u({
31
- entityId: e,
32
- entitySettings: t,
33
- nextNumbers: n,
34
- messageLabels: l
35
- }), { confirmLeave: g } = h;
36
- return _(() => (i.current = g, () => {
37
- i.current = null;
38
- }), [g, i]), /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(d, {
39
- logo: r,
40
- onSubmit: h.submit,
41
- submitDisabled: !h.isDirty || h.isSaving,
42
- labels: a,
29
+ function w({ headerStart: e, headerActionContainer: t, entityId: n, entitySettings: r, nextNumbers: i, logo: a, confirmLeaveRef: o, panelLabels: s, numberingLabels: c, pdfLabels: l, discardLabels: h, messageLabels: g }) {
30
+ let v = u({
31
+ entityId: n,
32
+ entitySettings: r,
33
+ nextNumbers: i,
34
+ messageLabels: g
35
+ }), { confirmLeave: y } = v;
36
+ return _(() => (o.current = y, () => {
37
+ o.current = null;
38
+ }), [y, o]), /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(d, {
39
+ headerStart: e,
40
+ headerActionContainer: t,
41
+ logo: a,
42
+ onSubmit: v.submit,
43
+ submitDisabled: !v.isDirty || v.isSaving,
44
+ labels: s,
43
45
  children: [/* @__PURE__ */ S(f, {
44
- previewValue: h.previewValue,
45
- invoicePrefix: h.invoicePrefix,
46
- startingNumber: h.startingNumber,
47
- digitCount: h.digitCount,
48
- includeDate: h.includeDate,
49
- errors: h.numberingErrors,
50
- onInvoicePrefixChange: h.onInvoicePrefixChange,
51
- onStartingNumberChange: h.onStartingNumberChange,
52
- onDigitCountChange: h.onDigitCountChange,
53
- onIncludeDateChange: h.onIncludeDateChange,
54
- labels: o
46
+ previewValue: v.previewValue,
47
+ invoicePrefix: v.invoicePrefix,
48
+ startingNumber: v.startingNumber,
49
+ digitCount: v.digitCount,
50
+ includeDate: v.includeDate,
51
+ errors: v.numberingErrors,
52
+ onInvoicePrefixChange: v.onInvoicePrefixChange,
53
+ onStartingNumberChange: v.onStartingNumberChange,
54
+ onDigitCountChange: v.onDigitCountChange,
55
+ onIncludeDateChange: v.onIncludeDateChange,
56
+ labels: c
55
57
  }), /* @__PURE__ */ S(p, {
56
- displayBankDetails: h.displayBankDetails,
57
- updatePaidInvoices: h.updatePaidInvoices,
58
- onDisplayBankDetailsChange: h.onDisplayBankDetailsChange,
59
- onUpdatePaidInvoicesChange: h.onUpdatePaidInvoicesChange,
60
- labels: s
58
+ displayBankDetails: v.displayBankDetails,
59
+ updatePaidInvoices: v.updatePaidInvoices,
60
+ onDisplayBankDetailsChange: v.onDisplayBankDetailsChange,
61
+ onUpdatePaidInvoicesChange: v.onUpdatePaidInvoicesChange,
62
+ labels: l
61
63
  })]
62
64
  }), /* @__PURE__ */ S(m, {
63
- open: h.isDiscardDialogOpen,
64
- onCancel: h.cancelDiscard,
65
- onConfirm: h.confirmDiscard,
66
- labels: c
65
+ open: v.isDiscardDialogOpen,
66
+ onCancel: v.cancelDiscard,
67
+ onConfirm: v.confirmDiscard,
68
+ labels: h
67
69
  })] });
68
70
  }
69
- function T({ handleRef: r, panelLabels: o, logoLabels: u, dropzoneLabels: f, messageLabels: p, ...m }) {
70
- let T = n(), E = b(null);
71
- v(r, () => ({ confirmLeave: () => E.current?.() ?? Promise.resolve(!0) }), []), _(() => {
72
- T(a.Mounted);
73
- }, [T]);
74
- let { initResponse: D } = i(), { canEdit: O } = y(() => s(D?.scopes), [D?.scopes]), { data: k, isLoading: A, isError: j, refetch: M } = e(), N = k?.id, P = O ? N : void 0, { data: F, isLoading: I, isError: L, refetch: R } = c(P), { data: z, isLoading: B, isError: V, refetch: H } = l(P), U = g({
75
- entityId: N ?? "",
76
- labels: p
77
- }), W = y(() => ({
78
- fileTypesHint: U.fileTypesHint,
79
- ...f
80
- }), [U.fileTypesHint, f]);
81
- if (!O) return null;
82
- let G = N || A ? /* @__PURE__ */ C(x, { children: [
71
+ function T({ headerStart: r, headerActionContainer: o, handleRef: u, panelLabels: f, logoLabels: p, dropzoneLabels: m, messageLabels: T, ...E }) {
72
+ let D = n(), O = b(null);
73
+ v(u, () => ({ confirmLeave: () => O.current?.() ?? Promise.resolve(!0) }), []), _(() => {
74
+ D(a.Mounted);
75
+ }, [D]);
76
+ let { initResponse: k } = i(), { canEdit: A } = y(() => s(k?.scopes), [k?.scopes]), { data: j, isLoading: M, isError: N, refetch: P } = e(), F = j?.id, I = A ? F : void 0, { data: L, isLoading: R, isError: z, refetch: B } = c(I), { data: V, isLoading: H, isError: U, refetch: W } = l(I), G = g({
77
+ entityId: F ?? "",
78
+ labels: T
79
+ }), K = y(() => ({
80
+ fileTypesHint: G.fileTypesHint,
81
+ ...m
82
+ }), [G.fileTypesHint, m]);
83
+ if (!A) return null;
84
+ let q = F || M ? /* @__PURE__ */ C(x, { children: [
83
85
  /* @__PURE__ */ S(t, {}),
84
86
  /* @__PURE__ */ S(h, {
85
- logoUrl: U.uploadedLogoUrl ?? k?.logo?.url,
86
- isLoading: A,
87
- isDeleting: U.isDeleting,
88
- status: U.status,
89
- fileName: U.fileName,
90
- errorMessage: U.errorMessage,
91
- isDraggingOver: U.isDraggingOver,
92
- onBrowse: U.onBrowse,
93
- onFilesSelected: U.onFilesSelected,
94
- accept: U.fileInputProps.accept,
95
- onDelete: U.onDelete,
96
- onDismissError: U.onDismissError,
97
- onDragOver: U.onDragOver,
98
- onDragLeave: U.onDragLeave,
99
- onDrop: U.onDrop,
100
- labels: u,
101
- dropzoneLabels: W
87
+ logoUrl: G.uploadedLogoUrl ?? j?.logo?.url,
88
+ isLoading: M,
89
+ isDeleting: G.isDeleting,
90
+ status: G.status,
91
+ fileName: G.fileName,
92
+ errorMessage: G.errorMessage,
93
+ isDraggingOver: G.isDraggingOver,
94
+ onBrowse: G.onBrowse,
95
+ onFilesSelected: G.onFilesSelected,
96
+ accept: G.fileInputProps.accept,
97
+ onDelete: G.onDelete,
98
+ onDismissError: G.onDismissError,
99
+ onDragOver: G.onDragOver,
100
+ onDragLeave: G.onDragLeave,
101
+ onDrop: G.onDrop,
102
+ labels: p,
103
+ dropzoneLabels: K
102
104
  }),
103
- /* @__PURE__ */ S("input", { ...U.fileInputProps })
105
+ /* @__PURE__ */ S("input", { ...G.fileInputProps })
104
106
  ] }) : void 0;
105
- return !F || !z ? /* @__PURE__ */ S(d, {
106
- logo: G,
107
- isLoading: A || I || B,
108
- isError: j || L || V,
107
+ return !L || !V ? /* @__PURE__ */ S(d, {
108
+ headerStart: r,
109
+ headerActionContainer: o,
110
+ logo: q,
111
+ isLoading: M || R || H,
112
+ isError: N || z || U,
109
113
  onRetry: () => {
110
- M(), R(), H();
114
+ P(), B(), W();
111
115
  },
112
116
  onSubmit: () => void 0,
113
- labels: o
117
+ labels: f
114
118
  }) : /* @__PURE__ */ S(w, {
115
- entityId: N ?? "",
116
- entitySettings: F,
117
- nextNumbers: z,
118
- logo: G,
119
- confirmLeaveRef: E,
120
- panelLabels: o,
121
- messageLabels: p,
122
- ...m
123
- }, N);
119
+ headerStart: r,
120
+ headerActionContainer: o,
121
+ entityId: F ?? "",
122
+ entitySettings: L,
123
+ nextNumbers: V,
124
+ logo: q,
125
+ confirmLeaveRef: O,
126
+ panelLabels: f,
127
+ messageLabels: T,
128
+ ...E
129
+ }, F);
124
130
  }
125
131
  function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: s, uiFramework: c, analytics: l, disclosuresAcceptance: u, providerLabels: d, errorFallback: f, onError: p, ref: m, ...h }) {
126
132
  return /* @__PURE__ */ S(r, {