@tesouro/embedded-components-react 0.3.38 → 0.3.39

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.
@@ -8,28 +8,45 @@ import { postApprovalRequestsIdApprove as n, postApprovalRequestsIdReject as r }
8
8
  import { getApprovalRequestsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
9
  import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { invalidateApprovalDecisionQueries as o } from "./index5.js";
12
- import { useMutation as s, useQuery as c } from "@tanstack/react-query";
11
+ import { NEWEST_REQUEST_FIRST as o, PAYABLE_OBJECT_TYPE as s } from "./index4.js";
12
+ import { beginApprovalRequestWatch as c, invalidateApprovalDecisionQueries as l, reconcileApprovalDecisionQueries as u } from "./index5.js";
13
+ import { useMutation as d, useQuery as f } from "@tanstack/react-query";
13
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
14
- var l = "payable", u = "desc";
15
- function d(n, { enabled: r } = {}) {
16
- let { client: o, organizationId: s, widgetToken: d, authEpoch: f } = e(), p = !!(s && d && n) && r !== !1, m = i({
17
- client: o,
18
- headers: t(s),
15
+ function p(n, { enabled: r } = {}) {
16
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), p = !!(l && u && n) && r !== !1, m = i({
17
+ client: c,
18
+ headers: t(l),
19
19
  query: {
20
20
  object_id: n ?? "",
21
- object_type: l,
22
- order: u
21
+ object_type: s,
22
+ order: o
23
23
  }
24
24
  });
25
- return c({
26
- ...a(m, f),
25
+ return f({
26
+ ...a(m, d),
27
27
  enabled: p
28
28
  });
29
29
  }
30
- function f() {
30
+ async function m({ client: e, organizationId: t, payableId: n, requestStatus: r }) {
31
+ let i = n && r !== "waiting" && n ? await c({
32
+ client: e,
33
+ organizationId: t,
34
+ payableId: n
35
+ }) : void 0;
36
+ await l({
37
+ client: e,
38
+ organizationId: t,
39
+ payableId: n
40
+ }), !(!n || !i) && u({
41
+ client: e,
42
+ organizationId: t,
43
+ payableId: n,
44
+ watch: i
45
+ }).catch(() => {});
46
+ }
47
+ function h() {
31
48
  let { client: r, organizationId: i } = e();
32
- return s({
49
+ return d({
33
50
  mutationFn: async ({ path: e }) => {
34
51
  let { data: a } = await n({
35
52
  client: r,
@@ -40,17 +57,18 @@ function f() {
40
57
  return a;
41
58
  },
42
59
  onSuccess: async (e) => {
43
- await o({
60
+ await m({
44
61
  client: r,
45
62
  organizationId: i,
46
- payableId: e?.object_id
63
+ payableId: e?.object_id,
64
+ requestStatus: e?.status
47
65
  });
48
66
  }
49
67
  });
50
68
  }
51
- function p() {
69
+ function g() {
52
70
  let { client: n, organizationId: i } = e();
53
- return s({
71
+ return d({
54
72
  mutationFn: async ({ path: e, body: a }) => {
55
73
  let { data: o } = await r({
56
74
  client: n,
@@ -62,13 +80,14 @@ function p() {
62
80
  return o;
63
81
  },
64
82
  onSuccess: async (e) => {
65
- await o({
83
+ await m({
66
84
  client: n,
67
85
  organizationId: i,
68
- payableId: e?.object_id
86
+ payableId: e?.object_id,
87
+ requestStatus: e?.status
69
88
  });
70
89
  }
71
90
  });
72
91
  }
73
92
  //#endregion
74
- export { f as useApprovePayableApprovalRequestMutation, d as usePayableApprovalRequestsQuery, p as useRejectPayableApprovalRequestMutation };
93
+ export { h as useApprovePayableApprovalRequestMutation, p as usePayableApprovalRequestsQuery, g as useRejectPayableApprovalRequestMutation };
@@ -42,6 +42,7 @@ var a = t.Pending, o = [
42
42
  ], s = {
43
43
  [t.Drafts]: [
44
44
  e.Vendor,
45
+ e.Attachment,
45
46
  e.IssueDate,
46
47
  e.DueDate,
47
48
  e.Status,
@@ -51,6 +52,7 @@ var a = t.Pending, o = [
51
52
  ],
52
53
  [t.Pending]: [
53
54
  e.Vendor,
55
+ e.Attachment,
54
56
  e.IssueDate,
55
57
  e.DueDate,
56
58
  e.Status,
@@ -60,6 +62,7 @@ var a = t.Pending, o = [
60
62
  ],
61
63
  [t.Scheduled]: [
62
64
  e.Vendor,
65
+ e.Attachment,
63
66
  e.IssueDate,
64
67
  e.DueDate,
65
68
  e.ScheduledDate,
@@ -70,6 +73,7 @@ var a = t.Pending, o = [
70
73
  ],
71
74
  [t.Paid]: [
72
75
  e.Vendor,
76
+ e.Attachment,
73
77
  e.IssueDate,
74
78
  e.DueDate,
75
79
  e.PaidDate,
@@ -80,6 +84,7 @@ var a = t.Pending, o = [
80
84
  ],
81
85
  [t.All]: [
82
86
  e.Vendor,
87
+ e.Attachment,
83
88
  e.IssueDate,
84
89
  e.DueDate,
85
90
  e.ScheduledDate,
@@ -7,6 +7,7 @@ var t = {
7
7
  detailsSheet: "bill-pay-details-sheet"
8
8
  }, n = {
9
9
  [e.Vendor]: "bill-pay-bills-cell-vendor",
10
+ [e.Attachment]: "bill-pay-bills-cell-attachment",
10
11
  [e.IssueDate]: "bill-pay-bills-cell-issue-date",
11
12
  [e.DueDate]: "bill-pay-bills-cell-due-date",
12
13
  [e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
@@ -48,6 +48,7 @@ var o = {
48
48
  }, l = {
49
49
  createButton: "Add bill",
50
50
  columnVendor: "Vendor",
51
+ columnAttachment: "Attachment",
51
52
  columnIssueDate: "Issue date",
52
53
  columnDueDate: "Due date",
53
54
  columnScheduledDate: "Scheduled date",
@@ -1,6 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js
2
2
  var e = {
3
3
  Vendor: "vendor",
4
+ Attachment: "attachment",
4
5
  IssueDate: "issueDate",
5
6
  DueDate: "dueDate",
6
7
  ScheduledDate: "scheduledDate",
@@ -1,247 +1,265 @@
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 te, TabsTrigger as ne } 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";
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
4
  import "../../../shared/ui/dist/index.js";
5
5
  import { AddBillPanel as l } from "./index7.js";
6
6
  import "./index8.js";
7
- import { BillStatusBadge as u } from "./index20.js";
7
+ import { BillStatusBadge as se } from "./index20.js";
8
8
  import "./index21.js";
9
- import { DueDateValue as re } from "./index23.js";
9
+ import { DueDateValue as ce } from "./index23.js";
10
10
  import "./index24.js";
11
- import { MissingValue as d } from "./index53.js";
11
+ import { MissingValue as u } from "./index53.js";
12
12
  import "./index54.js";
13
- import { BILLS_SCREEN_LABELS_EN as f, BILLS_SCREEN_UPLOAD_ACCEPT as p } from "./index55.js";
14
- import { BillDuplicateBadge as ie } from "./index57.js";
13
+ import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index55.js";
14
+ import { BillDuplicateBadge as le } from "./index57.js";
15
15
  import "./index58.js";
16
- import { BillsFilterBar as m } from "./index64.js";
16
+ import { BillsFilterBar as ue } from "./index64.js";
17
17
  import "./index65.js";
18
- import { BillColumn as h } from "./index66.js";
19
- import { useMemo as g } from "react";
20
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
21
- import { ChevronRightIcon as y, CopyX as ae, PaperclipIcon as oe, PlusIcon as se, SearchIcon as ce } from "lucide-react";
18
+ import { BillColumn as p } from "./index66.js";
19
+ import { useMemo as m } from "react";
20
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
21
+ import { ChevronRightIcon as de, CopyX as fe, PaperclipIcon as pe, PlusIcon as me, SearchIcon as he } from "lucide-react";
22
22
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js
23
- var le = [
23
+ var ge = [
24
24
  10,
25
25
  25,
26
26
  50,
27
27
  100
28
- ], ue = 240, de = [
29
- h.Vendor,
30
- h.IssueDate,
31
- h.DueDate,
32
- h.ScheduledDate,
33
- h.PaidDate,
34
- h.Status,
35
- h.AmountDue,
36
- h.AmountScheduled,
37
- h.AmountPaid,
38
- h.TotalAmount,
39
- h.AddedOn
40
- ], b = [
41
- h.Vendor,
42
- h.DueDate,
43
- h.Status,
44
- h.AmountDue,
45
- h.AddedOn
28
+ ], _e = 240, _ = 40, ve = [
29
+ p.Vendor,
30
+ p.Attachment,
31
+ p.IssueDate,
32
+ p.DueDate,
33
+ p.ScheduledDate,
34
+ p.PaidDate,
35
+ p.Status,
36
+ p.AmountDue,
37
+ p.AmountScheduled,
38
+ p.AmountPaid,
39
+ p.TotalAmount,
40
+ p.AddedOn
41
+ ], v = [
42
+ p.Vendor,
43
+ p.Attachment,
44
+ p.DueDate,
45
+ p.Status,
46
+ p.AmountDue,
47
+ p.AddedOn
46
48
  ];
47
- function x({ rows: x, isLoading: S, isError: C, sorting: fe, onSortingChange: pe, pageSize: me, onPageSizeChange: he, pageSizeOptions: w = le, pageInfo: ge, hasNextPage: T, hasPrevPage: E, onNextPage: D, onPrevPage: O, filterTabs: k, selectedFilterTabId: A, onFilterTabChange: j, searchValue: M, onSearchChange: N, filters: P, visibleColumns: F = b, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: _e, 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 }) {
48
- let Z = g(() => ({
49
- ...f,
49
+ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be, pageSize: S, onPageSizeChange: C, pageSizeOptions: w = ge, 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 }) {
50
+ let Z = m(() => ({
51
+ ...d,
50
52
  ...J,
51
53
  statusBadge: {
52
- ...f.statusBadge,
54
+ ...d.statusBadge,
53
55
  ...J?.statusBadge
54
56
  },
55
57
  addBill: {
56
- ...f.addBill,
58
+ ...d.addBill,
57
59
  ...J?.addBill,
58
60
  dropzone: {
59
- ...f.addBill.dropzone,
61
+ ...d.addBill.dropzone,
60
62
  ...J?.addBill?.dropzone
61
63
  }
62
64
  },
63
65
  sortableHeader: {
64
- ...f.sortableHeader,
66
+ ...d.sortableHeader,
65
67
  ...J?.sortableHeader
66
68
  },
67
69
  missingValue: {
68
- ...f.missingValue,
70
+ ...d.missingValue,
69
71
  ...J?.missingValue
70
72
  },
71
73
  dueDate: {
72
- ...f.dueDate,
74
+ ...d.dueDate,
73
75
  ...J?.dueDate
74
76
  }
75
- }), [J]), Q = g(() => {
77
+ }), [J]), Q = m(() => {
76
78
  let e = (e) => function({ column: t }) {
77
- return /* @__PURE__ */ _(i, {
79
+ return /* @__PURE__ */ h(ee, {
78
80
  column: t,
79
81
  title: e,
80
82
  labels: Z.sortableHeader
81
83
  });
82
84
  }, t = (e, t) => function({ row: n }) {
83
- return /* @__PURE__ */ _("span", {
85
+ return /* @__PURE__ */ h("span", {
84
86
  "data-testid": I?.[t],
85
- children: n.original[e] || /* @__PURE__ */ _(d, { labels: Z.missingValue })
87
+ children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
86
88
  });
87
89
  }, n = function({ row: e }) {
88
- return /* @__PURE__ */ _("span", {
89
- "data-testid": I?.[h.DueDate],
90
- children: /* @__PURE__ */ _(re, {
91
- value: e.original.dueDateLabel || /* @__PURE__ */ _(d, { labels: Z.missingValue }),
90
+ return /* @__PURE__ */ h("span", {
91
+ "data-testid": I?.[p.DueDate],
92
+ children: /* @__PURE__ */ h(ce, {
93
+ value: e.original.dueDateLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue }),
92
94
  tone: e.original.dueDateTone,
93
95
  labels: Z.dueDate
94
96
  })
95
97
  });
96
98
  }, r = (e, t) => function({ row: n }) {
97
- return /* @__PURE__ */ _("div", {
99
+ return /* @__PURE__ */ h("div", {
98
100
  className: "ttw:text-right",
99
101
  "data-testid": I?.[t],
100
- children: n.original[e] || /* @__PURE__ */ _(d, { labels: Z.missingValue })
102
+ children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
101
103
  });
102
- }, a = (e) => function() {
103
- return /* @__PURE__ */ _("div", {
104
+ }, i = (e) => function() {
105
+ return /* @__PURE__ */ h("div", {
104
106
  className: "ttw:text-right",
105
107
  children: e
106
108
  });
107
109
  };
108
110
  return {
109
- [h.Vendor]: {
111
+ [p.Vendor]: {
110
112
  accessorKey: "vendorLabel",
111
113
  enableSorting: !0,
112
- minSize: ue,
114
+ minSize: _e,
113
115
  header: e(Z.columnVendor),
114
- cell: ({ row: e }) => /* @__PURE__ */ v("span", {
115
- className: "ttw:flex ttw:items-center ttw:gap-1.5",
116
- "data-testid": I?.[h.Vendor],
117
- children: [e.original.vendorLabel || /* @__PURE__ */ _(d, { labels: Z.missingValue }), e.original.attachment ? /* @__PURE__ */ _(oe, {
118
- className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground",
119
- "aria-label": e.original.attachment.label,
120
- role: "img"
121
- }) : null]
116
+ cell: ({ row: e }) => /* @__PURE__ */ h("span", {
117
+ "data-testid": I?.[p.Vendor],
118
+ children: e.original.vendorLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue })
122
119
  })
123
120
  },
124
- [h.IssueDate]: {
121
+ [p.Attachment]: {
122
+ accessorKey: "attachment",
123
+ enableSorting: !1,
124
+ size: _,
125
+ minSize: _,
126
+ header: () => /* @__PURE__ */ h("span", {
127
+ className: "ttw:sr-only",
128
+ children: Z.columnAttachment
129
+ }),
130
+ cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ h("div", {
131
+ className: "ttw:flex ttw:justify-center",
132
+ "data-testid": I?.[p.Attachment],
133
+ children: /* @__PURE__ */ h(ie, { children: /* @__PURE__ */ g(ne, { children: [/* @__PURE__ */ h(ae, {
134
+ type: "button",
135
+ className: "ttw:inline-flex ttw:cursor-default",
136
+ "aria-label": e.original.attachment.label,
137
+ onClick: (e) => e.stopPropagation(),
138
+ children: /* @__PURE__ */ h(pe, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
139
+ }), /* @__PURE__ */ h(re, { children: e.original.attachment.label })] }) })
140
+ }) : null
141
+ },
142
+ [p.IssueDate]: {
125
143
  accessorKey: "issueDateLabel",
126
144
  enableSorting: !0,
127
145
  header: e(Z.columnIssueDate),
128
- cell: t("issueDateLabel", h.IssueDate)
146
+ cell: t("issueDateLabel", p.IssueDate)
129
147
  },
130
- [h.DueDate]: {
148
+ [p.DueDate]: {
131
149
  accessorKey: "dueDateLabel",
132
150
  enableSorting: !0,
133
151
  header: e(Z.columnDueDate),
134
152
  cell: n
135
153
  },
136
- [h.ScheduledDate]: {
154
+ [p.ScheduledDate]: {
137
155
  accessorKey: "scheduledDateLabel",
138
156
  enableSorting: !0,
139
157
  header: e(Z.columnScheduledDate),
140
- cell: t("scheduledDateLabel", h.ScheduledDate)
158
+ cell: t("scheduledDateLabel", p.ScheduledDate)
141
159
  },
142
- [h.PaidDate]: {
160
+ [p.PaidDate]: {
143
161
  accessorKey: "paidDateLabel",
144
162
  enableSorting: !1,
145
163
  header: Z.columnPaidDate,
146
- cell: t("paidDateLabel", h.PaidDate)
164
+ cell: t("paidDateLabel", p.PaidDate)
147
165
  },
148
- [h.Status]: {
166
+ [p.Status]: {
149
167
  accessorKey: "status",
150
168
  enableSorting: !1,
151
169
  header: Z.columnStatus,
152
- cell: ({ row: e }) => /* @__PURE__ */ v("div", {
170
+ cell: ({ row: e }) => /* @__PURE__ */ g("div", {
153
171
  className: "ttw:flex ttw:items-center ttw:gap-1",
154
- "data-testid": I?.[h.Status],
155
- children: [/* @__PURE__ */ _(u, {
172
+ "data-testid": I?.[p.Status],
173
+ children: [/* @__PURE__ */ h(se, {
156
174
  status: e.original.status,
157
175
  tone: e.original.statusTone,
158
176
  labels: Z.statusBadge
159
- }), e.original.duplicateBadge ? /* @__PURE__ */ _(ie, { ...e.original.duplicateBadge }) : null]
177
+ }), e.original.duplicateBadge ? /* @__PURE__ */ h(le, { ...e.original.duplicateBadge }) : null]
160
178
  })
161
179
  },
162
- [h.AmountDue]: {
180
+ [p.AmountDue]: {
163
181
  accessorKey: "amountDueLabel",
164
182
  enableSorting: !1,
165
- header: a(Z.columnAmountDue),
166
- cell: r("amountDueLabel", h.AmountDue)
183
+ header: i(Z.columnAmountDue),
184
+ cell: r("amountDueLabel", p.AmountDue)
167
185
  },
168
- [h.AmountScheduled]: {
186
+ [p.AmountScheduled]: {
169
187
  accessorKey: "amountScheduledLabel",
170
188
  enableSorting: !1,
171
- header: a(Z.columnAmountScheduled),
172
- cell: r("amountScheduledLabel", h.AmountScheduled)
189
+ header: i(Z.columnAmountScheduled),
190
+ cell: r("amountScheduledLabel", p.AmountScheduled)
173
191
  },
174
- [h.AmountPaid]: {
192
+ [p.AmountPaid]: {
175
193
  accessorKey: "amountPaidLabel",
176
194
  enableSorting: !1,
177
- header: a(Z.columnAmountPaid),
178
- cell: r("amountPaidLabel", h.AmountPaid)
195
+ header: i(Z.columnAmountPaid),
196
+ cell: r("amountPaidLabel", p.AmountPaid)
179
197
  },
180
- [h.TotalAmount]: {
198
+ [p.TotalAmount]: {
181
199
  accessorKey: "totalAmountLabel",
182
200
  enableSorting: !1,
183
- header: a(Z.columnTotalAmount),
184
- cell: r("totalAmountLabel", h.TotalAmount)
201
+ header: i(Z.columnTotalAmount),
202
+ cell: r("totalAmountLabel", p.TotalAmount)
185
203
  },
186
- [h.AddedOn]: {
204
+ [p.AddedOn]: {
187
205
  accessorKey: "addedOnLabel",
188
206
  enableSorting: !0,
189
207
  header: e(Z.columnAddedOn),
190
- cell: t("addedOnLabel", h.AddedOn)
208
+ cell: t("addedOnLabel", p.AddedOn)
191
209
  }
192
210
  };
193
- }, [Z, I]), ve = g(() => [...de.filter((e) => F.includes(e)).map((e) => Q[e]), {
211
+ }, [Z, I]), Ce = m(() => [...ve.filter((e) => F.includes(e)).map((e) => Q[e]), {
194
212
  id: "actions",
195
213
  enableSorting: !1,
196
- header: () => /* @__PURE__ */ _("span", {
214
+ header: () => /* @__PURE__ */ h("span", {
197
215
  className: "ttw:sr-only",
198
216
  children: Z.columnActions
199
217
  }),
200
- cell: ({ row: e }) => /* @__PURE__ */ _("div", {
218
+ cell: ({ row: e }) => /* @__PURE__ */ h("div", {
201
219
  className: "ttw:flex ttw:justify-end",
202
- children: /* @__PURE__ */ _(n, {
220
+ children: /* @__PURE__ */ h(n, {
203
221
  variant: "ghost",
204
222
  size: "icon",
205
223
  "aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
206
224
  onClick: (t) => {
207
225
  t.stopPropagation(), e.original.onOpen();
208
226
  },
209
- children: /* @__PURE__ */ _(y, { className: "ttw:size-4" })
227
+ children: /* @__PURE__ */ h(de, { className: "ttw:size-4" })
210
228
  })
211
229
  })
212
230
  }], [
213
231
  Q,
214
232
  Z,
215
233
  F
216
- ]), ye = !!(z && V) && !S && !C && !L && x.length === 0 && _e === !0, $ = /* @__PURE__ */ v("div", {
234
+ ]), we = !!(z && V) && !b && !x && !L && y.length === 0 && Se === !0, $ = /* @__PURE__ */ g("div", {
217
235
  className: "ttw:relative ttw:w-80",
218
- children: [/* @__PURE__ */ _(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__ */ _(a, {
236
+ children: [/* @__PURE__ */ h(he, { 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, {
219
237
  className: "ttw:pl-9",
220
238
  type: "search",
221
239
  "aria-label": Z.searchLabel,
222
240
  placeholder: Z.searchPlaceholder,
223
- value: M,
224
- onChange: (e) => N(e.target.value)
241
+ value: N,
242
+ onChange: (e) => xe(e.target.value)
225
243
  })]
226
- }), be = P ? /* @__PURE__ */ _(m, {
244
+ }), Te = P ? /* @__PURE__ */ h(ue, {
227
245
  ...P,
228
246
  className: "ttw:px-4",
229
247
  searchSlot: $
230
- }) : /* @__PURE__ */ _("div", {
248
+ }) : /* @__PURE__ */ h("div", {
231
249
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
232
250
  children: $
233
251
  });
234
- return /* @__PURE__ */ v("div", {
252
+ return /* @__PURE__ */ g("div", {
235
253
  className: "ttw:flex ttw:flex-col ttw:gap-3",
236
- children: [Y ? /* @__PURE__ */ v(e, {
254
+ children: [Y ? /* @__PURE__ */ g(e, {
237
255
  className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
238
256
  children: [
239
- /* @__PURE__ */ _(ae, {}),
240
- /* @__PURE__ */ _(t, {
257
+ /* @__PURE__ */ h(fe, {}),
258
+ /* @__PURE__ */ h(t, {
241
259
  className: "ttw:flex-1",
242
260
  children: Y
243
261
  }),
244
- X ? /* @__PURE__ */ _(n, {
262
+ X ? /* @__PURE__ */ h(n, {
245
263
  type: "button",
246
264
  variant: "outline",
247
265
  className: "ttw:text-foreground",
@@ -249,81 +267,81 @@ function x({ rows: x, isLoading: S, isError: C, sorting: fe, onSortingChange: pe
249
267
  children: Z.duplicateBillsReviewButton
250
268
  }) : null
251
269
  ]
252
- }) : null, /* @__PURE__ */ v(o, {
253
- value: A,
254
- onValueChange: j,
270
+ }) : null, /* @__PURE__ */ g(te, {
271
+ value: j,
272
+ onValueChange: M,
255
273
  className: "ttw:flex ttw:flex-col ttw:gap-4",
256
- children: [/* @__PURE__ */ v("div", {
274
+ children: [/* @__PURE__ */ g("div", {
257
275
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
258
- children: [/* @__PURE__ */ _(te, {
276
+ children: [/* @__PURE__ */ h(o, {
259
277
  "aria-label": Z.filterTabsLabel,
260
- children: k.map((e) => /* @__PURE__ */ v(ne, {
278
+ children: A.map((e) => /* @__PURE__ */ g(s, {
261
279
  value: e.id,
262
280
  className: "ttw:min-w-28",
263
281
  children: [e.icon, e.label]
264
282
  }, e.id))
265
- }), z ? /* @__PURE__ */ v(n, {
283
+ }), z ? /* @__PURE__ */ g(n, {
266
284
  onClick: z,
267
- children: [/* @__PURE__ */ _(se, { className: "ttw:size-4" }), Z.createButton]
285
+ children: [/* @__PURE__ */ h(me, { className: "ttw:size-4" }), Z.createButton]
268
286
  }) : null]
269
287
  }), (() => {
270
- let e = C ? /* @__PURE__ */ _(c, {
288
+ let e = x ? /* @__PURE__ */ h(oe, {
271
289
  title: Z.errorTitle,
272
290
  description: Z.errorDescription,
273
291
  retryLabel: B ? Z.errorRetry : void 0,
274
292
  onRetry: B
275
- }) : ye && z && V ? /* @__PURE__ */ _("div", {
293
+ }) : we && z && V ? /* @__PURE__ */ h("div", {
276
294
  className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
277
- children: K && q ? /* @__PURE__ */ _(l, {
295
+ children: K && q ? /* @__PURE__ */ h(l, {
278
296
  emailAddress: K,
279
297
  onCopyEmail: q,
280
298
  onFilesSelected: V,
281
- accept: p,
299
+ accept: f,
282
300
  maxFiles: H,
283
301
  uploadStatus: W,
284
302
  uploadErrorMessage: G,
285
303
  onEnterManually: U ?? z,
286
304
  labels: Z.addBill
287
- }) : /* @__PURE__ */ _(l, {
305
+ }) : /* @__PURE__ */ h(l, {
288
306
  onFilesSelected: V,
289
- accept: p,
307
+ accept: f,
290
308
  maxFiles: H,
291
309
  uploadStatus: W,
292
310
  uploadErrorMessage: G,
293
311
  onEnterManually: U ?? z,
294
312
  labels: Z.addBill
295
313
  })
296
- }) : /* @__PURE__ */ _(r, {
297
- columns: ve,
298
- data: x,
299
- isLoading: S,
300
- sorting: fe,
301
- onSortingChange: pe,
302
- pageSize: me,
303
- onPageSizeChange: he,
314
+ }) : /* @__PURE__ */ h(r, {
315
+ columns: Ce,
316
+ data: y,
317
+ isLoading: b,
318
+ sorting: ye,
319
+ onSortingChange: be,
320
+ pageSize: S,
321
+ onPageSizeChange: C,
304
322
  pageSizeOptions: w,
305
- pageInfo: ge,
306
- hasNextPage: T,
307
- hasPrevPage: E,
308
- onNextPage: D,
309
- onPrevPage: O,
323
+ pageInfo: T,
324
+ hasNextPage: E,
325
+ hasPrevPage: D,
326
+ onNextPage: O,
327
+ onPrevPage: k,
310
328
  onRowClick: (e) => e.onOpen(),
311
- filterComponent: be,
312
- children: L ? /* @__PURE__ */ _(s, {
329
+ filterComponent: Te,
330
+ children: L ? /* @__PURE__ */ h(c, {
313
331
  title: Z.filteredEmptyTitle,
314
332
  description: Z.filteredEmptyDescription
315
- }) : R ? /* @__PURE__ */ _(s, {
333
+ }) : R ? /* @__PURE__ */ h(c, {
316
334
  title: R.title,
317
335
  description: R.description
318
336
  }) : void 0
319
337
  });
320
- return k.map((t) => /* @__PURE__ */ _(ee, {
338
+ return A.map((t) => /* @__PURE__ */ h(a, {
321
339
  value: t.id,
322
- children: t.id === A ? e : null
340
+ children: t.id === j ? e : null
323
341
  }, t.id));
324
342
  })()]
325
343
  })]
326
344
  });
327
345
  }
328
346
  //#endregion
329
- export { x as BillsScreen, x as default, b as DEFAULT_BILL_COLUMNS };
347
+ export { y as BillsScreen, y as default, v as DEFAULT_BILL_COLUMNS };