@tesouro/embedded-components-react 0.4.21 → 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 -210
- 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 -385
- 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 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +9 -94
- 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,173 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { useAllBankAccountsQuery as t } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
7
|
-
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import "../../../shared/ui/dist/index.js";
|
|
9
|
-
import { useAnalyticsCaptureException as n } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
10
|
-
import { formatCalendarDate as r } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
11
|
-
import { formatMoneyExact as i } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
12
|
-
import { extractApiErrorMessage as a } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
13
|
-
import "../../../shared/feature/dist/index.js";
|
|
14
|
-
import { useSchedulePaymentMutation as o } from "../../data-access/dist/index12.js";
|
|
15
|
-
import "../../data-access/dist/index.js";
|
|
16
|
-
import { dateToCalendarKey as s, getDefaultPaymentDate as c, isPastEasternDate as l, isTodayInEastern as u } from "./index15.js";
|
|
17
|
-
import { maskAccountNumber as d } from "./index21.js";
|
|
18
|
-
import { deriveSourceAccountFunds as f, mapSourceAccountOptions as p } from "./index22.js";
|
|
19
|
-
import { mergePayBillFlowLabels as m } from "./index23.js";
|
|
20
|
-
import { useMemo as h, useState as g } from "react";
|
|
1
|
+
import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as e } from "../../ui/dist/index92.js";
|
|
2
|
+
import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as t } from "../../ui/dist/index98.js";
|
|
3
|
+
import "../../ui/dist/index.js";
|
|
4
|
+
import { SOURCE_ACCOUNT_LABELS_EN as n } from "./index23.js";
|
|
21
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
error: i.message ?? r.todayInsufficientFunds
|
|
47
|
-
} : {
|
|
48
|
-
ok: !0,
|
|
49
|
-
date: e,
|
|
50
|
-
account: t
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function y({ payableId: l, amountDueMinorUnits: y, currencyCode: b = "USD", dueDate: x, vendorName: S, vendorEmail: C, vendorBankAccount: w, isVendorBankAccountLoading: T, isVendorBankAccountError: E, onMissingAchInstructions: D, poweredByBankName: O, labels: k }) {
|
|
54
|
-
let A = h(() => m(k), [k]), j = S ?? A.missingVendorName, [M, N] = g(!1), [P, F] = g(!1), [I, L] = g(() => c()), [R, z] = g(), B = t({ enabled: M || P }), V = o(), H = n(), U = h(() => p(B.data?.data ?? [], A), [B.data?.data, A]), W = U.find((e) => e.id === R), G = I ? u(I) : !1, K = { before: c() }, q = f({
|
|
55
|
-
selectedAccount: W,
|
|
56
|
-
amountDueMinorUnits: y,
|
|
57
|
-
isToday: G,
|
|
58
|
-
labels: A
|
|
59
|
-
}), J = i(y / 100, { currencyCode: b }), Y = I ? r(s(I)) : void 0, X = x ? A.dueDateSuffix(r(x)) : void 0, Z = () => v({
|
|
60
|
-
selectedDate: I,
|
|
61
|
-
selectedAccount: W,
|
|
62
|
-
amountDueMinorUnits: y,
|
|
63
|
-
labels: A
|
|
64
|
-
}), Q = () => {
|
|
65
|
-
if (T) {
|
|
66
|
-
e.error(A.checkingPaymentInstructionsError);
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (E) {
|
|
70
|
-
e.error(A.paymentInstructionsUnavailableError);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
if (!_(w)) {
|
|
74
|
-
D ? D() : e.error(A.missingPaymentInstructionsError);
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
N(!0);
|
|
78
|
-
}, $ = () => {
|
|
79
|
-
F(!1), N(!1);
|
|
80
|
-
};
|
|
6
|
+
var r = {
|
|
7
|
+
amountDue: "Amount due",
|
|
8
|
+
paymentAmount: "Payment amount",
|
|
9
|
+
dueDateSuffix: (e) => `by ${e}`,
|
|
10
|
+
paymentDate: "Payment date",
|
|
11
|
+
sourceAccount: "Pay from",
|
|
12
|
+
accountHolder: "Account holder name",
|
|
13
|
+
routingNumber: "Routing number",
|
|
14
|
+
accountNumber: "Account number",
|
|
15
|
+
achMethod: "Pay by ACH bank transfer",
|
|
16
|
+
scheduledToast: "Payment scheduled",
|
|
17
|
+
submitError: "Couldn't schedule this payment. Try again.",
|
|
18
|
+
selectAccountError: "Select a source account.",
|
|
19
|
+
selectDateError: "Select a payment date.",
|
|
20
|
+
staleDateError: "That date has passed. Choose a new payment date.",
|
|
21
|
+
missingPaymentInstructionsError: "This vendor does not have ACH payment instructions on file.",
|
|
22
|
+
checkingPaymentInstructionsError: "Still checking this vendor's payment instructions. Try again in a moment.",
|
|
23
|
+
paymentInstructionsUnavailableError: "Couldn't check this vendor's payment instructions. Try again.",
|
|
24
|
+
missingVendorName: "Not provided",
|
|
25
|
+
...n,
|
|
26
|
+
scheduleDialog: t,
|
|
27
|
+
reviewDialog: e
|
|
28
|
+
};
|
|
29
|
+
function i(e) {
|
|
81
30
|
return {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
amountDue: J,
|
|
88
|
-
dueDateSuffix: X,
|
|
89
|
-
paymentAmountLabel: A.paymentAmount,
|
|
90
|
-
paymentAmount: J,
|
|
91
|
-
selectedDate: I,
|
|
92
|
-
selectedDateLabel: Y,
|
|
93
|
-
calendarDisabled: K,
|
|
94
|
-
isToday: G,
|
|
95
|
-
selectedAccountId: R,
|
|
96
|
-
accounts: U,
|
|
97
|
-
poweredByBankName: O,
|
|
98
|
-
funds: q,
|
|
99
|
-
isAccountsLoading: B.isLoading,
|
|
100
|
-
isAccountsError: B.isError,
|
|
101
|
-
isSubmitting: V.isPending,
|
|
102
|
-
onDateChange: L,
|
|
103
|
-
onAccountChange: z,
|
|
104
|
-
onReview: () => {
|
|
105
|
-
let t = Z();
|
|
106
|
-
if (!t.ok) {
|
|
107
|
-
e.error(t.error);
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
N(!1), F(!0);
|
|
111
|
-
},
|
|
112
|
-
onCancel: $,
|
|
113
|
-
labels: A.scheduleDialog
|
|
31
|
+
...r,
|
|
32
|
+
...e,
|
|
33
|
+
scheduleDialog: {
|
|
34
|
+
...r.scheduleDialog,
|
|
35
|
+
...e?.scheduleDialog
|
|
114
36
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
amountLabel: A.paymentAmount,
|
|
119
|
-
amount: J,
|
|
120
|
-
rows: [{
|
|
121
|
-
label: A.sourceAccount,
|
|
122
|
-
value: W?.primaryLabel ?? ""
|
|
123
|
-
}, {
|
|
124
|
-
label: A.paymentDate,
|
|
125
|
-
value: Y ?? ""
|
|
126
|
-
}],
|
|
127
|
-
payTo: {
|
|
128
|
-
name: j,
|
|
129
|
-
email: C,
|
|
130
|
-
methodLabel: A.achMethod,
|
|
131
|
-
fields: _(w) ? [
|
|
132
|
-
{
|
|
133
|
-
label: A.routingNumber,
|
|
134
|
-
value: w.routing_number
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
label: A.accountNumber,
|
|
138
|
-
value: w.account_number,
|
|
139
|
-
maskedValue: d(w.account_number)
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
label: A.accountHolder,
|
|
143
|
-
value: w.account_holder_name
|
|
144
|
-
}
|
|
145
|
-
] : []
|
|
146
|
-
},
|
|
147
|
-
isSubmitting: V.isPending,
|
|
148
|
-
onBack: () => {
|
|
149
|
-
F(!1), N(!0);
|
|
150
|
-
},
|
|
151
|
-
onCancel: $,
|
|
152
|
-
onSubmit: async () => {
|
|
153
|
-
let t = Z();
|
|
154
|
-
if (!t.ok) {
|
|
155
|
-
F(!1), e.error(t.error), N(!0);
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
try {
|
|
159
|
-
await V.mutateAsync({
|
|
160
|
-
payableId: l,
|
|
161
|
-
paymentDate: s(t.date),
|
|
162
|
-
sourceBankAccountId: t.account.id
|
|
163
|
-
}), $(), e.success(A.scheduledToast);
|
|
164
|
-
} catch (t) {
|
|
165
|
-
H(t, { payable_id: l }), e.error(a(t) ?? A.submitError);
|
|
166
|
-
}
|
|
167
|
-
},
|
|
168
|
-
labels: A.reviewDialog
|
|
37
|
+
reviewDialog: {
|
|
38
|
+
...r.reviewDialog,
|
|
39
|
+
...e?.reviewDialog
|
|
169
40
|
}
|
|
170
41
|
};
|
|
171
42
|
}
|
|
172
43
|
//#endregion
|
|
173
|
-
export {
|
|
44
|
+
export { r as PAY_BILL_FLOW_LABELS_EN, i as mergePayBillFlowLabels };
|
|
@@ -2,47 +2,172 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { useAllBankAccountsQuery as t } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
7
|
+
import "../../../shared/data-access/dist/index.js";
|
|
8
|
+
import "../../../shared/ui/dist/index.js";
|
|
9
|
+
import { useAnalyticsCaptureException as n } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
10
|
+
import { formatCalendarDate as r } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
11
|
+
import { formatMoneyExact as i } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
12
|
+
import { extractApiErrorMessage as a } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
6
13
|
import "../../../shared/feature/dist/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import "
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { usePayBillFlow as s } from "./index24.js";
|
|
15
|
-
import { usePayableAchInstructions as c } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
16
|
-
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
17
|
-
import { useImperativeHandle as l } from "react";
|
|
18
|
-
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
14
|
+
import { useSchedulePaymentMutation as o } from "../../data-access/dist/index12.js";
|
|
15
|
+
import "../../data-access/dist/index.js";
|
|
16
|
+
import { dateToCalendarKey as s, getDefaultPaymentDate as c, isPastEasternDate as l, isTodayInEastern as u } from "./index16.js";
|
|
17
|
+
import { maskAccountNumber as d } from "./index22.js";
|
|
18
|
+
import { deriveSourceAccountFunds as f, mapSourceAccountOptions as p } from "./index23.js";
|
|
19
|
+
import { mergePayBillFlowLabels as m } from "./index24.js";
|
|
20
|
+
import { useMemo as h, useState as g } from "react";
|
|
19
21
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
function _(e) {
|
|
23
|
+
return !!(e?.account_holder_name && e.routing_number && e.account_number);
|
|
24
|
+
}
|
|
25
|
+
function v({ selectedDate: e, selectedAccount: t, amountDueMinorUnits: n, labels: r }) {
|
|
26
|
+
if (!e) return {
|
|
27
|
+
ok: !1,
|
|
28
|
+
error: r.selectDateError
|
|
29
|
+
};
|
|
30
|
+
if (l(e)) return {
|
|
31
|
+
ok: !1,
|
|
32
|
+
error: r.staleDateError
|
|
33
|
+
};
|
|
34
|
+
if (!t) return {
|
|
35
|
+
ok: !1,
|
|
36
|
+
error: r.selectAccountError
|
|
37
|
+
};
|
|
38
|
+
let i = f({
|
|
39
|
+
selectedAccount: t,
|
|
40
|
+
amountDueMinorUnits: n,
|
|
41
|
+
isToday: u(e),
|
|
42
|
+
labels: r
|
|
38
43
|
});
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
return i.state === "error" ? {
|
|
45
|
+
ok: !1,
|
|
46
|
+
error: i.message ?? r.todayInsufficientFunds
|
|
47
|
+
} : {
|
|
48
|
+
ok: !0,
|
|
49
|
+
date: e,
|
|
50
|
+
account: t
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function y({ payableId: l, amountDueMinorUnits: y, currencyCode: b = "USD", dueDate: x, vendorName: S, vendorEmail: C, vendorBankAccount: w, isVendorBankAccountLoading: T, isVendorBankAccountError: E, onMissingAchInstructions: D, poweredByBankName: O, labels: k }) {
|
|
54
|
+
let A = h(() => m(k), [k]), j = S ?? A.missingVendorName, [M, N] = g(!1), [P, F] = g(!1), [I, L] = g(() => c()), [R, z] = g(), B = t({ enabled: M || P }), V = o(), H = n(), U = h(() => p(B.data?.data ?? [], A), [B.data?.data, A]), W = U.find((e) => e.id === R), G = I ? u(I) : !1, K = { before: c() }, q = f({
|
|
55
|
+
selectedAccount: W,
|
|
56
|
+
amountDueMinorUnits: y,
|
|
57
|
+
isToday: G,
|
|
58
|
+
labels: A
|
|
59
|
+
}), J = i(y / 100, { currencyCode: b }), Y = I ? r(s(I)) : void 0, X = x ? A.dueDateSuffix(r(x)) : void 0, Z = () => v({
|
|
60
|
+
selectedDate: I,
|
|
61
|
+
selectedAccount: W,
|
|
62
|
+
amountDueMinorUnits: y,
|
|
63
|
+
labels: A
|
|
64
|
+
}), Q = () => {
|
|
65
|
+
if (T) {
|
|
66
|
+
e.error(A.checkingPaymentInstructionsError);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (E) {
|
|
70
|
+
e.error(A.paymentInstructionsUnavailableError);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
if (!_(w)) {
|
|
74
|
+
D ? D() : e.error(A.missingPaymentInstructionsError);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
N(!0);
|
|
78
|
+
}, $ = () => {
|
|
79
|
+
F(!1), N(!1);
|
|
80
|
+
};
|
|
81
|
+
return {
|
|
82
|
+
open: Q,
|
|
83
|
+
dialogProps: {
|
|
84
|
+
open: M,
|
|
85
|
+
onOpenChange: N,
|
|
86
|
+
amountDueLabel: A.amountDue,
|
|
87
|
+
amountDue: J,
|
|
88
|
+
dueDateSuffix: X,
|
|
89
|
+
paymentAmountLabel: A.paymentAmount,
|
|
90
|
+
paymentAmount: J,
|
|
91
|
+
selectedDate: I,
|
|
92
|
+
selectedDateLabel: Y,
|
|
93
|
+
calendarDisabled: K,
|
|
94
|
+
isToday: G,
|
|
95
|
+
selectedAccountId: R,
|
|
96
|
+
accounts: U,
|
|
97
|
+
poweredByBankName: O,
|
|
98
|
+
funds: q,
|
|
99
|
+
isAccountsLoading: B.isLoading,
|
|
100
|
+
isAccountsError: B.isError,
|
|
101
|
+
isSubmitting: V.isPending,
|
|
102
|
+
onDateChange: L,
|
|
103
|
+
onAccountChange: z,
|
|
104
|
+
onReview: () => {
|
|
105
|
+
let t = Z();
|
|
106
|
+
if (!t.ok) {
|
|
107
|
+
e.error(t.error);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
N(!1), F(!0);
|
|
111
|
+
},
|
|
112
|
+
onCancel: $,
|
|
113
|
+
labels: A.scheduleDialog
|
|
114
|
+
},
|
|
115
|
+
reviewProps: {
|
|
116
|
+
open: P,
|
|
117
|
+
onOpenChange: F,
|
|
118
|
+
amountLabel: A.paymentAmount,
|
|
119
|
+
amount: J,
|
|
120
|
+
rows: [{
|
|
121
|
+
label: A.sourceAccount,
|
|
122
|
+
value: W?.primaryLabel ?? ""
|
|
123
|
+
}, {
|
|
124
|
+
label: A.paymentDate,
|
|
125
|
+
value: Y ?? ""
|
|
126
|
+
}],
|
|
127
|
+
payTo: {
|
|
128
|
+
name: j,
|
|
129
|
+
email: C,
|
|
130
|
+
methodLabel: A.achMethod,
|
|
131
|
+
fields: _(w) ? [
|
|
132
|
+
{
|
|
133
|
+
label: A.routingNumber,
|
|
134
|
+
value: w.routing_number
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: A.accountNumber,
|
|
138
|
+
value: w.account_number,
|
|
139
|
+
maskedValue: d(w.account_number)
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
label: A.accountHolder,
|
|
143
|
+
value: w.account_holder_name
|
|
144
|
+
}
|
|
145
|
+
] : []
|
|
146
|
+
},
|
|
147
|
+
isSubmitting: V.isPending,
|
|
148
|
+
onBack: () => {
|
|
149
|
+
F(!1), N(!0);
|
|
150
|
+
},
|
|
151
|
+
onCancel: $,
|
|
152
|
+
onSubmit: async () => {
|
|
153
|
+
let t = Z();
|
|
154
|
+
if (!t.ok) {
|
|
155
|
+
F(!1), e.error(t.error), N(!0);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
try {
|
|
159
|
+
await V.mutateAsync({
|
|
160
|
+
payableId: l,
|
|
161
|
+
paymentDate: s(t.date),
|
|
162
|
+
sourceBankAccountId: t.account.id
|
|
163
|
+
}), $(), e.success(A.scheduledToast);
|
|
164
|
+
} catch (t) {
|
|
165
|
+
H(t, { payable_id: l }), e.error(a(t) ?? A.submitError);
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
labels: A.reviewDialog
|
|
169
|
+
}
|
|
170
|
+
};
|
|
46
171
|
}
|
|
47
172
|
//#endregion
|
|
48
|
-
export {
|
|
173
|
+
export { y as usePayBillFlow };
|
|
@@ -1 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useWidgetConfig as e } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
6
|
+
import "../../../shared/feature/dist/index.js";
|
|
7
|
+
import { resolveVendor as t } from "./index8.js";
|
|
8
|
+
import { ReviewTransactionDialog as n } from "../../ui/dist/index93.js";
|
|
9
|
+
import { SchedulePaymentDialog as r } from "../../ui/dist/index100.js";
|
|
10
|
+
import "../../ui/dist/index.js";
|
|
11
|
+
import { canReadCounterpartBankAccounts as i } from "./index19.js";
|
|
12
|
+
import { resolveAmountDueMinorUnits as a } from "./index20.js";
|
|
13
|
+
import { payBillFlowTestIds as o } from "./index21.js";
|
|
14
|
+
import { usePayBillFlow as s } from "./index25.js";
|
|
15
|
+
import { usePayableAchInstructions as c } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
16
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
17
|
+
import { useImperativeHandle as l } from "react";
|
|
18
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
19
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js
|
|
20
|
+
function p({ ref: p, payable: m, onMissingAchInstructions: h, poweredByBankName: g, labels: _ }) {
|
|
21
|
+
let v = t(m), { initResponse: y } = e(), b = i(y?.scopes), { achInstructions: x, isLoading: S, isError: C } = c({
|
|
22
|
+
counterpartId: m.counterpart_id,
|
|
23
|
+
currency: m.currency,
|
|
24
|
+
enabled: b
|
|
25
|
+
}), w = s({
|
|
26
|
+
payableId: m.id,
|
|
27
|
+
amountDueMinorUnits: a(m) ?? 0,
|
|
28
|
+
currencyCode: m.currency ?? void 0,
|
|
29
|
+
dueDate: m.due_date,
|
|
30
|
+
vendorName: v?.name ?? void 0,
|
|
31
|
+
vendorEmail: v?.email ?? void 0,
|
|
32
|
+
vendorBankAccount: x,
|
|
33
|
+
isVendorBankAccountLoading: S,
|
|
34
|
+
isVendorBankAccountError: C,
|
|
35
|
+
onMissingAchInstructions: h,
|
|
36
|
+
poweredByBankName: g,
|
|
37
|
+
labels: _
|
|
38
|
+
});
|
|
39
|
+
return l(p, () => ({ open: w.open }), [w.open]), /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(r, {
|
|
40
|
+
...w.dialogProps,
|
|
41
|
+
testId: o.scheduleDialog
|
|
42
|
+
}), /* @__PURE__ */ d(n, {
|
|
43
|
+
...w.reviewProps,
|
|
44
|
+
testId: o.reviewDialog
|
|
45
|
+
})] });
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { p as PayBillFlow, p as default };
|
|
@@ -1,50 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { parseApprovalPolicyScript as t } from "../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
-
import { parseApprovalPolicyTrigger as n } from "../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
-
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
-
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
6
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js
|
|
7
|
-
var a = {
|
|
8
|
-
ruleTitleRange: e.ruleTitleRange,
|
|
9
|
-
ruleTitleUpTo: e.ruleTitleUpTo,
|
|
10
|
-
ruleTitleFrom: e.ruleTitleFrom,
|
|
11
|
-
ruleTitleAny: e.ruleTitleAny,
|
|
12
|
-
ruleSentenceRange: e.ruleSentenceRange,
|
|
13
|
-
ruleSentenceUpTo: e.ruleSentenceUpTo,
|
|
14
|
-
ruleSentenceFrom: e.ruleSentenceFrom,
|
|
15
|
-
ruleSentenceAny: e.ruleSentenceAny
|
|
16
|
-
};
|
|
17
|
-
function o({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
|
|
18
|
-
let u = t(a.script);
|
|
19
|
-
if (!u.groups.length || !u.isSupported) return;
|
|
20
|
-
let d = [];
|
|
21
|
-
for (let [e, t] of u.groups.entries()) {
|
|
22
|
-
let n = [];
|
|
23
|
-
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
24
|
-
let t = o.get(e);
|
|
25
|
-
t && n.push({
|
|
26
|
-
id: e,
|
|
27
|
-
label: t.label,
|
|
28
|
-
approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
n.length && d.push({
|
|
32
|
-
id: `group-${e + 1}`,
|
|
33
|
-
chips: n
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
if (!d.length) return;
|
|
37
|
-
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
38
|
-
if (!p) return;
|
|
39
|
-
let m = {
|
|
40
|
-
...e,
|
|
41
|
-
...l
|
|
42
|
-
};
|
|
43
|
-
return {
|
|
44
|
-
title: i(f, m),
|
|
45
|
-
sentence: r(f, m),
|
|
46
|
-
steps: d
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
//#endregion
|
|
50
|
-
export { a as APPROVAL_POLICY_RULE_COPY_EN, o as buildApprovalPolicyCardView };
|
|
1
|
+
import "./index26.js";
|
|
@@ -1,7 +1,50 @@
|
|
|
1
|
+
import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../shared/approval-policy/feature/dist/lib/labels.js";
|
|
2
|
+
import { parseApprovalPolicyScript as t } from "../../../shared/approval-policy/util/dist/lib/policyScript.js";
|
|
3
|
+
import { parseApprovalPolicyTrigger as n } from "../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
|
|
4
|
+
import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
|
|
5
|
+
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
1
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
7
|
+
var a = {
|
|
8
|
+
ruleTitleRange: e.ruleTitleRange,
|
|
9
|
+
ruleTitleUpTo: e.ruleTitleUpTo,
|
|
10
|
+
ruleTitleFrom: e.ruleTitleFrom,
|
|
11
|
+
ruleTitleAny: e.ruleTitleAny,
|
|
12
|
+
ruleSentenceRange: e.ruleSentenceRange,
|
|
13
|
+
ruleSentenceUpTo: e.ruleSentenceUpTo,
|
|
14
|
+
ruleSentenceFrom: e.ruleSentenceFrom,
|
|
15
|
+
ruleSentenceAny: e.ruleSentenceAny
|
|
16
|
+
};
|
|
17
|
+
function o({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
|
|
18
|
+
let u = t(a.script);
|
|
19
|
+
if (!u.groups.length || !u.isSupported) return;
|
|
20
|
+
let d = [];
|
|
21
|
+
for (let [e, t] of u.groups.entries()) {
|
|
22
|
+
let n = [];
|
|
23
|
+
for (let e of [...t.roleIds, ...t.userIds]) {
|
|
24
|
+
let t = o.get(e);
|
|
25
|
+
t && n.push({
|
|
26
|
+
id: e,
|
|
27
|
+
label: t.label,
|
|
28
|
+
approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
n.length && d.push({
|
|
32
|
+
id: `group-${e + 1}`,
|
|
33
|
+
chips: n
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if (!d.length) return;
|
|
37
|
+
let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
|
|
38
|
+
if (!p) return;
|
|
39
|
+
let m = {
|
|
40
|
+
...e,
|
|
41
|
+
...l
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
title: i(f, m),
|
|
45
|
+
sentence: r(f, m),
|
|
46
|
+
steps: d
|
|
47
|
+
};
|
|
5
48
|
}
|
|
6
49
|
//#endregion
|
|
7
|
-
export {
|
|
50
|
+
export { a as APPROVAL_POLICY_RULE_COPY_EN, o as buildApprovalPolicyCardView };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { currentApprovalRound as e } from "./
|
|
1
|
+
import { currentApprovalRound as e } from "./index4.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js
|
|
3
3
|
function t({ requestsNewestFirst: t, roundStartedAt: n, lookup: r }) {
|
|
4
4
|
let i = e(t, n), a = [];
|
|
@@ -13,15 +13,15 @@ import { usePayableApprovalRequestsQuery as a } from "../../data-access/dist/ind
|
|
|
13
13
|
import "../../data-access/dist/index.js";
|
|
14
14
|
import { useGetApprovalPoliciesQuery as o } from "../../../shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js";
|
|
15
15
|
import "../../../shared/approval-policy/data-access/dist/index.js";
|
|
16
|
-
import { buildApprovalPolicyCardView as s } from "./
|
|
17
|
-
import { currentApprovalRound as c } from "./
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
16
|
+
import { buildApprovalPolicyCardView as s } from "./index28.js";
|
|
17
|
+
import { currentApprovalRound as c } from "./index4.js";
|
|
18
|
+
import { usePayableApprovalRoundStart as l } from "./index31.js";
|
|
19
|
+
import { buildPendingApproverGroups as u } from "./index29.js";
|
|
20
|
+
import { buildPendingApproverGroupsFromCardView as d } from "./index30.js";
|
|
21
21
|
import { useMemo as f } from "react";
|
|
22
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js
|
|
23
23
|
function p({ payableId: p, approvalPolicyId: m, enabled: h = !0, copy: g }) {
|
|
24
|
-
let _ = h && !!m, { initResponse: v } = i(), y = e(v?.scopes, [t.ApprovalPolicyReadOrg]), b = e(v?.scopes, [t.ApprovalRequestReadOrg]), x = e(v?.scopes, [t.RoleReadOrg]), S = e(v?.scopes, [t.UserReadOrg]), C = o({ enabled: _ && y }), w = n({ enabled: _ && x }), T = r({ enabled: _ && S }), E = a(p, { enabled: _ && b }), { roundStartedAt: D } =
|
|
24
|
+
let _ = h && !!m, { initResponse: v } = i(), y = e(v?.scopes, [t.ApprovalPolicyReadOrg]), b = e(v?.scopes, [t.ApprovalRequestReadOrg]), x = e(v?.scopes, [t.RoleReadOrg]), S = e(v?.scopes, [t.UserReadOrg]), C = o({ enabled: _ && y }), w = n({ enabled: _ && x }), T = r({ enabled: _ && S }), E = a(p, { enabled: _ && b }), { roundStartedAt: D } = l({
|
|
25
25
|
payableId: p,
|
|
26
26
|
enabled: _ && b
|
|
27
27
|
}), O = f(() => {
|
|
@@ -51,7 +51,7 @@ function p({ payableId: p, approvalPolicyId: m, enabled: h = !0, copy: g }) {
|
|
|
51
51
|
]);
|
|
52
52
|
return {
|
|
53
53
|
view: N,
|
|
54
|
-
pendingApprovers: f(() => _ ? N ?
|
|
54
|
+
pendingApprovers: f(() => _ ? N ? d(N) : u({
|
|
55
55
|
requestsNewestFirst: E.data?.data,
|
|
56
56
|
roundStartedAt: D,
|
|
57
57
|
lookup: O
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import { useCurrentUserQuery as t } from "../../../shared/data-access/dist/lib/useCurrentUserQuery.js";
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
|
-
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { usePayableApprovalRequestsQuery as i } from "../../data-access/dist/index8.js";
|
|
12
|
-
import "../../data-access/dist/index.js";
|
|
13
|
-
import { currentApprovalRound as a } from "./index28.js";
|
|
14
|
-
import { usePayableApprovalRoundStart as o } from "./index31.js";
|
|
1
|
+
import { formatRejectionDate as e } from "../../../shared/util/dist/lib/formatRejectionDate.js";
|
|
15
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}), h = p.data?.id, g = d ? a(f.data?.data, m) : [], _ = (e) => e.caller_is_policy_approver ?? !!(h && e.user_ids.includes(h)), v = g.some(_), y = g.filter((e) => e.status === "waiting");
|
|
3
|
+
function t({ payableStatus: t, approvalRequests: n, users: r, payableUpdatedAt: i, labels: a, now: o }) {
|
|
4
|
+
let s = n.find((e) => e.status === "rejected");
|
|
5
|
+
if (!s) return t !== "rejected" || !i ? void 0 : { actorLabel: a.rejectedOn(e(i, o)) };
|
|
6
|
+
let c = new Map(r.map((e) => [e.id, e.name])), l = s.rejected_by ? c.get(s.rejected_by) : void 0, u = e(s.updated_at, o);
|
|
21
7
|
return {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
hasWaitingRequest: y.length > 0,
|
|
25
|
-
isLoading: f.isLoading || p.isLoading
|
|
8
|
+
actorLabel: l ? a.rejectedByOn(l, u) : a.rejectedOn(u),
|
|
9
|
+
message: s.reject_reason ? a.rejectionMessage(s.reject_reason) : void 0
|
|
26
10
|
};
|
|
27
11
|
}
|
|
28
12
|
//#endregion
|
|
29
|
-
export {
|
|
13
|
+
export { t as resolveBillRejectionNotice };
|