@tesouro/embedded-components-react 0.3.18 → 0.3.20

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 (58) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +14 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +28 -97
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +81 -176
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +50 -4
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +250 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +106 -107
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +209 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -24
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +114 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -0
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +25 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +21 -17
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +36 -11
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +10 -283
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +199 -8
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +3 -8
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +14 -91
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +314 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +4 -14
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +85 -105
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -7
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +16 -28
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +113 -2
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +2 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +5 -32
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +30 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -12
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +5 -104
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -18
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +9 -7
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +81 -145
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +15 -11
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +8 -87
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +170 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -0
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +89 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -0
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  56. package/dist/packages/shared-ui-shadcn/dist/index.js +16 -11
  57. package/package.json +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -2
@@ -0,0 +1,314 @@
1
+ import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as i, Input as a, Tabs as ee, TabsContent as te, TabsList as ne, TabsTrigger as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as s } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as c } 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 re } from "./index20.js";
8
+ import "./index21.js";
9
+ import { MissingValue as u } from "./index50.js";
10
+ import "./index51.js";
11
+ import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index52.js";
12
+ import { BillDuplicateBadge as ie } from "./index54.js";
13
+ import "./index55.js";
14
+ import { BillsFilterBar as p } from "./index61.js";
15
+ import "./index62.js";
16
+ import { BillColumn as m } from "./index63.js";
17
+ import { useMemo as h } from "react";
18
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
19
+ import { ChevronRightIcon as v, CopyX as ae, PaperclipIcon as oe, PlusIcon as se, SearchIcon as ce } from "lucide-react";
20
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js
21
+ var le = [
22
+ 10,
23
+ 25,
24
+ 50,
25
+ 100
26
+ ], ue = 240, de = [
27
+ m.Vendor,
28
+ m.IssueDate,
29
+ m.DueDate,
30
+ m.ScheduledDate,
31
+ m.PaidDate,
32
+ m.Status,
33
+ m.AmountDue,
34
+ m.AmountScheduled,
35
+ m.AmountPaid,
36
+ m.TotalAmount,
37
+ m.AddedOn
38
+ ], y = [
39
+ m.Vendor,
40
+ m.DueDate,
41
+ m.Status,
42
+ m.AmountDue,
43
+ m.AddedOn
44
+ ];
45
+ function b({ rows: b, isLoading: x, isError: S, sorting: fe, onSortingChange: pe, pageSize: me, onPageSizeChange: he, pageSizeOptions: ge = le, pageInfo: C, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, filterTabs: O, selectedFilterTabId: k, onFilterTabChange: A, searchValue: j, onSearchChange: M, filters: N, visibleColumns: P = y, cellTestIds: F, isSearchActive: I, showAddPanelWhenEmpty: L, 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 }) {
46
+ let Z = h(() => ({
47
+ ...d,
48
+ ...J,
49
+ statusBadge: {
50
+ ...d.statusBadge,
51
+ ...J?.statusBadge
52
+ },
53
+ addBill: {
54
+ ...d.addBill,
55
+ ...J?.addBill,
56
+ dropzone: {
57
+ ...d.addBill.dropzone,
58
+ ...J?.addBill?.dropzone
59
+ }
60
+ },
61
+ sortableHeader: {
62
+ ...d.sortableHeader,
63
+ ...J?.sortableHeader
64
+ },
65
+ missingValue: {
66
+ ...d.missingValue,
67
+ ...J?.missingValue
68
+ }
69
+ }), [J]), Q = h(() => {
70
+ let e = (e) => function({ column: t }) {
71
+ return /* @__PURE__ */ g(i, {
72
+ column: t,
73
+ title: e,
74
+ labels: Z.sortableHeader
75
+ });
76
+ }, t = (e, t) => function({ row: n }) {
77
+ return /* @__PURE__ */ g("span", {
78
+ "data-testid": F?.[t],
79
+ children: n.original[e] || /* @__PURE__ */ g(u, { labels: Z.missingValue })
80
+ });
81
+ }, n = (e, t) => function({ row: n }) {
82
+ return /* @__PURE__ */ g("div", {
83
+ className: "ttw:text-right",
84
+ "data-testid": F?.[t],
85
+ children: n.original[e] || /* @__PURE__ */ g(u, { labels: Z.missingValue })
86
+ });
87
+ }, r = (e) => function() {
88
+ return /* @__PURE__ */ g("div", {
89
+ className: "ttw:text-right",
90
+ children: e
91
+ });
92
+ };
93
+ return {
94
+ [m.Vendor]: {
95
+ accessorKey: "vendorLabel",
96
+ enableSorting: !0,
97
+ minSize: ue,
98
+ header: e(Z.columnVendor),
99
+ cell: ({ row: e }) => /* @__PURE__ */ _("span", {
100
+ className: "ttw:flex ttw:items-center ttw:gap-1.5",
101
+ "data-testid": F?.[m.Vendor],
102
+ children: [e.original.vendorLabel || /* @__PURE__ */ g(u, { labels: Z.missingValue }), e.original.attachment ? /* @__PURE__ */ g(oe, {
103
+ className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground",
104
+ "aria-label": e.original.attachment.label,
105
+ role: "img"
106
+ }) : null]
107
+ })
108
+ },
109
+ [m.IssueDate]: {
110
+ accessorKey: "issueDateLabel",
111
+ enableSorting: !0,
112
+ header: e(Z.columnIssueDate),
113
+ cell: t("issueDateLabel", m.IssueDate)
114
+ },
115
+ [m.DueDate]: {
116
+ accessorKey: "dueDateLabel",
117
+ enableSorting: !0,
118
+ header: e(Z.columnDueDate),
119
+ cell: t("dueDateLabel", m.DueDate)
120
+ },
121
+ [m.ScheduledDate]: {
122
+ accessorKey: "scheduledDateLabel",
123
+ enableSorting: !0,
124
+ header: e(Z.columnScheduledDate),
125
+ cell: t("scheduledDateLabel", m.ScheduledDate)
126
+ },
127
+ [m.PaidDate]: {
128
+ accessorKey: "paidDateLabel",
129
+ enableSorting: !1,
130
+ header: Z.columnPaidDate,
131
+ cell: t("paidDateLabel", m.PaidDate)
132
+ },
133
+ [m.Status]: {
134
+ accessorKey: "status",
135
+ enableSorting: !1,
136
+ header: Z.columnStatus,
137
+ cell: ({ row: e }) => /* @__PURE__ */ _("div", {
138
+ className: "ttw:flex ttw:items-center ttw:gap-1",
139
+ "data-testid": F?.[m.Status],
140
+ children: [/* @__PURE__ */ g(re, {
141
+ status: e.original.status,
142
+ tone: e.original.statusTone,
143
+ labels: Z.statusBadge
144
+ }), e.original.duplicateBadge ? /* @__PURE__ */ g(ie, { ...e.original.duplicateBadge }) : null]
145
+ })
146
+ },
147
+ [m.AmountDue]: {
148
+ accessorKey: "amountDueLabel",
149
+ enableSorting: !1,
150
+ header: r(Z.columnAmountDue),
151
+ cell: n("amountDueLabel", m.AmountDue)
152
+ },
153
+ [m.AmountScheduled]: {
154
+ accessorKey: "amountScheduledLabel",
155
+ enableSorting: !1,
156
+ header: r(Z.columnAmountScheduled),
157
+ cell: n("amountScheduledLabel", m.AmountScheduled)
158
+ },
159
+ [m.AmountPaid]: {
160
+ accessorKey: "amountPaidLabel",
161
+ enableSorting: !1,
162
+ header: r(Z.columnAmountPaid),
163
+ cell: n("amountPaidLabel", m.AmountPaid)
164
+ },
165
+ [m.TotalAmount]: {
166
+ accessorKey: "totalAmountLabel",
167
+ enableSorting: !1,
168
+ header: r(Z.columnTotalAmount),
169
+ cell: n("totalAmountLabel", m.TotalAmount)
170
+ },
171
+ [m.AddedOn]: {
172
+ accessorKey: "addedOnLabel",
173
+ enableSorting: !0,
174
+ header: e(Z.columnAddedOn),
175
+ cell: t("addedOnLabel", m.AddedOn)
176
+ }
177
+ };
178
+ }, [Z, F]), _e = h(() => [...de.filter((e) => P.includes(e)).map((e) => Q[e]), {
179
+ id: "actions",
180
+ enableSorting: !1,
181
+ header: () => /* @__PURE__ */ g("span", {
182
+ className: "ttw:sr-only",
183
+ children: Z.columnActions
184
+ }),
185
+ cell: ({ row: e }) => /* @__PURE__ */ g("div", {
186
+ className: "ttw:flex ttw:justify-end",
187
+ children: /* @__PURE__ */ g(n, {
188
+ variant: "ghost",
189
+ size: "icon",
190
+ "aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
191
+ onClick: (t) => {
192
+ t.stopPropagation(), e.original.onOpen();
193
+ },
194
+ children: /* @__PURE__ */ g(v, { className: "ttw:size-4" })
195
+ })
196
+ })
197
+ }], [
198
+ Q,
199
+ Z,
200
+ P
201
+ ]), ve = !!(z && V) && !x && !S && !I && b.length === 0 && L === !0, $ = /* @__PURE__ */ _("div", {
202
+ className: "ttw:relative ttw:w-80",
203
+ children: [/* @__PURE__ */ g(ce, { 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__ */ g(a, {
204
+ className: "ttw:pl-9",
205
+ type: "search",
206
+ "aria-label": Z.searchLabel,
207
+ placeholder: Z.searchPlaceholder,
208
+ value: j,
209
+ onChange: (e) => M(e.target.value)
210
+ })]
211
+ }), ye = N ? /* @__PURE__ */ g(p, {
212
+ ...N,
213
+ className: "ttw:px-4",
214
+ searchSlot: $
215
+ }) : /* @__PURE__ */ g("div", {
216
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
217
+ children: $
218
+ });
219
+ return /* @__PURE__ */ _("div", {
220
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
221
+ children: [Y ? /* @__PURE__ */ _(e, {
222
+ className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
223
+ children: [
224
+ /* @__PURE__ */ g(ae, {}),
225
+ /* @__PURE__ */ g(t, {
226
+ className: "ttw:flex-1",
227
+ children: Y
228
+ }),
229
+ X ? /* @__PURE__ */ g(n, {
230
+ type: "button",
231
+ variant: "outline",
232
+ className: "ttw:text-foreground",
233
+ onClick: X,
234
+ children: Z.duplicateBillsReviewButton
235
+ }) : null
236
+ ]
237
+ }) : null, /* @__PURE__ */ _(ee, {
238
+ value: k,
239
+ onValueChange: A,
240
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
241
+ children: [/* @__PURE__ */ _("div", {
242
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
243
+ children: [/* @__PURE__ */ g(ne, {
244
+ "aria-label": Z.filterTabsLabel,
245
+ children: O.map((e) => /* @__PURE__ */ _(o, {
246
+ value: e.id,
247
+ className: "ttw:min-w-28",
248
+ children: [e.icon, e.label]
249
+ }, e.id))
250
+ }), z ? /* @__PURE__ */ _(n, {
251
+ onClick: z,
252
+ children: [/* @__PURE__ */ g(se, { className: "ttw:size-4" }), Z.createButton]
253
+ }) : null]
254
+ }), (() => {
255
+ let e = S ? /* @__PURE__ */ g(c, {
256
+ title: Z.errorTitle,
257
+ description: Z.errorDescription,
258
+ retryLabel: B ? Z.errorRetry : void 0,
259
+ onRetry: B
260
+ }) : ve && z && V ? /* @__PURE__ */ g("div", {
261
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
262
+ children: K && q ? /* @__PURE__ */ g(l, {
263
+ emailAddress: K,
264
+ onCopyEmail: q,
265
+ onFilesSelected: V,
266
+ accept: f,
267
+ maxFiles: H,
268
+ uploadStatus: W,
269
+ uploadErrorMessage: G,
270
+ onEnterManually: U ?? z,
271
+ labels: Z.addBill
272
+ }) : /* @__PURE__ */ g(l, {
273
+ onFilesSelected: V,
274
+ accept: f,
275
+ maxFiles: H,
276
+ uploadStatus: W,
277
+ uploadErrorMessage: G,
278
+ onEnterManually: U ?? z,
279
+ labels: Z.addBill
280
+ })
281
+ }) : /* @__PURE__ */ g(r, {
282
+ columns: _e,
283
+ data: b,
284
+ isLoading: x,
285
+ sorting: fe,
286
+ onSortingChange: pe,
287
+ pageSize: me,
288
+ onPageSizeChange: he,
289
+ pageSizeOptions: ge,
290
+ pageInfo: C,
291
+ hasNextPage: w,
292
+ hasPrevPage: T,
293
+ onNextPage: E,
294
+ onPrevPage: D,
295
+ onRowClick: (e) => e.onOpen(),
296
+ filterComponent: ye,
297
+ children: I ? /* @__PURE__ */ g(s, {
298
+ title: Z.filteredEmptyTitle,
299
+ description: Z.filteredEmptyDescription
300
+ }) : R ? /* @__PURE__ */ g(s, {
301
+ title: R.title,
302
+ description: R.description
303
+ }) : void 0
304
+ });
305
+ return O.map((t) => /* @__PURE__ */ g(te, {
306
+ value: t.id,
307
+ children: t.id === k ? e : null
308
+ }, t.id));
309
+ })()]
310
+ })]
311
+ });
312
+ }
313
+ //#endregion
314
+ export { b as BillsScreen, b as default, y as DEFAULT_BILL_COLUMNS };
@@ -1,2 +1,10 @@
1
- import "./index61.js";
2
- import "./index63.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.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
+ };
9
+ //#endregion
10
+ export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
@@ -1,18 +1,8 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js
2
2
  var e = {
3
- title: "Possible duplicate files",
4
- descriptionFirstLine: "The following bills may be duplicates of each other.",
5
- descriptionSecondLine: "You can keep or remove duplicates, or view them for more detail before making a decision.",
6
- selectAllRows: "Select all bills",
7
- columnDuplicate: "Duplicate?",
8
- columnVendor: "Vendor",
9
- columnInvoiceNumber: "Invoice number",
10
- columnAmount: "Amount",
11
- columnInvoiceDate: "Invoice date",
12
- columnAddedOn: "Added on",
13
- columnActions: "Actions",
14
- keepSelectedButton: "Keep selected files",
15
- cancelDuplicatesButton: "Cancel duplicates"
3
+ uploading: "ttw:text-muted-foreground",
4
+ ready: "ttw:text-emerald-600",
5
+ failed: "ttw:text-destructive"
16
6
  };
17
7
  //#endregion
18
- export { e as DUPLICATE_BILLS_DIALOG_LABELS_EN };
8
+ export { e as UPLOAD_ITEM_ICON_TONE };
@@ -1,113 +1,93 @@
1
- import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s, Table as c, TableBody as l, TableCell as u, TableHead as d, TableHeader as f, TableRow as p } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BillDuplicateBadge as m } from "./index54.js";
3
- import "./index55.js";
4
- import { DUPLICATE_BILLS_DIALOG_LABELS_EN as h } from "./index66.js";
5
- import { useMemo as g } from "react";
6
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { Ban as y, ChevronRightIcon as b, CopyX as x } from "lucide-react";
1
+ import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index65.js";
3
+ import { UPLOAD_ITEM_ICON_TONE as n } from "./index66.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";
8
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js
9
- function S({ open: S, onOpenChange: C, rows: w, selectAllChecked: T = !1, onToggleAllRows: E, onKeepSelected: D, onCancelDuplicates: O, isActionDisabled: k, labels: A }) {
10
- let j = g(() => ({
11
- ...h,
12
- ...A
13
- }), [A]);
14
- return /* @__PURE__ */ _(n, {
15
- open: S,
16
- onOpenChange: C,
17
- children: /* @__PURE__ */ v(r, {
18
- className: "ttw:flex ttw:flex-col ttw:gap-8 ttw:sm:max-w-208.75",
19
- showCloseButton: !0,
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",
20
58
  children: [
21
- /* @__PURE__ */ v(o, {
22
- className: "ttw:items-center ttw:gap-3 ttw:text-center ttw:sm:text-center",
23
- children: [
24
- /* @__PURE__ */ _("div", {
25
- className: "ttw:flex ttw:items-center ttw:justify-center ttw:border ttw:rounded-full ttw:size-11 ttw:border-orange-300 ttw:bg-orange-200",
26
- children: /* @__PURE__ */ _(x, {
27
- className: "ttw:size-4 ttw:text-orange-950",
28
- "aria-hidden": !0
29
- })
30
- }),
31
- /* @__PURE__ */ _(s, { children: j.title }),
32
- /* @__PURE__ */ v(i, { children: [/* @__PURE__ */ _("span", {
33
- className: "ttw:block",
34
- children: j.descriptionFirstLine
35
- }), /* @__PURE__ */ _("span", {
36
- className: "ttw:block",
37
- children: j.descriptionSecondLine
38
- })] })
39
- ]
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
40
63
  }),
41
- /* @__PURE__ */ _("div", {
42
- className: "ttw:max-h-80 ttw:overflow-y-auto",
43
- children: /* @__PURE__ */ v(c, { children: [/* @__PURE__ */ _(f, {
44
- className: "ttw:sticky ttw:top-0 ttw:bg-background",
45
- children: /* @__PURE__ */ v(p, { children: [
46
- /* @__PURE__ */ _(d, {
47
- className: "ttw:w-10",
48
- children: /* @__PURE__ */ _(t, {
49
- "aria-label": j.selectAllRows,
50
- checked: T,
51
- onCheckedChange: E
52
- })
53
- }),
54
- /* @__PURE__ */ _(d, { children: j.columnDuplicate }),
55
- /* @__PURE__ */ _(d, { children: j.columnVendor }),
56
- /* @__PURE__ */ _(d, { children: j.columnInvoiceNumber }),
57
- /* @__PURE__ */ _(d, { children: j.columnAmount }),
58
- /* @__PURE__ */ _(d, { children: j.columnInvoiceDate }),
59
- /* @__PURE__ */ _(d, { children: j.columnAddedOn }),
60
- /* @__PURE__ */ _(d, {
61
- className: "ttw:w-10",
62
- children: /* @__PURE__ */ _("span", {
63
- className: "ttw:sr-only",
64
- children: j.columnActions
65
- })
66
- })
67
- ] })
68
- }), /* @__PURE__ */ _(l, { children: w.map((n) => /* @__PURE__ */ v(p, { children: [
69
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(t, {
70
- "aria-label": n.selectLabel,
71
- checked: n.isSelected ?? !1,
72
- onCheckedChange: n.onToggleSelected
73
- }) }),
74
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _(m, { ...n.duplicateBadge }) }),
75
- /* @__PURE__ */ _(u, { children: n.vendorLabel }),
76
- /* @__PURE__ */ _(u, { children: n.invoiceNumberLabel }),
77
- /* @__PURE__ */ _(u, { children: n.amountLabel }),
78
- /* @__PURE__ */ _(u, { children: n.invoiceDateLabel }),
79
- /* @__PURE__ */ _(u, { children: n.addedOnLabel }),
80
- /* @__PURE__ */ _(u, { children: /* @__PURE__ */ _("div", {
81
- className: "ttw:flex ttw:justify-end",
82
- children: /* @__PURE__ */ _(e, {
83
- variant: "ghost",
84
- size: "icon",
85
- "aria-label": n.openLabel,
86
- onClick: n.onOpen,
87
- children: /* @__PURE__ */ _(b, { className: "ttw:size-4" })
88
- })
89
- }) })
90
- ] }, n.id)) })] })
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" })
91
71
  }),
92
- D || O ? /* @__PURE__ */ v(a, {
93
- className: "ttw:flex-row",
94
- children: [D ? /* @__PURE__ */ _(e, {
95
- variant: "outline",
96
- className: "ttw:flex-1",
97
- disabled: k,
98
- onClick: D,
99
- children: j.keepSelectedButton
100
- }) : null, O ? /* @__PURE__ */ v(e, {
101
- variant: "destructive",
102
- className: "ttw:flex-1",
103
- disabled: k,
104
- onClick: O,
105
- children: [/* @__PURE__ */ _(y, {}), j.cancelDuplicatesButton]
106
- }) : null]
107
- }) : null
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
+ })
108
79
  ]
