@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
|
@@ -1,209 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { AddBillDialog as i } from "../../ui/dist/index10.js";
|
|
13
|
-
import { BillsScreen as a } from "../../ui/dist/index64.js";
|
|
14
|
-
import "../../ui/dist/index.js";
|
|
15
|
-
import { BillCreateDialog as o } from "./index41.js";
|
|
16
|
-
import "./index42.js";
|
|
17
|
-
import { BillDetailsContainer as s } from "./index45.js";
|
|
18
|
-
import "./index46.js";
|
|
19
|
-
import "./index52.js";
|
|
20
|
-
import "./index53.js";
|
|
21
|
-
import { DuplicateBillsContainer as te } from "./index56.js";
|
|
22
|
-
import "./index57.js";
|
|
23
|
-
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index58.js";
|
|
24
|
-
import { BILLS_TAB_LABELS_EN as u } from "./index60.js";
|
|
25
|
-
import { useBillsTable as ne } from "./index66.js";
|
|
26
|
-
import { copyTextToClipboard as re } from "./index59.js";
|
|
27
|
-
import { billsTabTestIds as d, billsTableCellTestIds as f } from "./index61.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";
|
|
1
|
+
import { BillStatusFilter as e } from "./index65.js";
|
|
2
|
+
import { BillsDatePreset as t } from "./index66.js";
|
|
31
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
4
|
+
var n = {
|
|
5
|
+
presets: {
|
|
6
|
+
[t.Today]: "Today",
|
|
7
|
+
[t.ThisWeek]: "This week",
|
|
8
|
+
[t.ThisMonth]: "This month",
|
|
9
|
+
[t.ThisQuarter]: "This quarter",
|
|
10
|
+
[t.ThisYear]: "This year",
|
|
11
|
+
[t.Yesterday]: "Yesterday",
|
|
12
|
+
[t.LastWeek]: "Last week",
|
|
13
|
+
[t.LastMonth]: "Last month",
|
|
14
|
+
[t.Last30Days]: "Last 30 days",
|
|
15
|
+
[t.Last90Days]: "Last 90 days",
|
|
16
|
+
[t.LastQuarter]: "Last quarter",
|
|
17
|
+
[t.LastYear]: "Last year"
|
|
18
|
+
},
|
|
19
|
+
presetGroupCurrent: "Current",
|
|
20
|
+
presetGroupPast: "Past",
|
|
21
|
+
statuses: {
|
|
22
|
+
[e.Draft]: "Draft",
|
|
23
|
+
[e.PendingApproval]: "Pending approval",
|
|
24
|
+
[e.ReadyToPay]: "Ready to pay",
|
|
25
|
+
[e.PartiallyPaid]: "Partially paid",
|
|
26
|
+
[e.Paid]: "Paid",
|
|
27
|
+
[e.Rejected]: "Rejected",
|
|
28
|
+
[e.Canceled]: "Canceled"
|
|
29
|
+
},
|
|
30
|
+
dateFieldNames: {
|
|
31
|
+
issueDate: "Issue date",
|
|
32
|
+
dueDate: "Due date",
|
|
33
|
+
addedOn: "Added on"
|
|
34
|
+
},
|
|
35
|
+
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
|
+
statusChip: (e) => `Status: ${e}`,
|
|
37
|
+
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
+
amountChip: (e) => `Total amount: ${e}`,
|
|
39
|
+
attachmentChipHas: "Has attachment",
|
|
40
|
+
attachmentChipNone: "No attachment",
|
|
41
|
+
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
|
+
amountAtLeast: (e) => `${e} or more`,
|
|
43
|
+
amountAtMost: (e) => `${e} or less`,
|
|
44
|
+
amountBetween: (e, t) => `${e} - ${t}`,
|
|
45
|
+
dateRange: (e, t) => `${e} - ${t}`,
|
|
46
|
+
dateFrom: (e) => `From ${e}`,
|
|
47
|
+
dateTo: (e) => `Until ${e}`
|
|
53
48
|
};
|
|
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
|
-
]
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
49
|
//#endregion
|
|
209
|
-
export {
|
|
50
|
+
export { n as BILLS_FILTER_LABELS_EN };
|
|
@@ -1,4 +1,253 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { formatMoneyExact as e } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
6
|
+
import { BillsFilterField as t } from "../../ui/dist/index60.js";
|
|
7
|
+
import "../../ui/dist/index.js";
|
|
8
|
+
import "../../data-access/dist/index.js";
|
|
9
|
+
import { getCounterpartName as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
10
|
+
import { useCounterpartsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
11
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
+
import { BILL_STATUS_FILTER_ORDER as i, billStatusFilterApiValues as a } from "./index65.js";
|
|
13
|
+
import { BillsDatePreset as o, resolveDatePreset as s } from "./index66.js";
|
|
14
|
+
import { BILLS_FILTER_LABELS_EN as c } from "./index67.js";
|
|
15
|
+
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
16
|
+
import { format as p, formatISO as m } from "date-fns";
|
|
17
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js
|
|
18
|
+
var h = {
|
|
19
|
+
Date: "date",
|
|
20
|
+
Status: "status",
|
|
21
|
+
Amount: "amount",
|
|
22
|
+
Vendor: "vendor",
|
|
23
|
+
Attachment: "attachment"
|
|
24
|
+
}, g = 50, _ = 300, v = "MMM d, yyyy", y = 864e5, b = {
|
|
25
|
+
[t.IssueDate]: "issued_at",
|
|
26
|
+
[t.DueDate]: "due_date",
|
|
27
|
+
[t.AddedOn]: "created_at"
|
|
28
|
+
}, x = {
|
|
29
|
+
[o.Today]: "current",
|
|
30
|
+
[o.ThisWeek]: "current",
|
|
31
|
+
[o.ThisMonth]: "current",
|
|
32
|
+
[o.ThisQuarter]: "current",
|
|
33
|
+
[o.ThisYear]: "current",
|
|
34
|
+
[o.Yesterday]: "past",
|
|
35
|
+
[o.LastWeek]: "past",
|
|
36
|
+
[o.LastMonth]: "past",
|
|
37
|
+
[o.Last30Days]: "past",
|
|
38
|
+
[o.Last90Days]: "past",
|
|
39
|
+
[o.LastQuarter]: "past",
|
|
40
|
+
[o.LastYear]: "past"
|
|
41
|
+
};
|
|
42
|
+
function S() {
|
|
43
|
+
return {
|
|
44
|
+
dateField: t.DueDate,
|
|
45
|
+
statuses: [],
|
|
46
|
+
amountMode: "any",
|
|
47
|
+
amountMin: "",
|
|
48
|
+
amountMax: "",
|
|
49
|
+
vendorIds: []
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function C(e) {
|
|
53
|
+
let t = Number.parseFloat(e);
|
|
54
|
+
return Number.isFinite(t) ? Math.round(t * 100) : void 0;
|
|
55
|
+
}
|
|
56
|
+
function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFilterPaused: T = !1, onFiltersChange: E, labels: D } = {}) {
|
|
57
|
+
let O = d(() => ({
|
|
58
|
+
...c,
|
|
59
|
+
...D,
|
|
60
|
+
presets: {
|
|
61
|
+
...c.presets,
|
|
62
|
+
...D?.presets
|
|
63
|
+
},
|
|
64
|
+
statuses: {
|
|
65
|
+
...c.statuses,
|
|
66
|
+
...D?.statuses
|
|
67
|
+
},
|
|
68
|
+
dateFieldNames: {
|
|
69
|
+
...c.dateFieldNames,
|
|
70
|
+
...D?.dateFieldNames
|
|
71
|
+
}
|
|
72
|
+
}), [D]), [k, A] = f(S), [j, M] = f({}), [N, P] = f(""), [F, I] = f(""), L = l((e) => {
|
|
73
|
+
A((t) => ({
|
|
74
|
+
...t,
|
|
75
|
+
...e
|
|
76
|
+
})), E?.();
|
|
77
|
+
}, [E]);
|
|
78
|
+
u(() => {
|
|
79
|
+
w || A((e) => e.vendorIds.length === 0 ? e : (E?.(), {
|
|
80
|
+
...e,
|
|
81
|
+
vendorIds: []
|
|
82
|
+
}));
|
|
83
|
+
}, [w, E]), u(() => {
|
|
84
|
+
o || A((e) => e.statuses.length === 0 ? e : (E?.(), {
|
|
85
|
+
...e,
|
|
86
|
+
statuses: []
|
|
87
|
+
}));
|
|
88
|
+
}, [o, E]), u(() => {
|
|
89
|
+
let e = setTimeout(() => I(N.trim()), _);
|
|
90
|
+
return () => clearTimeout(e);
|
|
91
|
+
}, [N]);
|
|
92
|
+
let R = r({
|
|
93
|
+
enabled: w && !T,
|
|
94
|
+
is_vendor: !0,
|
|
95
|
+
sort: "counterpart_name",
|
|
96
|
+
order: "asc",
|
|
97
|
+
limit: g,
|
|
98
|
+
counterpart_name__icontains: F || void 0
|
|
99
|
+
}), z = d(() => (R.data?.data ?? []).map((e) => ({
|
|
100
|
+
value: e.id,
|
|
101
|
+
label: n(e)
|
|
102
|
+
})), [R.data?.data]), B = d(() => i.map((e) => ({
|
|
103
|
+
value: e,
|
|
104
|
+
label: O.statuses[e]
|
|
105
|
+
})), [O.statuses]), V = d(() => Object.entries(x).map(([e, t]) => ({
|
|
106
|
+
value: e,
|
|
107
|
+
label: O.presets[e],
|
|
108
|
+
group: t === "current" ? O.presetGroupCurrent : O.presetGroupPast
|
|
109
|
+
})), [
|
|
110
|
+
O.presetGroupCurrent,
|
|
111
|
+
O.presetGroupPast,
|
|
112
|
+
O.presets
|
|
113
|
+
]), H = d(() => {
|
|
114
|
+
let e = {}, t = b[k.dateField], n = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
115
|
+
if (k.dateFrom && (e[`${t}__gte`] = t === "created_at" ? new Date(n(k.dateFrom)).toISOString() : m(k.dateFrom, { representation: "date" })), k.dateTo && (t === "created_at" ? e.created_at__lt = new Date(n(k.dateTo) + y).toISOString() : e[`${t}__lte`] = m(k.dateTo, { representation: "date" })), k.statuses.length > 0 && (e.status__in = a(k.statuses)), k.amountMode !== "any") {
|
|
116
|
+
let t = "total_amount__gte", n = "total_amount__lte", r = C(k.amountMin), i = C(k.amountMax);
|
|
117
|
+
k.amountMode === "exact" ? r !== void 0 && (e[t] = r, e[n] = r) : (r !== void 0 && (e[t] = r), i !== void 0 && (e[n] = i));
|
|
118
|
+
}
|
|
119
|
+
return k.vendorIds.length > 0 && (e.counterpart_id__in = [...k.vendorIds]), k.hasFile !== void 0 && (e.has_file = k.hasFile), e;
|
|
120
|
+
}, [k]), U = d(() => {
|
|
121
|
+
let t = [], n = (e) => p(e, v), r = (e) => {
|
|
122
|
+
let [t, ...n] = e;
|
|
123
|
+
return t ? n.length === 0 ? t : O.moreSelected(t, n.length) : "";
|
|
124
|
+
};
|
|
125
|
+
if (k.dateFrom || k.dateTo) {
|
|
126
|
+
let e = (k.datePreset ? O.presets[k.datePreset] : void 0) ?? (k.dateFrom && k.dateTo ? O.dateRange(n(k.dateFrom), n(k.dateTo)) : k.dateFrom ? O.dateFrom(n(k.dateFrom)) : O.dateTo(n(k.dateTo)));
|
|
127
|
+
t.push({
|
|
128
|
+
key: h.Date,
|
|
129
|
+
label: O.dateChip(O.dateFieldNames[k.dateField], e)
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
if (k.statuses.length > 0 && t.push({
|
|
133
|
+
key: h.Status,
|
|
134
|
+
label: O.statusChip(r(k.statuses.map((e) => O.statuses[e] ?? e)))
|
|
135
|
+
}), k.vendorIds.length > 0 && t.push({
|
|
136
|
+
key: h.Vendor,
|
|
137
|
+
label: O.vendorChip(r(k.vendorIds.map((e) => j[e] ?? e)))
|
|
138
|
+
}), k.amountMode !== "any") {
|
|
139
|
+
let n = (t) => {
|
|
140
|
+
let n = Number.parseFloat(t);
|
|
141
|
+
return Number.isFinite(n) ? e(n, { currencyCode: "USD" }) : "";
|
|
142
|
+
}, r = n(k.amountMin), i = n(k.amountMax), a = k.amountMode === "exact" ? r : r && i ? O.amountBetween(r, i) : r ? O.amountAtLeast(r) : i ? O.amountAtMost(i) : "";
|
|
143
|
+
a && t.push({
|
|
144
|
+
key: h.Amount,
|
|
145
|
+
label: O.amountChip(a)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return k.hasFile !== void 0 && t.push({
|
|
149
|
+
key: h.Attachment,
|
|
150
|
+
label: k.hasFile ? O.attachmentChipHas : O.attachmentChipNone
|
|
151
|
+
}), t;
|
|
152
|
+
}, [
|
|
153
|
+
O,
|
|
154
|
+
k,
|
|
155
|
+
j
|
|
156
|
+
]), W = l((e) => {
|
|
157
|
+
switch (e) {
|
|
158
|
+
case h.Date:
|
|
159
|
+
L({
|
|
160
|
+
datePreset: void 0,
|
|
161
|
+
dateFrom: void 0,
|
|
162
|
+
dateTo: void 0
|
|
163
|
+
});
|
|
164
|
+
break;
|
|
165
|
+
case h.Status:
|
|
166
|
+
L({ statuses: [] });
|
|
167
|
+
break;
|
|
168
|
+
case h.Vendor:
|
|
169
|
+
L({ vendorIds: [] });
|
|
170
|
+
break;
|
|
171
|
+
case h.Amount:
|
|
172
|
+
L({
|
|
173
|
+
amountMode: "any",
|
|
174
|
+
amountMin: "",
|
|
175
|
+
amountMax: ""
|
|
176
|
+
});
|
|
177
|
+
break;
|
|
178
|
+
case h.Attachment: L({ hasFile: void 0 });
|
|
179
|
+
}
|
|
180
|
+
}, [L]), G = l(() => {
|
|
181
|
+
A(S()), E?.();
|
|
182
|
+
}, [E]), K = l((e) => {
|
|
183
|
+
M((t) => {
|
|
184
|
+
let n = { ...t };
|
|
185
|
+
for (let t of z) e.includes(t.value) && (n[t.value] = t.label);
|
|
186
|
+
return n;
|
|
187
|
+
}), L({ vendorIds: e });
|
|
188
|
+
}, [L, z]);
|
|
189
|
+
return {
|
|
190
|
+
filterBarProps: {
|
|
191
|
+
fields: [...d(() => [
|
|
192
|
+
...w ? [t.Vendor] : [],
|
|
193
|
+
t.IssueDate,
|
|
194
|
+
t.DueDate,
|
|
195
|
+
...o ? [t.Status] : [],
|
|
196
|
+
t.TotalAmount,
|
|
197
|
+
t.AddedOn,
|
|
198
|
+
t.Attachment
|
|
199
|
+
], [o, w])],
|
|
200
|
+
activeFilterCount: U.length,
|
|
201
|
+
chips: U,
|
|
202
|
+
onRemoveChip: W,
|
|
203
|
+
onClearAll: G,
|
|
204
|
+
dateField: k.dateField,
|
|
205
|
+
onDateFieldChange: (e) => {
|
|
206
|
+
let t = !!(k.dateFrom || k.dateTo);
|
|
207
|
+
A((t) => ({
|
|
208
|
+
...t,
|
|
209
|
+
dateField: e
|
|
210
|
+
})), t && E?.();
|
|
211
|
+
},
|
|
212
|
+
datePresets: V,
|
|
213
|
+
selectedDatePreset: k.datePreset,
|
|
214
|
+
dateFrom: k.dateFrom,
|
|
215
|
+
dateTo: k.dateTo,
|
|
216
|
+
onDateRangeChange: ({ from: e, to: t }) => L({
|
|
217
|
+
datePreset: void 0,
|
|
218
|
+
dateFrom: e,
|
|
219
|
+
dateTo: t
|
|
220
|
+
}),
|
|
221
|
+
onDatePresetChange: (e) => {
|
|
222
|
+
let n = /* @__PURE__ */ new Date(), r = k.dateField === t.AddedOn ? new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) : n, { from: i, to: a } = s(e, r);
|
|
223
|
+
L({
|
|
224
|
+
datePreset: e,
|
|
225
|
+
dateFrom: i,
|
|
226
|
+
dateTo: a
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
statusOptions: B,
|
|
230
|
+
selectedStatuses: k.statuses,
|
|
231
|
+
onStatusChange: (e) => L({ statuses: e }),
|
|
232
|
+
amountMode: k.amountMode,
|
|
233
|
+
onAmountModeChange: (e) => L({ amountMode: e }),
|
|
234
|
+
amountMin: k.amountMin,
|
|
235
|
+
amountMax: k.amountMax,
|
|
236
|
+
onAmountMinChange: (e) => L({ amountMin: e }),
|
|
237
|
+
onAmountMaxChange: (e) => L({ amountMax: e }),
|
|
238
|
+
vendorOptions: z,
|
|
239
|
+
selectedVendors: k.vendorIds,
|
|
240
|
+
onVendorChange: K,
|
|
241
|
+
vendorSearchValue: N,
|
|
242
|
+
onVendorSearchChange: P,
|
|
243
|
+
isVendorLoading: R.isLoading || T,
|
|
244
|
+
isVendorError: R.isError,
|
|
245
|
+
hasAttachment: k.hasFile,
|
|
246
|
+
onHasAttachmentChange: (e) => L({ hasFile: e })
|
|
247
|
+
},
|
|
248
|
+
query: H,
|
|
249
|
+
isFilterActive: U.length > 0
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
//#endregion
|
|
253
|
+
export { h as BillsFilterChipKey, w as useBillsFilters };
|
|
@@ -1,8 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
6
|
+
import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
7
|
+
import { resolveVendorName as n } from "./index7.js";
|
|
8
|
+
import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../data-access/dist/index13.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { derivePayableStatus as a } from "./index25.js";
|
|
11
|
+
import { BillQueue as o, DEFAULT_BILL_QUEUE as s, billQueueColumns as c, billQueueHasScheduledPayment as l, billQueueOffersAddPanel as u, billQueueStatuses as d, billSortColumnId as f, billSortField as p } from "./index61.js";
|
|
12
|
+
import { useBillsFilters as m } from "./index68.js";
|
|
13
|
+
import { useCallback as h, useEffect as g, useMemo as _, useState as v } from "react";
|
|
1
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
15
|
+
var y = 10, b = [{
|
|
16
|
+
id: "addedOnLabel",
|
|
17
|
+
desc: !0
|
|
18
|
+
}];
|
|
19
|
+
function x({ enabled: x = !0, canReadVendors: S = !0, isVendorFilterPaused: C = !1, filterLabels: w, onOpenBill: T, duplicateBillIds: E, duplicateBadgeLabel: D, attachmentLabel: O }) {
|
|
20
|
+
let [k, A] = v(s), [j, M] = v(b), [N, P] = v(y), [F, I] = v(), [L, R] = v(""), [z, B] = v(""), V = h(() => I(void 0), []);
|
|
21
|
+
g(() => {
|
|
22
|
+
let e = setTimeout(() => {
|
|
23
|
+
B(L), V();
|
|
24
|
+
}, 300);
|
|
25
|
+
return () => clearTimeout(e);
|
|
26
|
+
}, [L, V]);
|
|
27
|
+
let H = m({
|
|
28
|
+
offersStatusFilter: k === o.All,
|
|
29
|
+
offersVendorFilter: S,
|
|
30
|
+
isVendorFilterPaused: C,
|
|
31
|
+
labels: w,
|
|
32
|
+
onFiltersChange: V
|
|
33
|
+
}), U = j[0], W = p(U?.id), G = r({
|
|
34
|
+
...H.query,
|
|
35
|
+
limit: N,
|
|
36
|
+
pagination_token: F,
|
|
37
|
+
status__in: d(k) ?? H.query.status__in,
|
|
38
|
+
has_scheduled_payment: l(k),
|
|
39
|
+
counterpart_name__icontains: z || void 0,
|
|
40
|
+
sort: W,
|
|
41
|
+
order: W ? U?.desc ? "desc" : "asc" : void 0,
|
|
42
|
+
enabled: x
|
|
43
|
+
}), K = G.data?.data.length === 0, q = i({ enabled: x && K }), J = !K || (q.data?.count ?? 1) > 0, Y = _(() => new Set(E), [E]), X = _(() => (G.data?.data ?? []).map((r) => {
|
|
44
|
+
let i = a({
|
|
45
|
+
apiStatus: r.status,
|
|
46
|
+
dueDate: r.due_date,
|
|
47
|
+
scheduledPaymentDate: r.scheduled_payment_date
|
|
48
|
+
}), o = r.amount_due ?? r.total_amount, s = (e) => e == null ? "" : t(e / 100, { currencyCode: r.currency ?? "USD" });
|
|
49
|
+
return {
|
|
50
|
+
vendorLabel: n(r),
|
|
51
|
+
issueDateLabel: e(r.issued_at),
|
|
52
|
+
dueDateLabel: e(r.due_date),
|
|
53
|
+
scheduledDateLabel: e(r.scheduled_payment_date),
|
|
54
|
+
paidDateLabel: e(r.paid_at?.slice(0, 10)),
|
|
55
|
+
amountDueLabel: s(o),
|
|
56
|
+
amountPaidLabel: s(r.amount_paid),
|
|
57
|
+
amountScheduledLabel: s(r.amount_to_pay ?? o),
|
|
58
|
+
totalAmountLabel: s(r.total_amount),
|
|
59
|
+
attachment: r.file_id ? { label: O } : void 0,
|
|
60
|
+
status: i.status,
|
|
61
|
+
statusTone: i.tone,
|
|
62
|
+
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
63
|
+
duplicateBadge: Y.has(r.id) ? {
|
|
64
|
+
label: D,
|
|
65
|
+
tone: "warning"
|
|
66
|
+
} : void 0,
|
|
67
|
+
onOpen: () => T(r.id, i.status === "draft")
|
|
68
|
+
};
|
|
69
|
+
}), [
|
|
70
|
+
G.data?.data,
|
|
71
|
+
Y,
|
|
72
|
+
D,
|
|
73
|
+
O,
|
|
74
|
+
T
|
|
75
|
+
]), Z = h((e) => {
|
|
76
|
+
let t = e;
|
|
77
|
+
A(t), M((e) => {
|
|
78
|
+
let n = e[0]?.id;
|
|
79
|
+
return n ? c(t).some((e) => f(e) === n) ? e : b : e;
|
|
80
|
+
}), V();
|
|
81
|
+
}, [V]), Q = h((e) => {
|
|
82
|
+
M((t) => typeof e == "function" ? e(t) : e), V();
|
|
83
|
+
}, [V]), $ = h((e) => {
|
|
84
|
+
P(e), V();
|
|
85
|
+
}, [V]), ee = h(() => I(G.data?.next_pagination_token ?? void 0), [G.data?.next_pagination_token]), te = h(() => I(G.data?.prev_pagination_token ?? void 0), [G.data?.prev_pagination_token]), ne = h(() => {
|
|
86
|
+
G.refetch();
|
|
87
|
+
}, [G.refetch]);
|
|
88
|
+
return {
|
|
89
|
+
rows: X,
|
|
90
|
+
isLoading: G.isFetching || K && q.isLoading,
|
|
91
|
+
isError: G.isError,
|
|
92
|
+
onRetry: ne,
|
|
93
|
+
selectedFilterTabId: k,
|
|
94
|
+
onFilterTabChange: Z,
|
|
95
|
+
searchValue: L,
|
|
96
|
+
onSearchChange: R,
|
|
97
|
+
hasAnyBills: J,
|
|
98
|
+
isSearchActive: z.length > 0 || H.isFilterActive,
|
|
99
|
+
filterBarProps: H.filterBarProps,
|
|
100
|
+
visibleColumns: c(k),
|
|
101
|
+
showAddPanelWhenEmpty: u(k),
|
|
102
|
+
sorting: j,
|
|
103
|
+
onSortingChange: Q,
|
|
104
|
+
pageSize: N,
|
|
105
|
+
onPageSizeChange: $,
|
|
106
|
+
hasNextPage: !!G.data?.next_pagination_token,
|
|
107
|
+
hasPrevPage: !!G.data?.prev_pagination_token,
|
|
108
|
+
onNextPage: ee,
|
|
109
|
+
onPrevPage: te
|
|
110
|
+
};
|
|
111
|
+
}
|
|
7
112
|
//#endregion
|
|
8
|
-
export {
|
|
113
|
+
export { x as useBillsTable };
|
|
@@ -1,42 +1,9 @@
|
|
|
1
|
-
import { SOURCE_ACCOUNT_LABELS_EN as e } from "./index6.js";
|
|
2
|
-
import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as t } from "../../ui/dist/index79.js";
|
|
3
|
-
import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as n } from "../../ui/dist/index82.js";
|
|
4
|
-
import "../../ui/dist/index.js";
|
|
5
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
sourceAccount: "Pay from",
|
|
12
|
-
accountHolder: "Account holder name",
|
|
13
|
-
routingNumber: "Routing number",
|
|
14
|
-
accountNumber: "Account number",
|
|
15
|
-
achMethod: "Pay by ACH bank transfer",
|
|
16
|
-
scheduledToast: "Payment scheduled",
|
|
17
|
-
submitError: "Couldn't schedule this payment. Try again.",
|
|
18
|
-
selectAccountError: "Select a source account.",
|
|
19
|
-
selectDateError: "Select a payment date.",
|
|
20
|
-
staleDateError: "That date has passed. Choose a new payment date.",
|
|
21
|
-
missingPaymentInstructionsError: "This vendor does not have ACH payment instructions on file.",
|
|
22
|
-
missingVendorName: "Not provided",
|
|
23
|
-
...e,
|
|
24
|
-
scheduleDialog: n,
|
|
25
|
-
reviewDialog: t
|
|
26
|
-
};
|
|
27
|
-
function i(e) {
|
|
28
|
-
return {
|
|
29
|
-
...r,
|
|
30
|
-
...e,
|
|
31
|
-
scheduleDialog: {
|
|
32
|
-
...r.scheduleDialog,
|
|
33
|
-
...e?.scheduleDialog
|
|
34
|
-
},
|
|
35
|
-
reviewDialog: {
|
|
36
|
-
...r.reviewDialog,
|
|
37
|
-
...e?.reviewDialog
|
|
38
|
-
}
|
|
39
|
-
};
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e?.counterpart ?? e?.counterpart_raw_data ?? void 0;
|
|
4
|
+
}
|
|
5
|
+
function t(e) {
|
|
6
|
+
return e?.counterpart?.name ?? e?.counterpart_raw_data?.name ?? "";
|
|
40
7
|
}
|
|
41
8
|
//#endregion
|
|
42
|
-
export {
|
|
9
|
+
export { e as resolveVendor, t as resolveVendorName };
|