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