@tesouro/embedded-components-react 0.4.12 → 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.
Files changed (164) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/lib/monite-sdk.d.ts +204 -468
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +14 -14
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +37 -78
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +98 -7
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +81 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +7 -26
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +16 -61
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +26 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +63 -65
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +2 -6
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -5
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -24
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -32
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +3 -41
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +28 -166
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +40 -44
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +173 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +45 -47
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +1 -7
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +45 -11
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +4 -8
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +13 -14
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +55 -22
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -66
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +7 -19
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +58 -126
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +15 -11
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +134 -4
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +14 -31
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +4 -5
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +39 -87
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +78 -67
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +78 -48
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +24 -57
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +47 -91
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +119 -33
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +33 -168
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +170 -75
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +75 -21
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +23 -210
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +199 -203
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +198 -89
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +105 -13
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +12 -47
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +23 -6
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +47 -31
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +27 -198
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +198 -30
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +30 -234
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +240 -19
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +19 -342
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +364 -4
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -34
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -167
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +186 -3
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +56 -5
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +2 -44
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +46 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +1 -8
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -9
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +9 -92
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +94 -3
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +3 -128
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +125 -8
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -7
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +5 -69
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -46
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +43 -18
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +20 -28
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +27 -82
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +83 -47
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -250
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +239 -101
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +107 -202
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +209 -3
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +4 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -43
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +6 -113
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +115 -1
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +0 -24
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +25 -0
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +64 -89
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +40 -37
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +10 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +52 -0
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -0
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -5
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +12 -62
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +12 -1
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +16 -12
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -12
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -16
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +30 -2
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -4
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +28 -26
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -1
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +6 -5
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +161 -154
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +16 -21
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +47 -337
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +20 -13
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +327 -107
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +13 -9
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +113 -92
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +9 -10
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +95 -55
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +9 -51
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +56 -10
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -160
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +54 -1
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +11 -2
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +178 -37
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -5
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +37 -88
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +5 -2
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +88 -12
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -84
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +11 -282
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -13
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +87 -0
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +294 -6
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +9 -35
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +0 -1
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +5 -36
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +37 -10
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +2 -201
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -3
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +3 -8
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +187 -333
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +3 -10
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +13 -4
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +335 -81
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -0
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -2
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +87 -121
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -89
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +127 -2
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +25 -4
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +85 -26
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +3 -3
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +26 -30
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +4 -9
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +30 -102
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +9 -14
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +85 -104
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +10 -11
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +123 -8
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -170
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +18 -2
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +7 -11
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +158 -96
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +1 -1
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +11 -7
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +100 -44
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +1 -1
  161. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  162. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  163. package/package.json +7 -7
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +0 -28
@@ -1,3 +1,186 @@
1
- import "./index37.js";
2
- import "./index57.js";
3
- import "./index58.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import { useAllLedgerAccountsQuery as n } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import { useWidgetConfig as ee } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import "../../../shared/feature/dist/index.js";
11
+ import { usePayableHistoryQuery as r } from "../../data-access/dist/index9.js";
12
+ import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index10.js";
13
+ import { usePayableQuery as a } from "../../data-access/dist/index15.js";
14
+ import "../../data-access/dist/index.js";
15
+ import { BillDecisionDialog as o } from "../../ui/dist/index54.js";
16
+ import { BillDetailsSheet as s } from "../../ui/dist/index60.js";
17
+ import { BillDuplicateNotice as c } from "../../ui/dist/index64.js";
18
+ import { MarkAsPaidDialog as l } from "../../ui/dist/index91.js";
19
+ import "../../ui/dist/index.js";
20
+ import { usePayableDuplicateReview as u } from "./index12.js";
21
+ import "./index13.js";
22
+ import { resolveAmountDueMinorUnits as d } from "./index19.js";
23
+ import { PayBillFlow as f } from "./index25.js";
24
+ import "./index26.js";
25
+ import { mapPayableToBillDetails as p } from "./index38.js";
26
+ import { mergeMarkAsPaidFlowLabels as te } from "./index14.js";
27
+ import { useMarkAsPaidFlow as m } from "./index16.js";
28
+ import "./index17.js";
29
+ import { mergeDecisionDialogCopy as h, mergePaymentHistoryMethodLabels as g } from "./index41.js";
30
+ import { buildPaymentHistory as _ } from "./index3.js";
31
+ import { useApprovalPolicyCardView as v } from "./index32.js";
32
+ import { useCurrentApprovalRequestId as y } from "./index33.js";
33
+ import { usePayableDetailActions as b } from "./index34.js";
34
+ import { useScheduledPayment as x } from "./index35.js";
35
+ import { BILL_DETAILS_LABELS_EN as S } from "./index58.js";
36
+ import { useMemo as C, useRef as w } from "react";
37
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
38
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js
39
+ function O({ open: O, onOpenChange: k, payableId: A, onClose: j, onExpand: M, testId: N, labels: P, poweredByBankName: F }) {
40
+ let I = C(() => ({
41
+ ...S,
42
+ ...P,
43
+ sheet: {
44
+ ...S.sheet,
45
+ ...P?.sheet,
46
+ statusBadge: {
47
+ ...S.sheet.statusBadge,
48
+ ...P?.sheet?.statusBadge
49
+ },
50
+ approvalPolicy: {
51
+ ...S.sheet.approvalPolicy,
52
+ ...P?.sheet?.approvalPolicy
53
+ },
54
+ dueDate: {
55
+ ...S.sheet.dueDate,
56
+ ...P?.sheet?.dueDate
57
+ }
58
+ },
59
+ decisionDialog: h(S.decisionDialog, P?.decisionDialog),
60
+ approvalPolicyCopy: {
61
+ ...S.approvalPolicyCopy,
62
+ ...P?.approvalPolicyCopy
63
+ },
64
+ markAsPaid: te(P?.markAsPaid),
65
+ actionSuccess: {
66
+ ...S.actionSuccess,
67
+ ...P?.actionSuccess
68
+ },
69
+ paymentHistoryMethodLabels: g(P?.paymentHistoryMethodLabels)
70
+ }), [P]), L = a(A), R = i(A), z = n(), B = L.data, V = w(null), H = y({
71
+ payableId: A,
72
+ status: B?.status
73
+ }), U = v({
74
+ payableId: A,
75
+ approvalPolicyId: B?.approval_policy_id,
76
+ copy: I.approvalPolicyCopy
77
+ }), W = x({
78
+ payableId: A,
79
+ scheduledPaymentDate: B?.scheduled_payment_date
80
+ }), G = m({
81
+ payableId: A,
82
+ amountDueMinorUnits: d(B) ?? 0,
83
+ amountToPayMinorUnits: B?.amount_to_pay ?? void 0,
84
+ currencyCode: B?.currency ?? void 0,
85
+ dueDate: B?.due_date,
86
+ hasScheduledPayment: W.hasScheduledPayment,
87
+ testId: N,
88
+ labels: I.markAsPaid
89
+ }), { actions: K, decisionDialog: q } = b({
90
+ payableId: B ? A : void 0,
91
+ status: B?.status,
92
+ currentApprovalRequestId: H.id,
93
+ isPolicyApprover: H.isPolicyApprover,
94
+ hasWaitingRequest: H.hasWaitingRequest,
95
+ hasScheduledPayment: W.hasScheduledPayment,
96
+ scheduledPaymentIntentId: W.scheduledPaymentIntentId,
97
+ isScheduledPaymentUnknown: W.isResolving,
98
+ pendingApprovers: U.pendingApprovers,
99
+ arePendingApproversUnknown: U.isLoading,
100
+ labels: {
101
+ payBill: I.sheet.payButton,
102
+ markAsPaid: I.sheet.markAsPaidButton,
103
+ reject: I.sheet.rejectButton,
104
+ approve: I.sheet.approveButton,
105
+ cancel: I.sheet.cancelButton,
106
+ cancelScheduledPayment: I.sheet.cancelScheduledPaymentButton,
107
+ reopen: I.sheet.reopenButton,
108
+ forceApprove: I.sheet.forceApproveButton,
109
+ forceReject: I.sheet.forceRejectButton,
110
+ policyOverridesHeading: I.sheet.policyOverridesGroup,
111
+ decisionDialog: I.decisionDialog,
112
+ actionError: I.actionError,
113
+ actionSuccess: I.actionSuccess
114
+ },
115
+ isMarkAsPaidPending: G.isPending,
116
+ onMarkAsPaidSelect: G.open,
117
+ onPayBillSelect: () => V.current?.open()
118
+ }), J = W.hasScheduledPayment && W.scheduledDateLabel ? /* @__PURE__ */ E("p", {
119
+ className: "ttw:text-sm ttw:text-muted-foreground",
120
+ children: I.scheduledSummary(W.scheduledDateLabel)
121
+ }) : void 0, { initResponse: Y } = ee(), X = u({
122
+ payable: B,
123
+ canManage: e(Y?.scopes, [t.PayableWriteOrg])
124
+ }), Z = X.isPossibleDuplicate ? /* @__PURE__ */ E(c, {
125
+ onNotADuplicate: X.onNotADuplicate,
126
+ isActionDisabled: X.isBusy
127
+ }) : void 0, Q = Z || J ? /* @__PURE__ */ D(T, { children: [Z, J] }) : void 0, $ = r(A), ne = C(() => _({
128
+ records: W.paymentRecords,
129
+ events: $.data?.data ?? [],
130
+ currencyCode: B?.currency,
131
+ labels: I
132
+ }), [
133
+ W.paymentRecords,
134
+ $.data,
135
+ B?.currency,
136
+ I
137
+ ]), re = C(() => B ? p({
138
+ payable: B,
139
+ lineItems: R.lineItems,
140
+ ledgerAccounts: z.data?.data ?? [],
141
+ labels: I,
142
+ hasScheduledPayment: W.hasScheduledPayment
143
+ }) : void 0, [
144
+ B,
145
+ R.lineItems,
146
+ z.data,
147
+ I,
148
+ W.hasScheduledPayment
149
+ ]), ie = L.isLoading || R.isResolving || z.isResolving, ae = L.isError || R.isError || z.isError;
150
+ return /* @__PURE__ */ D(T, { children: [
151
+ /* @__PURE__ */ E(s, {
152
+ open: O,
153
+ onOpenChange: k,
154
+ details: re,
155
+ actions: K,
156
+ approvalPolicy: U.view,
157
+ paymentHistory: ne,
158
+ paymentHistoryError: W.isError || $.isError,
159
+ paymentHistoryLoading: W.isResolving || $.isLoading,
160
+ isLoading: ie,
161
+ isError: ae,
162
+ notice: Q,
163
+ onClose: j,
164
+ onExpand: M,
165
+ testId: N,
166
+ labels: I.sheet
167
+ }),
168
+ /* @__PURE__ */ E(o, {
169
+ ...q,
170
+ labels: { cancelButton: I.decisionDialog.cancelButton },
171
+ testId: N ? `${N}-decision-dialog` : void 0,
172
+ confirmTestId: N ? `${N}-decision-confirm` : void 0,
173
+ reasonTestId: N ? `${N}-decision-reason` : void 0,
174
+ reasonFieldId: N ? `${N}-decision-reason-field` : void 0
175
+ }),
176
+ /* @__PURE__ */ E(l, { ...G.dialogProps }),
177
+ B ? /* @__PURE__ */ E(f, {
178
+ ref: V,
179
+ payable: B,
180
+ onMissingAchInstructions: M,
181
+ poweredByBankName: F
182
+ }) : null
183
+ ] });
184
+ }
185
+ //#endregion
186
+ export { O as BillDetailsContainer, O as default };
@@ -1,8 +1,59 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js
2
- function e(e) {
3
- if (e === "draft") return "delete";
4
- if (e === "new") return "cancel";
5
- if (e === "canceled") return "confirm";
2
+ var e = /* @__PURE__ */ new Set([
3
+ "new",
4
+ "approve_in_progress",
5
+ "waiting_to_be_paid",
6
+ "partially_paid"
7
+ ]);
8
+ function t(e, t) {
9
+ let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
10
+ return n.getTime() < r;
11
+ }
12
+ function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPayment: a = !!i, now: o = /* @__PURE__ */ new Date() }) {
13
+ if (e.has(n) && a) return {
14
+ status: "scheduled",
15
+ tone: "accent",
16
+ isOverdue: !1
17
+ };
18
+ let s = !!(e.has(n) && r && t(r, o));
19
+ switch (n) {
20
+ case "draft":
21
+ case "new": return {
22
+ status: "draft",
23
+ tone: "neutral",
24
+ isOverdue: s
25
+ };
26
+ case "approve_in_progress": return {
27
+ status: "pending_approval",
28
+ tone: "warning",
29
+ isOverdue: s
30
+ };
31
+ case "waiting_to_be_paid": return {
32
+ status: "ready_to_pay",
33
+ tone: "info",
34
+ isOverdue: s
35
+ };
36
+ case "partially_paid": return {
37
+ status: "partially_paid",
38
+ tone: "success",
39
+ isOverdue: s
40
+ };
41
+ case "paid": return {
42
+ status: "paid",
43
+ tone: "success",
44
+ isOverdue: s
45
+ };
46
+ case "canceled": return {
47
+ status: "canceled",
48
+ tone: "muted",
49
+ isOverdue: s
50
+ };
51
+ case "rejected": return {
52
+ status: "rejected",
53
+ tone: "danger",
54
+ isOverdue: s
55
+ };
56
+ }
6
57
  }
