@tesouro/embedded-components-react 0.5.233 → 0.5.236

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 (87) hide show
  1. package/README.md +19 -14
  2. package/dist/index.d.ts +175 -16
  3. package/dist/index.js +1 -1
  4. package/dist/lib/BankAccountOnboardingWidget.d.ts +39 -1
  5. package/dist/lib/ReceivablesWidget.d.ts +110 -1
  6. package/dist/lib/ReceivablesWidget.js +1 -1
  7. package/dist/lib/WidgetSuite.d.ts +65 -15
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +2 -1
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +6 -0
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +15 -11
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +441 -409
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +18 -14
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
  81. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
  82. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
  83. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +123 -92
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +12 -5
  86. package/package.json +1 -1
  87. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +0 -100
@@ -0,0 +1,353 @@
1
+ import { Button as e, DataTable as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a, Input as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d, Tabs as f, TabsList as p, TabsTrigger as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as h } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as g } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
+ import "../../../shared/ui/dist/index.js";
5
+ import { RECEIVABLES_SCREEN_LABELS_EN as _ } from "./index13.js";
6
+ import { ReceivableStatusBadge as v } from "./index22.js";
7
+ import { ReceivableStatusCards as y } from "./index50.js";
8
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
+ import { ArrowDownIcon as S, ArrowUpDownIcon as C, ArrowUpIcon as w, MoreHorizontalIcon as T, PlusIcon as E, SearchIcon as D, SettingsIcon as O } from "lucide-react";
10
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js
11
+ var k = [
12
+ 10,
13
+ 25,
14
+ 50,
15
+ 100
16
+ ], A = "all";
17
+ function j({ label: t, ariaLabel: n, column: r }) {
18
+ let i = r.getIsSorted();
19
+ return /* @__PURE__ */ x("div", {
20
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
21
+ children: [t, /* @__PURE__ */ b(e, {
22
+ variant: "ghost",
23
+ size: "icon-sm",
24
+ "aria-label": n,
25
+ onClick: () => r.toggleSorting(i === "asc"),
26
+ children: b(i === "asc" ? w : i === "desc" ? S : C, { className: "ttw:size-4" })
27
+ })]
28
+ });
29
+ }
30
+ function M({ labels: e, searchValue: t, onSearchChange: n, statusFilter: r, statusOptions: i, onStatusFilterChange: a }) {
31
+ return /* @__PURE__ */ x("div", {
32
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
33
+ children: [/* @__PURE__ */ x("div", {
34
+ className: "ttw:relative ttw:w-80",
35
+ children: [/* @__PURE__ */ b(D, { 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__ */ b(o, {
36
+ className: "ttw:pl-9",
37
+ placeholder: e.searchPlaceholder,
38
+ value: t,
39
+ onChange: (e) => n(e.target.value)
40
+ })]
41
+ }), /* @__PURE__ */ x(s, {
42
+ value: r,
43
+ onValueChange: a,
44
+ children: [/* @__PURE__ */ b(u, {
45
+ "aria-label": e.columnStatus,
46
+ className: "ttw:w-48",
47
+ children: /* @__PURE__ */ b(d, {})
48
+ }), /* @__PURE__ */ x(c, { children: [/* @__PURE__ */ b(l, {
49
+ value: A,
50
+ children: e.statusFilterAll
51
+ }), i.map((t) => /* @__PURE__ */ b(l, {
52
+ value: t.value,
53
+ children: P(t, e.statusBadge)
54
+ }, t.value))] })]
55
+ })]
56
+ });
57
+ }
58
+ function N({ enabled: e, label: t, action: n, row: r, onActionClick: a, variant: o }) {
59
+ return e ? /* @__PURE__ */ b(i, {
60
+ variant: o,
61
+ onClick: (e) => {
62
+ e.stopPropagation(), a(n, r);
63
+ },
64
+ children: t
65
+ }) : null;
66
+ }
67
+ function P(e, t) {
68
+ return t[e.value] ?? e.label;
69
+ }
70
+ function F({ rows: i, activeTab: o, enabledTabs: s, onTabChange: c, isLoading: l, isError: u, sorting: d, onSortingChange: S, pageSize: C, onPageSizeChange: w, pageSizeOptions: D = k, pageInfo: A, hasNextPage: P, hasPrevPage: F, onNextPage: I, onPrevPage: L, searchValue: R, onSearchChange: z, statusFilter: B, statusOptions: V, onStatusFilterChange: H, statusCards: U, onStatusCardSelect: W, filterBar: G, isFiltering: K, onCreateClick: q, onTemplateSettingsClick: J, onRowClick: Y, onActionClick: X, onRetry: Z, labels: Q }) {
71
+ let $ = {
72
+ ..._,
73
+ ...Q,
74
+ statusBadge: {
75
+ ..._.statusBadge,
76
+ ...Q?.statusBadge
77
+ }
78
+ };
79
+ return /* @__PURE__ */ x("div", {
80
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
81
+ children: [
82
+ /* @__PURE__ */ x("div", {
83
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
84
+ children: [/* @__PURE__ */ b("div", {
85
+ className: "ttw:flex ttw:items-center ttw:gap-3",
86
+ children: /* @__PURE__ */ b(f, {
87
+ value: o,
88
+ onValueChange: (e) => c(e),
89
+ children: /* @__PURE__ */ x(p, { children: [
90
+ s.includes("invoices") && /* @__PURE__ */ b(m, {
91
+ value: "invoices",
92
+ children: $.tabInvoices
93
+ }),
94
+ s.includes("quotes") && /* @__PURE__ */ b(m, {
95
+ value: "quotes",
96
+ children: $.tabQuotes
97
+ }),
98
+ s.includes("credit_notes") && /* @__PURE__ */ b(m, {
99
+ value: "credit_notes",
100
+ children: $.tabCreditNotes
101
+ })
102
+ ] })
103
+ })
104
+ }), /* @__PURE__ */ x("div", {
105
+ className: "ttw:flex ttw:items-center ttw:gap-2",
106
+ children: [J && /* @__PURE__ */ x(e, {
107
+ variant: "outline",
108
+ onClick: J,
109
+ children: [/* @__PURE__ */ b(O, { className: "ttw:size-4" }), $.templateSettingsButton]
110
+ }), /* @__PURE__ */ x(e, {
111
+ onClick: q,
112
+ children: [/* @__PURE__ */ b(E, { className: "ttw:size-4" }), $.createButton]
113
+ })]
114
+ })]
115
+ }),
116
+ U && W && /* @__PURE__ */ b(y, {
117
+ view: U,
118
+ onSelect: W,
119
+ labels: { all: $.statusCardsAll }
120
+ }),
121
+ u ? /* @__PURE__ */ b(g, {
122
+ title: $.errorTitle,
123
+ description: $.errorDescription,
124
+ retryLabel: Z ? $.errorRetry : void 0,
125
+ onRetry: Z
126
+ }) : /* @__PURE__ */ b(t, {
127
+ columns: [
128
+ {
129
+ accessorKey: "documentLabel",
130
+ enableSorting: !0,
131
+ header: ({ column: e }) => /* @__PURE__ */ b(j, {
132
+ column: e,
133
+ label: $.columnDocument,
134
+ ariaLabel: $.sortByDocument
135
+ }),
136
+ cell: ({ row: e }) => /* @__PURE__ */ x("div", {
137
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
138
+ children: [/* @__PURE__ */ b("span", {
139
+ className: "ttw:font-medium",
140
+ children: e.original.documentLabel
141
+ }), /* @__PURE__ */ b("span", {
142
+ className: "ttw:text-xs ttw:text-muted-foreground",
143
+ children: e.original.type === "credit_note" ? $.tabCreditNotes : e.original.type === "quote" ? $.tabQuotes : $.tabInvoices
144
+ })]
145
+ }),
146
+ minSize: 180
147
+ },
148
+ {
149
+ accessorKey: "customerLabel",
150
+ enableSorting: !0,
151
+ header: ({ column: e }) => /* @__PURE__ */ b(j, {
152
+ column: e,
153
+ label: $.columnCustomer,
154
+ ariaLabel: $.sortByCustomer
155
+ }),
156
+ minSize: 180
157
+ },
158
+ {
159
+ accessorKey: "status",
160
+ header: ({ column: e }) => /* @__PURE__ */ b(j, {
161
+ column: e,
162
+ label: $.columnStatus,
163
+ ariaLabel: $.sortByStatus
164
+ }),
165
+ cell: ({ row: e }) => /* @__PURE__ */ b(v, {
166
+ status: e.original.status,
167
+ tone: e.original.statusTone,
168
+ labels: $.statusBadge
169
+ })
170
+ },
171
+ {
172
+ accessorKey: "issueDateLabel",
173
+ enableSorting: !0,
174
+ header: ({ column: e }) => /* @__PURE__ */ b(j, {
175
+ column: e,
176
+ label: $.columnIssueDate,
177
+ ariaLabel: $.sortByIssueDate
178
+ })
179
+ },
180
+ {
181
+ accessorKey: "dueDateLabel",
182
+ enableSorting: !0,
183
+ header: ({ column: e }) => /* @__PURE__ */ b(j, {
184
+ column: e,
185
+ label: $.columnDueDate,
186
+ ariaLabel: $.sortByDueDate
187
+ })
188
+ },
189
+ {
190
+ accessorKey: "totalLabel",
191
+ enableSorting: !0,
192
+ header: ({ column: e }) => /* @__PURE__ */ b("div", {
193
+ className: "ttw:flex ttw:justify-end",
194
+ children: /* @__PURE__ */ b(j, {
195
+ column: e,
196
+ label: $.columnTotal,
197
+ ariaLabel: $.sortByTotal
198
+ })
199
+ }),
200
+ cell: ({ row: e }) => /* @__PURE__ */ b("div", {
201
+ className: "ttw:text-right",
202
+ children: e.original.totalLabel
203
+ })
204
+ },
205
+ {
206
+ accessorKey: "amountDueLabel",
207
+ header: () => /* @__PURE__ */ b("div", {
208
+ className: "ttw:text-right",
209
+ children: $.columnAmountDue
210
+ }),
211
+ cell: ({ row: e }) => /* @__PURE__ */ b("div", {
212
+ className: "ttw:text-right",
213
+ children: e.original.amountDueLabel
214
+ })
215
+ },
216
+ {
217
+ id: "actions",
218
+ header: () => /* @__PURE__ */ b("span", {
219
+ className: "ttw:sr-only",
220
+ children: $.columnActions
221
+ }),
222
+ cell: ({ row: t }) => /* @__PURE__ */ b("div", {
223
+ className: "ttw:flex ttw:justify-end",
224
+ children: /* @__PURE__ */ x(n, { children: [/* @__PURE__ */ b(a, {
225
+ asChild: !0,
226
+ children: /* @__PURE__ */ b(e, {
227
+ variant: "ghost",
228
+ size: "icon-sm",
229
+ "aria-label": $.columnActions,
230
+ onClick: (e) => e.stopPropagation(),
231
+ children: /* @__PURE__ */ b(T, { className: "ttw:size-4" })
232
+ })
233
+ }), /* @__PURE__ */ x(r, {
234
+ align: "end",
235
+ children: [
236
+ /* @__PURE__ */ b(N, {
237
+ enabled: t.original.actions.edit,
238
+ label: $.actionEdit,
239
+ action: "edit",
240
+ row: t.original,
241
+ onActionClick: X
242
+ }),
243
+ /* @__PURE__ */ b(N, {
244
+ enabled: t.original.actions.issue,
245
+ label: $.actionIssue,
246
+ action: "issue",
247
+ row: t.original,
248
+ onActionClick: X
249
+ }),
250
+ /* @__PURE__ */ b(N, {
251
+ enabled: t.original.actions.send,
252
+ label: $.actionSend,
253
+ action: "send",
254
+ row: t.original,
255
+ onActionClick: X
256
+ }),
257
+ /* @__PURE__ */ b(N, {
258
+ enabled: t.original.actions.recordPayment,
259
+ label: $.actionRecordPayment,
260
+ action: "recordPayment",
261
+ row: t.original,
262
+ onActionClick: X
263
+ }),
264
+ /* @__PURE__ */ b(N, {
265
+ enabled: t.original.actions.markPaid,
266
+ label: $.actionMarkPaid,
267
+ action: "markPaid",
268
+ row: t.original,
269
+ onActionClick: X
270
+ }),
271
+ /* @__PURE__ */ b(N, {
272
+ enabled: t.original.actions.markUncollectible,
273
+ label: $.actionMarkUncollectible,
274
+ action: "markUncollectible",
275
+ row: t.original,
276
+ onActionClick: X
277
+ }),
278
+ /* @__PURE__ */ b(N, {
279
+ enabled: t.original.actions.accept,
280
+ label: $.actionAccept,
281
+ action: "accept",
282
+ row: t.original,
283
+ onActionClick: X
284
+ }),
285
+ /* @__PURE__ */ b(N, {
286
+ enabled: t.original.actions.decline,
287
+ label: $.actionDecline,
288
+ action: "decline",
289
+ row: t.original,
290
+ onActionClick: X
291
+ }),
292
+ /* @__PURE__ */ b(N, {
293
+ enabled: t.original.actions.cancel,
294
+ label: $.actionCancel,
295
+ action: "cancel",
296
+ row: t.original,
297
+ onActionClick: X
298
+ }),
299
+ /* @__PURE__ */ b(N, {
300
+ enabled: t.original.actions.clone,
301
+ label: $.actionClone,
302
+ action: "clone",
303
+ row: t.original,
304
+ onActionClick: X
305
+ }),
306
+ /* @__PURE__ */ b(N, {
307
+ enabled: t.original.actions.delete,
308
+ label: $.actionDelete,
309
+ action: "delete",
310
+ row: t.original,
311
+ onActionClick: X,
312
+ variant: "destructive"
313
+ })
314
+ ]
315
+ })] })
316
+ }),
317
+ size: 72
318
+ }
319
+ ],
320
+ data: i,
321
+ isLoading: l,
322
+ sorting: d,
323
+ onSortingChange: S,
324
+ pageSize: C,
325
+ onPageSizeChange: w,
326
+ pageSizeOptions: D,
327
+ pageInfo: A,
328
+ hasNextPage: P,
329
+ hasPrevPage: F,
330
+ onNextPage: I,
331
+ onPrevPage: L,
332
+ onRowClick: Y,
333
+ rowAriaLabel: (e) => $.openRow(e.documentLabel),
334
+ filterComponent: G ?? /* @__PURE__ */ b(M, {
335
+ labels: $,
336
+ searchValue: R,
337
+ onSearchChange: z,
338
+ statusFilter: B,
339
+ statusOptions: V,
340
+ onStatusFilterChange: H
341
+ }),
342
+ children: /* @__PURE__ */ b(h, {
343
+ title: K ? $.filterEmptyTitle : $.emptyTitle,
344
+ description: K ? $.filterEmptyDescription : $.emptyDescription,
345
+ actionLabel: K ? void 0 : $.emptyAction,
346
+ onAction: K ? void 0 : q
347
+ })
348
+ })
349
+ ]
350
+ });
351
+ }
352
+ //#endregion
353
+ export { F as ReceivablesScreen, F as default };
@@ -1,2 +1,18 @@
1
- import "./index2.js";
2
- import "./index5.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js
2
+ var e = {
3
+ issueDescription: "The customer will be emailed a copy of the invoice with payment instructions.",
4
+ toLabel: "To",
5
+ subjectLabel: "Subject",
6
+ messageLabel: "Message",
7
+ messagePlaceholder: "e.g., Thank you for your business",
8
+ attachmentsLabel: "Attachments",
9
+ attachmentsCaption: "To change what files are attached to the email, you will need to update the invoice.",
10
+ skipButton: "Skip",
11
+ sendButton: "Send invoice",
12
+ productsQuestion: "Do you want to also save these items?",
13
+ productsCaption: "Saved items can be quickly added to future invoices.",
14
+ productsAllLabel: "Products and services",
15
+ saveItemsButton: "Save selected items"
16
+ };
17
+ //#endregion
18
+ export { e as RECEIVABLE_ACTIONS_MODAL_LABELS_EN };
@@ -1,11 +1,123 @@
1
+ import { Button as e, DialogDescription as t, DialogFooter as n, DialogHeader as r, DialogTitle as i, Input as a, Label as o, Textarea as s, Typography as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { Check as f } from "lucide-react";
1
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js
2
- var e = {
3
- billingHeading: "Billing details",
4
- billingDescription: "What are the billing terms?",
5
- paymentTermsLabel: "Payment terms",
6
- paymentTermsPlaceholder: "Select payment terms",
7
- paymentTermsReceiptDue: "Due on receipt",
8
- paymentTermsCustomDate: "Custom date"
9
- };
5
+ function p({ idPrefix: p, view: m, onSubjectChange: h, onMessageChange: g, onSkip: _, onSend: v, labels: y }) {
6
+ let b = `${p}-subject`, x = `${p}-message`;
7
+ return /* @__PURE__ */ d(l, { children: [
8
+ /* @__PURE__ */ u(r, {
9
+ className: "ttw:border-b ttw:border-border ttw:p-6",
10
+ children: /* @__PURE__ */ d("div", {
11
+ className: "ttw:flex ttw:items-center ttw:gap-4",
12
+ children: [/* @__PURE__ */ u("span", {
13
+ className: "ttw:flex ttw:size-10 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-emerald-200 ttw:bg-emerald-50",
14
+ children: /* @__PURE__ */ u(f, { className: "ttw:size-6 ttw:text-green-700" })
15
+ }), /* @__PURE__ */ d("div", {
16
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
17
+ children: [/* @__PURE__ */ u(i, { children: m.title }), /* @__PURE__ */ u(t, {
18
+ className: "ttw:text-xs",
19
+ children: y.issueDescription
20
+ })]
21
+ })]
22
+ })
23
+ }),
24
+ /* @__PURE__ */ d("div", {
25
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-6",
26
+ children: [
27
+ /* @__PURE__ */ d("div", {
28
+ className: "ttw:flex ttw:items-center ttw:gap-4",
29
+ children: [/* @__PURE__ */ u(c, {
30
+ variant: "body2",
31
+ color: "muted",
32
+ className: "ttw:w-16 ttw:shrink-0",
33
+ children: y.toLabel
34
+ }), /* @__PURE__ */ u(c, {
35
+ variant: "body2",
36
+ children: m.recipient
37
+ })]
38
+ }),
39
+ /* @__PURE__ */ d("div", {
40
+ className: "ttw:flex ttw:items-center ttw:gap-4",
41
+ children: [/* @__PURE__ */ u(o, {
42
+ htmlFor: b,
43
+ className: "ttw:w-16 ttw:shrink-0 ttw:font-normal ttw:text-muted-foreground",
44
+ children: y.subjectLabel
45
+ }), /* @__PURE__ */ u(a, {
46
+ id: b,
47
+ className: "ttw:flex-1",
48
+ value: m.subject,
49
+ onChange: (e) => h(e.target.value),
50
+ disabled: m.inProgress
51
+ })]
52
+ }),
53
+ /* @__PURE__ */ d("div", {
54
+ className: "ttw:flex ttw:items-start ttw:gap-4",
55
+ children: [/* @__PURE__ */ u(o, {
56
+ htmlFor: x,
57
+ className: "ttw:w-16 ttw:shrink-0 ttw:pt-2 ttw:font-normal ttw:text-muted-foreground",
58
+ children: y.messageLabel
59
+ }), /* @__PURE__ */ u(s, {
60
+ id: x,
61
+ className: "ttw:flex-1",
62
+ value: m.message,
63
+ onChange: (e) => g(e.target.value),
64
+ placeholder: y.messagePlaceholder,
65
+ disabled: m.inProgress
66
+ })]
67
+ }),
68
+ m.attachments.length > 0 && /* @__PURE__ */ d("div", {
69
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pl-20",
70
+ children: [/* @__PURE__ */ d("div", {
71
+ className: "ttw:flex ttw:flex-col",
72
+ children: [/* @__PURE__ */ u(c, {
73
+ variant: "body2",
74
+ color: "muted",
75
+ children: y.attachmentsLabel
76
+ }), /* @__PURE__ */ u(c, {
77
+ variant: "caption",
78
+ color: "muted",
79
+ children: y.attachmentsCaption
80
+ })]
81
+ }), /* @__PURE__ */ u("ul", {
82
+ className: "ttw:flex ttw:flex-col ttw:gap-2.5",
83
+ children: m.attachments.map((e) => /* @__PURE__ */ d("li", {
84
+ className: "ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1 ttw:text-sm ttw:font-medium",
85
+ children: [
86
+ e.name,
87
+ " ",
88
+ /* @__PURE__ */ d("span", {
89
+ className: "ttw:text-muted-foreground",
90
+ children: [
91
+ "(",
92
+ e.sizeLabel,
93
+ ")"
94
+ ]
95
+ })
96
+ ]
97
+ }, e.id))
98
+ })]
99
+ })
100
+ ]
101
+ }),
102
+ /* @__PURE__ */ d(n, {
103
+ className: "ttw:flex ttw:flex-row ttw:gap-4 ttw:border-t ttw:border-border ttw:p-6",
104
+ children: [/* @__PURE__ */ u(e, {
105
+ type: "button",
106
+ variant: "outline",
107
+ className: "ttw:flex-1 ttw:border-border",
108
+ disabled: m.inProgress,
109
+ onClick: _,
110
+ children: y.skipButton
111
+ }), /* @__PURE__ */ u(e, {
112
+ type: "button",
113
+ className: "ttw:flex-1",
114
+ disabled: m.sendDisabled,
115
+ loading: m.inProgress,
116
+ onClick: v,
117
+ children: y.sendButton
118
+ })]
119
+ })
120
+ ] });
121
+ }
10
122
  //#endregion
11
- export { e as RECEIVABLE_BILLING_SECTION_LABELS_EN };
123
+ export { p as ReceivableActionsModalIssueStep };
@@ -1,29 +1,102 @@
1
+ import { Button as e, Checkbox as t, DialogFooter as n, DialogHeader as r, DialogTitle as i, Separator as a, Typography as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
3
+ import { Check as u } from "lucide-react";
1
4
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js
2
- var e = {
3
- recurrenceRepeatLabel: "Repeat this invoice",
4
- recurrenceMonthDayLead: "on the",
5
- recurrenceMonthDayTrail: "day of every month",
6
- recurrenceWeekdayLead: "on",
7
- recurrenceStartOnLabel: "Start on",
8
- recurrenceEndChoiceLead: "and end",
9
- recurrenceEndCountLead: "and end after",
10
- recurrenceDatePlaceholder: "Mon DD, YYYY",
11
- recurrenceCreationModeQuestion: "When an invoice in the series is created, what should happen?",
12
- recurrenceCreationModeHint: "(You can change this at any time)",
13
- recurrenceSetUpEmail: "Set up the email"
14
- }, t = {
15
- recurrenceEmailTitle: "Email sent with each invoice",
16
- recurrenceEmailDescription: "The same recipients, subject, and message are used for every invoice in the series.",
17
- recurrenceEmailTo: "To",
18
- recurrenceEmailCc: "Cc",
19
- recurrenceEmailBcc: "Bcc",
20
- recurrenceEmailSubject: "Subject",
21
- recurrenceEmailMessage: "Message",
22
- recurrenceEmailRecipientPlaceholder: "name@example.com",
23
- recurrenceEmailMessagePlaceholder: "e.g., Thank you for your business",
24
- recurrenceEmailFootnote: "Each invoice is finalized and emailed automatically on its schedule.",
25
- recurrenceEmailCancel: "Cancel",
26
- recurrenceEmailSave: "Save"
27
- };
5
+ function d({ view: d, onToggleItem: f, onToggleAll: p, onAllSelectedChange: m, onSkip: h, onSave: g, labels: _ }) {
6
+ return /* @__PURE__ */ l(s, { children: [
7
+ /* @__PURE__ */ c(r, {
8
+ className: "ttw:border-b ttw:border-border ttw:p-6",
9
+ children: /* @__PURE__ */ l(i, {
10
+ className: "ttw:flex ttw:flex-row ttw:items-center ttw:gap-4",
11
+ children: [/* @__PURE__ */ c("span", {
12
+ className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-emerald-200 ttw:bg-emerald-50",
13
+ children: /* @__PURE__ */ c(u, { className: "ttw:size-6 ttw:text-green-700" })
14
+ }), d.title]
15
+ })
16
+ }),
17
+ /* @__PURE__ */ l("div", {
18
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-6",
19
+ children: [/* @__PURE__ */ l("div", {
20
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-1.5",
21
+ children: [/* @__PURE__ */ l("div", {
22
+ className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
23
+ children: [/* @__PURE__ */ c(o, {
24
+ variant: "h4",
25
+ children: _.productsQuestion
26
+ }), /* @__PURE__ */ c(o, {
27
+ variant: "caption",
28
+ color: "muted",
29
+ children: _.productsCaption
30
+ })]
31
+ }), /* @__PURE__ */ c(e, {
32
+ type: "button",
33
+ variant: "ghost",
34
+ className: "ttw:shrink-0 ttw:text-primary ttw:hover:text-primary",
35
+ disabled: d.inProgress,
36
+ onClick: p,
37
+ children: d.toggleAllLabel
38
+ })]
39
+ }), /* @__PURE__ */ l("ul", {
40
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
41
+ children: [
42
+ /* @__PURE__ */ l("li", {
43
+ className: "ttw:flex ttw:items-center ttw:gap-2",
44
+ children: [/* @__PURE__ */ c(t, {
45
+ checked: d.allSelected,
46
+ onCheckedChange: (e) => m(e === !0),
47
+ disabled: d.inProgress || d.items.length === 0,
48
+ "aria-label": _.productsAllLabel
49
+ }), /* @__PURE__ */ c(o, {
50
+ variant: "body2",
51
+ className: "ttw:font-semibold",
52
+ children: _.productsAllLabel
53
+ })]
54
+ }),
55
+ /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(a, {}) }),
56
+ d.items.map((e) => /* @__PURE__ */ l("li", {
57
+ className: "ttw:flex ttw:items-start ttw:gap-2",
58
+ children: [/* @__PURE__ */ c(t, {
59
+ checked: e.selected,
60
+ onCheckedChange: () => f(e.key),
61
+ disabled: d.inProgress,
62
+ "aria-label": e.name
63
+ }), /* @__PURE__ */ l("div", {
64
+ className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-1",
65
+ children: [/* @__PURE__ */ c(o, {
66
+ variant: "caption",
67
+ className: "ttw:truncate",
68
+ title: e.name,
69
+ children: e.name
70
+ }), /* @__PURE__ */ c(o, {
71
+ variant: "caption",
72
+ color: "muted",
73
+ className: "ttw:truncate",
74
+ children: e.priceLabel
75
+ })]
76
+ })]
77
+ }, e.key))
78
+ ]
79
+ })]
80
+ }),
81
+ /* @__PURE__ */ l(n, {
82
+ className: "ttw:flex ttw:flex-row ttw:gap-4 ttw:border-t ttw:border-border ttw:p-6",
83
+ children: [/* @__PURE__ */ c(e, {
84
+ type: "button",
85
+ variant: "outline",
86
+ className: "ttw:flex-1 ttw:border-border",
87
+ disabled: d.inProgress,
88
+ onClick: h,
89
+ children: _.skipButton
90
+ }), /* @__PURE__ */ c(e, {
91
+ type: "button",
92
+ className: "ttw:flex-1",
93
+ disabled: d.saveDisabled,
94
+ loading: d.inProgress,
95
+ onClick: g,
96
+ children: _.saveItemsButton
97
+ })]
98
+ })
99
+ ] });
100
+ }
28
101
  //#endregion
29
- export { t as RECEIVABLE_RECURRENCE_EMAIL_DIALOG_LABELS_EN, e as RECEIVABLE_RECURRENCE_SECTION_LABELS_EN };
102
+ export { d as ReceivableActionsModalProductsStep };