@tesouro/embedded-components-react 0.4.13 → 0.4.14
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/lib/monite-sdk.d.ts +204 -468
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +37 -78
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +98 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +81 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +7 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +16 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +26 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +63 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +3 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +28 -166
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +40 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +173 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +45 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +1 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +45 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +55 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -66
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +7 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +58 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +134 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +14 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +39 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +78 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +78 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +24 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +119 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +33 -168
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +170 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +23 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +240 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +19 -347
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +364 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +186 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +56 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +3 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +125 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +5 -69
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +64 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +42 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +29 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +1 -297
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +307 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +45 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +48 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -340
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +338 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +2 -120
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +118 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -99
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +97 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +1 -58
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +53 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +52 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +180 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +39 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +90 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +14 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -287
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +86 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +296 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +1 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +37 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +37 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +199 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -346
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +345 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +8 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +93 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +120 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +87 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +32 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +1 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +104 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -125
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +17 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +123 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +15 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +167 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +106 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +7 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +0 -127
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import "./index2.js";
|
|
2
|
-
import "./index3.js";
|
|
3
1
|
import "./index4.js";
|
|
2
|
+
import "./index5.js";
|
|
4
3
|
import "./index6.js";
|
|
5
|
-
import "./index7.js";
|
|
6
4
|
import "./index8.js";
|
|
7
5
|
import "./index9.js";
|
|
8
6
|
import "./index10.js";
|
|
9
7
|
import "./index11.js";
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
8
|
+
import "./index12.js";
|
|
9
|
+
import "./index13.js";
|
|
10
|
+
import "./index25.js";
|
|
11
|
+
import "./index26.js";
|
|
12
|
+
import "./index38.js";
|
|
13
|
+
import "./index43.js";
|
|
14
|
+
import "./index52.js";
|
|
15
|
+
import "./index54.js";
|
|
17
16
|
import "./index56.js";
|
|
18
17
|
import "./index57.js";
|
|
19
18
|
import "./index58.js";
|
|
20
19
|
import "./index59.js";
|
|
21
|
-
import "./
|
|
20
|
+
import "./index60.js";
|
|
22
21
|
import "./index64.js";
|
|
23
22
|
import "./index65.js";
|
|
24
23
|
import "./index66.js";
|
|
25
24
|
import "./index67.js";
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
25
|
+
import "./index68.js";
|
|
26
|
+
import "./index71.js";
|
|
28
27
|
import "./index77.js";
|
|
29
28
|
import "./index78.js";
|
|
30
|
-
import
|
|
29
|
+
import "./index79.js";
|
|
30
|
+
import { BillPayWidget as e } from "./index83.js";
|
|
31
31
|
export { e as BillPayWidget };
|
|
@@ -2,86 +2,45 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import "../../../shared/ui/dist/index.js";
|
|
7
|
-
import { DUPLICATE_BILLS_LABELS_EN as t } from "./index2.js";
|
|
8
|
-
import { DuplicateVerdict as n, suspectedPayableDuplicates as r, useApplyDuplicateVerdictsMutation as i } from "../../data-access/dist/index7.js";
|
|
9
|
-
import "../../data-access/dist/index.js";
|
|
10
|
-
import { payableRemoval as a } from "./index6.js";
|
|
11
|
-
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
5
|
+
import { useCallback as e, useEffect as t, useState as n } from "react";
|
|
12
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
e.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
description: p.deleteConfirmDescription,
|
|
41
|
-
confirmButton: p.deleteConfirmButton,
|
|
42
|
-
backButton: p.deleteConfirmBackButton,
|
|
43
|
-
toast: p.deletedToast
|
|
44
|
-
} : b === "confirm" ? {
|
|
45
|
-
button: p.confirmBillButton,
|
|
46
|
-
title: p.cancelConfirmTitle,
|
|
47
|
-
description: p.cancelConfirmDescription,
|
|
48
|
-
confirmButton: p.confirmBillButton,
|
|
49
|
-
backButton: p.cancelConfirmBackButton,
|
|
50
|
-
toast: p.confirmedToast
|
|
51
|
-
} : {
|
|
52
|
-
button: p.cancelBillButton,
|
|
53
|
-
title: p.cancelConfirmTitle,
|
|
54
|
-
description: p.cancelConfirmDescription,
|
|
55
|
-
confirmButton: p.cancelConfirmButton,
|
|
56
|
-
backButton: p.cancelConfirmBackButton,
|
|
57
|
-
toast: p.cancelledToast
|
|
58
|
-
}, C = o(async () => {
|
|
59
|
-
await x(n.Remove, S.toast, d), y(!1);
|
|
60
|
-
}, [
|
|
61
|
-
x,
|
|
62
|
-
d,
|
|
63
|
-
S.toast
|
|
64
|
-
]), w = u && !!(h && g), T = w && !!b;
|
|
7
|
+
function r({ reviewIds: r }) {
|
|
8
|
+
let [i, a] = n(/* @__PURE__ */ new Set());
|
|
9
|
+
t(() => {
|
|
10
|
+
let e = new Set(r);
|
|
11
|
+
a((t) => {
|
|
12
|
+
let n = new Set([...t].filter((t) => e.has(t)));
|
|
13
|
+
return n.size === t.size ? t : n;
|
|
14
|
+
});
|
|
15
|
+
}, [r]);
|
|
16
|
+
let o = e((e) => {
|
|
17
|
+
a((t) => {
|
|
18
|
+
let n = new Set(t);
|
|
19
|
+
return n.delete(e) || n.add(e), n;
|
|
20
|
+
});
|
|
21
|
+
}, []), s = e((e) => {
|
|
22
|
+
a((t) => {
|
|
23
|
+
let n = new Set(t), r = e.every((e) => n.has(e));
|
|
24
|
+
return e.forEach((e) => {
|
|
25
|
+
r ? n.delete(e) : n.add(e);
|
|
26
|
+
}), n;
|
|
27
|
+
});
|
|
28
|
+
}, []), c = e((e) => {
|
|
29
|
+
a((t) => {
|
|
30
|
+
let n = new Set(t);
|
|
31
|
+
return e.forEach((e) => n.delete(e)), n;
|
|
32
|
+
});
|
|
33
|
+
}, []);
|
|
65
34
|
return {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
description: S.description,
|
|
75
|
-
confirmButton: S.confirmButton,
|
|
76
|
-
presentation: { tone: "destructive" }
|
|
77
|
-
},
|
|
78
|
-
onConfirm: () => void C(),
|
|
79
|
-
onCancel: () => y(!1),
|
|
80
|
-
isPending: _.isPending,
|
|
81
|
-
cancelButtonLabel: S.backButton
|
|
82
|
-
},
|
|
83
|
-
isBusy: _.isPending
|
|
35
|
+
isSelected: e((e) => i.has(e), [i]),
|
|
36
|
+
toggle: o,
|
|
37
|
+
toggleAll: s,
|
|
38
|
+
checkedState: e((e) => {
|
|
39
|
+
let t = e.filter((e) => i.has(e)).length;
|
|
40
|
+
return t === 0 ? !1 : t === e.length || "indeterminate";
|
|
41
|
+
}, [i]),
|
|
42
|
+
deselect: c
|
|
84
43
|
};
|
|
85
44
|
}
|
|
86
45
|
//#endregion
|
|
87
|
-
export {
|
|
46
|
+
export { r as useDuplicateBillsSelection };
|
|
@@ -1,7 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "./
|
|
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 { DUPLICATE_BILLS_LABELS_EN as t } from "./index4.js";
|
|
8
|
+
import { DuplicateVerdict as n, useApplyDuplicateVerdictsMutation as r } from "../../data-access/dist/index7.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { useDuplicateBills as i } from "./index9.js";
|
|
11
|
+
import { useDuplicateBillsSelection as a } from "./index10.js";
|
|
12
|
+
import { DuplicateBillsDialog as o } from "../../ui/dist/index79.js";
|
|
13
|
+
import "../../ui/dist/index.js";
|
|
14
|
+
import { useMemo as s, useState as c } from "react";
|
|
15
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
16
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js
|
|
17
|
+
function u({ open: u, onOpenChange: d, enabled: f = !0, canManageDuplicates: p = !0, onOpenBill: m, labels: h, dialogLabels: g }) {
|
|
18
|
+
let _ = s(() => ({
|
|
19
|
+
...t,
|
|
20
|
+
...h
|
|
21
|
+
}), [h]), v = i({ enabled: f }), y = s(() => v.groups.flatMap((e) => e.bills.map((e) => e.id)), [v.groups]), b = a({ reviewIds: y }), x = r(), [S, C] = c(), [w, T] = c(), E = s(() => {
|
|
22
|
+
let [e] = v.groups;
|
|
23
|
+
if (e) return w ? v.groups.some((e) => e.id === w.id) ? w.id : (v.groups[w.index] ?? v.groups[v.groups.length - 1]).id : e.id;
|
|
24
|
+
}, [w, v.groups]), D = (e) => e.bills.filter((e) => b.isSelected(e.id)), O = async (t, n, r, i) => {
|
|
25
|
+
let a = D(t);
|
|
26
|
+
if (a.length === 0) throw Error("Duplicate review action taken with no bills selected — keeping and removing both need a subject.");
|
|
27
|
+
let o = a.flatMap((e) => e.matches.map((t) => ({
|
|
28
|
+
payableId: e.id,
|
|
29
|
+
duplicateId: t.matchId,
|
|
30
|
+
matchedPayableId: t.matchedPayableId,
|
|
31
|
+
removeBy: e.removeBy
|
|
32
|
+
})));
|
|
33
|
+
C({
|
|
34
|
+
groupId: t.id,
|
|
35
|
+
action: r
|
|
36
|
+
});
|
|
37
|
+
try {
|
|
38
|
+
await x.mutateAsync({
|
|
39
|
+
verdict: n,
|
|
40
|
+
targets: o
|
|
41
|
+
}), e.success(i), b.deselect(a.map((e) => e.id));
|
|
42
|
+
} catch {
|
|
43
|
+
e.error(_.verdictFailedToast);
|
|
44
|
+
} finally {
|
|
45
|
+
C(void 0);
|
|
46
|
+
}
|
|
47
|
+
}, k = v.groups.map((e) => {
|
|
48
|
+
let t = e.bills.map((e) => e.id), r = D(e), i = {
|
|
49
|
+
vendorLabel: e.vendorLabel,
|
|
50
|
+
count: e.bills.length
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
id: e.id,
|
|
54
|
+
titleLabel: e.vendorLabel,
|
|
55
|
+
countLabel: String(e.bills.length),
|
|
56
|
+
accessibleLabel: _.reviewGroup(i),
|
|
57
|
+
selectAllLabel: _.selectGroup(i),
|
|
58
|
+
selectAllChecked: b.checkedState(t),
|
|
59
|
+
onToggleAllRows: () => b.toggleAll(t),
|
|
60
|
+
rows: e.bills.map((e) => ({
|
|
61
|
+
id: e.id,
|
|
62
|
+
status: e.status,
|
|
63
|
+
statusTone: e.statusTone,
|
|
64
|
+
removalOutcome: e.removeBy === "delete" || e.removeBy === "cancel" ? e.removeBy : void 0,
|
|
65
|
+
invoiceNumberLabel: e.invoiceNumberLabel,
|
|
66
|
+
amountLabel: e.amountLabel,
|
|
67
|
+
invoiceDateLabel: e.invoiceDateLabel,
|
|
68
|
+
addedOnLabel: e.addedOnLabel,
|
|
69
|
+
selectLabel: _.selectRow(e),
|
|
70
|
+
openLabel: _.openRow(e),
|
|
71
|
+
isSelected: b.isSelected(e.id),
|
|
72
|
+
onToggleSelected: () => b.toggle(e.id),
|
|
73
|
+
onOpen: () => m?.(e.id)
|
|
74
|
+
})),
|
|
75
|
+
onKeepSelected: p ? () => void O(e, n.Keep, "keep", _.dismissedToast) : void 0,
|
|
76
|
+
onRemoveDuplicates: p ? () => void O(e, n.Remove, "remove", _.removedToast) : void 0,
|
|
77
|
+
isActionDisabled: r.length === 0,
|
|
78
|
+
isRemoveUnavailable: r.some((e) => !e.removeBy),
|
|
79
|
+
pendingAction: S?.groupId === e.id ? S.action : void 0
|
|
80
|
+
};
|
|
81
|
+
});
|
|
82
|
+
return /* @__PURE__ */ l(o, {
|
|
83
|
+
open: u,
|
|
84
|
+
onOpenChange: d,
|
|
85
|
+
groups: k,
|
|
86
|
+
isLoading: v.isLoading,
|
|
87
|
+
isError: v.isError,
|
|
88
|
+
expandedGroupId: E,
|
|
89
|
+
onExpandedGroupChange: (e) => T({
|
|
90
|
+
id: e,
|
|
91
|
+
index: v.groups.findIndex((t) => t.id === e)
|
|
92
|
+
}),
|
|
93
|
+
isBusy: !!S,
|
|
94
|
+
labels: g
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { u as DuplicateBillsContainer, u as default };
|
|
@@ -1,21 +1,87 @@
|
|
|
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 { DUPLICATE_BILLS_LABELS_EN as t } from "./index4.js";
|
|
8
|
+
import { DuplicateVerdict as n, suspectedPayableDuplicates as r, useApplyDuplicateVerdictsMutation as i } from "../../data-access/dist/index7.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
|
+
import { payableRemoval as a } from "./index8.js";
|
|
11
|
+
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
3
12
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
paidToast: "Bill marked as paid",
|
|
7
|
-
submitError: "Couldn't mark this bill as paid. Try again.",
|
|
8
|
-
dialog: e
|
|
9
|
-
};
|
|
10
|
-
function n(e) {
|
|
11
|
-
return {
|
|
13
|
+
function l({ payable: l, canManage: u = !0, onRemoved: d, labels: f }) {
|
|
14
|
+
let p = s(() => ({
|
|
12
15
|
...t,
|
|
13
|
-
...
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
...f
|
|
17
|
+
}), [f]), m = r(l), [h] = m, g = l?.id, _ = i(), [v, y] = c(!1), b = a(l?.status), x = o(async (t, n, r) => {
|
|
18
|
+
if (!(!m.length || !g)) try {
|
|
19
|
+
await _.mutateAsync({
|
|
20
|
+
verdict: t,
|
|
21
|
+
targets: m.map((e) => ({
|
|
22
|
+
payableId: g,
|
|
23
|
+
duplicateId: e.id,
|
|
24
|
+
matchedPayableId: e.matched_payable_id,
|
|
25
|
+
removeBy: b
|
|
26
|
+
}))
|
|
27
|
+
}), e.success(n), r?.();
|
|
28
|
+
} catch {
|
|
29
|
+
e.error(p.verdictFailedToast);
|
|
17
30
|
}
|
|
31
|
+
}, [
|
|
32
|
+
_,
|
|
33
|
+
p,
|
|
34
|
+
m,
|
|
35
|
+
g,
|
|
36
|
+
b
|
|
37
|
+
]), S = b === "delete" ? {
|
|
38
|
+
button: p.deleteBillButton,
|
|
39
|
+
title: p.deleteConfirmTitle,
|
|
40
|
+
description: p.deleteConfirmDescription,
|
|
41
|
+
confirmButton: p.deleteConfirmButton,
|
|
42
|
+
backButton: p.deleteConfirmBackButton,
|
|
43
|
+
toast: p.deletedToast
|
|
44
|
+
} : b === "confirm" ? {
|
|
45
|
+
button: p.confirmBillButton,
|
|
46
|
+
title: p.cancelConfirmTitle,
|
|
47
|
+
description: p.cancelConfirmDescription,
|
|
48
|
+
confirmButton: p.confirmBillButton,
|
|
49
|
+
backButton: p.cancelConfirmBackButton,
|
|
50
|
+
toast: p.confirmedToast
|
|
51
|
+
} : {
|
|
52
|
+
button: p.cancelBillButton,
|
|
53
|
+
title: p.cancelConfirmTitle,
|
|
54
|
+
description: p.cancelConfirmDescription,
|
|
55
|
+
confirmButton: p.cancelConfirmButton,
|
|
56
|
+
backButton: p.cancelConfirmBackButton,
|
|
57
|
+
toast: p.cancelledToast
|
|
58
|
+
}, C = o(async () => {
|
|
59
|
+
await x(n.Remove, S.toast, d), y(!1);
|
|
60
|
+
}, [
|
|
61
|
+
x,
|
|
62
|
+
d,
|
|
63
|
+
S.toast
|
|
64
|
+
]), w = u && !!(h && g), T = w && !!b;
|
|
65
|
+
return {
|
|
66
|
+
isPossibleDuplicate: !!h,
|
|
67
|
+
onNotADuplicate: w ? () => void x(n.Keep, p.dismissedToast) : void 0,
|
|
68
|
+
onRemoveBill: T ? b === "delete" ? () => y(!0) : () => void C() : void 0,
|
|
69
|
+
removeBillLabel: T ? S.button : void 0,
|
|
70
|
+
removeConfirmation: {
|
|
71
|
+
open: v,
|
|
72
|
+
copy: {
|
|
73
|
+
title: S.title,
|
|
74
|
+
description: S.description,
|
|
75
|
+
confirmButton: S.confirmButton,
|
|
76
|
+
presentation: { tone: "destructive" }
|
|
77
|
+
},
|
|
78
|
+
onConfirm: () => void C(),
|
|
79
|
+
onCancel: () => y(!1),
|
|
80
|
+
isPending: _.isPending,
|
|
81
|
+
cancelButtonLabel: S.backButton
|
|
82
|
+
},
|
|
83
|
+
isBusy: _.isPending
|
|
18
84
|
};
|
|
19
85
|
}
|
|
20
86
|
//#endregion
|
|
21
|
-
export {
|
|
87
|
+
export { l as usePayableDuplicateReview };
|
|
@@ -1,26 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
-
}
|
|
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);
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
|
|
1
|
+
import "./index4.js";
|
|
2
|
+
import "./index5.js";
|
|
3
|
+
import "./index8.js";
|
|
4
|
+
import "./index9.js";
|
|
5
|
+
import "./index10.js";
|
|
6
|
+
import "./index11.js";
|
|
7
|
+
import "./index12.js";
|
|
@@ -1,66 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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 "./index13.js";
|
|
13
|
-
import { mergeMarkAsPaidFlowLabels as c } from "./index12.js";
|
|
14
|
-
import { useEffect as l, useState as u } from "react";
|
|
1
|
+
import { MARK_AS_PAID_DIALOG_LABELS_EN as e } from "../../ui/dist/index90.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
15
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
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
|
+
};
|
|
10
|
+
function n(e) {
|
|
11
|
+
return {
|
|
12
|
+
...t,
|
|
13
|
+
...e,
|
|
14
|
+
dialog: {
|
|
15
|
+
...t.dialog,
|
|
16
|
+
...e?.dialog
|
|
62
17
|
}
|
|
63
18
|
};
|
|
64
19
|
}
|
|
65
20
|
//#endregion
|
|
66
|
-
export {
|
|
21
|
+
export { t as MARK_AS_PAID_FLOW_LABELS_EN, n as mergeMarkAsPaidFlowLabels };
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js
|
|
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);
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
|
|
@@ -1,68 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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";
|
|
5
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
id: "reopen",
|
|
55
|
-
label: g.reopen,
|
|
56
|
-
variant: "ghost",
|
|
57
|
-
surface: "menu",
|
|
58
|
-
icon: i
|
|
59
|
-
}), c === "waiting_to_be_paid" && d && f && S && w.push({
|
|
60
|
-
id: "cancelScheduledPayment",
|
|
61
|
-
label: g.cancelScheduledPayment,
|
|
62
|
-
variant: "ghost",
|
|
63
|
-
surface: "menu",
|
|
64
|
-
icon: r
|
|
65
|
-
}), w;
|
|
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
|
+
};
|
|
66
64
|
}
|
|
67
65
|
//#endregion
|
|
68
|
-
export {
|
|
66
|
+
export { d as useMarkAsPaidFlow };
|