@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,213 +1,149 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { AchFieldGroup as n } from "../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
-
import { CounterpartFormFields as r, useFocusFirstInvalidField as i } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
|
-
import { VENDOR_INLINE_FORM_LABELS_EN as a } from "./index28.js";
|
|
10
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as o } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
|
|
11
|
-
import { useCounterpartForm as s } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
|
|
12
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
13
|
-
import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
14
|
-
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
15
|
-
import { Landmark as g, Plus as _, X as v } from "lucide-react";
|
|
1
|
+
import { PAY_BILL_FLOW_LABELS_EN as e, mergePayBillFlowLabels as t } from "./index11.js";
|
|
2
|
+
import { MARK_AS_PAID_FLOW_LABELS_EN as n, mergeMarkAsPaidFlowLabels as r } from "./index2.js";
|
|
3
|
+
import "./index5.js";
|
|
4
|
+
import { APPROVAL_POLICY_RULE_COPY_EN as i } from "./index15.js";
|
|
5
|
+
import { BILL_DETAIL_ACTIONS_LABELS_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o, mergeBillDetailActionsLabels as s } from "./index29.js";
|
|
6
|
+
import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as c } from "./index30.js";
|
|
16
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js
|
|
17
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
139
|
-
children: j.paymentMethodsHeading
|
|
140
|
-
}), /* @__PURE__ */ m("p", {
|
|
141
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
142
|
-
children: j.paymentMethodsDescription
|
|
143
|
-
})]
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ h("div", {
|
|
146
|
-
className: "ttw:flex ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:p-3",
|
|
147
|
-
children: [/* @__PURE__ */ m("span", {
|
|
148
|
-
className: "ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ttw:bg-primary",
|
|
149
|
-
children: /* @__PURE__ */ m(g, {
|
|
150
|
-
"aria-hidden": !0,
|
|
151
|
-
className: "ttw:size-4 ttw:text-white"
|
|
152
|
-
})
|
|
153
|
-
}), /* @__PURE__ */ h("div", {
|
|
154
|
-
className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
|
|
155
|
-
children: [/* @__PURE__ */ h("div", {
|
|
156
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
157
|
-
children: [/* @__PURE__ */ m("p", {
|
|
158
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
159
|
-
children: j.achTitle
|
|
160
|
-
}), /* @__PURE__ */ m("p", {
|
|
161
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
162
|
-
children: j.achDescription
|
|
163
|
-
})]
|
|
164
|
-
}), I ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(n, {
|
|
165
|
-
idPrefix: "vendor-inline-ach",
|
|
166
|
-
values: U.values.bankAccount,
|
|
167
|
-
errors: U.errors?.bankAccount,
|
|
168
|
-
onChange: (e) => {
|
|
169
|
-
z(!0), K((t) => ({
|
|
170
|
-
...t,
|
|
171
|
-
bankAccount: {
|
|
172
|
-
...t.bankAccount,
|
|
173
|
-
...e
|
|
174
|
-
}
|
|
175
|
-
}));
|
|
176
|
-
},
|
|
177
|
-
labels: {
|
|
178
|
-
accountHolderName: j.accountHolderNameLabel,
|
|
179
|
-
routingNumber: j.routingNumberLabel,
|
|
180
|
-
accountNumber: j.accountNumberLabel
|
|
181
|
-
}
|
|
182
|
-
}), /* @__PURE__ */ m("p", {
|
|
183
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
184
|
-
children: j.achHelp
|
|
185
|
-
})] }) : /* @__PURE__ */ h(e, {
|
|
186
|
-
type: "button",
|
|
187
|
-
variant: "link",
|
|
188
|
-
className: "ttw:w-fit ttw:px-0",
|
|
189
|
-
onClick: () => L(!0),
|
|
190
|
-
children: [/* @__PURE__ */ m(_, { className: "ttw:size-4" }), j.addBankAccount]
|
|
191
|
-
})]
|
|
192
|
-
})]
|
|
193
|
-
}),
|
|
194
|
-
/* @__PURE__ */ h("div", {
|
|
195
|
-
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
196
|
-
children: [/* @__PURE__ */ m(e, {
|
|
197
|
-
type: "button",
|
|
198
|
-
variant: "outline",
|
|
199
|
-
onClick: O,
|
|
200
|
-
children: j.cancel
|
|
201
|
-
}), /* @__PURE__ */ m(e, {
|
|
202
|
-
type: "button",
|
|
203
|
-
onClick: U.submit,
|
|
204
|
-
loading: U.isSubmitting,
|
|
205
|
-
disabled: U.isSubmitting,
|
|
206
|
-
children: j.save
|
|
207
|
-
})]
|
|
208
|
-
})
|
|
209
|
-
]
|
|
210
|
-
});
|
|
8
|
+
var l = {
|
|
9
|
+
unmappedValidationError: (e, t) => `${e}: ${t}`,
|
|
10
|
+
unknownValidationField: "(unknown field)",
|
|
11
|
+
requiredField: "This field is required.",
|
|
12
|
+
saveFailed: "We could not save this bill. Try again.",
|
|
13
|
+
finalizeFailed: "We could not submit this bill. Try again.",
|
|
14
|
+
draftSaved: "Bill saved as a draft.",
|
|
15
|
+
billFinalized: "Bill submitted for approval.",
|
|
16
|
+
unreadableMoney: "Enter a valid amount.",
|
|
17
|
+
unusableQuantity: "Enter a quantity greater than 0.",
|
|
18
|
+
lineItemsNeedAttention: "Check the highlighted line items before saving.",
|
|
19
|
+
totalsNeedAttention: "Enter valid amounts for discount, tax, and total."
|
|
20
|
+
}, u = {
|
|
21
|
+
achMethod: "via ACH bank transfer",
|
|
22
|
+
noMethod: "No payment method on file",
|
|
23
|
+
accountHolder: "Account holder",
|
|
24
|
+
routingNumber: "Routing number",
|
|
25
|
+
accountNumber: "Account number",
|
|
26
|
+
paymentMethodLoading: "Loading payment method...",
|
|
27
|
+
paymentMethodUnavailable: "We could not load payment methods. Try again.",
|
|
28
|
+
searchFailed: "We could not load vendors. Try again.",
|
|
29
|
+
vendorDetailsFailed: "We could not load this vendor. Try again."
|
|
30
|
+
}, d = {
|
|
31
|
+
attachFailed: "We could not attach that file. Try again.",
|
|
32
|
+
deleteFailed: "We could not remove that document. Try again.",
|
|
33
|
+
noDocument: "No document attached to this bill.",
|
|
34
|
+
pendingDeletionNotice: "This document will be removed when you save this bill.",
|
|
35
|
+
preview: c
|
|
36
|
+
}, f = {
|
|
37
|
+
notProvided: "Not provided",
|
|
38
|
+
paymentInstructionsValue: (e) => `Account ending in ${e}`,
|
|
39
|
+
invoiceDateRow: "Invoice date",
|
|
40
|
+
dueDateRow: "Due date",
|
|
41
|
+
invoiceNumberRow: "Invoice number",
|
|
42
|
+
glCodeMissing: "GL code not specified",
|
|
43
|
+
qtyPriceValue: (e, t) => `${e} x ${t}`,
|
|
44
|
+
subtotalRow: "Subtotal",
|
|
45
|
+
taxRow: "Tax",
|
|
46
|
+
discountRow: "Discounts",
|
|
47
|
+
totalRow: "Total",
|
|
48
|
+
paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
|
|
49
|
+
paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again."
|
|
50
|
+
}, p = {
|
|
51
|
+
dateLabel: (e) => new Date(e).toLocaleString("en-US", {
|
|
52
|
+
month: "short",
|
|
53
|
+
day: "numeric",
|
|
54
|
+
year: "numeric",
|
|
55
|
+
hour: "numeric",
|
|
56
|
+
minute: "2-digit"
|
|
57
|
+
}),
|
|
58
|
+
byActor: (e, t) => `${e} by ${t}`,
|
|
59
|
+
billAdded: "Bill added",
|
|
60
|
+
billUploaded: "Bill uploaded",
|
|
61
|
+
billUpdated: "Bill updated",
|
|
62
|
+
attachmentAdded: "Attachment added",
|
|
63
|
+
submittedForApproval: "Submitted for approval",
|
|
64
|
+
approvalRequested: "Approval requested",
|
|
65
|
+
approved: "Approved",
|
|
66
|
+
autoApproved: "Approved automatically",
|
|
67
|
+
rejected: "Rejected",
|
|
68
|
+
rejectedWithReason: (e) => `Rejected: ${e}`,
|
|
69
|
+
reopened: "Reopened",
|
|
70
|
+
markedAsPaid: "Marked as paid",
|
|
71
|
+
markedAsPartiallyPaid: "Marked as partially paid",
|
|
72
|
+
paymentReverted: "Payment reverted",
|
|
73
|
+
statusChanged: (e) => `Status changed to ${e}`
|
|
74
|
+
}, m = {
|
|
75
|
+
newTitle: "New bill",
|
|
76
|
+
extractedTitle: (e) => `Bill from ${e}`,
|
|
77
|
+
viewTitle: (e) => `Bill from ${e}`,
|
|
78
|
+
readOnlyTitle: "Bill details",
|
|
79
|
+
addedOn: (e) => `Added on ${e}`,
|
|
80
|
+
discardConfirm: "Discard your changes to this bill?",
|
|
81
|
+
scheduledSummary: o,
|
|
82
|
+
actions: a,
|
|
83
|
+
detail: f,
|
|
84
|
+
history: p,
|
|
85
|
+
payBill: e,
|
|
86
|
+
markAsPaid: n,
|
|
87
|
+
approvalPolicyCopy: i,
|
|
88
|
+
deleteDraft: {
|
|
89
|
+
menuItem: "Delete draft",
|
|
90
|
+
dialog: {
|
|
91
|
+
title: "Delete this draft?",
|
|
92
|
+
description: "The draft and anything entered on it are removed. This can't be undone.",
|
|
93
|
+
confirmButton: "Delete draft"
|
|
94
|
+
},
|
|
95
|
+
error: "Couldn't delete this draft. Try again."
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
function h(e) {
|
|
99
|
+
return {
|
|
100
|
+
...m,
|
|
101
|
+
...e,
|
|
102
|
+
actions: s(e?.actions),
|
|
103
|
+
detail: {
|
|
104
|
+
...m.detail,
|
|
105
|
+
...e?.detail
|
|
106
|
+
},
|
|
107
|
+
history: {
|
|
108
|
+
...m.history,
|
|
109
|
+
...e?.history
|
|
110
|
+
},
|
|
111
|
+
payBill: t(e?.payBill),
|
|
112
|
+
markAsPaid: r(e?.markAsPaid),
|
|
113
|
+
approvalPolicyCopy: {
|
|
114
|
+
...m.approvalPolicyCopy,
|
|
115
|
+
...e?.approvalPolicyCopy
|
|
116
|
+
},
|
|
117
|
+
deleteDraft: {
|
|
118
|
+
...m.deleteDraft,
|
|
119
|
+
...e?.deleteDraft,
|
|
120
|
+
dialog: (() => {
|
|
121
|
+
let t = {
|
|
122
|
+
...m.deleteDraft.dialog,
|
|
123
|
+
...e?.deleteDraft?.dialog
|
|
124
|
+
};
|
|
125
|
+
return delete t.reason, t;
|
|
126
|
+
})()
|
|
127
|
+
}
|
|
128
|
+
};
|
|
211
129
|
}
|
|
130
|
+
var g = {
|
|
131
|
+
createTitle: "New vendor",
|
|
132
|
+
editTitle: "Edit vendor",
|
|
133
|
+
close: "Close the vendor form",
|
|
134
|
+
nameLabel: "Name",
|
|
135
|
+
addAddress: "Add address (optional)",
|
|
136
|
+
paymentMethodsHeading: "Accepted payment methods",
|
|
137
|
+
paymentMethodsDescription: "How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later — you just won't be able to send payments until you do.",
|
|
138
|
+
achTitle: "ACH bank transfer",
|
|
139
|
+
achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
|
|
140
|
+
addBankAccount: "Add bank account",
|
|
141
|
+
accountHolderNameLabel: "Account holder name",
|
|
142
|
+
routingNumberLabel: "Routing number",
|
|
143
|
+
accountNumberLabel: "Account number",
|
|
144
|
+
achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
|
|
145
|
+
cancel: "Cancel",
|
|
146
|
+
save: "Save vendor"
|
|
147
|
+
};
|
|
212
148
|
//#endregion
|
|
213
|
-
export {
|
|
149
|
+
export { l as BILL_CREATE_MESSAGE_LABELS_EN, m as BILL_CREATE_SCREEN_LABELS_EN, f as BILL_DETAIL_VIEW_LABELS_EN, p as BILL_HISTORY_LABELS_EN, d as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, g as VENDOR_INLINE_FORM_LABELS_EN, u as VENDOR_SECTION_PROPS_LABELS_EN, h as mergeBillCreateScreenCopy };
|
|
@@ -2,216 +2,79 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
5
|
+
import { SourceDocumentPanel as e } from "../../ui/dist/index90.js";
|
|
6
|
+
import "../../ui/dist/index.js";
|
|
7
|
+
import { useAttachPayableFileMutation as t } from "../../data-access/dist/index10.js";
|
|
7
8
|
import "../../data-access/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { useCreateCounterpartBankAccountMutation as ae, useUpdateCounterpartBankAccountMutation as l } from "../../../shared/counterpart-management/data-access/dist/index5.js";
|
|
13
|
-
import { useCounterpartDetails as u } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js";
|
|
14
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
15
|
-
import { VendorInlineForm as oe } from "./index31.js";
|
|
16
|
-
import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
|
|
17
|
-
import { jsx as se } from "react/jsx-runtime";
|
|
9
|
+
import { createSourceDocumentPreview as n } from "./index30.js";
|
|
10
|
+
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index31.js";
|
|
11
|
+
import { useEffect as i, useState as a } from "react";
|
|
12
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
18
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js
|
|
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
|
-
label: C.routingNumber,
|
|
85
|
-
value: n.routing_number ?? ""
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
label: C.accountNumber,
|
|
89
|
-
value: n.account_number ?? "",
|
|
90
|
-
maskedValue: n.account_number ? e(n.account_number) : ""
|
|
91
|
-
}
|
|
92
|
-
] : []
|
|
93
|
-
};
|
|
94
|
-
}, [
|
|
95
|
-
K.bankAccounts,
|
|
96
|
-
K.counterpart,
|
|
97
|
-
K.isBankAccountsError,
|
|
98
|
-
K.isBankAccountsLoading,
|
|
99
|
-
C
|
|
100
|
-
]), X = p(() => te(K.bankAccounts), [K.bankAccounts]), Z = p(() => s(K.bankAccounts)?.id, [K.bankAccounts]), Q = d(async () => {
|
|
101
|
-
let e = N.current;
|
|
102
|
-
if (!v) return { ok: !0 };
|
|
103
|
-
if (!c(e)) return b && v === y ? {
|
|
104
|
-
ok: !0,
|
|
105
|
-
counterpartBankAccountId: b
|
|
106
|
-
} : K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError ? { ok: !1 } : {
|
|
107
|
-
ok: !0,
|
|
108
|
-
counterpartBankAccountId: Z
|
|
109
|
-
};
|
|
110
|
-
if (K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError) return { ok: !1 };
|
|
111
|
-
let t = re(e);
|
|
112
|
-
if (Object.keys(t).length > 0) return L(t), A(!0), { ok: !1 };
|
|
113
|
-
L(void 0);
|
|
114
|
-
let n = ne(K.bankAccounts, R ?? X?.id);
|
|
115
|
-
if (n.kind === "update") return await J.mutateAsync({
|
|
116
|
-
path: {
|
|
117
|
-
counterpart_id: v,
|
|
118
|
-
bank_account_id: n.bankAccountId
|
|
119
|
-
},
|
|
120
|
-
body: ee(e, { includeAchDefaults: n.includeAchDefaults })
|
|
121
|
-
}), z(n.bankAccountId), {
|
|
122
|
-
ok: !0,
|
|
123
|
-
counterpartBankAccountId: n.bankAccountId
|
|
124
|
-
};
|
|
125
|
-
let r = await q.mutateAsync({
|
|
126
|
-
path: { counterpart_id: v },
|
|
127
|
-
body: i(e, { isDefaultForCurrency: n.isDefaultForCurrency })
|
|
128
|
-
});
|
|
129
|
-
return z(r?.id), {
|
|
130
|
-
ok: !0,
|
|
131
|
-
counterpartBankAccountId: r?.id
|
|
132
|
-
};
|
|
133
|
-
}, [
|
|
134
|
-
X,
|
|
135
|
-
v,
|
|
136
|
-
q,
|
|
137
|
-
K.bankAccounts,
|
|
138
|
-
K.isBankAccountsError,
|
|
139
|
-
K.isBankAccountsFetching,
|
|
140
|
-
K.isBankAccountsLoading,
|
|
141
|
-
R,
|
|
142
|
-
Z,
|
|
143
|
-
b,
|
|
144
|
-
y,
|
|
145
|
-
J
|
|
146
|
-
]), he = p(() => (G.data?.data ?? []).map((e) => ({
|
|
147
|
-
name: o(e),
|
|
148
|
-
email: a(e),
|
|
149
|
-
onSelect: () => U(e.id)
|
|
150
|
-
})), [G.data, U]), ge = p(() => r(S), [S]), $ = d(() => {
|
|
151
|
-
O(void 0), P(!1);
|
|
152
|
-
}, []), _e = d((e) => {
|
|
153
|
-
O(void 0), P(!1), U(e);
|
|
154
|
-
}, [U]);
|
|
155
|
-
if (D) return {
|
|
156
|
-
mode: "creating",
|
|
157
|
-
newVendorForm: /* @__PURE__ */ se(oe, {
|
|
158
|
-
mode: D,
|
|
159
|
-
counterpart: D === "edit" ? K.counterpart : void 0,
|
|
160
|
-
primaryAddress: D === "edit" ? K.primaryAddress : void 0,
|
|
161
|
-
bankAccounts: D === "edit" ? K.bankAccounts : void 0,
|
|
162
|
-
isBankAccountsLoading: D === "edit" ? K.isBankAccountsLoading : void 0,
|
|
163
|
-
isBankAccountsError: D === "edit" ? K.isBankAccountsError : void 0,
|
|
164
|
-
initialName: D === "create" ? w : void 0,
|
|
165
|
-
initialValues: D === "create" ? ge : void 0,
|
|
166
|
-
onSaved: _e,
|
|
167
|
-
onCancel: $,
|
|
168
|
-
onDirtyChange: P
|
|
169
|
-
}),
|
|
170
|
-
onClear: $,
|
|
171
|
-
hasUnsavedVendorChanges: F
|
|
172
|
-
};
|
|
173
|
-
if (Y) {
|
|
174
|
-
let e = K.isBankAccountsLoading || K.isBankAccountsFetching || K.isBankAccountsError;
|
|
175
|
-
return {
|
|
176
|
-
mode: "resolved",
|
|
177
|
-
summary: Y,
|
|
178
|
-
onEdit: e ? void 0 : () => O("edit"),
|
|
179
|
-
onClear: () => U(void 0),
|
|
180
|
-
paymentInstructions: e ? void 0 : {
|
|
181
|
-
isOpen: k,
|
|
182
|
-
values: j,
|
|
183
|
-
errors: I,
|
|
184
|
-
onOpen: () => {
|
|
185
|
-
A(!0), X && (M({
|
|
186
|
-
accountHolderName: X.account_holder_name ?? "",
|
|
187
|
-
routingNumber: X.routing_number ?? "",
|
|
188
|
-
accountNumber: X.account_number ?? ""
|
|
189
|
-
}), z(X.id));
|
|
190
|
-
},
|
|
191
|
-
onChange: (e) => {
|
|
192
|
-
M((t) => ({
|
|
193
|
-
...t,
|
|
194
|
-
...e
|
|
195
|
-
})), L(void 0);
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
savePaymentInstructions: Q,
|
|
199
|
-
hasUnsavedVendorChanges: F
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
return {
|
|
203
|
-
mode: "selecting",
|
|
204
|
-
error: G.isError ? C.searchFailed : K.isError ? C.vendorDetailsFailed : ue,
|
|
205
|
-
search: {
|
|
206
|
-
query: w,
|
|
207
|
-
onQueryChange: T,
|
|
208
|
-
isLoading: G.isLoading,
|
|
209
|
-
onAddVendor: () => O("create"),
|
|
210
|
-
results: he
|
|
211
|
-
},
|
|
212
|
-
savePaymentInstructions: Q,
|
|
213
|
-
hasUnsavedVendorChanges: F
|
|
214
|
-
};
|
|
14
|
+
function s(e) {
|
|
15
|
+
let [t, n] = a();
|
|
16
|
+
return i(() => {
|
|
17
|
+
if (!e) {
|
|
18
|
+
n(void 0);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
let t = URL.createObjectURL(e);
|
|
22
|
+
return n(t), () => URL.revokeObjectURL(t);
|
|
23
|
+
}, [e]), t;
|
|
24
|
+
}
|
|
25
|
+
function c({ payableId: i, file: a, isDocumentPending: c, pendingFileName: l, readOnly: u, staging: d, deletion: f, labels: p }) {
|
|
26
|
+
let { stagedFile: m, onFileStaged: h, onClearStagedFile: g, isSaving: _ } = d ?? {}, { isPending: v, onRequest: y, onDetachNow: b, isDeleting: x, hasFailed: S } = f ?? {}, C = {
|
|
27
|
+
...r,
|
|
28
|
+
...p,
|
|
29
|
+
preview: {
|
|
30
|
+
...r.preview,
|
|
31
|
+
...p?.preview
|
|
32
|
+
}
|
|
33
|
+
}, w = t(), T = s(m), E = !!(a && !v || m);
|
|
34
|
+
if (!E && (c || w.isPending)) return /* @__PURE__ */ o(e, {
|
|
35
|
+
mode: "loading",
|
|
36
|
+
fileName: l
|
|
37
|
+
});
|
|
38
|
+
if (!E && u) return /* @__PURE__ */ o("div", {
|
|
39
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:text-sm ttw:text-muted-foreground",
|
|
40
|
+
children: C.noDocument
|
|
41
|
+
});
|
|
42
|
+
if (!E) return /* @__PURE__ */ o(e, {
|
|
43
|
+
mode: "upload",
|
|
44
|
+
uploadStatus: w.isPending || x ? "uploading" : "idle",
|
|
45
|
+
uploadErrorMessage: w.isError ? C.attachFailed : S ? C.deleteFailed : void 0,
|
|
46
|
+
noticeMessage: v && !S ? C.pendingDeletionNotice : void 0,
|
|
47
|
+
onFilesSelected: (e) => {
|
|
48
|
+
let [t] = e;
|
|
49
|
+
if (t) {
|
|
50
|
+
if (i) {
|
|
51
|
+
let e = () => w.mutate({
|
|
52
|
+
path: { payable_id: i },
|
|
53
|
+
file: t
|
|
54
|
+
});
|
|
55
|
+
if (v && b) {
|
|
56
|
+
b().then(e, () => void 0);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
e();
|
|
60
|
+
} else h?.(t);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
let D = a?.name ?? m?.name ?? "", O = n(a || {
|
|
65
|
+
name: D,
|
|
66
|
+
url: T ?? "",
|
|
67
|
+
mimetype: m?.type ?? ""
|
|
68
|
+
}, C.preview);
|
|
69
|
+
return /* @__PURE__ */ o(e, {
|
|
70
|
+
mode: "document",
|
|
71
|
+
fileName: D,
|
|
72
|
+
preview: O,
|
|
73
|
+
isDeleting: x,
|
|
74
|
+
deleteErrorMessage: S ? C.deleteFailed : void 0,
|
|
75
|
+
onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
|
|
76
|
+
onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
|
|
77
|
+
});
|
|
215
78
|
}
|
|
216
79
|
//#endregion
|
|
217
|
-
export {
|
|
80
|
+
export { c as SourceDocumentContainer, c as default };
|