@tesouro/embedded-components-react 0.3.1 → 0.3.2

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 (45) hide show
  1. package/README.md +7 -10
  2. package/dist/experimental/WidgetSuite.d.ts +2 -2
  3. package/dist/experimental/index.d.ts +2 -2
  4. package/dist/index.d.ts +1 -23
  5. package/dist/lib/BankAccountsWidget.d.ts +0 -1
  6. package/dist/lib/ChartOfAccountsWidget.d.ts +1 -5
  7. package/dist/lib/CounterpartsWidget.d.ts +0 -9
  8. package/dist/lib/ExpenseManagementWidget.d.ts +0 -1
  9. package/dist/lib/ProductsWidget.d.ts +0 -1
  10. package/dist/lib/ReceivablesWidget.d.ts +0 -1
  11. package/dist/lib/SettingsWidget.d.ts +0 -1
  12. package/dist/lib/TagsWidget.d.ts +0 -1
  13. package/dist/lib/TeamWidget.d.ts +0 -3
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +0 -1
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +64 -65
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +35 -36
  17. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +35 -42
  18. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +0 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
  22. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
  23. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
  24. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
  25. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
  28. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
  29. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
  32. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
  33. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
  41. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
  42. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
  43. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
  44. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
  45. package/package.json +1 -1
