@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,26 +1,21 @@
|
|
|
1
|
+
import { MARK_AS_PAID_DIALOG_LABELS_EN as e } from "../../ui/dist/index95.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
function t(t = /* @__PURE__ */ new Date()) {
|
|
9
|
-
let n = e.formatToParts(t), r = Object.fromEntries(n.map((e) => [e.type, e.value]));
|
|
10
|
-
return `${r.year}-${r.month}-${r.day}`;
|
|
11
|
-
}
|
|
4
|
+
var t = {
|
|
5
|
+
dueDateSuffix: (e) => `by ${e}`,
|
|
6
|
+
paidToast: "Bill marked as paid",
|
|
7
|
+
submitError: "Couldn't mark this bill as paid. Try again.",
|
|
8
|
+
dialog: e
|
|
9
|
+
};
|
|
12
10
|
function n(e) {
|
|
13
|
-
return
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
function a(e, r = /* @__PURE__ */ new Date()) {
|
|
23
|
-
return n(e) < t(r);
|
|
11
|
+
return {
|
|
12
|
+
...t,
|
|
13
|
+
...e,
|
|
14
|
+
dialog: {
|
|
15
|
+
...t.dialog,
|
|
16
|
+
...e?.dialog
|
|
17
|
+
}
|
|
18
|
+
};
|
|
24
19
|
}
|
|
25
20
|
//#endregion
|
|
26
|
-
export {
|
|
21
|
+
export { t as MARK_AS_PAID_FLOW_LABELS_EN, n as mergeMarkAsPaidFlowLabels };
|
|
@@ -1,66 +1,26 @@
|
|
|
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 { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
8
|
-
import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
9
|
-
import { extractApiErrorMessage as r } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
10
|
-
import { useMarkPayableAsPaidMutation as i } from "../../data-access/dist/index13.js";
|
|
11
|
-
import "../../data-access/dist/index.js";
|
|
12
|
-
import { dateToCalendarKey as a, getDefaultPaymentDate as o, isTodayInEastern as s } from "./index15.js";
|
|
13
|
-
import { mergeMarkAsPaidFlowLabels as c } from "./index14.js";
|
|
14
|
-
import { useEffect as l, useState as u } from "react";
|
|
15
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onCommentChange: E,
|
|
39
|
-
onConfirm: () => {
|
|
40
|
-
!d || !C || b.isPending || g || b.mutate({
|
|
41
|
-
path: { payable_id: d },
|
|
42
|
-
body: {
|
|
43
|
-
paid_at: `${a(C)}T12:00:00.000Z`,
|
|
44
|
-
is_external: !0,
|
|
45
|
-
...T.trim() ? { comment: T.trim() } : {}
|
|
46
|
-
}
|
|
47
|
-
}, {
|
|
48
|
-
onSuccess: () => {
|
|
49
|
-
e.success(y.paidToast), M();
|
|
50
|
-
},
|
|
51
|
-
onError: (t) => {
|
|
52
|
-
e.error(r(t) ?? y.submitError);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
},
|
|
56
|
-
onCancel: () => {
|
|
57
|
-
b.isPending || M();
|
|
58
|
-
},
|
|
59
|
-
testId: _ ? `${_}-mark-as-paid-dialog` : void 0,
|
|
60
|
-
confirmTestId: _ ? `${_}-mark-as-paid-confirm` : void 0,
|
|
61
|
-
labels: y.dialog
|
|
62
|
-
}
|
|
63
|
-
};
|
|
2
|
+
var e = new Intl.DateTimeFormat("en-CA", {
|
|
3
|
+
timeZone: "America/New_York",
|
|
4
|
+
year: "numeric",
|
|
5
|
+
month: "2-digit",
|
|
6
|
+
day: "2-digit"
|
|
7
|
+
});
|
|
8
|
+
function t(t = /* @__PURE__ */ new Date()) {
|
|
9
|
+
let n = e.formatToParts(t), r = Object.fromEntries(n.map((e) => [e.type, e.value]));
|
|
10
|
+
return `${r.year}-${r.month}-${r.day}`;
|
|
11
|
+
}
|
|
12
|
+
function n(e) {
|
|
13
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
14
|
+
}
|
|
15
|
+
function r(e, r = /* @__PURE__ */ new Date()) {
|
|
16
|
+
return n(e) === t(r);
|
|
17
|
+
}
|
|
18
|
+
function i(e = /* @__PURE__ */ new Date()) {
|
|
19
|
+
let [n, r, i] = t(e).split("-").map(Number);
|
|
20
|
+
return new Date(n, r - 1, i);
|
|
21
|
+
}
|
|
22
|
+
function a(e, r = /* @__PURE__ */ new Date()) {
|
|
23
|
+
return n(e) < t(r);
|
|
64
24
|
}
|
|
65
25
|
//#endregion
|
|
66
|
-
export {
|
|
26
|
+
export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
|
|
@@ -1,2 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
8
|
+
import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
9
|
+
import { extractApiErrorMessage as r } from "../../../shared/util/dist/lib/apiErrors.js";
|
|
10
|
+
import { useMarkPayableAsPaidMutation as i } from "../../data-access/dist/index13.js";
|
|
11
|
+
import "../../data-access/dist/index.js";
|
|
12
|
+
import { dateToCalendarKey as a, getDefaultPaymentDate as o, isTodayInEastern as s } from "./index16.js";
|
|
13
|
+
import { mergeMarkAsPaidFlowLabels as c } from "./index15.js";
|
|
14
|
+
import { useEffect as l, useState as u } from "react";
|
|
15
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js
|
|
16
|
+
function d({ payableId: d, amountDueMinorUnits: f, amountToPayMinorUnits: p, currencyCode: m, dueDate: h, hasScheduledPayment: g, testId: _, labels: v }) {
|
|
17
|
+
let y = c(v), b = i(), [x, S] = u(!1), [C, w] = u(void 0), [T, E] = u(""), D = x && !g, O = n(f / 100, { currencyCode: m }), k = n((p ?? f) / 100, { currencyCode: m }), A = C ? t(a(C)) : void 0, j = h ? y.dueDateSuffix(t(h)) : void 0, M = () => {
|
|
18
|
+
S(!1), w(void 0), E("");
|
|
19
|
+
};
|
|
20
|
+
return l(() => {
|
|
21
|
+
g && (S(!1), w(void 0), E(""));
|
|
22
|
+
}, [g]), {
|
|
23
|
+
open: () => {
|
|
24
|
+
w(o()), E(""), S(!0);
|
|
25
|
+
},
|
|
26
|
+
isPending: b.isPending,
|
|
27
|
+
dialogProps: {
|
|
28
|
+
open: D,
|
|
29
|
+
amountDue: O,
|
|
30
|
+
dueDateSuffix: j,
|
|
31
|
+
paymentAmount: k,
|
|
32
|
+
selectedDate: C,
|
|
33
|
+
selectedDateLabel: A,
|
|
34
|
+
isToday: C ? s(C) : !1,
|
|
35
|
+
comment: T,
|
|
36
|
+
isSubmitting: b.isPending,
|
|
37
|
+
onDateChange: w,
|
|
38
|
+
onCommentChange: E,
|
|
39
|
+
onConfirm: () => {
|
|
40
|
+
!d || !C || b.isPending || g || b.mutate({
|
|
41
|
+
path: { payable_id: d },
|
|
42
|
+
body: {
|
|
43
|
+
paid_at: `${a(C)}T12:00:00.000Z`,
|
|
44
|
+
is_external: !0,
|
|
45
|
+
...T.trim() ? { comment: T.trim() } : {}
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
onSuccess: () => {
|
|
49
|
+
e.success(y.paidToast), M();
|
|
50
|
+
},
|
|
51
|
+
onError: (t) => {
|
|
52
|
+
e.error(r(t) ?? y.submitError);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
onCancel: () => {
|
|
57
|
+
b.isPending || M();
|
|
58
|
+
},
|
|
59
|
+
testId: _ ? `${_}-mark-as-paid-dialog` : void 0,
|
|
60
|
+
confirmTestId: _ ? `${_}-mark-as-paid-confirm` : void 0,
|
|
61
|
+
labels: y.dialog
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
export { d as useMarkAsPaidFlow };
|
|
@@ -1,77 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import "../../../shared/data-access/dist/index.js";
|
|
4
|
-
import { BanIcon as n, CalendarXIcon as r, RotateCcwIcon as i, ThumbsDownIcon as a, ThumbsUpIcon as o } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js
|
|
6
|
-
function s(n) {
|
|
7
|
-
return e(n, [t.CounterpartReadOrg]);
|
|
8
|
-
}
|
|
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({
|
|
16
|
-
id: "approve",
|
|
17
|
-
label: g.approve,
|
|
18
|
-
variant: "default",
|
|
19
|
-
surface: "row"
|
|
20
|
-
}), C.push({
|
|
21
|
-
id: "reject",
|
|
22
|
-
label: g.reject,
|
|
23
|
-
variant: "ghost",
|
|
24
|
-
surface: "row"
|
|
25
|
-
})), c({
|
|
26
|
-
status: l,
|
|
27
|
-
scopes: u,
|
|
28
|
-
hasWaitingRequest: m,
|
|
29
|
-
arePendingApproversUnknown: h
|
|
30
|
-
}) && (C.push({
|
|
31
|
-
id: "forceApprove",
|
|
32
|
-
label: g.forceApprove,
|
|
33
|
-
variant: "ghost",
|
|
34
|
-
surface: "menu",
|
|
35
|
-
icon: o,
|
|
36
|
-
sectionHeading: g.policyOverridesHeading
|
|
37
|
-
}), C.push({
|
|
38
|
-
id: "forceReject",
|
|
39
|
-
label: g.forceReject,
|
|
40
|
-
variant: "ghost",
|
|
41
|
-
surface: "menu",
|
|
42
|
-
icon: a,
|
|
43
|
-
sectionHeading: g.policyOverridesHeading
|
|
44
|
-
}));
|
|
45
|
-
let w = l === "waiting_to_be_paid" && _ && !f, T = l === "waiting_to_be_paid" && _ && v && y && b && !f;
|
|
46
|
-
return w && C.push({
|
|
47
|
-
id: "markAsPaid",
|
|
48
|
-
label: g.markAsPaid,
|
|
49
|
-
variant: "outline",
|
|
50
|
-
surface: "row"
|
|
51
|
-
}), T && C.push({
|
|
52
|
-
id: "payBill",
|
|
53
|
-
label: g.payBill,
|
|
54
|
-
variant: "default",
|
|
55
|
-
surface: "row"
|
|
56
|
-
}), l === "new" && x && C.push({
|
|
57
|
-
id: "cancel",
|
|
58
|
-
label: g.cancel,
|
|
59
|
-
variant: "ghost",
|
|
60
|
-
surface: "menu",
|
|
61
|
-
icon: n
|
|
62
|
-
}), (l === "rejected" || l === "waiting_to_be_paid" && !f) && x && C.push({
|
|
63
|
-
id: "reopen",
|
|
64
|
-
label: g.reopen,
|
|
65
|
-
variant: "ghost",
|
|
66
|
-
surface: "menu",
|
|
67
|
-
icon: i
|
|
68
|
-
}), l === "waiting_to_be_paid" && f && p && S && C.push({
|
|
69
|
-
id: "cancelScheduledPayment",
|
|
70
|
-
label: g.cancelScheduledPayment,
|
|
71
|
-
variant: "ghost",
|
|
72
|
-
surface: "menu",
|
|
73
|
-
icon: r
|
|
74
|
-
}), C;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
|
|
1
|
+
import "./index15.js";
|
|
2
|
+
import "./index17.js";
|
|
@@ -1,6 +1,77 @@
|
|
|
1
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
3
|
+
import "../../../shared/data-access/dist/index.js";
|
|
4
|
+
import { BanIcon as n, CalendarXIcon as r, RotateCcwIcon as i, ThumbsDownIcon as a, ThumbsUpIcon as o } from "lucide-react";
|
|
1
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js
|
|
2
|
-
function
|
|
3
|
-
return e
|
|
6
|
+
function s(n) {
|
|
7
|
+
return e(n, [t.CounterpartReadOrg]);
|
|
8
|
+
}
|
|
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({
|
|
16
|
+
id: "approve",
|
|
17
|
+
label: g.approve,
|
|
18
|
+
variant: "default",
|
|
19
|
+
surface: "row"
|
|
20
|
+
}), C.push({
|
|
21
|
+
id: "reject",
|
|
22
|
+
label: g.reject,
|
|
23
|
+
variant: "ghost",
|
|
24
|
+
surface: "row"
|
|
25
|
+
})), c({
|
|
26
|
+
status: l,
|
|
27
|
+
scopes: u,
|
|
28
|
+
hasWaitingRequest: m,
|
|
29
|
+
arePendingApproversUnknown: h
|
|
30
|
+
}) && (C.push({
|
|
31
|
+
id: "forceApprove",
|
|
32
|
+
label: g.forceApprove,
|
|
33
|
+
variant: "ghost",
|
|
34
|
+
surface: "menu",
|
|
35
|
+
icon: o,
|
|
36
|
+
sectionHeading: g.policyOverridesHeading
|
|
37
|
+
}), C.push({
|
|
38
|
+
id: "forceReject",
|
|
39
|
+
label: g.forceReject,
|
|
40
|
+
variant: "ghost",
|
|
41
|
+
surface: "menu",
|
|
42
|
+
icon: a,
|
|
43
|
+
sectionHeading: g.policyOverridesHeading
|
|
44
|
+
}));
|
|
45
|
+
let w = l === "waiting_to_be_paid" && _ && !f, T = l === "waiting_to_be_paid" && _ && v && y && b && !f;
|
|
46
|
+
return w && C.push({
|
|
47
|
+
id: "markAsPaid",
|
|
48
|
+
label: g.markAsPaid,
|
|
49
|
+
variant: "outline",
|
|
50
|
+
surface: "row"
|
|
51
|
+
}), T && C.push({
|
|
52
|
+
id: "payBill",
|
|
53
|
+
label: g.payBill,
|
|
54
|
+
variant: "default",
|
|
55
|
+
surface: "row"
|
|
56
|
+
}), l === "new" && x && C.push({
|
|
57
|
+
id: "cancel",
|
|
58
|
+
label: g.cancel,
|
|
59
|
+
variant: "ghost",
|
|
60
|
+
surface: "menu",
|
|
61
|
+
icon: n
|
|
62
|
+
}), (l === "rejected" || l === "waiting_to_be_paid" && !f) && x && C.push({
|
|
63
|
+
id: "reopen",
|
|
64
|
+
label: g.reopen,
|
|
65
|
+
variant: "ghost",
|
|
66
|
+
surface: "menu",
|
|
67
|
+
icon: i
|
|
68
|
+
}), l === "waiting_to_be_paid" && f && p && S && C.push({
|
|
69
|
+
id: "cancelScheduledPayment",
|
|
70
|
+
label: g.cancelScheduledPayment,
|
|
71
|
+
variant: "ghost",
|
|
72
|
+
surface: "menu",
|
|
73
|
+
icon: r
|
|
74
|
+
}), C;
|
|
4
75
|
}
|
|
5
76
|
//#endregion
|
|
6
|
-
export {
|
|
77
|
+
export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e?.amount_due ?? e?.total_amount ?? void 0;
|
|
4
|
+
}
|
|
6
5
|
//#endregion
|
|
7
|
-
export { e as
|
|
6
|
+
export { e as resolveAmountDueMinorUnits };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var e = {
|
|
3
|
+
scheduleDialog: "pay-bill-schedule-dialog",
|
|
4
|
+
reviewDialog: "pay-bill-review-dialog"
|
|
5
|
+
};
|
|
5
6
|
//#endregion
|
|
6
|
-
export { e as
|
|
7
|
+
export { e as payBillFlowTestIds };
|
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
import { coerceAmountValueToMinorUnits as e } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
|
|
2
|
-
import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
3
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
availableBalancePrefix: (e) => `Available balance: ${e}`,
|
|
7
|
-
futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
|
|
8
|
-
todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
|
|
9
|
-
};
|
|
10
|
-
function r(e) {
|
|
11
|
-
return e.slice(-4);
|
|
12
|
-
}
|
|
13
|
-
function i(i, a = n) {
|
|
14
|
-
return i.filter((e) => e.status === "ACTIVE").map((n) => {
|
|
15
|
-
let i = e(n.balance.value), o = n.balance.currencyCode;
|
|
16
|
-
return {
|
|
17
|
-
id: n.id,
|
|
18
|
-
primaryLabel: `${n.nickname || a.unnamedSourceAccount} - ${r(n.accountNumber)}`,
|
|
19
|
-
secondaryLabel: a.availableBalancePrefix(t(i / 100, { currencyCode: o })),
|
|
20
|
-
balanceMinorUnits: i
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
|
|
25
|
-
let a = e?.balanceMinorUnits;
|
|
26
|
-
return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
|
|
27
|
-
state: "error",
|
|
28
|
-
message: i.todayInsufficientFunds
|
|
29
|
-
} : {
|
|
30
|
-
state: "warning",
|
|
31
|
-
message: i.futureInsufficientFunds
|
|
32
|
-
};
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e ? `••••${e.slice(-4)}` : void 0;
|
|
33
4
|
}
|
|
34
5
|
//#endregion
|
|
35
|
-
export {
|
|
6
|
+
export { e as maskAccountNumber };
|
|
@@ -1,44 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../../ui/dist/index.js";
|
|
4
|
-
import { SOURCE_ACCOUNT_LABELS_EN as n } from "./index22.js";
|
|
1
|
+
import { coerceAmountValueToMinorUnits as e } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
|
|
2
|
+
import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
5
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
4
|
+
var n = {
|
|
5
|
+
unnamedSourceAccount: "Bank account",
|
|
6
|
+
availableBalancePrefix: (e) => `Available balance: ${e}`,
|
|
7
|
+
futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
|
|
8
|
+
todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
|
|
28
9
|
};
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
10
|
+
function r(e) {
|
|
11
|
+
return e.slice(-4);
|
|
12
|
+
}
|
|
13
|
+
function i(i, a = n) {
|
|
14
|
+
return i.filter((e) => e.status === "ACTIVE").map((n) => {
|
|
15
|
+
let i = e(n.balance.value), o = n.balance.currencyCode;
|
|
16
|
+
return {
|
|
17
|
+
id: n.id,
|
|
18
|
+
primaryLabel: `${n.nickname || a.unnamedSourceAccount} - ${r(n.accountNumber)}`,
|
|
19
|
+
secondaryLabel: a.availableBalancePrefix(t(i / 100, { currencyCode: o })),
|
|
20
|
+
balanceMinorUnits: i
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
|
|
25
|
+
let a = e?.balanceMinorUnits;
|
|
26
|
+
return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
|
|
27
|
+
state: "error",
|
|
28
|
+
message: i.todayInsufficientFunds
|
|
29
|
+
} : {
|
|
30
|
+
state: "warning",
|
|
31
|
+
message: i.futureInsufficientFunds
|
|
41
32
|
};
|
|
42
33
|
}
|
|
43
34
|
//#endregion
|
|
44
|
-
export {
|
|
35
|
+
export { n as SOURCE_ACCOUNT_LABELS_EN, a as deriveSourceAccountFunds, i as mapSourceAccountOptions };
|