@tesouro/embedded-components-react 0.3.19 → 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
@@ -1,285 +1,12 @@
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 { BillColumn as p } from "./index59.js";
15
- import { useMemo as m } from "react";
16
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
17
- import { ChevronRightIcon as _, CopyX as v, PlusIcon as y, SearchIcon as b } from "lucide-react";
18
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js
19
- var ae = [
20
- 10,
21
- 25,
22
- 50,
23
- 100
24
- ], oe = [
25
- p.Vendor,
26
- p.DueDate,
27
- p.ScheduledDate,
28
- p.PaidDate,
29
- p.Status,
30
- p.AmountDue,
31
- p.AmountScheduled,
32
- p.AmountPaid,
33
- p.AddedOn
34
- ], x = [
35
- p.Vendor,
36
- p.DueDate,
37
- p.Status,
38
- p.AmountDue,
39
- p.AddedOn
40
- ];
41
- function S({ rows: S, isLoading: C, isError: w, sorting: se, onSortingChange: ce, pageSize: le, onPageSizeChange: ue, pageSizeOptions: T = ae, pageInfo: de, hasNextPage: E, hasPrevPage: D, onNextPage: O, onPrevPage: k, filterTabs: A, selectedFilterTabId: j, onFilterTabChange: M, searchValue: N, onSearchChange: P, visibleColumns: F = x, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: R, emptyState: z, onCreateClick: B, onRetry: V, onFilesSelected: H, maxFiles: U, onEnterManually: W, uploadStatus: G, uploadErrorMessage: K, emailAddress: q, onCopyEmail: J, labels: Y, duplicateWarning: X, onReviewDuplicates: Z }) {
42
- let Q = m(() => ({
43
- ...d,
44
- ...Y,
45
- statusBadge: {
46
- ...d.statusBadge,
47
- ...Y?.statusBadge
48
- },
49
- addBill: {
50
- ...d.addBill,
51
- ...Y?.addBill,
52
- dropzone: {
53
- ...d.addBill.dropzone,
54
- ...Y?.addBill?.dropzone
55
- }
56
- },
57
- sortableHeader: {
58
- ...d.sortableHeader,
59
- ...Y?.sortableHeader
60
- },
61
- missingValue: {
62
- ...d.missingValue,
63
- ...Y?.missingValue
64
- }
65
- }), [Y]), $ = m(() => {
66
- let e = (e) => function({ column: t }) {
67
- return /* @__PURE__ */ h(i, {
68
- column: t,
69
- title: e,
70
- labels: Q.sortableHeader
71
- });
72
- }, t = (e, t) => function({ row: n }) {
73
- return /* @__PURE__ */ h("span", {
74
- "data-testid": I?.[t],
75
- children: n.original[e] || /* @__PURE__ */ h(u, { labels: Q.missingValue })
76
- });
77
- }, n = (e, t) => function({ row: n }) {
78
- return /* @__PURE__ */ h("div", {
79
- className: "ttw:text-right",
80
- "data-testid": I?.[t],
81
- children: n.original[e] || /* @__PURE__ */ h(u, { labels: Q.missingValue })
82
- });
83
- }, r = (e) => function() {
84
- return /* @__PURE__ */ h("div", {
85
- className: "ttw:text-right",
86
- children: e
87
- });
88
- };
89
- return {
90
- [p.Vendor]: {
91
- accessorKey: "vendorLabel",
92
- enableSorting: !0,
93
- header: e(Q.columnVendor),
94
- cell: t("vendorLabel", p.Vendor)
95
- },
96
- [p.DueDate]: {
97
- accessorKey: "dueDateLabel",
98
- enableSorting: !0,
99
- header: e(Q.columnDueDate),
100
- cell: t("dueDateLabel", p.DueDate)
101
- },
102
- [p.ScheduledDate]: {
103
- accessorKey: "scheduledDateLabel",
104
- enableSorting: !0,
105
- header: e(Q.columnScheduledDate),
106
- cell: t("scheduledDateLabel", p.ScheduledDate)
107
- },
108
- [p.PaidDate]: {
109
- accessorKey: "paidDateLabel",
110
- enableSorting: !1,
111
- header: Q.columnPaidDate,
112
- cell: t("paidDateLabel", p.PaidDate)
113
- },
114
- [p.Status]: {
115
- accessorKey: "status",
116
- enableSorting: !1,
117
- header: Q.columnStatus,
118
- cell: ({ row: e }) => /* @__PURE__ */ g("div", {
119
- className: "ttw:flex ttw:items-center ttw:gap-1",
120
- "data-testid": I?.[p.Status],
121
- children: [/* @__PURE__ */ h(re, {
122
- status: e.original.status,
123
- tone: e.original.statusTone,
124
- labels: Q.statusBadge
125
- }), e.original.duplicateBadge ? /* @__PURE__ */ h(ie, { ...e.original.duplicateBadge }) : null]
126
- })
127
- },
128
- [p.AmountDue]: {
129
- accessorKey: "amountDueLabel",
130
- enableSorting: !1,
131
- header: r(Q.columnAmountDue),
132
- cell: n("amountDueLabel", p.AmountDue)
133
- },
134
- [p.AmountScheduled]: {
135
- accessorKey: "amountScheduledLabel",
136
- enableSorting: !1,
137
- header: r(Q.columnAmountScheduled),
138
- cell: n("amountScheduledLabel", p.AmountScheduled)
139
- },
140
- [p.AmountPaid]: {
141
- accessorKey: "amountPaidLabel",
142
- enableSorting: !1,
143
- header: r(Q.columnAmountPaid),
144
- cell: n("amountPaidLabel", p.AmountPaid)
145
- },
146
- [p.AddedOn]: {
147
- accessorKey: "addedOnLabel",
148
- enableSorting: !0,
149
- header: e(Q.columnAddedOn),
150
- cell: t("addedOnLabel", p.AddedOn)
151
- }
152
- };
153
- }, [Q, I]), fe = m(() => [...oe.filter((e) => F.includes(e)).map((e) => $[e]), {
154
- id: "actions",
155
- enableSorting: !1,
156
- header: () => /* @__PURE__ */ h("span", {
157
- className: "ttw:sr-only",
158
- children: Q.columnActions
159
- }),
160
- cell: ({ row: e }) => /* @__PURE__ */ h("div", {
161
- className: "ttw:flex ttw:justify-end",
162
- children: /* @__PURE__ */ h(n, {
163
- variant: "ghost",
164
- size: "icon",
165
- "aria-label": Q.openRow(e.original.vendorLabel || Q.missingValue.missing),
166
- onClick: (t) => {
167
- t.stopPropagation(), e.original.onOpen();
168
- },
169
- children: /* @__PURE__ */ h(_, { className: "ttw:size-4" })
170
- })
171
- })
172
- }], [
173
- $,
174
- Q,
175
- F
176
- ]), pe = !!(B && H) && !C && !w && !L && S.length === 0 && R === !0, me = /* @__PURE__ */ h("div", {
177
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
178
- children: /* @__PURE__ */ g("div", {
179
- className: "ttw:relative ttw:w-80",
180
- children: [/* @__PURE__ */ h(b, { 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(a, {
181
- className: "ttw:pl-9",
182
- type: "search",
183
- "aria-label": Q.searchLabel,
184
- placeholder: Q.searchPlaceholder,
185
- value: N,
186
- onChange: (e) => P(e.target.value)
187
- })]
188
- })
189
- });
190
- return /* @__PURE__ */ g("div", {
191
- className: "ttw:flex ttw:flex-col ttw:gap-3",
192
- children: [X ? /* @__PURE__ */ g(e, {
193
- className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
194
- children: [
195
- /* @__PURE__ */ h(v, {}),
196
- /* @__PURE__ */ h(t, {
197
- className: "ttw:flex-1",
198
- children: X
199
- }),
200
- Z ? /* @__PURE__ */ h(n, {
201
- type: "button",
202
- variant: "outline",
203
- className: "ttw:text-foreground",
204
- onClick: Z,
205
- children: Q.duplicateBillsReviewButton
206
- }) : null
207
- ]
208
- }) : null, /* @__PURE__ */ g(ee, {
209
- value: j,
210
- onValueChange: M,
211
- className: "ttw:flex ttw:flex-col ttw:gap-4",
212
- children: [/* @__PURE__ */ g("div", {
213
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
214
- children: [/* @__PURE__ */ h(ne, {
215
- "aria-label": Q.filterTabsLabel,
216
- children: A.map((e) => /* @__PURE__ */ g(o, {
217
- value: e.id,
218
- className: "ttw:min-w-28",
219
- children: [e.icon, e.label]
220
- }, e.id))
221
- }), B ? /* @__PURE__ */ g(n, {
222
- onClick: B,
223
- children: [/* @__PURE__ */ h(y, { className: "ttw:size-4" }), Q.createButton]
224
- }) : null]
225
- }), (() => {
226
- let e = w ? /* @__PURE__ */ h(c, {
227
- title: Q.errorTitle,
228
- description: Q.errorDescription,
229
- retryLabel: V ? Q.errorRetry : void 0,
230
- onRetry: V
231
- }) : pe && B && H ? /* @__PURE__ */ h("div", {
232
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
233
- children: q && J ? /* @__PURE__ */ h(l, {
234
- emailAddress: q,
235
- onCopyEmail: J,
236
- onFilesSelected: H,
237
- accept: f,
238
- maxFiles: U,
239
- uploadStatus: G,
240
- uploadErrorMessage: K,
241
- onEnterManually: W ?? B,
242
- labels: Q.addBill
243
- }) : /* @__PURE__ */ h(l, {
244
- onFilesSelected: H,
245
- accept: f,
246
- maxFiles: U,
247
- uploadStatus: G,
248
- uploadErrorMessage: K,
249
- onEnterManually: W ?? B,
250
- labels: Q.addBill
251
- })
252
- }) : /* @__PURE__ */ h(r, {
253
- columns: fe,
254
- data: S,
255
- isLoading: C,
256
- sorting: se,
257
- onSortingChange: ce,
258
- pageSize: le,
259
- onPageSizeChange: ue,
260
- pageSizeOptions: T,
261
- pageInfo: de,
262
- hasNextPage: E,
263
- hasPrevPage: D,
264
- onNextPage: O,
265
- onPrevPage: k,
266
- onRowClick: (e) => e.onOpen(),
267
- filterComponent: me,
268
- children: L ? /* @__PURE__ */ h(s, {
269
- title: Q.filteredEmptyTitle,
270
- description: Q.filteredEmptyDescription
271
- }) : z ? /* @__PURE__ */ h(s, {
272
- title: z.title,
273
- description: z.description
274
- }) : void 0
275
- });
276
- return A.map((t) => /* @__PURE__ */ h(te, {
277
- value: t.id,
278
- children: t.id === j ? e : null
279
- }, t.id));
280
- })()]
281
- })]
282
- });
283
- }
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
+ };
284
11
  //#endregion
285
- export { S as BillsScreen, S as default, x as DEFAULT_BILL_COLUMNS };
12
+ export { e as BillsFilterField };
@@ -1,10 +1,201 @@
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 "./index59.js";
3
+ import { BillsFilterField as f } from "./index60.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";
1
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.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
- };
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
26
+ ];
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(() => ({
29
+ ...d,
30
+ ...X,
31
+ fields: {
32
+ ...d.fields,
33
+ ...X?.fields
34
+ },
35
+ filterMenuButton: {
36
+ ...d.filterMenuButton,
37
+ ...X?.filterMenuButton
38
+ },
39
+ filterTag: {
40
+ ...d.filterTag,
41
+ ...X?.filterTag
42
+ },
43
+ amountFilter: {
44
+ ...d.amountFilter,
45
+ ...X?.amountFilter
46
+ },
47
+ dateRangePicker: {
48
+ ...d.dateRangePicker,
49
+ ...X?.dateRangePicker
50
+ }
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
74
+ })
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
+ })]
180
+ }),
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", {
189
+ type: "button",
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
193
+ }) : null]
194
+ })
195
+ });
196
+ }
197
+ function b(e) {
198
+ return /* @__PURE__ */ p(y, { ...e }, e.fields.join("|"));
199
+ }
9
200
  //#endregion
