@tesouro/embedded-components-react 0.5.28 → 0.5.29

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 (112) hide show
  1. package/dist/index.css +12 -0
  2. package/dist/index.js +1 -1
  3. package/dist/lib/BillPayWidget.js +1 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +2 -44
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +7 -7
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +52 -67
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +15 -12
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +57 -62
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +68 -207
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +278 -175
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -126
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +53 -47
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +204 -49
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -202
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -32
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -240
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +532 -19
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -436
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +42 -4
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +230 -35
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -233
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +122 -241
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +206 -126
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -213
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -33
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +10 -11
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +123 -8
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -170
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +7 -11
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +158 -96
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +11 -7
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +100 -44
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +10 -0
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +52 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +2 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +20 -22
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +4 -9
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +103 -146
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +3 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +93 -88
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +15 -16
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -0
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +43 -29
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +55 -51
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +9 -2
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +33 -1
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -8
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -39
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -2
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -31
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -37
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +34 -10
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -201
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +39 -3
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +3 -8
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +187 -350
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +3 -10
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +13 -5
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +356 -85
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +9 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +87 -119
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -94
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +25 -4
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +90 -26
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +3 -3
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +26 -30
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +4 -9
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +30 -102
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +9 -14
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +85 -104
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -17
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +4 -0
  107. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +92 -87
  108. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  109. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  110. package/package.json +1 -1
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +0 -28
@@ -1,364 +1,201 @@
1
- import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as i, Input as a, Tabs as o, TabsContent as ee, TabsList as s, TabsTrigger as te, Tooltip as ne, TooltipContent as re, TooltipProvider as c, TooltipTrigger as ie } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as l } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as ae } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
- import "../../../shared/ui/dist/index.js";
5
- import { AddBillPanel as u } from "./index7.js";
6
- import "./index8.js";
7
- import { BillStatusBadge as oe } from "./index19.js";
8
- import "./index20.js";
9
- import { DueDateValue as se } from "./index22.js";
10
- import "./index23.js";
11
- import { MissingValue as d } from "./index59.js";
12
- import "./index60.js";
13
- import { NoValue as ce } from "./index62.js";
14
- import "./index63.js";
15
- import { BILLS_SCREEN_LABELS_EN as f, BILLS_SCREEN_UPLOAD_ACCEPT as p } from "./index64.js";
16
- import { BillsFilterBar as le } from "./index76.js";
17
- import "./index77.js";
18
- import { BillColumn as m } from "./index78.js";
19
- import { useMemo as h } from "react";
20
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
21
- import { ChevronRightIcon as v, PaperclipIcon as ue, PlusIcon as de, SearchIcon as fe } 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 "./index77.js";
3
+ import { BillsFilterField as f } from "./index78.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";
22
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js
23
- var pe = [
24
- 10,
25
- 25,
26
- 50,
27
- 100
28
- ], me = 240, he = {
29
- default: "",
30
- warning: "ttw:bg-amber-50 ttw:hover:bg-amber-100 ttw:border-l-4! ttw:border-l-amber-600!"
31
- }, ge = {
32
- default: "",
33
- warning: "ttw:-ml-1 ttw:font-semibold ttw:text-amber-800"
34
- }, y = 40, _e = [
35
- m.Vendor,
36
- m.Attachment,
37
- m.IssueDate,
38
- m.DueDate,
39
- m.ScheduledDate,
40
- m.PaidDate,
41
- m.Status,
42
- m.AmountDue,
43
- m.AmountScheduled,
44
- m.AmountPaid,
45
- m.TotalAmount,
46
- m.AddedOn
47
- ], b = [
48
- m.Vendor,
49
- m.Attachment,
50
- m.DueDate,
51
- m.Status,
52
- m.AmountDue,
53
- 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
54
26
  ];
