@tesouro/embedded-components-react 0.11.180 → 0.11.183
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/README.md +5 -0
- package/dist/index.css +22 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +82 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index12.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index13.js +261 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +23 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +450 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +286 -442
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +4 -300
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +37 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index20.js +1 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +88 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +17 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index10.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +263 -262
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionStrip.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js +33 -0
- package/package.json +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index21.js +0 -1
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js
CHANGED
|
@@ -1,288 +1,289 @@
|
|
|
1
|
-
import { Button as e, ContextMenuItem as t, DataTable as n, DataTableSortableHeader as r, Input as i, Separator as a, Skeleton as ee, Tabs as o, TabsContent as
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
4
|
-
import { DateDisclosure as
|
|
5
|
-
import { DueDateText as
|
|
1
|
+
import { Button as e, ContextMenuItem as t, DataTable as n, DataTableSortableHeader as r, Input as i, Separator as a, Skeleton as ee, Tabs as o, TabsContent as te, TabsList as s, TabsTrigger as ne, Tooltip as re, TooltipContent as ie, TooltipProvider as ae, TooltipTrigger as oe } 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 se } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
|
+
import { DateDisclosure as ce } from "../../../../shared/ui/dist/lib/DateDisclosure/DateDisclosure.js";
|
|
5
|
+
import { DueDateText as le } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
|
|
6
|
+
import { AttentionStrip as ue } from "../../../../shared/ui/dist/lib/AttentionStrip/AttentionStrip.js";
|
|
7
|
+
import { AttentionViewBar as de } from "../../../../shared/ui/dist/lib/AttentionStrip/AttentionViewBar.js";
|
|
6
8
|
import "../../../../shared/ui/dist/index.js";
|
|
7
|
-
import { BillStatusBadge as
|
|
9
|
+
import { BillStatusBadge as fe } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
8
10
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
9
|
-
import { BillDuplicateIcon as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { getAcceptedBillUploadFiles as pe } from "../../../ui/dist/index17.js";
|
|
11
|
+
import { BillDuplicateIcon as l } from "../../../ui/dist/index6.js";
|
|
12
|
+
import { BillOverflowMenu as pe } from "../../../ui/dist/index11.js";
|
|
13
|
+
import { getAcceptedBillUploadFiles as me } from "../../../ui/dist/index17.js";
|
|
13
14
|
import "../../../ui/dist/index.js";
|
|
14
|
-
import { AddBillPanel as
|
|
15
|
+
import { AddBillPanel as he } from "./index3.js";
|
|
15
16
|
import "./index4.js";
|
|
16
|
-
import { BillsFilterBar as
|
|
17
|
+
import { BillsFilterBar as ge } from "./index10.js";
|
|
17
18
|
import "./index11.js";
|
|
18
|
-
import { MissingValue as
|
|
19
|
+
import { MissingValue as u } from "./index13.js";
|
|
19
20
|
import "./index14.js";
|
|
20
|
-
import { NoValue as
|
|
21
|
+
import { NoValue as _e } from "./index16.js";
|
|
21
22
|
import "./index17.js";
|
|
22
|
-
import { BILLS_SCREEN_LABELS_EN as
|
|
23
|
-
import { BillColumn as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import { createPortal as
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import { PaperclipIcon as
|
|
23
|
+
import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index18.js";
|
|
24
|
+
import { BillColumn as p } from "./index19.js";
|
|
25
|
+
import { Fragment as ve, useMemo as m, useState as ye } from "react";
|
|
26
|
+
import { createPortal as be } from "react-dom";
|
|
27
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
28
|
+
import { PaperclipIcon as xe, SearchIcon as Se, UploadIcon as Ce } from "lucide-react";
|
|
28
29
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js
|
|
29
|
-
var
|
|
30
|
+
var we = [
|
|
30
31
|
10,
|
|
31
32
|
25,
|
|
32
33
|
50,
|
|
33
34
|
100
|
|
34
|
-
],
|
|
35
|
-
function
|
|
35
|
+
], Te = 240;
|
|
36
|
+
function Ee(e, t) {
|
|
36
37
|
return e === "resolving" ? t.vendorResolving : e === "unavailable" ? t.vendorUnavailable : t.missingValue.missing;
|
|
37
38
|
}
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
],
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
39
|
+
var v = 40, De = 56, Oe = [
|
|
40
|
+
p.Vendor,
|
|
41
|
+
p.InvoiceNumber,
|
|
42
|
+
p.Attachment,
|
|
43
|
+
p.IssueDate,
|
|
44
|
+
p.DueDate,
|
|
45
|
+
p.ScheduledDate,
|
|
46
|
+
p.PaidDate,
|
|
47
|
+
p.Status,
|
|
48
|
+
p.AmountDue,
|
|
49
|
+
p.AmountScheduled,
|
|
50
|
+
p.AmountPaid,
|
|
51
|
+
p.TotalAmount,
|
|
52
|
+
p.AddedOn
|
|
53
|
+
], y = [
|
|
54
|
+
p.Vendor,
|
|
55
|
+
p.Attachment,
|
|
56
|
+
p.DueDate,
|
|
57
|
+
p.Status,
|
|
58
|
+
p.AmountDue,
|
|
59
|
+
p.AddedOn
|
|
59
60
|
];
|
|
60
|
-
function
|
|
61
|
-
let J =
|
|
62
|
-
...
|
|
61
|
+
function b({ rows: b, isLoading: x, isError: S, sorting: ke, onSortingChange: Ae, pageSize: je, onPageSizeChange: Me, pageSizeOptions: C = we, pageInfo: Ne, hasNextPage: w, hasPrevPage: T, onNextPage: Pe, onPrevPage: Fe, filterTabs: E, selectedFilterTabId: D, onFilterTabChange: Ie, searchValue: Le, onSearchChange: Re, filters: O, visibleColumns: k = y, keepsColumnOrder: A = !1, isSortable: j = !0, cellTestIds: M, isSearchActive: N, showAddPanelWhenEmpty: ze, emptyState: P, onCreateClick: F, headerActionContainer: I, onRetry: L, onFilesSelected: R, maxFiles: z, onEnterManually: B, uploadStatus: V, uploadErrorMessage: H, emailAddress: U, onCopyEmail: W, labels: G, attentionStrip: K, attentionView: q }) {
|
|
62
|
+
let J = m(() => ({
|
|
63
|
+
...d,
|
|
63
64
|
...G,
|
|
64
65
|
statusBadge: {
|
|
65
|
-
...
|
|
66
|
+
...d.statusBadge,
|
|
66
67
|
...G?.statusBadge
|
|
67
68
|
},
|
|
68
69
|
addBill: {
|
|
69
|
-
...
|
|
70
|
+
...d.addBill,
|
|
70
71
|
...G?.addBill,
|
|
71
72
|
dropzone: {
|
|
72
|
-
...
|
|
73
|
+
...d.addBill.dropzone,
|
|
73
74
|
...G?.addBill?.dropzone
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
sortableHeader: {
|
|
77
|
-
...
|
|
78
|
+
...d.sortableHeader,
|
|
78
79
|
...G?.sortableHeader
|
|
79
80
|
},
|
|
80
81
|
missingValue: {
|
|
81
|
-
...
|
|
82
|
+
...d.missingValue,
|
|
82
83
|
...G?.missingValue
|
|
83
84
|
},
|
|
84
85
|
noValue: {
|
|
85
|
-
...
|
|
86
|
+
...d.noValue,
|
|
86
87
|
...G?.noValue
|
|
87
88
|
}
|
|
88
|
-
}), [G]),
|
|
89
|
-
|
|
90
|
-
}, He = (e) => {
|
|
91
|
-
Z && Be(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", X(!0));
|
|
92
|
-
}, Ue = (e) => {
|
|
93
|
-
!e.currentTarget.contains(e.relatedTarget) && Z && X(!1);
|
|
89
|
+
}), [G]), Be = b.some((e) => e.menu?.items.length), [Ve, Y] = ye(!1), X = !!R, He = (e) => Array.from(e.dataTransfer.types).includes("Files"), Ue = (e) => {
|
|
90
|
+
X && He(e) && (e.preventDefault(), Y(!0));
|
|
94
91
|
}, We = (e) => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
92
|
+
X && He(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", Y(!0));
|
|
93
|
+
}, Ge = (e) => {
|
|
94
|
+
!e.currentTarget.contains(e.relatedTarget) && X && Y(!1);
|
|
95
|
+
}, Ke = (e) => {
|
|
96
|
+
if (!X) return;
|
|
97
|
+
e.preventDefault(), Y(!1);
|
|
98
|
+
let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = me(t, f, z !== 1);
|
|
98
99
|
n.length && R?.(n);
|
|
99
|
-
},
|
|
100
|
+
}, Z = m(() => {
|
|
100
101
|
let e = (e) => j ? function({ column: t }) {
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ g(r, {
|
|
102
103
|
column: t,
|
|
103
104
|
title: e,
|
|
104
105
|
labels: J.sortableHeader
|
|
105
106
|
});
|
|
106
|
-
} : e, t = (e, t, n = /* @__PURE__ */
|
|
107
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
108
|
-
return /* @__PURE__ */
|
|
107
|
+
} : e, t = (e, t, n = /* @__PURE__ */ g(u, { labels: J.missingValue }), r) => function({ row: i }) {
|
|
108
|
+
let a = r && i.original[r] ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : n;
|
|
109
|
+
return /* @__PURE__ */ g("span", {
|
|
109
110
|
className: "ttw:whitespace-nowrap",
|
|
110
111
|
"data-testid": M?.[t],
|
|
111
112
|
children: i.original[e] || a
|
|
112
113
|
});
|
|
113
|
-
}, n = t("invoiceNumberLabel",
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
}, n = t("invoiceNumberLabel", p.InvoiceNumber), i = function({ row: e }) {
|
|
115
|
+
return /* @__PURE__ */ g("span", {
|
|
115
116
|
className: "ttw:whitespace-nowrap",
|
|
116
|
-
"data-testid": M?.[
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
label: e.original.dueDateLabel || /* @__PURE__ */
|
|
117
|
+
"data-testid": M?.[p.DueDate],
|
|
118
|
+
children: /* @__PURE__ */ g(le, {
|
|
119
|
+
label: e.original.dueDateLabel || /* @__PURE__ */ g(u, { labels: J.missingValue }),
|
|
119
120
|
overdueLabel: e.original.dueDateOverdueLabel,
|
|
120
121
|
accessibleLabel: e.original.dueDateAccessibleLabel
|
|
121
122
|
})
|
|
122
123
|
});
|
|
123
|
-
}, a = (e, t, n = /* @__PURE__ */
|
|
124
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
125
|
-
return /* @__PURE__ */
|
|
124
|
+
}, a = (e, t, n = /* @__PURE__ */ g(u, { labels: J.missingValue }), r) => function({ row: i }) {
|
|
125
|
+
let a = r && i.original[r] ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : n;
|
|
126
|
+
return /* @__PURE__ */ g("div", {
|
|
126
127
|
className: "ttw:text-right ttw:whitespace-nowrap",
|
|
127
128
|
"data-testid": M?.[t],
|
|
128
129
|
children: i.original[e] || a
|
|
129
130
|
});
|
|
130
|
-
}, o = /* @__PURE__ */
|
|
131
|
-
function
|
|
132
|
-
let t = e.original.scheduledDateIsGap ? /* @__PURE__ */
|
|
133
|
-
return /* @__PURE__ */
|
|
131
|
+
}, o = /* @__PURE__ */ g(_e, { labels: J.noValue });
|
|
132
|
+
function te({ row: e }) {
|
|
133
|
+
let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ g(u, { labels: J.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
|
|
134
|
+
return /* @__PURE__ */ g("span", {
|
|
134
135
|
className: "ttw:whitespace-nowrap",
|
|
135
|
-
"data-testid": M?.[
|
|
136
|
-
children: n && r ? /* @__PURE__ */
|
|
136
|
+
"data-testid": M?.[p.ScheduledDate],
|
|
137
|
+
children: n && r ? /* @__PURE__ */ g(ce, {
|
|
137
138
|
date: r,
|
|
138
139
|
children: n
|
|
139
140
|
}) : n || t
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
|
-
let
|
|
143
|
-
return /* @__PURE__ */
|
|
143
|
+
let s = (e) => function() {
|
|
144
|
+
return /* @__PURE__ */ g("div", {
|
|
144
145
|
className: "ttw:text-right",
|
|
145
146
|
children: e
|
|
146
147
|
});
|
|
147
148
|
};
|
|
148
149
|
return {
|
|
149
|
-
[
|
|
150
|
+
[p.Vendor]: {
|
|
150
151
|
accessorKey: "vendorLabel",
|
|
151
152
|
enableSorting: j,
|
|
152
|
-
minSize:
|
|
153
|
+
minSize: Te,
|
|
153
154
|
header: e(J.columnVendor),
|
|
154
155
|
cell: ({ row: e }) => {
|
|
155
|
-
let t = e.original.rowNote ? /* @__PURE__ */
|
|
156
|
+
let t = e.original.rowNote ? /* @__PURE__ */ g("span", {
|
|
156
157
|
className: "ttw:sr-only",
|
|
157
158
|
children: ` ${e.original.rowNote}`
|
|
158
159
|
}) : null;
|
|
159
|
-
return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */
|
|
160
|
-
"data-testid": M?.[
|
|
161
|
-
children: [/* @__PURE__ */
|
|
160
|
+
return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */ _("div", {
|
|
161
|
+
"data-testid": M?.[p.Vendor],
|
|
162
|
+
children: [/* @__PURE__ */ g(ee, {
|
|
162
163
|
className: "ttw:h-4 ttw:w-32",
|
|
163
164
|
"aria-hidden": !0
|
|
164
165
|
}), t]
|
|
165
|
-
}) : /* @__PURE__ */
|
|
166
|
+
}) : /* @__PURE__ */ _("span", {
|
|
166
167
|
className: "ttw:inline-flex ttw:items-center ttw:gap-2",
|
|
167
|
-
"data-testid": M?.[
|
|
168
|
-
children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */
|
|
168
|
+
"data-testid": M?.[p.Vendor],
|
|
169
|
+
children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ g(_e, { labels: { none: J.vendorUnavailable } }) : /* @__PURE__ */ g(u, { labels: J.missingValue })), t]
|
|
169
170
|
});
|
|
170
171
|
}
|
|
171
172
|
},
|
|
172
|
-
[
|
|
173
|
+
[p.InvoiceNumber]: {
|
|
173
174
|
accessorKey: "invoiceNumberLabel",
|
|
174
175
|
enableSorting: !1,
|
|
175
176
|
header: () => J.columnInvoiceNumber,
|
|
176
|
-
cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */
|
|
177
|
+
cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ _("span", {
|
|
177
178
|
className: "ttw:relative",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ g(l, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
|
|
179
180
|
}) : n(e)
|
|
180
181
|
},
|
|
181
|
-
[
|
|
182
|
+
[p.Attachment]: {
|
|
182
183
|
accessorKey: "attachment",
|
|
183
184
|
enableSorting: !1,
|
|
184
|
-
size:
|
|
185
|
-
minSize:
|
|
186
|
-
header: () => /* @__PURE__ */
|
|
185
|
+
size: v,
|
|
186
|
+
minSize: v,
|
|
187
|
+
header: () => /* @__PURE__ */ g("span", {
|
|
187
188
|
className: "ttw:sr-only",
|
|
188
189
|
children: J.columnAttachment
|
|
189
190
|
}),
|
|
190
|
-
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */
|
|
191
|
+
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ g("div", {
|
|
191
192
|
className: "ttw:flex ttw:justify-center",
|
|
192
|
-
"data-testid": M?.[
|
|
193
|
-
children: /* @__PURE__ */
|
|
193
|
+
"data-testid": M?.[p.Attachment],
|
|
194
|
+
children: /* @__PURE__ */ g(ae, { children: /* @__PURE__ */ _(re, { children: [/* @__PURE__ */ g(oe, {
|
|
194
195
|
type: "button",
|
|
195
196
|
className: "ttw:inline-flex ttw:cursor-default",
|
|
196
197
|
"aria-label": e.original.attachment.label,
|
|
197
198
|
onClick: (e) => e.stopPropagation(),
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
-
}), /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ g(xe, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
|
|
200
|
+
}), /* @__PURE__ */ g(ie, { children: e.original.attachment.label })] }) })
|
|
200
201
|
}) : null
|
|
201
202
|
},
|
|
202
|
-
[
|
|
203
|
+
[p.IssueDate]: {
|
|
203
204
|
accessorKey: "issueDateLabel",
|
|
204
205
|
enableSorting: j,
|
|
205
206
|
header: e(J.columnIssueDate),
|
|
206
|
-
cell: t("issueDateLabel",
|
|
207
|
+
cell: t("issueDateLabel", p.IssueDate)
|
|
207
208
|
},
|
|
208
|
-
[
|
|
209
|
+
[p.DueDate]: {
|
|
209
210
|
accessorKey: "dueDateLabel",
|
|
210
211
|
enableSorting: j,
|
|
211
212
|
header: e(J.columnDueDate),
|
|
212
213
|
cell: i
|
|
213
214
|
},
|
|
214
|
-
[
|
|
215
|
+
[p.ScheduledDate]: {
|
|
215
216
|
accessorKey: "scheduledDateLabel",
|
|
216
217
|
enableSorting: j,
|
|
217
218
|
header: e(J.columnScheduledDate),
|
|
218
|
-
cell:
|
|
219
|
+
cell: te
|
|
219
220
|
},
|
|
220
|
-
[
|
|
221
|
+
[p.PaidDate]: {
|
|
221
222
|
accessorKey: "paidDateLabel",
|
|
222
223
|
enableSorting: !1,
|
|
223
224
|
header: J.columnPaidDate,
|
|
224
|
-
cell: t("paidDateLabel",
|
|
225
|
+
cell: t("paidDateLabel", p.PaidDate)
|
|
225
226
|
},
|
|
226
|
-
[
|
|
227
|
+
[p.Status]: {
|
|
227
228
|
accessorKey: "status",
|
|
228
229
|
enableSorting: !1,
|
|
229
230
|
header: J.columnStatus,
|
|
230
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
231
|
+
cell: ({ row: e }) => /* @__PURE__ */ g("div", {
|
|
231
232
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
232
|
-
"data-testid": M?.[
|
|
233
|
-
children: /* @__PURE__ */
|
|
233
|
+
"data-testid": M?.[p.Status],
|
|
234
|
+
children: /* @__PURE__ */ g(fe, {
|
|
234
235
|
status: e.original.status,
|
|
235
236
|
tone: e.original.statusTone,
|
|
236
237
|
labels: J.statusBadge
|
|
237
238
|
})
|
|
238
239
|
})
|
|
239
240
|
},
|
|
240
|
-
[
|
|
241
|
+
[p.AmountDue]: {
|
|
241
242
|
accessorKey: "amountDueLabel",
|
|
242
243
|
enableSorting: !1,
|
|
243
|
-
header:
|
|
244
|
-
cell: a("amountDueLabel",
|
|
244
|
+
header: s(J.columnAmountDue),
|
|
245
|
+
cell: a("amountDueLabel", p.AmountDue)
|
|
245
246
|
},
|
|
246
|
-
[
|
|
247
|
+
[p.AmountScheduled]: {
|
|
247
248
|
accessorKey: "amountScheduledLabel",
|
|
248
249
|
enableSorting: !1,
|
|
249
|
-
header:
|
|
250
|
-
cell: a("amountScheduledLabel",
|
|
250
|
+
header: s(J.columnAmountScheduled),
|
|
251
|
+
cell: a("amountScheduledLabel", p.AmountScheduled)
|
|
251
252
|
},
|
|
252
|
-
[
|
|
253
|
+
[p.AmountPaid]: {
|
|
253
254
|
accessorKey: "amountPaidLabel",
|
|
254
255
|
enableSorting: !1,
|
|
255
|
-
header:
|
|
256
|
-
cell: a("amountPaidLabel",
|
|
256
|
+
header: s(J.columnAmountPaid),
|
|
257
|
+
cell: a("amountPaidLabel", p.AmountPaid, o, "amountPaidIsGap")
|
|
257
258
|
},
|
|
258
|
-
[
|
|
259
|
+
[p.TotalAmount]: {
|
|
259
260
|
accessorKey: "totalAmountLabel",
|
|
260
261
|
enableSorting: !1,
|
|
261
|
-
header:
|
|
262
|
-
cell: a("totalAmountLabel",
|
|
262
|
+
header: s(J.columnTotalAmount),
|
|
263
|
+
cell: a("totalAmountLabel", p.TotalAmount)
|
|
263
264
|
},
|
|
264
|
-
[
|
|
265
|
+
[p.AddedOn]: {
|
|
265
266
|
accessorKey: "addedOnLabel",
|
|
266
267
|
enableSorting: j,
|
|
267
268
|
header: e(J.columnAddedOn),
|
|
268
|
-
cell: t("addedOnLabel",
|
|
269
|
+
cell: t("addedOnLabel", p.AddedOn)
|
|
269
270
|
}
|
|
270
271
|
};
|
|
271
272
|
}, [
|
|
272
273
|
J,
|
|
273
274
|
M,
|
|
274
275
|
j
|
|
275
|
-
]),
|
|
276
|
+
]), qe = m(() => [...(A ? k : Oe.filter((e) => k.includes(e))).map((e) => Z[e]), ...Be ? [{
|
|
276
277
|
id: "actions",
|
|
277
278
|
enableSorting: !1,
|
|
278
|
-
size:
|
|
279
|
-
header: () => /* @__PURE__ */
|
|
279
|
+
size: De,
|
|
280
|
+
header: () => /* @__PURE__ */ g("span", {
|
|
280
281
|
className: "ttw:sr-only",
|
|
281
282
|
children: J.columnActions
|
|
282
283
|
}),
|
|
283
|
-
cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */
|
|
284
|
+
cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ g("div", {
|
|
284
285
|
className: "ttw:flex ttw:justify-end",
|
|
285
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ g(pe, {
|
|
286
287
|
actions: e.original.menu.items.map((e) => ({
|
|
287
288
|
...e,
|
|
288
289
|
variant: "ghost"
|
|
@@ -292,168 +293,168 @@ function x({ rows: x, isLoading: S, isError: De, sorting: Oe, onSortingChange: k
|
|
|
292
293
|
})
|
|
293
294
|
}) : null
|
|
294
295
|
}] : []], [
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
Z,
|
|
297
|
+
Be,
|
|
297
298
|
A,
|
|
298
299
|
J,
|
|
299
300
|
k
|
|
300
|
-
]),
|
|
301
|
+
]), Je = !!(F && R) && !x && !S && !N && b.length === 0 && ze === !0, Q = F ? /* @__PURE__ */ g(e, {
|
|
301
302
|
onClick: F,
|
|
302
303
|
children: J.createButton
|
|
303
|
-
}) : null,
|
|
304
|
+
}) : null, Ye = /* @__PURE__ */ _("div", {
|
|
304
305
|
className: "ttw:relative ttw:w-80",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ g(Se, { 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(i, {
|
|
306
307
|
className: "ttw:pl-9",
|
|
307
308
|
type: "search",
|
|
308
309
|
"aria-label": J.searchLabel,
|
|
309
310
|
placeholder: J.searchPlaceholder,
|
|
310
|
-
value:
|
|
311
|
-
onChange: (e) =>
|
|
311
|
+
value: Le,
|
|
312
|
+
onChange: (e) => Re(e.target.value)
|
|
312
313
|
})]
|
|
313
|
-
}),
|
|
314
|
+
}), Xe = q ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(de, { ...q }), /* @__PURE__ */ g("div", {
|
|
315
|
+
className: "ttw:ml-auto",
|
|
316
|
+
children: Ye
|
|
317
|
+
})] }) : Ye, Ze = O ? /* @__PURE__ */ g(ge, {
|
|
314
318
|
...O,
|
|
315
319
|
className: "ttw:px-4",
|
|
316
|
-
searchSlot:
|
|
317
|
-
}) : /* @__PURE__ */
|
|
320
|
+
searchSlot: Xe
|
|
321
|
+
}) : /* @__PURE__ */ g("div", {
|
|
318
322
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
319
|
-
children:
|
|
323
|
+
children: Xe
|
|
324
|
+
}), $ = S ? /* @__PURE__ */ g(se, {
|
|
325
|
+
title: J.errorTitle,
|
|
326
|
+
description: J.errorDescription,
|
|
327
|
+
retryLabel: L ? J.errorRetry : void 0,
|
|
328
|
+
onRetry: L
|
|
329
|
+
}) : Je && F && R ? /* @__PURE__ */ g("div", {
|
|
330
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
331
|
+
children: U && W ? /* @__PURE__ */ g(he, {
|
|
332
|
+
emailAddress: U,
|
|
333
|
+
onCopyEmail: W,
|
|
334
|
+
onFilesSelected: R,
|
|
335
|
+
accept: f,
|
|
336
|
+
maxFiles: z,
|
|
337
|
+
uploadStatus: V,
|
|
338
|
+
uploadErrorMessage: H,
|
|
339
|
+
onEnterManually: B ?? F,
|
|
340
|
+
labels: J.addBill
|
|
341
|
+
}) : /* @__PURE__ */ g(he, {
|
|
342
|
+
onFilesSelected: R,
|
|
343
|
+
accept: f,
|
|
344
|
+
maxFiles: z,
|
|
345
|
+
uploadStatus: V,
|
|
346
|
+
uploadErrorMessage: H,
|
|
347
|
+
onEnterManually: B ?? F,
|
|
348
|
+
labels: J.addBill
|
|
349
|
+
})
|
|
350
|
+
}) : /* @__PURE__ */ _("div", {
|
|
351
|
+
className: "ttw:relative",
|
|
352
|
+
onDragEnter: Ue,
|
|
353
|
+
onDragOver: We,
|
|
354
|
+
onDragLeave: Ge,
|
|
355
|
+
onDrop: Ke,
|
|
356
|
+
children: [/* @__PURE__ */ g(n, {
|
|
357
|
+
columns: qe,
|
|
358
|
+
data: b,
|
|
359
|
+
getRowId: (e) => e.rowKey,
|
|
360
|
+
animatesNewRows: !0,
|
|
361
|
+
isLoading: x,
|
|
362
|
+
sorting: ke,
|
|
363
|
+
onSortingChange: Ae,
|
|
364
|
+
pageSize: je,
|
|
365
|
+
onPageSizeChange: Me,
|
|
366
|
+
pageSizeOptions: C,
|
|
367
|
+
showPagination: C.length > 1 || w || T,
|
|
368
|
+
pageInfo: Ne,
|
|
369
|
+
hasNextPage: w,
|
|
370
|
+
hasPrevPage: T,
|
|
371
|
+
onNextPage: Pe,
|
|
372
|
+
onPrevPage: Fe,
|
|
373
|
+
onRowClick: (e) => e.onOpen(),
|
|
374
|
+
rowAriaLabel: (e) => J.openRow(e.vendorLabel || Ee(e.vendorLookup, J)),
|
|
375
|
+
rowGroup: (e) => e.group ? {
|
|
376
|
+
key: e.group.key,
|
|
377
|
+
label: e.group.label,
|
|
378
|
+
tone: "warning",
|
|
379
|
+
icon: /* @__PURE__ */ g(l, {}),
|
|
380
|
+
title: e.group.title,
|
|
381
|
+
meta: e.group.meta,
|
|
382
|
+
collapse: e.group.collapse
|
|
383
|
+
} : void 0,
|
|
384
|
+
rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ g(h, { children: e.menu.items.map((e) => {
|
|
385
|
+
let n = e.icon;
|
|
386
|
+
return /* @__PURE__ */ _(t, {
|
|
387
|
+
disabled: e.disabled,
|
|
388
|
+
onClick: e.onSelect,
|
|
389
|
+
children: [n ? /* @__PURE__ */ g(n, { className: "ttw:size-4" }) : null, e.label]
|
|
390
|
+
}, e.id);
|
|
391
|
+
}) }) : void 0,
|
|
392
|
+
filterComponent: Ze,
|
|
393
|
+
children: N ? /* @__PURE__ */ g(c, {
|
|
394
|
+
title: J.filteredEmptyTitle,
|
|
395
|
+
description: J.filteredEmptyDescription
|
|
396
|
+
}) : P ? /* @__PURE__ */ g(c, {
|
|
397
|
+
title: P.title,
|
|
398
|
+
description: P.description
|
|
399
|
+
}) : void 0
|
|
400
|
+
}), Ve ? /* @__PURE__ */ g("div", {
|
|
401
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
|
|
402
|
+
children: /* @__PURE__ */ _("div", {
|
|
403
|
+
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
|
|
404
|
+
children: [/* @__PURE__ */ g(Ce, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
405
|
+
className: "ttw:text-sm ttw:font-medium",
|
|
406
|
+
children: J.tableDropzoneTitle
|
|
407
|
+
}), /* @__PURE__ */ g("p", {
|
|
408
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
409
|
+
children: z === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(z)}`
|
|
410
|
+
})] })]
|
|
411
|
+
})
|
|
412
|
+
}) : null]
|
|
320
413
|
});
|
|
321
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ _("div", {
|
|
415
|
+
role: "presentation",
|
|
322
416
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
417
|
+
onKeyDown: (e) => {
|
|
418
|
+
q && e.key === "Escape" && !e.defaultPrevented && (e.target.closest("[role=\"menu\"], [role=\"dialog\"], [role=\"alertdialog\"], [role=\"listbox\"], input, textarea, select") || q.onBack());
|
|
419
|
+
},
|
|
323
420
|
children: [
|
|
324
|
-
K ? /* @__PURE__ */
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
children: q.reviewLabel
|
|
333
|
-
}) : null
|
|
334
|
-
}) : null,
|
|
335
|
-
/* @__PURE__ */ v(o, {
|
|
421
|
+
K ? /* @__PURE__ */ g(ue, { ...K }) : null,
|
|
422
|
+
q ? /* @__PURE__ */ _("div", {
|
|
423
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
424
|
+
children: [I === void 0 && Q ? /* @__PURE__ */ g("div", {
|
|
425
|
+
className: "ttw:flex ttw:justify-end",
|
|
426
|
+
children: Q
|
|
427
|
+
}) : null, $]
|
|
428
|
+
}) : /* @__PURE__ */ _(o, {
|
|
336
429
|
value: D,
|
|
337
|
-
onValueChange:
|
|
430
|
+
onValueChange: Ie,
|
|
338
431
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ _("div", {
|
|
340
433
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
434
|
+
children: [/* @__PURE__ */ g(s, {
|
|
342
435
|
variant: "pills",
|
|
343
436
|
"aria-label": J.filterTabsLabel,
|
|
344
|
-
children: E.map((e) => /* @__PURE__ */
|
|
437
|
+
children: E.map((e) => /* @__PURE__ */ _(ve, { children: [e.startsGroup ? /* @__PURE__ */ g(a, {
|
|
345
438
|
orientation: "vertical",
|
|
346
439
|
className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
|
|
347
|
-
}) : null, /* @__PURE__ */
|
|
440
|
+
}) : null, /* @__PURE__ */ g(ne, {
|
|
348
441
|
value: e.id,
|
|
349
442
|
count: e.badge,
|
|
350
443
|
countTone: e.tone,
|
|
351
444
|
className: "ttw:min-w-28",
|
|
352
|
-
children: /* @__PURE__ */
|
|
445
|
+
children: /* @__PURE__ */ g("span", {
|
|
353
446
|
className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
|
|
354
447
|
children: e.label
|
|
355
448
|
})
|
|
356
449
|
})] }, e.id))
|
|
357
450
|
}), I === void 0 ? Q : null]
|
|
358
|
-
}), (() => {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
retryLabel: L ? J.errorRetry : void 0,
|
|
363
|
-
onRetry: L
|
|
364
|
-
}) : qe && F && R ? /* @__PURE__ */ _("div", {
|
|
365
|
-
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
366
|
-
children: U && W ? /* @__PURE__ */ _(u, {
|
|
367
|
-
emailAddress: U,
|
|
368
|
-
onCopyEmail: W,
|
|
369
|
-
onFilesSelected: R,
|
|
370
|
-
accept: m,
|
|
371
|
-
maxFiles: z,
|
|
372
|
-
uploadStatus: V,
|
|
373
|
-
uploadErrorMessage: H,
|
|
374
|
-
onEnterManually: B ?? F,
|
|
375
|
-
labels: J.addBill
|
|
376
|
-
}) : /* @__PURE__ */ _(u, {
|
|
377
|
-
onFilesSelected: R,
|
|
378
|
-
accept: m,
|
|
379
|
-
maxFiles: z,
|
|
380
|
-
uploadStatus: V,
|
|
381
|
-
uploadErrorMessage: H,
|
|
382
|
-
onEnterManually: B ?? F,
|
|
383
|
-
labels: J.addBill
|
|
384
|
-
})
|
|
385
|
-
}) : /* @__PURE__ */ v("div", {
|
|
386
|
-
className: "ttw:relative",
|
|
387
|
-
onDragEnter: Ve,
|
|
388
|
-
onDragOver: He,
|
|
389
|
-
onDragLeave: Ue,
|
|
390
|
-
onDrop: We,
|
|
391
|
-
children: [/* @__PURE__ */ _(n, {
|
|
392
|
-
columns: Ke,
|
|
393
|
-
data: x,
|
|
394
|
-
getRowId: (e) => e.rowKey,
|
|
395
|
-
animatesNewRows: !0,
|
|
396
|
-
isLoading: S,
|
|
397
|
-
sorting: Oe,
|
|
398
|
-
onSortingChange: ke,
|
|
399
|
-
pageSize: Ae,
|
|
400
|
-
onPageSizeChange: je,
|
|
401
|
-
pageSizeOptions: C,
|
|
402
|
-
showPagination: C.length > 1 || w || T,
|
|
403
|
-
pageInfo: Me,
|
|
404
|
-
hasNextPage: w,
|
|
405
|
-
hasPrevPage: T,
|
|
406
|
-
onNextPage: Ne,
|
|
407
|
-
onPrevPage: Pe,
|
|
408
|
-
onRowClick: (e) => e.onOpen(),
|
|
409
|
-
rowAriaLabel: (e) => J.openRow(e.vendorLabel || we(e.vendorLookup, J)),
|
|
410
|
-
rowGroup: (e) => e.group ? {
|
|
411
|
-
key: e.group.key,
|
|
412
|
-
label: e.group.label,
|
|
413
|
-
tone: "warning",
|
|
414
|
-
icon: /* @__PURE__ */ _(ue, {}),
|
|
415
|
-
title: e.group.title,
|
|
416
|
-
meta: e.group.meta,
|
|
417
|
-
collapse: e.group.collapse
|
|
418
|
-
} : void 0,
|
|
419
|
-
rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ _(ve, { children: e.menu.items.map((e) => {
|
|
420
|
-
let n = e.icon;
|
|
421
|
-
return /* @__PURE__ */ v(t, {
|
|
422
|
-
disabled: e.disabled,
|
|
423
|
-
onClick: e.onSelect,
|
|
424
|
-
children: [n ? /* @__PURE__ */ _(n, { className: "ttw:size-4" }) : null, e.label]
|
|
425
|
-
}, e.id);
|
|
426
|
-
}) }) : void 0,
|
|
427
|
-
filterComponent: Je,
|
|
428
|
-
children: N ? /* @__PURE__ */ _(l, {
|
|
429
|
-
title: J.filteredEmptyTitle,
|
|
430
|
-
description: J.filteredEmptyDescription
|
|
431
|
-
}) : P ? /* @__PURE__ */ _(l, {
|
|
432
|
-
title: P.title,
|
|
433
|
-
description: P.description
|
|
434
|
-
}) : void 0
|
|
435
|
-
}), ze ? /* @__PURE__ */ _("div", {
|
|
436
|
-
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
|
|
437
|
-
children: /* @__PURE__ */ v("div", {
|
|
438
|
-
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
|
|
439
|
-
children: [/* @__PURE__ */ _(xe, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
440
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
441
|
-
children: J.tableDropzoneTitle
|
|
442
|
-
}), /* @__PURE__ */ _("p", {
|
|
443
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
444
|
-
children: z === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(z)}`
|
|
445
|
-
})] })]
|
|
446
|
-
})
|
|
447
|
-
}) : null]
|
|
448
|
-
});
|
|
449
|
-
return E.map((t) => /* @__PURE__ */ _(s, {
|
|
450
|
-
value: t.id,
|
|
451
|
-
children: t.id === D ? e : null
|
|
452
|
-
}, t.id));
|
|
453
|
-
})()]
|
|
451
|
+
}), E.map((e) => /* @__PURE__ */ g(te, {
|
|
452
|
+
value: e.id,
|
|
453
|
+
children: e.id === D ? $ : null
|
|
454
|
+
}, e.id))]
|
|
454
455
|
}),
|
|
455
|
-
I && Q ?
|
|
456
|
+
I && Q ? be(Q, I) : null
|
|
456
457
|
]
|
|
457
458
|
});
|
|
458
459
|
}
|
|
459
|
-
export {
|
|
460
|
+
export { b as BillsScreen, b as default, y as DEFAULT_BILL_COLUMNS };
|