@tesouro/embedded-components-react 0.4.20 → 0.4.22
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 +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +64 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +38 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +104 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +87 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +7 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +17 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +23 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +66 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +2 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +74 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +30 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +37 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +164 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +18 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +135 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +39 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +79 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +5 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +95 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +47 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +119 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +33 -177
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +186 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +223 -204
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +202 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +121 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +25 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +19 -383
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +416 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +4 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +35 -189
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +21 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +214 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +58 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +44 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +12 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +21 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +11 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +26 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +20 -152
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +154 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -64
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +61 -253
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +258 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +15 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +21 -338
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +340 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +9 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +11 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +52 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +10 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +181 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +86 -298
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +299 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +30 -195
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +36 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +199 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +15 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +347 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +7 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +91 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +123 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +94 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +5 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +10 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +74 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +8 -106
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatRejectionDate.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +0 -94
|
@@ -1,26 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
|
|
6
|
+
import "../../data-access/dist/index.js";
|
|
7
|
+
import { SourceDocumentPanel as t } from "../../ui/dist/index103.js";
|
|
8
|
+
import "../../ui/dist/index.js";
|
|
9
|
+
import { createSourceDocumentPreview as n } from "./index43.js";
|
|
10
|
+
import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index44.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/feature/dist/index45.js
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
8
24
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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 = e(), T = s(m), E = !!(a && !v || m);
|
|
34
|
+
if (!E && (c || w.isPending)) return /* @__PURE__ */ o(t, {
|
|
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(t, {
|
|
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
|
+
}
|
|
21
62
|
}
|
|
22
|
-
};
|
|
23
|
-
|
|
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(t, {
|
|
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
|
+
});
|
|
24
78
|
}
|
|
25
79
|
//#endregion
|
|
26
|
-
export {
|
|
80
|
+
export { c as SourceDocumentContainer, c as default };
|
|
@@ -1,236 +1,26 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { getStateOptions as s } from "../../../shared/util/dist/lib/usStates.js";
|
|
7
|
-
import { AchFieldGroup as ee } from "../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
-
import { CounterpartFormFields as c, useFocusFirstInvalidField as l } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
9
|
-
import { COUNTERPART_MESSAGE_LABELS_EN as u } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
|
|
10
|
-
import { useCounterpartForm as d } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
|
|
11
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
-
import { VENDOR_INLINE_FORM_LABELS_EN as f } from "./index43.js";
|
|
13
|
-
import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
14
|
-
import { Fragment as te, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
15
|
-
import { Landmark as b, Plus as ne, X as x } from "lucide-react";
|
|
16
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
isBankAccountsError: D
|
|
37
|
-
}), { openCreate: Y, openEdit: X, setValues: Z, expandAddress: Q } = J, re = l(J.errors);
|
|
38
|
-
m(() => {
|
|
39
|
-
S === "edit" ? X() : Y();
|
|
40
|
-
}, [
|
|
41
|
-
S,
|
|
42
|
-
Y,
|
|
43
|
-
X
|
|
44
|
-
]), m(() => {
|
|
45
|
-
K.current !== "none" && F === "none" && L && A(L), K.current = F;
|
|
46
|
-
}, [
|
|
47
|
-
F,
|
|
48
|
-
L,
|
|
49
|
-
A
|
|
50
|
-
]), m(() => {
|
|
51
|
-
S !== "create" || q.current || (q.current = !0, Z((e) => ({
|
|
52
|
-
...e,
|
|
53
|
-
entityType: "organization",
|
|
54
|
-
legalName: O?.trim() || k?.legalName || e.legalName,
|
|
55
|
-
email: k?.email || e.email,
|
|
56
|
-
phone: k?.phone || e.phone,
|
|
57
|
-
address: k?.address ?? e.address
|
|
58
|
-
})), k?.address && Object.values(k.address).some(Boolean) && Q());
|
|
59
|
-
}, [
|
|
60
|
-
S,
|
|
61
|
-
O,
|
|
62
|
-
k,
|
|
63
|
-
Z,
|
|
64
|
-
Q
|
|
65
|
-
]), m(() => {
|
|
66
|
-
S === "edit" && (J.values.bankAccount.routingNumber || J.values.bankAccount.accountNumber) && B(!0);
|
|
67
|
-
}, [
|
|
68
|
-
S,
|
|
69
|
-
J.values.bankAccount.accountNumber,
|
|
70
|
-
J.values.bankAccount.routingNumber
|
|
71
|
-
]), m(() => {
|
|
72
|
-
J.sectionsToExpand.bankAccount && B(!0);
|
|
73
|
-
}, [J.sectionsToExpand.bankAccount]);
|
|
74
|
-
let $ = p(() => {
|
|
75
|
-
if (V) {
|
|
76
|
-
W(!0);
|
|
77
|
-
return;
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e?.trim() ?? "";
|
|
4
|
+
}
|
|
5
|
+
function t(t) {
|
|
6
|
+
let n = e(t);
|
|
7
|
+
return n.length === 2 ? n.toUpperCase() : "";
|
|
8
|
+
}
|
|
9
|
+
function n(n) {
|
|
10
|
+
if (!n) return;
|
|
11
|
+
let r = {
|
|
12
|
+
legalName: e(n.name),
|
|
13
|
+
email: e(n.email),
|
|
14
|
+
phone: e(n.phone),
|
|
15
|
+
address: {
|
|
16
|
+
line1: e(n.address?.line1),
|
|
17
|
+
line2: e(n.address?.line2),
|
|
18
|
+
city: e(n.address?.city),
|
|
19
|
+
state: t(n.address?.state),
|
|
20
|
+
postalCode: e(n.address?.postal_code)
|
|
78
21
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
H(!0), Z((t) => e.entityType === "individual" && t.entityType !== "individual" ? {
|
|
82
|
-
...t,
|
|
83
|
-
...e,
|
|
84
|
-
firstName: t.firstName || t.legalName,
|
|
85
|
-
legalName: t.legalName
|
|
86
|
-
} : e.entityType === "organization" && t.entityType !== "organization" ? {
|
|
87
|
-
...t,
|
|
88
|
-
...e,
|
|
89
|
-
legalName: t.legalName || [t.firstName, t.lastName].filter(Boolean).join(" ")
|
|
90
|
-
} : {
|
|
91
|
-
...t,
|
|
92
|
-
...e
|
|
93
|
-
});
|
|
94
|
-
}, [Z]);
|
|
95
|
-
return /* @__PURE__ */ y("div", {
|
|
96
|
-
ref: re,
|
|
97
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ y("div", {
|
|
100
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-2",
|
|
101
|
-
children: [/* @__PURE__ */ v("p", {
|
|
102
|
-
className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
103
|
-
children: S === "edit" ? P.editTitle : P.createTitle
|
|
104
|
-
}), /* @__PURE__ */ v(o, {
|
|
105
|
-
type: "button",
|
|
106
|
-
variant: "ghost",
|
|
107
|
-
size: "icon",
|
|
108
|
-
"aria-label": P.close,
|
|
109
|
-
onClick: $,
|
|
110
|
-
children: /* @__PURE__ */ v(x, { className: "ttw:size-4" })
|
|
111
|
-
})]
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ v(c, {
|
|
114
|
-
mode: S,
|
|
115
|
-
counterpartMode: "vendor",
|
|
116
|
-
values: J.values,
|
|
117
|
-
errors: J.errors,
|
|
118
|
-
stateOptions: G,
|
|
119
|
-
onChange: ie,
|
|
120
|
-
onAddressChange: (e) => {
|
|
121
|
-
H(!0), Z((t) => ({
|
|
122
|
-
...t,
|
|
123
|
-
address: {
|
|
124
|
-
...t.address,
|
|
125
|
-
...e
|
|
126
|
-
}
|
|
127
|
-
}));
|
|
128
|
-
},
|
|
129
|
-
sections: {
|
|
130
|
-
entityType: !0,
|
|
131
|
-
profileHeading: !1,
|
|
132
|
-
title: !1,
|
|
133
|
-
taxId: !1,
|
|
134
|
-
address: "collapsible",
|
|
135
|
-
bankAccount: !1
|
|
136
|
-
},
|
|
137
|
-
sectionsToExpand: J.sectionsToExpand,
|
|
138
|
-
onAddressExpand: J.expandAddress,
|
|
139
|
-
labels: { businessNameLabel: P.nameLabel }
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ y("div", {
|
|
142
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
143
|
-
children: [/* @__PURE__ */ v("p", {
|
|
144
|
-
className: "ttw:text-sm ttw:font-semibold ttw:text-foreground",
|
|
145
|
-
children: P.paymentMethodsHeading
|
|
146
|
-
}), /* @__PURE__ */ v("p", {
|
|
147
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
148
|
-
children: P.paymentMethodsDescription
|
|
149
|
-
})]
|
|
150
|
-
}),
|
|
151
|
-
/* @__PURE__ */ y("div", {
|
|
152
|
-
className: "ttw:flex ttw:gap-3 ttw:rounded-lg ttw:border ttw:border-border ttw:p-3",
|
|
153
|
-
children: [/* @__PURE__ */ v("span", {
|
|
154
|
-
className: "ttw:flex ttw:size-8 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-md ttw:bg-primary",
|
|
155
|
-
children: /* @__PURE__ */ v(b, {
|
|
156
|
-
"aria-hidden": !0,
|
|
157
|
-
className: "ttw:size-4 ttw:text-white"
|
|
158
|
-
})
|
|
159
|
-
}), /* @__PURE__ */ y("div", {
|
|
160
|
-
className: "ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-3",
|
|
161
|
-
children: [/* @__PURE__ */ y("div", {
|
|
162
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
163
|
-
children: [/* @__PURE__ */ v("p", {
|
|
164
|
-
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
165
|
-
children: P.achTitle
|
|
166
|
-
}), /* @__PURE__ */ v("p", {
|
|
167
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
168
|
-
children: P.achDescription
|
|
169
|
-
})]
|
|
170
|
-
}), z ? /* @__PURE__ */ y(te, { children: [/* @__PURE__ */ v(ee, {
|
|
171
|
-
idPrefix: "vendor-inline-ach",
|
|
172
|
-
values: J.values.bankAccount,
|
|
173
|
-
errors: J.errors?.bankAccount,
|
|
174
|
-
onChange: (e) => {
|
|
175
|
-
H(!0), Z((t) => ({
|
|
176
|
-
...t,
|
|
177
|
-
bankAccount: {
|
|
178
|
-
...t.bankAccount,
|
|
179
|
-
...e
|
|
180
|
-
}
|
|
181
|
-
}));
|
|
182
|
-
},
|
|
183
|
-
labels: {
|
|
184
|
-
accountHolderName: P.accountHolderNameLabel,
|
|
185
|
-
routingNumber: P.routingNumberLabel,
|
|
186
|
-
accountNumber: P.accountNumberLabel
|
|
187
|
-
}
|
|
188
|
-
}), /* @__PURE__ */ v("p", {
|
|
189
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
190
|
-
children: P.achHelp
|
|
191
|
-
})] }) : /* @__PURE__ */ y(o, {
|
|
192
|
-
type: "button",
|
|
193
|
-
variant: "link",
|
|
194
|
-
className: "ttw:w-fit ttw:px-0",
|
|
195
|
-
onClick: () => B(!0),
|
|
196
|
-
children: [/* @__PURE__ */ v(ne, { className: "ttw:size-4" }), P.addBankAccount]
|
|
197
|
-
})]
|
|
198
|
-
})]
|
|
199
|
-
}),
|
|
200
|
-
/* @__PURE__ */ y("div", {
|
|
201
|
-
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
202
|
-
children: [/* @__PURE__ */ v(o, {
|
|
203
|
-
type: "button",
|
|
204
|
-
variant: "outline",
|
|
205
|
-
onClick: $,
|
|
206
|
-
children: P.cancel
|
|
207
|
-
}), /* @__PURE__ */ v(o, {
|
|
208
|
-
type: "button",
|
|
209
|
-
onClick: J.submit,
|
|
210
|
-
loading: J.isSubmitting,
|
|
211
|
-
disabled: J.isSubmitting,
|
|
212
|
-
children: P.save
|
|
213
|
-
})]
|
|
214
|
-
}),
|
|
215
|
-
/* @__PURE__ */ v(e, {
|
|
216
|
-
open: U,
|
|
217
|
-
onOpenChange: W,
|
|
218
|
-
children: /* @__PURE__ */ y(t, { children: [/* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(a, { children: P.discardConfirmTitle }), /* @__PURE__ */ v(n, { children: P.discardConfirmDescription })] }), /* @__PURE__ */ y(r, { children: [/* @__PURE__ */ v(o, {
|
|
219
|
-
type: "button",
|
|
220
|
-
variant: "outline",
|
|
221
|
-
onClick: () => W(!1),
|
|
222
|
-
children: P.keepEditingAction
|
|
223
|
-
}), /* @__PURE__ */ v(o, {
|
|
224
|
-
type: "button",
|
|
225
|
-
variant: "destructive",
|
|
226
|
-
onClick: () => {
|
|
227
|
-
W(!1), j();
|
|
228
|
-
},
|
|
229
|
-
children: P.discardChangesAction
|
|
230
|
-
})] })] })
|
|
231
|
-
})
|
|
232
|
-
]
|
|
233
|
-
});
|
|
22
|
+
};
|
|
23
|
+
return r.legalName || r.email || r.phone || Object.values(r.address).some(Boolean) ? r : void 0;
|
|
234
24
|
}
|
|
235
25
|
//#endregion
|
|
236
|
-
export {
|
|
26
|
+
export { n as buildVendorPrefill };
|