@tesouro/embedded-components-react 0.4.19 → 0.4.20
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 +11 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +23 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +49 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +254 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +71 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +5 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +142 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +52 -47
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -49,7 +49,9 @@
|
|
|
49
49
|
--ttw-color-emerald-500: oklch(69.6% 0.17 162.48);
|
|
50
50
|
--ttw-color-emerald-600: oklch(59.6% 0.145 163.225);
|
|
51
51
|
--ttw-color-emerald-700: oklch(50.8% 0.118 165.612);
|
|
52
|
+
--ttw-color-cyan-50: oklch(98.4% 0.019 200.873);
|
|
52
53
|
--ttw-color-cyan-100: oklch(95.6% 0.045 203.388);
|
|
54
|
+
--ttw-color-cyan-200: oklch(91.7% 0.08 205.041);
|
|
53
55
|
--ttw-color-cyan-700: oklch(52% 0.105 223.128);
|
|
54
56
|
--ttw-color-sky-200: oklch(90.1% 0.058 230.902);
|
|
55
57
|
--ttw-color-sky-400: oklch(74.6% 0.16 232.661);
|
|
@@ -2207,6 +2209,9 @@
|
|
|
2207
2209
|
.ttw\:border-cyan-100 {
|
|
2208
2210
|
border-color: var(--ttw-color-cyan-100);
|
|
2209
2211
|
}
|
|
2212
|
+
.ttw\:border-cyan-200 {
|
|
2213
|
+
border-color: var(--ttw-color-cyan-200);
|
|
2214
|
+
}
|
|
2210
2215
|
.ttw\:border-destructive {
|
|
2211
2216
|
border-color: var(--ttw-destructive);
|
|
2212
2217
|
}
|
|
@@ -2453,6 +2458,9 @@
|
|
|
2453
2458
|
.ttw\:bg-card {
|
|
2454
2459
|
background-color: var(--ttw-card);
|
|
2455
2460
|
}
|
|
2461
|
+
.ttw\:bg-cyan-50 {
|
|
2462
|
+
background-color: var(--ttw-color-cyan-50);
|
|
2463
|
+
}
|
|
2456
2464
|
.ttw\:bg-cyan-100 {
|
|
2457
2465
|
background-color: var(--ttw-color-cyan-100);
|
|
2458
2466
|
}
|
|
@@ -4369,6 +4377,9 @@
|
|
|
4369
4377
|
.ttw\:hover\:bg-card:hover {
|
|
4370
4378
|
background-color: var(--ttw-card);
|
|
4371
4379
|
}
|
|
4380
|
+
.ttw\:hover\:bg-cyan-50:hover {
|
|
4381
|
+
background-color: var(--ttw-color-cyan-50);
|
|
4382
|
+
}
|
|
4372
4383
|
.ttw\:hover\:bg-destructive\/10:hover {
|
|
4373
4384
|
background-color: var(--ttw-destructive);
|
|
4374
4385
|
}
|
|
@@ -6,26 +6,35 @@ import { BanIcon as n, CalendarXIcon as r, RotateCcwIcon as i, ThumbsDownIcon as
|
|
|
6
6
|
function s(n) {
|
|
7
7
|
return e(n, [t.CounterpartReadOrg]);
|
|
8
8
|
}
|
|
9
|
-
function c({ status:
|
|
10
|
-
let
|
|
11
|
-
|
|
9
|
+
function c({ status: n, scopes: r, hasWaitingRequest: i, arePendingApproversUnknown: a }) {
|
|
10
|
+
let o = e(r, [t.PayableApproveOrg]);
|
|
11
|
+
return !!(n === "approve_in_progress" && i && o && !a);
|
|
12
|
+
}
|
|
13
|
+
function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPayment: f, scheduledPaymentIntentId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, labels: g }) {
|
|
14
|
+
let _ = e(u, [t.PayablePayOrg]), v = e(u, [t.BankAccountReadOrg]), y = s(u), b = e(u, [t.PaymentRailAch]), x = e(u, [t.PayableWriteOrg]), S = _, C = [];
|
|
15
|
+
l === "approve_in_progress" && d && (C.push({
|
|
12
16
|
id: "approve",
|
|
13
17
|
label: g.approve,
|
|
14
18
|
variant: "default",
|
|
15
19
|
surface: "row"
|
|
16
|
-
}),
|
|
20
|
+
}), C.push({
|
|
17
21
|
id: "reject",
|
|
18
22
|
label: g.reject,
|
|
19
23
|
variant: "ghost",
|
|
20
24
|
surface: "row"
|
|
21
|
-
})), c
|
|
25
|
+
})), c({
|
|
26
|
+
status: l,
|
|
27
|
+
scopes: u,
|
|
28
|
+
hasWaitingRequest: m,
|
|
29
|
+
arePendingApproversUnknown: h
|
|
30
|
+
}) && (C.push({
|
|
22
31
|
id: "forceApprove",
|
|
23
32
|
label: g.forceApprove,
|
|
24
33
|
variant: "ghost",
|
|
25
34
|
surface: "menu",
|
|
26
35
|
icon: o,
|
|
27
36
|
sectionHeading: g.policyOverridesHeading
|
|
28
|
-
}),
|
|
37
|
+
}), C.push({
|
|
29
38
|
id: "forceReject",
|
|
30
39
|
label: g.forceReject,
|
|
31
40
|
variant: "ghost",
|
|
@@ -33,36 +42,36 @@ function c({ status: c, scopes: l, canDecideApprovalRequest: u, hasScheduledPaym
|
|
|
33
42
|
icon: a,
|
|
34
43
|
sectionHeading: g.policyOverridesHeading
|
|
35
44
|
}));
|
|
36
|
-
let
|
|
37
|
-
return
|
|
45
|
+
let w = l === "waiting_to_be_paid" && _ && !f, T = l === "waiting_to_be_paid" && _ && v && y && b && !f;
|
|
46
|
+
return w && C.push({
|
|
38
47
|
id: "markAsPaid",
|
|
39
48
|
label: g.markAsPaid,
|
|
40
49
|
variant: "outline",
|
|
41
50
|
surface: "row"
|
|
42
|
-
}),
|
|
51
|
+
}), T && C.push({
|
|
43
52
|
id: "payBill",
|
|
44
53
|
label: g.payBill,
|
|
45
54
|
variant: "default",
|
|
46
55
|
surface: "row"
|
|
47
|
-
}),
|
|
56
|
+
}), l === "new" && x && C.push({
|
|
48
57
|
id: "cancel",
|
|
49
58
|
label: g.cancel,
|
|
50
59
|
variant: "ghost",
|
|
51
60
|
surface: "menu",
|
|
52
61
|
icon: n
|
|
53
|
-
}), (
|
|
62
|
+
}), (l === "rejected" || l === "waiting_to_be_paid" && !f) && x && C.push({
|
|
54
63
|
id: "reopen",
|
|
55
64
|
label: g.reopen,
|
|
56
65
|
variant: "ghost",
|
|
57
66
|
surface: "menu",
|
|
58
67
|
icon: i
|
|
59
|
-
}),
|
|
68
|
+
}), l === "waiting_to_be_paid" && f && p && S && C.push({
|
|
60
69
|
id: "cancelScheduledPayment",
|
|
61
70
|
label: g.cancelScheduledPayment,
|
|
62
71
|
variant: "ghost",
|
|
63
72
|
surface: "menu",
|
|
64
73
|
icon: r
|
|
65
|
-
}),
|
|
74
|
+
}), C;
|
|
66
75
|
}
|
|
67
76
|
//#endregion
|
|
68
|
-
export { s as canReadCounterpartBankAccounts,
|
|
77
|
+
export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
|
|
@@ -13,104 +13,103 @@ import { getBillDetailActions as l } from "./index18.js";
|
|
|
13
13
|
import { useState as u } from "react";
|
|
14
14
|
import { HandIcon as d } from "lucide-react";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js
|
|
16
|
-
function f({ payableId: d, status: f, currentApprovalRequestId: m,
|
|
17
|
-
let { initResponse:
|
|
16
|
+
function f({ payableId: d, status: f, currentApprovalRequestId: m, hasWaitingRequest: _, arePendingApproversUnknown: v, hasScheduledPayment: y, scheduledPaymentIntentId: b, isScheduledPaymentUnknown: x, labels: S, isMarkAsPaidPending: C, pendingApprovers: w, onPayBillSelect: T, onMarkAsPaidSelect: E, onActionSucceeded: D }) {
|
|
17
|
+
let { initResponse: O } = t(), k = r(), A = n(), j = i(), M = a(), N = c(), P = o(), F = s(), I = C || k.isPending || A.isPending || j.isPending || M.isPending || N.isPending || P.isPending || F.isPending, [L, R] = u(), z = L && (L.id !== "cancelScheduledPayment" || L.scheduledPaymentIntentId === b) ? L : void 0, B = d && f ? l({
|
|
18
18
|
status: f,
|
|
19
|
-
scopes:
|
|
19
|
+
scopes: O?.scopes,
|
|
20
20
|
canDecideApprovalRequest: !!m,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
onError: () => e.error(C.actionError),
|
|
21
|
+
hasWaitingRequest: _,
|
|
22
|
+
arePendingApproversUnknown: v,
|
|
23
|
+
hasScheduledPayment: y || x,
|
|
24
|
+
scheduledPaymentIntentId: b,
|
|
25
|
+
labels: S
|
|
26
|
+
}) : [], V = (t) => ({
|
|
27
|
+
onError: () => e.error(S.actionError),
|
|
29
28
|
onSuccess: () => {
|
|
30
|
-
e.success(
|
|
29
|
+
e.success(S.actionSuccess[t]), D?.();
|
|
31
30
|
}
|
|
32
|
-
}),
|
|
31
|
+
}), H = {
|
|
33
32
|
reject: {
|
|
34
|
-
isPending:
|
|
35
|
-
run: (e) => m &&
|
|
33
|
+
isPending: k.isPending,
|
|
34
|
+
run: (e) => m && k.mutate({
|
|
36
35
|
path: { approval_request_id: m },
|
|
37
36
|
body: e ? { reject_reason: e } : void 0
|
|
38
|
-
},
|
|
37
|
+
}, V("reject"))
|
|
39
38
|
},
|
|
40
39
|
approve: {
|
|
41
|
-
isPending:
|
|
42
|
-
run: () => m &&
|
|
40
|
+
isPending: A.isPending,
|
|
41
|
+
run: () => m && A.mutate({ path: { approval_request_id: m } }, V("approve"))
|
|
43
42
|
},
|
|
44
43
|
cancel: {
|
|
45
|
-
isPending:
|
|
46
|
-
run: () => d &&
|
|
44
|
+
isPending: j.isPending,
|
|
45
|
+
run: () => d && j.mutate({ path: { payable_id: d } }, V("cancel"))
|
|
47
46
|
},
|
|
48
47
|
cancelScheduledPayment: {
|
|
49
|
-
isPending:
|
|
48
|
+
isPending: M.isPending,
|
|
50
49
|
run: () => {
|
|
51
|
-
let e =
|
|
52
|
-
!d || !e ||
|
|
50
|
+
let e = z?.scheduledPaymentIntentId;
|
|
51
|
+
!d || !e || M.mutate({
|
|
53
52
|
path: { payment_intent_id: e },
|
|
54
53
|
payableId: d
|
|
55
|
-
},
|
|
54
|
+
}, V("cancelScheduledPayment"));
|
|
56
55
|
}
|
|
57
56
|
},
|
|
58
57
|
reopen: {
|
|
59
|
-
isPending:
|
|
60
|
-
run: () => d &&
|
|
58
|
+
isPending: N.isPending,
|
|
59
|
+
run: () => d && N.mutate({ path: { payable_id: d } }, V("reopen"))
|
|
61
60
|
},
|
|
62
61
|
forceApprove: {
|
|
63
|
-
isPending:
|
|
64
|
-
run: () => d &&
|
|
62
|
+
isPending: P.isPending,
|
|
63
|
+
run: () => d && P.mutate({ path: { payable_id: d } }, V("forceApprove"))
|
|
65
64
|
},
|
|
66
65
|
forceReject: {
|
|
67
|
-
isPending:
|
|
68
|
-
run: () => d &&
|
|
66
|
+
isPending: F.isPending,
|
|
67
|
+
run: () => d && F.mutate({ path: { payable_id: d } }, V("forceReject"))
|
|
69
68
|
}
|
|
70
|
-
},
|
|
69
|
+
}, U = B.map((e) => ({
|
|
71
70
|
...e,
|
|
72
|
-
disabled:
|
|
73
|
-
loading: e.id === "markAsPaid" ?
|
|
71
|
+
disabled: I,
|
|
72
|
+
loading: e.id === "markAsPaid" ? C : H[e.id]?.isPending ?? !1,
|
|
74
73
|
onSelect: () => {
|
|
75
|
-
if (!(
|
|
74
|
+
if (!(I || !d)) {
|
|
76
75
|
if (e.id === "payBill") {
|
|
77
|
-
|
|
76
|
+
T();
|
|
78
77
|
return;
|
|
79
78
|
}
|
|
80
79
|
if (e.id === "markAsPaid") {
|
|
81
|
-
|
|
80
|
+
E();
|
|
82
81
|
return;
|
|
83
82
|
}
|
|
84
83
|
if (h(e.id)) {
|
|
85
|
-
|
|
84
|
+
R({
|
|
86
85
|
id: e.id,
|
|
87
|
-
scheduledPaymentIntentId:
|
|
86
|
+
scheduledPaymentIntentId: b
|
|
88
87
|
});
|
|
89
88
|
return;
|
|
90
89
|
}
|
|
91
|
-
|
|
90
|
+
H[e.id]?.run();
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
}));
|
|
95
94
|
return {
|
|
96
|
-
isActionPending:
|
|
95
|
+
isActionPending: I,
|
|
97
96
|
actions: {
|
|
98
|
-
row:
|
|
99
|
-
menu:
|
|
97
|
+
row: U.filter((e) => e.surface === "row"),
|
|
98
|
+
menu: U.filter((e) => e.surface === "menu")
|
|
100
99
|
},
|
|
101
100
|
decisionDialog: {
|
|
102
|
-
open: !!
|
|
103
|
-
copy:
|
|
104
|
-
...
|
|
105
|
-
presentation: g(
|
|
106
|
-
pendingApprovers: g(
|
|
101
|
+
open: !!z,
|
|
102
|
+
copy: z ? {
|
|
103
|
+
...S.decisionDialog[z.id],
|
|
104
|
+
presentation: g(z.id) ? p : void 0,
|
|
105
|
+
pendingApprovers: g(z.id) ? w ?? [] : void 0
|
|
107
106
|
} : void 0,
|
|
108
|
-
isPending:
|
|
107
|
+
isPending: z ? H[z.id]?.isPending ?? !1 : !1,
|
|
109
108
|
onCancel: () => {
|
|
110
|
-
|
|
109
|
+
I || R(void 0);
|
|
111
110
|
},
|
|
112
111
|
onConfirm: (e) => {
|
|
113
|
-
!
|
|
112
|
+
!z || I || (H[z.id]?.run(e), R(void 0));
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
};
|