7
58
  //#endregion
8
- export { e as payableRemoval };
59
+ export { n as derivePayableStatus };
@@ -1,4 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
2
- var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
3
- //#endregion
4
- export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
1
+ import "./index38.js";
2
+ import "./index58.js";
3
+ import "./index59.js";
@@ -1,46 +1,4 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import "../../../shared/feature/dist/index.js";
7
- import { BillPayWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "./index60.js";
8
- import { Payables as r } from "../../../monite-sdk/dist/index444.js";
9
- import "../../../monite-sdk/dist/index.js";
10
- import { MoniteRegionProvider as i } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
- import "../../../shared/monite-wrapper/feature/dist/index.js";
12
- import { useEffect as a } from "react";
13
- import { jsx as o } from "react/jsx-runtime";
14
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js
15
- var s = (e) => e;
16
- function c(n) {
17
- let i = e();
18
- return a(() => {
19
- i(t.Mounted);
20
- }, [i]), /* @__PURE__ */ o(r, { ...n });
21
- }
22
- function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, implementation: d, uiFramework: f, errorFallback: p, onError: m, finopsThemeColors: h, analytics: g, disclosuresAcceptance: _, providerLabels: v, pageTitleComponent: y = s, ...b }) {
23
- return /* @__PURE__ */ o(i, {
24
- widgetName: n,
25
- baseUrl: e,
26
- widgetToken: t,
27
- organizationId: r,
28
- configClient: a,
29
- gatewayRouting: l,
30
- linkComponent: u,
31
- implementation: d,
32
- uiFramework: f,
33
- errorFallback: p,
34
- onError: m,
35
- finopsThemeColors: h,
36
- analytics: g,
37
- disclosuresAcceptance: _,
38
- providerLabels: v,
39
- children: /* @__PURE__ */ o(c, {
40
- ...b,
41
- pageTitleComponent: y
42
- })
43
- });
44
- }
2
+ var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
45
3
  //#endregion
