@tesouro/embedded-components-react 0.2.333 → 0.2.336
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 +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +42 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +26 -149
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +102 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +10 -212
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +221 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +27 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +75 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +132 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +107 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +8 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +37 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +6 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +83 -154
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +161 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +25 -0
- 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
|
@@ -1,5 +1,162 @@
|
|
|
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 r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
+
import "../../../shared/feature/dist/index.js";
|
|
12
|
+
import { AddBillDialog as i } from "../../ui/dist/index10.js";
|
|
13
|
+
import { BillsScreen as a } from "../../ui/dist/index54.js";
|
|
14
|
+
import "../../ui/dist/index.js";
|
|
15
|
+
import { BillCreateDialog as o } from "./index38.js";
|
|
16
|
+
import "./index39.js";
|
|
17
|
+
import { BillDetailsContainer as s } from "./index42.js";
|
|
18
|
+
import "./index43.js";
|
|
19
|
+
import "./index49.js";
|
|
1
20
|
import "./index50.js";
|
|
2
|
-
import "./
|
|
3
|
-
import "./index53.js";
|
|
4
|
-
import "./index54.js";
|
|
5
|
-
import "./index55.js";
|
|
21
|
+
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index51.js";
|
|
22
|
+
import { BILLS_TAB_LABELS_EN as u } from "./index53.js";
|
|
23
|
+
import { billsTabTestIds as d } from "./index54.js";
|
|
24
|
+
import { useBillsTable as f } from "./index55.js";
|
|
25
|
+
import { copyTextToClipboard as p } from "./index52.js";
|
|
26
|
+
import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
|
|
27
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
28
|
+
import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
|
|
29
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
30
|
+
var T = "bills@business-banking.app", E = {
|
|
31
|
+
[l.Drafts]: /* @__PURE__ */ v(S, {
|
|
32
|
+
className: "ttw:size-4",
|
|
33
|
+
"aria-hidden": !0
|
|
34
|
+
}),
|
|
35
|
+
[l.Pending]: /* @__PURE__ */ v(w, {
|
|
36
|
+
className: "ttw:size-4",
|
|
37
|
+
"aria-hidden": !0
|
|
38
|
+
}),
|
|
39
|
+
[l.Scheduled]: /* @__PURE__ */ v(b, {
|
|
40
|
+
className: "ttw:size-4",
|
|
41
|
+
"aria-hidden": !0
|
|
42
|
+
}),
|
|
43
|
+
[l.Paid]: /* @__PURE__ */ v(x, {
|
|
44
|
+
className: "ttw:size-4",
|
|
45
|
+
"aria-hidden": !0
|
|
46
|
+
}),
|
|
47
|
+
[l.All]: /* @__PURE__ */ v(C, {
|
|
48
|
+
className: "ttw:size-4",
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
})
|
|
51
|
+
};
|
|
52
|
+
function D({ labels: l, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
|
|
53
|
+
let w = g(() => ({
|
|
54
|
+
...u,
|
|
55
|
+
...l,
|
|
56
|
+
queues: {
|
|
57
|
+
...u.queues,
|
|
58
|
+
...l?.queues
|
|
59
|
+
},
|
|
60
|
+
queueEmptyStates: c.reduce((e, t) => ({
|
|
61
|
+
...e,
|
|
62
|
+
[t]: {
|
|
63
|
+
...u.queueEmptyStates[t],
|
|
64
|
+
...l?.queueEmptyStates?.[t]
|
|
65
|
+
}
|
|
66
|
+
}), {})
|
|
67
|
+
}), [l]), [D, O] = _(!1), [k, A] = _(), [j, M] = _(!1), [N, P] = _(), [F, I] = _(!1), [L, R] = _(!1), { initResponse: z } = r(), B = t(z?.scopes, [n.PayableReadOrg]), V = t(z?.scopes, [n.PayableWriteOrg]), H = !z || B, U = !z || V, W = m((e, t) => {
|
|
68
|
+
if (t && U) {
|
|
69
|
+
A(e), M(!0);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
P(e), I(!0);
|
|
73
|
+
}, [U]), G = f({
|
|
74
|
+
enabled: H,
|
|
75
|
+
onOpenBill: W
|
|
76
|
+
}), K = g(() => c.map((e) => ({
|
|
77
|
+
id: e,
|
|
78
|
+
label: w.queues[e],
|
|
79
|
+
icon: E[e]
|
|
80
|
+
})), [w.queues]), q = () => {
|
|
81
|
+
I(!1), R(!0);
|
|
82
|
+
}, J = g(() => ({
|
|
83
|
+
createButton: w.createButton,
|
|
84
|
+
addBill: { heading: w.nonEmptyHeading }
|
|
85
|
+
}), [w.createButton, w.nonEmptyHeading]), Y = () => {
|
|
86
|
+
O(!1), A(void 0), M(!0);
|
|
87
|
+
}, X = (e) => {
|
|
88
|
+
O(!1), b?.(e);
|
|
89
|
+
}, Z = async () => {
|
|
90
|
+
await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
|
|
91
|
+
};
|
|
92
|
+
return h(() => {
|
|
93
|
+
x && (A(x), M(!0), S?.());
|
|
94
|
+
}, [S, x]), /* @__PURE__ */ y("div", {
|
|
95
|
+
"data-testid": d.root,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ v(a, {
|
|
98
|
+
rows: G.rows,
|
|
99
|
+
isLoading: G.isLoading || !z,
|
|
100
|
+
isError: G.isError,
|
|
101
|
+
onRetry: G.onRetry,
|
|
102
|
+
sorting: G.sorting,
|
|
103
|
+
onSortingChange: G.onSortingChange,
|
|
104
|
+
pageSize: G.pageSize,
|
|
105
|
+
onPageSizeChange: G.onPageSizeChange,
|
|
106
|
+
hasNextPage: G.hasNextPage,
|
|
107
|
+
hasPrevPage: G.hasPrevPage,
|
|
108
|
+
onNextPage: G.onNextPage,
|
|
109
|
+
onPrevPage: G.onPrevPage,
|
|
110
|
+
filterTabs: K,
|
|
111
|
+
selectedFilterTabId: G.selectedFilterTabId,
|
|
112
|
+
onFilterTabChange: G.onFilterTabChange,
|
|
113
|
+
searchValue: G.searchValue,
|
|
114
|
+
onSearchChange: G.onSearchChange,
|
|
115
|
+
visibleColumns: G.visibleColumns,
|
|
116
|
+
isSearchActive: G.isSearchActive,
|
|
117
|
+
showAddPanelWhenEmpty: G.showAddPanelWhenEmpty,
|
|
118
|
+
emptyState: w.queueEmptyStates[G.selectedFilterTabId],
|
|
119
|
+
onCreateClick: U ? () => O(!0) : void 0,
|
|
120
|
+
onEnterManually: U ? Y : void 0,
|
|
121
|
+
onFilesSelected: U ? X : void 0,
|
|
122
|
+
maxFiles: 10,
|
|
123
|
+
emailAddress: T,
|
|
124
|
+
onCopyEmail: Z,
|
|
125
|
+
labels: J
|
|
126
|
+
}),
|
|
127
|
+
U ? /* @__PURE__ */ v(i, {
|
|
128
|
+
open: D,
|
|
129
|
+
onOpenChange: O,
|
|
130
|
+
onFilesSelected: X,
|
|
131
|
+
maxFiles: 10,
|
|
132
|
+
onEnterManually: Y,
|
|
133
|
+
emailAddress: T,
|
|
134
|
+
onCopyEmail: Z,
|
|
135
|
+
labels: { heading: G.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
|
|
136
|
+
}) : null,
|
|
137
|
+
j ? /* @__PURE__ */ v(o, {
|
|
138
|
+
open: j,
|
|
139
|
+
onOpenChange: M,
|
|
140
|
+
payableId: k
|
|
141
|
+
}) : null,
|
|
142
|
+
F ? /* @__PURE__ */ v(s, {
|
|
143
|
+
open: F,
|
|
144
|
+
onOpenChange: I,
|
|
145
|
+
payableId: N,
|
|
146
|
+
onClose: () => I(!1),
|
|
147
|
+
onExpand: q,
|
|
148
|
+
testId: d.detailsSheet,
|
|
149
|
+
poweredByBankName: C
|
|
150
|
+
}) : null,
|
|
151
|
+
L ? /* @__PURE__ */ v(o, {
|
|
152
|
+
open: L,
|
|
153
|
+
onOpenChange: R,
|
|
154
|
+
payableId: N,
|
|
155
|
+
readOnly: !0,
|
|
156
|
+
poweredByBankName: C
|
|
157
|
+
}) : null
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
export { D as BillsTab, D as default };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as DEFAULT_TABS_LABELS };
|
|
1
|
+
import "./index51.js";
|
|
2
|
+
import "./index53.js";
|
|
3
|
+
import "./index54.js";
|
|
4
|
+
import "./index55.js";
|
|
5
|
+
import "./index56.js";
|
|
@@ -1,115 +1,8 @@
|
|
|
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/index43.js";
|
|
15
|
-
import { BillUploadStatusTray as s } from "../../ui/dist/index57.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 "./index48.js";
|
|
20
|
-
import "./index49.js";
|
|
21
|
-
import { billsTabTestIds as u } from "./index53.js";
|
|
22
|
-
import { BillsTab as d } from "./index55.js";
|
|
23
|
-
import "./index56.js";
|
|
24
|
-
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index43.js";
|
|
25
|
-
import { DEFAULT_TABS_LABELS as m } from "./index57.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
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
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
|
-
showTitle: !1,
|
|
66
|
-
onViewAllDocuments: () => P(S.Bills)
|
|
67
|
-
})
|
|
68
|
-
}];
|
|
69
|
-
M && z.push({
|
|
70
|
-
id: S.Settings,
|
|
71
|
-
label: k.settings,
|
|
72
|
-
content: /* @__PURE__ */ b(c, {
|
|
73
|
-
labels: w,
|
|
74
|
-
componentLabels: T
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
|
|
78
|
-
return /* @__PURE__ */ x(y, { children: [
|
|
79
|
-
/* @__PURE__ */ b(n, {}),
|
|
80
|
-
/* @__PURE__ */ b(o, {
|
|
81
|
-
labels: i,
|
|
82
|
-
tabs: z,
|
|
83
|
-
selectedTabId: B,
|
|
84
|
-
onTabChange: P
|
|
85
|
-
}),
|
|
86
|
-
R.isVisible ? /* @__PURE__ */ b(s, {
|
|
87
|
-
sections: R.sections,
|
|
88
|
-
summaryLabel: R.summaryLabel,
|
|
89
|
-
collapsed: R.collapsed,
|
|
90
|
-
onToggleCollapsed: R.onToggleCollapsed,
|
|
91
|
-
onClose: R.onClose,
|
|
92
|
-
testId: u.uploadTray
|
|
93
|
-
}) : null
|
|
94
|
-
] });
|
|
95
|
-
}
|
|
96
|
-
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 }) {
|
|
97
|
-
return /* @__PURE__ */ b(i, {
|
|
98
|
-
widgetName: p,
|
|
99
|
-
baseUrl: e,
|
|
100
|
-
widgetToken: t,
|
|
101
|
-
organizationId: n,
|
|
102
|
-
configClient: r,
|
|
103
|
-
gatewayRouting: a,
|
|
104
|
-
linkComponent: o,
|
|
105
|
-
implementation: s,
|
|
106
|
-
uiFramework: c,
|
|
107
|
-
errorFallback: l,
|
|
108
|
-
onError: u,
|
|
109
|
-
analytics: d,
|
|
110
|
-
disclosuresAcceptance: f,
|
|
111
|
-
children: /* @__PURE__ */ b(w, { ...m })
|
|
112
|
-
});
|
|
113
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
bills: "Bills",
|
|
4
|
+
vendors: "Vendors",
|
|
5
|
+
settings: "Settings"
|
|
6
|
+
};
|
|
114
7
|
//#endregion
|
|
115
|
-
export {
|
|
8
|
+
export { e as DEFAULT_TABS_LABELS };
|
|
@@ -1 +1,115 @@
|
|
|
1
|
-
|
|
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/index43.js";
|
|
15
|
+
import { BillUploadStatusTray as s } from "../../ui/dist/index57.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 "./index49.js";
|
|
20
|
+
import "./index50.js";
|
|
21
|
+
import { billsTabTestIds as u } from "./index54.js";
|
|
22
|
+
import { BillsTab as d } from "./index56.js";
|
|
23
|
+
import "./index57.js";
|
|
24
|
+
import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index44.js";
|
|
25
|
+
import { DEFAULT_TABS_LABELS as m } from "./index58.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/index59.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
|
+
showTitle: !1,
|
|
66
|
+
onViewAllDocuments: () => P(S.Bills)
|
|
67
|
+
})
|
|
68
|
+
}];
|
|
69
|
+
M && z.push({
|
|
70
|
+
id: S.Settings,
|
|
71
|
+
label: k.settings,
|
|
72
|
+
content: /* @__PURE__ */ b(c, {
|
|
73
|
+
labels: w,
|
|
74
|
+
componentLabels: T
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
|
|
78
|
+
return /* @__PURE__ */ x(y, { children: [
|
|
79
|
+
/* @__PURE__ */ b(n, {}),
|
|
80
|
+
/* @__PURE__ */ b(o, {
|
|
81
|
+
labels: i,
|
|
82
|
+
tabs: z,
|
|
83
|
+
selectedTabId: B,
|
|
84
|
+
onTabChange: P
|
|
85
|
+
}),
|
|
86
|
+
R.isVisible ? /* @__PURE__ */ b(s, {
|
|
87
|
+
sections: R.sections,
|
|
88
|
+
summaryLabel: R.summaryLabel,
|
|
89
|
+
collapsed: R.collapsed,
|
|
90
|
+
onToggleCollapsed: R.onToggleCollapsed,
|
|
91
|
+
onClose: R.onClose,
|
|
92
|
+
testId: u.uploadTray
|
|
93
|
+
}) : null
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
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 }) {
|
|
97
|
+
return /* @__PURE__ */ b(i, {
|
|
98
|
+
widgetName: p,
|
|
99
|
+
baseUrl: e,
|
|
100
|
+
widgetToken: t,
|
|
101
|
+
organizationId: n,
|
|
102
|
+
configClient: r,
|
|
103
|
+
gatewayRouting: a,
|
|
104
|
+
linkComponent: o,
|
|
105
|
+
implementation: s,
|
|
106
|
+
uiFramework: c,
|
|
107
|
+
errorFallback: l,
|
|
108
|
+
onError: u,
|
|
109
|
+
analytics: d,
|
|
110
|
+
disclosuresAcceptance: f,
|
|
111
|
+
children: /* @__PURE__ */ b(w, { ...m })
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
export { T as BillPayWidgetNative, T as default };
|
|
@@ -1,25 +1 @@
|
|
|
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 "./index44.js";
|
|
9
|
-
import "./index45.js";
|
|
10
|
-
import { BillPayWidgetNative as r } from "./index58.js";
|
|
11
1
|
import "./index59.js";
|
|
12
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
13
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.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 };
|
|
@@ -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 "./index45.js";
|
|
9
|
+
import "./index46.js";
|
|
10
|
+
import { BillPayWidgetNative as r } from "./index59.js";
|
|
11
|
+
import "./index60.js";
|
|
12
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
13
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.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 };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.336", n = "b339a6da1637305cf4138018098d46f29e199096", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -9,7 +9,7 @@ import { CardProgram as n } from "../../../shared/feature/dist/lib/card/cardProg
|
|
|
9
9
|
import "../../../shared/feature/dist/index.js";
|
|
10
10
|
import { BankAccountsWidget as r } from "../../../bank-accounts-widget/feature/dist/index8.js";
|
|
11
11
|
import "../../../bank-accounts-widget/feature/dist/index.js";
|
|
12
|
-
import { BillPayWidget as i } from "../../../bill-pay-widget/feature/dist/
|
|
12
|
+
import { BillPayWidget as i } from "../../../bill-pay-widget/feature/dist/index61.js";
|
|
13
13
|
import "../../../bill-pay-widget/feature/dist/index.js";
|
|
14
14
|
import { CardsWidget as a } from "../../../cards-widget/feature/dist/index8.js";
|
|
15
15
|
import "../../../cards-widget/feature/dist/index.js";
|