@@ -1,213 +1,211 @@
1
1
  import { Button as e, DataTable as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Skeleton as o, Table as s, TableBody as c, TableCell as l, TableHead as u, TableHeader as d, TableRow as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { SectionHeading as p } from "../../../shared/ui/dist/lib/SectionHeading/SectionHeading.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { CHART_OF_ACCOUNTS_LABELS_EN as m } from "./index2.js";
2
+ import { CHART_OF_ACCOUNTS_LABELS_EN as p } from "./index2.js";
5
3
  import "react";
6
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
7
- import { AlertCircleIcon as v, ArrowDownIcon as y, ArrowUpDownIcon as b, ArrowUpIcon as x, FileTextIcon as S, MoreVerticalIcon as C, PencilIcon as w, PlusIcon as T, Trash2Icon as E } from "lucide-react";
4
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
5
+ import { AlertCircleIcon as _, ArrowDownIcon as v, ArrowUpDownIcon as y, ArrowUpIcon as b, FileTextIcon as x, MoreVerticalIcon as S, PencilIcon as C, PlusIcon as w, Trash2Icon as T } from "lucide-react";
8
6
  //#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js
9
- function D({ labels: e }) {
10
- return /* @__PURE__ */ _("div", {
7
+ function E({ labels: e }) {
8
+ return /* @__PURE__ */ g("div", {
11
9
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center",
12
10
  children: [
13
- /* @__PURE__ */ g("div", {
11
+ /* @__PURE__ */ h("div", {
14
12
  className: "ttw:mb-4 ttw:flex ttw:h-14 ttw:w-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-destructive/10",
15
- children: /* @__PURE__ */ g(v, { className: "ttw:h-6 ttw:w-6 ttw:text-destructive" })
13
+ children: /* @__PURE__ */ h(_, { className: "ttw:h-6 ttw:w-6 ttw:text-destructive" })
16
14
  }),
17
- /* @__PURE__ */ g("h3", {
15
+ /* @__PURE__ */ h("h3", {
18
16
  className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
19
17
  children: e.errorTitle
20
18
  }),
21
- /* @__PURE__ */ g("p", {
19
+ /* @__PURE__ */ h("p", {
22
20
  className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
23
21
  children: e.errorDescription
24
22
  })
25
23
  ]
26
24
  });
27
25
  }
28
- function O({ title: t, description: n, addLabel: r, onAdd: i, testId: a }) {
29
- return /* @__PURE__ */ _("div", {
26
+ function D({ title: t, description: n, addLabel: r, onAdd: i, testId: a }) {
27
+ return /* @__PURE__ */ g("div", {
30
28
  "data-testid": a,
31
29
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:justify-center ttw:px-4 ttw:py-14 ttw:text-center",
32
30
  children: [
33
- /* @__PURE__ */ g("div", {
31
+ /* @__PURE__ */ h("div", {
34
32
  className: "ttw:mb-4 ttw:flex ttw:h-14 ttw:w-14 ttw:items-center ttw:justify-center ttw:rounded-2xl ttw:bg-muted",
35
- children: /* @__PURE__ */ g(S, { className: "ttw:h-6 ttw:w-6 ttw:text-muted-foreground" })
33
+ children: /* @__PURE__ */ h(x, { className: "ttw:h-6 ttw:w-6 ttw:text-muted-foreground" })
36
34
  }),
37
- /* @__PURE__ */ g("h3", {
35
+ /* @__PURE__ */ h("h3", {
38
36
  className: "ttw:mb-2 ttw:text-lg ttw:font-bold ttw:tracking-tight ttw:text-foreground",
39
37
  children: t
40
38
  }),
41
- /* @__PURE__ */ g("p", {
39
+ /* @__PURE__ */ h("p", {
42
40
  className: "ttw:mb-6 ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
43
41
  children: n
44
42
  }),
45
- i && /* @__PURE__ */ _(e, {
43
+ i && /* @__PURE__ */ g(e, {
46
44
  onClick: i,
47
- children: [/* @__PURE__ */ g(T, { className: "ttw:mr-1 ttw:h-4 ttw:w-4" }), r]
45
+ children: [/* @__PURE__ */ h(w, { className: "ttw:mr-1 ttw:h-4 ttw:w-4" }), r]
48
46
  })
49
47
  ]
50
48
  });
51
49
  }
52
- function k({ labels: t, hasActions: n, children: r }) {
53
- return /* @__PURE__ */ g("div", {
50
+ function O({ labels: t, hasActions: n, children: r }) {
51
+ return /* @__PURE__ */ h("div", {
54
52
  className: "ttw:overflow-hidden ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card",
55
- children: /* @__PURE__ */ _(s, { children: [/* @__PURE__ */ g(d, { children: /* @__PURE__ */ _(f, { children: [
56
- /* @__PURE__ */ g(u, { children: t.columnGlCode }),
57
- /* @__PURE__ */ g(u, { children: /* @__PURE__ */ g(e, {
53
+ children: /* @__PURE__ */ g(s, { children: [/* @__PURE__ */ h(d, { children: /* @__PURE__ */ g(f, { children: [
54
+ /* @__PURE__ */ h(u, { children: t.columnGlCode }),
55
+ /* @__PURE__ */ h(u, { children: /* @__PURE__ */ h(e, {
58
56
  variant: "ghost",
59
57
  disabled: !0,
60
58
  className: "ttw:-ml-3",
61
59
  children: t.columnName
62
60
  }) }),
63
- /* @__PURE__ */ g(u, { children: t.columnDescription }),
64
- n && /* @__PURE__ */ g(u, {
61
+ /* @__PURE__ */ h(u, { children: t.columnDescription }),
62
+ n && /* @__PURE__ */ h(u, {
65
63
  className: "ttw:w-16 ttw:text-right",
66
64
  children: t.columnActions
67
65
  })
68
- ] }) }), /* @__PURE__ */ g(c, { children: r })] })
66
+ ] }) }), /* @__PURE__ */ h(c, { children: r })] })
69
67
  });
70
68
  }
71
- function A({ data: s, isLoading: c, isError: u, sorting: d, onSortingChange: v, pageSize: S, onPageSizeChange: A, pageSizeOptions: j, hasNextPage: M, hasPrevPage: N, onNextPage: P, onPrevPage: F, labels: I, title: L, emptyStateTestId: R, onEdit: z, onDelete: B, onAdd: V }) {
72
- let H = {
73
- ...m,
74
- ...I
75
- }, U = !!(z ?? B), W = L ?? H.title, G = W ? /* @__PURE__ */ _("div", {
69
+ function k({ data: s, isLoading: c, isError: u, sorting: d, onSortingChange: _, pageSize: x, onPageSizeChange: k, pageSizeOptions: A, hasNextPage: j, hasPrevPage: M, onNextPage: N, onPrevPage: P, labels: F, emptyStateTestId: I, onEdit: L, onDelete: R, onAdd: z }) {
70
+ let B = {
71
+ ...p,
72
+ ...F
73
+ }, V = !!(L ?? R), H = B.subtitle ? /* @__PURE__ */ h("div", {
76
74
  className: "ttw:mb-4",
77
- children: [/* @__PURE__ */ g(p, { children: W }), H.subtitle && /* @__PURE__ */ g("p", {
75
+ children: /* @__PURE__ */ h("p", {
78
76
  className: "ttw:text-sm ttw:text-muted-foreground",
79
- children: H.subtitle
80
- })]
81
- }) : null, K = s.length === 0 && !N, q = /* @__PURE__ */ _(h, { children: [G, V && !K && /* @__PURE__ */ g("div", {
77
+ children: B.subtitle
78
+ })
79
+ }) : null, U = s.length === 0 && !M, W = /* @__PURE__ */ g(m, { children: [H, z && !U && /* @__PURE__ */ h("div", {
82
80
  className: "ttw:mb-4 ttw:flex ttw:items-center ttw:justify-end",
83
- children: /* @__PURE__ */ _(e, {
84
- onClick: V,
85
- children: [/* @__PURE__ */ g(T, { className: "ttw:mr-1 ttw:h-4 ttw:w-4" }), H.addAccount]
81
+ children: /* @__PURE__ */ g(e, {
82
+ onClick: z,
83
+ children: [/* @__PURE__ */ h(w, { className: "ttw:mr-1 ttw:h-4 ttw:w-4" }), B.addAccount]
86
84
  })
87
- })] }), J = [
85
+ })] }), G = [
88
86
  {
89
87
  accessorKey: "nominal_code",
90
- header: H.columnGlCode
88
+ header: B.columnGlCode
91
89
  },
92
90
  {
93
91
  accessorKey: "name",
94
92
  enableSorting: !0,
95
93
  header: ({ column: t }) => {
96
94
  let n = t.getIsSorted();
97
- return /* @__PURE__ */ _("div", {
95
+ return /* @__PURE__ */ g("div", {
98
96
  className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
99
- children: [H.columnName, /* @__PURE__ */ g(e, {
97
+ children: [B.columnName, /* @__PURE__ */ h(e, {
100
98
  variant: "ghost",
101
- "aria-label": H.sortByName,
99
+ "aria-label": B.sortByName,
102
100
  onClick: () => t.toggleSorting(n === "asc"),
103
- children: g(n === "asc" ? x : n === "desc" ? y : b, { className: "ttw:size-4" })
101
+ children: h(n === "asc" ? b : n === "desc" ? v : y, { className: "ttw:size-4" })
104
102
  })]
105
103
  });
106
104
  }
107
105
  },
108
106
  {
109
107
  accessorKey: "description",
110
- header: H.columnDescription
108
+ header: B.columnDescription
111
109
  },
112
- ...U ? [{
110
+ ...V ? [{
113
111
  id: "actions",
114
- header: () => /* @__PURE__ */ g("div", {
112
+ header: () => /* @__PURE__ */ h("div", {
115
113
  className: "ttw:flex ttw:justify-end",
116
- children: H.columnActions
114
+ children: B.columnActions
117
115
  }),
118
- cell: ({ row: t }) => t.original.is_external ? null : /* @__PURE__ */ g("div", {
116
+ cell: ({ row: t }) => t.original.is_external ? null : /* @__PURE__ */ h("div", {
119
117
  className: "ttw:flex ttw:justify-end",
120
- children: /* @__PURE__ */ _(n, { children: [/* @__PURE__ */ g(a, {
118
+ children: /* @__PURE__ */ g(n, { children: [/* @__PURE__ */ h(a, {
121
119
  asChild: !0,
122
- children: /* @__PURE__ */ g(e, {
120
+ children: /* @__PURE__ */ h(e, {
123
121
  variant: "ghost",
124
122
  size: "icon-sm",
125
- "aria-label": H.openActionsMenu,
126
- children: /* @__PURE__ */ g(C, { className: "ttw:h-4 ttw:w-4" })
123
+ "aria-label": B.openActionsMenu,
124
+ children: /* @__PURE__ */ h(S, { className: "ttw:h-4 ttw:w-4" })
127
125
  })
128
- }), /* @__PURE__ */ _(r, {
126
+ }), /* @__PURE__ */ g(r, {
129
127
  align: "end",
130
- children: [z && /* @__PURE__ */ _(i, {
131
- onClick: () => z(t.original),
132
- children: [/* @__PURE__ */ g(w, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), H.actionEdit]
133
- }), B && /* @__PURE__ */ _(i, {
128
+ children: [L && /* @__PURE__ */ g(i, {
129
+ onClick: () => L(t.original),
130
+ children: [/* @__PURE__ */ h(C, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), B.actionEdit]
131
+ }), R && /* @__PURE__ */ g(i, {
134
132
  variant: "destructive",
135
- onClick: () => B(t.original),
136
- children: [/* @__PURE__ */ g(E, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), H.actionDelete]
133
+ onClick: () => R(t.original),
134
+ children: [/* @__PURE__ */ h(T, { className: "ttw:mr-2 ttw:h-4 ttw:w-4" }), B.actionDelete]
137
135
  })]
138
136
  })] })
139
137
  })
140
138
  }] : []
141
139
  ];
142
- return u ? /* @__PURE__ */ _(h, { children: [q, /* @__PURE__ */ g(k, {
143
- labels: H,
144
- hasActions: U,
145
- children: /* @__PURE__ */ g(f, { children: /* @__PURE__ */ g(l, {
146
- colSpan: U ? 4 : 3,
140
+ return u ? /* @__PURE__ */ g(m, { children: [W, /* @__PURE__ */ h(O, {
141
+ labels: B,
142
+ hasActions: V,
143
+ children: /* @__PURE__ */ h(f, { children: /* @__PURE__ */ h(l, {
144
+ colSpan: V ? 4 : 3,
147
145
  className: "ttw:p-0",
148
- children: /* @__PURE__ */ g(D, { labels: H })
146
+ children: /* @__PURE__ */ h(E, { labels: B })
149
147
  }) })
150
- })] }) : c && s.length === 0 ? /* @__PURE__ */ _(h, { children: [q, /* @__PURE__ */ g(k, {
151
- labels: H,
152
- hasActions: U,
153
- children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ _(f, { children: [
154
- /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(o, { className: "ttw:h-4 ttw:w-36" }) }),
155
- /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(o, { className: "ttw:h-4 ttw:w-14" }) }),
156
- /* @__PURE__ */ g(l, { children: /* @__PURE__ */ g(o, { className: "ttw:h-4 ttw:w-56" }) }),
157
- U && /* @__PURE__ */ g(l, {})
148
+ })] }) : c && s.length === 0 ? /* @__PURE__ */ g(m, { children: [W, /* @__PURE__ */ h(O, {
149
+ labels: B,
150
+ hasActions: V,
151
+ children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ g(f, { children: [
152
+ /* @__PURE__ */ h(l, { children: /* @__PURE__ */ h(o, { className: "ttw:h-4 ttw:w-36" }) }),
153
+ /* @__PURE__ */ h(l, { children: /* @__PURE__ */ h(o, { className: "ttw:h-4 ttw:w-14" }) }),
154
+ /* @__PURE__ */ h(l, { children: /* @__PURE__ */ h(o, { className: "ttw:h-4 ttw:w-56" }) }),
155
+ V && /* @__PURE__ */ h(l, {})
158
156
  ] }, t))
159
- })] }) : s.length === 0 && N ? /* @__PURE__ */ _(h, { children: [q, /* @__PURE__ */ g(t, {
160
- columns: J,
157
+ })] }) : s.length === 0 && M ? /* @__PURE__ */ g(m, { children: [W, /* @__PURE__ */ h(t, {
158
+ columns: G,
161
159
  data: s,
162
160
  sorting: d,
163
- onSortingChange: v,
164
- pageSize: S,
165
- onPageSizeChange: A,
166
- pageSizeOptions: j,
167
- hasNextPage: M,
168
- hasPrevPage: N,
169
- onNextPage: P,
170
- onPrevPage: F,
161
+ onSortingChange: _,
162
+ pageSize: x,
163
+ onPageSizeChange: k,
164
+ pageSizeOptions: A,
165
+ hasNextPage: j,
166
+ hasPrevPage: M,
167
+ onNextPage: N,
168
+ onPrevPage: P,
171
169
  labels: {
172
- previousPage: H.paginationPrev,
173
- nextPage: H.paginationNext
170
+ previousPage: B.paginationPrev,
171
+ nextPage: B.paginationNext
174
172
  },
175
- children: /* @__PURE__ */ g(O, {
176
- title: H.emptyPageTitle,
177
- description: H.emptyPageDescription,
178
- addLabel: H.addAccount
173
+ children: /* @__PURE__ */ h(D, {
174
+ title: B.emptyPageTitle,
175
+ description: B.emptyPageDescription,
176
+ addLabel: B.addAccount
179
177
  })
180
- })] }) : s.length === 0 ? /* @__PURE__ */ _(h, { children: [q, /* @__PURE__ */ g(k, {
181
- labels: H,
182
- hasActions: U,
183
- children: /* @__PURE__ */ g(f, { children: /* @__PURE__ */ g(l, {
184
- colSpan: U ? 4 : 3,
178
+ })] }) : s.length === 0 ? /* @__PURE__ */ g(m, { children: [W, /* @__PURE__ */ h(O, {
179
+ labels: B,
180
+ hasActions: V,
181
+ children: /* @__PURE__ */ h(f, { children: /* @__PURE__ */ h(l, {
182
+ colSpan: V ? 4 : 3,
185
183
  className: "ttw:p-0",
186
- children: /* @__PURE__ */ g(O, {
187
- title: H.emptyTitle,
188
- description: H.emptyDescription,
189
- addLabel: H.addAccount,
190
- onAdd: V,
191
- testId: R
184
+ children: /* @__PURE__ */ h(D, {
185
+ title: B.emptyTitle,
186
+ description: B.emptyDescription,
187
+ addLabel: B.addAccount,
188
+ onAdd: z,
189
+ testId: I
192
190
  })
193
191
  }) })
194
- })] }) : /* @__PURE__ */ _(h, { children: [q, /* @__PURE__ */ g(t, {
195
- columns: J,
192
+ })] }) : /* @__PURE__ */ g(m, { children: [W, /* @__PURE__ */ h(t, {
193
+ columns: G,
196
194
  data: s,
197
195
  sorting: d,
198
- onSortingChange: v,
199
- pageSize: S,
200
- onPageSizeChange: A,
201
- pageSizeOptions: j,
202
- hasNextPage: M,
203
- hasPrevPage: N,
204
- onNextPage: P,
205
- onPrevPage: F,
196
+ onSortingChange: _,
197
+ pageSize: x,
198
+ onPageSizeChange: k,
199
+ pageSizeOptions: A,
200
+ hasNextPage: j,
201
+ hasPrevPage: M,
202
+ onNextPage: N,
203
+ onPrevPage: P,
206
204
  labels: {
207
- previousPage: H.paginationPrev,
208
- nextPage: H.paginationNext
205
+ previousPage: B.paginationPrev,
206
+ nextPage: B.paginationNext
209
207
  }
210
208
  })] });
211
209
  }
212
210
  //#endregion
213
- export { A as ChartOfAccountsTable, A as default };
211
+ export { k as ChartOfAccountsTable, k as default };