@tesouro/embedded-components-react 0.5.303 → 0.5.305
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/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +24 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +20 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +13 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +153 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +17 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +23 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +42 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +93 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +77 -185
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +3 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +55 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +111 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +184 -463
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index3.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +78 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +61 -74
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +115 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +449 -216
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +116 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +11 -249
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +85 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +80 -648
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +240 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +44 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +38 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +242 -240
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +25 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +538 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +3 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +239 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +67 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +227 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +82 -224
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +45 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +4 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidgetNative/BillsTab.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,16 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { createSourceDocumentPreview as e } from "./index28.js";
|
|
6
|
+
import { SourceDocumentPanel as t } from "../../ui/dist/index49.js";
|
|
7
|
+
import "../../ui/dist/index.js";
|
|
8
|
+
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as n } from "./index29.js";
|
|
9
|
+
import { useAttachPayableFileMutation as r } from "../../data-access/dist/index5.js";
|
|
10
|
+
import "../../data-access/dist/index.js";
|
|
11
|
+
import { useEffect as i, useState as a } from "react";
|
|
12
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
1
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
+
...n,
|
|
28
|
+
...p,
|
|
29
|
+
preview: {
|
|
30
|
+
...n.preview,
|
|
31
|
+
...p?.preview
|
|
32
|
+
}
|
|
33
|
+
}, w = r(), T = s(m), E = !!(a && !v || m);
|
|
34
|
+
if (!E && (c || w.isPending)) return /* @__PURE__ */ o(t, {
|
|
35
|
+
mode: "loading",
|
|
36
|
+
fileName: l,
|
|
37
|
+
labels: p?.panel
|
|
38
|
+
});
|
|
39
|
+
if (!E && u) return /* @__PURE__ */ o("div", {
|
|
40
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:text-sm ttw:text-muted-foreground",
|
|
41
|
+
children: C.noDocument
|
|
42
|
+
});
|
|
43
|
+
if (!E) return /* @__PURE__ */ o(t, {
|
|
44
|
+
mode: "upload",
|
|
45
|
+
labels: p?.panel,
|
|
46
|
+
uploadStatus: w.isPending || x ? "uploading" : "idle",
|
|
47
|
+
uploadErrorMessage: w.isError ? C.attachFailed : S ? C.deleteFailed : void 0,
|
|
48
|
+
noticeMessage: v && !S ? C.pendingDeletionNotice : void 0,
|
|
49
|
+
onFilesSelected: (e) => {
|
|
50
|
+
let [t] = e;
|
|
51
|
+
if (t) {
|
|
52
|
+
if (i) {
|
|
53
|
+
let e = () => w.mutate({
|
|
54
|
+
path: { payable_id: i },
|
|
55
|
+
file: t
|
|
56
|
+
});
|
|
57
|
+
if (v && b) {
|
|
58
|
+
b().then(e, () => void 0);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
e();
|
|
62
|
+
} else h?.(t);
|
|
10
63
|
}
|
|
11
|
-
|
|
12
|
-
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
let D = a?.name ?? m?.name ?? "", O = e(a || {
|
|
67
|
+
name: D,
|
|
68
|
+
url: T ?? "",
|
|
69
|
+
mimetype: m?.type ?? ""
|
|
70
|
+
}, C.preview);
|
|
71
|
+
return /* @__PURE__ */ o(t, {
|
|
72
|
+
mode: "document",
|
|
73
|
+
labels: p?.panel,
|
|
74
|
+
fileName: D,
|
|
75
|
+
preview: O,
|
|
76
|
+
isDeleting: x,
|
|
77
|
+
deleteErrorMessage: S ? C.deleteFailed : void 0,
|
|
78
|
+
onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
|
|
79
|
+
onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
|
|
13
80
|
});
|
|
14
81
|
}
|
|
15
82
|
//#endregion
|
|
16
|
-
export {
|
|
83
|
+
export { c as SourceDocumentContainer, c as default };
|
|
@@ -1,87 +1,74 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isStateValid as e } from "../../../../shared/util/dist/lib/usStates.js";
|
|
2
|
+
import { emptyCounterpartFormValues as t, hasCounterpartFormErrors as n, validateCounterpartForm as r } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
3
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
2
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js
|
|
3
|
-
var t = "USD";
|
|
4
|
-
function n(n) {
|
|
5
|
-
return e(n, t);
|
|
6
|
-
}
|
|
7
|
-
function r(e) {
|
|
8
|
-
let t = e.trim();
|
|
9
|
-
if (!t) return null;
|
|
10
|
-
let n = Number(t);
|
|
11
|
-
return Number.isFinite(n) && n > 0 ? n : null;
|
|
12
|
-
}
|
|
13
5
|
function i(e) {
|
|
14
|
-
return
|
|
6
|
+
return e?.trim() ?? "";
|
|
15
7
|
}
|
|
16
|
-
function a(
|
|
17
|
-
|
|
8
|
+
function a(t) {
|
|
9
|
+
let n = i(t).toUpperCase();
|
|
10
|
+
return e(n) ? n : "";
|
|
18
11
|
}
|
|
19
12
|
function o(e) {
|
|
20
|
-
let t =
|
|
21
|
-
|
|
13
|
+
let t = i(e.bank_account?.account_holder_name), n = i(e.bank_account?.routing_number), r = i(e.bank_account?.account_number);
|
|
14
|
+
if (t || n || r) return {
|
|
15
|
+
accountHolderName: t || i(e.name),
|
|
16
|
+
routingNumber: n,
|
|
17
|
+
accountNumber: r
|
|
18
|
+
};
|
|
22
19
|
}
|
|
23
20
|
function s(e) {
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
if (!e) return;
|
|
22
|
+
let t = {
|
|
23
|
+
legalName: i(e.name),
|
|
24
|
+
email: i(e.email),
|
|
25
|
+
phone: i(e.phone),
|
|
26
|
+
address: {
|
|
27
|
+
line1: i(e.address?.line1),
|
|
28
|
+
line2: i(e.address?.line2),
|
|
29
|
+
city: i(e.address?.city),
|
|
30
|
+
state: a(e.address?.state),
|
|
31
|
+
postalCode: i(e.address?.postal_code)
|
|
32
|
+
},
|
|
33
|
+
bankAccount: o(e)
|
|
34
|
+
};
|
|
35
|
+
return t.legalName || t.email || t.phone || Object.values(t.address).some(Boolean) || t.bankAccount ? t : void 0;
|
|
26
36
|
}
|
|
27
37
|
function c(e) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
discount: s?.discount
|
|
41
|
-
});
|
|
42
|
-
e !== void 0 && (m.total_amount = e);
|
|
43
|
-
}
|
|
44
|
-
return m;
|
|
38
|
+
let a = s(e);
|
|
39
|
+
if (!a || i(e?.address?.country).toUpperCase() !== "US") return !1;
|
|
40
|
+
let o = t("organization", "vendor");
|
|
41
|
+
return !n(r({
|
|
42
|
+
...o,
|
|
43
|
+
...a,
|
|
44
|
+
bankAccount: {
|
|
45
|
+
accountHolderName: i(e?.bank_account?.account_holder_name),
|
|
46
|
+
routingNumber: i(e?.bank_account?.routing_number),
|
|
47
|
+
accountNumber: i(e?.bank_account?.account_number)
|
|
48
|
+
}
|
|
49
|
+
}, "create", void 0, "vendor"));
|
|
45
50
|
}
|
|
46
|
-
function
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
51
|
+
function l(e, t, n) {
|
|
52
|
+
let r = (e) => i(e) || void 0, { address: a } = e;
|
|
53
|
+
return {
|
|
54
|
+
...n,
|
|
55
|
+
name: r(e.entityType === "individual" ? `${e.firstName} ${e.lastName}` : e.legalName),
|
|
56
|
+
email: r(e.email),
|
|
57
|
+
phone: r(e.phone),
|
|
58
|
+
address: {
|
|
59
|
+
...n?.address,
|
|
60
|
+
line1: r(a.line1),
|
|
61
|
+
line2: r(a.line2),
|
|
62
|
+
city: r(a.city),
|
|
63
|
+
state: r(a.state),
|
|
64
|
+
postal_code: r(a.postalCode)
|
|
65
|
+
},
|
|
66
|
+
bank_account: {
|
|
67
|
+
account_holder_name: r(t.accountHolderName),
|
|
68
|
+
routing_number: r(t.routingNumber),
|
|
69
|
+
account_number: r(t.accountNumber)
|
|
70
|
+
}
|
|
62
71
|
};
|
|
63
|
-
return r !== void 0 && (o.subtotal = r), t.total === void 0 ? r !== void 0 && (o.total_amount = r - a + i) : o.total_amount = n(t.total) ?? 0, o;
|
|
64
|
-
}
|
|
65
|
-
function p(e) {
|
|
66
|
-
return e.filter(i).map((e) => {
|
|
67
|
-
let t = n(e.amount), i = r(e.quantity) ?? 1, a = n(e.price) ?? (t === null ? 0 : Math.round(t / i)), o = Math.round(i * a), s = t ?? o;
|
|
68
|
-
return {
|
|
69
|
-
name: e.description,
|
|
70
|
-
quantity: i,
|
|
71
|
-
unit_price: a,
|
|
72
|
-
tax: 0,
|
|
73
|
-
subtotal: s,
|
|
74
|
-
tax_amount: 0,
|
|
75
|
-
total: s,
|
|
76
|
-
...e.glCode ? { ledger_account_id: e.glCode } : {}
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function m(e, t) {
|
|
81
|
-
return c(Math.round(o(e) * a(t)));
|
|
82
|
-
}
|
|
83
|
-
function h(e, t, n) {
|
|
84
|
-
return c(e.reduce((e, t) => e + a(t.amount), 0) + a(t) - a(n));
|
|
85
72
|
}
|
|
86
73
|
//#endregion
|
|
87
|
-
export {
|
|
74
|
+
export { s as buildVendorPrefill, c as canAutoCreateVendor, l as toCounterpartRawData };
|
|
@@ -1,83 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.js";
|
|
7
|
+
import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
+
import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
|
+
import "../../../../shared/counterpart-management/ui/dist/index.js";
|
|
10
|
+
import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
|
|
11
|
+
import "../../ui/dist/index.js";
|
|
12
|
+
import { mergeVendorInlineFormLabels as s } from "./index29.js";
|
|
13
|
+
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
14
|
+
import { useMemo as c } from "react";
|
|
15
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
3
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
17
|
+
function d({ mode: d, values: f, errors: p, onChange: m, onAddressChange: h, sectionsToExpand: g, onAddressExpand: _, onCancel: v, onSave: y, isSaving: b = !1, search: x, paymentInstructions: S, labels: C }) {
|
|
18
|
+
let w = c(() => s(C), [C]), T = c(() => t(), []), E = a(p ?? {}), D = i({
|
|
19
|
+
...p,
|
|
20
|
+
form: void 0,
|
|
21
|
+
bankAccount: void 0
|
|
22
|
+
}) + i(S?.errors), O = x?.query.trim() ?? "", k = f.entityType === "individual" ? `${f.firstName} ${f.lastName}`.trim() : f.legalName, A = x && d === "create" ? /* @__PURE__ */ l(o, {
|
|
23
|
+
...x,
|
|
24
|
+
onAddVendor: O && O !== k.trim() ? x.onAddVendor : void 0,
|
|
25
|
+
selectedLabel: k,
|
|
26
|
+
badge: w.newVendorBadge,
|
|
27
|
+
helperText: w.unmatchedVendorHelper,
|
|
28
|
+
resultsHeading: w.resultsHeading,
|
|
29
|
+
addVendorDescription: w.addAsNewVendorDescription,
|
|
30
|
+
labels: {
|
|
31
|
+
fieldLabel: w.vendorFieldLabel,
|
|
32
|
+
addVendorAction: w.addAsNewVendor(O)
|
|
33
|
+
}
|
|
34
|
+
}) : null;
|
|
35
|
+
return /* @__PURE__ */ u("div", {
|
|
36
|
+
ref: E,
|
|
37
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
38
|
+
children: [A, /* @__PURE__ */ u("div", {
|
|
39
|
+
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:rounded-lg ttw:border ttw:border-primary ttw:bg-surface-subtle ttw:p-6 ttw:[&_[data-slot=input]]:bg-background ttw:[&_[data-slot=select-trigger]]:bg-background",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ u("div", {
|
|
42
|
+
className: "ttw:flex ttw:items-baseline ttw:justify-between ttw:gap-2",
|
|
43
|
+
children: [/* @__PURE__ */ l("p", {
|
|
44
|
+
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
45
|
+
children: d === "edit" ? w.editTitle : w.createTitle
|
|
46
|
+
}), D > 0 ? /* @__PURE__ */ l("p", {
|
|
47
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
48
|
+
children: w.fieldsNeedAttention(D)
|
|
49
|
+
}) : null]
|
|
50
|
+
}),
|
|
51
|
+
x && d === "edit" ? /* @__PURE__ */ l(o, {
|
|
52
|
+
...x,
|
|
53
|
+
labels: { fieldLabel: w.switchVendorFieldLabel }
|
|
54
|
+
}) : null,
|
|
55
|
+
/* @__PURE__ */ l(r, {
|
|
56
|
+
mode: d,
|
|
57
|
+
counterpartMode: "vendor",
|
|
58
|
+
values: f,
|
|
59
|
+
errors: p,
|
|
60
|
+
stateOptions: T,
|
|
61
|
+
onChange: m,
|
|
62
|
+
onAddressChange: h,
|
|
63
|
+
sections: {
|
|
64
|
+
entityType: !0,
|
|
65
|
+
profileHeading: !1,
|
|
66
|
+
addressHeading: !1,
|
|
67
|
+
title: !1,
|
|
68
|
+
taxId: !1,
|
|
69
|
+
address: d !== "edit" || "collapsible",
|
|
70
|
+
bankAccount: !1
|
|
71
|
+
},
|
|
72
|
+
sectionsToExpand: g,
|
|
73
|
+
onAddressExpand: _,
|
|
74
|
+
labels: { businessNameLabel: w.nameLabel }
|
|
75
|
+
}),
|
|
76
|
+
S ? /* @__PURE__ */ u("div", {
|
|
77
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
78
|
+
children: [/* @__PURE__ */ u("div", {
|
|
79
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
80
|
+
children: [/* @__PURE__ */ l("p", {
|
|
81
|
+
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
82
|
+
children: w.paymentInstructionsHeading
|
|
83
|
+
}), /* @__PURE__ */ l("p", {
|
|
84
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
85
|
+
children: S.isExtracted ? w.paymentInstructionsExtracted : w.paymentInstructionsDescription
|
|
86
|
+
})]
|
|
87
|
+
}), /* @__PURE__ */ l(n, {
|
|
88
|
+
idPrefix: "vendor-inline-ach",
|
|
89
|
+
values: S.values,
|
|
90
|
+
errors: S.errors,
|
|
91
|
+
onChange: S.onChange,
|
|
92
|
+
labels: w.ach
|
|
93
|
+
})]
|
|
94
|
+
}) : null,
|
|
95
|
+
/* @__PURE__ */ u("div", {
|
|
96
|
+
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
97
|
+
children: [/* @__PURE__ */ l(e, {
|
|
98
|
+
type: "button",
|
|
99
|
+
variant: "outline",
|
|
100
|
+
onClick: v,
|
|
101
|
+
"aria-label": w.cancelAriaLabel,
|
|
102
|
+
disabled: b,
|
|
103
|
+
children: w.cancel
|
|
104
|
+
}), y ? /* @__PURE__ */ l(e, {
|
|
105
|
+
type: "button",
|
|
106
|
+
onClick: y,
|
|
107
|
+
"aria-label": w.saveAriaLabel,
|
|
108
|
+
loading: b,
|
|
109
|
+
disabled: b,
|
|
110
|
+
children: w.save
|
|
111
|
+
}) : null]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
114
|
+
})]
|
|
115
|
+
});
|
|
81
116
|
}
|
|
82
117
|
//#endregion
|
|
83
|
-
export {
|
|
118
|
+
export { d as VendorInlineForm, d as default };
|