@tesouro/embedded-components-react 0.11.183 → 0.11.187

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/index.css +8 -0
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index.js +3 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index6.js +31 -4
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index7.js +5 -0
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +4 -4
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +143 -12
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +33 -83
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index12.js +15 -48
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js +76 -254
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +48 -34
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +241 -438
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +29 -298
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +460 -4
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +327 -4
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +3 -37
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index20.js +5 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index21.js +38 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index22.js +1 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +30 -2
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index.js +7 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index10.js +2 -200
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index11.js +38 -3
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index12.js +10 -2
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js +196 -11
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index14.js +1 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index16.js +9 -15
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +2 -54
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index19.js +20 -16
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +2 -460
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +54 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index22.js +17 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +463 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index24.js +3 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index8.js +5 -36
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js +28 -10
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/lib/queryKeys.js +8 -5
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/billPay.js +11 -9
  42. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  43. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +7 -8
  44. package/dist/packages/shared-ui-shadcn/dist/index.js +3623 -3539
  45. package/package.json +1 -1
@@ -0,0 +1,463 @@
1
+ import { Button as e, ContextMenuItem as t, DataTable as n, DataTableSortableHeader as r, Input as i, Separator as a, Skeleton as ee, Tabs as o, TabsContent as te, TabsList as s, TabsTrigger as ne, Tooltip as re, TooltipContent as ie, TooltipProvider as ae, TooltipTrigger as oe } 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 se } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
+ import { DateDisclosure as ce } from "../../../../shared/ui/dist/lib/DateDisclosure/DateDisclosure.js";
5
+ import { DueDateText as le } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
6
+ import { AttentionStrip as ue } from "../../../../shared/ui/dist/lib/AttentionStrip/AttentionStrip.js";
7
+ import { AttentionViewBar as de } from "../../../../shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js";
8
+ import "../../../../shared/ui/dist/index.js";
9
+ import { BillStatusBadge as fe } from "../../../../shared/document-status/ui/dist/index4.js";
10
+ import "../../../../shared/document-status/ui/dist/index.js";
11
+ import { BillDuplicateIcon as l } from "../../../ui/dist/index6.js";
12
+ import { BillOverflowMenu as pe } from "../../../ui/dist/index11.js";
13
+ import { getAcceptedBillUploadFiles as me } from "../../../ui/dist/index17.js";
14
+ import "../../../ui/dist/index.js";
15
+ import { AddBillPanel as he } from "./index3.js";
16
+ import "./index4.js";
17
+ import { BillSummaryCards as ge } from "./index9.js";
18
+ import "./index10.js";
19
+ import { BillsFilterBar as _e } from "./index13.js";
20
+ import "./index14.js";
21
+ import { MissingValue as u } from "./index16.js";
22
+ import "./index17.js";
23
+ import { NoValue as ve } from "./index19.js";
24
+ import "./index20.js";
25
+ import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index21.js";
26
+ import { BillColumn as p } from "./index22.js";
27
+ import { Fragment as ye, useMemo as m, useState as be } from "react";
28
+ import { createPortal as xe } from "react-dom";
29
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
30
+ import { PaperclipIcon as Se, SearchIcon as Ce, UploadIcon as we } from "lucide-react";
31
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js
32
+ var Te = [
33
+ 10,
34
+ 25,
35
+ 50,
36
+ 100
37
+ ], Ee = 240;
38
+ function De(e, t) {
39
+ return e === "resolving" ? t.vendorResolving : e === "unavailable" ? t.vendorUnavailable : t.missingValue.missing;
40
+ }
41
+ var v = 40, Oe = 56, ke = [
42
+ p.Vendor,
43
+ p.InvoiceNumber,
44
+ p.Attachment,
45
+ p.IssueDate,
46
+ p.DueDate,
47
+ p.ScheduledDate,
48
+ p.PaidDate,
49
+ p.Status,
50
+ p.AmountDue,
51
+ p.AmountScheduled,
52
+ p.AmountPaid,
53
+ p.TotalAmount,
54
+ p.AddedOn
55
+ ], y = [
56
+ p.Vendor,
57
+ p.Attachment,
58
+ p.DueDate,
59
+ p.Status,
60
+ p.AmountDue,
61
+ p.AddedOn
62
+ ];
63
+ function b({ rows: b, isLoading: x, isError: S, sorting: Ae, onSortingChange: je, pageSize: Me, onPageSizeChange: Ne, pageSizeOptions: C = Te, pageInfo: Pe, hasNextPage: w, hasPrevPage: T, onNextPage: Fe, onPrevPage: Ie, filterTabs: E, selectedFilterTabId: D, onFilterTabChange: Le, searchValue: Re, onSearchChange: ze, filters: O, visibleColumns: k = y, keepsColumnOrder: A = !1, isSortable: j = !0, cellTestIds: M, isSearchActive: N, showAddPanelWhenEmpty: Be, emptyState: P, onCreateClick: F, headerActionContainer: I, onRetry: L, onFilesSelected: R, maxFiles: z, onEnterManually: B, uploadStatus: V, uploadErrorMessage: H, emailAddress: U, onCopyEmail: W, labels: G, summaryCards: K, attentionStrip: Ve, attentionView: q }) {
64
+ let J = m(() => ({
65
+ ...d,
66
+ ...G,
67
+ statusBadge: {
68
+ ...d.statusBadge,
69
+ ...G?.statusBadge
70
+ },
71
+ addBill: {
72
+ ...d.addBill,
73
+ ...G?.addBill,
74
+ dropzone: {
75
+ ...d.addBill.dropzone,
76
+ ...G?.addBill?.dropzone
77
+ }
78
+ },
79
+ sortableHeader: {
80
+ ...d.sortableHeader,
81
+ ...G?.sortableHeader
82
+ },
83
+ missingValue: {
84
+ ...d.missingValue,
85
+ ...G?.missingValue
86
+ },
87
+ noValue: {
88
+ ...d.noValue,
89
+ ...G?.noValue
90
+ }
91
+ }), [G]), Y = b.some((e) => e.menu?.items.length), [He, X] = be(!1), Z = !!R, Ue = (e) => Array.from(e.dataTransfer.types).includes("Files"), We = (e) => {
92
+ Z && Ue(e) && (e.preventDefault(), X(!0));
93
+ }, Ge = (e) => {
94
+ Z && Ue(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", X(!0));
95
+ }, Ke = (e) => {
96
+ !e.currentTarget.contains(e.relatedTarget) && Z && X(!1);
97
+ }, qe = (e) => {
98
+ if (!Z) return;
99
+ e.preventDefault(), X(!1);
100
+ let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = me(t, f, z !== 1);
101
+ n.length && R?.(n);
102
+ }, Je = m(() => {
103
+ let e = (e) => j ? function({ column: t }) {
104
+ return /* @__PURE__ */ g(r, {
105
+ column: t,
106
+ title: e,
107
+ labels: J.sortableHeader
108
+ });
109
+ } : e, t = (e, t, n = /* @__PURE__ */ g(u, { labels: J.missingValue }), r) => function({ row: i }) {
110
+ let a = r && i.original[r] ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : n;
111
+ return /* @__PURE__ */ g("span", {
112
+ className: "ttw:whitespace-nowrap",
113
+ "data-testid": M?.[t],
114
+ children: i.original[e] || a
115
+ });
116
+ }, n = t("invoiceNumberLabel", p.InvoiceNumber), i = function({ row: e }) {
117
+ return /* @__PURE__ */ g("span", {
118
+ className: "ttw:whitespace-nowrap",
119
+ "data-testid": M?.[p.DueDate],
120
+ children: /* @__PURE__ */ g(le, {
121
+ label: e.original.dueDateLabel || /* @__PURE__ */ g(u, { labels: J.missingValue }),
122
+ overdueLabel: e.original.dueDateOverdueLabel,
123
+ accessibleLabel: e.original.dueDateAccessibleLabel
124
+ })
125
+ });
126
+ }, a = (e, t, n = /* @__PURE__ */ g(u, { labels: J.missingValue }), r) => function({ row: i }) {
127
+ let a = r && i.original[r] ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : n;
128
+ return /* @__PURE__ */ g("div", {
129
+ className: "ttw:text-right ttw:whitespace-nowrap",
130
+ "data-testid": M?.[t],
131
+ children: i.original[e] || a
132
+ });
133
+ }, o = /* @__PURE__ */ g(ve, { labels: J.noValue });
134
+ function te({ row: e }) {
135
+ let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
136
+ return /* @__PURE__ */ g("span", {
137
+ className: "ttw:whitespace-nowrap",
138
+ "data-testid": M?.[p.ScheduledDate],
139
+ children: n && r ? /* @__PURE__ */ g(ce, {
140
+ date: r,
141
+ children: n
142
+ }) : n || t
143
+ });
144
+ }
145
+ let s = (e) => function() {
146
+ return /* @__PURE__ */ g("div", {
147
+ className: "ttw:text-right",
148
+ children: e
149
+ });
150
+ };
151
+ return {
152
+ [p.Vendor]: {
153
+ accessorKey: "vendorLabel",
154
+ enableSorting: j,
155
+ minSize: Ee,
156
+ header: e(J.columnVendor),
157
+ cell: ({ row: e }) => {
158
+ let t = e.original.rowNote ? /* @__PURE__ */ g("span", {
159
+ className: "ttw:sr-only",
160
+ children: ` ${e.original.rowNote}`
161
+ }) : null;
162
+ return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */ _("div", {
163
+ "data-testid": M?.[p.Vendor],
164
+ children: [/* @__PURE__ */ g(ee, {
165
+ className: "ttw:h-4 ttw:w-32",
166
+ "aria-hidden": !0
167
+ }), t]
168
+ }) : /* @__PURE__ */ _("span", {
169
+ className: "ttw:inline-flex ttw:items-center ttw:gap-2",
170
+ "data-testid": M?.[p.Vendor],
171
+ children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ g(ve, { labels: { none: J.vendorUnavailable } }) : /* @__PURE__ */ g(u, { labels: J.missingValue })), t]
172
+ });
173
+ }
174
+ },
175
+ [p.InvoiceNumber]: {
176
+ accessorKey: "invoiceNumberLabel",
177
+ enableSorting: !1,
178
+ header: () => J.columnInvoiceNumber,
179
+ cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ _("span", {
180
+ className: "ttw:relative",
181
+ children: [/* @__PURE__ */ g(l, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
182
+ }) : n(e)
183
+ },
184
+ [p.Attachment]: {
185
+ accessorKey: "attachment",
186
+ enableSorting: !1,
187
+ size: v,
188
+ minSize: v,
189
+ header: () => /* @__PURE__ */ g("span", {
190
+ className: "ttw:sr-only",
191
+ children: J.columnAttachment
192
+ }),
193
+ cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ g("div", {
194
+ className: "ttw:flex ttw:justify-center",
195
+ "data-testid": M?.[p.Attachment],
196
+ children: /* @__PURE__ */ g(ae, { children: /* @__PURE__ */ _(re, { children: [/* @__PURE__ */ g(oe, {
197
+ type: "button",
198
+ className: "ttw:inline-flex ttw:cursor-default",
199
+ "aria-label": e.original.attachment.label,
200
+ onClick: (e) => e.stopPropagation(),
201
+ children: /* @__PURE__ */ g(Se, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
202
+ }), /* @__PURE__ */ g(ie, { children: e.original.attachment.label })] }) })
203
+ }) : null
204
+ },
205
+ [p.IssueDate]: {
206
+ accessorKey: "issueDateLabel",
207
+ enableSorting: j,
208
+ header: e(J.columnIssueDate),
209
+ cell: t("issueDateLabel", p.IssueDate)
210
+ },
211
+ [p.DueDate]: {
212
+ accessorKey: "dueDateLabel",
213
+ enableSorting: j,
214
+ header: e(J.columnDueDate),
215
+ cell: i
216
+ },
217
+ [p.ScheduledDate]: {
218
+ accessorKey: "scheduledDateLabel",
219
+ enableSorting: j,
220
+ header: e(J.columnScheduledDate),
221
+ cell: te
222
+ },
223
+ [p.PaidDate]: {
224
+ accessorKey: "paidDateLabel",
225
+ enableSorting: !1,
226
+ header: J.columnPaidDate,
227
+ cell: t("paidDateLabel", p.PaidDate)
228
+ },
229
+ [p.Status]: {
230
+ accessorKey: "status",
231
+ enableSorting: !1,
232
+ header: J.columnStatus,
233
+ cell: ({ row: e }) => /* @__PURE__ */ g("div", {
234
+ className: "ttw:flex ttw:items-center ttw:gap-1",
235
+ "data-testid": M?.[p.Status],
236
+ children: /* @__PURE__ */ g(fe, {
237
+ status: e.original.status,
238
+ tone: e.original.statusTone,
239
+ labels: J.statusBadge
240
+ })
241
+ })
242
+ },
243
+ [p.AmountDue]: {
244
+ accessorKey: "amountDueLabel",
245
+ enableSorting: !1,
246
+ header: s(J.columnAmountDue),
247
+ cell: a("amountDueLabel", p.AmountDue)
248
+ },
249
+ [p.AmountScheduled]: {
250
+ accessorKey: "amountScheduledLabel",
251
+ enableSorting: !1,
252
+ header: s(J.columnAmountScheduled),
253
+ cell: a("amountScheduledLabel", p.AmountScheduled)
254
+ },
255
+ [p.AmountPaid]: {
256
+ accessorKey: "amountPaidLabel",
257
+ enableSorting: !1,
258
+ header: s(J.columnAmountPaid),
259
+ cell: a("amountPaidLabel", p.AmountPaid, o, "amountPaidIsGap")
260
+ },
261
+ [p.TotalAmount]: {
262
+ accessorKey: "totalAmountLabel",
263
+ enableSorting: !1,
264
+ header: s(J.columnTotalAmount),
265
+ cell: a("totalAmountLabel", p.TotalAmount)
266
+ },
267
+ [p.AddedOn]: {
268
+ accessorKey: "addedOnLabel",
269
+ enableSorting: j,
270
+ header: e(J.columnAddedOn),
271
+ cell: t("addedOnLabel", p.AddedOn)
272
+ }
273
+ };
274
+ }, [
275
+ J,
276
+ M,
277
+ j
278
+ ]), Ye = m(() => [...(A ? k : ke.filter((e) => k.includes(e))).map((e) => Je[e]), ...Y ? [{
279
+ id: "actions",
280
+ enableSorting: !1,
281
+ size: Oe,
282
+ header: () => /* @__PURE__ */ g("span", {
283
+ className: "ttw:sr-only",
284
+ children: J.columnActions
285
+ }),
286
+ cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ g("div", {
287
+ className: "ttw:flex ttw:justify-end",
288
+ children: /* @__PURE__ */ g(pe, {
289
+ actions: e.original.menu.items.map((e) => ({
290
+ ...e,
291
+ variant: "ghost"
292
+ })),
293
+ triggerLabel: e.original.menu.triggerLabel,
294
+ placement: "table"
295
+ })
296
+ }) : null
297
+ }] : []], [
298
+ Je,
299
+ Y,
300
+ A,
301
+ J,
302
+ k
303
+ ]), Xe = !!(F && R) && !x && !S && !N && b.length === 0 && Be === !0, Q = F ? /* @__PURE__ */ g(e, {
304
+ onClick: F,
305
+ children: J.createButton
306
+ }) : null, Ze = /* @__PURE__ */ _("div", {
307
+ className: "ttw:relative ttw:w-80",
308
+ 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(i, {
309
+ className: "ttw:pl-9",
310
+ type: "search",
311
+ "aria-label": J.searchLabel,
312
+ placeholder: J.searchPlaceholder,
313
+ value: Re,
314
+ onChange: (e) => ze(e.target.value)
315
+ })]
316
+ }), Qe = q ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(de, { ...q }), /* @__PURE__ */ g("div", {
317
+ className: "ttw:ml-auto",
318
+ children: Ze
319
+ })] }) : Ze, $e = O ? /* @__PURE__ */ g(_e, {
320
+ ...O,
321
+ className: "ttw:px-4",
322
+ searchSlot: Qe
323
+ }) : /* @__PURE__ */ g("div", {
324
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
325
+ children: Qe
326
+ }), $ = S ? /* @__PURE__ */ g(se, {
327
+ title: J.errorTitle,
328
+ description: J.errorDescription,
329
+ retryLabel: L ? J.errorRetry : void 0,
330
+ onRetry: L
331
+ }) : Xe && F && R ? /* @__PURE__ */ g("div", {
332
+ className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
333
+ children: U && W ? /* @__PURE__ */ g(he, {
334
+ emailAddress: U,
335
+ onCopyEmail: W,
336
+ onFilesSelected: R,
337
+ accept: f,
338
+ maxFiles: z,
339
+ uploadStatus: V,
340
+ uploadErrorMessage: H,
341
+ onEnterManually: B ?? F,
342
+ labels: J.addBill
343
+ }) : /* @__PURE__ */ g(he, {
344
+ onFilesSelected: R,
345
+ accept: f,
346
+ maxFiles: z,
347
+ uploadStatus: V,
348
+ uploadErrorMessage: H,
349
+ onEnterManually: B ?? F,
350
+ labels: J.addBill
351
+ })
352
+ }) : /* @__PURE__ */ _("div", {
353
+ className: "ttw:relative",
354
+ onDragEnter: We,
355
+ onDragOver: Ge,
356
+ onDragLeave: Ke,
357
+ onDrop: qe,
358
+ children: [/* @__PURE__ */ g(n, {
359
+ columns: Ye,
360
+ data: b,
361
+ getRowId: (e) => e.rowKey,
362
+ animatesNewRows: !0,
363
+ isLoading: x,
364
+ sorting: Ae,
365
+ onSortingChange: je,
366
+ pageSize: Me,
367
+ onPageSizeChange: Ne,
368
+ pageSizeOptions: C,
369
+ showPagination: C.length > 1 || w || T,
370
+ pageInfo: Pe,
371
+ hasNextPage: w,
372
+ hasPrevPage: T,
373
+ onNextPage: Fe,
374
+ onPrevPage: Ie,
375
+ onRowClick: (e) => e.onOpen(),
376
+ rowAriaLabel: (e) => J.openRow(e.vendorLabel || De(e.vendorLookup, J)),
377
+ rowGroup: (e) => e.group ? {
378
+ key: e.group.key,
379
+ label: e.group.label,
380
+ tone: "warning",
381
+ icon: /* @__PURE__ */ g(l, {}),
382
+ title: e.group.title,
383
+ meta: e.group.meta,
384
+ collapse: e.group.collapse
385
+ } : void 0,
386
+ rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ g(h, { children: e.menu.items.map((e) => {
387
+ let n = e.icon;
388
+ return /* @__PURE__ */ _(t, {
389
+ disabled: e.disabled,
390
+ onClick: e.onSelect,
391
+ children: [n ? /* @__PURE__ */ g(n, { className: "ttw:size-4" }) : null, e.label]
392
+ }, e.id);
393
+ }) }) : void 0,
394
+ filterComponent: $e,
395
+ children: N ? /* @__PURE__ */ g(c, {
396
+ title: J.filteredEmptyTitle,
397
+ description: J.filteredEmptyDescription
398
+ }) : P ? /* @__PURE__ */ g(c, {
399
+ title: P.title,
400
+ description: P.description
401
+ }) : void 0
402
+ }), He ? /* @__PURE__ */ g("div", {
403
+ className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
404
+ children: /* @__PURE__ */ _("div", {
405
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
406
+ children: [/* @__PURE__ */ g(we, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
407
+ className: "ttw:text-sm ttw:font-medium",
408
+ children: J.tableDropzoneTitle
409
+ }), /* @__PURE__ */ g("p", {
410
+ className: "ttw:text-xs ttw:text-muted-foreground",
411
+ children: z === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(z)}`
412
+ })] })]
413
+ })
414
+ }) : null]
415
+ });
416
+ return /* @__PURE__ */ _("div", {
417
+ role: "presentation",
418
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
419
+ onKeyDown: (e) => {
420
+ q && e.key === "Escape" && !e.defaultPrevented && (e.target.closest("[role=\"menu\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"listbox\"], input, textarea, select") || q.onBack());
421
+ },
422
+ children: [
423
+ K ? /* @__PURE__ */ g(ge, { ...K }) : null,
424
+ Ve ? /* @__PURE__ */ g(ue, { ...Ve }) : null,
425
+ q ? /* @__PURE__ */ _("div", {
426
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
427
+ children: [I === void 0 && Q ? /* @__PURE__ */ g("div", {
428
+ className: "ttw:flex ttw:justify-end",
429
+ children: Q
430
+ }) : null, $]
431
+ }) : /* @__PURE__ */ _(o, {
432
+ value: D,
433
+ onValueChange: Le,
434
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
435
+ children: [/* @__PURE__ */ _("div", {
436
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
437
+ children: [/* @__PURE__ */ g(s, {
438
+ variant: "pills",
439
+ "aria-label": J.filterTabsLabel,
440
+ children: E.map((e) => /* @__PURE__ */ _(ye, { children: [e.startsGroup ? /* @__PURE__ */ g(a, {
441
+ orientation: "vertical",
442
+ className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
443
+ }) : null, /* @__PURE__ */ g(ne, {
444
+ value: e.id,
445
+ count: e.badge,
446
+ countTone: e.tone,
447
+ className: "ttw:min-w-28",
448
+ children: /* @__PURE__ */ g("span", {
449
+ className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
450
+ children: e.label
451
+ })
452
+ })] }, e.id))
453
+ }), I === void 0 ? Q : null]
454
+ }), E.map((e) => /* @__PURE__ */ g(te, {
455
+ value: e.id,
456
+ children: e.id === D ? $ : null
457
+ }, e.id))]
458
+ }),
459
+ I && Q ? xe(Q, I) : null
460
+ ]
461
+ });
462
+ }
463
+ export { b as BillsScreen, b as default, y as DEFAULT_BILL_COLUMNS };
@@ -0,0 +1,3 @@
1
+ import "./index21.js";
2
+ import "./index22.js";
3
+ import "./index23.js";
@@ -1,38 +1,7 @@
1
- import { AMOUNT_FILTER_LABELS_EN as e, DATE_RANGE_PICKER_LABELS_EN as t, FILTER_MENU_BUTTON_LABELS_EN as n, FILTER_TAG_LABELS_EN as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index8.js
3
- var i = {
4
- fields: {
5
- vendor: "Vendor",
6
- issueDate: "Issue date",
7
- dueDate: "Due date",
8
- status: "Status",
9
- totalAmount: "Total amount",
10
- addedOn: "Added on",
11
- attachment: "Attachment"
12
- },
13
- fieldMenuLabel: "Filter bills by",
14
- amountMin: "No less than",
15
- amountMax: "No more than",
16
- vendorSearchPlaceholder: "Search vendors",
17
- vendorSearchLabel: "Search vendors",
18
- vendorEmpty: "No vendors match",
19
- vendorLoading: "Loading vendors",
20
- vendorError: "Couldn't load vendors",
21
- attachmentAny: "Any",
22
- attachmentHas: "Has attachment",
23
- attachmentNone: "No attachment",
24
- attachmentLabel: "Filter by attachment",
25
- clearAll: "Clear all",
26
- filterMenuButton: n,
27
- filterTag: r,
28
- amountFilter: {
29
- modeAny: e.modeAny,
30
- modeExact: e.modeExact,
31
- modeRange: e.modeRange,
32
- flowAny: e.flowAny,
33
- flowIn: e.flowIn,
34
- flowOut: e.flowOut
35
- },
36
- dateRangePicker: { presetPlaceholder: t.presetPlaceholder }
2
+ var e = {
3
+ group: "Bill totals",
4
+ loading: "Loading bill totals",
5
+ info: "About {label}"
37
6
  };
38
- export { i as BILLS_FILTER_BAR_LABELS_EN };
7
+ export { e as BILL_SUMMARY_CARDS_LABELS_EN };
@@ -1,11 +1,29 @@
1
+ import { Skeleton as e, SummaryCard as t, SummaryCardGroup as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LoadingRegion as r } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
+ import "../../../../shared/ui/dist/index.js";
4
+ import { BILL_SUMMARY_CARDS_LABELS_EN as i } from "./index8.js";
5
+ import { jsx as a } from "react/jsx-runtime";
1
6
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js
2
- var e = {
3
- Vendor: "vendor",
4
- IssueDate: "issueDate",
5
- DueDate: "dueDate",
6
- Status: "status",
7
- TotalAmount: "totalAmount",
8
- AddedOn: "addedOn",
9
- Attachment: "attachment"
10
- };
11
- export { e as BillsFilterField };
7
+ var o = 4;
8
+ function s({ view: s, labels: c }) {
9
+ let l = {
10
+ ...i,
11
+ ...c
12
+ };
13
+ return /* @__PURE__ */ a(r, {
14
+ isLoading: s.kind === "loading",
15
+ loadingLabel: l.loading,
16
+ children: /* @__PURE__ */ a(n, {
17
+ "aria-label": l.group,
18
+ children: s.kind === "loading" ? Array.from({ length: o }).map((t, n) => /* @__PURE__ */ a(e, { className: "ttw:h-28 ttw:rounded-lg" }, n)) : s.cards.map((e) => /* @__PURE__ */ a(t, {
19
+ label: e.label,
20
+ labelTone: e.labelTone,
21
+ amount: e.amountLabel,
22
+ caption: e.captionLabel,
23
+ description: e.description,
24
+ labels: { info: l.info }
25
+ }, e.id))
26
+ })
27
+ });
28
+ }
29
+ export { s as BillSummaryCards, s as default };
@@ -22,11 +22,14 @@ var u = {
22
22
  path: {}
23
23
  }), s = { ...a }, c = { ...o };
24
24
  return delete s.path, delete c.path, [[s], [c]];
25
- }, m = ({ client: t, organizationId: n }) => e({
26
- client: t,
27
- headers: l(n),
28
- query: u
29
- }), h = ({ client: e, organizationId: t, payableId: n }) => o({
25
+ }, m = ({ client: t, organizationId: n }) => {
26
+ let [r] = e({
27
+ client: t,
28
+ headers: l(n),
29
+ query: u
30
+ }), i = { ...r };
31
+ return delete i.query, [i];
32
+ }, h = ({ client: e, organizationId: t, payableId: n }) => o({
30
33
  client: e,
31
34
  headers: l(t),
32
35
  path: { payable_id: n }
@@ -11,7 +11,7 @@ import { billsTabTestIds as r } from "./testIds.js";
11
11
  import { BillDetailsWidget as i, BillDialogWidget as a } from "../../../../bill-detail/feature/dist/index51.js";
12
12
  import "../../../../bill-detail/feature/dist/index.js";
13
13
  import "../../../../bill-upload/feature/dist/index.js";
14
- import { BillsListWidget as o } from "../../../../bills-list/feature/dist/index19.js";
14
+ import { BillsListWidget as o } from "../../../../bills-list/feature/dist/index21.js";
15
15
  import "../../../../bills-list/feature/dist/index.js";
16
16
  import { PayBillWidget as s } from "../../../../pay-bill/feature/dist/index14.js";
17
17
  import "../../../../pay-bill/feature/dist/index.js";
@@ -277,16 +277,18 @@ var g = (e, t = "8000", n = "2") => `00000000-0000-4000-${t}-000000000${n}${Stri
277
277
  }),
278
278
  o("DELETE", `${r}/payables/:id`, (e, { id: t }) => f(t) ? (n = n.filter((e) => e.id !== t), l()) : q()),
279
279
  o("GET", `${r}/analytics/payables`, ({ query: e }) => {
280
- let t = s(e);
281
- if (e.get("aggregation_function") === "count") return c({ data: [{ metric_value: t.length }] });
282
- let n = e.get("metric") ?? "total_amount", r = (e) => {
283
- let t = e[n];
280
+ let t = s(e), n = e.get("aggregation_function") === "count", r = e.get("metric") ?? "total_amount", i = (e) => {
281
+ if (n) return 1;
282
+ let t = e[r];
284
283
  return typeof t == "number" ? t : 0;
285
- };
286
- if (e.get("dimension") !== "counterpart_id") return c({ data: [{ metric_value: t.reduce((e, t) => e + r(t), 0) }] });
287
- let i = /* @__PURE__ */ new Map();
288
- for (let e of t) e.counterpart_id && i.set(e.counterpart_id, (i.get(e.counterpart_id) ?? 0) + r(e));
289
- return c({ data: [...i].map(([e, t]) => ({
284
+ }, a = e.get("dimension");
285
+ if (a !== "counterpart_id" && a !== "status") return c({ data: [{ metric_value: t.reduce((e, t) => e + i(t), 0) }] });
286
+ let o = /* @__PURE__ */ new Map();
287
+ for (let e of t) {
288
+ let t = a === "status" ? e.status : e.counterpart_id;
289
+ t && o.set(t, (o.get(t) ?? 0) + i(e));
290
+ }
291
+ return c({ data: [...o].map(([e, t]) => ({
290
292
  dimension_value: e,
291
293
  metric_value: t
292
294
  })) });
@@ -1,5 +1,5 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.11.183", n = "c92057815bf7f1330921b7e115eae4d4a579c97a", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.11.187", n = "1c7050460680d26b88e8afd8c1c4b32001084683", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -14,18 +14,17 @@ import { jsx as a, jsxs as o } from "react/jsx-runtime";
14
14
  function s() {
15
15
  let { availableSections: s, labels: c, navigate: l } = t(), u = s.includes(e.Transfers) ? () => l(e.Transfers) : void 0;
16
16
  return /* @__PURE__ */ o("div", {
17
- className: "ttw:flex ttw:flex-col ttw:gap-6",
18
- children: [
19
- /* @__PURE__ */ a(n, {}),
20
- /* @__PURE__ */ a(r, {
17
+ className: "ttw:@container ttw:flex ttw:flex-col ttw:gap-6",
18
+ children: [/* @__PURE__ */ a(n, {}), /* @__PURE__ */ o("div", {
19
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:@3xl:flex-row",
20
+ children: [/* @__PURE__ */ a(r, {
21
21
  ...c.sections.dashboard.balanceHistory,
22
22
  onTransferFromExternalClick: u
23
- }),
24
- /* @__PURE__ */ a(i, {
23
+ }), /* @__PURE__ */ a(i, {
25
24
  ...c.sections.dashboard.insights,
26
25
  onLinkExternalAccountClick: u
27
- })
28
- ]
26
+ })]
27
+ })]
29
28
  });
30
29
  }
31
30
  var c = { Content: s };