@tesouro/embedded-components-react 0.5.45 → 0.5.47
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 +7 -5
- package/dist/index.d.ts +54 -24
- package/dist/index.js +1 -1
- package/dist/lib/BankAccountOnboardingWidget.d.ts +15 -1
- package/dist/lib/BillPayWidget.d.ts +16 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/SettingsWidget.d.ts +1 -0
- package/dist/lib/WidgetSuite.d.ts +1 -0
- package/dist/lib/monite-sdk.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +233 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +7 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +46 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +34 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +163 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +22 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +88 -317
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +322 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -59
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +57 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +52 -208
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +215 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +35 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +240 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -532
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +536 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -230
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +234 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +11 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +129 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +44 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +241 -122
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +126 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +219 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +5 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +163 -151
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +77 -77
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +17 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +10 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +29 -28
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.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/shared/feature/dist/lib/user/useOrganizationUserNames.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js +137 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -1,358 +1,370 @@
|
|
|
1
|
-
import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as i, Input as a, Tabs as o, TabsContent as ee, TabsList as
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
1
|
+
import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as i, Input as a, Tabs as o, TabsContent as ee, TabsList as te, TabsTrigger as ne, Tooltip as s, TooltipContent as c, TooltipProvider as l, TooltipTrigger as u } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { EmptyState as d } 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 { AddBillPanel as
|
|
5
|
+
import { AddBillPanel as f } from "./index7.js";
|
|
6
6
|
import "./index8.js";
|
|
7
|
-
import { BillStatusBadge as
|
|
7
|
+
import { BillStatusBadge as ie } from "./index19.js";
|
|
8
8
|
import "./index20.js";
|
|
9
|
-
import { DueDateValue as
|
|
9
|
+
import { DueDateValue as ae } from "./index22.js";
|
|
10
10
|
import "./index23.js";
|
|
11
|
-
import { MissingValue as
|
|
11
|
+
import { MissingValue as p } from "./index59.js";
|
|
12
12
|
import "./index60.js";
|
|
13
|
-
import { NoValue as
|
|
13
|
+
import { NoValue as oe } from "./index62.js";
|
|
14
14
|
import "./index63.js";
|
|
15
|
-
import { BILLS_SCREEN_LABELS_EN as
|
|
16
|
-
import { BillsFilterBar as
|
|
15
|
+
import { BILLS_SCREEN_LABELS_EN as m, BILLS_SCREEN_UPLOAD_ACCEPT as h } from "./index64.js";
|
|
16
|
+
import { BillsFilterBar as se } from "./index79.js";
|
|
17
17
|
import "./index80.js";
|
|
18
|
-
import { BillColumn as
|
|
19
|
-
import { useMemo as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { ChevronRightIcon as
|
|
18
|
+
import { BillColumn as g } from "./index81.js";
|
|
19
|
+
import { useMemo as _ } from "react";
|
|
20
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
21
|
+
import { ChevronRightIcon as b, PaperclipIcon as x, PlusIcon as ce, SearchIcon as le, SettingsIcon as ue } from "lucide-react";
|
|
22
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js
|
|
23
|
-
var
|
|
23
|
+
var de = [
|
|
24
24
|
10,
|
|
25
25
|
25,
|
|
26
26
|
50,
|
|
27
27
|
100
|
|
28
|
-
],
|
|
28
|
+
], fe = 240, pe = {
|
|
29
29
|
default: "",
|
|
30
30
|
warning: "ttw:bg-amber-50 ttw:hover:bg-amber-100 ttw:border-l-4! ttw:border-l-amber-600!"
|
|
31
|
-
},
|
|
31
|
+
}, me = {
|
|
32
32
|
default: "",
|
|
33
33
|
warning: "ttw:-ml-1 ttw:font-semibold ttw:text-amber-800"
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
],
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
34
|
+
}, S = 40, he = [
|
|
35
|
+
g.Vendor,
|
|
36
|
+
g.Attachment,
|
|
37
|
+
g.IssueDate,
|
|
38
|
+
g.DueDate,
|
|
39
|
+
g.ScheduledDate,
|
|
40
|
+
g.PaidDate,
|
|
41
|
+
g.Status,
|
|
42
|
+
g.AmountDue,
|
|
43
|
+
g.AmountScheduled,
|
|
44
|
+
g.AmountPaid,
|
|
45
|
+
g.TotalAmount,
|
|
46
|
+
g.AddedOn
|
|
47
|
+
], C = [
|
|
48
|
+
g.Vendor,
|
|
49
|
+
g.Attachment,
|
|
50
|
+
g.DueDate,
|
|
51
|
+
g.Status,
|
|
52
|
+
g.AmountDue,
|
|
53
|
+
g.AddedOn
|
|
54
54
|
];
|
|
55
|
-
function
|
|
56
|
-
let Z =
|
|
57
|
-
...
|
|
55
|
+
function w({ rows: w, isLoading: T, isError: E, sorting: ge, onSortingChange: _e, pageSize: ve, onPageSizeChange: ye, pageSizeOptions: be = de, pageInfo: xe, hasNextPage: D, hasPrevPage: O, onNextPage: k, onPrevPage: A, filterTabs: j, selectedFilterTabId: M, onFilterTabChange: Se, searchValue: Ce, onSearchChange: we, filters: N, visibleColumns: P = C, cellTestIds: F, isSearchActive: I, showAddPanelWhenEmpty: Te, emptyState: L, onCreateClick: R, onSettingsClick: z, onRetry: B, onFilesSelected: V, maxFiles: H, onEnterManually: U, uploadStatus: W, uploadErrorMessage: G, emailAddress: K, onCopyEmail: q, labels: J, duplicateWarning: Y, onReviewDuplicates: X }) {
|
|
56
|
+
let Z = _(() => ({
|
|
57
|
+
...m,
|
|
58
58
|
...J,
|
|
59
59
|
statusBadge: {
|
|
60
|
-
...
|
|
60
|
+
...m.statusBadge,
|
|
61
61
|
...J?.statusBadge
|
|
62
62
|
},
|
|
63
63
|
addBill: {
|
|
64
|
-
...
|
|
64
|
+
...m.addBill,
|
|
65
65
|
...J?.addBill,
|
|
66
66
|
dropzone: {
|
|
67
|
-
...
|
|
67
|
+
...m.addBill.dropzone,
|
|
68
68
|
...J?.addBill?.dropzone
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
sortableHeader: {
|
|
72
|
-
...
|
|
72
|
+
...m.sortableHeader,
|
|
73
73
|
...J?.sortableHeader
|
|
74
74
|
},
|
|
75
75
|
missingValue: {
|
|
76
|
-
...
|
|
76
|
+
...m.missingValue,
|
|
77
77
|
...J?.missingValue
|
|
78
78
|
},
|
|
79
79
|
noValue: {
|
|
80
|
-
...
|
|
80
|
+
...m.noValue,
|
|
81
81
|
...J?.noValue
|
|
82
82
|
},
|
|
83
83
|
dueDate: {
|
|
84
|
-
...
|
|
84
|
+
...m.dueDate,
|
|
85
85
|
...J?.dueDate
|
|
86
86
|
}
|
|
87
|
-
}), [J]), Q =
|
|
87
|
+
}), [J]), Q = _(() => {
|
|
88
88
|
let e = (e) => function({ column: t }) {
|
|
89
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ v(i, {
|
|
90
90
|
column: t,
|
|
91
91
|
title: e,
|
|
92
92
|
labels: Z.sortableHeader
|
|
93
93
|
});
|
|
94
|
-
}, t = (e, t, n = /* @__PURE__ */
|
|
95
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
96
|
-
return /* @__PURE__ */
|
|
94
|
+
}, t = (e, t, n = /* @__PURE__ */ v(p, { labels: Z.missingValue }), r) => function({ row: i }) {
|
|
95
|
+
let a = r && i.original[r] ? /* @__PURE__ */ v(p, { labels: Z.missingValue }) : n;
|
|
96
|
+
return /* @__PURE__ */ v("span", {
|
|
97
97
|
className: "ttw:whitespace-nowrap",
|
|
98
|
-
"data-testid":
|
|
98
|
+
"data-testid": F?.[t],
|
|
99
99
|
children: i.original[e] || a
|
|
100
100
|
});
|
|
101
101
|
}, n = function({ row: e }) {
|
|
102
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ v("span", {
|
|
103
103
|
className: "ttw:whitespace-nowrap",
|
|
104
|
-
"data-testid":
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
-
value: e.original.dueDateLabel || /* @__PURE__ */
|
|
104
|
+
"data-testid": F?.[g.DueDate],
|
|
105
|
+
children: /* @__PURE__ */ v(ae, {
|
|
106
|
+
value: e.original.dueDateLabel || /* @__PURE__ */ v(p, { labels: Z.missingValue }),
|
|
107
107
|
tone: e.original.dueDateTone,
|
|
108
108
|
labels: Z.dueDate
|
|
109
109
|
})
|
|
110
110
|
});
|
|
111
|
-
}, r = (e, t, n = /* @__PURE__ */
|
|
112
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
113
|
-
return /* @__PURE__ */
|
|
111
|
+
}, r = (e, t, n = /* @__PURE__ */ v(p, { labels: Z.missingValue }), r) => function({ row: i }) {
|
|
112
|
+
let a = r && i.original[r] ? /* @__PURE__ */ v(p, { labels: Z.missingValue }) : n;
|
|
113
|
+
return /* @__PURE__ */ v("div", {
|
|
114
114
|
className: "ttw:text-right ttw:whitespace-nowrap",
|
|
115
|
-
"data-testid":
|
|
115
|
+
"data-testid": F?.[t],
|
|
116
116
|
children: i.original[e] || a
|
|
117
117
|
});
|
|
118
|
-
}, a = /* @__PURE__ */
|
|
119
|
-
return /* @__PURE__ */
|
|
118
|
+
}, a = /* @__PURE__ */ v(oe, { labels: Z.noValue }), o = (e) => function() {
|
|
119
|
+
return /* @__PURE__ */ v("div", {
|
|
120
120
|
className: "ttw:text-right",
|
|
121
121
|
children: e
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
124
|
return {
|
|
125
|
-
[
|
|
125
|
+
[g.Vendor]: {
|
|
126
126
|
accessorKey: "vendorLabel",
|
|
127
127
|
enableSorting: !0,
|
|
128
|
-
minSize:
|
|
128
|
+
minSize: fe,
|
|
129
129
|
header: e(Z.columnVendor),
|
|
130
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
131
|
-
className:
|
|
132
|
-
"data-testid":
|
|
133
|
-
children: [e.original.vendorLabel || /* @__PURE__ */
|
|
130
|
+
cell: ({ row: e }) => /* @__PURE__ */ y("span", {
|
|
131
|
+
className: me[e.original.rowTone ?? "default"],
|
|
132
|
+
"data-testid": F?.[g.Vendor],
|
|
133
|
+
children: [e.original.vendorLabel || /* @__PURE__ */ v(p, { labels: Z.missingValue }), e.original.rowNote ? /* @__PURE__ */ v("span", {
|
|
134
134
|
className: "ttw:sr-only",
|
|
135
135
|
children: ` ${e.original.rowNote}`
|
|
136
136
|
}) : null]
|
|
137
137
|
})
|
|
138
138
|
},
|
|
139
|
-
[
|
|
139
|
+
[g.Attachment]: {
|
|
140
140
|
accessorKey: "attachment",
|
|
141
141
|
enableSorting: !1,
|
|
142
|
-
size:
|
|
143
|
-
minSize:
|
|
144
|
-
header: () => /* @__PURE__ */
|
|
142
|
+
size: S,
|
|
143
|
+
minSize: S,
|
|
144
|
+
header: () => /* @__PURE__ */ v("span", {
|
|
145
145
|
className: "ttw:sr-only",
|
|
146
146
|
children: Z.columnAttachment
|
|
147
147
|
}),
|
|
148
|
-
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */
|
|
148
|
+
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ v("div", {
|
|
149
149
|
className: "ttw:flex ttw:justify-center",
|
|
150
|
-
"data-testid":
|
|
151
|
-
children: /* @__PURE__ */
|
|
150
|
+
"data-testid": F?.[g.Attachment],
|
|
151
|
+
children: /* @__PURE__ */ v(l, { children: /* @__PURE__ */ y(s, { children: [/* @__PURE__ */ v(u, {
|
|
152
152
|
type: "button",
|
|
153
153
|
className: "ttw:inline-flex ttw:cursor-default",
|
|
154
154
|
"aria-label": e.original.attachment.label,
|
|
155
155
|
onClick: (e) => e.stopPropagation(),
|
|
156
|
-
children: /* @__PURE__ */
|
|
157
|
-
}), /* @__PURE__ */
|
|
156
|
+
children: /* @__PURE__ */ v(x, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
|
|
157
|
+
}), /* @__PURE__ */ v(c, { children: e.original.attachment.label })] }) })
|
|
158
158
|
}) : null
|
|
159
159
|
},
|
|
160
|
-
[
|
|
160
|
+
[g.IssueDate]: {
|
|
161
161
|
accessorKey: "issueDateLabel",
|
|
162
162
|
enableSorting: !0,
|
|
163
163
|
header: e(Z.columnIssueDate),
|
|
164
|
-
cell: t("issueDateLabel",
|
|
164
|
+
cell: t("issueDateLabel", g.IssueDate)
|
|
165
165
|
},
|
|
166
|
-
[
|
|
166
|
+
[g.DueDate]: {
|
|
167
167
|
accessorKey: "dueDateLabel",
|
|
168
168
|
enableSorting: !0,
|
|
169
169
|
header: e(Z.columnDueDate),
|
|
170
170
|
cell: n
|
|
171
171
|
},
|
|
172
|
-
[
|
|
172
|
+
[g.ScheduledDate]: {
|
|
173
173
|
accessorKey: "scheduledDateLabel",
|
|
174
174
|
enableSorting: !0,
|
|
175
175
|
header: e(Z.columnScheduledDate),
|
|
176
|
-
cell: t("scheduledDateLabel",
|
|
176
|
+
cell: t("scheduledDateLabel", g.ScheduledDate, a, "scheduledDateIsGap")
|
|
177
177
|
},
|
|
178
|
-
[
|
|
178
|
+
[g.PaidDate]: {
|
|
179
179
|
accessorKey: "paidDateLabel",
|
|
180
180
|
enableSorting: !1,
|
|
181
181
|
header: Z.columnPaidDate,
|
|
182
|
-
cell: t("paidDateLabel",
|
|
182
|
+
cell: t("paidDateLabel", g.PaidDate)
|
|
183
183
|
},
|
|
184
|
-
[
|
|
184
|
+
[g.Status]: {
|
|
185
185
|
accessorKey: "status",
|
|
186
186
|
enableSorting: !1,
|
|
187
187
|
header: Z.columnStatus,
|
|
188
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
188
|
+
cell: ({ row: e }) => /* @__PURE__ */ v("div", {
|
|
189
189
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
190
|
-
"data-testid":
|
|
191
|
-
children: /* @__PURE__ */
|
|
190
|
+
"data-testid": F?.[g.Status],
|
|
191
|
+
children: /* @__PURE__ */ v(ie, {
|
|
192
192
|
status: e.original.status,
|
|
193
193
|
tone: e.original.statusTone,
|
|
194
194
|
labels: Z.statusBadge
|
|
195
195
|
})
|
|
196
196
|
})
|
|
197
197
|
},
|
|
198
|
-
[
|
|
198
|
+
[g.AmountDue]: {
|
|
199
199
|
accessorKey: "amountDueLabel",
|
|
200
200
|
enableSorting: !1,
|
|
201
201
|
header: o(Z.columnAmountDue),
|
|
202
|
-
cell: r("amountDueLabel",
|
|
202
|
+
cell: r("amountDueLabel", g.AmountDue)
|
|
203
203
|
},
|
|
204
|
-
[
|
|
204
|
+
[g.AmountScheduled]: {
|
|
205
205
|
accessorKey: "amountScheduledLabel",
|
|
206
206
|
enableSorting: !1,
|
|
207
207
|
header: o(Z.columnAmountScheduled),
|
|
208
|
-
cell: r("amountScheduledLabel",
|
|
208
|
+
cell: r("amountScheduledLabel", g.AmountScheduled)
|
|
209
209
|
},
|
|
210
|
-
[
|
|
210
|
+
[g.AmountPaid]: {
|
|
211
211
|
accessorKey: "amountPaidLabel",
|
|
212
212
|
enableSorting: !1,
|
|
213
213
|
header: o(Z.columnAmountPaid),
|
|
214
|
-
cell: r("amountPaidLabel",
|
|
214
|
+
cell: r("amountPaidLabel", g.AmountPaid, a, "amountPaidIsGap")
|
|
215
215
|
},
|
|
216
|
-
[
|
|
216
|
+
[g.TotalAmount]: {
|
|
217
217
|
accessorKey: "totalAmountLabel",
|
|
218
218
|
enableSorting: !1,
|
|
219
219
|
header: o(Z.columnTotalAmount),
|
|
220
|
-
cell: r("totalAmountLabel",
|
|
220
|
+
cell: r("totalAmountLabel", g.TotalAmount)
|
|
221
221
|
},
|
|
222
|
-
[
|
|
222
|
+
[g.AddedOn]: {
|
|
223
223
|
accessorKey: "addedOnLabel",
|
|
224
224
|
enableSorting: !0,
|
|
225
225
|
header: e(Z.columnAddedOn),
|
|
226
|
-
cell: t("addedOnLabel",
|
|
226
|
+
cell: t("addedOnLabel", g.AddedOn)
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
}, [Z,
|
|
229
|
+
}, [Z, F]), Ee = _(() => [...he.filter((e) => P.includes(e)).map((e) => Q[e]), {
|
|
230
230
|
id: "actions",
|
|
231
231
|
enableSorting: !1,
|
|
232
|
-
header: () => /* @__PURE__ */
|
|
232
|
+
header: () => /* @__PURE__ */ v("span", {
|
|
233
233
|
className: "ttw:sr-only",
|
|
234
234
|
children: Z.columnActions
|
|
235
235
|
}),
|
|
236
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
236
|
+
cell: ({ row: e }) => /* @__PURE__ */ v("div", {
|
|
237
237
|
className: "ttw:flex ttw:justify-end",
|
|
238
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ v(n, {
|
|
239
239
|
variant: "ghost",
|
|
240
240
|
size: "icon",
|
|
241
241
|
"aria-label": Z.openRow(e.original.vendorLabel || Z.missingValue.missing),
|
|
242
242
|
onClick: (t) => {
|
|
243
243
|
t.stopPropagation(), e.original.onOpen();
|
|
244
244
|
},
|
|
245
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ v(b, { className: "ttw:size-4" })
|
|
246
246
|
})
|
|
247
247
|
})
|
|
248
248
|
}], [
|
|
249
249
|
Q,
|
|
250
250
|
Z,
|
|
251
|
-
|
|
252
|
-
]),
|
|
251
|
+
P
|
|
252
|
+
]), De = !!(R && V) && !T && !E && !I && w.length === 0 && Te === !0, $ = /* @__PURE__ */ y("div", {
|
|
253
253
|
className: "ttw:relative ttw:w-80",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ v(le, { 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__ */ v(a, {
|
|
255
255
|
className: "ttw:pl-9",
|
|
256
256
|
type: "search",
|
|
257
257
|
"aria-label": Z.searchLabel,
|
|
258
258
|
placeholder: Z.searchPlaceholder,
|
|
259
|
-
value:
|
|
260
|
-
onChange: (e) =>
|
|
259
|
+
value: Ce,
|
|
260
|
+
onChange: (e) => we(e.target.value)
|
|
261
261
|
})]
|
|
262
|
-
}),
|
|
263
|
-
...
|
|
262
|
+
}), Oe = N ? /* @__PURE__ */ v(se, {
|
|
263
|
+
...N,
|
|
264
264
|
className: "ttw:px-4",
|
|
265
265
|
searchSlot: $
|
|
266
|
-
}) : /* @__PURE__ */
|
|
266
|
+
}) : /* @__PURE__ */ v("div", {
|
|
267
267
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
268
268
|
children: $
|
|
269
269
|
});
|
|
270
|
-
return /* @__PURE__ */
|
|
270
|
+
return /* @__PURE__ */ y("div", {
|
|
271
271
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
272
|
-
children: [Y ? /* @__PURE__ */
|
|
272
|
+
children: [Y ? /* @__PURE__ */ y(e, {
|
|
273
273
|
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",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ v(t, {
|
|
275
275
|
className: "ttw:flex-1 ttw:font-semibold",
|
|
276
276
|
children: Y
|
|
277
|
-
}), X ? /* @__PURE__ */
|
|
277
|
+
}), X ? /* @__PURE__ */ v(n, {
|
|
278
278
|
type: "button",
|
|
279
279
|
variant: "outline",
|
|
280
280
|
className: "ttw:text-foreground",
|
|
281
281
|
onClick: X,
|
|
282
282
|
children: Z.duplicateBillsReviewButton
|
|
283
283
|
}) : null]
|
|
284
|
-
}) : null, /* @__PURE__ */
|
|
284
|
+
}) : null, /* @__PURE__ */ y(o, {
|
|
285
285
|
value: M,
|
|
286
|
-
onValueChange:
|
|
286
|
+
onValueChange: Se,
|
|
287
287
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ y("div", {
|
|
289
289
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ v(te, {
|
|
291
291
|
"aria-label": Z.filterTabsLabel,
|
|
292
|
-
children: j.map((e) => /* @__PURE__ */
|
|
292
|
+
children: j.map((e) => /* @__PURE__ */ y(ne, {
|
|
293
293
|
value: e.id,
|
|
294
294
|
className: "ttw:min-w-28",
|
|
295
295
|
children: [e.icon, e.label]
|
|
296
296
|
}, e.id))
|
|
297
|
-
}),
|
|
298
|
-
|
|
299
|
-
children: [/* @__PURE__ */
|
|
300
|
-
|
|
297
|
+
}), /* @__PURE__ */ y("div", {
|
|
298
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
299
|
+
children: [z ? /* @__PURE__ */ v(l, { children: /* @__PURE__ */ y(s, { children: [/* @__PURE__ */ v(u, {
|
|
300
|
+
asChild: !0,
|
|
301
|
+
children: /* @__PURE__ */ v(n, {
|
|
302
|
+
variant: "outline",
|
|
303
|
+
size: "icon",
|
|
304
|
+
"aria-label": Z.settingsButton,
|
|
305
|
+
onClick: z,
|
|
306
|
+
children: /* @__PURE__ */ v(ue, { className: "ttw:size-4" })
|
|
307
|
+
})
|
|
308
|
+
}), /* @__PURE__ */ v(c, { children: Z.settingsButton })] }) }) : null, R ? /* @__PURE__ */ y(n, {
|
|
309
|
+
onClick: R,
|
|
310
|
+
children: [/* @__PURE__ */ v(ce, { className: "ttw:size-4" }), Z.createButton]
|
|
311
|
+
}) : null]
|
|
312
|
+
})]
|
|
301
313
|
}), (() => {
|
|
302
|
-
let e =
|
|
314
|
+
let e = E ? /* @__PURE__ */ v(re, {
|
|
303
315
|
title: Z.errorTitle,
|
|
304
316
|
description: Z.errorDescription,
|
|
305
317
|
retryLabel: B ? Z.errorRetry : void 0,
|
|
306
318
|
onRetry: B
|
|
307
|
-
}) :
|
|
319
|
+
}) : De && R && V ? /* @__PURE__ */ v("div", {
|
|
308
320
|
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
309
|
-
children: K && q ? /* @__PURE__ */
|
|
321
|
+
children: K && q ? /* @__PURE__ */ v(f, {
|
|
310
322
|
emailAddress: K,
|
|
311
323
|
onCopyEmail: q,
|
|
312
324
|
onFilesSelected: V,
|
|
313
|
-
accept:
|
|
325
|
+
accept: h,
|
|
314
326
|
maxFiles: H,
|
|
315
327
|
uploadStatus: W,
|
|
316
328
|
uploadErrorMessage: G,
|
|
317
|
-
onEnterManually: U ??
|
|
329
|
+
onEnterManually: U ?? R,
|
|
318
330
|
labels: Z.addBill
|
|
319
|
-
}) : /* @__PURE__ */
|
|
331
|
+
}) : /* @__PURE__ */ v(f, {
|
|
320
332
|
onFilesSelected: V,
|
|
321
|
-
accept:
|
|
333
|
+
accept: h,
|
|
322
334
|
maxFiles: H,
|
|
323
335
|
uploadStatus: W,
|
|
324
336
|
uploadErrorMessage: G,
|
|
325
|
-
onEnterManually: U ??
|
|
337
|
+
onEnterManually: U ?? R,
|
|
326
338
|
labels: Z.addBill
|
|
327
339
|
})
|
|
328
|
-
}) : /* @__PURE__ */
|
|
329
|
-
columns:
|
|
330
|
-
data:
|
|
340
|
+
}) : /* @__PURE__ */ v(r, {
|
|
341
|
+
columns: Ee,
|
|
342
|
+
data: w,
|
|
331
343
|
getRowId: (e) => e.rowKey,
|
|
332
344
|
animatesNewRows: !0,
|
|
333
|
-
isLoading:
|
|
334
|
-
sorting:
|
|
335
|
-
onSortingChange:
|
|
336
|
-
pageSize:
|
|
337
|
-
onPageSizeChange:
|
|
338
|
-
pageSizeOptions:
|
|
339
|
-
pageInfo:
|
|
345
|
+
isLoading: T,
|
|
346
|
+
sorting: ge,
|
|
347
|
+
onSortingChange: _e,
|
|
348
|
+
pageSize: ve,
|
|
349
|
+
onPageSizeChange: ye,
|
|
350
|
+
pageSizeOptions: be,
|
|
351
|
+
pageInfo: xe,
|
|
340
352
|
hasNextPage: D,
|
|
341
353
|
hasPrevPage: O,
|
|
342
354
|
onNextPage: k,
|
|
343
355
|
onPrevPage: A,
|
|
344
356
|
onRowClick: (e) => e.onOpen(),
|
|
345
|
-
rowClassName: (e) =>
|
|
346
|
-
filterComponent:
|
|
347
|
-
children:
|
|
357
|
+
rowClassName: (e) => pe[e.rowTone ?? "default"],
|
|
358
|
+
filterComponent: Oe,
|
|
359
|
+
children: I ? /* @__PURE__ */ v(d, {
|
|
348
360
|
title: Z.filteredEmptyTitle,
|
|
349
361
|
description: Z.filteredEmptyDescription
|
|
350
|
-
}) :
|
|
351
|
-
title:
|
|
352
|
-
description:
|
|
362
|
+
}) : L ? /* @__PURE__ */ v(d, {
|
|
363
|
+
title: L.title,
|
|
364
|
+
description: L.description
|
|
353
365
|
}) : void 0
|
|
354
366
|
});
|
|
355
|
-
return j.map((t) => /* @__PURE__ */
|
|
367
|
+
return j.map((t) => /* @__PURE__ */ v(ee, {
|
|
356
368
|
value: t.id,
|
|
357
369
|
children: t.id === M ? e : null
|
|
358
370
|
}, t.id));
|
|
@@ -361,4 +373,4 @@ function x({ rows: x, isLoading: S, isError: C, sorting: ve, onSortingChange: ye
|
|
|
361
373
|
});
|
|
362
374
|
}
|
|
363
375
|
//#endregion
|
|
364
|
-
export {
|
|
376
|
+
export { w as BillsScreen, w as default, C as DEFAULT_BILL_COLUMNS };
|