@tesouro/embedded-components-react 0.2.336 → 0.2.338
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.css +22 -0
- 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/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +103 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +74 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +25 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +51 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -71
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +71 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +46 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +78 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +33 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +138 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -200
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +194 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +180 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +26 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +102 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +13 -219
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +243 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +27 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +76 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +137 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +7 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +20 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +57 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +3 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +105 -157
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +11 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +40 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +171 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +34 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +1 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +38 -269
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +272 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +7 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +20 -284
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +286 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +13 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +120 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +8 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +96 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +11 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +57 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +1 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +51 -136
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +141 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +5 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +44 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +63 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +1 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +73 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +251 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +9 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +43 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +278 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +8 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +91 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +101 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +28 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -170
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +32 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +106 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +170 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +26 -26
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/clientRegistry.js +11 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +94 -74
- 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/dist/packages/shared-ui-shadcn/dist/index.js +1378 -1371
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +0 -34
|
@@ -1,38 +1,166 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useReplacePayableLineItemsMutation as t } from "../../data-access/dist/index7.js";
|
|
8
|
+
import { useCreatePayableMutation as n, useSubmitPayableForApprovalMutation as r, useUpdatePayableMutation as i, useValidatePayableMutation as a } from "../../data-access/dist/index10.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as o } from "./index27.js";
|
|
11
|
+
import { encodeFileToBase64 as s } from "./index32.js";
|
|
12
|
+
import { mapBillFormToPayload as c, mapLineItemsToPayload as l } from "./index33.js";
|
|
13
|
+
import { validateBillCompleteness as u, validateBillTotals as d, validateLineItems as f } from "./index34.js";
|
|
14
|
+
import { useCallback as p, useRef as m, useState as h } from "react";
|
|
1
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
16
|
+
var g = {
|
|
17
|
+
document_id: "invoiceNumber",
|
|
18
|
+
issued_at: "invoiceDate",
|
|
19
|
+
due_date: "dueDate",
|
|
20
|
+
counterpart_id: "vendor"
|
|
21
|
+
};
|
|
22
|
+
function _(e) {
|
|
23
|
+
return e.type === "type_error.none.not_allowed" || e.msg === "none is not an allowed value";
|
|
11
24
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
25
|
+
function v(e, t = o) {
|
|
26
|
+
let n = {}, r = [];
|
|
27
|
+
for (let i of e) {
|
|
28
|
+
let e = i.loc[0] ?? t.unknownValidationField, a = g[e], o = _(i) ? t.requiredField : i.msg;
|
|
29
|
+
a ? n[a] = o : r.push(t.unmappedValidationError(e, o));
|
|
30
|
+
}
|
|
31
|
+
return r.length && (n.form = r.join(" ")), n;
|
|
32
|
+
}
|
|
33
|
+
function y(e, t) {
|
|
34
|
+
if (!e && !t) return;
|
|
35
|
+
let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
|
|
36
|
+
for (let i of r) n[i] = {
|
|
37
|
+
...e?.[i],
|
|
38
|
+
...t?.[i]
|
|
39
|
+
};
|
|
40
|
+
return n;
|
|
14
41
|
}
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
function b({ payableId: g, form: _, counterpartId: b, clearCounterpart: x, prepareVendorForSave: S, onSaved: C, onPayableCreated: w, onDraftSaved: T, onFinalized: E, labels: D }) {
|
|
43
|
+
let O = {
|
|
44
|
+
...o,
|
|
45
|
+
...D
|
|
46
|
+
}, [k, A] = h(), j = g ?? k, [M, N] = h(), P = p(() => N(void 0), []), [F, I] = h(), L = m(!1), R = n(), z = i(), B = t(), V = a(), H = r(), U = p(() => {
|
|
47
|
+
let t = f(_.lineItems, O), n = d(_.discount, _.tax, _.totalOverride, O);
|
|
48
|
+
return _.setLineItemErrors(t), !t && !n || (t ? (_.setErrors(void 0), e.error(O.lineItemsNeedAttention)) : _.setErrors(n), !1);
|
|
49
|
+
}, [_, O]), W = p(async () => {
|
|
50
|
+
let e = !j && M ? {
|
|
51
|
+
base64EncodedFile: await s(M),
|
|
52
|
+
fileName: M.name
|
|
53
|
+
} : void 0, t = c({
|
|
54
|
+
values: _.values,
|
|
55
|
+
counterpartId: b,
|
|
56
|
+
clearCounterpart: x,
|
|
57
|
+
editedTotals: _.isTotalsDirty ? {
|
|
58
|
+
discount: _.discount,
|
|
59
|
+
tax: _.tax,
|
|
60
|
+
total: _.totalOverride
|
|
61
|
+
} : void 0,
|
|
62
|
+
document: e
|
|
63
|
+
}), n = j;
|
|
64
|
+
if (n ? await z.mutateAsync({
|
|
65
|
+
path: { payable_id: n },
|
|
66
|
+
body: t
|
|
67
|
+
}) : (n = (await R.mutateAsync({ body: t }))?.id, n && (A(n), w?.(n), e && N(void 0))), !n) throw Error("Payable was created without an id");
|
|
68
|
+
return await B.mutateAsync({
|
|
69
|
+
path: { payable_id: n },
|
|
70
|
+
body: { data: l(_.lineItems) }
|
|
71
|
+
}), n;
|
|
72
|
+
}, [
|
|
73
|
+
b,
|
|
74
|
+
x,
|
|
75
|
+
R,
|
|
76
|
+
_.discount,
|
|
77
|
+
_.isTotalsDirty,
|
|
78
|
+
_.lineItems,
|
|
79
|
+
_.tax,
|
|
80
|
+
_.totalOverride,
|
|
81
|
+
_.values,
|
|
82
|
+
w,
|
|
83
|
+
j,
|
|
84
|
+
B,
|
|
85
|
+
M,
|
|
86
|
+
z
|
|
87
|
+
]);
|
|
29
88
|
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
89
|
+
saveDraft: p(async () => {
|
|
90
|
+
if (!L.current && U()) {
|
|
91
|
+
L.current = !0, I("draft");
|
|
92
|
+
try {
|
|
93
|
+
if (await S?.() === !1) return;
|
|
94
|
+
let t = await W();
|
|
95
|
+
_.setErrors(void 0), C?.(t), T?.(t), e.success(O.draftSaved);
|
|
96
|
+
} catch {
|
|
97
|
+
_.setErrors({ form: O.saveFailed });
|
|
98
|
+
} finally {
|
|
99
|
+
I(void 0), L.current = !1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, [
|
|
103
|
+
_,
|
|
104
|
+
U,
|
|
105
|
+
O.draftSaved,
|
|
106
|
+
O.saveFailed,
|
|
107
|
+
T,
|
|
108
|
+
C,
|
|
109
|
+
S,
|
|
110
|
+
W
|
|
111
|
+
]),
|
|
112
|
+
finalize: p(async () => {
|
|
113
|
+
if (L.current) return;
|
|
114
|
+
let t = f(_.lineItems, O), n = d(_.discount, _.tax, _.totalOverride, O), { formErrors: r, lineItemErrors: i } = u(_.values, b, _.lineItems, O), a = y(i, t);
|
|
115
|
+
_.setLineItemErrors(a);
|
|
116
|
+
let o = {
|
|
117
|
+
...r,
|
|
118
|
+
...n
|
|
119
|
+
};
|
|
120
|
+
if (_.setErrors(Object.keys(o).length ? o : void 0), t && e.error(O.lineItemsNeedAttention), !(a || Object.keys(o).length)) {
|
|
121
|
+
L.current = !0, I("finalize");
|
|
122
|
+
try {
|
|
123
|
+
let t;
|
|
124
|
+
try {
|
|
125
|
+
if (await S?.() === !1) return;
|
|
126
|
+
t = await W();
|
|
127
|
+
} catch {
|
|
128
|
+
_.setErrors({ form: O.saveFailed });
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
C?.(t);
|
|
132
|
+
try {
|
|
133
|
+
let n = await V.mutateAsync({ path: { payable_id: t } });
|
|
134
|
+
if (n.validation_errors.length) {
|
|
135
|
+
_.setErrors(v(n.validation_errors, O));
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
await H.mutateAsync({ path: { payable_id: t } }), _.setErrors(void 0), E?.(t), e.success(O.billFinalized);
|
|
139
|
+
} catch {
|
|
140
|
+
_.setErrors({ form: O.finalizeFailed });
|
|
141
|
+
}
|
|
142
|
+
} finally {
|
|
143
|
+
I(void 0), L.current = !1;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}, [
|
|
147
|
+
b,
|
|
148
|
+
_,
|
|
149
|
+
O,
|
|
150
|
+
E,
|
|
151
|
+
C,
|
|
152
|
+
S,
|
|
153
|
+
W,
|
|
154
|
+
H,
|
|
155
|
+
V
|
|
156
|
+
]),
|
|
157
|
+
payableId: j,
|
|
158
|
+
isSavingDraft: F === "draft",
|
|
159
|
+
isFinalizing: F === "finalize",
|
|
160
|
+
stagedFile: M,
|
|
161
|
+
stageFile: N,
|
|
162
|
+
clearStagedFile: P
|
|
35
163
|
};
|
|
36
164
|
}
|
|
37
165
|
//#endregion
|
|
38
|
-
export {
|
|
166
|
+
export { v as mapValidationErrorsToForm, b as useBillCreateController };
|
|
@@ -1,104 +1,38 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { calculateTotal as e, displayLineAmount as t, parseMoneyToMinorUnits as n } from "./index32.js";
|
|
6
|
-
import { emptyLineItem as r, mapPayableToBillForm as i } from "./index35.js";
|
|
7
|
-
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
8
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js
|
|
9
|
-
function
|
|
10
|
-
return
|
|
2
|
+
function e() {
|
|
3
|
+
return {
|
|
4
|
+
id: crypto.randomUUID(),
|
|
5
|
+
description: "",
|
|
6
|
+
glCode: "",
|
|
7
|
+
quantity: "1",
|
|
8
|
+
price: "",
|
|
9
|
+
amount: ""
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function t(e) {
|
|
13
|
+
return typeof e == "number" ? (e / 100).toFixed(2) : "";
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...t,
|
|
27
|
-
...e
|
|
28
|
-
})), E(!0);
|
|
29
|
-
}, []), M = a((e) => {
|
|
30
|
-
w((t) => {
|
|
31
|
-
if (!t?.[e]) return t;
|
|
32
|
-
let n = { ...t };
|
|
33
|
-
return delete n[e], Object.keys(n).length ? n : void 0;
|
|
34
|
-
});
|
|
35
|
-
}, []), N = a((e, t) => {
|
|
36
|
-
M(e), m((n) => n.map((n) => {
|
|
37
|
-
if (n.id !== e) return n;
|
|
38
|
-
let r = {
|
|
39
|
-
...n,
|
|
40
|
-
...t
|
|
41
|
-
};
|
|
42
|
-
return "amount" in t ? r : {
|
|
43
|
-
...r,
|
|
44
|
-
amount: l(r.quantity, r.price, r.amount)
|
|
45
|
-
};
|
|
46
|
-
})), O(!0), b(void 0);
|
|
47
|
-
}, [M]), P = a((e, t) => {
|
|
48
|
-
M(e), m((n) => n.map((n) => {
|
|
49
|
-
if (n.id !== e) return n;
|
|
50
|
-
let r = Number.parseFloat(n.quantity), i = String(Math.max(1, (Number.isFinite(r) ? r : 1) + t));
|
|
51
|
-
return {
|
|
52
|
-
...n,
|
|
53
|
-
quantity: i,
|
|
54
|
-
amount: l(i, n.price, n.amount)
|
|
55
|
-
};
|
|
56
|
-
})), O(!0), b(void 0);
|
|
57
|
-
}, [M]), F = a((e) => {
|
|
58
|
-
M(e), m((t) => t.length <= 1 ? t : t.filter((t) => t.id !== e)), O(!0), b(void 0);
|
|
59
|
-
}, [M]), I = a(() => {
|
|
60
|
-
m((e) => [...e, r()]), O(!0), b(void 0);
|
|
61
|
-
}, []), L = a((e) => {
|
|
62
|
-
g(e), A(!0), b(void 0);
|
|
63
|
-
}, []), R = a((e) => {
|
|
64
|
-
v(e), A(!0), b(void 0);
|
|
65
|
-
}, []), z = a((e) => {
|
|
66
|
-
b(e), A(!0);
|
|
67
|
-
}, []), B = s(() => p.map((e) => ({
|
|
68
|
-
...e,
|
|
69
|
-
onChange: (t) => N(e.id, t),
|
|
70
|
-
onQuantityStep: (t) => P(e.id, t),
|
|
71
|
-
onRemove: () => F(e.id)
|
|
72
|
-
})), [
|
|
73
|
-
p,
|
|
74
|
-
N,
|
|
75
|
-
F,
|
|
76
|
-
P
|
|
77
|
-
]), V = s(() => e(p, _, h), [
|
|
78
|
-
p,
|
|
79
|
-
_,
|
|
80
|
-
h
|
|
81
|
-
]);
|
|
15
|
+
function n({ payable: n, lineItems: r }) {
|
|
16
|
+
let i = {
|
|
17
|
+
invoiceNumber: n.document_id ?? "",
|
|
18
|
+
invoiceDate: n.issued_at ?? "",
|
|
19
|
+
dueDate: n.due_date ?? "",
|
|
20
|
+
poNumber: ""
|
|
21
|
+
}, a = r.map((e) => ({
|
|
22
|
+
id: e.id,
|
|
23
|
+
description: e.name ?? "",
|
|
24
|
+
glCode: e.ledger_account_id ?? "",
|
|
25
|
+
quantity: e.quantity == null ? "" : String(e.quantity),
|
|
26
|
+
price: t(e.unit_price),
|
|
27
|
+
amount: t(e.subtotal)
|
|
28
|
+
}));
|
|
82
29
|
return {
|
|
83
|
-
values:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
onChange: j,
|
|
89
|
-
lineItems: p,
|
|
90
|
-
lineItemRows: B,
|
|
91
|
-
discount: h,
|
|
92
|
-
onDiscountChange: L,
|
|
93
|
-
tax: _,
|
|
94
|
-
onTaxChange: R,
|
|
95
|
-
total: y ?? V,
|
|
96
|
-
totalOverride: y,
|
|
97
|
-
onTotalChange: z,
|
|
98
|
-
onAddLineItem: I,
|
|
99
|
-
isTotalsDirty: k,
|
|
100
|
-
isDirty: T || D || k
|
|
30
|
+
values: i,
|
|
31
|
+
lineItems: a.length ? a : [e()],
|
|
32
|
+
discount: t(n.discount),
|
|
33
|
+
tax: t(n.tax_amount),
|
|
34
|
+
total: t(n.total_amount)
|
|
101
35
|
};
|
|
102
36
|
}
|
|
103
37
|
//#endregion
|
|
104
|
-
export {
|
|
38
|
+
export { e as emptyLineItem, n as mapPayableToBillForm };
|
|
@@ -1,12 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { calculateTotal as e, displayLineAmount as t, parseMoneyToMinorUnits as n } from "./index33.js";
|
|
6
|
+
import { emptyLineItem as r, mapPayableToBillForm as i } from "./index36.js";
|
|
7
|
+
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
1
8
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
function l(e, r, i) {
|
|
10
|
+
return n(r) === null ? i : t(e, r);
|
|
11
|
+
}
|
|
12
|
+
function u({ payable: t, lineItems: n } = {}) {
|
|
13
|
+
let u = s(() => i({
|
|
14
|
+
payable: t ?? {},
|
|
15
|
+
lineItems: n ?? []
|
|
16
|
+
}), [t, n]), [d, f] = c(u.values), [p, m] = c(u.lineItems), [h, g] = c(u.discount), [_, v] = c(u.tax), [y, b] = c(u.total || void 0), [x, S] = c(), [C, w] = c(), [T, E] = c(!1), [D, O] = c(!1), [k, A] = c(!1);
|
|
17
|
+
o(() => {
|
|
18
|
+
T || f(u.values);
|
|
19
|
+
}, [u]), o(() => {
|
|
20
|
+
D || m(u.lineItems);
|
|
21
|
+
}, [u]), o(() => {
|
|
22
|
+
k || (g(u.discount), v(u.tax), b(u.total || void 0));
|
|
23
|
+
}, [u]);
|
|
24
|
+
let j = a((e) => {
|
|
25
|
+
f((t) => ({
|
|
26
|
+
...t,
|
|
27
|
+
...e
|
|
28
|
+
})), E(!0);
|
|
29
|
+
}, []), M = a((e) => {
|
|
30
|
+
w((t) => {
|
|
31
|
+
if (!t?.[e]) return t;
|
|
32
|
+
let n = { ...t };
|
|
33
|
+
return delete n[e], Object.keys(n).length ? n : void 0;
|
|
34
|
+
});
|
|
35
|
+
}, []), N = a((e, t) => {
|
|
36
|
+
M(e), m((n) => n.map((n) => {
|
|
37
|
+
if (n.id !== e) return n;
|
|
38
|
+
let r = {
|
|
39
|
+
...n,
|
|
40
|
+
...t
|
|
41
|
+
};
|
|
42
|
+
return "amount" in t ? r : {
|
|
43
|
+
...r,
|
|
44
|
+
amount: l(r.quantity, r.price, r.amount)
|
|
45
|
+
};
|
|
46
|
+
})), O(!0), b(void 0);
|
|
47
|
+
}, [M]), P = a((e, t) => {
|
|
48
|
+
M(e), m((n) => n.map((n) => {
|
|
49
|
+
if (n.id !== e) return n;
|
|
50
|
+
let r = Number.parseFloat(n.quantity), i = String(Math.max(1, (Number.isFinite(r) ? r : 1) + t));
|
|
51
|
+
return {
|
|
52
|
+
...n,
|
|
53
|
+
quantity: i,
|
|
54
|
+
amount: l(i, n.price, n.amount)
|
|
55
|
+
};
|
|
56
|
+
})), O(!0), b(void 0);
|
|
57
|
+
}, [M]), F = a((e) => {
|
|
58
|
+
M(e), m((t) => t.length <= 1 ? t : t.filter((t) => t.id !== e)), O(!0), b(void 0);
|
|
59
|
+
}, [M]), I = a(() => {
|
|
60
|
+
m((e) => [...e, r()]), O(!0), b(void 0);
|
|
61
|
+
}, []), L = a((e) => {
|
|
62
|
+
g(e), A(!0), b(void 0);
|
|
63
|
+
}, []), R = a((e) => {
|
|
64
|
+
v(e), A(!0), b(void 0);
|
|
65
|
+
}, []), z = a((e) => {
|
|
66
|
+
b(e), A(!0);
|
|
67
|
+
}, []), B = s(() => p.map((e) => ({
|
|
68
|
+
...e,
|
|
69
|
+
onChange: (t) => N(e.id, t),
|
|
70
|
+
onQuantityStep: (t) => P(e.id, t),
|
|
71
|
+
onRemove: () => F(e.id)
|
|
72
|
+
})), [
|
|
73
|
+
p,
|
|
74
|
+
N,
|
|
75
|
+
F,
|
|
76
|
+
P
|
|
77
|
+
]), V = s(() => e(p, _, h), [
|
|
78
|
+
p,
|
|
79
|
+
_,
|
|
80
|
+
h
|
|
81
|
+
]);
|
|
82
|
+
return {
|
|
83
|
+
values: d,
|
|
84
|
+
errors: x,
|
|
85
|
+
setErrors: S,
|
|
86
|
+
lineItemErrors: C,
|
|
87
|
+
setLineItemErrors: w,
|
|
88
|
+
onChange: j,
|
|
89
|
+
lineItems: p,
|
|
90
|
+
lineItemRows: B,
|
|
91
|
+
discount: h,
|
|
92
|
+
onDiscountChange: L,
|
|
93
|
+
tax: _,
|
|
94
|
+
onTaxChange: R,
|
|
95
|
+
total: y ?? V,
|
|
96
|
+
totalOverride: y,
|
|
97
|
+
onTotalChange: z,
|
|
98
|
+
onAddLineItem: I,
|
|
99
|
+
isTotalsDirty: k,
|
|
100
|
+
isDirty: T || D || k
|
|
101
|
+
};
|
|
102
|
+
}
|
|
11
103
|
//#endregion
|
|
12
|
-
export {
|
|
104
|
+
export { u as useBillForm };
|
|
@@ -1,221 +1,15 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
8
|
-
import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
-
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { formatCalendarDate as ne } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
11
|
-
import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
|
-
import "../../../shared/feature/dist/index.js";
|
|
13
|
-
import { resolveVendor as ie } from "./index3.js";
|
|
14
|
-
import { BillCreateScreen as ae } from "../../ui/dist/index40.js";
|
|
15
|
-
import { BillDecisionDialog as oe } from "../../ui/dist/index46.js";
|
|
16
|
-
import { ExtractionNotice as se } from "../../ui/dist/index61.js";
|
|
17
|
-
import "../../ui/dist/index.js";
|
|
18
|
-
import { usePayableHistoryQuery as ce } from "../../data-access/dist/index6.js";
|
|
19
|
-
import { useAllPayableLineItemsQuery as le } from "../../data-access/dist/index7.js";
|
|
20
|
-
import { usePayableQuery as ue } from "../../data-access/dist/index13.js";
|
|
21
|
-
import "../../data-access/dist/index.js";
|
|
22
|
-
import { PayBillFlow as de } from "./index10.js";
|
|
23
|
-
import "./index11.js";
|
|
24
|
-
import { mergeBillCreateScreenCopy as fe } from "./index26.js";
|
|
25
|
-
import { useBillCreateController as pe } from "./index34.js";
|
|
26
|
-
import { useBillForm as n } from "./index36.js";
|
|
27
|
-
import { useApprovalPolicyCardView as r } from "./index15.js";
|
|
28
|
-
import { useCurrentApprovalRequestId as i } from "./index16.js";
|
|
29
|
-
import { usePayableDetailActions as a } from "./index18.js";
|
|
30
|
-
import { useScheduledPayment as o } from "./index19.js";
|
|
31
|
-
import { buildBillDetailView as s } from "./index22.js";
|
|
32
|
-
import { buildBillHistory as me } from "./index23.js";
|
|
33
|
-
import { SourceDocumentContainer as he } from "./index27.js";
|
|
34
|
-
import { useVendorSectionProps as ge } from "./index29.js";
|
|
35
|
-
import { usePaymentInstructionsForm as _e } from "./index30.js";
|
|
36
|
-
import { billCreateTestIds as c } from "./index37.js";
|
|
37
|
-
import { useCallback as l, useEffect as ve, useMemo as u, useRef as ye, useState as d } from "react";
|
|
38
|
-
import { Fragment as be, jsx as f, jsxs as xe } from "react/jsx-runtime";
|
|
39
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
S(!0), b(e);
|
|
53
|
-
}, []), P = ge({
|
|
54
|
-
payableId: g ? void 0 : D,
|
|
55
|
-
counterpartId: g ? void 0 : y,
|
|
56
|
-
payableCounterpartId: N,
|
|
57
|
-
onCounterpartChange: we,
|
|
58
|
-
requiredError: M.errors?.vendor
|
|
59
|
-
}), F = pe({
|
|
60
|
-
payableId: h,
|
|
61
|
-
form: M,
|
|
62
|
-
counterpartId: y,
|
|
63
|
-
clearCounterpart: !!(D && x) && !y,
|
|
64
|
-
prepareVendorForSave: P.savePaymentInstructions,
|
|
65
|
-
onPayableCreated: E,
|
|
66
|
-
onSaved: E,
|
|
67
|
-
onDraftSaved: () => m(!1),
|
|
68
|
-
onFinalized: () => m(!1)
|
|
69
|
-
}), I = !!(F.isSavingDraft || F.isFinalizing), L = g ? D : void 0, R = i({
|
|
70
|
-
payableId: L,
|
|
71
|
-
status: j?.status
|
|
72
|
-
}), z = ye(null), B = o({
|
|
73
|
-
payableId: D,
|
|
74
|
-
scheduledPaymentDate: j?.scheduled_payment_date,
|
|
75
|
-
enabled: g
|
|
76
|
-
}), V = ie(j), H = _e({
|
|
77
|
-
payableId: L,
|
|
78
|
-
counterpartId: g ? N : void 0,
|
|
79
|
-
saveErrorMessage: v.detail.paymentInstructionsSaveError
|
|
80
|
-
}), { initResponse: U } = re(), W = e(U?.scopes, [t.CounterpartWriteOrg]) && e(U?.scopes, [t.PayableWriteOrg]), { actions: Te, decisionDialog: Ee } = a({
|
|
81
|
-
payableId: L,
|
|
82
|
-
status: j?.status,
|
|
83
|
-
currentApprovalRequestId: R.id,
|
|
84
|
-
isPolicyApprover: R.isPolicyApprover,
|
|
85
|
-
hasWaitingRequest: R.hasWaitingRequest,
|
|
86
|
-
hasScheduledPayment: B.hasScheduledPayment,
|
|
87
|
-
isScheduledPaymentUnknown: B.isResolving,
|
|
88
|
-
labels: v.actions,
|
|
89
|
-
onPayBillSelect: () => Se(V) || !W ? z.current?.open() : H.open()
|
|
90
|
-
}), G = u(() => (A.data?.data ?? []).map((e) => ({
|
|
91
|
-
value: e.id,
|
|
92
|
-
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
93
|
-
})), [A.data]), K = ce(L), q = e(U?.scopes, [t.UserReadOrg]), J = te({ enabled: g && q }), Y = u(() => me(K.data?.data ?? [], J.data?.data ?? [], v.history), [
|
|
94
|
-
K.data,
|
|
95
|
-
J.data,
|
|
96
|
-
v.history
|
|
97
|
-
]), X = r({
|
|
98
|
-
payableId: L,
|
|
99
|
-
approvalPolicyId: j?.approval_policy_id,
|
|
100
|
-
enabled: g,
|
|
101
|
-
copy: v.approvalPolicyCopy
|
|
102
|
-
}), De = u(() => g && j ? s({
|
|
103
|
-
payable: j,
|
|
104
|
-
lineItems: k.lineItems,
|
|
105
|
-
glCodeOptions: G,
|
|
106
|
-
history: Y,
|
|
107
|
-
approvalPolicy: X.view,
|
|
108
|
-
labels: v.detail
|
|
109
|
-
}) : void 0, [
|
|
110
|
-
X.view,
|
|
111
|
-
v.detail,
|
|
112
|
-
G,
|
|
113
|
-
Y,
|
|
114
|
-
k.lineItems,
|
|
115
|
-
j,
|
|
116
|
-
g
|
|
117
|
-
]), Z = j?.source_of_payable_data === "ocr", Q = V?.name, Oe = g ? Q ? v.viewTitle(Q) : v.readOnlyTitle : Z && Q ? v.extractedTitle(Q) : v.newTitle, ke = g && j?.created_at ? v.addedOn(ne(j.created_at.slice(0, 10))) : void 0, $ = l(() => {
|
|
118
|
-
let e = M.isDirty || P.hasUnsavedVendorChanges || !!F.stagedFile;
|
|
119
|
-
!g && e && !window.confirm(v.discardConfirm) || m(!1);
|
|
120
|
-
}, [
|
|
121
|
-
F.stagedFile,
|
|
122
|
-
v.discardConfirm,
|
|
123
|
-
M.isDirty,
|
|
124
|
-
m,
|
|
125
|
-
g,
|
|
126
|
-
P.hasUnsavedVendorChanges
|
|
127
|
-
]), Ae = l((e) => {
|
|
128
|
-
if (!I) return e ? m(!0) : $();
|
|
129
|
-
}, [
|
|
130
|
-
$,
|
|
131
|
-
I,
|
|
132
|
-
m
|
|
133
|
-
]);
|
|
134
|
-
return /* @__PURE__ */ xe(be, { children: [
|
|
135
|
-
/* @__PURE__ */ f(ae, {
|
|
136
|
-
open: p,
|
|
137
|
-
onOpenChange: Ae,
|
|
138
|
-
title: Oe,
|
|
139
|
-
subtitle: ke,
|
|
140
|
-
notice: !g && Z && !C ? /* @__PURE__ */ f(se, { onDismiss: () => w(!0) }) : void 0,
|
|
141
|
-
vendor: {
|
|
142
|
-
...P,
|
|
143
|
-
testId: c.vendorSection
|
|
144
|
-
},
|
|
145
|
-
values: M.values,
|
|
146
|
-
errors: M.errors,
|
|
147
|
-
onChange: M.onChange,
|
|
148
|
-
lineItems: {
|
|
149
|
-
items: M.lineItemRows,
|
|
150
|
-
glCodeOptions: G,
|
|
151
|
-
discount: M.discount,
|
|
152
|
-
onDiscountChange: M.onDiscountChange,
|
|
153
|
-
tax: M.tax,
|
|
154
|
-
onTaxChange: M.onTaxChange,
|
|
155
|
-
total: M.total,
|
|
156
|
-
onTotalChange: M.onTotalChange,
|
|
157
|
-
onAddLineItem: M.onAddLineItem,
|
|
158
|
-
errors: M.lineItemErrors,
|
|
159
|
-
testId: c.lineItems
|
|
160
|
-
},
|
|
161
|
-
documentPanel: /* @__PURE__ */ f(he, {
|
|
162
|
-
payableId: D,
|
|
163
|
-
readOnly: g,
|
|
164
|
-
isDocumentPending: !!D && !j?.file && (O.isLoading || j?.ocr_status === "processing"),
|
|
165
|
-
file: j?.file ? {
|
|
166
|
-
id: j.file.id,
|
|
167
|
-
name: j.file.name,
|
|
168
|
-
url: j.file.url,
|
|
169
|
-
mimetype: j.file.mimetype
|
|
170
|
-
} : void 0,
|
|
171
|
-
staging: {
|
|
172
|
-
stagedFile: F.stagedFile,
|
|
173
|
-
onFileStaged: F.stageFile,
|
|
174
|
-
onClearStagedFile: F.clearStagedFile,
|
|
175
|
-
isSaving: I
|
|
176
|
-
}
|
|
177
|
-
}),
|
|
178
|
-
readOnly: g,
|
|
179
|
-
detail: g ? {
|
|
180
|
-
view: De,
|
|
181
|
-
actions: Te,
|
|
182
|
-
scheduledSummary: B.hasScheduledPayment && B.scheduledDateLabel ? v.scheduledSummary(B.scheduledDateLabel) : void 0,
|
|
183
|
-
paymentInstructionsForm: N && W ? {
|
|
184
|
-
isOpen: H.isOpen,
|
|
185
|
-
values: H.values,
|
|
186
|
-
errors: H.errors,
|
|
187
|
-
isSaving: H.isSaving,
|
|
188
|
-
onOpen: H.open,
|
|
189
|
-
onCancel: H.close,
|
|
190
|
-
onChange: H.onChange,
|
|
191
|
-
onSave: H.save
|
|
192
|
-
} : void 0,
|
|
193
|
-
isLoading: O.isLoading || k.isResolving || A.isResolving,
|
|
194
|
-
isError: O.isError || k.isError || A.isError
|
|
195
|
-
} : void 0,
|
|
196
|
-
isLineItemsLoading: k.isResolving,
|
|
197
|
-
isSaving: I,
|
|
198
|
-
isSavingDraft: F.isSavingDraft,
|
|
199
|
-
isFinalizing: F.isFinalizing,
|
|
200
|
-
onCancel: $,
|
|
201
|
-
onSaveDraft: F.saveDraft,
|
|
202
|
-
onFinalize: F.finalize,
|
|
203
|
-
testId: c.dialog
|
|
204
|
-
}),
|
|
205
|
-
/* @__PURE__ */ f(oe, {
|
|
206
|
-
...Ee,
|
|
207
|
-
labels: { cancelButton: v.actions.decisionDialog.cancelButton },
|
|
208
|
-
testId: c.decisionDialog,
|
|
209
|
-
confirmTestId: c.decisionConfirm,
|
|
210
|
-
reasonTestId: c.decisionReason
|
|
211
|
-
}),
|
|
212
|
-
g && j ? /* @__PURE__ */ f(de, {
|
|
213
|
-
ref: z,
|
|
214
|
-
payable: j,
|
|
215
|
-
poweredByBankName: Ce,
|
|
216
|
-
labels: v.payBill
|
|
217
|
-
}) : null
|
|
218
|
-
] });
|
|
219
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
dialog: "bill-pay-bill-create-dialog",
|
|
4
|
+
vendorSection: "bill-pay-bill-create-vendor",
|
|
5
|
+
lineItems: "bill-pay-bill-create-line-items",
|
|
6
|
+
documentPanel: "bill-pay-bill-create-document",
|
|
7
|
+
duplicateNotice: "bill-pay-bill-create-duplicate-notice",
|
|
8
|
+
decisionDialog: "bill-pay-bill-decision-dialog",
|
|
9
|
+
decisionConfirm: "bill-pay-bill-decision-confirm",
|
|
10
|
+
decisionReason: "bill-pay-bill-decision-reason",
|
|
11
|
+
deleteDraftDialog: "bill-pay-bill-delete-draft-dialog",
|
|
12
|
+
deleteDraftConfirm: "bill-pay-bill-delete-draft-confirm"
|
|
13
|
+
};
|
|
220
14
|
//#endregion
|
|
221
|
-
export {
|
|
15
|
+
export { e as billCreateTestIds };
|