@tesouro/embedded-components-react 0.3.58 → 0.3.60

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 (79) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +6 -2
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +4 -3
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +105 -93
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +220 -82
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -6
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -4
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +37 -37
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +112 -90
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +1 -0
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +10 -152
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +160 -2
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -4
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -39
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +41 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -7
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +5 -90
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +92 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -4
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -14
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +16 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -83
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +79 -261
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +262 -9
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +13 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -8
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -37
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +39 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +2 -39
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +36 -9
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +10 -199
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +201 -3
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +3 -17
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +15 -345
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +345 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +6 -4
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +6 -91
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +93 -0
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +2 -121
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +118 -23
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +24 -87
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +89 -2
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -7
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +5 -28
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +30 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +2 -7
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +5 -32
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +34 -2
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +2 -12
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +10 -104
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +105 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +2 -17
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +15 -123
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -18
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +14 -6
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +7 -167
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +170 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -14
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +11 -105
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +108 -2
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -10
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +8 -45
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +47 -2
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -0
  77. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  78. package/package.json +1 -1
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +0 -2
@@ -1,10 +1,347 @@
1
+ import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as ee, Input as i, Tabs as te, TabsContent as a, TabsList as o, TabsTrigger as s, Tooltip as ne, TooltipContent as re, TooltipProvider as ie, TooltipTrigger as ae } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as c } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as oe } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
+ import "../../../shared/ui/dist/index.js";
5
+ import { AddBillPanel as l } from "./index7.js";
6
+ import "./index8.js";
7
+ import { BillStatusBadge as se } from "./index20.js";
8
+ import "./index21.js";
9
+ import { DueDateValue as ce } from "./index23.js";
10
+ import "./index24.js";
11
+ import { MissingValue as u } from "./index54.js";
12
+ import "./index55.js";
13
+ import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index56.js";
14
+ import { BillDuplicateBadge as le } from "./index58.js";
15
+ import "./index59.js";
16
+ import { BillsFilterBar as ue } from "./index65.js";
17
+ import "./index66.js";
18
+ import { BillColumn as p } from "./index67.js";
19
+ import { useMemo as m } from "react";
20
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
21
+ import { ChevronRightIcon as de, CopyX as fe, PaperclipIcon as pe, PlusIcon as me, SearchIcon as he } from "lucide-react";
1
22
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js
2
- var e = {
3
- collapse: "Collapse upload status",
4
- expand: "Expand upload status",
5
- close: "Close upload status",
6
- statusLabel: (e) => e === "uploading" ? "Uploading" : e === "ready" ? "Ready" : "Failed",
7
- openItem: (e) => `Open ${e}`
8
- };
23
+ var ge = [
24
+ 10,
25
+ 25,
26
+ 50,
27
+ 100
28
+ ], _e = 240, _ = 40, ve = [
29
+ p.Vendor,
30
+ p.Attachment,
31
+ p.IssueDate,
32
+ p.DueDate,
33
+ p.ScheduledDate,
34
+ p.PaidDate,
35
+ p.Status,
36
+ p.AmountDue,
37
+ p.AmountScheduled,
38
+ p.AmountPaid,
39
+ p.TotalAmount,
40
+ p.AddedOn
41
+ ], v = [
42
+ p.Vendor,
43
+ p.Attachment,
44
+ p.DueDate,
45
+ p.Status,
46
+ p.AmountDue,
47
+ p.AddedOn
48
+ ];
49
+ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be, pageSize: S, onPageSizeChange: C, pageSizeOptions: w = ge, pageInfo: T, hasNextPage: E, hasPrevPage: D, onNextPage: O, onPrevPage: k, filterTabs: A, selectedFilterTabId: j, onFilterTabChange: M, searchValue: N, onSearchChange: xe, filters: P, visibleColumns: F = v, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: Se, emptyState: R, onCreateClick: z, onRetry: B, onFilesSelected: V, maxFiles: H, onEnterManually: U, uploadStatus: W, uploadErrorMessage: G, emailAddress: K, onCopyEmail: q, labels: J, duplicateWarning: Y, onReviewDuplicates: X }) {
50
+ let Z = m(() => ({
51
+ ...d,
52
+ ...J,
53
+ statusBadge: {
54
+ ...d.statusBadge,
55
+ ...J?.statusBadge
56
+ },
57
+ addBill: {
58
+ ...d.addBill,
59
+ ...J?.addBill,
60
+ dropzone: {
61
+ ...d.addBill.dropzone,
62
+ ...J?.addBill?.dropzone
63
+ }
64
+ },
65
+ sortableHeader: {
66
+ ...d.sortableHeader,
67
+ ...J?.sortableHeader
68
+ },
69
+ missingValue: {
70
+ ...d.missingValue,
71
+ ...J?.missingValue
72
+ },
73
+ dueDate: {
74
+ ...d.dueDate,
75
+ ...J?.dueDate
76
+ }
77
+ }), [J]), Q = m(() => {
78
+ let e = (e) => function({ column: t }) {
79
+ return /* @__PURE__ */ h(ee, {
80
+ column: t,
81
+ title: e,
82
+ labels: Z.sortableHeader
83
+ });
84
+ }, t = (e, t) => function({ row: n }) {
85
+ return /* @__PURE__ */ h("span", {
86
+ "data-testid": I?.[t],
87
+ children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
88
+ });
89
+ }, n = function({ row: e }) {
90
+ return /* @__PURE__ */ h("span", {
91
+ "data-testid": I?.[p.DueDate],
92
+ children: /* @__PURE__ */ h(ce, {
93
+ value: e.original.dueDateLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue }),
94
+ tone: e.original.dueDateTone,
95
+ labels: Z.dueDate
96
+ })
97
+ });
98
+ }, r = (e, t) => function({ row: n }) {
99
+ return /* @__PURE__ */ h("div", {
100
+ className: "ttw:text-right",
101
+ "data-testid": I?.[t],
102
+ children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
103
+ });
104
+ }, i = (e) => function() {
105
+ return /* @__PURE__ */ h("div", {
106
+ className: "ttw:text-right",
107
+ children: e
108
+ });
109
+ };
110
+ return {
111
+ [p.Vendor]: {
112
+ accessorKey: "vendorLabel",
113
+ enableSorting: !0,
114
+ minSize: _e,
115
+ header: e(Z.columnVendor),
116
+ cell: ({ row: e }) => /* @__PURE__ */ h("span", {
117
+ "data-testid": I?.[p.Vendor],
118
+ children: e.original.vendorLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue })
119
+ })
120
+ },
121
+ [p.Attachment]: {
122
+ accessorKey: "attachment",
123
+ enableSorting: !1,
124
+ size: _,
125
+ minSize: _,
126
+ header: () => /* @__PURE__ */ h("span", {
127
+ className: "ttw:sr-only",
128
+ children: Z.columnAttachment
129
+ }),
130
+ cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ h("div", {
131
+ className: "ttw:flex ttw:justify-center",
132
+ "data-testid": I?.[p.Attachment],
133
+ children: /* @__PURE__ */ h(ie, { children: /* @__PURE__ */ g(ne, { children: [/* @__PURE__ */ h(ae, {
134
+ type: "button",
135
+ className: "ttw:inline-flex ttw:cursor-default",
136
+ "aria-label": e.original.attachment.label,
137
+ onClick: (e) => e.stopPropagation(),
138
+ children: /* @__PURE__ */ h(pe, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
139
+ }), /* @__PURE__ */ h(re, { children: e.original.attachment.label })] }) })
140
+ }) : null
141
+ },
142
+ [p.IssueDate]: {
143
+ accessorKey: "issueDateLabel",
144
+ enableSorting: !0,
145
+ header: e(Z.columnIssueDate),
146
+ cell: t("issueDateLabel", p.IssueDate)
147
+ },
148
+ [p.DueDate]: {
149
+ accessorKey: "dueDateLabel",
150
+ enableSorting: !0,
151
+ header: e(Z.columnDueDate),
152
+ cell: n
153
+ },
154
+ [p.ScheduledDate]: {
155
+ accessorKey: "scheduledDateLabel",
156
+ enableSorting: !0,
157
+ header: e(Z.columnScheduledDate),
158
+ cell: t("scheduledDateLabel", p.ScheduledDate)
159
+ },
160
+ [p.PaidDate]: {
161
+ accessorKey: "paidDateLabel",
162
+ enableSorting: !1,
163
+ header: Z.columnPaidDate,
164
+ cell: t("paidDateLabel", p.PaidDate)
165
+ },
166
+ [p.Status]: {
167
+ accessorKey: "status",
168
+ enableSorting: !1,
169
+ header: Z.columnStatus,
170
+ cell: ({ row: e }) => /* @__PURE__ */ g("div", {
171
+ className: "ttw:flex ttw:items-center ttw:gap-1",
172
+ "data-testid": I?.[p.Status],
173
+ children: [/* @__PURE__ */ h(se, {
174
+ status: e.original.status,
175
+ tone: e.original.statusTone,
176
+ labels: Z.statusBadge
177
+ }), e.original.duplicateBadge ? /* @__PURE__ */ h(le, { ...e.original.duplicateBadge }) : null]
178
+ })
179
+ },
180
+ [p.AmountDue]: {
181
+ accessorKey: "amountDueLabel",
182
+ enableSorting: !1,
183
+ header: i(Z.columnAmountDue),
184
+ cell: r("amountDueLabel", p.AmountDue)
185
+ },
186
+ [p.AmountScheduled]: {
187
+ accessorKey: "amountScheduledLabel",
188
+ enableSorting: !1,
189
+ header: i(Z.columnAmountScheduled),
190
+ cell: r("amountScheduledLabel", p.AmountScheduled)
191
+ },
192
+ [p.AmountPaid]: {
193
+ accessorKey: "amountPaidLabel",
194
+ enableSorting: !1,
195
+ header: i(Z.columnAmountPaid),
196
+ cell: r("amountPaidLabel", p.AmountPaid)
197
+ },
198
+ [p.TotalAmount]: {
199
+ accessorKey: "totalAmountLabel",
200
+ enableSorting: !1,
201
+ header: i(Z.columnTotalAmount),
202
+ cell: r("totalAmountLabel", p.TotalAmount)
203
+ },
204
+ [p.AddedOn]: {
205
+ accessorKey: "addedOnLabel",
206
+ enableSorting: !0,
207
+ header: e(Z.columnAddedOn),
208
+ cell: t("addedOnLabel", p.AddedOn)
209
+ }
210
+ };
211
+ }, [Z, I]), Ce = m(() => [...ve.filter((e) => F.includes(e)).map((e) => Q[e]), {
212
+ id: "actions",
213
+ enableSorting: !1,
214
+ header: () => /* @__PURE__ */ h("span", {
215
+ className: "ttw:sr-only",
216
+ children: Z.columnActions
217
+ }),
218
+ cell: ({ row: e }) => /* @__PURE__ */ h("div", {
219
+ className: "ttw:flex ttw:justify-end",
220
+ children: /* @__PURE__ */ h(n, {
221
+ variant: "ghost",
222
+ size: "icon",
223
+ "aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
224
+ onClick: (t) => {
225
+ t.stopPropagation(), e.original.onOpen();
226
+ },
227
+ children: /* @__PURE__ */ h(de, { className: "ttw:size-4" })
228
+ })
229
+ })
230
+ }], [
231
+ Q,
232
+ Z,
233
+ F
234
+ ]), we = !!(z && V) && !b && !x && !L && y.length === 0 && Se === !0, $ = /* @__PURE__ */ g("div", {
235
+ className: "ttw:relative ttw:w-80",
236
+ children: [/* @__PURE__ */ h(he, { 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__ */ h(i, {
237
+ className: "ttw:pl-9",
238
+ type: "search",
239
+ "aria-label": Z.searchLabel,
240
+ placeholder: Z.searchPlaceholder,
241
+ value: N,
242
+ onChange: (e) => xe(e.target.value)
243
+ })]
244
+ }), Te = P ? /* @__PURE__ */ h(ue, {
245
+ ...P,
246
+ className: "ttw:px-4",
247
+ searchSlot: $
248
+ }) : /* @__PURE__ */ h("div", {
249
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
250
+ children: $
251
+ });
252
+ return /* @__PURE__ */ g("div", {
253
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
254
+ children: [Y ? /* @__PURE__ */ g(e, {
255
+ className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
256
+ children: [
257
+ /* @__PURE__ */ h(fe, {}),
258
+ /* @__PURE__ */ h(t, {
259
+ className: "ttw:flex-1",
260
+ children: Y
261
+ }),
262
+ X ? /* @__PURE__ */ h(n, {
263
+ type: "button",
264
+ variant: "outline",
265
+ className: "ttw:text-foreground",
266
+ onClick: X,
267
+ children: Z.duplicateBillsReviewButton
268
+ }) : null
269
+ ]
270
+ }) : null, /* @__PURE__ */ g(te, {
271
+ value: j,
272
+ onValueChange: M,
273
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
274
+ children: [/* @__PURE__ */ g("div", {
275
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
276
+ children: [/* @__PURE__ */ h(o, {
277
+ "aria-label": Z.filterTabsLabel,
278
+ children: A.map((e) => /* @__PURE__ */ g(s, {
279
+ value: e.id,
280
+ className: "ttw:min-w-28",
281
+ children: [e.icon, e.label]
282
+ }, e.id))
283
+ }), z ? /* @__PURE__ */ g(n, {
284
+ onClick: z,
285
+ children: [/* @__PURE__ */ h(me, { className: "ttw:size-4" }), Z.createButton]
286
+ }) : null]
287
+ }), (() => {
288
+ let e = x ? /* @__PURE__ */ h(oe, {
289
+ title: Z.errorTitle,
290
+ description: Z.errorDescription,
291
+ retryLabel: B ? Z.errorRetry : void 0,
292
+ onRetry: B
293
+ }) : we && z && V ? /* @__PURE__ */ h("div", {
294
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
295
+ children: K && q ? /* @__PURE__ */ h(l, {
296
+ emailAddress: K,
297
+ onCopyEmail: q,
298
+ onFilesSelected: V,
299
+ accept: f,
300
+ maxFiles: H,
301
+ uploadStatus: W,
302
+ uploadErrorMessage: G,
303
+ onEnterManually: U ?? z,
304
+ labels: Z.addBill
305
+ }) : /* @__PURE__ */ h(l, {
306
+ onFilesSelected: V,
307
+ accept: f,
308
+ maxFiles: H,
309
+ uploadStatus: W,
310
+ uploadErrorMessage: G,
311
+ onEnterManually: U ?? z,
312
+ labels: Z.addBill
313
+ })
314
+ }) : /* @__PURE__ */ h(r, {
315
+ columns: Ce,
316
+ data: y,
317
+ isLoading: b,
318
+ sorting: ye,
319
+ onSortingChange: be,
320
+ pageSize: S,
321
+ onPageSizeChange: C,
322
+ pageSizeOptions: w,
323
+ pageInfo: T,
324
+ hasNextPage: E,
325
+ hasPrevPage: D,
326
+ onNextPage: O,
327
+ onPrevPage: k,
328
+ onRowClick: (e) => e.onOpen(),
329
+ filterComponent: Te,
330
+ children: L ? /* @__PURE__ */ h(c, {
331
+ title: Z.filteredEmptyTitle,
332
+ description: Z.filteredEmptyDescription
333
+ }) : R ? /* @__PURE__ */ h(c, {
334
+ title: R.title,
335
+ description: R.description
336
+ }) : void 0
337
+ });
338
+ return A.map((t) => /* @__PURE__ */ h(a, {
339
+ value: t.id,
340
+ children: t.id === j ? e : null
341
+ }, t.id));
342
+ })()]
343
+ })]
344
+ });
345
+ }
9
346
  //#endregion
10
- export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
347
+ export { y as BillsScreen, y as default, v as DEFAULT_BILL_COLUMNS };
@@ -1,8 +1,10 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js
2
2
  var e = {
3
- uploading: "ttw:text-muted-foreground",
4
- ready: "ttw:text-emerald-600",
5
- failed: "ttw:text-destructive"
3
+ collapse: "Collapse upload status",
4
+ expand: "Expand upload status",
5
+ close: "Close upload status",
6
+ statusLabel: (e) => e === "uploading" ? "Uploading" : e === "ready" ? "Ready" : "Failed",
7
+ openItem: (e) => `Open ${e}`
6
8
  };
7
9
  //#endregion
8
- export { e as UPLOAD_ITEM_ICON_TONE };
10
+ export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
@@ -1,93 +1,8 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index68.js";
3
- import { UPLOAD_ITEM_ICON_TONE as n } from "./index69.js";
4
- import { useId as r } from "react";
5
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { CheckCircle2 as s, ChevronDown as c, ChevronRight as l, ChevronUp as u, Loader2 as d, X as f, XCircle as p } from "lucide-react";
7
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js
8
- function m({ status: t }) {
9
- let r = e("ttw:size-4", n[t]);
10
- return t === "uploading" ? /* @__PURE__ */ a(d, {
11
- "aria-hidden": !0,
12
- className: e(r, "ttw:animate-spin")
13
- }) : a(t === "ready" ? s : p, {
14
- "aria-hidden": !0,
15
- className: r
16
- });
17
- }
18
- function h({ item: t, labels: n }) {
19
- let s = r(), c = /* @__PURE__ */ o(i, { children: [
20
- /* @__PURE__ */ a(m, { status: t.status }),
21
- /* @__PURE__ */ a("span", {
22
- id: s,
23
- className: "ttw:sr-only",
24
- children: n.statusLabel(t.status)
25
- }),
26
- /* @__PURE__ */ a("span", {
27
- className: "ttw:flex-1 ttw:truncate ttw:text-left ttw:text-sm ttw:text-foreground",
28
- children: t.fileName
29
- }),
30
- t.onOpen ? /* @__PURE__ */ a(l, {
31
- "aria-hidden": !0,
32
- className: "ttw:size-4"
33
- }) : null
34
- ] }), u = "ttw:flex ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-2.5";
35
- return t.onOpen ? /* @__PURE__ */ a("button", {
36
- type: "button",
37
- onClick: t.onOpen,
38
- "aria-describedby": s,
39
- "aria-label": n.openItem(t.fileName),
40
- className: e(u, "ttw:w-full ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-muted/50 ttw:hover:text-foreground"),
41
- children: c
42
- }) : /* @__PURE__ */ a("div", {
43
- "aria-describedby": s,
44
- className: u,
45
- children: c
46
- });
47
- }
48
- function g({ sections: e, summaryLabel: n, collapsed: r, onToggleCollapsed: i, onClose: s, testId: l, labels: d }) {
49
- let p = {
50
- ...t,
51
- ...d
52
- };
53
- return /* @__PURE__ */ o("div", {
54
- className: "ttw:fixed ttw:right-4 ttw:bottom-4 ttw:z-50 ttw:w-96 ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
55
- "data-testid": l,
56
- children: [/* @__PURE__ */ o("div", {
57
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-b ttw:border-border ttw:bg-muted/40 ttw:px-4 ttw:py-3",
58
- children: [
59
- /* @__PURE__ */ a("span", {
60
- "aria-live": "polite",
61
- className: "ttw:flex-1 ttw:text-base ttw:font-semibold ttw:text-foreground",
62
- children: n
63
- }),
64
- /* @__PURE__ */ a("button", {
65
- type: "button",
66
- onClick: i,
67
- "aria-label": r ? p.expand : p.collapse,
68
- "aria-expanded": !r,
69
- className: "ttw:text-muted-foreground ttw:hover:text-foreground",
70
- children: a(r ? u : c, { className: "ttw:size-4" })
71
- }),
72
- /* @__PURE__ */ a("button", {
73
- type: "button",
74
- onClick: s,
75
- "aria-label": p.close,
76
- className: "ttw:text-muted-foreground ttw:hover:text-foreground",
77
- children: /* @__PURE__ */ a(f, { className: "ttw:size-4" })
78
- })
79
- ]
80
- }), r ? null : /* @__PURE__ */ a("div", {
81
- className: "ttw:max-h-96 ttw:overflow-y-auto",
82
- children: e.map((e) => /* @__PURE__ */ o("div", { children: [e.caption ? /* @__PURE__ */ a("p", {
83
- className: "ttw:px-4 ttw:pt-3 ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
84
- children: e.caption
85
- }) : null, e.items.map((e) => /* @__PURE__ */ a(h, {
86
- item: e,
87
- labels: p
88
- }, e.id))] }, e.id))
89
- })]
90
- });
91
- }
2
+ var e = {
3
+ uploading: "ttw:text-muted-foreground",
4
+ ready: "ttw:text-emerald-600",
5
+ failed: "ttw:text-destructive"
6
+ };
92
7
  //#endregion
93
- export { g as BillUploadStatusTray, g as default };
8
+ export { e as UPLOAD_ITEM_ICON_TONE };
@@ -0,0 +1,93 @@
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index69.js";
3
+ import { UPLOAD_ITEM_ICON_TONE as n } from "./index70.js";
4
+ import { useId as r } from "react";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ import { CheckCircle2 as s, ChevronDown as c, ChevronRight as l, ChevronUp as u, Loader2 as d, X as f, XCircle as p } from "lucide-react";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js
8
+ function m({ status: t }) {
9
+ let r = e("ttw:size-4", n[t]);
10
+ return t === "uploading" ? /* @__PURE__ */ a(d, {
11
+ "aria-hidden": !0,
12
+ className: e(r, "ttw:animate-spin")
13
+ }) : a(t === "ready" ? s : p, {
14
+ "aria-hidden": !0,
15
+ className: r
16
+ });
17
+ }
18
+ function h({ item: t, labels: n }) {
19
+ let s = r(), c = /* @__PURE__ */ o(i, { children: [
20
+ /* @__PURE__ */ a(m, { status: t.status }),
21
+ /* @__PURE__ */ a("span", {
22
+ id: s,
23
+ className: "ttw:sr-only",
24
+ children: n.statusLabel(t.status)
25
+ }),
26
+ /* @__PURE__ */ a("span", {
27
+ className: "ttw:flex-1 ttw:truncate ttw:text-left ttw:text-sm ttw:text-foreground",
28
+ children: t.fileName
29
+ }),
30
+ t.onOpen ? /* @__PURE__ */ a(l, {
31
+ "aria-hidden": !0,
32
+ className: "ttw:size-4"
33
+ }) : null
34
+ ] }), u = "ttw:flex ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-2.5";
35
+ return t.onOpen ? /* @__PURE__ */ a("button", {
36
+ type: "button",
37
+ onClick: t.onOpen,
38
+ "aria-describedby": s,
39
+ "aria-label": n.openItem(t.fileName),
40
+ className: e(u, "ttw:w-full ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-muted/50 ttw:hover:text-foreground"),
41
+ children: c
42
+ }) : /* @__PURE__ */ a("div", {
43
+ "aria-describedby": s,
44
+ className: u,
45
+ children: c
46
+ });
47
+ }
48
+ function g({ sections: e, summaryLabel: n, collapsed: r, onToggleCollapsed: i, onClose: s, testId: l, labels: d }) {
49
+ let p = {
50
+ ...t,
51
+ ...d
52
+ };
53
+ return /* @__PURE__ */ o("div", {
54
+ className: "ttw:fixed ttw:right-4 ttw:bottom-4 ttw:z-50 ttw:w-96 ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
55
+ "data-testid": l,
56
+ children: [/* @__PURE__ */ o("div", {
57
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-b ttw:border-border ttw:bg-muted/40 ttw:px-4 ttw:py-3",
58
+ children: [
59
+ /* @__PURE__ */ a("span", {
60
+ "aria-live": "polite",
61
+ className: "ttw:flex-1 ttw:text-base ttw:font-semibold ttw:text-foreground",
62
+ children: n
63
+ }),
64
+ /* @__PURE__ */ a("button", {
65
+ type: "button",
66
+ onClick: i,
67
+ "aria-label": r ? p.expand : p.collapse,
68
+ "aria-expanded": !r,
69
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
70
+ children: a(r ? u : c, { className: "ttw:size-4" })
71
+ }),
72
+ /* @__PURE__ */ a("button", {
73
+ type: "button",
74
+ onClick: s,
75
+ "aria-label": p.close,
76
+ className: "ttw:text-muted-foreground ttw:hover:text-foreground",
77
+ children: /* @__PURE__ */ a(f, { className: "ttw:size-4" })
78
+ })
79
+ ]
80
+ }), r ? null : /* @__PURE__ */ a("div", {
81
+ className: "ttw:max-h-96 ttw:overflow-y-auto",
82
+ children: e.map((e) => /* @__PURE__ */ o("div", { children: [e.caption ? /* @__PURE__ */ a("p", {
83
+ className: "ttw:px-4 ttw:pt-3 ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
84
+ children: e.caption
85
+ }) : null, e.items.map((e) => /* @__PURE__ */ a(h, {
86
+ item: e,
87
+ labels: p
88
+ }, e.id))] }, e.id))
89
+ })]
90
+ });
91
+ }
92
+ //#endregion
93
+ export { g as BillUploadStatusTray, g as default };
@@ -1,121 +1,2 @@
1
- import { Button as e, Checkbox as t, Table as n, TableBody as r, TableCell as i, TableHead as a, TableHeader as o, TableRow as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillStatusBadge as c } from "./index20.js";
3
- import "./index21.js";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
5
- import { Ban as d, ChevronRightIcon as f } from "lucide-react";
6
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js
7
- var p = "ttw:border-b ttw:border-border", m = `${p} ttw:whitespace-nowrap`, h = "ttw:bg-white", g = "ttw:gap-4", _ = "ttw:gap-2.5";
8
- function v({ group: v, isBusy: y, labels: b }) {
9
- let x = v.isActionDisabled || y || v.isRemoveUnavailable, S = !!(v.onKeepSelected || v.onRemoveDuplicates);
10
- return /* @__PURE__ */ u("div", {
11
- className: `ttw:flex ttw:flex-col ${g}`,
12
- children: [/* @__PURE__ */ u(n, { children: [/* @__PURE__ */ l(o, { children: /* @__PURE__ */ u(s, { children: [
13
- S ? /* @__PURE__ */ l(a, {
14
- className: "ttw:w-11",
15
- children: /* @__PURE__ */ l(t, {
16
- className: h,
17
- "aria-label": v.selectAllLabel,
18
- checked: v.selectAllChecked ?? !1,
19
- disabled: y,
20
- onCheckedChange: v.onToggleAllRows
21
- })
22
- }) : null,
23
- /* @__PURE__ */ l(a, { children: b.columnAddedOn }),
24
- /* @__PURE__ */ l(a, { children: b.columnInvoiceDate }),
25
- /* @__PURE__ */ l(a, { children: b.columnStatus }),
26
- /* @__PURE__ */ l(a, { children: b.columnInvoiceNumber }),
27
- /* @__PURE__ */ l(a, { children: b.columnAmount }),
28
- /* @__PURE__ */ l(a, {
29
- className: "ttw:w-14",
30
- children: /* @__PURE__ */ l("span", {
31
- className: "ttw:sr-only",
32
- children: b.columnActions
33
- })
34
- })
35
- ] }) }), /* @__PURE__ */ l(r, { children: v.rows.map((n) => /* @__PURE__ */ u(s, { children: [
36
- S ? /* @__PURE__ */ l(i, {
37
- className: p,
38
- children: /* @__PURE__ */ l(t, {
39
- className: h,
40
- "aria-label": n.selectLabel,
41
- checked: n.isSelected ?? !1,
42
- disabled: y,
43
- onCheckedChange: n.onToggleSelected
44
- })
45
- }) : null,
46
- /* @__PURE__ */ l(i, {
47
- className: m,
48
- children: n.addedOnLabel
49
- }),
50
- /* @__PURE__ */ l(i, {
51
- className: m,
52
- children: n.invoiceDateLabel
53
- }),
54
- /* @__PURE__ */ l(i, {
55
- className: m,
56
- children: n.status && n.statusTone ? /* @__PURE__ */ l(c, {
57
- status: n.status,
58
- tone: n.statusTone,
59
- labels: b.statusBadge
60
- }) : null
61
- }),
62
- /* @__PURE__ */ l(i, {
63
- className: m,
64
- children: n.invoiceNumberLabel
65
- }),
66
- /* @__PURE__ */ l(i, {
67
- className: m,
68
- children: n.amountLabel
69
- }),
70
- /* @__PURE__ */ l(i, {
71
- className: p,
72
- children: /* @__PURE__ */ l("div", {
73
- className: "ttw:flex ttw:justify-end",
74
- children: /* @__PURE__ */ l(e, {
75
- variant: "ghost",
76
- size: "icon",
77
- "aria-label": n.openLabel,
78
- disabled: y,
79
- onClick: n.onOpen,
80
- children: /* @__PURE__ */ l(f, { className: "ttw:size-4" })
81
- })
82
- })
83
- })
84
- ] }, n.id)) })] }), /* @__PURE__ */ u("div", {
85
- className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-2",
86
- children: [/* @__PURE__ */ u("p", {
87
- className: "ttw:text-right ttw:text-sm ttw:text-muted-foreground",
88
- children: [
89
- b.removalHelperBeforeDraft,
90
- /* @__PURE__ */ l("span", {
91
- className: "ttw:font-semibold",
92
- children: b.removalHelperDraft
93
- }),
94
- b.removalHelperBetween,
95
- /* @__PURE__ */ l("span", {
96
- className: "ttw:font-semibold",
97
- children: b.removalHelperFinalized
98
- }),
99
- b.removalHelperAfterFinalized
100
- ]
101
- }), S ? /* @__PURE__ */ u("div", {
102
- className: `ttw:flex ttw:flex-wrap ttw:justify-end ${_}`,
103
- children: [v.onKeepSelected ? /* @__PURE__ */ l(e, {
104
- variant: "outline",
105
- disabled: v.isActionDisabled || y,
106
- loading: v.pendingAction === "keep",
107
- onClick: v.onKeepSelected,
108
- children: b.keepSelectedButton
109
- }) : null, v.onRemoveDuplicates ? /* @__PURE__ */ u(e, {
110
- variant: "destructive",
111
- disabled: x,
112
- loading: v.pendingAction === "remove",
113
- onClick: v.onRemoveDuplicates,
114
- children: [v.pendingAction === "remove" ? null : /* @__PURE__ */ l(d, {}), b.removeDuplicatesButton]
115
- }) : null]
116
- }) : null]
117
- })]
118
- });
119
- }
120
- //#endregion
121
- export { v as DuplicateBillsGroupPanel, v as default };
1
+ import "./index69.js";
2
+ import "./index71.js";