@tesouro/embedded-components-react 0.3.23 → 0.3.25

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 (85) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +10 -10
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +17 -12
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +2 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +47 -38
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +108 -93
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +14 -6
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +8 -4
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +2 -2
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +33 -30
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -40
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +23 -266
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +46 -6
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +273 -45
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -18
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +45 -282
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +19 -13
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +273 -107
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +13 -9
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +113 -92
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +9 -10
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +95 -54
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +9 -50
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +53 -137
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -2
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +138 -37
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -5
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +37 -88
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +5 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +88 -12
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -77
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +11 -253
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -13
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +82 -0
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +264 -8
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +9 -45
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +0 -1
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +7 -36
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +47 -10
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -201
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +39 -3
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +3 -7
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +188 -301
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +3 -10
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +12 -4
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +317 -81
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -0
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +8 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +91 -16
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +14 -3
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +109 -26
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +3 -3
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +26 -30
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +4 -9
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +30 -102
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +9 -14
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +85 -104
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +10 -11
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +123 -8
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -170
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +18 -2
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +7 -11
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +163 -82
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +1 -1
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +14 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +108 -0
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -0
  81. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +2 -2
  82. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +27 -27
  83. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  84. package/package.json +1 -1
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +0 -113
@@ -1,314 +1,201 @@
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";
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 "./index62.js";
3
+ import { BillsFilterField as f } from "./index63.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/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
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
44
26
  ];
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(() => ({
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(() => ({
47
29
  ...d,
48
- ...J,
49
- statusBadge: {
50
- ...d.statusBadge,
51
- ...J?.statusBadge
30
+ ...X,
31
+ fields: {
32
+ ...d.fields,
33
+ ...X?.fields
52
34
  },
53
- addBill: {
54
- ...d.addBill,
55
- ...J?.addBill,
56
- dropzone: {
57
- ...d.addBill.dropzone,
58
- ...J?.addBill?.dropzone
59
- }
35
+ filterMenuButton: {
36
+ ...d.filterMenuButton,
37
+ ...X?.filterMenuButton
60
38
  },
61
- sortableHeader: {
62
- ...d.sortableHeader,
63
- ...J?.sortableHeader
39
+ filterTag: {
40
+ ...d.filterTag,
41
+ ...X?.filterTag
64
42
  },
65
- missingValue: {
66
- ...d.missingValue,
67
- ...J?.missingValue
43
+ amountFilter: {
44
+ ...d.amountFilter,
45
+ ...X?.amountFilter
46
+ },
47
+ dateRangePicker: {
48
+ ...d.dateRangePicker,
49
+ ...X?.dateRangePicker
68
50
  }
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]
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
145
74
  })
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
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
+ })]
184
180
  }),
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
- })
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]
196
194
  })
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
195
  });
312
196
  }
197
+ function b(e) {
198
+ return /* @__PURE__ */ p(y, { ...e }, e.fields.join("|"));
199
+ }
313
200
  //#endregion
314
- export { b as BillsScreen, b as default, y 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/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
+ import "./index62.js";
2
+ import "./index63.js";
3
+ import "./index64.js";
@@ -1,8 +1,16 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js
2
2
  var e = {
3
- uploading: "ttw:text-muted-foreground",
4
- ready: "ttw:text-emerald-600",
5
- failed: "ttw:text-destructive"
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"
6
14
  };
7
15
  //#endregion
8
- export { e as UPLOAD_ITEM_ICON_TONE };
16
+ export { e as BillColumn };