@tesouro/embedded-components-react 0.5.75 → 0.5.77
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 +0 -8
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- 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/index45.js +140 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +46 -140
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +114 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +182 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +75 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +31 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +89 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +405 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +12 -381
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +84 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +54 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +223 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +37 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +245 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +575 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -572
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +44 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +247 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +123 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +211 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +98 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -100
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +12 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +16 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +97 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +76 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +277 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +16 -369
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +56 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +15 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +32 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +374 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +20 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +87 -188
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +48 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +47 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +10 -85
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +197 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +14 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +88 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +167 -161
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -5
- 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/util/dist/lib/auditHistory/buildPayableAuditHistory.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1391 -1369
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -27
|
@@ -1,13 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import { getPayablesIdOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
+
import { isApiNotFoundError as a } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
11
|
+
import "../../../shared/data-access/dist/index.js";
|
|
12
|
+
import "../../../shared/ui/dist/index.js";
|
|
13
|
+
import { useUploadPayableFromFileMutation as o } from "../../data-access/dist/index13.js";
|
|
14
|
+
import { usePayableOcrQueries as s } from "../../data-access/dist/index15.js";
|
|
15
|
+
import "../../data-access/dist/index.js";
|
|
16
|
+
import { billPayUploadQueueKey as c } from "./index68.js";
|
|
17
|
+
import { BILL_UPLOAD_QUEUE_LABELS_EN as l } from "./index69.js";
|
|
18
|
+
import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
|
|
19
|
+
import { useQuery as m, useQueryClient as h } from "@tanstack/react-query";
|
|
1
20
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
21
|
+
function g({ onOpenBill: g, labels: _ } = {}) {
|
|
22
|
+
let v = {
|
|
23
|
+
...l,
|
|
24
|
+
..._
|
|
25
|
+
}, y = _?.tooManyFilesError ?? l.tooManyFilesError, b = _?.remainingCapacityError ?? l.remainingCapacityError, { client: x, organizationId: S, authEpoch: C } = t(), w = h(), T = f(() => c(S), [S]), E = o(), [D, O] = p(!1), { data: k = [] } = m({
|
|
26
|
+
queryKey: T,
|
|
27
|
+
queryFn: () => w.getQueryData(T) ?? [],
|
|
28
|
+
staleTime: Infinity,
|
|
29
|
+
gcTime: Infinity,
|
|
30
|
+
initialData: []
|
|
31
|
+
}), A = u((e, t) => {
|
|
32
|
+
w.setQueryData(T, (n) => (n ?? []).map((n) => n.localId === e ? {
|
|
33
|
+
...n,
|
|
34
|
+
...t
|
|
35
|
+
} : n));
|
|
36
|
+
}, [w, T]), j = u((e) => {
|
|
37
|
+
w.setQueryData(T, (t) => (t ?? []).filter((t) => t.localId !== e));
|
|
38
|
+
}, [w, T]), M = u((t) => {
|
|
39
|
+
let n = (w.getQueryData(T) ?? []).filter((e) => e.status === "uploading").length;
|
|
40
|
+
if (t.length + n > 10) {
|
|
41
|
+
e.error(n > 0 ? b(10 - n) : y(10));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
O(!1);
|
|
45
|
+
for (let e of t) {
|
|
46
|
+
let t = crypto.randomUUID();
|
|
47
|
+
w.setQueryData(T, (n) => [...n ?? [], {
|
|
48
|
+
localId: t,
|
|
49
|
+
fileName: e.name,
|
|
50
|
+
status: "uploading"
|
|
51
|
+
}]), E.mutateAsync({ file: e }).then((e) => A(t, { payableId: e?.id })).catch(() => A(t, { status: "failed" }));
|
|
52
|
+
}
|
|
53
|
+
}, [
|
|
54
|
+
A,
|
|
55
|
+
w,
|
|
56
|
+
T,
|
|
57
|
+
b,
|
|
58
|
+
y,
|
|
59
|
+
E
|
|
60
|
+
]), N = s({ payableIds: k.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
|
|
61
|
+
d(() => {
|
|
62
|
+
let e = /* @__PURE__ */ new Set();
|
|
63
|
+
for (let t of N) if (t.suspectedDuplicateOf.length !== 0) {
|
|
64
|
+
e.add(t.payableId);
|
|
65
|
+
for (let n of t.suspectedDuplicateOf) e.add(n);
|
|
66
|
+
}
|
|
67
|
+
for (let { payableId: t, ocrStatus: n, isError: r } of N) {
|
|
68
|
+
let i = k.find((e) => e.payableId === t && e.status === "uploading");
|
|
69
|
+
i && (n === "success" ? A(i.localId, { status: e.has(t) ? "duplicate" : "ready" }) : (r || n === "error" || n === "canceled") && A(i.localId, { status: "failed" }));
|
|
70
|
+
}
|
|
71
|
+
for (let t of k) t.status === "ready" && t.payableId && e.has(t.payableId) && A(t.localId, { status: "duplicate" });
|
|
72
|
+
}, [
|
|
73
|
+
k,
|
|
74
|
+
N,
|
|
75
|
+
A
|
|
76
|
+
]);
|
|
77
|
+
let P = k.filter((e) => e.status === "uploading"), F = k.filter((e) => e.status === "ready"), I = k.filter((e) => e.status === "duplicate"), L = k.filter((e) => e.status === "failed"), R = (t) => ({
|
|
78
|
+
id: t.localId,
|
|
79
|
+
fileName: t.fileName,
|
|
80
|
+
status: t.status,
|
|
81
|
+
onOpen: (t.status === "ready" || t.status === "duplicate") && t.payableId && g ? () => {
|
|
82
|
+
let o = t.payableId;
|
|
83
|
+
w.fetchQuery({
|
|
84
|
+
...i(r({
|
|
85
|
+
client: x,
|
|
86
|
+
headers: n(S),
|
|
87
|
+
path: { payable_id: o }
|
|
88
|
+
}), C),
|
|
89
|
+
retry: !1
|
|
90
|
+
}).catch((e) => {
|
|
91
|
+
if (a(e)) return "deleted";
|
|
92
|
+
}).then((n) => {
|
|
93
|
+
n === "deleted" ? e.error(v.billDeletedError) : g(o), j(t.localId);
|
|
94
|
+
});
|
|
95
|
+
} : void 0
|
|
96
|
+
}), z = P.length ? [{
|
|
97
|
+
id: "in-progress",
|
|
98
|
+
items: k.map(R)
|
|
99
|
+
}] : [
|
|
100
|
+
...F.length ? [{
|
|
101
|
+
id: "ready",
|
|
102
|
+
caption: v.readyCaption(F.length),
|
|
103
|
+
items: F.map(R)
|
|
104
|
+
}] : [],
|
|
105
|
+
...I.length ? [{
|
|
106
|
+
id: "duplicate",
|
|
107
|
+
caption: v.duplicateCaption(I.length),
|
|
108
|
+
items: I.map(R)
|
|
109
|
+
}] : [],
|
|
110
|
+
...L.length ? [{
|
|
111
|
+
id: "failed",
|
|
112
|
+
caption: v.failedCaption(L.length),
|
|
113
|
+
items: L.map(R)
|
|
114
|
+
}] : []
|
|
115
|
+
], B = F.length + I.length, V = P.length ? v.uploadingSummary(k.length) : B ? v.completeSummary(B) : v.failedCaption(L.length), H = u(() => {
|
|
116
|
+
w.setQueryData(T, []);
|
|
117
|
+
}, [w, T]);
|
|
118
|
+
return {
|
|
119
|
+
enqueue: M,
|
|
120
|
+
sections: z,
|
|
121
|
+
summaryLabel: V,
|
|
122
|
+
collapsed: D,
|
|
123
|
+
onToggleCollapsed: u(() => O((e) => !e), []),
|
|
124
|
+
onClose: H,
|
|
125
|
+
isVisible: k.length > 0
|
|
126
|
+
};
|
|
127
|
+
}
|
|
12
128
|
//#endregion
|
|
13
|
-
export {
|
|
129
|
+
export { g as useBillUploadQueue };
|
|
@@ -1,129 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"use client";
|
|
5
|
-
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
-
import { organizationHeaders as n } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
-
import { getPayablesIdOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
-
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
10
|
-
import { isApiNotFoundError as a } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
|
|
11
|
-
import "../../../shared/data-access/dist/index.js";
|
|
12
|
-
import "../../../shared/ui/dist/index.js";
|
|
13
|
-
import { useUploadPayableFromFileMutation as o } from "../../data-access/dist/index13.js";
|
|
14
|
-
import { usePayableOcrQueries as s } from "../../data-access/dist/index15.js";
|
|
15
|
-
import "../../data-access/dist/index.js";
|
|
16
|
-
import { billPayUploadQueueKey as c } from "./index69.js";
|
|
17
|
-
import { BILL_UPLOAD_QUEUE_LABELS_EN as l } from "./index70.js";
|
|
18
|
-
import { useCallback as u, useEffect as d, useMemo as f, useState as p } from "react";
|
|
19
|
-
import { useQuery as m, useQueryClient as h } from "@tanstack/react-query";
|
|
20
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js
|
|
21
|
-
function g({ onOpenBill: g, labels: _ } = {}) {
|
|
22
|
-
let v = {
|
|
23
|
-
...l,
|
|
24
|
-
..._
|
|
25
|
-
}, y = _?.tooManyFilesError ?? l.tooManyFilesError, b = _?.remainingCapacityError ?? l.remainingCapacityError, { client: x, organizationId: S, authEpoch: C } = t(), w = h(), T = f(() => c(S), [S]), E = o(), [D, O] = p(!1), { data: k = [] } = m({
|
|
26
|
-
queryKey: T,
|
|
27
|
-
queryFn: () => w.getQueryData(T) ?? [],
|
|
28
|
-
staleTime: Infinity,
|
|
29
|
-
gcTime: Infinity,
|
|
30
|
-
initialData: []
|
|
31
|
-
}), A = u((e, t) => {
|
|
32
|
-
w.setQueryData(T, (n) => (n ?? []).map((n) => n.localId === e ? {
|
|
33
|
-
...n,
|
|
34
|
-
...t
|
|
35
|
-
} : n));
|
|
36
|
-
}, [w, T]), j = u((e) => {
|
|
37
|
-
w.setQueryData(T, (t) => (t ?? []).filter((t) => t.localId !== e));
|
|
38
|
-
}, [w, T]), M = u((t) => {
|
|
39
|
-
let n = (w.getQueryData(T) ?? []).filter((e) => e.status === "uploading").length;
|
|
40
|
-
if (t.length + n > 10) {
|
|
41
|
-
e.error(n > 0 ? b(10 - n) : y(10));
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
O(!1);
|
|
45
|
-
for (let e of t) {
|
|
46
|
-
let t = crypto.randomUUID();
|
|
47
|
-
w.setQueryData(T, (n) => [...n ?? [], {
|
|
48
|
-
localId: t,
|
|
49
|
-
fileName: e.name,
|
|
50
|
-
status: "uploading"
|
|
51
|
-
}]), E.mutateAsync({ file: e }).then((e) => A(t, { payableId: e?.id })).catch(() => A(t, { status: "failed" }));
|
|
52
|
-
}
|
|
53
|
-
}, [
|
|
54
|
-
A,
|
|
55
|
-
w,
|
|
56
|
-
T,
|
|
57
|
-
b,
|
|
58
|
-
y,
|
|
59
|
-
E
|
|
60
|
-
]), N = s({ payableIds: k.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
|
|
61
|
-
d(() => {
|
|
62
|
-
let e = /* @__PURE__ */ new Set();
|
|
63
|
-
for (let t of N) if (t.suspectedDuplicateOf.length !== 0) {
|
|
64
|
-
e.add(t.payableId);
|
|
65
|
-
for (let n of t.suspectedDuplicateOf) e.add(n);
|
|
66
|
-
}
|
|
67
|
-
for (let { payableId: t, ocrStatus: n, isError: r } of N) {
|
|
68
|
-
let i = k.find((e) => e.payableId === t && e.status === "uploading");
|
|
69
|
-
i && (n === "success" ? A(i.localId, { status: e.has(t) ? "duplicate" : "ready" }) : (r || n === "error" || n === "canceled") && A(i.localId, { status: "failed" }));
|
|
70
|
-
}
|
|
71
|
-
for (let t of k) t.status === "ready" && t.payableId && e.has(t.payableId) && A(t.localId, { status: "duplicate" });
|
|
72
|
-
}, [
|
|
73
|
-
k,
|
|
74
|
-
N,
|
|
75
|
-
A
|
|
76
|
-
]);
|
|
77
|
-
let P = k.filter((e) => e.status === "uploading"), F = k.filter((e) => e.status === "ready"), I = k.filter((e) => e.status === "duplicate"), L = k.filter((e) => e.status === "failed"), R = (t) => ({
|
|
78
|
-
id: t.localId,
|
|
79
|
-
fileName: t.fileName,
|
|
80
|
-
status: t.status,
|
|
81
|
-
onOpen: (t.status === "ready" || t.status === "duplicate") && t.payableId && g ? () => {
|
|
82
|
-
let o = t.payableId;
|
|
83
|
-
w.fetchQuery({
|
|
84
|
-
...i(r({
|
|
85
|
-
client: x,
|
|
86
|
-
headers: n(S),
|
|
87
|
-
path: { payable_id: o }
|
|
88
|
-
}), C),
|
|
89
|
-
retry: !1
|
|
90
|
-
}).catch((e) => {
|
|
91
|
-
if (a(e)) return "deleted";
|
|
92
|
-
}).then((n) => {
|
|
93
|
-
n === "deleted" ? e.error(v.billDeletedError) : g(o), j(t.localId);
|
|
94
|
-
});
|
|
95
|
-
} : void 0
|
|
96
|
-
}), z = P.length ? [{
|
|
97
|
-
id: "in-progress",
|
|
98
|
-
items: k.map(R)
|
|
99
|
-
}] : [
|
|
100
|
-
...F.length ? [{
|
|
101
|
-
id: "ready",
|
|
102
|
-
caption: v.readyCaption(F.length),
|
|
103
|
-
items: F.map(R)
|
|
104
|
-
}] : [],
|
|
105
|
-
...I.length ? [{
|
|
106
|
-
id: "duplicate",
|
|
107
|
-
caption: v.duplicateCaption(I.length),
|
|
108
|
-
items: I.map(R)
|
|
109
|
-
}] : [],
|
|
110
|
-
...L.length ? [{
|
|
111
|
-
id: "failed",
|
|
112
|
-
caption: v.failedCaption(L.length),
|
|
113
|
-
items: L.map(R)
|
|
114
|
-
}] : []
|
|
115
|
-
], B = F.length + I.length, V = P.length ? v.uploadingSummary(k.length) : B ? v.completeSummary(B) : v.failedCaption(L.length), H = u(() => {
|
|
116
|
-
w.setQueryData(T, []);
|
|
117
|
-
}, [w, T]);
|
|
118
|
-
return {
|
|
119
|
-
enqueue: M,
|
|
120
|
-
sections: z,
|
|
121
|
-
summaryLabel: V,
|
|
122
|
-
collapsed: D,
|
|
123
|
-
onToggleCollapsed: u(() => O((e) => !e), []),
|
|
124
|
-
onClose: H,
|
|
125
|
-
isVisible: k.length > 0
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
//#endregion
|
|
129
|
-
export { g as useBillUploadQueue };
|
|
1
|
+
import "./index68.js";
|
|
2
|
+
import "./index69.js";
|
|
3
|
+
import "./index70.js";
|
|
@@ -1,3 +1,127 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index81.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js
|
|
4
|
+
var t = {
|
|
5
|
+
Drafts: "drafts",
|
|
6
|
+
Pending: "pending",
|
|
7
|
+
Scheduled: "scheduled",
|
|
8
|
+
Paid: "paid",
|
|
9
|
+
All: "all"
|
|
10
|
+
}, n = {
|
|
11
|
+
[t.Drafts]: ["draft", "new"],
|
|
12
|
+
[t.Pending]: [
|
|
13
|
+
"approve_in_progress",
|
|
14
|
+
"waiting_to_be_paid",
|
|
15
|
+
"partially_paid"
|
|
16
|
+
],
|
|
17
|
+
[t.Scheduled]: [
|
|
18
|
+
"new",
|
|
19
|
+
"approve_in_progress",
|
|
20
|
+
"waiting_to_be_paid",
|
|
21
|
+
"partially_paid"
|
|
22
|
+
],
|
|
23
|
+
[t.Paid]: ["paid"],
|
|
24
|
+
[t.All]: void 0
|
|
25
|
+
}, r = {
|
|
26
|
+
[t.Drafts]: void 0,
|
|
27
|
+
[t.Pending]: !1,
|
|
28
|
+
[t.Scheduled]: !0,
|
|
29
|
+
[t.Paid]: void 0,
|
|
30
|
+
[t.All]: void 0
|
|
31
|
+
};
|
|
32
|
+
function i(e) {
|
|
33
|
+
return e === t.Pending || e === t.Drafts;
|
|
34
|
+
}
|
|
35
|
+
var a = t.Drafts, o = [
|
|
36
|
+
t.Drafts,
|
|
37
|
+
t.Pending,
|
|
38
|
+
t.Scheduled,
|
|
39
|
+
t.Paid,
|
|
40
|
+
t.All
|
|
41
|
+
], s = {
|
|
42
|
+
[t.Drafts]: [
|
|
43
|
+
e.Vendor,
|
|
44
|
+
e.Attachment,
|
|
45
|
+
e.IssueDate,
|
|
46
|
+
e.DueDate,
|
|
47
|
+
e.Status,
|
|
48
|
+
e.AmountDue,
|
|
49
|
+
e.TotalAmount,
|
|
50
|
+
e.AddedOn
|
|
51
|
+
],
|
|
52
|
+
[t.Pending]: [
|
|
53
|
+
e.Vendor,
|
|
54
|
+
e.Attachment,
|
|
55
|
+
e.IssueDate,
|
|
56
|
+
e.DueDate,
|
|
57
|
+
e.Status,
|
|
58
|
+
e.AmountDue,
|
|
59
|
+
e.TotalAmount,
|
|
60
|
+
e.AddedOn
|
|
61
|
+
],
|
|
62
|
+
[t.Scheduled]: [
|
|
63
|
+
e.Vendor,
|
|
64
|
+
e.Attachment,
|
|
65
|
+
e.IssueDate,
|
|
66
|
+
e.DueDate,
|
|
67
|
+
e.ScheduledDate,
|
|
68
|
+
e.Status,
|
|
69
|
+
e.AmountScheduled,
|
|
70
|
+
e.TotalAmount,
|
|
71
|
+
e.AddedOn
|
|
72
|
+
],
|
|
73
|
+
[t.Paid]: [
|
|
74
|
+
e.Vendor,
|
|
75
|
+
e.Attachment,
|
|
76
|
+
e.IssueDate,
|
|
77
|
+
e.DueDate,
|
|
78
|
+
e.PaidDate,
|
|
79
|
+
e.Status,
|
|
80
|
+
e.AmountPaid,
|
|
81
|
+
e.TotalAmount,
|
|
82
|
+
e.AddedOn
|
|
83
|
+
],
|
|
84
|
+
[t.All]: [
|
|
85
|
+
e.Vendor,
|
|
86
|
+
e.Attachment,
|
|
87
|
+
e.IssueDate,
|
|
88
|
+
e.DueDate,
|
|
89
|
+
e.ScheduledDate,
|
|
90
|
+
e.Status,
|
|
91
|
+
e.AmountDue,
|
|
92
|
+
e.AmountPaid,
|
|
93
|
+
e.TotalAmount,
|
|
94
|
+
e.AddedOn
|
|
95
|
+
]
|
|
96
|
+
};
|
|
97
|
+
function c(e) {
|
|
98
|
+
return s[e];
|
|
99
|
+
}
|
|
100
|
+
function l(e) {
|
|
101
|
+
let t = n[e];
|
|
102
|
+
return t ? [...t] : void 0;
|
|
103
|
+
}
|
|
104
|
+
function u(e) {
|
|
105
|
+
return r[e];
|
|
106
|
+
}
|
|
107
|
+
var d = {
|
|
108
|
+
vendorLabel: "counterpart_name",
|
|
109
|
+
issueDateLabel: "issued_at",
|
|
110
|
+
dueDateLabel: "due_date",
|
|
111
|
+
scheduledDateLabel: "scheduled_payment_date",
|
|
112
|
+
addedOnLabel: "created_at"
|
|
113
|
+
}, f = {
|
|
114
|
+
[e.Vendor]: "vendorLabel",
|
|
115
|
+
[e.IssueDate]: "issueDateLabel",
|
|
116
|
+
[e.DueDate]: "dueDateLabel",
|
|
117
|
+
[e.ScheduledDate]: "scheduledDateLabel",
|
|
118
|
+
[e.AddedOn]: "addedOnLabel"
|
|
119
|
+
};
|
|
120
|
+
function p(e) {
|
|
121
|
+
return f[e];
|
|
122
|
+
}
|
|
123
|
+
function m(e) {
|
|
124
|
+
if (e) return d[e];
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { s as BILL_QUEUE_COLUMNS, r as BILL_QUEUE_HAS_SCHEDULED_PAYMENT, o as BILL_QUEUE_ORDER, n as BILL_QUEUE_STATUSES, d as BILL_SORT_FIELDS, t as BillQueue, a as DEFAULT_BILL_QUEUE, c as billQueueColumns, u as billQueueHasScheduledPayment, i as billQueueOffersAddPanel, l as billQueueStatuses, p as billSortColumnId, m as billSortField };
|
|
@@ -1,127 +1,11 @@
|
|
|
1
|
-
import { BillColumn as e } from "../../ui/dist/index81.js";
|
|
2
|
-
import "../../ui/dist/index.js";
|
|
3
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
[t.Drafts]: ["draft", "new"],
|
|
12
|
-
[t.Pending]: [
|
|
13
|
-
"approve_in_progress",
|
|
14
|
-
"waiting_to_be_paid",
|
|
15
|
-
"partially_paid"
|
|
16
|
-
],
|
|
17
|
-
[t.Scheduled]: [
|
|
18
|
-
"new",
|
|
19
|
-
"approve_in_progress",
|
|
20
|
-
"waiting_to_be_paid",
|
|
21
|
-
"partially_paid"
|
|
22
|
-
],
|
|
23
|
-
[t.Paid]: ["paid"],
|
|
24
|
-
[t.All]: void 0
|
|
25
|
-
}, r = {
|
|
26
|
-
[t.Drafts]: void 0,
|
|
27
|
-
[t.Pending]: !1,
|
|
28
|
-
[t.Scheduled]: !0,
|
|
29
|
-
[t.Paid]: void 0,
|
|
30
|
-
[t.All]: void 0
|
|
31
|
-
};
|
|
32
|
-
function i(e) {
|
|
33
|
-
return e === t.Pending || e === t.Drafts;
|
|
34
|
-
}
|
|
35
|
-
var a = t.Drafts, o = [
|
|
36
|
-
t.Drafts,
|
|
37
|
-
t.Pending,
|
|
38
|
-
t.Scheduled,
|
|
39
|
-
t.Paid,
|
|
40
|
-
t.All
|
|
41
|
-
], s = {
|
|
42
|
-
[t.Drafts]: [
|
|
43
|
-
e.Vendor,
|
|
44
|
-
e.Attachment,
|
|
45
|
-
e.IssueDate,
|
|
46
|
-
e.DueDate,
|
|
47
|
-
e.Status,
|
|
48
|
-
e.AmountDue,
|
|
49
|
-
e.TotalAmount,
|
|
50
|
-
e.AddedOn
|
|
51
|
-
],
|
|
52
|
-
[t.Pending]: [
|
|
53
|
-
e.Vendor,
|
|
54
|
-
e.Attachment,
|
|
55
|
-
e.IssueDate,
|
|
56
|
-
e.DueDate,
|
|
57
|
-
e.Status,
|
|
58
|
-
e.AmountDue,
|
|
59
|
-
e.TotalAmount,
|
|
60
|
-
e.AddedOn
|
|
61
|
-
],
|
|
62
|
-
[t.Scheduled]: [
|
|
63
|
-
e.Vendor,
|
|
64
|
-
e.Attachment,
|
|
65
|
-
e.IssueDate,
|
|
66
|
-
e.DueDate,
|
|
67
|
-
e.ScheduledDate,
|
|
68
|
-
e.Status,
|
|
69
|
-
e.AmountScheduled,
|
|
70
|
-
e.TotalAmount,
|
|
71
|
-
e.AddedOn
|
|
72
|
-
],
|
|
73
|
-
[t.Paid]: [
|
|
74
|
-
e.Vendor,
|
|
75
|
-
e.Attachment,
|
|
76
|
-
e.IssueDate,
|
|
77
|
-
e.DueDate,
|
|
78
|
-
e.PaidDate,
|
|
79
|
-
e.Status,
|
|
80
|
-
e.AmountPaid,
|
|
81
|
-
e.TotalAmount,
|
|
82
|
-
e.AddedOn
|
|
83
|
-
],
|
|
84
|
-
[t.All]: [
|
|
85
|
-
e.Vendor,
|
|
86
|
-
e.Attachment,
|
|
87
|
-
e.IssueDate,
|
|
88
|
-
e.DueDate,
|
|
89
|
-
e.ScheduledDate,
|
|
90
|
-
e.Status,
|
|
91
|
-
e.AmountDue,
|
|
92
|
-
e.AmountPaid,
|
|
93
|
-
e.TotalAmount,
|
|
94
|
-
e.AddedOn
|
|
95
|
-
]
|
|
96
|
-
};
|
|
97
|
-
function c(e) {
|
|
98
|
-
return s[e];
|
|
99
|
-
}
|
|
100
|
-
function l(e) {
|
|
101
|
-
let t = n[e];
|
|
102
|
-
return t ? [...t] : void 0;
|
|
103
|
-
}
|
|
104
|
-
function u(e) {
|
|
105
|
-
return r[e];
|
|
106
|
-
}
|
|
107
|
-
var d = {
|
|
108
|
-
vendorLabel: "counterpart_name",
|
|
109
|
-
issueDateLabel: "issued_at",
|
|
110
|
-
dueDateLabel: "due_date",
|
|
111
|
-
scheduledDateLabel: "scheduled_payment_date",
|
|
112
|
-
addedOnLabel: "created_at"
|
|
113
|
-
}, f = {
|
|
114
|
-
[e.Vendor]: "vendorLabel",
|
|
115
|
-
[e.IssueDate]: "issueDateLabel",
|
|
116
|
-
[e.DueDate]: "dueDateLabel",
|
|
117
|
-
[e.ScheduledDate]: "scheduledDateLabel",
|
|
118
|
-
[e.AddedOn]: "addedOnLabel"
|
|
119
|
-
};
|
|
120
|
-
function p(e) {
|
|
121
|
-
return f[e];
|
|
122
|
-
}
|
|
123
|
-
function m(e) {
|
|
124
|
-
if (e) return d[e];
|
|
2
|
+
async function e(e) {
|
|
3
|
+
if (!e.trim()) return !1;
|
|
4
|
+
try {
|
|
5
|
+
return await navigator.clipboard.writeText(e), !0;
|
|
6
|
+
} catch {
|
|
7
|
+
return !1;
|
|
8
|
+
}
|
|
125
9
|
}
|
|
126
10
|
//#endregion
|
|
127
|
-
export {
|
|
11
|
+
export { e as copyTextToClipboard };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import "./index10.js";
|
|
2
|
+
import "./index14.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js
|
|
2
|
-
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} catch {
|
|
7
|
-
return !1;
|
|
8
|
-
}
|
|
4
|
+
function e(e, t) {
|
|
5
|
+
if (e.isError) return t.duplicateWarningUnavailable;
|
|
6
|
+
if (e.isCapped) return t.duplicateWarningManyCapped(100);
|
|
7
|
+
if (e.count !== 0) return e.count === 1 ? t.duplicateWarningOne : t.duplicateWarningMany(e.count);
|
|
9
8
|
}
|
|
10
9
|
//#endregion
|
|
11
|
-
export { e as
|
|
10
|
+
export { e as resolveDuplicateWarning };
|
|
@@ -1,10 +1,49 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./index14.js";
|
|
1
|
+
import { BillQueue as e } from "./index72.js";
|
|
3
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var t = {
|
|
4
|
+
[e.Drafts]: "Drafts",
|
|
5
|
+
[e.Pending]: "Pending",
|
|
6
|
+
[e.Scheduled]: "Scheduled",
|
|
7
|
+
[e.Paid]: "Paid",
|
|
8
|
+
[e.All]: "All bills"
|
|
9
|
+
}, n = {
|
|
10
|
+
[e.Drafts]: {
|
|
11
|
+
title: "No drafts",
|
|
12
|
+
description: "Bills wait here until someone submits them for approval."
|
|
13
|
+
},
|
|
14
|
+
[e.Pending]: {
|
|
15
|
+
title: "Nothing to act on",
|
|
16
|
+
description: "Every bill has been paid, scheduled, or is still a draft."
|
|
17
|
+
},
|
|
18
|
+
[e.Scheduled]: {
|
|
19
|
+
title: "No scheduled bills",
|
|
20
|
+
description: "Bills appear here once a payment date is set for them."
|
|
21
|
+
},
|
|
22
|
+
[e.Paid]: {
|
|
23
|
+
title: "No paid bills",
|
|
24
|
+
description: "Bills appear here once their payment has gone out."
|
|
25
|
+
},
|
|
26
|
+
[e.All]: {
|
|
27
|
+
title: "No bills",
|
|
28
|
+
description: "Bills appear here as soon as they are added."
|
|
29
|
+
}
|
|
30
|
+
}, r = {
|
|
31
|
+
duplicateWarningOne: "1 possible duplicate bill found",
|
|
32
|
+
duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
|
|
33
|
+
duplicateWarningManyCapped: (e) => `${e}+ possible duplicate bills found`,
|
|
34
|
+
duplicateWarningUnavailable: "Couldn't check for possible duplicates. Try again shortly.",
|
|
35
|
+
duplicateRowNote: "Possible duplicate",
|
|
36
|
+
attachmentIndicator: "Has an attachment",
|
|
37
|
+
emptyHeading: "Add your first bill",
|
|
38
|
+
nonEmptyHeading: "Add a bill",
|
|
39
|
+
createButton: "Add bill",
|
|
40
|
+
settingsButton: "Bill pay settings",
|
|
41
|
+
emailCopiedToast: "Email address copied to clipboard",
|
|
42
|
+
emailCopyFailedToast: "Could not copy the email address",
|
|
43
|
+
queues: t,
|
|
44
|
+
queueEmptyStates: n,
|
|
45
|
+
filters: {},
|
|
46
|
+
filterBar: {}
|
|
47
|
+
};
|
|
9
48
|
//#endregion
|
|
10
|
-
export {
|
|
49
|
+
export { r as BILLS_TAB_LABELS_EN, n as BILL_QUEUE_EMPTY_STATES_EN, t as BILL_QUEUE_LABELS_EN };
|
|
@@ -1,49 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BillColumn as e } from "../../ui/dist/index81.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
2
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js
|
|
3
4
|
var t = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[e.Paid]: "Paid",
|
|
8
|
-
[e.All]: "All bills"
|
|
5
|
+
root: "bill-pay-bills-tab",
|
|
6
|
+
uploadTray: "bill-pay-upload-tray",
|
|
7
|
+
detailsSheet: "bill-pay-details-sheet"
|
|
9
8
|
}, n = {
|
|
10
|
-
[e.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[e.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
[e.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[e.Paid]: {
|
|
23
|
-
title: "No paid bills",
|
|
24
|
-
description: "Bills appear here once their payment has gone out."
|
|
25
|
-
},
|
|
26
|
-
[e.All]: {
|
|
27
|
-
title: "No bills",
|
|
28
|
-
description: "Bills appear here as soon as they are added."
|
|
29
|
-
}
|
|
30
|
-
}, r = {
|
|
31
|
-
duplicateWarningOne: "1 possible duplicate bill found",
|
|
32
|
-
duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
|
|
33
|
-
duplicateWarningManyCapped: (e) => `${e}+ possible duplicate bills found`,
|
|
34
|
-
duplicateWarningUnavailable: "Couldn't check for possible duplicates. Try again shortly.",
|
|
35
|
-
duplicateRowNote: "Possible duplicate",
|
|
36
|
-
attachmentIndicator: "Has an attachment",
|
|
37
|
-
emptyHeading: "Add your first bill",
|
|
38
|
-
nonEmptyHeading: "Add a bill",
|
|
39
|
-
createButton: "Add bill",
|
|
40
|
-
settingsButton: "Bill pay settings",
|
|
41
|
-
emailCopiedToast: "Email address copied to clipboard",
|
|
42
|
-
emailCopyFailedToast: "Could not copy the email address",
|
|
43
|
-
queues: t,
|
|
44
|
-
queueEmptyStates: n,
|
|
45
|
-
filters: {},
|
|
46
|
-
filterBar: {}
|
|
9
|
+
[e.Vendor]: "bill-pay-bills-cell-vendor",
|
|
10
|
+
[e.Attachment]: "bill-pay-bills-cell-attachment",
|
|
11
|
+
[e.IssueDate]: "bill-pay-bills-cell-issue-date",
|
|
12
|
+
[e.DueDate]: "bill-pay-bills-cell-due-date",
|
|
13
|
+
[e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
|
|
14
|
+
[e.PaidDate]: "bill-pay-bills-cell-paid-date",
|
|
15
|
+
[e.Status]: "bill-pay-bills-cell-status",
|
|
16
|
+
[e.AmountDue]: "bill-pay-bills-cell-amount-due",
|
|
17
|
+
[e.AmountScheduled]: "bill-pay-bills-cell-amount-scheduled",
|
|
18
|
+
[e.AmountPaid]: "bill-pay-bills-cell-amount-paid",
|
|
19
|
+
[e.TotalAmount]: "bill-pay-bills-cell-total-amount",
|
|
20
|
+
[e.AddedOn]: "bill-pay-bills-cell-added-on"
|
|
47
21
|
};
|
|
48
22
|
//#endregion
|
|
49
|
-
export {
|
|
23
|
+
export { t as billsTabTestIds, n as billsTableCellTestIds };
|