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