@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.
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +59 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +163 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +39 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +156 -138
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
CHANGED
|
@@ -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 {
|
|
12
|
-
import {
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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:
|
|
22
|
-
order:
|
|
21
|
+
object_type: s,
|
|
22
|
+
order: o
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
return
|
|
26
|
-
...a(m,
|
|
25
|
+
return f({
|
|
26
|
+
...a(m, d),
|
|
27
27
|
enabled: p
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
function
|
|
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
|
|
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
|
|
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
|
|
69
|
+
function g() {
|
|
52
70
|
let { client: n, organizationId: i } = e();
|
|
53
|
-
return
|
|
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
|
|
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 {
|
|
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",
|
|
@@ -1,247 +1,265 @@
|
|
|
1
|
-
import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
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
|
|
7
|
+
import { BillStatusBadge as se } from "./index20.js";
|
|
8
8
|
import "./index21.js";
|
|
9
|
-
import { DueDateValue as
|
|
9
|
+
import { DueDateValue as ce } from "./index23.js";
|
|
10
10
|
import "./index24.js";
|
|
11
|
-
import { MissingValue as
|
|
11
|
+
import { MissingValue as u } from "./index53.js";
|
|
12
12
|
import "./index54.js";
|
|
13
|
-
import { BILLS_SCREEN_LABELS_EN as
|
|
14
|
-
import { BillDuplicateBadge as
|
|
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
|
|
16
|
+
import { BillsFilterBar as ue } from "./index64.js";
|
|
17
17
|
import "./index65.js";
|
|
18
|
-
import { BillColumn as
|
|
19
|
-
import { useMemo as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { ChevronRightIcon as
|
|
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
|
|
23
|
+
var ge = [
|
|
24
24
|
10,
|
|
25
25
|
25,
|
|
26
26
|
50,
|
|
27
27
|
100
|
|
28
|
-
],
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
48
|
-
let Z =
|
|
49
|
-
...
|
|
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
|
-
...
|
|
54
|
+
...d.statusBadge,
|
|
53
55
|
...J?.statusBadge
|
|
54
56
|
},
|
|
55
57
|
addBill: {
|
|
56
|
-
...
|
|
58
|
+
...d.addBill,
|
|
57
59
|
...J?.addBill,
|
|
58
60
|
dropzone: {
|
|
59
|
-
...
|
|
61
|
+
...d.addBill.dropzone,
|
|
60
62
|
...J?.addBill?.dropzone
|
|
61
63
|
}
|
|
62
64
|
},
|
|
63
65
|
sortableHeader: {
|
|
64
|
-
...
|
|
66
|
+
...d.sortableHeader,
|
|
65
67
|
...J?.sortableHeader
|
|
66
68
|
},
|
|
67
69
|
missingValue: {
|
|
68
|
-
...
|
|
70
|
+
...d.missingValue,
|
|
69
71
|
...J?.missingValue
|
|
70
72
|
},
|
|
71
73
|
dueDate: {
|
|
72
|
-
...
|
|
74
|
+
...d.dueDate,
|
|
73
75
|
...J?.dueDate
|
|
74
76
|
}
|
|
75
|
-
}), [J]), Q =
|
|
77
|
+
}), [J]), Q = m(() => {
|
|
76
78
|
let e = (e) => function({ column: t }) {
|
|
77
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
85
|
+
return /* @__PURE__ */ h("span", {
|
|
84
86
|
"data-testid": I?.[t],
|
|
85
|
-
children: n.original[e] || /* @__PURE__ */
|
|
87
|
+
children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
|
|
86
88
|
});
|
|
87
89
|
}, n = function({ row: e }) {
|
|
88
|
-
return /* @__PURE__ */
|
|
89
|
-
"data-testid": I?.[
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
-
value: e.original.dueDateLabel || /* @__PURE__ */
|
|
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__ */
|
|
99
|
+
return /* @__PURE__ */ h("div", {
|
|
98
100
|
className: "ttw:text-right",
|
|
99
101
|
"data-testid": I?.[t],
|
|
100
|
-
children: n.original[e] || /* @__PURE__ */
|
|
102
|
+
children: n.original[e] || /* @__PURE__ */ h(u, { labels: Z.missingValue })
|
|
101
103
|
});
|
|
102
|
-
},
|
|
103
|
-
return /* @__PURE__ */
|
|
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
|
-
[
|
|
111
|
+
[p.Vendor]: {
|
|
110
112
|
accessorKey: "vendorLabel",
|
|
111
113
|
enableSorting: !0,
|
|
112
|
-
minSize:
|
|
114
|
+
minSize: _e,
|
|
113
115
|
header: e(Z.columnVendor),
|
|
114
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
[
|
|
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",
|
|
146
|
+
cell: t("issueDateLabel", p.IssueDate)
|
|
129
147
|
},
|
|
130
|
-
[
|
|
148
|
+
[p.DueDate]: {
|
|
131
149
|
accessorKey: "dueDateLabel",
|
|
132
150
|
enableSorting: !0,
|
|
133
151
|
header: e(Z.columnDueDate),
|
|
134
152
|
cell: n
|
|
135
153
|
},
|
|
136
|
-
[
|
|
154
|
+
[p.ScheduledDate]: {
|
|
137
155
|
accessorKey: "scheduledDateLabel",
|
|
138
156
|
enableSorting: !0,
|
|
139
157
|
header: e(Z.columnScheduledDate),
|
|
140
|
-
cell: t("scheduledDateLabel",
|
|
158
|
+
cell: t("scheduledDateLabel", p.ScheduledDate)
|
|
141
159
|
},
|
|
142
|
-
[
|
|
160
|
+
[p.PaidDate]: {
|
|
143
161
|
accessorKey: "paidDateLabel",
|
|
144
162
|
enableSorting: !1,
|
|
145
163
|
header: Z.columnPaidDate,
|
|
146
|
-
cell: t("paidDateLabel",
|
|
164
|
+
cell: t("paidDateLabel", p.PaidDate)
|
|
147
165
|
},
|
|
148
|
-
[
|
|
166
|
+
[p.Status]: {
|
|
149
167
|
accessorKey: "status",
|
|
150
168
|
enableSorting: !1,
|
|
151
169
|
header: Z.columnStatus,
|
|
152
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
170
|
+
cell: ({ row: e }) => /* @__PURE__ */ g("div", {
|
|
153
171
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
154
|
-
"data-testid": I?.[
|
|
155
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
177
|
+
}), e.original.duplicateBadge ? /* @__PURE__ */ h(le, { ...e.original.duplicateBadge }) : null]
|
|
160
178
|
})
|
|
161
179
|
},
|
|
162
|
-
[
|
|
180
|
+
[p.AmountDue]: {
|
|
163
181
|
accessorKey: "amountDueLabel",
|
|
164
182
|
enableSorting: !1,
|
|
165
|
-
header:
|
|
166
|
-
cell: r("amountDueLabel",
|
|
183
|
+
header: i(Z.columnAmountDue),
|
|
184
|
+
cell: r("amountDueLabel", p.AmountDue)
|
|
167
185
|
},
|
|
168
|
-
[
|
|
186
|
+
[p.AmountScheduled]: {
|
|
169
187
|
accessorKey: "amountScheduledLabel",
|
|
170
188
|
enableSorting: !1,
|
|
171
|
-
header:
|
|
172
|
-
cell: r("amountScheduledLabel",
|
|
189
|
+
header: i(Z.columnAmountScheduled),
|
|
190
|
+
cell: r("amountScheduledLabel", p.AmountScheduled)
|
|
173
191
|
},
|
|
174
|
-
[
|
|
192
|
+
[p.AmountPaid]: {
|
|
175
193
|
accessorKey: "amountPaidLabel",
|
|
176
194
|
enableSorting: !1,
|
|
177
|
-
header:
|
|
178
|
-
cell: r("amountPaidLabel",
|
|
195
|
+
header: i(Z.columnAmountPaid),
|
|
196
|
+
cell: r("amountPaidLabel", p.AmountPaid)
|
|
179
197
|
},
|
|
180
|
-
[
|
|
198
|
+
[p.TotalAmount]: {
|
|
181
199
|
accessorKey: "totalAmountLabel",
|
|
182
200
|
enableSorting: !1,
|
|
183
|
-
header:
|
|
184
|
-
cell: r("totalAmountLabel",
|
|
201
|
+
header: i(Z.columnTotalAmount),
|
|
202
|
+
cell: r("totalAmountLabel", p.TotalAmount)
|
|
185
203
|
},
|
|
186
|
-
[
|
|
204
|
+
[p.AddedOn]: {
|
|
187
205
|
accessorKey: "addedOnLabel",
|
|
188
206
|
enableSorting: !0,
|
|
189
207
|
header: e(Z.columnAddedOn),
|
|
190
|
-
cell: t("addedOnLabel",
|
|
208
|
+
cell: t("addedOnLabel", p.AddedOn)
|
|
191
209
|
}
|
|
192
210
|
};
|
|
193
|
-
}, [Z, I]),
|
|
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__ */
|
|
214
|
+
header: () => /* @__PURE__ */ h("span", {
|
|
197
215
|
className: "ttw:sr-only",
|
|
198
216
|
children: Z.columnActions
|
|
199
217
|
}),
|
|
200
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
218
|
+
cell: ({ row: e }) => /* @__PURE__ */ h("div", {
|
|
201
219
|
className: "ttw:flex ttw:justify-end",
|
|
202
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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
|
-
]),
|
|
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__ */
|
|
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:
|
|
224
|
-
onChange: (e) =>
|
|
241
|
+
value: N,
|
|
242
|
+
onChange: (e) => xe(e.target.value)
|
|
225
243
|
})]
|
|
226
|
-
}),
|
|
244
|
+
}), Te = P ? /* @__PURE__ */ h(ue, {
|
|
227
245
|
...P,
|
|
228
246
|
className: "ttw:px-4",
|
|
229
247
|
searchSlot: $
|
|
230
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
252
|
+
return /* @__PURE__ */ g("div", {
|
|
235
253
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
236
|
-
children: [Y ? /* @__PURE__ */
|
|
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__ */
|
|
240
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ h(fe, {}),
|
|
258
|
+
/* @__PURE__ */ h(t, {
|
|
241
259
|
className: "ttw:flex-1",
|
|
242
260
|
children: Y
|
|
243
261
|
}),
|
|
244
|
-
X ? /* @__PURE__ */
|
|
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__ */
|
|
253
|
-
value:
|
|
254
|
-
onValueChange:
|
|
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__ */
|
|
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__ */
|
|
276
|
+
children: [/* @__PURE__ */ h(o, {
|
|
259
277
|
"aria-label": Z.filterTabsLabel,
|
|
260
|
-
children:
|
|
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__ */
|
|
283
|
+
}), z ? /* @__PURE__ */ g(n, {
|
|
266
284
|
onClick: z,
|
|
267
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ h(me, { className: "ttw:size-4" }), Z.createButton]
|
|
268
286
|
}) : null]
|
|
269
287
|
}), (() => {
|
|
270
|
-
let e =
|
|
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
|
-
}) :
|
|
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__ */
|
|
295
|
+
children: K && q ? /* @__PURE__ */ h(l, {
|
|
278
296
|
emailAddress: K,
|
|
279
297
|
onCopyEmail: q,
|
|
280
298
|
onFilesSelected: V,
|
|
281
|
-
accept:
|
|
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__ */
|
|
305
|
+
}) : /* @__PURE__ */ h(l, {
|
|
288
306
|
onFilesSelected: V,
|
|
289
|
-
accept:
|
|
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__ */
|
|
297
|
-
columns:
|
|
298
|
-
data:
|
|
299
|
-
isLoading:
|
|
300
|
-
sorting:
|
|
301
|
-
onSortingChange:
|
|
302
|
-
pageSize:
|
|
303
|
-
onPageSizeChange:
|
|
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:
|
|
306
|
-
hasNextPage:
|
|
307
|
-
hasPrevPage:
|
|
308
|
-
onNextPage:
|
|
309
|
-
onPrevPage:
|
|
323
|
+
pageInfo: T,
|
|
324
|
+
hasNextPage: E,
|
|
325
|
+
hasPrevPage: D,
|
|
326
|
+
onNextPage: O,
|
|
327
|
+
onPrevPage: k,
|
|
310
328
|
onRowClick: (e) => e.onOpen(),
|
|
311
|
-
filterComponent:
|
|
312
|
-
children: L ? /* @__PURE__ */
|
|
329
|
+
filterComponent: Te,
|
|
330
|
+
children: L ? /* @__PURE__ */ h(c, {
|
|
313
331
|
title: Z.filteredEmptyTitle,
|
|
314
332
|
description: Z.filteredEmptyDescription
|
|
315
|
-
}) : R ? /* @__PURE__ */
|
|
333
|
+
}) : R ? /* @__PURE__ */ h(c, {
|
|
316
334
|
title: R.title,
|
|
317
335
|
description: R.description
|
|
318
336
|
}) : void 0
|
|
319
337
|
});
|
|
320
|
-
return
|
|
338
|
+
return A.map((t) => /* @__PURE__ */ h(a, {
|
|
321
339
|
value: t.id,
|
|
322
|
-
children: t.id ===
|
|
340
|
+
children: t.id === j ? e : null
|
|
323
341
|
}, t.id));
|
|
324
342
|
})()]
|
|
325
343
|
})]
|
|
326
344
|
});
|
|
327
345
|
}
|
|
328
346
|
//#endregion
|
|
329
|
-
export {
|
|
347
|
+
export { y as BillsScreen, y as default, v as DEFAULT_BILL_COLUMNS };
|