46
- export { l as BillPayWidgetMonite, l as default };
4
+ export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -1 +1,46 @@
1
- import "./index61.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
+ import "../../../shared/feature/dist/index.js";
7
+ import { BillPayWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "./index61.js";
8
+ import { Payables as r } from "../../../monite-sdk/dist/index444.js";
9
+ import "../../../monite-sdk/dist/index.js";
10
+ import { MoniteRegionProvider as i } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
+ import "../../../shared/monite-wrapper/feature/dist/index.js";
12
+ import { useEffect as a } from "react";
13
+ import { jsx as o } from "react/jsx-runtime";
14
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
15
+ var s = (e) => e;
16
+ function c(n) {
17
+ let i = e();
18
+ return a(() => {
19
+ i(t.Mounted);
20
+ }, [i]), /* @__PURE__ */ o(r, { ...n });
21
+ }
22
+ function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, implementation: d, uiFramework: f, errorFallback: p, onError: m, finopsThemeColors: h, analytics: g, disclosuresAcceptance: _, providerLabels: v, pageTitleComponent: y = s, ...b }) {
23
+ return /* @__PURE__ */ o(i, {
24
+ widgetName: n,
25
+ baseUrl: e,
26
+ widgetToken: t,
27
+ organizationId: r,
28
+ configClient: a,
29
+ gatewayRouting: l,
30
+ linkComponent: u,
31
+ implementation: d,
32
+ uiFramework: f,
33
+ errorFallback: p,
34
+ onError: m,
35
+ finopsThemeColors: h,
36
+ analytics: g,
37
+ disclosuresAcceptance: _,
38
+ providerLabels: v,
39
+ children: /* @__PURE__ */ o(c, {
40
+ ...b,
41
+ pageTitleComponent: y
42
+ })
43
+ });
44
+ }
45
+ //#endregion
46
+ export { l as BillPayWidgetMonite, l as default };
@@ -1,8 +1 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
2
- var e = (e) => [
3
- "bill-pay",
4
- "upload-queue",
5
- e ?? ""
6
- ];
7
- //#endregion
8
- export { e as billPayUploadQueueKey };
1
+ import "./index62.js";
@@ -1,11 +1,8 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
2
- var e = {
3
- uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
- completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
- readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
- failedCaption: (e) => `${e} failed to upload`,
7
- tooManyFilesError: (e) => `You can only upload up to ${e} files at a time`,
8
- remainingCapacityError: (e) => e === 0 ? "Wait for the current uploads to finish before adding more files" : `You can upload ${e} more ${e === 1 ? "file" : "files"} right now`
9
- };
2
+ var e = (e) => [
3
+ "bill-pay",
4
+ "upload-queue",
5
+ e ?? ""
6
+ ];
10
7
  //#endregion