109
- })
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
+ })]
110
90
  });
111
91
  }
112
92
  //#endregion
113
- export { S as DuplicateBillsDialog, S as default };
93
+ export { g as BillUploadStatusTray, g as default };
@@ -1,7 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js
2
- var e = {
3
- message: "Data extracted automatically — please review all details to make sure they match",
4
- dismiss: "Dismiss this notice"
5
- };
6
- //#endregion
7
- export { e as EXTRACTION_NOTICE_LABELS_EN };
1
+ import "./index65.js";
2
+ import "./index67.js";
@@ -1,30 +1,18 @@
1
- import { EXTRACTION_NOTICE_LABELS_EN as e } from "./index69.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
- import { Info as r, X as i } from "lucide-react";
4
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js
5
- function a({ onDismiss: a, testId: o, labels: s }) {
6
- let c = {
7
- ...e,
8
- ...s
9
- };
10
- return /* @__PURE__ */ n("div", {
11
- className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:border-primary/30 ttw:bg-primary/5 ttw:px-3 ttw:py-2.5",
12
- "data-testid": o,
13
- children: [
14
- /* @__PURE__ */ t(r, { className: "ttw:mt-0.5 ttw:size-4 ttw:shrink-0 ttw:text-primary" }),
15
- /* @__PURE__ */ t("p", {
16
- className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
17
- children: c.message
18
- }),
19
- /* @__PURE__ */ t("button", {
20
- type: "button",
21
- onClick: a,
22
- "aria-label": c.dismiss,
23
- className: "ttw:shrink-0 ttw:text-muted-foreground ttw:hover:text-foreground",
24
- children: /* @__PURE__ */ t(i, { className: "ttw:size-4" })
25
- })
26
- ]
27
- });
28
- }
2
+ var e = {
3
+ title: "Possible duplicate files",
4
+ descriptionFirstLine: "The following bills may be duplicates of each other.",
5
+ descriptionSecondLine: "You can keep or remove duplicates, or view them for more detail before making a decision.",
6
+ selectAllRows: "Select all bills",
7
+ columnDuplicate: "Duplicate?",
8
+ columnVendor: "Vendor",
9
+ columnInvoiceNumber: "Invoice number",
10
+ columnAmount: "Amount",
11
+ columnInvoiceDate: "Invoice date",
12
+ columnAddedOn: "Added on",
13
+ columnActions: "Actions",
14
+ keepSelectedButton: "Keep selected files",
15
+ cancelDuplicatesButton: "Cancel duplicates"
16
+ };
29
17
  //#endregion
30
- export { a as ExtractionNotice, a as default };
18
+ export { e as DUPLICATE_BILLS_DIALOG_LABELS_EN };