10
- export { e as BILL_UPLOAD_STATUS_TRAY_LABELS_EN };
201
+ export { b as BillsFilterBar, b as default };
@@ -1,8 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js
2
- var e = {
3
- uploading: "ttw:text-muted-foreground",
4
- ready: "ttw:text-emerald-600",
5
- failed: "ttw:text-destructive"
6
- };
7
- //#endregion
8
- export { e as UPLOAD_ITEM_ICON_TONE };
1
+ import "./index59.js";
2
+ import "./index60.js";
3
+ import "./index61.js";
@@ -1,93 +1,16 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index61.js";
3
- import { UPLOAD_ITEM_ICON_TONE as n } from "./index62.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/index63.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
+ Vendor: "vendor",
4
+ IssueDate: "issueDate",
5
+ DueDate: "dueDate",
6
+ ScheduledDate: "scheduledDate",
7
+ PaidDate: "paidDate",
8
+ Status: "status",
9
+ AmountDue: "amountDue",
10
+ AmountScheduled: "amountScheduled",
11
+ AmountPaid: "amountPaid",
12
+ TotalAmount: "totalAmount",
13
+ AddedOn: "addedOn"
14
+ };
92
15
  //#endregion
93
- export { g as BillUploadStatusTray, g as default };
16
+ export { e as BillColumn };