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