@tesouro/embedded-components-react 0.4.22 → 0.4.23
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 +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +47 -119
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +119 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +33 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +186 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +22 -232
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +223 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +202 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +121 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +19 -414
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +427 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +34 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +221 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +10 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +112 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +124 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/client.config.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/finopsApiVersion.js +4 -0
- 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/index8.js +1 -1
- package/package.json +33 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.json.js +0 -4
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { RefreshingRootWidgetProvider as _ } from "./libs/tesouro-embedded-compo
|
|
|
14
14
|
import { useDisclosuresAcceptanceSurface as v, useOwnWidgetConfig as y, useRefetchWidget as b, useWidgetConfig as x, useWidgetError as S, useWidgetLoading as C } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
15
15
|
import { BankAccountsWidget as w } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
16
16
|
import { CounterpartsWidget as T } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
|
|
17
|
-
import { BillPayWidget as E } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
17
|
+
import { BillPayWidget as E } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js";
|
|
18
18
|
import { CardDetailsWidget as D } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js";
|
|
19
19
|
import { CreditCardsWidget as O } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
|
|
20
20
|
import { DebitCardsWidget as k } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
1
|
+
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js";
|
|
3
3
|
export { e as BillPayWidget };
|
|
@@ -10,22 +10,22 @@ import "./index14.js";
|
|
|
10
10
|
import "./index26.js";
|
|
11
11
|
import "./index27.js";
|
|
12
12
|
import "./index39.js";
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./index57.js";
|
|
13
|
+
import "./index45.js";
|
|
14
|
+
import "./index54.js";
|
|
15
|
+
import "./index56.js";
|
|
17
16
|
import "./index58.js";
|
|
18
17
|
import "./index59.js";
|
|
19
18
|
import "./index60.js";
|
|
20
19
|
import "./index61.js";
|
|
21
|
-
import "./
|
|
20
|
+
import "./index62.js";
|
|
22
21
|
import "./index66.js";
|
|
23
22
|
import "./index67.js";
|
|
24
23
|
import "./index68.js";
|
|
25
24
|
import "./index69.js";
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
25
|
+
import "./index70.js";
|
|
26
|
+
import "./index73.js";
|
|
28
27
|
import "./index79.js";
|
|
29
28
|
import "./index80.js";
|
|
30
|
-
import
|
|
29
|
+
import "./index81.js";
|
|
30
|
+
import { BillPayWidget as e } from "./index85.js";
|
|
31
31
|
export { e as BillPayWidget };
|
|
@@ -10,16 +10,16 @@ function c({ status: n, scopes: r, hasWaitingRequest: i, arePendingApproversUnkn
|
|
|
10
10
|
let o = e(r, [t.PayableApproveOrg]);
|
|
11
11
|
return !!(n === "approve_in_progress" && i && o && !a);
|
|
12
12
|
}
|
|
13
|
-
function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPayment: f, scheduledPaymentIntentId: p, hasWaitingRequest: m, arePendingApproversUnknown: h,
|
|
14
|
-
let
|
|
15
|
-
l === "approve_in_progress" && d && (
|
|
13
|
+
function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPayment: f, scheduledPaymentIntentId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, isPayabilityUnknown: g, labels: _ }) {
|
|
14
|
+
let v = e(u, [t.PayablePayOrg]), y = e(u, [t.BankAccountReadOrg]), b = s(u), x = e(u, [t.PaymentRailAch]), S = e(u, [t.PayableWriteOrg]), C = v, w = [];
|
|
15
|
+
l === "approve_in_progress" && d && (w.push({
|
|
16
16
|
id: "approve",
|
|
17
|
-
label:
|
|
17
|
+
label: _.approve,
|
|
18
18
|
variant: "default",
|
|
19
19
|
surface: "row"
|
|
20
|
-
}),
|
|
20
|
+
}), w.push({
|
|
21
21
|
id: "reject",
|
|
22
|
-
label:
|
|
22
|
+
label: _.reject,
|
|
23
23
|
variant: "ghost",
|
|
24
24
|
surface: "row"
|
|
25
25
|
})), c({
|
|
@@ -27,51 +27,51 @@ function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPaym
|
|
|
27
27
|
scopes: u,
|
|
28
28
|
hasWaitingRequest: m,
|
|
29
29
|
arePendingApproversUnknown: h
|
|
30
|
-
}) && (
|
|
30
|
+
}) && (w.push({
|
|
31
31
|
id: "forceApprove",
|
|
32
|
-
label:
|
|
32
|
+
label: _.forceApprove,
|
|
33
33
|
variant: "ghost",
|
|
34
34
|
surface: "menu",
|
|
35
35
|
icon: o,
|
|
36
|
-
sectionHeading:
|
|
37
|
-
}),
|
|
36
|
+
sectionHeading: _.policyOverridesHeading
|
|
37
|
+
}), w.push({
|
|
38
38
|
id: "forceReject",
|
|
39
|
-
label:
|
|
39
|
+
label: _.forceReject,
|
|
40
40
|
variant: "ghost",
|
|
41
41
|
surface: "menu",
|
|
42
42
|
icon: a,
|
|
43
|
-
sectionHeading:
|
|
43
|
+
sectionHeading: _.policyOverridesHeading
|
|
44
44
|
}));
|
|
45
|
-
let
|
|
46
|
-
return
|
|
45
|
+
let T = l === "waiting_to_be_paid" && v && !f, E = l === "waiting_to_be_paid" && v && y && b && x && !f && !g;
|
|
46
|
+
return T && w.push({
|
|
47
47
|
id: "markAsPaid",
|
|
48
|
-
label:
|
|
48
|
+
label: _.markAsPaid,
|
|
49
49
|
variant: "outline",
|
|
50
50
|
surface: "row"
|
|
51
|
-
}),
|
|
51
|
+
}), E && w.push({
|
|
52
52
|
id: "payBill",
|
|
53
|
-
label:
|
|
53
|
+
label: _.payBill,
|
|
54
54
|
variant: "default",
|
|
55
55
|
surface: "row"
|
|
56
|
-
}), l === "new" &&
|
|
56
|
+
}), l === "new" && S && w.push({
|
|
57
57
|
id: "cancel",
|
|
58
|
-
label:
|
|
58
|
+
label: _.cancel,
|
|
59
59
|
variant: "ghost",
|
|
60
60
|
surface: "menu",
|
|
61
61
|
icon: n
|
|
62
|
-
}), (l === "rejected" || l === "waiting_to_be_paid" && !f) &&
|
|
62
|
+
}), (l === "rejected" || l === "waiting_to_be_paid" && !f) && S && w.push({
|
|
63
63
|
id: "reopen",
|
|
64
|
-
label:
|
|
64
|
+
label: _.reopen,
|
|
65
65
|
variant: "ghost",
|
|
66
66
|
surface: "menu",
|
|
67
67
|
icon: i
|
|
68
|
-
}), l === "waiting_to_be_paid" && f && p &&
|
|
68
|
+
}), l === "waiting_to_be_paid" && f && p && C && w.push({
|
|
69
69
|
id: "cancelScheduledPayment",
|
|
70
|
-
label:
|
|
70
|
+
label: _.cancelScheduledPayment,
|
|
71
71
|
variant: "ghost",
|
|
72
72
|
surface: "menu",
|
|
73
73
|
icon: r
|
|
74
|
-
}),
|
|
74
|
+
}), w;
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
|
|
@@ -13,103 +13,104 @@ import { getBillDetailActions as l } from "./index19.js";
|
|
|
13
13
|
import { useState as u } from "react";
|
|
14
14
|
import { BanIcon as d, HandIcon as f } from "lucide-react";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js
|
|
16
|
-
function p({ payableId: d, status: f, currentApprovalRequestId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, hasScheduledPayment: _, scheduledPaymentIntentId: b, isScheduledPaymentUnknown: x,
|
|
17
|
-
let { initResponse:
|
|
16
|
+
function p({ payableId: d, status: f, currentApprovalRequestId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, hasScheduledPayment: _, scheduledPaymentIntentId: b, isScheduledPaymentUnknown: x, isPayabilityUnknown: S, labels: C, isMarkAsPaidPending: w, pendingApprovers: T, onPayBillSelect: E, onMarkAsPaidSelect: D, onActionSucceeded: O }) {
|
|
17
|
+
let { initResponse: k } = t(), A = r(), j = n(), M = i(), N = a(), P = c(), F = o(), I = s(), L = w || A.isPending || j.isPending || M.isPending || N.isPending || P.isPending || F.isPending || I.isPending, [R, z] = u(), B = R && (R.id !== "cancelScheduledPayment" || R.scheduledPaymentIntentId === b) ? R : void 0, V = d && f ? l({
|
|
18
18
|
status: f,
|
|
19
|
-
scopes:
|
|
19
|
+
scopes: k?.scopes,
|
|
20
20
|
canDecideApprovalRequest: !!p,
|
|
21
21
|
hasWaitingRequest: m,
|
|
22
22
|
arePendingApproversUnknown: h,
|
|
23
23
|
hasScheduledPayment: _ || x,
|
|
24
24
|
scheduledPaymentIntentId: b,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
isPayabilityUnknown: S,
|
|
26
|
+
labels: C
|
|
27
|
+
}) : [], H = (t) => ({
|
|
28
|
+
onError: () => e.error(C.actionError),
|
|
28
29
|
onSuccess: () => {
|
|
29
|
-
e.success(
|
|
30
|
+
e.success(C.actionSuccess[t]), O?.();
|
|
30
31
|
}
|
|
31
|
-
}),
|
|
32
|
+
}), U = {
|
|
32
33
|
reject: {
|
|
33
|
-
isPending:
|
|
34
|
-
run: (e) => p &&
|
|
34
|
+
isPending: A.isPending,
|
|
35
|
+
run: (e) => p && A.mutate({
|
|
35
36
|
path: { approval_request_id: p },
|
|
36
37
|
body: e ? { reject_reason: e } : void 0
|
|
37
|
-
},
|
|
38
|
+
}, H("reject"))
|
|
38
39
|
},
|
|
39
40
|
approve: {
|
|
40
|
-
isPending:
|
|
41
|
-
run: () => p &&
|
|
41
|
+
isPending: j.isPending,
|
|
42
|
+
run: () => p && j.mutate({ path: { approval_request_id: p } }, H("approve"))
|
|
42
43
|
},
|
|
43
44
|
cancel: {
|
|
44
|
-
isPending:
|
|
45
|
-
run: () => d &&
|
|
45
|
+
isPending: M.isPending,
|
|
46
|
+
run: () => d && M.mutate({ path: { payable_id: d } }, H("cancel"))
|
|
46
47
|
},
|
|
47
48
|
cancelScheduledPayment: {
|
|
48
|
-
isPending:
|
|
49
|
+
isPending: N.isPending,
|
|
49
50
|
run: () => {
|
|
50
|
-
let e =
|
|
51
|
-
!d || !e ||
|
|
51
|
+
let e = B?.scheduledPaymentIntentId;
|
|
52
|
+
!d || !e || N.mutate({
|
|
52
53
|
path: { payment_intent_id: e },
|
|
53
54
|
payableId: d
|
|
54
|
-
},
|
|
55
|
+
}, H("cancelScheduledPayment"));
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
58
|
reopen: {
|
|
58
|
-
isPending:
|
|
59
|
-
run: () => d &&
|
|
59
|
+
isPending: P.isPending,
|
|
60
|
+
run: () => d && P.mutate({ path: { payable_id: d } }, H("reopen"))
|
|
60
61
|
},
|
|
61
62
|
forceApprove: {
|
|
62
|
-
isPending:
|
|
63
|
-
run: () => d &&
|
|
63
|
+
isPending: F.isPending,
|
|
64
|
+
run: () => d && F.mutate({ path: { payable_id: d } }, H("forceApprove"))
|
|
64
65
|
},
|
|
65
66
|
forceReject: {
|
|
66
|
-
isPending:
|
|
67
|
-
run: () => d &&
|
|
67
|
+
isPending: I.isPending,
|
|
68
|
+
run: () => d && I.mutate({ path: { payable_id: d } }, H("forceReject"))
|
|
68
69
|
}
|
|
69
|
-
},
|
|
70
|
+
}, W = V.map((e) => ({
|
|
70
71
|
...e,
|
|
71
|
-
disabled:
|
|
72
|
-
loading: e.id === "markAsPaid" ?
|
|
72
|
+
disabled: L,
|
|
73
|
+
loading: e.id === "markAsPaid" ? w : U[e.id]?.isPending ?? !1,
|
|
73
74
|
onSelect: () => {
|
|
74
|
-
if (!(
|
|
75
|
+
if (!(L || !d)) {
|
|
75
76
|
if (e.id === "payBill") {
|
|
76
|
-
|
|
77
|
+
E();
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
80
|
if (e.id === "markAsPaid") {
|
|
80
|
-
|
|
81
|
+
D();
|
|
81
82
|
return;
|
|
82
83
|
}
|
|
83
84
|
if (v(e.id)) {
|
|
84
|
-
|
|
85
|
+
z({
|
|
85
86
|
id: e.id,
|
|
86
87
|
scheduledPaymentIntentId: b
|
|
87
88
|
});
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
+
U[e.id]?.run();
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
}));
|
|
94
95
|
return {
|
|
95
|
-
isActionPending:
|
|
96
|
+
isActionPending: L,
|
|
96
97
|
actions: {
|
|
97
|
-
row:
|
|
98
|
-
menu:
|
|
98
|
+
row: W.filter((e) => e.surface === "row"),
|
|
99
|
+
menu: W.filter((e) => e.surface === "menu")
|
|
99
100
|
},
|
|
100
101
|
decisionDialog: {
|
|
101
|
-
open: !!
|
|
102
|
-
copy:
|
|
103
|
-
...
|
|
104
|
-
presentation: g(
|
|
105
|
-
pendingApprovers: y(
|
|
102
|
+
open: !!B,
|
|
103
|
+
copy: B ? {
|
|
104
|
+
...C.decisionDialog[B.id],
|
|
105
|
+
presentation: g(B.id),
|
|
106
|
+
pendingApprovers: y(B.id) ? T ?? [] : void 0
|
|
106
107
|
} : void 0,
|
|
107
|
-
isPending:
|
|
108
|
+
isPending: B ? U[B.id]?.isPending ?? !1 : !1,
|
|
108
109
|
onCancel: () => {
|
|
109
|
-
|
|
110
|
+
L || z(void 0);
|
|
110
111
|
},
|
|
111
112
|
onConfirm: (e) => {
|
|
112
|
-
!
|
|
113
|
+
!B || L || (U[B.id]?.run(e), z(void 0));
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
};
|
|
@@ -1,52 +1,6 @@
|
|
|
1
|
-
import { derivePayableStatus as e } from "./index7.js";
|
|
2
|
-
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
|
|
3
|
-
import "../../ui/dist/index.js";
|
|
4
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"credit_note_unlinked",
|
|
8
|
-
"line_item_added",
|
|
9
|
-
"line_item_updated",
|
|
10
|
-
"line_item_removed",
|
|
11
|
-
"deleted"
|
|
12
|
-
]);
|
|
13
|
-
function r(n, r, i) {
|
|
14
|
-
switch (n) {
|
|
15
|
-
case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
|
|
16
|
-
case "payable_updated": return i.billUpdated;
|
|
17
|
-
case "file_attached": return i.attachmentAdded;
|
|
18
|
-
case "submitted_for_approval": return i.submittedForApproval;
|
|
19
|
-
case "approval_requested": return i.approvalRequested;
|
|
20
|
-
case "approval_action": {
|
|
21
|
-
let e = r?.action, t = r?.reject_reason;
|
|
22
|
-
return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
|
|
23
|
-
}
|
|
24
|
-
case "auto_approved": return i.autoApproved;
|
|
25
|
-
case "reopened": return i.reopened;
|
|
26
|
-
case "marked_as_paid": return i.markedAsPaid;
|
|
27
|
-
case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
|
|
28
|
-
case "payment_reverted": return i.paymentReverted;
|
|
29
|
-
case "status_changed": {
|
|
30
|
-
let n = r?.new_status;
|
|
31
|
-
if (typeof n != "string") return;
|
|
32
|
-
let a = e({ apiStatus: n }).status;
|
|
33
|
-
return i.statusChanged(t[a] ?? t.unknown);
|
|
34
|
-
}
|
|
35
|
-
default: return;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
function i(e, t, i) {
|
|
39
|
-
let a = new Map(t.map((e) => [e.id, e.name]));
|
|
40
|
-
return e.filter((e) => !n.has(e.event_type)).map((e) => {
|
|
41
|
-
let t = r(e.event_type, e.event_data, i);
|
|
42
|
-
if (!t) return;
|
|
43
|
-
let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
|
|
44
|
-
return {
|
|
45
|
-
id: e.id,
|
|
46
|
-
dateLabel: i.dateLabel(e.timestamp),
|
|
47
|
-
description: n ? i.byActor(t, n) : t
|
|
48
|
-
};
|
|
49
|
-
}).filter((e) => !!e);
|
|
2
|
+
function e({ isUnsavedPromptOpen: e, isLocked: t, isDirty: n }) {
|
|
3
|
+
return e ? "dismiss-prompt" : !t && n ? "prompt" : "close";
|
|
50
4
|
}
|
|
51
5
|
//#endregion
|
|
52
|
-
export {
|
|
6
|
+
export { e as resolveEditorDismissal };
|
|
@@ -1,124 +1,52 @@
|
|
|
1
|
+
import { derivePayableStatus as e } from "./index7.js";
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
|
|
3
|
+
import "../../ui/dist/index.js";
|
|
1
4
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
placeholder: "Tell the submitter what needs to change",
|
|
21
|
-
optionalHint: "Optional"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
cancel: {
|
|
25
|
-
title: "Cancel this bill?",
|
|
26
|
-
description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
|
|
27
|
-
confirmButton: "Cancel bill"
|
|
28
|
-
},
|
|
29
|
-
cancelScheduledPayment: {
|
|
30
|
-
title: "Cancel this scheduled payment?",
|
|
31
|
-
description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
|
|
32
|
-
confirmButton: "Cancel payment"
|
|
33
|
-
},
|
|
34
|
-
forceApprove: {
|
|
35
|
-
title: "Override approval policy?",
|
|
36
|
-
description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
37
|
-
confirmButton: "Override and approve"
|
|
38
|
-
},
|
|
39
|
-
forceReject: {
|
|
40
|
-
title: "Override approval policy?",
|
|
41
|
-
description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
|
|
42
|
-
confirmButton: "Override and reject"
|
|
43
|
-
},
|
|
44
|
-
cancelButton: "Cancel"
|
|
45
|
-
},
|
|
46
|
-
actionError: "Couldn't update this bill. Try again.",
|
|
47
|
-
actionSuccess: {
|
|
48
|
-
approve: "Bill approved.",
|
|
49
|
-
reject: "Bill rejected.",
|
|
50
|
-
markAsPaid: "Bill marked as paid.",
|
|
51
|
-
cancel: "Bill canceled.",
|
|
52
|
-
cancelScheduledPayment: "Scheduled payment canceled.",
|
|
53
|
-
reopen: "Bill reopened.",
|
|
54
|
-
forceApprove: "Bill approved, overriding the approval policy.",
|
|
55
|
-
forceReject: "Bill rejected, overriding the approval policy."
|
|
56
|
-
}
|
|
57
|
-
}, t = (e) => `Payment scheduled for ${e}`, n = [
|
|
58
|
-
"reject",
|
|
59
|
-
"cancel",
|
|
60
|
-
"cancelScheduledPayment",
|
|
61
|
-
"forceApprove",
|
|
62
|
-
"forceReject"
|
|
63
|
-
];
|
|
64
|
-
function r(e, t) {
|
|
65
|
-
let n = e.reason ? {
|
|
66
|
-
...e.reason,
|
|
67
|
-
...t?.reason
|
|
68
|
-
} : void 0, r = {
|
|
69
|
-
...e,
|
|
70
|
-
...t,
|
|
71
|
-
reason: n
|
|
72
|
-
};
|
|
73
|
-
return n || delete r.reason, r;
|
|
74
|
-
}
|
|
75
|
-
function i(e, t) {
|
|
76
|
-
let i = {
|
|
77
|
-
...e,
|
|
78
|
-
...t
|
|
79
|
-
};
|
|
80
|
-
for (let a of n) i[a] = r(e[a], t?.[a]);
|
|
81
|
-
return i;
|
|
82
|
-
}
|
|
83
|
-
function a(t) {
|
|
84
|
-
let n = e;
|
|
85
|
-
return {
|
|
86
|
-
...n,
|
|
87
|
-
...t,
|
|
88
|
-
decisionDialog: i(n.decisionDialog, t?.decisionDialog),
|
|
89
|
-
actionSuccess: {
|
|
90
|
-
...n.actionSuccess,
|
|
91
|
-
...t?.actionSuccess
|
|
5
|
+
var n = /* @__PURE__ */ new Set([
|
|
6
|
+
"credit_note_linked",
|
|
7
|
+
"credit_note_unlinked",
|
|
8
|
+
"line_item_added",
|
|
9
|
+
"line_item_updated",
|
|
10
|
+
"line_item_removed",
|
|
11
|
+
"deleted"
|
|
12
|
+
]);
|
|
13
|
+
function r(n, r, i) {
|
|
14
|
+
switch (n) {
|
|
15
|
+
case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
|
|
16
|
+
case "payable_updated": return i.billUpdated;
|
|
17
|
+
case "file_attached": return i.attachmentAdded;
|
|
18
|
+
case "submitted_for_approval": return i.submittedForApproval;
|
|
19
|
+
case "approval_requested": return i.approvalRequested;
|
|
20
|
+
case "approval_action": {
|
|
21
|
+
let e = r?.action, t = r?.reject_reason;
|
|
22
|
+
return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
|
|
92
23
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
paymentHistoryPartiallyPaidLabel: "Partial payment",
|
|
106
|
-
paymentHistoryRevertedLabel: "Payment reverted",
|
|
107
|
-
paymentHistoryMethodLabels: {
|
|
108
|
-
ach: "ACH",
|
|
109
|
-
us_ach: "ACH",
|
|
110
|
-
wire: "Wire",
|
|
111
|
-
check: "Check",
|
|
112
|
-
paper_check: "Check",
|
|
113
|
-
bank_account: "Bank transfer",
|
|
114
|
-
card: "Card"
|
|
24
|
+
case "auto_approved": return i.autoApproved;
|
|
25
|
+
case "reopened": return i.reopened;
|
|
26
|
+
case "marked_as_paid": return i.markedAsPaid;
|
|
27
|
+
case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
|
|
28
|
+
case "payment_reverted": return i.paymentReverted;
|
|
29
|
+
case "status_changed": {
|
|
30
|
+
let n = r?.new_status;
|
|
31
|
+
if (typeof n != "string") return;
|
|
32
|
+
let a = e({ apiStatus: n }).status;
|
|
33
|
+
return i.statusChanged(t[a] ?? t.unknown);
|
|
34
|
+
}
|
|
35
|
+
default: return;
|
|
115
36
|
}
|
|
116
|
-
}
|
|
117
|
-
function
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
37
|
+
}
|
|
38
|
+
function i(e, t, i) {
|
|
39
|
+
let a = new Map(t.map((e) => [e.id, e.name]));
|
|
40
|
+
return e.filter((e) => !n.has(e.event_type)).map((e) => {
|
|
41
|
+
let t = r(e.event_type, e.event_data, i);
|
|
42
|
+
if (!t) return;
|
|
43
|
+
let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
|
|
44
|
+
return {
|
|
45
|
+
id: e.id,
|
|
46
|
+
dateLabel: i.dateLabel(e.timestamp),
|
|
47
|
+
description: n ? i.byActor(t, n) : t
|
|
48
|
+
};
|
|
49
|
+
}).filter((e) => !!e);
|
|
122
50
|
}
|
|
123
51
|
//#endregion
|
|
124
|
-
export {
|
|
52
|
+
export { i as buildBillHistory };
|