11
- export { e as BILL_UPLOAD_QUEUE_LABELS_EN };
8
+ export { e as billPayUploadQueueKey };
@@ -1,94 +1,11 @@
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 { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
- import "../../../shared/ui/dist/index.js";
8
- import { useUploadPayableFromFileMutation as n } from "../../data-access/dist/index13.js";
9
- import { usePayableOcrQueries as r } from "../../data-access/dist/index14.js";
10
- import "../../data-access/dist/index.js";
11
- import { billPayUploadQueueKey as i } from "./index63.js";
12
- import { BILL_UPLOAD_QUEUE_LABELS_EN as a } from "./index64.js";
13
- import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
14
- import { useQuery as u, useQueryClient as d } from "@tanstack/react-query";
15
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js
16
- function f({ onOpenBill: f, labels: p } = {}) {
17
- let m = {
18
- ...a,
19
- ...p
20
- }, h = p?.tooManyFilesError ?? a.tooManyFilesError, g = p?.remainingCapacityError ?? a.remainingCapacityError, { organizationId: _ } = t(), v = d(), y = c(() => i(_), [_]), b = n(), [x, S] = l(!1), { data: C = [] } = u({
21
- queryKey: y,
22
- queryFn: () => v.getQueryData(y) ?? [],
23
- staleTime: Infinity,
24
- gcTime: Infinity,
25
- initialData: []
26
- }), w = o((e, t) => {
27
- v.setQueryData(y, (n) => (n ?? []).map((n) => n.localId === e ? {
28
- ...n,
29
- ...t
30
- } : n));
31
- }, [v, y]), T = o((t) => {
32
- let n = (v.getQueryData(y) ?? []).filter((e) => e.status === "uploading").length;
33
- if (t.length + n > 10) {
34
- e.error(n > 0 ? g(10 - n) : h(10));
35
- return;
36
- }
37
- S(!1);
38
- for (let e of t) {
39
- let t = crypto.randomUUID();
40
- v.setQueryData(y, (n) => [...n ?? [], {
41
- localId: t,
42
- fileName: e.name,
43
- status: "uploading"
44
- }]), b.mutateAsync({ file: e }).then((e) => w(t, { payableId: e?.id })).catch(() => w(t, { status: "failed" }));
45
- }
46
- }, [
47
- w,
48
- v,
49
- y,
50
- g,
51
- h,
52
- b
53
- ]), E = r({ payableIds: C.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
54
- s(() => {
55
- for (let { payableId: e, ocrStatus: t, isError: n } of E) {
56
- let r = C.find((t) => t.payableId === e && t.status === "uploading");
57
- r && (t === "success" ? w(r.localId, { status: "ready" }) : (n || t === "error" || t === "canceled") && w(r.localId, { status: "failed" }));
58
- }
59
- }, [
60
- C,
61
- E,
62
- w
63
- ]);
64
- let D = C.filter((e) => e.status === "uploading"), O = C.filter((e) => e.status === "ready"), k = C.filter((e) => e.status === "failed"), A = (e) => ({
65
- id: e.localId,
66
- fileName: e.fileName,
67
- status: e.status,
68
- onOpen: e.status === "ready" && e.payableId && f ? () => f(e.payableId) : void 0
69
- }), j = D.length ? [{
70
- id: "in-progress",
71
- items: C.map(A)
72
- }] : [...O.length ? [{
73
- id: "ready",
74
- caption: m.readyCaption(O.length),
75
- items: O.map(A)
76
- }] : [], ...k.length ? [{
77
- id: "failed",
78
- caption: m.failedCaption(k.length),
79
- items: k.map(A)
80
- }] : []], M = D.length ? m.uploadingSummary(C.length) : O.length ? m.completeSummary(O.length) : m.failedCaption(k.length), N = o(() => {
81
- v.setQueryData(y, []);
82
- }, [v, y]);
83
- return {
84
- enqueue: T,
85
- sections: j,
86
- summaryLabel: M,
87
- collapsed: x,
88
- onToggleCollapsed: o(() => S((e) => !e), []),
89
- onClose: N,
90
- isVisible: C.length > 0
91
- };
92
- }
2
+ var e = {
3
+ uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
+ completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
+ readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
+ failedCaption: (e) => `${e} failed to upload`,
7
+ tooManyFilesError: (e) => `You can only upload up to ${e} files at a time`,
8
+ remainingCapacityError: (e) => e === 0 ? "Wait for the current uploads to finish before adding more files" : `You can upload ${e} more ${e === 1 ? "file" : "files"} right now`
9
+ };
93
10
  //#endregion
94
- export { f as useBillUploadQueue };
11
+ export { e as BILL_UPLOAD_QUEUE_LABELS_EN };
@@ -1,3 +1,94 @@
1
- import "./index63.js";
2
- import "./index64.js";
3
- import "./index65.js";
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 { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
+ import "../../../shared/ui/dist/index.js";
8
+ import { useUploadPayableFromFileMutation as n } from "../../data-access/dist/index13.js";
9
+ import { usePayableOcrQueries as r } from "../../data-access/dist/index14.js";
10
+ import "../../data-access/dist/index.js";
11
+ import { billPayUploadQueueKey as i } from "./index64.js";
12
+ import { BILL_UPLOAD_QUEUE_LABELS_EN as a } from "./index65.js";
13
+ import { useCallback as o, useEffect as s, useMemo as c, useState as l } from "react";
14
+ import { useQuery as u, useQueryClient as d } from "@tanstack/react-query";
15
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js
16
+ function f({ onOpenBill: f, labels: p } = {}) {
17
+ let m = {
18
+ ...a,
19
+ ...p
20
+ }, h = p?.tooManyFilesError ?? a.tooManyFilesError, g = p?.remainingCapacityError ?? a.remainingCapacityError, { organizationId: _ } = t(), v = d(), y = c(() => i(_), [_]), b = n(), [x, S] = l(!1), { data: C = [] } = u({
21
+ queryKey: y,
22
+ queryFn: () => v.getQueryData(y) ?? [],
23
+ staleTime: Infinity,
24
+ gcTime: Infinity,
25
+ initialData: []
26
+ }), w = o((e, t) => {
27
+ v.setQueryData(y, (n) => (n ?? []).map((n) => n.localId === e ? {
28
+ ...n,
29
+ ...t
30
+ } : n));
31
+ }, [v, y]), T = o((t) => {
32
+ let n = (v.getQueryData(y) ?? []).filter((e) => e.status === "uploading").length;
33
+ if (t.length + n > 10) {
34
+ e.error(n > 0 ? g(10 - n) : h(10));
35
+ return;
36
+ }
37
+ S(!1);
38
+ for (let e of t) {
39
+ let t = crypto.randomUUID();
40
+ v.setQueryData(y, (n) => [...n ?? [], {
41
+ localId: t,
42
+ fileName: e.name,
43
+ status: "uploading"
44
+ }]), b.mutateAsync({ file: e }).then((e) => w(t, { payableId: e?.id })).catch(() => w(t, { status: "failed" }));
45
+ }
46
+ }, [
47
+ w,
48
+ v,
49
+ y,
50
+ g,
51
+ h,
52
+ b
53
+ ]), E = r({ payableIds: C.filter((e) => e.status === "uploading" && e.payableId).map((e) => e.payableId) });
54
+ s(() => {
55
+ for (let { payableId: e, ocrStatus: t, isError: n } of E) {
56
+ let r = C.find((t) => t.payableId === e && t.status === "uploading");
57
+ r && (t === "success" ? w(r.localId, { status: "ready" }) : (n || t === "error" || t === "canceled") && w(r.localId, { status: "failed" }));
58
+ }
59
+ }, [
60
+ C,
61
+ E,
62
+ w
63
+ ]);
64
+ let D = C.filter((e) => e.status === "uploading"), O = C.filter((e) => e.status === "ready"), k = C.filter((e) => e.status === "failed"), A = (e) => ({
65
+ id: e.localId,
66
+ fileName: e.fileName,
67
+ status: e.status,
68
+ onOpen: e.status === "ready" && e.payableId && f ? () => f(e.payableId) : void 0
69
+ }), j = D.length ? [{
70
+ id: "in-progress",
71
+ items: C.map(A)
72
+ }] : [...O.length ? [{
73
+ id: "ready",
74
+ caption: m.readyCaption(O.length),
75
+ items: O.map(A)
76
+ }] : [], ...k.length ? [{
77
+ id: "failed",
78
+ caption: m.failedCaption(k.length),
79
+ items: k.map(A)
80
+ }] : []], M = D.length ? m.uploadingSummary(C.length) : O.length ? m.completeSummary(O.length) : m.failedCaption(k.length), N = o(() => {
81
+ v.setQueryData(y, []);
82
+ }, [v, y]);
83
+ return {
84
+ enqueue: T,
85
+ sections: j,
86
+ summaryLabel: M,
87
+ collapsed: x,
88
+ onToggleCollapsed: o(() => S((e) => !e), []),
89
+ onClose: N,
90
+ isVisible: C.length > 0
91
+ };
92
+ }
93
+ //#endregion
94
+ export { f as useBillUploadQueue };