@tesouro/embedded-components-react 0.3.1 → 0.3.5

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 (50) 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/index10.js +3 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
  24. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
  25. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
  26. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
  27. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
  31. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
  32. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
  35. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
  36. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
  42. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2781 -2775
  43. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index9.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
  46. package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
  47. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
  48. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
  49. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
  50. package/package.json +1 -1
@@ -1,24 +1,24 @@
1
- import { Button as e, DataTable as t, Input as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Skeleton as c, Typography as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as u } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as d } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
1
+ import { Button as e, DataTable as t, Input as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Skeleton as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as l } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as u } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
4
  import "../../../shared/ui/dist/index.js";
5
- import { COUNTERPARTS_SCREEN_LABELS_EN as f } from "./index2.js";
6
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { ArrowDownIcon as h, ArrowUpDownIcon as g, ArrowUpIcon as _, SearchIcon as v } from "lucide-react";
5
+ import { COUNTERPARTS_SCREEN_LABELS_EN as d } from "./index2.js";
6
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
+ import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, SearchIcon as _ } from "lucide-react";
8
8
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js
9
- var y = "all", b = [
9
+ var v = "all", y = [
10
10
  10,
11
11
  25,
12
12
  50,
13
13
  100
14
14
  ];
15
- function x({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEntityFilterChange: u, disabled: d, createAction: f }) {
16
- return /* @__PURE__ */ m("div", {
15
+ function b({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEntityFilterChange: u, disabled: d, createAction: m }) {
16
+ return /* @__PURE__ */ p("div", {
17
17
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
18
18
  children: [
19
- /* @__PURE__ */ m("div", {
19
+ /* @__PURE__ */ p("div", {
20
20
  className: "ttw:relative ttw:w-80",
21
- children: [/* @__PURE__ */ p(v, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ p(n, {
21
+ children: [/* @__PURE__ */ f(_, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ f(n, {
22
22
  className: "ttw:pl-9",
23
23
  placeholder: e.searchPlaceholder,
24
24
  value: t,
@@ -26,94 +26,94 @@ function x({ labels: e, searchValue: t, onSearchChange: c, entityFilter: l, onEn
26
26
  onChange: (e) => c(e.target.value)
27
27
  })]
28
28
  }),
29
- /* @__PURE__ */ m(r, {
29
+ /* @__PURE__ */ p(r, {
30
30
  value: l,
31
31
  onValueChange: u,
32
32
  disabled: d,
33
- children: [/* @__PURE__ */ p(o, {
33
+ children: [/* @__PURE__ */ f(o, {
34
34
  className: "ttw:w-44",
35
- children: /* @__PURE__ */ p(s, {})
36
- }), /* @__PURE__ */ m(i, { children: [
37
- /* @__PURE__ */ p(a, {
38
- value: y,
35
+ children: /* @__PURE__ */ f(s, {})
36
+ }), /* @__PURE__ */ p(i, { children: [
37
+ /* @__PURE__ */ f(a, {
38
+ value: v,
39
39
  children: e.entityFilterAll
40
40
  }),
41
- /* @__PURE__ */ p(a, {
41
+ /* @__PURE__ */ f(a, {
42
42
  value: "individual",
43
43
  children: e.entityFilterIndividual
44
44
  }),
45
- /* @__PURE__ */ p(a, {
45
+ /* @__PURE__ */ f(a, {
46
46
  value: "organization",
47
47
  children: e.entityFilterOrganization
48
48
  })
49
49
  ] })]
50
50
  }),
51
- f && /* @__PURE__ */ p("div", {
51
+ m && /* @__PURE__ */ f("div", {
52
52
  className: "ttw:ml-auto",
53
- children: f
53
+ children: m
54
54
  })
55
55
  ]
56
56
  });
57
57
  }
58
- function S({ value: e, isLoading: t, colorClass: n }) {
59
- return /* @__PURE__ */ p("div", {
58
+ function x({ value: e, isLoading: t, colorClass: n }) {
59
+ return /* @__PURE__ */ f("div", {
60
60
  className: "ttw:flex ttw:justify-end",
61
- children: t ? /* @__PURE__ */ p(c, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ p("span", {
61
+ children: t ? /* @__PURE__ */ f(c, { className: "ttw:h-4 ttw:w-20" }) : /* @__PURE__ */ f("span", {
62
62
  className: n,
63
63
  children: e
64
64
  })
65
65
  });
66
66
  }
67
- function C({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: v, pageSizeOptions: y = b, hasNextPage: C, hasPrevPage: w, onNextPage: T, onPrevPage: E, searchValue: D, onSearchChange: O, entityFilter: k, onEntityFilterChange: ee, isFiltering: A, canCreate: j = !0, showTitle: M = !0, isAccessRestricted: N, onCreateClick: P, onRowClick: F, onRetry: I, labels: L, emptyStateTestId: R, accessRestrictedTestId: z }) {
68
- let B = {
69
- ...f,
70
- ...L
71
- }, V = n === "customer", H = V ? B.customersTitle : B.vendorsTitle, U = V ? B.columnReceivedAmount : B.columnTotalPaidToDate, W = V ? B.columnAmountDue : B.columnBalanceDue, G = [
67
+ function S({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: _, pageSizeOptions: v = y, hasNextPage: S, hasPrevPage: C, onNextPage: w, onPrevPage: T, searchValue: E, onSearchChange: D, entityFilter: O, onEntityFilterChange: k, isFiltering: A, canCreate: j = !0, isAccessRestricted: M, onCreateClick: N, onRowClick: P, onRetry: F, labels: I, emptyStateTestId: L, accessRestrictedTestId: R }) {
68
+ let z = {
69
+ ...d,
70
+ ...I
71
+ }, B = n === "customer", V = B ? z.columnReceivedAmount : z.columnTotalPaidToDate, H = B ? z.columnAmountDue : z.columnBalanceDue, U = [
72
72
  {
73
73
  accessorKey: "name",
74
74
  enableSorting: !0,
75
75
  header: ({ column: t }) => {
76
76
  let n = t.getIsSorted();
77
- return /* @__PURE__ */ m("div", {
77
+ return /* @__PURE__ */ p("div", {
78
78
  className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
79
- children: [B.columnName, /* @__PURE__ */ p(e, {
79
+ children: [z.columnName, /* @__PURE__ */ f(e, {
80
80
  variant: "ghost",
81
81
  size: "icon-sm",
82
- "aria-label": B.sortByName,
82
+ "aria-label": z.sortByName,
83
83
  onClick: () => t.toggleSorting(n === "asc"),
84
- children: p(n === "asc" ? _ : n === "desc" ? h : g, { className: "ttw:size-4" })
84
+ children: f(n === "asc" ? g : n === "desc" ? m : h, { className: "ttw:size-4" })
85
85
  })]
86
86
  });
87
87
  },
88
- cell: ({ row: e }) => /* @__PURE__ */ m("div", {
88
+ cell: ({ row: e }) => /* @__PURE__ */ p("div", {
89
89
  className: "ttw:flex ttw:flex-col ttw:gap-1",
90
- children: [/* @__PURE__ */ p("span", {
90
+ children: [/* @__PURE__ */ f("span", {
91
91
  className: "ttw:font-medium",
92
92
  children: e.original.name
93
- }), e.original.locationLabel && /* @__PURE__ */ p("span", {
93
+ }), e.original.locationLabel && /* @__PURE__ */ f("span", {
94
94
  className: "ttw:text-sm ttw:text-muted-foreground",
95
95
  children: e.original.locationLabel
96
96
  })]
97
97
  })
98
98
  },
99
- ...V ? [{
99
+ ...B ? [{
100
100
  accessorKey: "billedAmountLabel",
101
- header: () => /* @__PURE__ */ p("div", {
101
+ header: () => /* @__PURE__ */ f("div", {
102
102
  className: "ttw:text-right",
103
- children: B.columnBilledAmount
103
+ children: z.columnBilledAmount
104
104
  }),
105
- cell: ({ row: e }) => /* @__PURE__ */ p(S, {
105
+ cell: ({ row: e }) => /* @__PURE__ */ f(x, {
106
106
  value: e.original.billedAmountLabel,
107
107
  isLoading: e.original.isBilledAmountLoading
108
108
  })
109
109
  }] : [],
110
110
  {
111
111
  accessorKey: "receivedOrPaidAmountLabel",
112
- header: () => /* @__PURE__ */ p("div", {
112
+ header: () => /* @__PURE__ */ f("div", {
113
113
  className: "ttw:text-right",
114
- children: U
114
+ children: V
115
115
  }),
116
- cell: ({ row: e }) => /* @__PURE__ */ p(S, {
116
+ cell: ({ row: e }) => /* @__PURE__ */ f(x, {
117
117
  value: e.original.receivedOrPaidAmountLabel,
118
118
  isLoading: e.original.isReceivedOrPaidAmountLoading,
119
119
  colorClass: e.original.isReceivedOrPaidPositive ? "ttw:text-green-700" : void 0
@@ -121,70 +121,62 @@ function C({ mode: n, counterparts: r, isLoading: i, isError: a, sorting: o, onS
121
121
  },
122
122
  {
123
123
  accessorKey: "dueOrOwedAmountLabel",
124
- header: () => /* @__PURE__ */ p("div", {
124
+ header: () => /* @__PURE__ */ f("div", {
125
125
  className: "ttw:text-right",
126
- children: W
126
+ children: H
127
127
  }),
128
- cell: ({ row: e }) => /* @__PURE__ */ p(S, {
128
+ cell: ({ row: e }) => /* @__PURE__ */ f(x, {
129
129
  value: e.original.dueOrOwedAmountLabel,
130
130
  isLoading: e.original.isDueOrOwedAmountLoading
131
131
  })
132
132
  }
133
- ], K = V ? B.customersEmptyTitle : B.vendorsEmptyTitle, q = V ? B.customersEmptyDescription : B.vendorsEmptyDescription, J = V ? B.customersEmptyAction : B.vendorsEmptyAction, Y = V ? B.customersFilterEmptyTitle : B.vendorsFilterEmptyTitle, X = !A && !D && !r.length && !i, Z = !!(j && !N), Q = !!(!A && Z), te = V ? B.createButton : B.vendorsCreateButton, $ = Z ? /* @__PURE__ */ p(e, {
134
- onClick: P,
135
- children: te
136
- }) : void 0;
137
- return /* @__PURE__ */ m("div", {
133
+ ], W = B ? z.customersEmptyTitle : z.vendorsEmptyTitle, G = B ? z.customersEmptyDescription : z.vendorsEmptyDescription, K = B ? z.customersEmptyAction : z.vendorsEmptyAction, q = B ? z.customersFilterEmptyTitle : z.vendorsFilterEmptyTitle, J = !A && !E && !r.length && !i, Y = !!(j && !M), X = !!(!A && Y), Z = B ? z.createButton : z.vendorsCreateButton;
134
+ return /* @__PURE__ */ f("div", {
138
135
  className: "ttw:flex ttw:flex-col ttw:gap-4",
139
- children: [M && /* @__PURE__ */ m("div", {
140
- className: "ttw:flex ttw:items-center ttw:justify-between",
141
- children: [/* @__PURE__ */ p(l, {
142
- component: "h2",
143
- variant: "h6",
144
- className: "ttw:font-semibold",
145
- children: H
146
- }), $]
147
- }), N ? /* @__PURE__ */ p(d, {
148
- testId: z,
149
- title: B.accessRestrictedTitle,
150
- description: B.accessRestrictedDescription
151
- }) : a ? /* @__PURE__ */ p(d, {
152
- title: B.errorTitle,
153
- description: B.errorDescription,
154
- retryLabel: I ? B.errorRetry : void 0,
155
- onRetry: I
156
- }) : /* @__PURE__ */ p(t, {
157
- columns: G,
136
+ children: M ? /* @__PURE__ */ f(u, {
137
+ testId: R,
138
+ title: z.accessRestrictedTitle,
139
+ description: z.accessRestrictedDescription
140
+ }) : a ? /* @__PURE__ */ f(u, {
141
+ title: z.errorTitle,
142
+ description: z.errorDescription,
143
+ retryLabel: F ? z.errorRetry : void 0,
144
+ onRetry: F
145
+ }) : /* @__PURE__ */ f(t, {
146
+ columns: U,
158
147
  data: r,
159
148
  isLoading: i,
160
149
  sorting: o,
161
150
  onSortingChange: s,
162
151
  pageSize: c,
163
- onPageSizeChange: v,
164
- pageSizeOptions: y,
165
- hasNextPage: C,
166
- hasPrevPage: w,
167
- onNextPage: T,
168
- onPrevPage: E,
169
- onRowClick: F,
170
- filterComponent: /* @__PURE__ */ p(x, {
171
- labels: B,
172
- searchValue: D,
173
- onSearchChange: O,
174
- entityFilter: k,
175
- onEntityFilterChange: ee,
176
- disabled: X,
177
- createAction: M ? void 0 : $
152
+ onPageSizeChange: _,
153
+ pageSizeOptions: v,
154
+ hasNextPage: S,
155
+ hasPrevPage: C,
156
+ onNextPage: w,
157
+ onPrevPage: T,
158
+ onRowClick: P,
159
+ filterComponent: /* @__PURE__ */ f(b, {
160
+ labels: z,
161
+ searchValue: E,
162
+ onSearchChange: D,
163
+ entityFilter: O,
164
+ onEntityFilterChange: k,
165
+ disabled: J,
166
+ createAction: Y ? /* @__PURE__ */ f(e, {
167
+ onClick: N,
168
+ children: Z
169
+ }) : void 0
178
170
  }),
179
- children: /* @__PURE__ */ p(u, {
180
- testId: R,
181
- title: A ? Y : K,
182
- description: A ? B.filterEmptyDescription : q,
183
- actionLabel: Q ? J : void 0,
184
- onAction: Q ? P : void 0
171
+ children: /* @__PURE__ */ f(l, {
172
+ testId: L,
173
+ title: A ? q : W,
174
+ description: A ? z.filterEmptyDescription : G,
175
+ actionLabel: X ? K : void 0,
176
+ onAction: X ? N : void 0
185
177
  })
186
- })]
178
+ })
187
179
  });
188
180
  }
189
181
  //#endregion
190
- export { C as CounterpartsScreen, C as default };
182
+ export { S as CounterpartsScreen, S as default };
@@ -70,7 +70,7 @@ function ie(e) {
70
70
  id: e.id,
71
71
  primaryText: t ? r.ReceiptScanningTitle : e.merchant_name?.trim() || r.ReceiptScanningTitle,
72
72
  secondaryText: t ? r.ReceiptScanningSubtitle : d(e.issued_at),
73
- thumbnailUrl: e.file_url
73
+ thumbnailUrl: e.file_url ?? void 0
74
74
  };
75
75
  }
76
76
  function p(e) {
@@ -13,15 +13,12 @@ function s({ labels: s, receiptsContent: c, matchingContent: l, policiesContent:
13
13
  };
14
14
  return /* @__PURE__ */ o("section", {
15
15
  className: "ttw:w-full ttw:space-y-5",
16
- children: [/* @__PURE__ */ o("div", {
16
+ children: [/* @__PURE__ */ a("div", {
17
17
  className: "ttw:min-w-0",
18
- children: [/* @__PURE__ */ a("h2", {
19
- className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
20
- children: f.title
21
- }), /* @__PURE__ */ a("p", {
22
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
18
+ children: /* @__PURE__ */ a("p", {
19
+ className: "ttw:text-sm ttw:text-muted-foreground",
23
20
  children: f.description
24
- })]
21
+ })
25
22
  }), /* @__PURE__ */ o(e, {
26
23
  defaultValue: "receipts",
27
24
  children: [
@@ -1,6 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js
2
2
  var e = {
3
- title: "Expense management",
4
3
  description: "Manage receipts, matching, policies, and requirements.",
5
4
  receiptsTab: "Receipts",
6
5
  matchingTab: "Matching",
@@ -1,6 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js
2
2
  var e = {
3
- title: "Chart of accounts",
4
3
  subtitle: "An organized list of every account your business uses to record its financial transactions in its general ledger.",
5
4
  columnGlCode: "GL code",
6
5
  columnName: "Account name",