@tesouro/embedded-components-react 0.2.330 → 0.2.331
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/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +5 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +92 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +50 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +8 -145
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +78 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +142 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +51 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -2,84 +2,151 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import "../../../shared/ui/dist/index.js";
|
|
10
|
+
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { AddBillDialog as i } from "../../ui/dist/index10.js";
|
|
13
|
+
import { BillsScreen as a } from "../../ui/dist/index53.js";
|
|
14
|
+
import "../../ui/dist/index.js";
|
|
15
|
+
import { BillCreateDialog as o } from "./index37.js";
|
|
16
|
+
import "./index38.js";
|
|
17
|
+
import { BillDetailsContainer as s } from "./index41.js";
|
|
18
|
+
import "./index42.js";
|
|
19
|
+
import "./index48.js";
|
|
20
|
+
import "./index49.js";
|
|
21
|
+
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index50.js";
|
|
22
|
+
import { BILLS_TAB_LABELS_EN as u } from "./index52.js";
|
|
23
|
+
import { billsTabTestIds as d } from "./index53.js";
|
|
24
|
+
import { useBillsTable as f } from "./index54.js";
|
|
25
|
+
import { copyTextToClipboard as p } from "./index51.js";
|
|
26
|
+
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
27
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
28
|
+
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
13
29
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
var T = "bills@business-banking.app", E = {
|
|
31
|
+
[l.Drafts]: /* @__PURE__ */ v(S, {
|
|
32
|
+
className: "ttw:size-4",
|
|
33
|
+
"aria-hidden": !0
|
|
34
|
+
}),
|
|
35
|
+
[l.Pending]: /* @__PURE__ */ v(w, {
|
|
36
|
+
className: "ttw:size-4",
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
}),
|
|
39
|
+
[l.Scheduled]: /* @__PURE__ */ v(b, {
|
|
40
|
+
className: "ttw:size-4",
|
|
41
|
+
"aria-hidden": !0
|
|
42
|
+
}),
|
|
43
|
+
[l.Paid]: /* @__PURE__ */ v(x, {
|
|
44
|
+
className: "ttw:size-4",
|
|
45
|
+
"aria-hidden": !0
|
|
46
|
+
}),
|
|
47
|
+
[l.All]: /* @__PURE__ */ v(C, {
|
|
48
|
+
className: "ttw:size-4",
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
function D({ labels: l, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
|
|
53
|
+
let w = g(() => ({
|
|
54
|
+
...u,
|
|
55
|
+
...l,
|
|
56
|
+
queues: {
|
|
57
|
+
...u.queues,
|
|
58
|
+
...l?.queues
|
|
38
59
|
}
|
|
39
|
-
}, [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_
|
|
44
|
-
]), C = n({ payableIds: b.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
|
|
45
|
-
o(() => {
|
|
46
|
-
for (let { payableId: e, ocrStatus: t, isError: n } of C) {
|
|
47
|
-
let r = b.find((t) => t.payableId === e && t.status === "uploading");
|
|
48
|
-
r && (t === "success" ? x(r.localId, { status: "ready" }) : (n || t === "error" || t === "canceled") && x(r.localId, { status: "failed" }));
|
|
60
|
+
}), [l]), [D, O] = _(!1), [k, A] = _(), [j, M] = _(!1), [N, P] = _(), [F, I] = _(!1), [L, R] = _(!1), { initResponse: z } = r(), B = t(z?.scopes, [n.PayableReadOrg]), V = t(z?.scopes, [n.PayableWriteOrg]), H = !z || B, U = !z || V, W = m((e, t) => {
|
|
61
|
+
if (t && U) {
|
|
62
|
+
A(e), M(!0);
|
|
63
|
+
return;
|
|
49
64
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
caption: p.failedCaption(E.length),
|
|
70
|
-
items: E.map(D)
|
|
71
|
-
}] : []], k = w.length ? p.uploadingSummary(b.length) : T.length ? p.completeSummary(T.length) : p.failedCaption(E.length), A = a(() => {
|
|
72
|
-
h.setQueryData(g, []);
|
|
73
|
-
}, [h, g]);
|
|
74
|
-
return {
|
|
75
|
-
enqueue: S,
|
|
76
|
-
sections: O,
|
|
77
|
-
summaryLabel: k,
|
|
78
|
-
collapsed: v,
|
|
79
|
-
onToggleCollapsed: a(() => y((e) => !e), []),
|
|
80
|
-
onClose: A,
|
|
81
|
-
isVisible: b.length > 0
|
|
65
|
+
P(e), I(!0);
|
|
66
|
+
}, [U]), G = f({
|
|
67
|
+
enabled: H,
|
|
68
|
+
onOpenBill: W
|
|
69
|
+
}), K = g(() => c.map((e) => ({
|
|
70
|
+
id: e,
|
|
71
|
+
label: w.queues[e],
|
|
72
|
+
icon: E[e]
|
|
73
|
+
})), [w.queues]), q = () => {
|
|
74
|
+
I(!1), R(!0);
|
|
75
|
+
}, J = g(() => ({
|
|
76
|
+
createButton: w.createButton,
|
|
77
|
+
addBill: { heading: w.emptyHeading }
|
|
78
|
+
}), [w.createButton, w.emptyHeading]), Y = () => {
|
|
79
|
+
O(!1), A(void 0), M(!0);
|
|
80
|
+
}, X = (e) => {
|
|
81
|
+
O(!1), b?.(e);
|
|
82
|
+
}, Z = async () => {
|
|
83
|
+
await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
|
|
82
84
|
};
|
|
85
|
+
return h(() => {
|
|
86
|
+
x && (A(x), M(!0), S?.());
|
|
87
|
+
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
88
|
+
"data-testid": d.root,
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ v(a, {
|
|
91
|
+
rows: G.rows,
|
|
92
|
+
isLoading: G.isLoading || !z,
|
|
93
|
+
isError: G.isError,
|
|
94
|
+
onRetry: G.onRetry,
|
|
95
|
+
sorting: G.sorting,
|
|
96
|
+
onSortingChange: G.onSortingChange,
|
|
97
|
+
pageSize: G.pageSize,
|
|
98
|
+
onPageSizeChange: G.onPageSizeChange,
|
|
99
|
+
hasNextPage: G.hasNextPage,
|
|
100
|
+
hasPrevPage: G.hasPrevPage,
|
|
101
|
+
onNextPage: G.onNextPage,
|
|
102
|
+
onPrevPage: G.onPrevPage,
|
|
103
|
+
filterTabs: K,
|
|
104
|
+
selectedFilterTabId: G.selectedFilterTabId,
|
|
105
|
+
onFilterTabChange: G.onFilterTabChange,
|
|
106
|
+
searchValue: G.searchValue,
|
|
107
|
+
onSearchChange: G.onSearchChange,
|
|
108
|
+
isFiltering: G.hasAnyBills,
|
|
109
|
+
onCreateClick: U ? () => O(!0) : void 0,
|
|
110
|
+
onEnterManually: U ? Y : void 0,
|
|
111
|
+
onFilesSelected: U ? X : void 0,
|
|
112
|
+
maxFiles: 10,
|
|
113
|
+
emailAddress: T,
|
|
114
|
+
onCopyEmail: Z,
|
|
115
|
+
labels: J
|
|
116
|
+
}),
|
|
117
|
+
U ? /* @__PURE__ */ v(i, {
|
|
118
|
+
open: D,
|
|
119
|
+
onOpenChange: O,
|
|
120
|
+
onFilesSelected: X,
|
|
121
|
+
maxFiles: 10,
|
|
122
|
+
onEnterManually: Y,
|
|
123
|
+
emailAddress: T,
|
|
124
|
+
onCopyEmail: Z,
|
|
125
|
+
labels: { heading: G.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
126
|
+
}) : null,
|
|
127
|
+
j ? /* @__PURE__ */ v(o, {
|
|
128
|
+
open: j,
|
|
129
|
+
onOpenChange: M,
|
|
130
|
+
payableId: k
|
|
131
|
+
}) : null,
|
|
132
|
+
F ? /* @__PURE__ */ v(s, {
|
|
133
|
+
open: F,
|
|
134
|
+
onOpenChange: I,
|
|
135
|
+
payableId: N,
|
|
136
|
+
onClose: () => I(!1),
|
|
137
|
+
onExpand: q,
|
|
138
|
+
testId: d.detailsSheet,
|
|
139
|
+
poweredByBankName: C
|
|
140
|
+
}) : null,
|
|
141
|
+
L ? /* @__PURE__ */ v(o, {
|
|
142
|
+
open: L,
|
|
143
|
+
onOpenChange: R,
|
|
144
|
+
payableId: N,
|
|
145
|
+
readOnly: !0,
|
|
146
|
+
poweredByBankName: C
|
|
147
|
+
}) : null
|
|
148
|
+
]
|
|
149
|
+
});
|
|
83
150
|
}
|
|
84
151
|
//#endregion
|
|
85
|
-
export {
|
|
152
|
+
export { D as BillsTab, D as default };
|
|
@@ -16,10 +16,10 @@ import { BillUploadStatusTray as s } from "../../ui/dist/index56.js";
|
|
|
16
16
|
import "../../ui/dist/index.js";
|
|
17
17
|
import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
|
|
18
18
|
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import "./
|
|
22
|
-
import {
|
|
19
|
+
import { useBillUploadQueue as l } from "./index48.js";
|
|
20
|
+
import "./index49.js";
|
|
21
|
+
import { billsTabTestIds as u } from "./index53.js";
|
|
22
|
+
import { BillsTab as d } from "./index55.js";
|
|
23
23
|
import "./index56.js";
|
|
24
24
|
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index43.js";
|
|
25
25
|
import { DEFAULT_TABS_LABELS as m } from "./index57.js";
|
|
@@ -47,10 +47,10 @@ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyCo
|
|
|
47
47
|
...p
|
|
48
48
|
}, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
|
|
49
49
|
P(S.Bills), I(e);
|
|
50
|
-
}, []), R =
|
|
50
|
+
}, []), R = l({ onOpenBill: L }), z = [{
|
|
51
51
|
id: S.Bills,
|
|
52
52
|
label: k.bills,
|
|
53
|
-
content: /* @__PURE__ */ b(
|
|
53
|
+
content: /* @__PURE__ */ b(d, {
|
|
54
54
|
onEnqueueFiles: R.enqueue,
|
|
55
55
|
openPayableId: F,
|
|
56
56
|
onOpenPayableHandled: () => I(void 0),
|
|
@@ -89,7 +89,7 @@ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyCo
|
|
|
89
89
|
collapsed: R.collapsed,
|
|
90
90
|
onToggleCollapsed: R.onToggleCollapsed,
|
|
91
91
|
onClose: R.onClose,
|
|
92
|
-
testId:
|
|
92
|
+
testId: u.uploadTray
|
|
93
93
|
}) : null
|
|
94
94
|
] });
|
|
95
95
|
}
|
|
@@ -10,60 +10,60 @@ function u(e, t) {
|
|
|
10
10
|
let n = t.split(",").map((e) => e.trim()).filter(Boolean);
|
|
11
11
|
return n.length === 0 || n.some((t) => t.startsWith(".") ? e.name.toLowerCase().endsWith(t.toLowerCase()) : t.endsWith("/*") ? e.type.startsWith(t.slice(0, -1)) : e.type === t);
|
|
12
12
|
}
|
|
13
|
-
function d({ status: d = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0,
|
|
14
|
-
let
|
|
13
|
+
function d({ status: d = "idle", errorMessage: f, accept: p = ".pdf,.png,.jpg,.jpeg", multiple: m = !0, maxFiles: h, onFilesSelected: g, testId: _, labels: v }) {
|
|
14
|
+
let y = {
|
|
15
15
|
...n,
|
|
16
|
-
...
|
|
17
|
-
},
|
|
16
|
+
...v
|
|
17
|
+
}, b = r(null), [x, S] = i(!1), C = d === "uploading";
|
|
18
18
|
return /* @__PURE__ */ s("div", {
|
|
19
19
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
20
|
-
"data-testid":
|
|
20
|
+
"data-testid": _,
|
|
21
21
|
children: [
|
|
22
22
|
/* @__PURE__ */ s("button", {
|
|
23
23
|
type: "button",
|
|
24
|
-
disabled:
|
|
25
|
-
className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8",
|
|
26
|
-
onClick: () =>
|
|
24
|
+
disabled: C,
|
|
25
|
+
className: e("ttw:flex ttw:w-full ttw:items-center ttw:justify-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-dashed ttw:px-6 ttw:py-8", x ? "ttw:border-primary ttw:bg-primary/5" : "ttw:border-border ttw:bg-muted/40"),
|
|
26
|
+
onClick: () => b.current?.click(),
|
|
27
27
|
onDragOver: (e) => {
|
|
28
|
-
e.preventDefault(),
|
|
28
|
+
e.preventDefault(), S(!0);
|
|
29
29
|
},
|
|
30
30
|
onDragLeave: (e) => {
|
|
31
|
-
e.preventDefault(),
|
|
31
|
+
e.preventDefault(), S(!1);
|
|
32
32
|
},
|
|
33
33
|
onDrop: (e) => {
|
|
34
|
-
if (e.preventDefault(),
|
|
34
|
+
if (e.preventDefault(), S(!1), C) return;
|
|
35
35
|
let t = (e.dataTransfer.files ? Array.from(e.dataTransfer.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
|
|
36
|
-
n.length > 0 &&
|
|
36
|
+
n.length > 0 && g(n);
|
|
37
37
|
},
|
|
38
|
-
children: [
|
|
38
|
+
children: [C ? /* @__PURE__ */ o(c, { className: "ttw:size-5 ttw:animate-spin ttw:text-primary" }) : /* @__PURE__ */ o(l, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ s("span", {
|
|
39
39
|
className: "ttw:flex ttw:flex-col ttw:items-start",
|
|
40
40
|
children: [/* @__PURE__ */ o("span", {
|
|
41
41
|
className: "ttw:text-sm ttw:text-primary",
|
|
42
|
-
children:
|
|
43
|
-
|
|
42
|
+
children: C ? y.uploadingText : /* @__PURE__ */ s(a, { children: [
|
|
43
|
+
y.dropPrefix,
|
|
44
44
|
" ",
|
|
45
45
|
/* @__PURE__ */ o("span", {
|
|
46
46
|
className: "ttw:underline",
|
|
47
|
-
children:
|
|
47
|
+
children: y.browseAction
|
|
48
48
|
})
|
|
49
49
|
] })
|
|
50
50
|
}), /* @__PURE__ */ o("span", {
|
|
51
51
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
52
|
-
children:
|
|
52
|
+
children: h === void 0 ? y.fileTypesHint : `${y.fileTypesHint} · ${y.fileCountHint(h)}`
|
|
53
53
|
})]
|
|
54
54
|
})]
|
|
55
55
|
}),
|
|
56
56
|
/* @__PURE__ */ o("input", {
|
|
57
|
-
ref:
|
|
57
|
+
ref: b,
|
|
58
58
|
type: "file",
|
|
59
59
|
accept: p,
|
|
60
60
|
multiple: m,
|
|
61
|
-
disabled:
|
|
62
|
-
"aria-label":
|
|
61
|
+
disabled: C,
|
|
62
|
+
"aria-label": y.fileInput,
|
|
63
63
|
className: "ttw:hidden",
|
|
64
64
|
onChange: (e) => {
|
|
65
65
|
let t = (e.target.files ? Array.from(e.target.files) : []).filter((e) => u(e, p)), n = m ? t : t.slice(0, 1);
|
|
66
|
-
n.length > 0 &&
|
|
66
|
+
n.length > 0 && g(n), e.target.value = "";
|
|
67
67
|
}
|
|
68
68
|
}),
|
|
69
69
|
d === "error" && f ? /* @__PURE__ */ o(t, { children: f }) : null
|
|
@@ -19,59 +19,59 @@ var x = [
|
|
|
19
19
|
50,
|
|
20
20
|
100
|
|
21
21
|
];
|
|
22
|
-
function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E, pageSize: D, onPageSizeChange: O, pageSizeOptions: k = x, pageInfo: A, hasNextPage: j, hasPrevPage: M, onNextPage: N, onPrevPage: P, filterTabs: F, selectedFilterTabId: I, onFilterTabChange: L, searchValue: R, onSearchChange: z, isFiltering: B, onCreateClick: V, onRetry: H, onFilesSelected: U,
|
|
23
|
-
let
|
|
22
|
+
function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E, pageSize: D, onPageSizeChange: O, pageSizeOptions: k = x, pageInfo: A, hasNextPage: j, hasPrevPage: M, onNextPage: N, onPrevPage: P, filterTabs: F, selectedFilterTabId: I, onFilterTabChange: L, searchValue: R, onSearchChange: z, isFiltering: B, onCreateClick: V, onRetry: H, onFilesSelected: U, maxFiles: W, onEnterManually: G, uploadStatus: K, uploadErrorMessage: q, emailAddress: J, onCopyEmail: Y, labels: X }) {
|
|
23
|
+
let Z = h(() => ({
|
|
24
24
|
...p,
|
|
25
|
-
...
|
|
25
|
+
...X,
|
|
26
26
|
statusBadge: {
|
|
27
27
|
...p.statusBadge,
|
|
28
|
-
...
|
|
28
|
+
...X?.statusBadge
|
|
29
29
|
},
|
|
30
30
|
addBill: {
|
|
31
31
|
...p.addBill,
|
|
32
|
-
...
|
|
32
|
+
...X?.addBill,
|
|
33
33
|
dropzone: {
|
|
34
34
|
...p.addBill.dropzone,
|
|
35
|
-
...
|
|
35
|
+
...X?.addBill?.dropzone
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
sortableHeader: {
|
|
39
39
|
...p.sortableHeader,
|
|
40
|
-
...
|
|
40
|
+
...X?.sortableHeader
|
|
41
41
|
},
|
|
42
42
|
missingValue: {
|
|
43
43
|
...p.missingValue,
|
|
44
|
-
...
|
|
44
|
+
...X?.missingValue
|
|
45
45
|
}
|
|
46
|
-
}), [
|
|
46
|
+
}), [X]), Q = h(() => [
|
|
47
47
|
{
|
|
48
48
|
accessorKey: "vendorLabel",
|
|
49
49
|
enableSorting: !0,
|
|
50
50
|
header: ({ column: e }) => /* @__PURE__ */ g(n, {
|
|
51
51
|
column: e,
|
|
52
|
-
title:
|
|
53
|
-
labels:
|
|
52
|
+
title: Z.columnVendor,
|
|
53
|
+
labels: Z.sortableHeader
|
|
54
54
|
}),
|
|
55
|
-
cell: ({ row: e }) => e.original.vendorLabel || /* @__PURE__ */ g(f, { labels:
|
|
55
|
+
cell: ({ row: e }) => e.original.vendorLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
accessorKey: "dueDateLabel",
|
|
59
59
|
enableSorting: !0,
|
|
60
60
|
header: ({ column: e }) => /* @__PURE__ */ g(n, {
|
|
61
61
|
column: e,
|
|
62
|
-
title:
|
|
63
|
-
labels:
|
|
62
|
+
title: Z.columnDueDate,
|
|
63
|
+
labels: Z.sortableHeader
|
|
64
64
|
}),
|
|
65
|
-
cell: ({ row: e }) => e.original.dueDateLabel || /* @__PURE__ */ g(f, { labels:
|
|
65
|
+
cell: ({ row: e }) => e.original.dueDateLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
accessorKey: "status",
|
|
69
69
|
enableSorting: !1,
|
|
70
|
-
header:
|
|
70
|
+
header: Z.columnStatus,
|
|
71
71
|
cell: ({ row: e }) => /* @__PURE__ */ g(d, {
|
|
72
72
|
status: e.original.status,
|
|
73
73
|
tone: e.original.statusTone,
|
|
74
|
-
labels:
|
|
74
|
+
labels: Z.statusBadge
|
|
75
75
|
})
|
|
76
76
|
},
|
|
77
77
|
{
|
|
@@ -79,11 +79,11 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
|
|
|
79
79
|
enableSorting: !1,
|
|
80
80
|
header: () => /* @__PURE__ */ g("div", {
|
|
81
81
|
className: "ttw:text-right",
|
|
82
|
-
children:
|
|
82
|
+
children: Z.columnAmountDue
|
|
83
83
|
}),
|
|
84
84
|
cell: ({ row: e }) => /* @__PURE__ */ g("div", {
|
|
85
85
|
className: "ttw:text-right",
|
|
86
|
-
children: e.original.amountDueLabel || /* @__PURE__ */ g(f, { labels:
|
|
86
|
+
children: e.original.amountDueLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
|
|
87
87
|
})
|
|
88
88
|
},
|
|
89
89
|
{
|
|
@@ -91,24 +91,24 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
|
|
|
91
91
|
enableSorting: !0,
|
|
92
92
|
header: ({ column: e }) => /* @__PURE__ */ g(n, {
|
|
93
93
|
column: e,
|
|
94
|
-
title:
|
|
95
|
-
labels:
|
|
94
|
+
title: Z.columnAddedOn,
|
|
95
|
+
labels: Z.sortableHeader
|
|
96
96
|
}),
|
|
97
|
-
cell: ({ row: e }) => e.original.addedOnLabel || /* @__PURE__ */ g(f, { labels:
|
|
97
|
+
cell: ({ row: e }) => e.original.addedOnLabel || /* @__PURE__ */ g(f, { labels: Z.missingValue })
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: "actions",
|
|
101
101
|
enableSorting: !1,
|
|
102
102
|
header: () => /* @__PURE__ */ g("span", {
|
|
103
103
|
className: "ttw:sr-only",
|
|
104
|
-
children:
|
|
104
|
+
children: Z.columnActions
|
|
105
105
|
}),
|
|
106
106
|
cell: ({ row: t }) => /* @__PURE__ */ g("div", {
|
|
107
107
|
className: "ttw:flex ttw:justify-end",
|
|
108
108
|
children: /* @__PURE__ */ g(e, {
|
|
109
109
|
variant: "ghost",
|
|
110
110
|
size: "icon",
|
|
111
|
-
"aria-label":
|
|
111
|
+
"aria-label": Z.openRow(t.original.vendorLabel || Z.missingValue.missing),
|
|
112
112
|
onClick: (e) => {
|
|
113
113
|
e.stopPropagation(), t.original.onOpen();
|
|
114
114
|
},
|
|
@@ -116,15 +116,15 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
|
|
|
116
116
|
})
|
|
117
117
|
})
|
|
118
118
|
}
|
|
119
|
-
], [
|
|
119
|
+
], [Z]), $ = !!(V && U) && !C && !w && !B && S.length === 0, ee = /* @__PURE__ */ g("div", {
|
|
120
120
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
121
121
|
children: /* @__PURE__ */ _("div", {
|
|
122
122
|
className: "ttw:relative ttw:w-80",
|
|
123
123
|
children: [/* @__PURE__ */ g(b, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ g(r, {
|
|
124
124
|
className: "ttw:pl-9",
|
|
125
125
|
type: "search",
|
|
126
|
-
"aria-label":
|
|
127
|
-
placeholder:
|
|
126
|
+
"aria-label": Z.searchLabel,
|
|
127
|
+
placeholder: Z.searchPlaceholder,
|
|
128
128
|
value: R,
|
|
129
129
|
onChange: (e) => z(e.target.value)
|
|
130
130
|
})]
|
|
@@ -137,43 +137,45 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
|
|
|
137
137
|
children: [/* @__PURE__ */ _("div", {
|
|
138
138
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
139
139
|
children: [/* @__PURE__ */ g(o, {
|
|
140
|
-
"aria-label":
|
|
140
|
+
"aria-label": Z.filterTabsLabel,
|
|
141
141
|
children: F.map((e) => /* @__PURE__ */ _(s, {
|
|
142
142
|
value: e.id,
|
|
143
143
|
className: "ttw:min-w-28",
|
|
144
144
|
children: [e.icon, e.label]
|
|
145
145
|
}, e.id))
|
|
146
|
-
}), V &&
|
|
146
|
+
}), V && !$ ? /* @__PURE__ */ _(e, {
|
|
147
147
|
onClick: V,
|
|
148
|
-
children: [/* @__PURE__ */ g(y, { className: "ttw:size-4" }),
|
|
148
|
+
children: [/* @__PURE__ */ g(y, { className: "ttw:size-4" }), Z.createButton]
|
|
149
149
|
}) : null]
|
|
150
150
|
}), (() => {
|
|
151
151
|
let e = w ? /* @__PURE__ */ g(l, {
|
|
152
|
-
title:
|
|
153
|
-
description:
|
|
154
|
-
retryLabel: H ?
|
|
152
|
+
title: Z.errorTitle,
|
|
153
|
+
description: Z.errorDescription,
|
|
154
|
+
retryLabel: H ? Z.errorRetry : void 0,
|
|
155
155
|
onRetry: H
|
|
156
|
-
}) :
|
|
156
|
+
}) : $ && V && U ? /* @__PURE__ */ g("div", {
|
|
157
157
|
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
158
|
-
children:
|
|
159
|
-
emailAddress:
|
|
160
|
-
onCopyEmail:
|
|
158
|
+
children: J && Y ? /* @__PURE__ */ g(u, {
|
|
159
|
+
emailAddress: J,
|
|
160
|
+
onCopyEmail: Y,
|
|
161
161
|
onFilesSelected: U,
|
|
162
162
|
accept: m,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
maxFiles: W,
|
|
164
|
+
uploadStatus: K,
|
|
165
|
+
uploadErrorMessage: q,
|
|
166
|
+
onEnterManually: G ?? V,
|
|
167
|
+
labels: Z.addBill
|
|
167
168
|
}) : /* @__PURE__ */ g(u, {
|
|
168
169
|
onFilesSelected: U,
|
|
169
170
|
accept: m,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
maxFiles: W,
|
|
172
|
+
uploadStatus: K,
|
|
173
|
+
uploadErrorMessage: q,
|
|
174
|
+
onEnterManually: G ?? V,
|
|
175
|
+
labels: Z.addBill
|
|
174
176
|
})
|
|
175
177
|
}) : /* @__PURE__ */ g(t, {
|
|
176
|
-
columns:
|
|
178
|
+
columns: Q,
|
|
177
179
|
data: S,
|
|
178
180
|
isLoading: C,
|
|
179
181
|
sorting: T,
|
|
@@ -187,10 +189,10 @@ function S({ rows: S, isLoading: C, isError: w, sorting: T, onSortingChange: E,
|
|
|
187
189
|
onNextPage: N,
|
|
188
190
|
onPrevPage: P,
|
|
189
191
|
onRowClick: (e) => e.onOpen(),
|
|
190
|
-
filterComponent:
|
|
192
|
+
filterComponent: ee,
|
|
191
193
|
children: B ? /* @__PURE__ */ g(c, {
|
|
192
|
-
title:
|
|
193
|
-
description:
|
|
194
|
+
title: Z.filteredEmptyTitle,
|
|
195
|
+
description: Z.filteredEmptyDescription
|
|
194
196
|
}) : void 0
|
|
195
197
|
});
|
|
196
198
|
return F.map((t) => /* @__PURE__ */ g(a, {
|
|
@@ -5,56 +5,57 @@ import { ADD_BILL_PANEL_LABELS_EN as r } from "./index6.js";
|
|
|
5
5
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
6
|
import { Copy as s } from "lucide-react";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js
|
|
8
|
-
function c({ emailAddress: c, onCopyEmail: l, onFilesSelected: u, accept: d,
|
|
9
|
-
let
|
|
8
|
+
function c({ emailAddress: c, onCopyEmail: l, onFilesSelected: u, accept: d, maxFiles: f, uploadStatus: p, uploadErrorMessage: m, onEnterManually: h, testId: g, labels: _ }) {
|
|
9
|
+
let v = {
|
|
10
10
|
...r,
|
|
11
|
-
...
|
|
11
|
+
..._,
|
|
12
12
|
dropzone: {
|
|
13
13
|
...r.dropzone,
|
|
14
|
-
...
|
|
14
|
+
..._?.dropzone
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
return /* @__PURE__ */ o("div", {
|
|
18
18
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-4 ttw:px-6 ttw:py-10 ttw:text-center",
|
|
19
|
-
"data-testid":
|
|
19
|
+
"data-testid": g,
|
|
20
20
|
children: [
|
|
21
21
|
/* @__PURE__ */ a(t, {
|
|
22
22
|
component: "h2",
|
|
23
23
|
variant: "h2",
|
|
24
24
|
className: "ttw:font-semibold",
|
|
25
|
-
children:
|
|
25
|
+
children: v.heading
|
|
26
26
|
}),
|
|
27
27
|
/* @__PURE__ */ a("p", {
|
|
28
28
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
29
29
|
children: c ? /* @__PURE__ */ o(i, { children: [
|
|
30
|
-
|
|
30
|
+
v.subcopyPrefix,
|
|
31
31
|
" ",
|
|
32
32
|
/* @__PURE__ */ o("button", {
|
|
33
33
|
type: "button",
|
|
34
34
|
onClick: l,
|
|
35
|
-
"aria-label":
|
|
35
|
+
"aria-label": v.copyEmail,
|
|
36
36
|
className: "ttw:inline-flex ttw:items-center ttw:gap-1.5 ttw:rounded-md ttw:border ttw:border-input ttw:px-2 ttw:py-1 ttw:align-middle ttw:text-foreground ttw:hover:bg-accent",
|
|
37
37
|
children: [c, /* @__PURE__ */ a(s, { className: "ttw:size-3.5 ttw:text-muted-foreground" })]
|
|
38
38
|
}),
|
|
39
39
|
" ",
|
|
40
|
-
|
|
41
|
-
] }) :
|
|
40
|
+
v.subcopySuffix
|
|
41
|
+
] }) : v.subcopyPlain
|
|
42
42
|
}),
|
|
43
43
|
/* @__PURE__ */ a("div", {
|
|
44
44
|
className: "ttw:w-full ttw:max-w-lg",
|
|
45
45
|
children: /* @__PURE__ */ a(n, {
|
|
46
|
-
status:
|
|
47
|
-
errorMessage:
|
|
46
|
+
status: p,
|
|
47
|
+
errorMessage: m,
|
|
48
48
|
accept: d,
|
|
49
|
+
maxFiles: f,
|
|
49
50
|
onFilesSelected: u,
|
|
50
|
-
labels:
|
|
51
|
+
labels: v.dropzone
|
|
51
52
|
})
|
|
52
53
|
}),
|
|
53
54
|
/* @__PURE__ */ a(e, {
|
|
54
55
|
type: "button",
|
|
55
56
|
variant: "outline",
|
|
56
|
-
onClick:
|
|
57
|
-
children:
|
|
57
|
+
onClick: h,
|
|
58
|
+
children: v.enterManually
|
|
58
59
|
})
|
|
59
60
|
]
|
|
60
61
|
});
|