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