@tesouro/embedded-components-react 0.5.3 → 0.5.4
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +70 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +37 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +110 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +73 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +7 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +21 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +22 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +63 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +2 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +81 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +32 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +166 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +39 -164
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +50 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +11 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +59 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +139 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +16 -139
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +41 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +14 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +8 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +91 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +86 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +3 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +49 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +135 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +33 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +186 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +75 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +21 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +232 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +210 -223
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +103 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -121
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +31 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +198 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +31 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +19 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +24 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +427 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -433
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +38 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +220 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -224
- 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 +10 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +57 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +110 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -112
- 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 +46 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
- 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/index8.js +5 -58
- 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 +101 -239
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +202 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -209
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +4 -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/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
|
@@ -2,114 +2,209 @@
|
|
|
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 {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
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 ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { useDuplicateBillsCount as i } from "./index10.js";
|
|
13
|
+
import { AddBillDialog as a } from "../../ui/dist/index10.js";
|
|
14
|
+
import { BillsScreen as o } from "../../ui/dist/index76.js";
|
|
15
|
+
import "../../ui/dist/index.js";
|
|
16
|
+
import { DuplicateBillsContainer as te } from "./index12.js";
|
|
17
|
+
import "./index14.js";
|
|
18
|
+
import { BillCreateDialog as s } from "./index60.js";
|
|
19
|
+
import "./index61.js";
|
|
20
|
+
import { BillDetailsContainer as c } from "./index63.js";
|
|
21
|
+
import "./index64.js";
|
|
22
|
+
import "./index70.js";
|
|
23
|
+
import "./index71.js";
|
|
24
|
+
import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index72.js";
|
|
25
|
+
import { BILLS_TAB_LABELS_EN as d } from "./index75.js";
|
|
26
|
+
import { useBillsTable as f } from "./index81.js";
|
|
27
|
+
import { copyTextToClipboard as p } from "./index73.js";
|
|
28
|
+
import { resolveDuplicateWarning as m } from "./index74.js";
|
|
29
|
+
import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index76.js";
|
|
30
|
+
import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
|
|
31
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
32
|
+
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
16
33
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
onNextPage: ee,
|
|
111
|
-
onPrevPage: te
|
|
34
|
+
var T = "bills@business-banking.app", E = {
|
|
35
|
+
[u.Drafts]: /* @__PURE__ */ v(S, {
|
|
36
|
+
className: "ttw:size-4",
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
}),
|
|
39
|
+
[u.Pending]: /* @__PURE__ */ v(w, {
|
|
40
|
+
className: "ttw:size-4",
|
|
41
|
+
"aria-hidden": !0
|
|
42
|
+
}),
|
|
43
|
+
[u.Scheduled]: /* @__PURE__ */ v(b, {
|
|
44
|
+
className: "ttw:size-4",
|
|
45
|
+
"aria-hidden": !0
|
|
46
|
+
}),
|
|
47
|
+
[u.Paid]: /* @__PURE__ */ v(x, {
|
|
48
|
+
className: "ttw:size-4",
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
}),
|
|
51
|
+
[u.All]: /* @__PURE__ */ v(C, {
|
|
52
|
+
className: "ttw:size-4",
|
|
53
|
+
"aria-hidden": !0
|
|
54
|
+
})
|
|
55
|
+
};
|
|
56
|
+
function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
|
|
57
|
+
let w = g(() => ({
|
|
58
|
+
...d,
|
|
59
|
+
...u,
|
|
60
|
+
queues: {
|
|
61
|
+
...d.queues,
|
|
62
|
+
...u?.queues
|
|
63
|
+
},
|
|
64
|
+
filters: {
|
|
65
|
+
...d.filters,
|
|
66
|
+
...u?.filters,
|
|
67
|
+
presets: {
|
|
68
|
+
...d.filters.presets,
|
|
69
|
+
...u?.filters?.presets
|
|
70
|
+
},
|
|
71
|
+
statuses: {
|
|
72
|
+
...d.filters.statuses,
|
|
73
|
+
...u?.filters?.statuses
|
|
74
|
+
},
|
|
75
|
+
dateFieldNames: {
|
|
76
|
+
...d.filters.dateFieldNames,
|
|
77
|
+
...u?.filters?.dateFieldNames
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
filterBar: {
|
|
81
|
+
...d.filterBar,
|
|
82
|
+
...u?.filterBar
|
|
83
|
+
},
|
|
84
|
+
queueEmptyStates: l.reduce((e, t) => ({
|
|
85
|
+
...e,
|
|
86
|
+
[t]: {
|
|
87
|
+
...d.queueEmptyStates[t],
|
|
88
|
+
...u?.queueEmptyStates?.[t]
|
|
89
|
+
}
|
|
90
|
+
}), {})
|
|
91
|
+
}), [u]), [D, O] = _(!1), [ae, k] = _(), [A, j] = _(!1), [M, N] = _(), [P, F] = _(!1), [I, L] = _(!1), [R, z] = _(!1), { initResponse: B } = ee(), V = r(), H = t(B?.scopes, [n.PayableReadOrg]), U = t(B?.scopes, [n.PayableWriteOrg]), W = !B || H, G = !B || U, K = re((e, t) => {
|
|
92
|
+
if (t && G) {
|
|
93
|
+
k(e), j(!0);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
N(e), F(!0);
|
|
97
|
+
}, [G]), q = t(B?.scopes, [n.CounterpartReadOrg]), J = f({
|
|
98
|
+
enabled: W,
|
|
99
|
+
canReadVendors: q,
|
|
100
|
+
isVendorFilterPaused: V,
|
|
101
|
+
filterLabels: w.filters,
|
|
102
|
+
onOpenBill: K,
|
|
103
|
+
duplicateBadgeLabel: w.duplicateBadge,
|
|
104
|
+
attachmentLabel: w.attachmentIndicator
|
|
105
|
+
}), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
|
|
106
|
+
id: e,
|
|
107
|
+
label: w.queues[e],
|
|
108
|
+
icon: E[e]
|
|
109
|
+
})), [w.queues]), ce = (e) => {
|
|
110
|
+
z(!1), N(e), F(!0);
|
|
111
|
+
}, le = () => {
|
|
112
|
+
F(!1), L(!0);
|
|
113
|
+
}, X = () => {
|
|
114
|
+
L(!1), F(!0);
|
|
115
|
+
}, ue = g(() => ({
|
|
116
|
+
createButton: w.createButton,
|
|
117
|
+
addBill: { heading: w.nonEmptyHeading }
|
|
118
|
+
}), [w.createButton, w.nonEmptyHeading]), de = g(() => ({
|
|
119
|
+
...J.filterBarProps,
|
|
120
|
+
labels: w.filterBar
|
|
121
|
+
}), [J.filterBarProps, w.filterBar]), Z = () => {
|
|
122
|
+
O(!1), k(void 0), j(!0);
|
|
123
|
+
}, Q = (e) => {
|
|
124
|
+
O(!1), b?.(e);
|
|
125
|
+
}, $ = async () => {
|
|
126
|
+
await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
|
|
112
127
|
};
|
|
128
|
+
return ie(() => {
|
|
129
|
+
x && (k(x), j(!0), S?.());
|
|
130
|
+
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
131
|
+
"data-testid": h.root,
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ v(o, {
|
|
134
|
+
rows: J.rows,
|
|
135
|
+
isLoading: J.isLoading || !B,
|
|
136
|
+
isError: J.isError,
|
|
137
|
+
onRetry: J.onRetry,
|
|
138
|
+
sorting: J.sorting,
|
|
139
|
+
onSortingChange: J.onSortingChange,
|
|
140
|
+
pageSize: J.pageSize,
|
|
141
|
+
onPageSizeChange: J.onPageSizeChange,
|
|
142
|
+
hasNextPage: J.hasNextPage,
|
|
143
|
+
hasPrevPage: J.hasPrevPage,
|
|
144
|
+
onNextPage: J.onNextPage,
|
|
145
|
+
onPrevPage: J.onPrevPage,
|
|
146
|
+
filterTabs: se,
|
|
147
|
+
selectedFilterTabId: J.selectedFilterTabId,
|
|
148
|
+
onFilterTabChange: J.onFilterTabChange,
|
|
149
|
+
searchValue: J.searchValue,
|
|
150
|
+
onSearchChange: J.onSearchChange,
|
|
151
|
+
filters: de,
|
|
152
|
+
visibleColumns: J.visibleColumns,
|
|
153
|
+
cellTestIds: ne,
|
|
154
|
+
isSearchActive: J.isSearchActive,
|
|
155
|
+
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
156
|
+
emptyState: w.queueEmptyStates[J.selectedFilterTabId],
|
|
157
|
+
onCreateClick: G ? () => O(!0) : void 0,
|
|
158
|
+
onEnterManually: G ? Z : void 0,
|
|
159
|
+
onFilesSelected: G ? Q : void 0,
|
|
160
|
+
maxFiles: 10,
|
|
161
|
+
emailAddress: T,
|
|
162
|
+
onCopyEmail: $,
|
|
163
|
+
duplicateWarning: oe,
|
|
164
|
+
onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
|
|
165
|
+
labels: ue
|
|
166
|
+
}),
|
|
167
|
+
R ? /* @__PURE__ */ v(te, {
|
|
168
|
+
open: R,
|
|
169
|
+
onOpenChange: z,
|
|
170
|
+
enabled: W,
|
|
171
|
+
canManageDuplicates: G,
|
|
172
|
+
onOpenBill: ce
|
|
173
|
+
}) : null,
|
|
174
|
+
G ? /* @__PURE__ */ v(a, {
|
|
175
|
+
open: D,
|
|
176
|
+
onOpenChange: O,
|
|
177
|
+
onFilesSelected: Q,
|
|
178
|
+
maxFiles: 10,
|
|
179
|
+
onEnterManually: Z,
|
|
180
|
+
emailAddress: T,
|
|
181
|
+
onCopyEmail: $,
|
|
182
|
+
labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
183
|
+
}) : null,
|
|
184
|
+
A ? /* @__PURE__ */ v(s, {
|
|
185
|
+
open: A,
|
|
186
|
+
onOpenChange: j,
|
|
187
|
+
payableId: ae
|
|
188
|
+
}) : null,
|
|
189
|
+
P ? /* @__PURE__ */ v(c, {
|
|
190
|
+
open: P,
|
|
191
|
+
onOpenChange: F,
|
|
192
|
+
payableId: M,
|
|
193
|
+
onClose: () => F(!1),
|
|
194
|
+
onExpand: le,
|
|
195
|
+
testId: h.detailsSheet,
|
|
196
|
+
poweredByBankName: C
|
|
197
|
+
}) : null,
|
|
198
|
+
I ? /* @__PURE__ */ v(s, {
|
|
199
|
+
open: I,
|
|
200
|
+
onOpenChange: L,
|
|
201
|
+
payableId: M,
|
|
202
|
+
readOnly: !0,
|
|
203
|
+
onCollapse: X,
|
|
204
|
+
poweredByBankName: C
|
|
205
|
+
}) : null
|
|
206
|
+
]
|
|
207
|
+
});
|
|
113
208
|
}
|
|
114
209
|
//#endregion
|
|
115
|
-
export {
|
|
210
|
+
export { D as BillsTab, D as default };
|
|
@@ -1,210 +1,4 @@
|
|
|
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 { 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 ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { useDuplicateBillsCount as i } from "./index11.js";
|
|
13
|
-
import { AddBillDialog as a } from "../../ui/dist/index10.js";
|
|
14
|
-
import { BillsScreen as o } from "../../ui/dist/index76.js";
|
|
15
|
-
import "../../ui/dist/index.js";
|
|
16
|
-
import { DuplicateBillsContainer as te } from "./index13.js";
|
|
17
|
-
import "./index15.js";
|
|
18
|
-
import { BillCreateDialog as s } from "./index61.js";
|
|
19
|
-
import "./index62.js";
|
|
20
|
-
import { BillDetailsContainer as c } from "./index64.js";
|
|
21
|
-
import "./index65.js";
|
|
22
|
-
import "./index71.js";
|
|
23
1
|
import "./index72.js";
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { copyTextToClipboard as p } from "./index74.js";
|
|
28
|
-
import { resolveDuplicateWarning as m } from "./index75.js";
|
|
29
|
-
import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index77.js";
|
|
30
|
-
import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
|
|
31
|
-
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
32
|
-
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
33
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js
|
|
34
|
-
var T = "bills@business-banking.app", E = {
|
|
35
|
-
[u.Drafts]: /* @__PURE__ */ v(S, {
|
|
36
|
-
className: "ttw:size-4",
|
|
37
|
-
"aria-hidden": !0
|
|
38
|
-
}),
|
|
39
|
-
[u.Pending]: /* @__PURE__ */ v(w, {
|
|
40
|
-
className: "ttw:size-4",
|
|
41
|
-
"aria-hidden": !0
|
|
42
|
-
}),
|
|
43
|
-
[u.Scheduled]: /* @__PURE__ */ v(b, {
|
|
44
|
-
className: "ttw:size-4",
|
|
45
|
-
"aria-hidden": !0
|
|
46
|
-
}),
|
|
47
|
-
[u.Paid]: /* @__PURE__ */ v(x, {
|
|
48
|
-
className: "ttw:size-4",
|
|
49
|
-
"aria-hidden": !0
|
|
50
|
-
}),
|
|
51
|
-
[u.All]: /* @__PURE__ */ v(C, {
|
|
52
|
-
className: "ttw:size-4",
|
|
53
|
-
"aria-hidden": !0
|
|
54
|
-
})
|
|
55
|
-
};
|
|
56
|
-
function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
|
|
57
|
-
let w = g(() => ({
|
|
58
|
-
...d,
|
|
59
|
-
...u,
|
|
60
|
-
queues: {
|
|
61
|
-
...d.queues,
|
|
62
|
-
...u?.queues
|
|
63
|
-
},
|
|
64
|
-
filters: {
|
|
65
|
-
...d.filters,
|
|
66
|
-
...u?.filters,
|
|
67
|
-
presets: {
|
|
68
|
-
...d.filters.presets,
|
|
69
|
-
...u?.filters?.presets
|
|
70
|
-
},
|
|
71
|
-
statuses: {
|
|
72
|
-
...d.filters.statuses,
|
|
73
|
-
...u?.filters?.statuses
|
|
74
|
-
},
|
|
75
|
-
dateFieldNames: {
|
|
76
|
-
...d.filters.dateFieldNames,
|
|
77
|
-
...u?.filters?.dateFieldNames
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
filterBar: {
|
|
81
|
-
...d.filterBar,
|
|
82
|
-
...u?.filterBar
|
|
83
|
-
},
|
|
84
|
-
queueEmptyStates: l.reduce((e, t) => ({
|
|
85
|
-
...e,
|
|
86
|
-
[t]: {
|
|
87
|
-
...d.queueEmptyStates[t],
|
|
88
|
-
...u?.queueEmptyStates?.[t]
|
|
89
|
-
}
|
|
90
|
-
}), {})
|
|
91
|
-
}), [u]), [D, O] = _(!1), [ae, k] = _(), [A, j] = _(!1), [M, N] = _(), [P, F] = _(!1), [I, L] = _(!1), [R, z] = _(!1), { initResponse: B } = ee(), V = r(), H = t(B?.scopes, [n.PayableReadOrg]), U = t(B?.scopes, [n.PayableWriteOrg]), W = !B || H, G = !B || U, K = re((e, t) => {
|
|
92
|
-
if (t && G) {
|
|
93
|
-
k(e), j(!0);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
N(e), F(!0);
|
|
97
|
-
}, [G]), q = t(B?.scopes, [n.CounterpartReadOrg]), J = f({
|
|
98
|
-
enabled: W,
|
|
99
|
-
canReadVendors: q,
|
|
100
|
-
isVendorFilterPaused: V,
|
|
101
|
-
filterLabels: w.filters,
|
|
102
|
-
onOpenBill: K,
|
|
103
|
-
duplicateBadgeLabel: w.duplicateBadge,
|
|
104
|
-
attachmentLabel: w.attachmentIndicator
|
|
105
|
-
}), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
|
|
106
|
-
id: e,
|
|
107
|
-
label: w.queues[e],
|
|
108
|
-
icon: E[e]
|
|
109
|
-
})), [w.queues]), ce = (e) => {
|
|
110
|
-
z(!1), N(e), F(!0);
|
|
111
|
-
}, le = () => {
|
|
112
|
-
F(!1), L(!0);
|
|
113
|
-
}, X = () => {
|
|
114
|
-
L(!1), F(!0);
|
|
115
|
-
}, ue = g(() => ({
|
|
116
|
-
createButton: w.createButton,
|
|
117
|
-
addBill: { heading: w.nonEmptyHeading }
|
|
118
|
-
}), [w.createButton, w.nonEmptyHeading]), de = g(() => ({
|
|
119
|
-
...J.filterBarProps,
|
|
120
|
-
labels: w.filterBar
|
|
121
|
-
}), [J.filterBarProps, w.filterBar]), Z = () => {
|
|
122
|
-
O(!1), k(void 0), j(!0);
|
|
123
|
-
}, Q = (e) => {
|
|
124
|
-
O(!1), b?.(e);
|
|
125
|
-
}, $ = async () => {
|
|
126
|
-
await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
|
|
127
|
-
};
|
|
128
|
-
return ie(() => {
|
|
129
|
-
x && (k(x), j(!0), S?.());
|
|
130
|
-
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
131
|
-
"data-testid": h.root,
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ v(o, {
|
|
134
|
-
rows: J.rows,
|
|
135
|
-
isLoading: J.isLoading || !B,
|
|
136
|
-
isError: J.isError,
|
|
137
|
-
onRetry: J.onRetry,
|
|
138
|
-
sorting: J.sorting,
|
|
139
|
-
onSortingChange: J.onSortingChange,
|
|
140
|
-
pageSize: J.pageSize,
|
|
141
|
-
onPageSizeChange: J.onPageSizeChange,
|
|
142
|
-
hasNextPage: J.hasNextPage,
|
|
143
|
-
hasPrevPage: J.hasPrevPage,
|
|
144
|
-
onNextPage: J.onNextPage,
|
|
145
|
-
onPrevPage: J.onPrevPage,
|
|
146
|
-
filterTabs: se,
|
|
147
|
-
selectedFilterTabId: J.selectedFilterTabId,
|
|
148
|
-
onFilterTabChange: J.onFilterTabChange,
|
|
149
|
-
searchValue: J.searchValue,
|
|
150
|
-
onSearchChange: J.onSearchChange,
|
|
151
|
-
filters: de,
|
|
152
|
-
visibleColumns: J.visibleColumns,
|
|
153
|
-
cellTestIds: ne,
|
|
154
|
-
isSearchActive: J.isSearchActive,
|
|
155
|
-
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
156
|
-
emptyState: w.queueEmptyStates[J.selectedFilterTabId],
|
|
157
|
-
onCreateClick: G ? () => O(!0) : void 0,
|
|
158
|
-
onEnterManually: G ? Z : void 0,
|
|
159
|
-
onFilesSelected: G ? Q : void 0,
|
|
160
|
-
maxFiles: 10,
|
|
161
|
-
emailAddress: T,
|
|
162
|
-
onCopyEmail: $,
|
|
163
|
-
duplicateWarning: oe,
|
|
164
|
-
onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
|
|
165
|
-
labels: ue
|
|
166
|
-
}),
|
|
167
|
-
R ? /* @__PURE__ */ v(te, {
|
|
168
|
-
open: R,
|
|
169
|
-
onOpenChange: z,
|
|
170
|
-
enabled: W,
|
|
171
|
-
canManageDuplicates: G,
|
|
172
|
-
onOpenBill: ce
|
|
173
|
-
}) : null,
|
|
174
|
-
G ? /* @__PURE__ */ v(a, {
|
|
175
|
-
open: D,
|
|
176
|
-
onOpenChange: O,
|
|
177
|
-
onFilesSelected: Q,
|
|
178
|
-
maxFiles: 10,
|
|
179
|
-
onEnterManually: Z,
|
|
180
|
-
emailAddress: T,
|
|
181
|
-
onCopyEmail: $,
|
|
182
|
-
labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
183
|
-
}) : null,
|
|
184
|
-
A ? /* @__PURE__ */ v(s, {
|
|
185
|
-
open: A,
|
|
186
|
-
onOpenChange: j,
|
|
187
|
-
payableId: ae
|
|
188
|
-
}) : null,
|
|
189
|
-
P ? /* @__PURE__ */ v(c, {
|
|
190
|
-
open: P,
|
|
191
|
-
onOpenChange: F,
|
|
192
|
-
payableId: M,
|
|
193
|
-
onClose: () => F(!1),
|
|
194
|
-
onExpand: le,
|
|
195
|
-
testId: h.detailsSheet,
|
|
196
|
-
poweredByBankName: C
|
|
197
|
-
}) : null,
|
|
198
|
-
I ? /* @__PURE__ */ v(s, {
|
|
199
|
-
open: I,
|
|
200
|
-
onOpenChange: L,
|
|
201
|
-
payableId: M,
|
|
202
|
-
readOnly: !0,
|
|
203
|
-
onCollapse: X,
|
|
204
|
-
poweredByBankName: C
|
|
205
|
-
}) : null
|
|
206
|
-
]
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
//#endregion
|
|
210
|
-
export { D as BillsTab, D as default };
|
|
2
|
+
import "./index75.js";
|
|
3
|
+
import "./index81.js";
|
|
4
|
+
import "./index82.js";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js
|
|
2
|
+
var e = {
|
|
3
|
+
bills: "Bills",
|
|
4
|
+
vendors: "Vendors",
|
|
5
|
+
settings: "Settings"
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { e as DEFAULT_TABS_LABELS };
|
|
@@ -1,8 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
9
|
+
import "../../../shared/ui/dist/index.js";
|
|
10
|
+
import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
11
|
+
import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
12
|
+
import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
13
|
+
import "../../../shared/feature/dist/index.js";
|
|
14
|
+
import { BillPayWidgetUi as o } from "../../ui/dist/index53.js";
|
|
15
|
+
import { BillUploadStatusTray as s } from "../../ui/dist/index79.js";
|
|
16
|
+
import "../../ui/dist/index.js";
|
|
17
|
+
import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
|
|
18
|
+
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
19
|
+
import { useBillUploadQueue as l } from "./index70.js";
|
|
20
|
+
import "./index71.js";
|
|
21
|
+
import { billsTabTestIds as u } from "./index76.js";
|
|
22
|
+
import { BillsTab as d } from "./index82.js";
|
|
23
|
+
import "./index83.js";
|
|
24
|
+
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index65.js";
|
|
25
|
+
import { DEFAULT_TABS_LABELS as m } from "./index84.js";
|
|
26
|
+
import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
|
|
27
|
+
import "../../../counterparts-widget/feature/dist/index.js";
|
|
28
|
+
import { useCallback as g, useEffect as _, useState as v } from "react";
|
|
29
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
1
30
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
31
|
+
var S = {
|
|
32
|
+
Bills: "bills",
|
|
33
|
+
Vendors: "vendors",
|
|
34
|
+
Settings: "settings"
|
|
35
|
+
}, C = [
|
|
36
|
+
S.Bills,
|
|
37
|
+
S.Vendors,
|
|
38
|
+
S.Settings
|
|
39
|
+
];
|
|
40
|
+
function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
|
|
41
|
+
let O = r();
|
|
42
|
+
_(() => {
|
|
43
|
+
O(f.Mounted);
|
|
44
|
+
}, [O]);
|
|
45
|
+
let k = {
|
|
46
|
+
...m,
|
|
47
|
+
...p
|
|
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
|
+
P(S.Bills), I(e);
|
|
50
|
+
}, []), R = l({ onOpenBill: L }), z = [{
|
|
51
|
+
id: S.Bills,
|
|
52
|
+
label: k.bills,
|
|
53
|
+
content: /* @__PURE__ */ b(d, {
|
|
54
|
+
onEnqueueFiles: R.enqueue,
|
|
55
|
+
openPayableId: F,
|
|
56
|
+
onOpenPayableHandled: () => I(void 0),
|
|
57
|
+
poweredByBankName: D
|
|
58
|
+
})
|
|
59
|
+
}, {
|
|
60
|
+
id: S.Vendors,
|
|
61
|
+
label: k.vendors,
|
|
62
|
+
content: /* @__PURE__ */ b(h, {
|
|
63
|
+
...E,
|
|
64
|
+
counterpartType: "vendor",
|
|
65
|
+
onViewAllDocuments: () => P(S.Bills)
|
|
66
|
+
})
|
|
67
|
+
}];
|
|
68
|
+
M && z.push({
|
|
69
|
+
id: S.Settings,
|
|
70
|
+
label: k.settings,
|
|
71
|
+
content: /* @__PURE__ */ b(c, {
|
|
72
|
+
labels: w,
|
|
73
|
+
componentLabels: T
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
|
|
77
|
+
return /* @__PURE__ */ x(y, { children: [
|
|
78
|
+
/* @__PURE__ */ b(n, {}),
|
|
79
|
+
/* @__PURE__ */ b(o, {
|
|
80
|
+
labels: i,
|
|
81
|
+
tabs: z,
|
|
82
|
+
selectedTabId: B,
|
|
83
|
+
onTabChange: P
|
|
84
|
+
}),
|
|
85
|
+
R.isVisible ? /* @__PURE__ */ b(s, {
|
|
86
|
+
sections: R.sections,
|
|
87
|
+
summaryLabel: R.summaryLabel,
|
|
88
|
+
collapsed: R.collapsed,
|
|
89
|
+
onToggleCollapsed: R.onToggleCollapsed,
|
|
90
|
+
onClose: R.onClose,
|
|
91
|
+
testId: u.uploadTray
|
|
92
|
+
}) : null
|
|
93
|
+
] });
|
|
94
|
+
}
|
|
95
|
+
function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: m, ...h }) {
|
|
96
|
+
return /* @__PURE__ */ b(i, {
|
|
97
|
+
widgetName: p,
|
|
98
|
+
baseUrl: e,
|
|
99
|
+
widgetToken: t,
|
|
100
|
+
organizationId: n,
|
|
101
|
+
configClient: r,
|
|
102
|
+
gatewayRouting: a,
|
|
103
|
+
linkComponent: o,
|
|
104
|
+
implementation: s,
|
|
105
|
+
uiFramework: c,
|
|
106
|
+
errorFallback: l,
|
|
107
|
+
onError: u,
|
|
108
|
+
analytics: d,
|
|
109
|
+
disclosuresAcceptance: f,
|
|
110
|
+
providerLabels: m,
|
|
111
|
+
children: /* @__PURE__ */ b(w, { ...h })
|
|
112
|
+
});
|
|
113
|
+
}
|
|
7
114
|
//#endregion
|
|
8
|
-
export {
|
|
115
|
+
export { T as BillPayWidgetNative, T as default };
|