55
- function x({ rows: x, isLoading: S, isError: C, sorting: ve, onSortingChange: ye, pageSize: be, onPageSizeChange: w, pageSizeOptions: T = pe, pageInfo: E, hasNextPage: D, hasPrevPage: O, onNextPage: k, onPrevPage: A, filterTabs: j, selectedFilterTabId: M, onFilterTabChange: N, searchValue: xe, onSearchChange: Se, filters: P, visibleColumns: F = b, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: Ce, 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 }) {
56
- let Z = h(() => ({
57
- ...f,
58
- ...J,
59
- statusBadge: {
60
- ...f.statusBadge,
61
- ...J?.statusBadge
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
62
34
  },
63
- addBill: {
64
- ...f.addBill,
65
- ...J?.addBill,
66
- dropzone: {
67
- ...f.addBill.dropzone,
68
- ...J?.addBill?.dropzone
69
- }
35
+ filterMenuButton: {
36
+ ...d.filterMenuButton,
37
+ ...X?.filterMenuButton
70
38
  },
71
- sortableHeader: {
72
- ...f.sortableHeader,
73
- ...J?.sortableHeader
39
+ filterTag: {
40
+ ...d.filterTag,
41
+ ...X?.filterTag
74
42
  },
75
- missingValue: {
76
- ...f.missingValue,
77
- ...J?.missingValue
43
+ amountFilter: {
44
+ ...d.amountFilter,
45
+ ...X?.amountFilter
78
46
  },
79
- noValue: {
80
- ...f.noValue,
81
- ...J?.noValue
82
- },
83
- dueDate: {
84
- ...f.dueDate,
85
- ...J?.dueDate
47
+ dateRangePicker: {
48
+ ...d.dateRangePicker,
49
+ ...X?.dateRangePicker
86
50
  }
87
- }), [J]), Q = h(() => {
88
- let e = (e) => function({ column: t }) {
89
- return /* @__PURE__ */ g(i, {
90
- column: t,
91
- title: e,
92
- labels: Z.sortableHeader
93
- });
94
- }, t = (e, t, n = /* @__PURE__ */ g(d, { labels: Z.missingValue }), r) => function({ row: i }) {
95
- let a = r && i.original[r] ? /* @__PURE__ */ g(d, { labels: Z.missingValue }) : n;
96
- return /* @__PURE__ */ g("span", {
97
- className: "ttw:whitespace-nowrap",
98
- "data-testid": I?.[t],
99
- children: i.original[e] || a
100
- });
101
- }, n = function({ row: e }) {
102
- return /* @__PURE__ */ g("span", {
103
- className: "ttw:whitespace-nowrap",
104
- "data-testid": I?.[m.DueDate],
105
- children: /* @__PURE__ */ g(se, {
106
- value: e.original.dueDateLabel || /* @__PURE__ */ g(d, { labels: Z.missingValue }),
107
- tone: e.original.dueDateTone,
108
- labels: Z.dueDate
109
- })
110
- });
111
- }, r = (e, t, n = /* @__PURE__ */ g(d, { labels: Z.missingValue }), r) => function({ row: i }) {
112
- let a = r && i.original[r] ? /* @__PURE__ */ g(d, { labels: Z.missingValue }) : n;
113
- return /* @__PURE__ */ g("div", {
114
- className: "ttw:text-right ttw:whitespace-nowrap",
115
- "data-testid": I?.[t],
116
- children: i.original[e] || a
117
- });
118
- }, a = /* @__PURE__ */ g(ce, { labels: Z.noValue }), o = (e) => function() {
119
- return /* @__PURE__ */ g("div", {
120
- className: "ttw:text-right",
121
- children: e
122
- });
123
- };
124
- return {
125
- [m.Vendor]: {
126
- accessorKey: "vendorLabel",
127
- enableSorting: !0,
128
- minSize: me,
129
- header: e(Z.columnVendor),
130
- cell: ({ row: e }) => /* @__PURE__ */ _("span", {
131
- className: ge[e.original.rowTone ?? "default"],
132
- "data-testid": I?.[m.Vendor],
133
- children: [e.original.vendorLabel || /* @__PURE__ */ g(d, { labels: Z.missingValue }), e.original.rowNote ? /* @__PURE__ */ g("span", {
134
- className: "ttw:sr-only",
135
- children: ` ${e.original.rowNote}`
136
- }) : 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
137
74
  })
138
- },
139
- [m.Attachment]: {
140
- accessorKey: "attachment",
141
- enableSorting: !1,
142
- size: y,
143
- minSize: y,
144
- header: () => /* @__PURE__ */ g("span", {
145
- className: "ttw:sr-only",
146
- children: Z.columnAttachment
147
- }),
148
- cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ g("div", {
149
- className: "ttw:flex ttw:justify-center",
150
- "data-testid": I?.[m.Attachment],
151
- children: /* @__PURE__ */ g(c, { children: /* @__PURE__ */ _(ne, { children: [/* @__PURE__ */ g(ie, {
152
- type: "button",
153
- className: "ttw:inline-flex ttw:cursor-default",
154
- "aria-label": e.original.attachment.label,
155
- onClick: (e) => e.stopPropagation(),
156
- children: /* @__PURE__ */ g(ue, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
157
- }), /* @__PURE__ */ g(re, { children: e.original.attachment.label })] }) })
158
- }) : null
159
- },
160
- [m.IssueDate]: {
161
- accessorKey: "issueDateLabel",
162
- enableSorting: !0,
163
- header: e(Z.columnIssueDate),
164
- cell: t("issueDateLabel", m.IssueDate)
165
- },
166
- [m.DueDate]: {
167
- accessorKey: "dueDateLabel",
168
- enableSorting: !0,
169
- header: e(Z.columnDueDate),
170
- cell: n
171
- },
172
- [m.ScheduledDate]: {
173
- accessorKey: "scheduledDateLabel",
174
- enableSorting: !0,
175
- header: e(Z.columnScheduledDate),
176
- cell: t("scheduledDateLabel", m.ScheduledDate, a, "scheduledDateIsGap")
177
- },
178
- [m.PaidDate]: {
179
- accessorKey: "paidDateLabel",
180
- enableSorting: !1,
181
- header: Z.columnPaidDate,
182
- cell: t("paidDateLabel", m.PaidDate)
183
- },
184
- [m.Status]: {
185
- accessorKey: "status",
186
- enableSorting: !1,
187
- header: Z.columnStatus,
188
- cell: ({ row: e }) => /* @__PURE__ */ g("div", {
189
- className: "ttw:flex ttw:items-center ttw:gap-1",
190
- "data-testid": I?.[m.Status],
191
- children: /* @__PURE__ */ g(oe, {
192
- status: e.original.status,
193
- tone: e.original.statusTone,
194
- labels: Z.statusBadge
195
- })
196
- })
197
- },
198
- [m.AmountDue]: {
199
- accessorKey: "amountDueLabel",
200
- enableSorting: !1,
201
- header: o(Z.columnAmountDue),
202
- cell: r("amountDueLabel", m.AmountDue)
203
- },
204
- [m.AmountScheduled]: {
205
- accessorKey: "amountScheduledLabel",
206
- enableSorting: !1,
207
- header: o(Z.columnAmountScheduled),
208
- cell: r("amountScheduledLabel", m.AmountScheduled)
209
- },
210
- [m.AmountPaid]: {
211
- accessorKey: "amountPaidLabel",
212
- enableSorting: !1,
213
- header: o(Z.columnAmountPaid),
214
- cell: r("amountPaidLabel", m.AmountPaid, a, "amountPaidIsGap")
215
- },
216
- [m.TotalAmount]: {
217
- accessorKey: "totalAmountLabel",
218
- enableSorting: !1,
219
- header: o(Z.columnTotalAmount),
220
- cell: r("totalAmountLabel", m.TotalAmount)
221
- },
222
- [m.AddedOn]: {
223
- accessorKey: "addedOnLabel",
224
- enableSorting: !0,
225
- header: e(Z.columnAddedOn),
226
- cell: t("addedOnLabel", m.AddedOn)
227
- }
228
- };
229
- }, [Z, I]), we = h(() => [..._e.filter((e) => F.includes(e)).map((e) => Q[e]), {
230
- id: "actions",
231
- enableSorting: !1,
232
- header: () => /* @__PURE__ */ g("span", {
233
- className: "ttw:sr-only",
234
- 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
+ })]
235
180
  }),
236
- cell: ({ row: e }) => /* @__PURE__ */ g("div", {
237
- className: "ttw:flex ttw:justify-end",
238
- children: /* @__PURE__ */ g(n, {
239
- variant: "ghost",
240
- size: "icon",
241
- "aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
242
- onClick: (t) => {
243
- t.stopPropagation(), e.original.onOpen();
244
- },
245
- children: /* @__PURE__ */ g(v, { className: "ttw:size-4" })
246
- })
247
- })
248
- }], [
249
- Q,
250
- Z,
251
- F
252
- ]), Te = !!(z && V) && !S && !C && !L && x.length === 0 && Ce === !0, $ = /* @__PURE__ */ _("div", {
253
- className: "ttw:relative ttw:w-80",
254
- children: [/* @__PURE__ */ g(fe, { 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, {
255
- className: "ttw:pl-9",
256
- type: "search",
257
- "aria-label": Z.searchLabel,
258
- placeholder: Z.searchPlaceholder,
259
- value: xe,
260
- onChange: (e) => Se(e.target.value)
261
- })]
262
- }), Ee = P ? /* @__PURE__ */ g(le, {
263
- ...P,
264
- className: "ttw:px-4",
265
- searchSlot: $
266
- }) : /* @__PURE__ */ g("div", {
267
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
268
- children: $
269
- });
270
- return /* @__PURE__ */ _("div", {
271
- className: "ttw:flex ttw:flex-col ttw:gap-3",
272
- children: [Y ? /* @__PURE__ */ _(e, {
273
- 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",
274
- children: [/* @__PURE__ */ g(t, {
275
- className: "ttw:flex-1 ttw:font-semibold",
276
- children: Y
277
- }), X ? /* @__PURE__ */ g(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", {
278
189
  type: "button",
279
- variant: "outline",
280
- className: "ttw:text-foreground",
281
- onClick: X,
282
- 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
283
193
  }) : null]
284
- }) : null, /* @__PURE__ */ _(o, {
285
- value: M,
286
- onValueChange: N,
287
- className: "ttw:flex ttw:flex-col ttw:gap-4",
288
- children: [/* @__PURE__ */ _("div", {
289
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
290
- children: [/* @__PURE__ */ g(s, {
291
- "aria-label": Z.filterTabsLabel,
292
- children: j.map((e) => /* @__PURE__ */ _(te, {
293
- value: e.id,
294
- className: "ttw:min-w-28",
295
- children: [e.icon, e.label]
296
- }, e.id))
297
- }), z ? /* @__PURE__ */ _(n, {
298
- onClick: z,
299
- children: [/* @__PURE__ */ g(de, { className: "ttw:size-4" }), Z.createButton]
300
- }) : null]
301
- }), (() => {
302
- let e = C ? /* @__PURE__ */ g(ae, {
303
- title: Z.errorTitle,
304
- description: Z.errorDescription,
305
- retryLabel: B ? Z.errorRetry : void 0,
306
- onRetry: B
307
- }) : Te && z && V ? /* @__PURE__ */ g("div", {
308
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
309
- children: K && q ? /* @__PURE__ */ g(u, {
310
- emailAddress: K,
311
- onCopyEmail: q,
312
- onFilesSelected: V,
313
- accept: p,
314
- maxFiles: H,
315
- uploadStatus: W,
316
- uploadErrorMessage: G,
317
- onEnterManually: U ?? z,
318
- labels: Z.addBill
319
- }) : /* @__PURE__ */ g(u, {
320
- onFilesSelected: V,
321
- accept: p,
322
- maxFiles: H,
323
- uploadStatus: W,
324
- uploadErrorMessage: G,
325
- onEnterManually: U ?? z,
326
- labels: Z.addBill
327
- })
328
- }) : /* @__PURE__ */ g(r, {
329
- columns: we,
330
- data: x,
331
- getRowId: (e) => e.rowKey,
332
- animatesNewRows: !0,
333
- isLoading: S,
334
- sorting: ve,
335
- onSortingChange: ye,
336
- pageSize: be,
337
- onPageSizeChange: w,
338
- pageSizeOptions: T,
339
- pageInfo: E,
340
- hasNextPage: D,
341
- hasPrevPage: O,
342
- onNextPage: k,
343
- onPrevPage: A,
344
- onRowClick: (e) => e.onOpen(),
345
- rowClassName: (e) => he[e.rowTone ?? "default"],
346
- filterComponent: Ee,
347
- children: L ? /* @__PURE__ */ g(l, {
348
- title: Z.filteredEmptyTitle,
349
- description: Z.filteredEmptyDescription
350
- }) : R ? /* @__PURE__ */ g(l, {
351
- title: R.title,
352
- description: R.description
353
- }) : void 0
354
- });
355
- return j.map((t) => /* @__PURE__ */ g(ee, {
356
- value: t.id,
357
- children: t.id === M ? e : null
358
- }, t.id));
359
- })()]
360
- })]
194
+ })
361
195
  });
362
196
  }
197
+ function b(e) {
198
+ return /* @__PURE__ */ p(y, { ...e }, e.fields.join("|"));
199
+ }
363
200
  //#endregion
364
- export { x as BillsScreen, x as default, b 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/index80.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 "./index77.js";
2
+ import "./index78.js";
3
+ import "./index79.js";
@@ -1,9 +1,17 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.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 };