@tesouro/embedded-components-react 0.5.14 → 0.5.17

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 (62) 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/index15.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +2 -2
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +5 -5
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +3 -3
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +9 -6
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +32 -29
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -170
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +18 -2
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +7 -11
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +158 -96
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +11 -7
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +100 -44
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +10 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +52 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +2 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -88
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +17 -298
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +92 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +301 -6
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +0 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +6 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +34 -31
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -37
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -10
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +2 -201
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +39 -3
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +3 -8
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +186 -339
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +3 -10
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +13 -5
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +354 -85
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +10 -0
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +9 -2
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +87 -119
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -94
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +125 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +25 -4
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +90 -26
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +3 -3
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +26 -30
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +4 -9
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +30 -102
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +9 -14
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +85 -104
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +10 -11
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +123 -8
  60. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  61. package/package.json +1 -1
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +0 -28
@@ -1,354 +1,201 @@
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 "./index19.js";
8
- import "./index20.js";
9
- import { DueDateValue as ce } from "./index22.js";
10
- import "./index23.js";
11
- import { MissingValue as u } from "./index59.js";
12
- import "./index60.js";
13
- import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index61.js";
14
- import { BillsFilterBar as le } from "./index73.js";
15
- import "./index74.js";
16
- import { BillColumn as p } from "./index75.js";
17
- import { useMemo as m } from "react";
18
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
19
- import { ChevronRightIcon as ue, PaperclipIcon as de, PlusIcon as fe, SearchIcon as pe } from "lucide-react";
1
+ import { AmountFilter as e, DateRangePicker as t, FilterBar as n, FilterMenuButton as r, FilterTag as ee, Input as te, MultiSelectFilter as i, Popover as a, PopoverContent as o, PopoverTrigger as s, RadioGroup as c, RadioGroupItem as l, useFilterPanel as u } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { BILLS_FILTER_BAR_LABELS_EN as d } from "./index74.js";
3
+ import { BillsFilterField as f } from "./index75.js";
4
+ import { useMemo as ne } from "react";
5
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ import { ListFilterIcon as h } from "lucide-react";
20
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js
21
- var me = [
22
- 10,
23
- 25,
24
- 50,
25
- 100
26
- ], he = 240, ge = {
27
- default: "",
28
- warning: "ttw:bg-amber-50 ttw:hover:bg-amber-100 ttw:border-l-4! ttw:border-l-amber-600!"
29
- }, _e = {
30
- default: "",
31
- warning: "ttw:-ml-1 ttw:font-semibold ttw:text-amber-800"
32
- }, _ = 40, ve = [
33
- p.Vendor,
34
- p.Attachment,
35
- p.IssueDate,
36
- p.DueDate,
37
- p.ScheduledDate,
38
- p.PaidDate,
39
- p.Status,
40
- p.AmountDue,
41
- p.AmountScheduled,
42
- p.AmountPaid,
43
- p.TotalAmount,
44
- p.AddedOn
45
- ], v = [
46
- p.Vendor,
47
- p.Attachment,
48
- p.DueDate,
49
- p.Status,
50
- p.AmountDue,
51
- p.AddedOn
8
+ var g = {
9
+ date: "ttw:w-auto",
10
+ status: "ttw:w-56",
11
+ amount: "ttw:w-64",
12
+ vendor: "ttw:w-64",
13
+ attachment: "ttw:w-56"
14
+ }, _ = {
15
+ [f.Vendor]: "vendor",
16
+ [f.IssueDate]: "date",
17
+ [f.DueDate]: "date",
18
+ [f.Status]: "status",
19
+ [f.TotalAmount]: "amount",
20
+ [f.AddedOn]: "date",
21
+ [f.Attachment]: "attachment"
22
+ }, v = [
23
+ f.IssueDate,
24
+ f.DueDate,
25
+ f.AddedOn
52
26
  ];
53
- function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be, pageSize: S, onPageSizeChange: C, pageSizeOptions: w = me, 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 }) {
54
- let Z = m(() => ({
27
+ function y({ fields: f, activeFilterCount: y, chips: b, onRemoveChip: x, onClearAll: S, dateField: C, onDateFieldChange: w, datePresets: T, selectedDatePreset: E, dateFrom: D, dateTo: O, onDateRangeChange: k, onDatePresetChange: A, statusOptions: j, selectedStatuses: M, onStatusChange: N, amountMode: P, onAmountModeChange: F, amountMin: I, amountMax: L, onAmountMinChange: re, onAmountMaxChange: R, vendorOptions: z, selectedVendors: B, onVendorChange: V, vendorSearchValue: H, onVendorSearchChange: U, isVendorLoading: W, isVendorError: G, hasAttachment: K, onHasAttachmentChange: q, searchSlot: J, testIds: Y, labels: X, className: ie }) {
28
+ let Z = ne(() => ({
55
29
  ...d,
56
- ...J,
57
- statusBadge: {
58
- ...d.statusBadge,
59
- ...J?.statusBadge
30
+ ...X,
31
+ fields: {
32
+ ...d.fields,
33
+ ...X?.fields
60
34
  },
61
- addBill: {
62
- ...d.addBill,
63
- ...J?.addBill,
64
- dropzone: {
65
- ...d.addBill.dropzone,
66
- ...J?.addBill?.dropzone
67
- }
35
+ filterMenuButton: {
36
+ ...d.filterMenuButton,
37
+ ...X?.filterMenuButton
68
38
  },
69
- sortableHeader: {
70
- ...d.sortableHeader,
71
- ...J?.sortableHeader
39
+ filterTag: {
40
+ ...d.filterTag,
41
+ ...X?.filterTag
72
42
  },
73
- missingValue: {
74
- ...d.missingValue,
75
- ...J?.missingValue
43
+ amountFilter: {
44
+ ...d.amountFilter,
45
+ ...X?.amountFilter
76
46
  },
77
- dueDate: {
78
- ...d.dueDate,
79
- ...J?.dueDate
47
+ dateRangePicker: {
48
+ ...d.dateRangePicker,
49
+ ...X?.dateRangePicker
80
50
  }
81
- }), [J]), Q = m(() => {
82
- let e = (e) => function({ column: t }) {
83
- return /* @__PURE__ */ h(ee, {
84
- column: t,
85
- title: e,
86
- labels: Z.sortableHeader
87
- });
88
- }, t = (e, t) => function({ row: n }) {
89
- return /* @__PURE__ */ h("span", {
90
- className: "ttw:whitespace-nowrap",
91
- "data-testid": I?.[t],
92
- children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
93
- });
94
- }, n = function({ row: e }) {
95
- return /* @__PURE__ */ h("span", {
96
- className: "ttw:whitespace-nowrap",
97
- "data-testid": I?.[p.DueDate],
98
- children: /* @__PURE__ */ h(ce, {
99
- value: e.original.dueDateLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue }),
100
- tone: e.original.dueDateTone,
101
- labels: Z.dueDate
51
+ }), [X]), Q = u(), $ = Q.activePanelId, ae = Q.isMenuOpen || !!$, oe = ($ && g[$]) ?? "ttw:w-52", se = (e) => {
52
+ $ && e.preventDefault(), Q.toggleMenu();
53
+ }, ce = (e) => {
54
+ e || (Q.closeMenu(), Q.closePanel());
55
+ }, le = (e) => {
56
+ v.includes(e) && w(e), Q.openPanel(_[e]);
57
+ }, ue = K === void 0 ? "any" : K ? "has" : "none", de = (e) => {
58
+ q(e === "any" ? void 0 : e === "has");
59
+ };
60
+ return /* @__PURE__ */ p(n, {
61
+ className: ie,
62
+ searchSlot: J,
63
+ menuSlot: /* @__PURE__ */ m(a, {
64
+ open: ae,
65
+ onOpenChange: ce,
66
+ children: [/* @__PURE__ */ p(s, {
67
+ asChild: !0,
68
+ children: /* @__PURE__ */ p(r, {
69
+ size: "md",
70
+ activeCount: y,
71
+ onClick: se,
72
+ labels: Z.filterMenuButton,
73
+ "data-testid": Y?.menuButton
102
74
  })
103
- });
104
- }, r = (e, t) => function({ row: n }) {
105
- return /* @__PURE__ */ h("div", {
106
- className: "ttw:text-right ttw:whitespace-nowrap",
107
- "data-testid": I?.[t],
108
- children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
109
- });
110
- }, i = (e) => function() {
111
- return /* @__PURE__ */ h("div", {
112
- className: "ttw:text-right",
113
- children: e
114
- });
115
- };
116
- return {
117
- [p.Vendor]: {
118
- accessorKey: "vendorLabel",
119
- enableSorting: !0,
120
- minSize: he,
121
- header: e(Z.columnVendor),
122
- cell: ({ row: e }) => /* @__PURE__ */ g("span", {
123
- className: _e[e.original.rowTone ?? "default"],
124
- "data-testid": I?.[p.Vendor],
125
- children: [e.original.vendorLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue }), e.original.rowNote ? /* @__PURE__ */ h("span", {
126
- className: "ttw:sr-only",
127
- children: ` ${e.original.rowNote}`
128
- }) : null]
129
- })
130
- },
131
- [p.Attachment]: {
132
- accessorKey: "attachment",
133
- enableSorting: !1,
134
- size: _,
135
- minSize: _,
136
- header: () => /* @__PURE__ */ h("span", {
137
- className: "ttw:sr-only",
138
- children: Z.columnAttachment
139
- }),
140
- cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ h("div", {
141
- className: "ttw:flex ttw:justify-center",
142
- "data-testid": I?.[p.Attachment],
143
- children: /* @__PURE__ */ h(ie, { children: /* @__PURE__ */ g(ne, { children: [/* @__PURE__ */ h(ae, {
144
- type: "button",
145
- className: "ttw:inline-flex ttw:cursor-default",
146
- "aria-label": e.original.attachment.label,
147
- onClick: (e) => e.stopPropagation(),
148
- children: /* @__PURE__ */ h(de, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
149
- }), /* @__PURE__ */ h(re, { children: e.original.attachment.label })] }) })
150
- }) : null
151
- },
152
- [p.IssueDate]: {
153
- accessorKey: "issueDateLabel",
154
- enableSorting: !0,
155
- header: e(Z.columnIssueDate),
156
- cell: t("issueDateLabel", p.IssueDate)
157
- },
158
- [p.DueDate]: {
159
- accessorKey: "dueDateLabel",
160
- enableSorting: !0,
161
- header: e(Z.columnDueDate),
162
- cell: n
163
- },
164
- [p.ScheduledDate]: {
165
- accessorKey: "scheduledDateLabel",
166
- enableSorting: !0,
167
- header: e(Z.columnScheduledDate),
168
- cell: t("scheduledDateLabel", p.ScheduledDate)
169
- },
170
- [p.PaidDate]: {
171
- accessorKey: "paidDateLabel",
172
- enableSorting: !1,
173
- header: Z.columnPaidDate,
174
- cell: t("paidDateLabel", p.PaidDate)
175
- },
176
- [p.Status]: {
177
- accessorKey: "status",
178
- enableSorting: !1,
179
- header: Z.columnStatus,
180
- cell: ({ row: e }) => /* @__PURE__ */ h("div", {
181
- className: "ttw:flex ttw:items-center ttw:gap-1",
182
- "data-testid": I?.[p.Status],
183
- children: /* @__PURE__ */ h(se, {
184
- status: e.original.status,
185
- tone: e.original.statusTone,
186
- labels: Z.statusBadge
187
- })
188
- })
189
- },
190
- [p.AmountDue]: {
191
- accessorKey: "amountDueLabel",
192
- enableSorting: !1,
193
- header: i(Z.columnAmountDue),
194
- cell: r("amountDueLabel", p.AmountDue)
195
- },
196
- [p.AmountScheduled]: {
197
- accessorKey: "amountScheduledLabel",
198
- enableSorting: !1,
199
- header: i(Z.columnAmountScheduled),
200
- cell: r("amountScheduledLabel", p.AmountScheduled)
201
- },
202
- [p.AmountPaid]: {
203
- accessorKey: "amountPaidLabel",
204
- enableSorting: !1,
205
- header: i(Z.columnAmountPaid),
206
- cell: r("amountPaidLabel", p.AmountPaid)
207
- },
208
- [p.TotalAmount]: {
209
- accessorKey: "totalAmountLabel",
210
- enableSorting: !1,
211
- header: i(Z.columnTotalAmount),
212
- cell: r("totalAmountLabel", p.TotalAmount)
213
- },
214
- [p.AddedOn]: {
215
- accessorKey: "addedOnLabel",
216
- enableSorting: !0,
217
- header: e(Z.columnAddedOn),
218
- cell: t("addedOnLabel", p.AddedOn)
219
- }
220
- };
221
- }, [Z, I]), Ce = m(() => [...ve.filter((e) => F.includes(e)).map((e) => Q[e]), {
222
- id: "actions",
223
- enableSorting: !1,
224
- header: () => /* @__PURE__ */ h("span", {
225
- className: "ttw:sr-only",
226
- children: Z.columnActions
75
+ }), /* @__PURE__ */ m(o, {
76
+ align: "start",
77
+ className: `ttw:p-0 ${oe}`,
78
+ children: [
79
+ Q.isMenuOpen ? /* @__PURE__ */ p("div", {
80
+ className: "ttw:p-1",
81
+ role: "menu",
82
+ "aria-label": Z.fieldMenuLabel,
83
+ children: f.map((e) => /* @__PURE__ */ m("button", {
84
+ type: "button",
85
+ role: "menuitem",
86
+ className: "ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-md ttw:px-2 ttw:py-1.5 ttw:text-xs ttw:font-medium ttw:transition-colors ttw:hover:bg-accent",
87
+ onClick: () => le(e),
88
+ children: [/* @__PURE__ */ p(h, {
89
+ className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
90
+ "aria-hidden": !0
91
+ }), Z.fields[e]]
92
+ }, e))
93
+ }) : null,
94
+ $ === "date" ? /* @__PURE__ */ p(t, {
95
+ from: D,
96
+ to: O,
97
+ onRangeChange: k,
98
+ selectedPreset: E,
99
+ onPresetChange: A,
100
+ presets: [...T],
101
+ labels: {
102
+ ...Z.dateRangePicker,
103
+ fieldLabel: Z.fields[C]
104
+ }
105
+ }) : null,
106
+ $ === "status" ? /* @__PURE__ */ p(i, {
107
+ options: [...j],
108
+ selectedValues: [...M],
109
+ onSelectionChange: N
110
+ }) : null,
111
+ $ === "amount" ? /* @__PURE__ */ p(e, {
112
+ mode: P,
113
+ onModeChange: F,
114
+ min: I,
115
+ max: L,
116
+ onMinChange: re,
117
+ onMaxChange: R,
118
+ showFlowDirection: !1,
119
+ labels: {
120
+ ...Z.amountFilter,
121
+ min: Z.amountMin,
122
+ max: Z.amountMax
123
+ }
124
+ }) : null,
125
+ $ === "vendor" ? /* @__PURE__ */ m("div", {
126
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-3",
127
+ children: [/* @__PURE__ */ p(te, {
128
+ type: "search",
129
+ className: "ttw:h-8 ttw:text-xs",
130
+ "aria-label": Z.vendorSearchLabel,
131
+ placeholder: Z.vendorSearchPlaceholder,
132
+ value: H,
133
+ onChange: (e) => U(e.target.value)
134
+ }), W ? /* @__PURE__ */ p("p", {
135
+ className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
136
+ children: Z.vendorLoading
137
+ }) : G ? /* @__PURE__ */ p("p", {
138
+ className: "ttw:px-1 ttw:text-xs ttw:text-destructive",
139
+ children: Z.vendorError
140
+ }) : z.length === 0 ? /* @__PURE__ */ p("p", {
141
+ className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
142
+ children: Z.vendorEmpty
143
+ }) : /* @__PURE__ */ p(i, {
144
+ options: [...z],
145
+ selectedValues: [...B],
146
+ onSelectionChange: V
147
+ })]
148
+ }) : null,
149
+ $ === "attachment" ? /* @__PURE__ */ p("div", {
150
+ className: "ttw:p-3",
151
+ children: /* @__PURE__ */ p(c, {
152
+ value: ue,
153
+ onValueChange: de,
154
+ "aria-label": Z.attachmentLabel,
155
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
156
+ children: [
157
+ {
158
+ value: "any",
159
+ label: Z.attachmentAny
160
+ },
161
+ {
162
+ value: "has",
163
+ label: Z.attachmentHas
164
+ },
165
+ {
166
+ value: "none",
167
+ label: Z.attachmentNone
168
+ }
169
+ ].map(({ value: e, label: t }) => /* @__PURE__ */ m("label", {
170
+ className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
171
+ children: [/* @__PURE__ */ p(l, { value: e }), /* @__PURE__ */ p("span", {
172
+ className: "ttw:text-xs ttw:font-medium",
173
+ children: t
174
+ })]
175
+ }, e))
176
+ })
177
+ }) : null
178
+ ]
179
+ })]
227
180
  }),
228
- cell: ({ row: e }) => /* @__PURE__ */ h("div", {
229
- className: "ttw:flex ttw:justify-end",
230
- children: /* @__PURE__ */ h(n, {
231
- variant: "ghost",
232
- size: "icon",
233
- "aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
234
- onClick: (t) => {
235
- t.stopPropagation(), e.original.onOpen();
236
- },
237
- children: /* @__PURE__ */ h(ue, { className: "ttw:size-4" })
238
- })
239
- })
240
- }], [
241
- Q,
242
- Z,
243
- F
244
- ]), we = !!(z && V) && !b && !x && !L && y.length === 0 && Se === !0, $ = /* @__PURE__ */ g("div", {
245
- className: "ttw:relative ttw:w-80",
246
- children: [/* @__PURE__ */ h(pe, { 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, {
247
- className: "ttw:pl-9",
248
- type: "search",
249
- "aria-label": Z.searchLabel,
250
- placeholder: Z.searchPlaceholder,
251
- value: N,
252
- onChange: (e) => xe(e.target.value)
253
- })]
254
- }), Te = P ? /* @__PURE__ */ h(le, {
255
- ...P,
256
- className: "ttw:px-4",
257
- searchSlot: $
258
- }) : /* @__PURE__ */ h("div", {
259
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
260
- children: $
261
- });
262
- return /* @__PURE__ */ g("div", {
263
- className: "ttw:flex ttw:flex-col ttw:gap-3",
264
- children: [Y ? /* @__PURE__ */ g(e, {
265
- className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-none ttw:border-0 ttw:border-l-4 ttw:border-l-amber-600 ttw:bg-amber-50 ttw:py-2 ttw:text-amber-700",
266
- children: [/* @__PURE__ */ h(t, {
267
- className: "ttw:flex-1 ttw:font-semibold",
268
- children: Y
269
- }), X ? /* @__PURE__ */ h(n, {
181
+ activeChipsSlot: /* @__PURE__ */ m("span", {
182
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
183
+ "data-testid": Y?.chips,
184
+ children: [b.map((e) => /* @__PURE__ */ p(ee, {
185
+ label: e.label,
186
+ labels: Z.filterTag,
187
+ onDismiss: () => x(e.key)
188
+ }, e.key)), b.length > 0 ? /* @__PURE__ */ p("button", {
270
189
  type: "button",
271
- variant: "outline",
272
- className: "ttw:text-foreground",
273
- onClick: X,
274
- children: Z.duplicateBillsReviewButton
190
+ className: "ttw:cursor-pointer ttw:whitespace-nowrap ttw:text-xs ttw:text-muted-foreground ttw:transition-colors ttw:hover:text-foreground",
191
+ onClick: S,
192
+ children: Z.clearAll
275
193
  }) : null]
276
- }) : null, /* @__PURE__ */ g(te, {
277
- value: j,
278
- onValueChange: M,
279
- className: "ttw:flex ttw:flex-col ttw:gap-4",
280
- children: [/* @__PURE__ */ g("div", {
281
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
282
- children: [/* @__PURE__ */ h(o, {
283
- "aria-label": Z.filterTabsLabel,
284
- children: A.map((e) => /* @__PURE__ */ g(s, {
285
- value: e.id,
286
- className: "ttw:min-w-28",
287
- children: [e.icon, e.label]
288
- }, e.id))
289
- }), z ? /* @__PURE__ */ g(n, {
290
- onClick: z,
291
- children: [/* @__PURE__ */ h(fe, { className: "ttw:size-4" }), Z.createButton]
292
- }) : null]
293
- }), (() => {
294
- let e = x ? /* @__PURE__ */ h(oe, {
295
- title: Z.errorTitle,
296
- description: Z.errorDescription,
297
- retryLabel: B ? Z.errorRetry : void 0,
298
- onRetry: B
299
- }) : we && z && V ? /* @__PURE__ */ h("div", {
300
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
301
- children: K && q ? /* @__PURE__ */ h(l, {
302
- emailAddress: K,
303
- onCopyEmail: q,
304
- onFilesSelected: V,
305
- accept: f,
306
- maxFiles: H,
307
- uploadStatus: W,
308
- uploadErrorMessage: G,
309
- onEnterManually: U ?? z,
310
- labels: Z.addBill
311
- }) : /* @__PURE__ */ h(l, {
312
- onFilesSelected: V,
313
- accept: f,
314
- maxFiles: H,
315
- uploadStatus: W,
316
- uploadErrorMessage: G,
317
- onEnterManually: U ?? z,
318
- labels: Z.addBill
319
- })
320
- }) : /* @__PURE__ */ h(r, {
321
- columns: Ce,
322
- data: y,
323
- isLoading: b,
324
- sorting: ye,
325
- onSortingChange: be,
326
- pageSize: S,
327
- onPageSizeChange: C,
328
- pageSizeOptions: w,
329
- pageInfo: T,
330
- hasNextPage: E,
331
- hasPrevPage: D,
332
- onNextPage: O,
333
- onPrevPage: k,
334
- onRowClick: (e) => e.onOpen(),
335
- rowClassName: (e) => ge[e.rowTone ?? "default"],
336
- filterComponent: Te,
337
- children: L ? /* @__PURE__ */ h(c, {
338
- title: Z.filteredEmptyTitle,
339
- description: Z.filteredEmptyDescription
340
- }) : R ? /* @__PURE__ */ h(c, {
341
- title: R.title,
342
- description: R.description
343
- }) : void 0
344
- });
345
- return A.map((t) => /* @__PURE__ */ h(a, {
346
- value: t.id,
347
- children: t.id === j ? e : null
348
- }, t.id));
349
- })()]
350
- })]
194
+ })
351
195
  });
352
196
  }
197
+ function b(e) {
198
+ return /* @__PURE__ */ p(y, { ...e }, e.fields.join("|"));
199
+ }
353
200
  //#endregion
354
- export { y as BillsScreen, y as default, v as DEFAULT_BILL_COLUMNS };
201
+ export { b as BillsFilterBar, b as default };
@@ -1,10 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.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" : e === "duplicate" ? "Possible duplicate" : "Failed",
7
- openItem: (e) => `Open ${e}`
8
- };
9
- //#endregion
10
- export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
1
+ import "./index74.js";
2
+ import "./index75.js";
3
+ import "./index76.js";
@@ -1,9 +1,17 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js
2
2
  var e = {
3
- uploading: "ttw:text-muted-foreground",
4
- ready: "ttw:text-emerald-600",
5
- duplicate: "ttw:text-orange-600",
6
- failed: "ttw:text-destructive"
3
+ Vendor: "vendor",
4
+ Attachment: "attachment",
5
+ IssueDate: "issueDate",
6
+ DueDate: "dueDate",
7
+ ScheduledDate: "scheduledDate",
8
+ PaidDate: "paidDate",
9
+ Status: "status",
10
+ AmountDue: "amountDue",
11
+ AmountScheduled: "amountScheduled",
12
+ AmountPaid: "amountPaid",
13
+ TotalAmount: "totalAmount",
14
+ AddedOn: "addedOn"
7
15
  };
8
16
  //#endregion
9
- export { e as UPLOAD_ITEM_ICON_TONE };
17
+ export { e as BillColumn };